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.
1106 lines
750 KiB
1106 lines
750 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[2806],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(_t,Pt){"use strict";Pt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},77277:function(_t,Pt){"use strict";Pt.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},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 _t={},Pt="5.0",ce={},z=null,Ye=!1,Oe=!1,Ve=null,xe=!1,we=null,He=null,We=0;We<arguments.length;We++){var Be=arguments[We];if(Be!==null)switch(typeof Be){case"number":Pt=Be.toFixed(1);break;case"string":Be.match(new RegExp("^[0-9]\\.[0-9]+$"))?Pt=Be:Ve=Be;break;case"object":typeof Be.is3D!="undefined"?z=Be:ce=Be;break;case"boolean":Ye=Be,Oe=!0;break}}z===null&&(z={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ce.material_id!==void 0&&!Oe&&(Ye=!0)),Ve!==null&&ce.id===void 0&&(ce.id=Ve);var he="",$e="",be=!1,Ue=null,Le=null,ge=null,Ce=!1,De=null,Ke=null,it=null,tt=null,ze=null;ce.height!==void 0&&(ce.height=Math.round(ce.height)),ce.width!==void 0&&(ce.width=Math.round(ce.width));var Ze=function(Ne){return parseFloat(Ne)>4?parseFloat(Ne):5};_t.setHTML5Codebase=function(Ne,at){He=Ne,qe(Ne,at)},_t.setJavaCodebase=_t.setJavaCodebaseVersion=_t.isCompiledInstalled=_t.setPreCompiledScriptPath=_t.setPreCompiledResourcePath=function(){},_t.setHTML5CodebaseVersion=function(Ne,at){var nt=parseFloat(Ne);if(nt!==NaN&&nt<5){console.log("The GeoGebra HTML5 codebase version "+nt+" is deprecated. Using version latest instead.");return}we=Ne,de(Ne,at)},_t.getHTML5CodebaseVersion=function(){return Le},_t.getParameters=function(){return ce},_t.setFontsCSSURL=function(Ne){tt=Ne},_t.setGiacJSURL=function(Ne){},_t.setJNLPFile=function(Ne){he=Ne},_t.setJNLPBaseDir=function(Ne){},_t.inject=function(){function Ne(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var at="auto",nt=ce.id,Tt,ut=!1,At=0;At<arguments.length;At++){var Ie=arguments[At];typeof Ie=="string"?(Ie=Ie.toLowerCase(),Ie.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?at=Ie:nt=arguments[At]):typeof Ie=="boolean"?ut=Ie:Ie instanceof HTMLElement&&(Tt=Ie)}pt();function pt(){if(!xe){setTimeout(pt,200);return}at=wt(at);var mt=Tt||document.getElementById(nt);if(!mt){console.log("possibly bug on ajax loading? ");return}if(_t.removeExistingApplet(mt,!1),ce.width===void 0&&mt.clientWidth&&(ce.width=mt.clientWidth),ce.height===void 0&&mt.clientHeight&&(ce.height=mt.clientHeight),!(ce.width&&ce.height)&&at==="html5"&&(delete ce.width,delete ce.height),Ue=at,at==="screenshot")ke(mt,ce);else{var ae=!1;ce.hasOwnProperty("playButton")&&ce.playButton||ce.hasOwnProperty("clickToLoad")&&ce.clickToLoad?ae=!0:ce.hasOwnProperty("playButtonAutoDecide")&&ce.playButtonAutoDecide&&(ae=(!Xe()||Ne())&&_e()),ae?(Ue="screenshot",ht(mt,ce,ut,at)):Ge(mt,ce,ut)}}};function Xe(){try{return window.self!==window.top}catch(Ne){return!0}}function _e(){return ce.hasOwnProperty("screenshotGenerator")&&ce.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}_t.getViews=function(){return z},_t.isJavaInstalled=function(){return!1};var Ot=function(Ne){var at=function(At){var Ie=JSON.parse(At),pt=function(ne){return ne.type=="G"||ne.type=="E"},mt=Ie.elements?Ie.elements.filter(pt)[0]:Ie;if(!mt||!mt.url){nt();return}ce.fileName=mt.url,Qe(mt.settings||{}),z.is3D=!0;var ae="https://www.geogebra.org/images/";_t.setPreviewImage(De||mt.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Ne()},nt=function(){ce.onError&&ce.onError(),kt("Error: Fetching material (id "+ce.material_id+") failed.",ce)},Tt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",ut="/materials/"+ce.material_id+"?scope=basic";je("https://"+Tt+"/api/proxy.php?path="+encodeURIComponent(ut),at,nt)};function Qe(Ne){var at=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(nt){Ne[nt]=!!Ne[nt]}),at.forEach(function(nt){ce[nt]===void 0&&Ne[nt]!==void 0&&(ce[nt]=Ne[nt])}),ce.showToolBarHelp===void 0&&(ce.showToolBarHelp=ce.showToolBar)}function je(Ne,at,nt){var Tt=new XMLHttpRequest;Tt.open("GET",Ne),Tt.onload=function(){at(Tt.responseText)},Tt.onerror=nt,Tt.send()}_t.isHTML5Installed=function(){return!0},_t.getLoadedAppletType=function(){return Ue},_t.setPreviewImage=function(Ne,at,nt){De=Ne,Ke=at,it=nt},_t.removeExistingApplet=function(Ne,at){var nt;typeof Ne=="string"&&(Ne=document.getElementById(Ne)),Ue=null;var Tt=null;for(nt=0;nt<Ne.childNodes.length;nt++){var ut=Ne.childNodes[nt],At=ut.className;At==="applet_screenshot"?at?(ut.style.display="block",Ue="screenshot"):ut.style.display="none":At!=="applet_scaler prerender"&&(Ne.removeChild(ut),Tt=At&&At.indexOf("appletParameters")!=-1?ut.id:null,nt--)}var Ie=ce.id!==void 0?ce.id:Tt,pt=window[Ie];pt&&typeof pt.getBase64=="function"&&(pt.remove(),window[Ie]=null)},_t.refreshHitPoints=function(){if(Ze(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ne=_t.getAppletObject();return Ne&&typeof Ne.recalculateEnvironments=="function"?(Ne.recalculateEnvironments(),!0):!1},_t.startAnimation=function(){var Ne=_t.getAppletObject();return Ne&&typeof Ne.startAnimation=="function"?(Ne.startAnimation(),!0):!1},_t.stopAnimation=function(){var Ne=_t.getAppletObject();return Ne&&typeof Ne.stopAnimation=="function"?(Ne.stopAnimation(),!0):!1},_t.getAppletObject=function(){var Ne=ce.id!==void 0?ce.id:"ggbApplet";return window[Ne]},_t.resize=function(){};var ct=function(Ne,at,nt){var Tt=document.createElement("param");Tt.setAttribute("name",at),Tt.setAttribute("value",nt),Ne.appendChild(Tt)},Me=function(Ne){return Ne&&Ne!=="false"},Ge=function(Ne,at,nt){Ze(Le)<=4.2&&(nt=!0);var Tt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Le||ggbHTML5LoadedCodebaseIsWebSimple&&!Ce)&&(Tt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var ut=document.createElement("div");ut.classList.add("appletParameters","notranslate");var At=at.width,Ie=at.height;if(at.disableAutoScale=at.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():at.disableAutoScale,at.width!==void 0)if(Ze(Le)<=4.4)Me(at.showToolBar)&&(at.height-=7),Me(at.showAlgebraInput)&&(at.height-=37),at.width<605&&Me(at.showToolBar)&&(at.width=605,At=605);else{var pt=100;(Me(at.showToolBar)||Me(at.showMenuBar))&&(at.hasOwnProperty("customToolBar")&&(at.customToolbar=at.customToolBar),pt=Me(at.showMenuBar)?245:155),At<pt&&(at.width=pt,At=pt)}ut.style.border="none",ut.style.display="inline-block";for(var mt in at)at.hasOwnProperty(mt)&&mt!=="appletOnLoad"&&ut.setAttribute("data-param-"+mt,at[mt]);tt&&ut.setAttribute("data-param-fontscssurl",tt),_t.resize=function(){GGBAppletUtils.responsiveResize(Ne,at)},window.addEventListener("resize",function(Gt){_t.resize()});var ae=typeof at.appletOnLoad=="function"?at.appletOnLoad:function(){};if(!nt&&at.width!==void 0){at.hasOwnProperty("showSplash")||ut.setAttribute("data-param-showSplash","false");var ne=Ne.querySelector(".applet_scaler.prerender"),ee=ne!==null;if(ee)var oe=ne.querySelector(".ggb_preview");else{var oe=Rt(At,Ie,at.borderColor,!1);ne=document.createElement("div"),ne.className="applet_scaler",ne.style.position="relative",ne.style.display="block",ne.style.width=At+"px",ne.style.height=Ie+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ne,"66%"),Ze(Le)>=5?(at.appletOnLoad=function(Gt){var jt=Ne.querySelector(".ggb_preview");jt&&jt.parentNode.removeChild(jt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ne),window.GGBT_wsf_view&&$(window).trigger("resize"),ae(Gt)},ee||ne.appendChild(oe)):ut.appendChild(oe),ne.appendChild(ut),ee||Ne.appendChild(ne),setTimeout(function(){_t.resize()},1)}else{var se=document.createElement("div");se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.appendChild(ut),Ne.appendChild(se),at.appletOnLoad=function(Gt){_t.resize(),ae(Gt)}}function re(Gt,jt){jt&&typeof jt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Gt,jt.appletOnLoad):renderGGBElement(Gt),kt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",jt)}function Se(Gt,jt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Gt,params:jt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(rn){re(rn.article,rn.params)}),html5AppletsToProcess=null)},Ze(Le)<5&&(Gt.className+=" geogebraweb")):re(Gt,jt)}if(Tt){scriptLoadStarted=!0;for(var et=0;et<ut.childNodes.length;et++){var Lt=ut.childNodes[et].tagName;Lt==="TABLE"&&(ut.removeChild(ut.childNodes[et]),et--)}if(ggbHTML5LoadedScript!==null){var vt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');vt!=null&&vt.parentNode.removeChild(vt)}var bt=document.createElement("script"),St=function(){Se(ut,at)};bt.src=$e+ge,ggbHTML5LoadedCodebaseIsWebSimple=Ce,ggbHTML5LoadedCodebaseVersion=Le,ggbHTML5LoadedScript=bt.src,kt("GeoGebra HTML5 codebase loaded: '"+$e+"'.",at),!He&&(!we||we=="5.0")?(Ce?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),St()):$e.requirejs?__webpack_require__.e(981).then(function(){var Gt=[__webpack_require__(60981)];St.apply(null,Gt)}.bind(this)).catch(__webpack_require__.oe):(bt.onload=St,Ne.appendChild(bt))}else Se(ut,at);at.height=Ie,at.width=At},ke=function(Ne,at,nt){var Tt=Rt(at.width,at.height,at.borderColor,nt),ut=document.createElement("div");ut.style.position="relative",ut.style.display="block",ut.style.width=at.width+"px",ut.style.height=at.height+"px",ut.className="applet_screenshot applet_scaler"+(nt?" applet_screenshot_play":""),ut.appendChild(Tt);var At=GGBAppletUtils.getScale(at,Ne,nt);nt?(Ne.appendChild(dt()),window.GGBT_wsf_view||(Ne.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ut,"66%"),Ne.appendChild(ut),At!==1&&!isNaN(At)&&(GGBAppletUtils.scaleElement(ut,At),ut.style.width=at.width+"px",ut.style.height=at.height+"px",ut.parentNode.style.width=at.width*At+"px",ut.parentNode.style.height=at.height*At+"px"),_t.resize=function(){Te(Ne,Tt,ut,nt)},window.addEventListener("resize",function(Ie){_t.resize()}),_t.resize()};function Te(Ne,at,nt,Tt){if(Ne.contains(at)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ne.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ne)}var ut=GGBAppletUtils.getScale(ce,Ne,Tt);nt.parentNode!==null&&(!isNaN(ut)&&ut!==1?(GGBAppletUtils.scaleElement(nt,ut),nt.parentNode.style.width=ce.width*ut+"px",nt.parentNode.style.height=ce.height*ut+"px"):(GGBAppletUtils.scaleElement(nt,1),nt.parentNode.style.width=ce.width+"px",nt.parentNode.style.height=ce.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()}}_t.onExitFullscreen=function(Ne,at){at.appendChild(Ne)};var ht=function(Ne,at,nt,Tt){ke(Ne,at,!0);for(var ut=function(){var pt=[];for(Ie=0;Ie<Ne.childNodes.length;Ie++)pt.push(Ne.childNodes[Ie]);if(window.GGBT_wsf_view){var mt=window.GGBT_wsf_view.renderFullScreen(Ne,at.id),ae=document.getElementById("fullscreencontainer"),ne=jQuery(Ne).find(".fullscreencontent");ne.length>0?(mt.remove(),ne.attr("id","fullscreencontent").show(),jQuery(ae).append(ne),window.dispatchEvent(new Event("resize"))):Ge(mt,at,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else Ue=Tt,Ge(Ne,at,!1);if(!window.GGBT_wsf_view)for(Ie=0;Ie<pt.length;Ie++)Ne.removeChild(pt[Ie])},At=Ne.getElementsByClassName("ggb_preview_play"),Ie=0;Ie<At.length;Ie++)At[Ie].addEventListener("click",ut,!1),At[Ie].addEventListener("ontouchstart",ut,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ne),_e()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},dt=function(){var Ne=document.createElement("div");if(Ne.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var at='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',nt=document.createElement("style");nt.styleSheet?nt.styleSheet.cssText=at:nt.appendChild(document.createTextNode(at)),document.getElementsByTagName("head")[0].appendChild(nt)}return Ne},Rt=function(Ne,at,nt,Tt){var ut=document.createElement("div");ut.className="ggb_preview",ut.style.position="absolute",ut.style.zIndex="90",ut.style.width=Ne-2+"px",ut.style.height=at-2+"px",ut.style.top="0px",ut.style.left="0px",ut.style.overflow="hidden",ut.style.backgroundColor="white";var At="lightgrey";nt!==void 0&&(nt==="none"?At="transparent":At=nt),ut.style.border="1px solid "+At;var Ie=document.createElement("img");if(Ie.style.position="relative",Ie.style.zIndex="1000",Ie.style.top="-1px",Ie.style.left="-1px",De!==null&&Ie.setAttribute("src",De),Ie.style.opacity=.7,Ke!==null){var pt,mt,ae;if(!Tt){pt=document.createElement("img"),pt.style.position="absolute",pt.style.zIndex="1001",pt.style.opacity=1,Ie.style.opacity=.3,mt=360,mt>Ne/4*3&&(mt=Ne/4*3),ae=mt/5.8,pt.setAttribute("src",Ke),pt.setAttribute("width",mt),pt.setAttribute("height",ae);var ne=(Ne-mt)/2,ee=(at-ae)/2;pt.style.left=ne+"px",pt.style.top=ee+"px",ut.appendChild(pt)}}return ut.appendChild(Ie),ut},wt=function(Ne){return Ne=Ne.toLowerCase(),Ne==="html5"||Ne==="screenshot"?Ne:"html5"},ve=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Ne,at){if(Le=Ne,at){qe(Le,!0);return}var nt=!Ye;if(nt){var Tt=Ze(Le);!isNaN(Tt)&&Tt<4.4&&(nt=!1)}var ut,At;window.location.protocol.substr(0,4)==="http"?ut=window.location.protocol:ut="http:";var Ie=Le.indexOf("//");Ie>0?At=Le:Ie===0?At=ut+Le:At="https://www.geogebra.org/apps/5.2.814.0/";for(var pt in ve)if(Le.slice(ve[pt].length*-1)===ve[pt]||Le.slice((ve[pt].length+1)*-1)===ve[pt]+"/"){qe(At,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&nt&&!z.is3D&&!z.AV&&!z.SV&&!z.CV&&!z.EV2&&!z.CP&&!z.PC&&!z.DA&&!z.FI&&!z.PV&&!Me(ce.showToolBar)&&!Me(ce.showMenuBar)&&!Me(ce.showAlgebraInput)&&!Me(ce.enableRightClick)&&(!ce.appName||ce.appName=="classic")?At+="webSimple/":At+="web3d/",qe(At,!1)},qe=function(Ne,at){if(Ne.requirejs){$e=Ne;return}Ne.slice(-1)!=="/"&&(Ne+="/"),$e=Ne,at===null&&(at=Ne.indexOf("http")===-1),be=at,ge="web.nocache.js",Ce=!1;var nt=$e.split("/");nt.length>1&&(!at&&nt[nt.length-2]==="webSimple"?(ge="webSimple.nocache.js",Ce=!0):ve.indexOf(nt[nt.length-2])>=0&&(ge=nt[nt.length-2]+".nocache.js")),nt=Ne.split("/"),Le=nt[nt.length-3],Le.substr(0,4)==="test"?Le=Le.substr(4,1)+"."+Le.substr(5,1):(Le.substr(0,3)==="war"||Le.substr(0,4)==="beta")&&(Le="5.0");var Tt=parseFloat(Le);Tt!==NaN&&Tt<5&&Ne.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Tt+" is deprecated. Using version latest instead."),de("5.0",at))},kt=function(Ne,at){window.console&&window.console.log&&(!at||typeof at.showLogging=="undefined"||at.showLogging&&at.showLogging!=="false")&&console.log(Ne)};ce.material_id!==void 0?Ot(yt):yt();function yt(){var Ne=Pt;we!==null?Ne=we:parseFloat(Ne)<5&&(Ne="5.0"),de(Ne,!1),He!==null&&qe(He,be),xe=!0}return _t},GGBAppletUtils=function(){"use strict";function _t(){return window.GGBT_wsf_edit!==void 0}function Pt(xe,we){we!=1?(xe.style.transformOrigin="0% 0% 0px",xe.style.webkitTransformOrigin="0% 0% 0px",xe.style.transform="scale("+we+","+we+")",xe.style.webkitTransform="scale("+we+","+we+")",xe.style.maxWidth="initial",xe.querySelector(".ggb_preview")!==null&&(xe.querySelector(".ggb_preview").style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(xe.style.transform="none",xe.style.webkitTransform="none")}function ce(xe,we,He,We,Be,he){var $e=null;if(he!=null&&he!="")for(var be=xe.parentNode;be!=null;)if((" "+be.className+" ").indexOf(" "+he+" ")>-1){$e=be;break}else be=be.parentNode;var Ue=0,Le=0,ge=0,Ce=0,De=0,Ke=0,it=0;if($e)Ue=$e.offsetWidth,Le=Math.max(We?$e.offsetWidth:0,$e.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Ue=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),ge=Ue):(Ue=window.innerWidth,Le=window.innerHeight,ge=window.innerWidth),xe){var tt=xe.getBoundingClientRect();tt.left>0&&tt.left<=Ue&&(Be===void 0||!Be)&&(document.dir==="rtl"?(De=Ue-tt.width-tt.left,Ke=ge<=480?10:30):(Ke=tt.left,De=ge<=480?10:30),Ce=Ke+De)}if(xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ze=xe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce=40,it=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ce=0,it=40)}}return xe&&((He===void 0||!He)&&we>0&&we+Ce<Ue?Ue=we:Ue-=Ce,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(He===void 0||!He)&&(Le-=it)),{width:Ue,height:Le}}function z(xe,we,He,We,Be){if(xe.isScreenshoGenerator)return 1;var he=We!==void 0&&We,$e=xe.noScaleMargin!=null&&xe.noScaleMargin,be=function(ze){return ze&&ze!=="false"},Ue=be(xe.autoHeight),Le=ce(we,xe.width,He,Ue,he&&window.GGBT_wsf_view||$e,Be),ge=parseInt(Le.width),Ce=xe.width,De=xe.height;if(Ce===void 0){var Ke=we.querySelector(".appletParameters");Ke&&(Ce=Ke.offsetWidth,De=Ke.offsetHeight)}var it=ge/Ce,tt=he?1:Le.height/De;return He!==void 0&&!He&&(it=Math.min(1,it),tt=Math.min(1,tt)),Math.min(it,tt)}function Ye(xe,we,He){var We=1,Be,he=!1;if(xe.hasOwnProperty("allowUpscale")&&(he=xe.allowUpscale),xe.hasOwnProperty("scale")&&(We=parseFloat(xe.scale),(isNaN(We)||We===null||We===0)&&(We=1),We>1&&(he=!0)),we&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he=!0),!(xe.hasOwnProperty("disableAutoScale")&&xe.disableAutoScale))Be=z(xe,we,he,He,xe.scaleContainerClass);else return We;return he&&(!xe.hasOwnProperty("scale")||We===1)?Be:Math.min(We,Be)}function Oe(xe){var we=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),We=xe.getBoundingClientRect(),Be=(we-We.width)/2,he=(He-We.height)/2;he<0&&(he=0),xe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Be<40?xe.style.left="40px":xe.style.left=Be+"px",xe.style.top=he+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(he<40?xe.style.top="40px":xe.style.top=he+"px",xe.style.left=Be+"px")}function Ve(xe,we){var He=xe.querySelector(".appletParameters");if(He){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(we.id!==He.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}if(He.parentElement&&/fullscreen/.test(He.parentElement.className))return;var We=Ye(we,xe);_t()&&He.setAttribute("data-param-scale",We);for(var Be=null,he=0;he<xe.childNodes.length;he++)if(xe.childNodes[he].className!==void 0&&xe.childNodes[he].className.match(/^applet_scaler/)){Be=xe.childNodes[he];break}if(Be!==null&&Be.querySelector(".noscale")!==null)return;var $e=we.id!==void 0?we.id:"ggbApplet",be=window[$e];(be==null||!be.recalculateEnvironments)&&Be!==null&&!Be.className.match(/fullscreen/)&&(Be.parentNode.style.transform="",!isNaN(We)&&We!==1?(Be.parentNode.style.width=we.width*We+"px",Be.parentNode.style.height=we.height*We+"px",Pt(Be,We)):(Pt(Be,1),Be.parentNode.style.width=we.width+"px",Be.parentNode.style.height=we.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Oe(xe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(He).parents(".content-added-content"))}}return{responsiveResize:Ve,isFlexibleWorksheetEditor:_t,positionCenter:Oe,getScale:Ye,scaleElement:Pt}}();__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 _t=n.location.search;return _t.indexOf(J)!=-1||_t.indexOf(K)!=-1}function q(_t,Pt){}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(_t){var Pt=s[L].bindings;s[L].bindings=function(){for(var ce=Pt?Pt():{},z=_t[webModule.__softPermutationId],Ye=O;Ye<z.length;Ye++){var Oe=z[Ye];ce[Oe[O]]=Oe[P]}return ce}};var t;function u(){return v(),t}function v(){if(!t){var _t=o.createElement(Q);if(_t.id=L,_t.style.cssText=R+S,_t.tabIndex=-1,o.body.appendChild(_t),t=_t.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Pt=document.compatMode==U?V:W;t.write(Pt+X),t.close()}}}function w(_t){function Pt(z){function Ye(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Oe=Ye();if(Oe){z();return}function Ve(){if(!Oe){if(!Ye())return;Oe=!0,z(),o.removeEventListener&&o.removeEventListener(Z,Ve,!1),xe&&clearInterval(xe)}}o.addEventListener&&o.addEventListener(Z,Ve,!1);var xe=setInterval(function(){Ve()},$)}function ce(z){var Ye=u(),Oe=Ye.body,Ve=Ye.createElement(_);Ve.language=ab,Ve.crossOrigin=W,Ve.src=z,webModule.__errFn&&(Ve.onerror=function(){webModule.__errFn(L,new Error(bb+z))}),Oe.appendChild(Ve)}Pt(function(){ce(_t)})}webModule.__startLoadingFragment=function(_t){return C(_t)},webModule.__installRunAsyncCode=function(_t){var Pt=u(),ce=Pt.body,z=Pt.createElement(_);z.language=ab,z.text=_t,ce.appendChild(z),ce.removeChild(z)};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(_t){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(_t){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(_t){var Pt=c[_t];return Pt==null?null:Pt},r=d,webModule.__errFn=e}function B(){function _t(xe){var we=xe.lastIndexOf(rb);we==-1&&(we=xe.length);var He=xe.indexOf(sb);He==-1&&(He=xe.length);var We=xe.lastIndexOf(tb,Math.min(He,we));return We>=O?xe.substring(O,We+P):W}function Pt(xe){if(!xe.match(/^\w+:\/\//)){var we=o.createElement(ub);we.src=xe+vb,xe=_t(we.src)}return xe}function ce(){var xe=__gwt_getMetaProperty(wb);return xe!=null?xe:W}function z(){for(var xe=o.getElementsByTagName(_),we=O;we<xe.length;++we)if(xe[we].src.indexOf(xb)!=-1)return _t(xe[we].src);return W}function Ye(){var xe=o.getElementsByTagName(yb);return xe.length>O?xe[xe.length-P].href:W}function Oe(){var xe=o.location;return xe.href==xe.protocol+zb+xe.host+xe.pathname+xe.search+xe.hash}var Ve=ce();return Ve==W&&(Ve=z()),Ve==W&&(Ve=Ye()),Ve==W&&Oe()&&(Ve=_t(o.location.href)),Ve=Pt(Ve),Ve}function C(_t){return _t.match(/^\//)||_t.match(/^[a-zA-Z]+:\/\//)?_t:webModule.__moduleBase+_t}function D(){var _t=[],Pt=O,ce=[],z=[];function Ye(xe){var we=z[xe](),He=ce[xe];if(we in He)return we;var We=[];for(var Be in He)We[He[Be]]=Be;throw r&&r(xe,We,we),null}if(__gwt_isKnownPropertyValue=function(xe,we){return we in ce[xe]},webModule.__getPropMap=function(){var xe={};for(var we in ce)ce.hasOwnProperty(we)&&(xe[we]=Ye(we));return xe},webModule.__computePropValue=Ye,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Oe;try{Oe=Cb;var Ve=Oe.indexOf(Db);Ve!=-1&&(Pt=parseInt(Oe.substring(Ve+P),$),Oe=Oe.substring(O,Ve))}catch(xe){}return webModule.__softPermutationId=Pt,C(Oe+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(_t,Pt,ce){"use strict";ce.d(Pt,{Ax:function(){return Ve},Ds:function(){return xe},KI:function(){return He},SI:function(){return Oe},f1:function(){return Ye}});var z=ce(90524);function Ye(We){let Be=!0;if(We.length>0){for(let he=0;he<We.length;he++)if(We[he].compile_success==0||!We[he].compile_success){Be=!1;break}}else Be=!1;return Be}function Oe(We,Be=""){let he=[];for(let $e=0;$e<We.length;$e++){let be=We[$e],Ue=Be?`${Be}/${be.name}`:`${be.name}`;he.push({title:be.name,type:be.type,isLeaf:be.type!=="tree",key:Ue})}return he}function Ve(We,Be,he){for(let $e=0;$e<We.length;$e++){let be=We[$e];if(be.key===Be){be.children=he;break}be.children&&Ve(be.children,Be,he)}return We}function xe(We,Be,he){let $e;return function(){let be=this,Ue=arguments,Le=function(){$e=null,he||We.apply(be,Ue)},ge=he&&!$e;clearTimeout($e),$e=setTimeout(Le,Be),ge&&We.apply(be,Ue)}}const we=!0,He=z.Z.API_SERVER},20927:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return Be}});var z=ce(59301),Ye=ce(37568),Oe=ce(96599),Ve=ce(6767),xe={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},we=ce(62772);const{TextArea:He}=Ye.default;class We extends z.Component{constructor($e){super($e),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:$e,onAnswerChange:be,addChildAnswer:Ue,exerciseIsPublish:Le,answers:ge,activeOptionErrorIndex:Ce,flex:De="0 0 1000px"}=this.props;console.log("----",ge);let{inputVisible:Ke,EditInputIndex:it}=this.state;return z.createElement("div",{className:xe.flex},z.createElement("div",{className:`${xe.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",$e+1,"):"),z.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},ge==null?void 0:ge.map((tt,ze)=>z.createElement(z.Fragment,null,it!==ze?(tt==null?void 0:tt.length)>0?z.createElement(Oe.default,{className:"edit-tag",key:tt,closable:!((ge==null?void 0:ge.length)===1&&ze===0),onClose:Ze=>{Ze.preventDefault(),(ge==null?void 0:ge.length)===1&&ze===0?this.props.deleteChildAnswermain($e,ze):this.props.deleteChildAnswer($e,ze)}},z.createElement("span",{onDoubleClick:Ze=>{this.setState({EditInputIndex:ze}),Ze.preventDefault()}},tt)):z.createElement(Ye.default,{defaultValue:tt,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ze=>{if(Ze.target.value.replaceAll(" ","").length<=0){Ve.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}be($e,ze,Ze.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):z.createElement(Ye.default,{defaultValue:tt,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ze=>{if(Ze.target.value.replaceAll(" ","").length<=0){Ve.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}be($e,ze,Ze.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!Ke&&z.createElement(Oe.default,{className:"site-tag-plus",onClick:()=>{Ue($e),this.setState({inputVisible:!0})}},z.createElement(we.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var Be=We},48106:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return Le}});var z=ce(59301),Ye=ce(2978),Oe=Object.defineProperty,Ve=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Be=(ge,Ce,De)=>Ce in ge?Oe(ge,Ce,{enumerable:!0,configurable:!0,writable:!0,value:De}):ge[Ce]=De,he=(ge,Ce)=>{for(var De in Ce||(Ce={}))He.call(Ce,De)&&Be(ge,De,Ce[De]);if(we)for(var De of we(Ce))We.call(Ce,De)&&Be(ge,De,Ce[De]);return ge},$e=(ge,Ce)=>Ve(ge,xe(Ce)),be=(ge,Ce,De)=>Be(ge,typeof Ce!="symbol"?Ce+"":Ce,De);const Ue="\u2581";class Le extends z.Component{constructor(){super(...arguments),be(this,"getChCountBeforeCursor",(Ce,De)=>{const Ke=De.line;let it=0;for(let ze=0;ze<Ke;ze++)it+=Ce.getLine(ze).split(Ue).length-1;const tt=Ce.getLine(Ke).substring(0,De.ch);return it+=tt.split(Ue).length-1,it}),be(this,"onCMBeforeChange",(Ce,De)=>{const Ke=Ce.getRange(De.from,De.to);let it=0;if(De.text.forEach(tt=>{it+=tt.split(Ue).length-1}),Ke&&Ke.indexOf(Ue)!=-1){const tt=Ke.split(Ue).length-1,ze=this.getChCountBeforeCursor(Ce,De.from);console.log(`\u5220\u9664${tt}\u4E2A\uFF0C \u4E4B\u524D\u6709${ze}\u4E2A\uFF0C\u65B0\u589E${it}\u4E2A`),this.props.deleteEmptyDisabled?De.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ze,tt,it)}else if(it){const tt=this.getChCountBeforeCursor(Ce,De.from);console.log(`\u65B0\u589E${it}\u4E2A\uFF0C\u4E4B\u524D\u6709${tt}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(tt,0,it)}})}render(){return z.createElement(Ye.Z,$e(he({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},6077:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return $e}});var z=ce(59301),Ye={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Oe=ce(92310),Ve=ce.n(Oe),xe=ce(29787),we=ce(2859),He=ce(82093),We=ce(49661),Be=(be,Ue,Le)=>new Promise((ge,Ce)=>{var De=tt=>{try{it(Le.next(tt))}catch(ze){Ce(ze)}},Ke=tt=>{try{it(Le.throw(tt))}catch(ze){Ce(ze)}},it=tt=>tt.done?ge(tt.value):Promise.resolve(tt.value).then(De,Ke);it((Le=Le.apply(be,Ue)).next())}),$e=({data:be,className:Ue,fullWidth:Le,style:ge={},onClose:Ce,onOk:De,showFullTools:Ke,noAssociationId:it})=>{const tt=(0,z.useRef)(null),ze=(0,z.useRef)(null),Ze=(0,z.useRef)(null),Xe=(0,z.useRef)(null),[_e,Ot]=(0,z.useState)(!1),[Qe,je]=(0,z.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,z.useEffect)(()=>(Ze.current||(Ze.current=document.createElement("style"),document.head.appendChild(Ze.current)),be!=null&&be.visible?(document.body.setAttribute("data-custom","y-hidden"),Ze.current.innerHTML=" html { overflow-y: hidden; }",be!=null&&be.src&&ct()):(document.body.removeAttribute("data-custom"),Ze.current&&(document.head.removeChild(Ze.current),Ze.current=null)),()=>{document.body.removeAttribute("data-custom"),Ze.current&&(document.head.removeChild(Ze.current),Ze.current=null)}),[be==null?void 0:be.visible]);const ct=()=>Be(void 0,null,function*(){Ot(!0),je("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Te=yield(0,We.ZJ)(be==null?void 0:be.src);tt.current.src="",tt.current.src=Te,tt.current.onload=function(){ke()},Ot(!1),je("")}),Me=Te=>Be(void 0,null,function*(){Ot(!0),je("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ht=yield(0,He.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:be.title,file:Te.dataUrl}});ht!=null&&ht.id&&!it?(yield(0,He.ZP)(`/api/attachments/${be.id}/add_subitem.json`,{method:"post",body:{subitem_id:ht==null?void 0:ht.id,settings:JSON.stringify(Te.state)}})).status===0&&De():ht!=null&&ht.id&&De(ht),Ot(!1),je("")}),Ge=()=>{const Te=document.querySelector('a[href="https://markerjs.com/"]');Te&&Te.parentNode&&(Te.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(dt=>{const Rt=document.querySelector(dt.name);Rt&&Rt.setAttribute("title",dt.title)})},ke=()=>{ze.current=new we.hP(tt.current),ze.current.targetRoot=Xe.current,ze.current.addEventListener("render",Me),ze.current.addEventListener("beforeclose",Ce),Ke&&(ze.current.availableMarkerTypes=ze.current.ALL_MARKER_TYPES,ze.current.uiStyleSettings.redoButtonVisible=!0,ze.current.uiStyleSettings.notesButtonVisible=!0,ze.current.uiStyleSettings.zoomButtonVisible=!0,ze.current.uiStyleSettings.zoomOutButtonVisible=!0,ze.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ze.current.uiStyleSettings,ze.current.show(),be!=null&&be.snapshotData&&ze.current.restoreState(be.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ge()},300)};return z.createElement(z.Fragment,null,(be==null?void 0:be.visible)&&z.createElement(xe.Z,{spinning:_e,tip:Qe,style:{position:"absolute",width:"100vw"}},z.createElement("div",{ref:Xe,className:Ve()(Ye.imageDimensions,Ue,Le?Ye.fullWidth:""),style:ge},z.createElement("img",{className:Ye.img,ref:tt}))))}},88615:function(_t,Pt,ce){"use strict";var z=ce(59301),Ye=ce(77019),Oe=ce(5269),Ve=ce(20554),xe=ce(99571),we=ce(38394),He=ce(21697),We=ce(48136),Be=ce(59301);const he=(0,z.forwardRef)(({callback:$e,showSaveButton:be,value:Ue=""},Le)=>{const ge=(0,z.useRef)(),Ce=[{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 "}]}]}],De=[{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}`}]}]}],Ke=ze=>{ge.current.setValue(ge.current.getValue()+" "+ze.value+" ")},it=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Be.createElement(Ye.Z,{className:He.Z.lists,gutter:[10,10]},Ce.map((ze,Ze)=>Be.createElement(Oe.Z,{flex:"110px",className:He.Z.item},Be.createElement("div",null,Be.createElement(we.Z,{value:`$$${ze.value}$$`}),ze.name),Be.createElement("div",{className:He.Z.children},ze.children.map((Xe,_e)=>Be.createElement("div",{key:_e},Be.createElement("h1",null,Xe.name),Be.createElement(Ye.Z,{gutter:[10,10]},Xe.data.map((Ot,Qe)=>Be.createElement(Oe.Z,{key:Qe,onClick:()=>Ke(Ot),className:He.Z.diamond},Be.createElement(we.Z,{value:"`$$"+Ot.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Be.createElement(Ye.Z,{className:He.Z.lists,gutter:[10,10]},De.map((ze,Ze)=>Be.createElement(Oe.Z,{flex:"110px",className:He.Z.item},Be.createElement("div",null,Be.createElement(we.Z,{value:"`$$"+ze.value+"$$`"}),ze.name),Be.createElement("div",{className:He.Z.children},ze.children.map((Xe,_e)=>Be.createElement("div",{key:_e},Xe.name&&Be.createElement("h1",null,Xe.name),Be.createElement(Ye.Z,{gutter:[10,10]},Xe.data.map((Ot,Qe)=>Be.createElement(Oe.Z,{key:Qe,onClick:()=>Ke(Ot),className:He.Z.diamond},Be.createElement(we.Z,{value:"`$$"+Ot.value+"$$`"}))))))))))}],tt=()=>{var ze=document.createElement("div");ze.innerHTML=ge.current.getValue();var Ze=ze.innerText;return $e&&$e(Ze),Ze};return(0,z.useImperativeHandle)(Le,()=>({getData:tt})),Be.createElement("div",{className:He.Z.mathWrap},Be.createElement(Ve.default,{defaultActiveKey:"1",items:it}),Be.createElement("math-field",{locale:"zh_cn",className:He.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ge,style:{width:800,marginTop:30,fontSize:18}},Ue||""),be&&Be.createElement("div",{className:He.Z.button},Be.createElement(xe.ZP,{size:"large",onClick:tt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Pt.Z=he},57884:function(_t,Pt,ce){"use strict";var z=ce(59301),Ye=ce(93314),Oe=ce(99571),Ve=Object.defineProperty,xe=Object.defineProperties,we=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,he=(Le,ge,Ce)=>ge in Le?Ve(Le,ge,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):Le[ge]=Ce,$e=(Le,ge)=>{for(var Ce in ge||(ge={}))We.call(ge,Ce)&&he(Le,Ce,ge[Ce]);if(He)for(var Ce of He(ge))Be.call(ge,Ce)&&he(Le,Ce,ge[Ce]);return Le},be=(Le,ge)=>xe(Le,we(ge));const Ue=({img:Le,buttonProps:ge={},styles:Ce={},customText:De,ButtonText:Ke,ButtonClick:it,Buttonclass:tt,ButtonTwo:ze,imgStyles:Ze,loading:Xe=!1,className:_e=""})=>z.createElement("section",{className:`tc animated fadeIn ${_e}`,style:$e({color:"#999",margin:"100px auto",visibility:Xe?"hidden":"visible"},Ce)},z.createElement("img",{src:Le||Ye,style:be($e({},Ze),{pointerEvents:"none",userSelect:"none"})}),z.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Ke&&z.createElement(Oe.ZP,$e({className:tt,onClick:it},ge),Ke),ze&&ze);Pt.Z=Ue},41550:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return tt}});var z=ce(59301),Ye={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Oe=ce(99571),Ve=ce(70557),xe=ce(51124),we=ce(25399),He=ce(49661),We=ce(72664),Be=ce(57884),he=ce(90524),$e=ce(14794),be=ce(59301),Ue=Object.defineProperty,Le=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,De=(ze,Ze,Xe)=>Ze in ze?Ue(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ze[Ze]=Xe,Ke=(ze,Ze)=>{for(var Xe in Ze||(Ze={}))ge.call(Ze,Xe)&&De(ze,Xe,Ze[Xe]);if(Le)for(var Xe of Le(Ze))Ce.call(Ze,Xe)&&De(ze,Xe,Ze[Xe]);return ze},it=(ze,Ze,Xe)=>new Promise((_e,Ot)=>{var Qe=Me=>{try{ct(Xe.next(Me))}catch(Ge){Ot(Ge)}},je=Me=>{try{ct(Xe.throw(Me))}catch(Ge){Ot(Ge)}},ct=Me=>Me.done?_e(Me.value):Promise.resolve(Me.value).then(Qe,je);ct((Xe=Xe.apply(ze,Ze)).next())}),tt=({editOffice:ze="view",data:Ze,issaver:Xe,onSaver:_e,theme:Ot,type:Qe,filename:je,monacoEditor:ct,className:Me,style:Ge,close:ke,onClose:Te,hasMask:ht,disabledDownload:dt,onImgDimensions:Rt,showNodata:wt,recordInfo:ve})=>{const[de,qe]=(0,z.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[kt,yt]=(0,z.useState)(""),[Ne,at]=(0,z.useState)(),nt=window.ENV==="build"?"/react/build":"",Tt=location.host.startsWith("localhost")?he.Z.PROXY_SERVER:he.Z.API_SERVER,At=10*(1024*1024),Ie=(0,z.useRef)();Ze!=null&&Ze.startsWith("/api")&&Qe!=="txt"&&(Ze=he.Z.API_SERVER+Ze);const pt=oe=>oe.substring(oe.lastIndexOf("/")+1).split(".").pop();je&&ct&&(ct.filename=je),(0,z.useEffect)(()=>{var oe,se;const re=(se=(oe=document.cookie)==null?void 0:oe.replace(/\s/g,""))==null?void 0:se.split(";");re==null||re.map(Se=>{let et=Se.split("=");et[0]==="_educoder_session"&&yt(et[1])})},[]),(0,z.useEffect)(()=>{Qe==="office"&&(Ze.indexOf("bigfilescdn.")>-1||Ze.indexOf("bigfiles1")>-1?at({url:Ze,fileType:pt(Ze),model:Ze.indexOf("model=edit")?"edit":"view"}):ae())},[Qe,Ze]);function mt(oe){return it(this,null,function*(){oe.data.type==="pdfdata"&&(_e(oe.data.data),window.removeEventListener("message",mt,!1)),console.log("mess---:",oe.data)})}const ae=()=>it(void 0,null,function*(){console.log("data:",Ze);let oe=Ze;Ze.startsWith("http")||(oe=location.origin+oe);let se=new URL(oe).pathname.split("/").pop();const re=yield(0,We.gJ)({attachment_id:se});re.url=Tt+re.url,at(re)}),ne=()=>{if(Ze.startsWith("http")||Ze.startsWith("blob:")){ee();return}(0,He.Sv)(je||"educoder",Ze,je)},ee=()=>{ve&&(0,$e.fc)({id:ve==null?void 0:ve.id,watch_type:1,course_id:ve==null?void 0:ve.course_id}),(0,He.Nd)(je||"educoder",decodeURIComponent(Ze))};return be.createElement("div",{style:Ke({},Ge||{}),className:`${ht&&Ye.bgBlack} ${Qe?Ye.wrp:"hide"}`},ke&&be.createElement("div",{className:Ye.close,ref:Ie},!!Rt&&be.createElement(we.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ie.current},be.createElement("span",{onClick:()=>{Te(),Rt()}},be.createElement("i",{className:"icon-yulanpizhu"}))),!dt&&be.createElement(we.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ie.current},be.createElement("span",{onClick:ee},be.createElement("i",{className:"icon-quxiaozhiding"}))),Xe&&be.createElement(we.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ie.current},be.createElement("span",{className:"",onClick:()=>{const oe=document.getElementById("pdfiframe");window.addEventListener("message",mt,!1),setTimeout(()=>{oe.contentWindow.postMessage("getData","*")},300)}},be.createElement("i",{className:"icon-baocun"}))),be.createElement(we.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ie.current},be.createElement("span",{className:"",onClick:()=>{Te()}},be.createElement("i",{className:"icon-guanbi1"})))),be.createElement("div",{className:`${Ye[Me]} ${Me} ${Ye.monaco} ${Qe==="txt"?"show":"hide"}`},Qe==="txt"&&be.createElement(be.Fragment,null,be.createElement(xe.ZP,Ke({},ct)))),Qe==="audio"&&be.createElement("audio",{src:`${(Ze==null?void 0:Ze.indexOf("http://"))>-1||(Ze==null?void 0:Ze.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ze}`,autoPlay:!0}),Qe==="video"&&be.createElement(be.Fragment,null,(Ze==null?void 0:Ze.indexOf("http"))>-1?be.createElement("video",{controls:!0,src:`${Ze}`,autoPlay:!0}):be.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ze}`,autoPlay:!0})),Qe==="office"&&Ne&&be.createElement("iframe",{src:`${nt}/office.html?key=${Ne.key}&url=${btoa(Ne.url)}&callbackUrl=${Tt+(Ne.callbackUrl||"")}&fileType=${Ne.fileType}&title=${Ne.title||""}&model=${ze}&officeServer=${he.Z.ONLYOFFICE}&disabledDownload=${!!dt}`}),Qe==="html"&&be.createElement("iframe",{src:Ze+"&disposition=inline"}),Qe==="pdf"&&be.createElement("iframe",{id:"pdfiframe",src:`${nt}/js/pdfview/index.html?filename=${je||"educoder.pdf"}&url=${encodeURIComponent(Ze)}&disabledDownload=${!!dt}&model=${ze}`}),Qe==="image"&&be.createElement("img",{src:`${(Ze==null?void 0:Ze.indexOf("http://"))>-1||(Ze==null?void 0:Ze.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ze}`}),(Qe==="other"||Qe==="download")&&be.createElement(be.Fragment,null,wt?be.createElement(Be.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:be.createElement(Oe.ZP,{icon:be.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ne,disabled:dt},"\u4E0B\u8F7D")}):be.createElement(Oe.ZP,{type:"primary",size:"middle",onClick:ne,disabled:dt},be.createElement(Ve.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Qe==="flowChart"&&be.createElement("div",{className:"embed"},be.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Ze||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(_t,Pt,ce){"use strict";ce.d(Pt,{z:function(){return ct},Z:function(){return Me}});var z=ce(59301),Ye=ce(88831),Oe=ce(90290),Ve=ce(64018),xe=ce(68535),we=ce(90524),He=ce(49661),We=ce(15342),Be=ce(77736),he=ce(99571),$e=ce(1012),be=ce(41550),Ue=ce(59301),ge=({html:Ge})=>{const ke=(0,z.useRef)(null),Te=(0,z.useRef)(null),ht=`.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,z.useEffect)(()=>{const dt=ke.current.attachShadow({mode:"open"});Te.current=document.createElement("div"),Te.current.className="markdown-body",Te.current.innerHTML=Ge,dt.appendChild(Te.current);const Rt=document.createElement("style");return Rt.textContent=ht,dt.appendChild(Rt),()=>{dt.innerHTML=""}},[]),(0,z.useEffect)(()=>{Te.current&&(Te.current.innerHTML=Ge)},[Ge]),Ue.createElement("div",{ref:ke})};function Ce(Ge){const ke=["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"],Te=new RegExp(`\\b(${ke.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ge.replace(Te,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},Ke=Object.defineProperty,it=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Ze=(Ge,ke,Te)=>ke in Ge?Ke(Ge,ke,{enumerable:!0,configurable:!0,writable:!0,value:Te}):Ge[ke]=Te,Xe=(Ge,ke)=>{for(var Te in ke||(ke={}))tt.call(ke,Te)&&Ze(Ge,Te,ke[Te]);if(it)for(var Te of it(ke))ze.call(ke,Te)&&Ze(Ge,Te,ke[Te]);return Ge};const _e="@\u2581\u2581@",Ot="@\u2581@",Qe=/<pre[^>]*>/g;function je(Ge){let ke=document.createElement("div");return ke.innerHTML=Ge,ke.childNodes.length===0?"":ke.childNodes[0].nodeValue}const ct=(Ge,ke)=>{Ge=Ge||"";const Te=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ht=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,dt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Rt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ke?Ge.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Te,(wt,ve,de,qe,kt,yt,Ne)=>{const at=ve||qe||yt,nt=de||kt||Ne||"?";return we.Z.API_SERVER+"/api/attachments/"+at+nt+"&t="+(0,He.Jn)(at,Date.now())+(wt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ge=Ge.replace(Rt,(wt,ve,de,qe,kt,yt,Ne)=>{const at=ve||qe||yt,nt=de||kt||Ne||"?";return we.Z.API_SERVER+"/attachments/download/"+at+nt+"&t="+(0,He.Jn)(at,Date.now())+(wt.indexOf(")")>-1?")":"&")}).replace(Te,(wt,ve,de,qe,kt,yt,Ne)=>{const at=ve||qe||yt,nt=de||kt||Ne||"?";return we.Z.API_SERVER+"/api/attachments/"+at+nt+"&t="+(0,He.Jn)(at,Date.now())+(wt.indexOf(")")>-1?")":"&")}).replace(ht,(wt,ve,de,qe,kt)=>{const yt=ve||qe,Ne=de||kt||"";return'"'+we.Z.API_SERVER+"/api/attachments/"+yt+Ne+yt+Ne+"&t="+(0,He.Jn)(yt,Date.now())}).replace(dt,(wt,ve,de,qe,kt)=>{const yt=ve||qe,Ne=de||kt||"";return"("+we.Z.API_SERVER+"/files/uploads/"+yt+Ne+yt+Ne+"&t="+(0,He.Jn)(yt,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,`
|
|
`),Ge)};var Me=({value:Ge="",edit:ke=!1,className:Te,showTextOnly:ht,showLines:dt,style:Rt={},stylesPrev:wt={},highlightKeywords:ve,showProgramFill:de,isProgramFill:qe,disabledFill:kt=!1,programFillValue:yt,openEditor:Ne=()=>{},onFillChange:at=ut=>{},onFillBlur:nt=()=>{},onFillFocus:Tt=()=>{}})=>{let ut=Ce(String(Ge||""));const At=(0,z.useRef)(),Ie=(0,z.useRef)(),[pt,mt]=(0,z.useState)(""),[ae,ne]=(0,z.useState)("office"),[ee,oe]=(0,z.useState)([]),se=(0,z.useRef)("a"+(0,$e.Z)()),re={},Se=ft=>/<style[\s\S]*?>/i.test(ft||""),et=(ft,wn,Ut)=>{const Jt=document.createElement(ft===Ot?"input":"textarea");Jt.style.width="100%",Jt.style.height=ft===Ot?"40px":"151px",Jt.rows=5,Jt.spellcheck=!1,Jt.name="edu-program-fill",Jt.placeholder="\u8BF7\u8F93\u5165",Jt.dataset.id=wn;const gn=Object.keys(re).length;return re[gn]=Jt,`<span class="edu-program-fill-wrap ${ft===Ot?"":"show"}" style="width:${ft===Ot?"600px":"100%"}" title=${Ut||""}><span>${Jt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Lt(ft){return ft=ft.replace(/!\[.*?\]\(.*?\)/g,""),ft=ft.replace(/\[.*?\]\(.*?\)/g,""),ft=ft.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ft=ft.replace(/<embed.*?>/g,""),ft=ft.replace(/<img.*?>/g,""),ft=ft.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ft=ft.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ft=ft.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ft=ft.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ft}const vt=ft=>!ht&&Se(ut)?ft:ft.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(wn,Ut){let Jt=Ut.replace(/(\n|\r)/g,"").split("}"),gn=[];return Jt.map(Xn=>{Xn!=""&&gn.push(`.${se.current} ${Xn}`)}),`<style>${gn.join("}")}</style>`}),bt=(0,z.useMemo)(()=>{try{const Jt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,gn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Xn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,yn=/\(\/attachments\/download\//g;ut=ut.replace(yn,"("+we.Z.API_SERVER+"/attachments/download/").replace(Jt,"("+we.Z.API_SERVER+"/api/attachments/").replace(gn,'"'+we.Z.API_SERVER+"/api/attachments/").replace(Xn,'"'+we.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,`
|
|
`),At.current.style.display="none"}catch(Jt){}if(de){let Jt=-1;return ut=ut.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(gn,Xn,yn){var On;return++Jt,et(gn,Jt,(On=yt==null?void 0:yt[Jt])==null?void 0:On.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${vt(ut||"")}</pre>`}let ft=vt(ut);ft=(0,Oe.ZP)(ft);const wn=(0,Oe.ez)();ut.match(/\[TOC\]/)&&(ft=ft.replace("<p>[TOC]</p>",(0,Oe.Qv)()),(0,Oe.Iy)()),ft=ft.replace(/(__special_katext_id_\d+__)/g,(Jt,gn)=>{const{type:Xn,expression:yn}=wn[gn];return(0,We.renderToString)(je(yn)||"",{displayMode:Xn==="block",throwOnError:!1,output:"html"})}),ft=ft.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Oe.AL)();const Ut=document.createElement("div");if(Ut.innerHTML=ft,ht)return Ut.innerText;if(ve){const Jt=ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return rn(Ut,Jt),Ut.innerHTML}return setTimeout(()=>Sn(),500),Ut.innerHTML},[ut,ve]);(0,z.useEffect)(()=>{on.current&&on.current.querySelectorAll(["input","textarea"]).forEach(wn=>{wn.oninput=St,wn.onblur=Gt,wn.onfocus=jt})},[ee]),(0,z.useEffect)(()=>{var ft,wn,Ut,Jt,gn;if(yt!=null&&yt.length)try{const Xn=on.current.querySelectorAll(".edu-program-fill-score"),yn=on.current.querySelectorAll('[name="edu-program-fill"]');for(const[On,Cr]of yn.entries())Cr.value=((ft=yt==null?void 0:yt[On])==null?void 0:ft.value)||"",((wn=yt==null?void 0:yt[On])==null?void 0:wn.type)==="warning"?Cr.className="program-fill-warning":((Ut=yt==null?void 0:yt[On])==null?void 0:Ut.type)==="success"?Cr.className="program-fill-success":Cr.className="";for(const[On,Cr]of Xn.entries())Cr.innerHTML=(Jt=yt==null?void 0:yt[On])!=null&&Jt.score?`${(gn=yt==null?void 0:yt[On])==null?void 0:gn.score}\u5206`:"";oe(yt)}catch(Xn){console.log(Xn,"error")}},[yt]);const St=ft=>{ee[ft.target.dataset.id]=ee[ft.target.dataset.id]||{},ee[ft.target.dataset.id].value=ft.target.value,oe([...ee]),at(ee,ft.target.dataset.id)},Gt=ft=>{ee[ft.target.dataset.id]=ee[ft.target.dataset.id]||{},ee[ft.target.dataset.id].value=ft.target.value,oe([...ee]),nt(ee,ft.target.dataset.id)},jt=ft=>{ee[ft.target.dataset.id]=ee[ft.target.dataset.id]||{},ee[ft.target.dataset.id].value=ft.target.value,oe([...ee]),Tt(ee,ft.target.dataset.id)};function rn(ft,wn){return ft.childNodes.forEach(Ut=>{var Jt;if(Ut.childNodes.length>0)rn(Ut,wn);else if(Ut.nodeName!=="IMG")if(Ut.innerHTML)Ut.innerHTML=(Jt=Ut.innerHTML)==null?void 0:Jt.replace(new RegExp(wn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const gn=document.createElement("span");gn.innerHTML=Ut.textContent.replace(new RegExp(wn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ut.replaceWith(gn)}})}const on=(0,z.useRef)();Oe.jb.WebkitLineClamp=dt,dt&&(Rt=Xe(Xe({},Rt),Oe.jb));function Bt(ft){let wn=ft.target;if(wn.tagName.toUpperCase()==="A"){let Ut=wn.getAttribute("href");if(Ut.indexOf("office")>-1)ft.preventDefault(),mt(Ut),ne("office");else if(Ut.indexOf("application/pdf")>-1)ft.preventDefault(),mt(Ut),ne("pdf");else if(Ut.indexOf("text/html")>-1)ft.preventDefault(),mt(Ut),ne("html");else if(Ut.startsWith("#")){ft.preventDefault();let Jt=document.getElementById(Ut.replace("#",""));Jt&&Jt.scrollIntoView(!0)}}}const Sn=()=>{var ft;const wn=(ft=on.current)==null?void 0:ft.querySelectorAll("video");wn==null||wn.forEach(Ut=>{if(Ut.oncontextmenu=()=>!1,Ut.src.indexOf(".m3u8")>-1&&!Ut.canPlayType("application/vnd.apple.mpegurl")){if(xe.ZP.isSupported()){var Jt=new xe.ZP;Jt.loadSource(Ut.src),Jt.attachMedia(Ut)}}})};(0,z.useEffect)(()=>{if(on.current&&bt&&bt.match(Qe)&&window.PR.prettyPrint(),on.current)return on.current.addEventListener("click",Bt),()=>{var ft;(ft=on.current)==null||ft.removeEventListener("click",Bt),(0,Oe.AL)(),(0,Oe.Iy)()}},[bt,on.current,Bt]);const Yt=ft=>{ft.target.nodeName==="IMG"&&ft.target.className.indexOf("draw-flowchart")>-1?(At.current.style.zIndex=1,At.current.style.display="flex",At.current.style.width=ft.target.clientWidth+"px",At.current.style.height=ft.target.clientHeight+"px",At.current.style.top=ft.target.offsetTop+"px",At.current.style.left=ft.target.offsetLeft+"px",ft.target.id&&(Ie.current=ft.target.id)):At.current.style.display="none"},sn=()=>{At.current.style.display="none"};return(0,z.useEffect)(()=>{var ft;const wn=Ut=>{Ut.preventDefault(),Ut.clipboardData.setData("text",window.getSelection().toString())};return(ft=on.current)==null||ft.addEventListener("copy",wn),()=>{var Ut;(Ut=on.current)==null||Ut.removeEventListener("copy",wn)}},[on.current]),z.createElement("div",{style:{position:"relative"},onMouseLeave:sn},ht&&z.createElement("div",{ref:on,className:`${De.mdBody} `},bt),!ht&&!Se(bt)&&z.createElement("div",{ref:on,style:Xe({},Rt),onMouseOver:Yt,className:`${Te||""} ${kt?"disabled-fill":""} markdown-body ${De.mdBody} ${se.current}`,dangerouslySetInnerHTML:{__html:bt}}),!ht&&Se(bt)&&z.createElement(ge,{html:bt}),z.createElement("div",{ref:At,className:`${De.button} ${ke?"":De.previewFlowChart}`},z.createElement(Be.Z,null,z.createElement(he.ZP,{onClick:()=>{ke?Ne(Ie.current):(mt(Ie.current),ne("flowChart"))}},ke?"\u7F16\u8F91":"\u9884\u89C8"))),z.createElement(be.Z,{close:!0,data:pt,type:pt!=null&&pt.length?ae:"",style:Xe({},wt),onClose:()=>mt("")}))}},44905:function(_t,Pt,ce){"use strict";ce.d(Pt,{h:function(){return ze}});var z=ce(59301),Ye=ce(82326),Oe=ce(28284),Ve=ce(99571),xe=ce(89780),we=ce.n(xe),He=ce(66543),We=ce(59598),Be=Object.defineProperty,he=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,ge=(Ze,Xe,_e)=>Xe in Ze?Be(Ze,Xe,{enumerable:!0,configurable:!0,writable:!0,value:_e}):Ze[Xe]=_e,Ce=(Ze,Xe)=>{for(var _e in Xe||(Xe={}))Ue.call(Xe,_e)&&ge(Ze,_e,Xe[_e]);if(be)for(var _e of be(Xe))Le.call(Xe,_e)&&ge(Ze,_e,Xe[_e]);return Ze},De=(Ze,Xe)=>he(Ze,$e(Xe));const Ke=Ye.default.Option,it={labelCol:{span:4},wrapperCol:{span:20}},tt={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"]};Pt.Z=({callback:Ze,onCancel:Xe})=>{const[_e,Ot]=(0,z.useState)("python");function Qe(ct){Ot(tt[ct][1])}function je(ct){Ze(ct)}return z.createElement(Oe.default,De(Ce({},it),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:je,style:{width:500}}),z.createElement(Oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},z.createElement(Ye.default,{getPopupContainer:ct=>ct.parentNode,onChange:Qe},Object.keys(tt).map(ct=>z.createElement(Ke,{key:ct,value:ct},tt[ct][0])))),z.createElement(Oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},z.createElement(ze,{mode:_e})),z.createElement("div",{className:"flex-container flex-end"},z.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),z.createElement(Ve.ZP,{type:"ghost",onClick:Xe},"\u53D6\u6D88")))};function ze({value:Ze,onChange:Xe,mode:_e,options:Ot={}}){const Qe=(0,z.useRef)(),[je,ct]=(0,z.useState)();return(0,z.useEffect)(()=>{if(je){let Me=function(Ge){const ke=Ge.getValue();Xe&&Xe(ke)};return je.on("change",Me),()=>{je.off("change",Me)}}},[je,Xe]),(0,z.useEffect)(()=>{je&&je.setOption("mode",_e)},[je,_e]),(0,z.useEffect)(()=>{je&&(Ze!==je.getValue()||Ze==="")&&setTimeout(()=>{je.setValue(Ze||"")},300)},[je,Ze]),(0,z.useEffect)(()=>{if(Qe.current&&!je){const Me=we().fromTextArea(Qe.current,Ce({mode:_e,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ot));ct(Me)}},[Qe.current,je]),z.createElement("div",{className:"my-codemirror-container"},z.createElement("textarea",{ref:Qe}))}},2978:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return zt}});var z=ce(59301),Ye=ce(76560),Oe=ce(89780),Ve=ce.n(Oe),xe=ce(76374),we=ce(66543),He=ce(6313),We=ce(25717),Be=ce(99498),he=ce(25419),$e=ce(67549),be=ce(38394),Ue=({value:gt="",className:Ct,showTextOnly:en,showLines:pn,style:cn={}})=>{const Nn=(0,z.useMemo)(()=>"",[gt]);return z.createElement(z.Fragment,null,z.createElement("div",{dangerouslySetInnerHTML:{__html:Nn}}))},Le=Object.defineProperty,ge=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,tt=(gt,Ct,en)=>Ct in gt?Le(gt,Ct,{enumerable:!0,configurable:!0,writable:!0,value:en}):gt[Ct]=en,ze=(gt,Ct)=>{for(var en in Ct||(Ct={}))Ke.call(Ct,en)&&tt(gt,en,Ct[en]);if(De)for(var en of De(Ct))it.call(Ct,en)&&tt(gt,en,Ct[en]);return gt},Ze=(gt,Ct)=>ge(gt,Ce(Ct));let Xe=[{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 _e({onActionCallback:gt,title:Ct,icon:en,actionName:pn,className:cn="",children:Nn}){function Vn(){gt(pn)}return z.createElement("a",{title:Ct,className:cn,onClick:Vn},z.createElement("i",{className:`${en}`}),Nn)}var Ot=({watch:gt,showNullButton:Ct,showNullProgramButton:en,onActionCallback:pn,fullScreen:cn,insertTemp:Nn,hidetoolBar:Vn,extraUse:Hn})=>{const Bn=[...Xe,{title:`${gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${gt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return z.createElement("ul",{className:"markdown-toolbar-container"},!Vn&&Bn.map((Rn,Mt)=>z.createElement("li",{key:Mt},Rn.actionName?z.createElement(_e,Ze(ze({},Rn),{onActionCallback:pn})):z.createElement("span",{className:"v-line"}))),Ct?z.createElement("li",null,z.createElement(_e,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:pn},z.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,en?z.createElement(z.Fragment,null,z.createElement("li",null,z.createElement(_e,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:pn},z.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),z.createElement("li",null,z.createElement(_e,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:pn},z.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Nn&&z.createElement("li",null,z.createElement(_e,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Nn}`,onActionCallback:pn},z.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Hn&&z.createElement("li",null,Hn),z.createElement("li",{className:"btn-full-screen"},z.createElement(_e,{icon:`${cn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:cn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:pn})))},Qe=ce(75790),je=ce(28284),ct=ce(37568),Me=ce(99571),Ge=Object.defineProperty,ke=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,wt=(gt,Ct,en)=>Ct in gt?Ge(gt,Ct,{enumerable:!0,configurable:!0,writable:!0,value:en}):gt[Ct]=en,ve=(gt,Ct)=>{for(var en in Ct||(Ct={}))dt.call(Ct,en)&&wt(gt,en,Ct[en]);if(ht)for(var en of ht(Ct))Rt.call(Ct,en)&&wt(gt,en,Ct[en]);return gt},de=(gt,Ct)=>ke(gt,Te(Ct));const qe={labelCol:{span:4},wrapperCol:{span:20}};var kt=({callback:gt,onCancel:Ct})=>{function en(pn){gt(pn)}return z.createElement(je.default,de(ve({},qe),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:en,style:{width:500}}),z.createElement(je.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},z.createElement(ct.default,null)),z.createElement(je.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},z.createElement(ct.default,null)),z.createElement("div",{className:"flex-container flex-end"},z.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),z.createElement(Me.ZP,{type:"ghost",onClick:Ct},"\u53D6\u6D88")))},yt=ce(44905),Ne=ce(45596),at=ce(62957),nt=ce(77019),Tt=ce(6077),ut=ce(59301),At=({callback:gt,onCancel:Ct})=>{const en=document.createElement("canvas"),pn=en.getContext("2d");en.width=1e3,en.height=800,pn.fillStyle="#ffffff",pn.fillRect(0,0,en.width,en.height);const cn=en.toDataURL("image/png");return ut.createElement(at.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},ut.createElement(nt.Z,{style:{height:"100vh"}},ut.createElement(Tt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:cn,visible:!0,title:String(Date.now())},onOk:Nn=>{gt({src:Nn.url})},onClose:Ct})))},Ie=ce(30641),pt=ce(5269),mt=ce(6767),ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ne=ce(59301),oe=(0,z.forwardRef)(({onCancel:gt,editImgId:Ct,callback:en},pn)=>{let cn=(0,z.useRef)(),Nn=(0,z.useRef)(),Vn=(0,z.useRef)(),Hn=(0,z.useRef)(!1);const Bn=(0,z.useRef)(!1);console.log("ref:",pn);const[Rn,Mt]=(0,z.useState)(0),[lt,Vt]=(0,z.useState)("100vh");return(0,z.useEffect)(()=>{Mt(1)},[]),(0,z.useImperativeHandle)(pn,()=>({setHeight:Vt})),ne.createElement("div",{ref:Bn,className:"body-overflow-initial"},ne.createElement(Ie.Z,{width:"100vw",height:lt,footer:null,closable:!0,placement:"bottom",open:!!Rn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ae.drawerWrap}`,onClose:()=>{window.saveDrawData(En=>{en({src:`/api/attachments/${En}`,id:En})})},title:ne.createElement(nt.Z,{align:"middle"},ne.createElement(pt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ne.createElement(pt.Z,{onClick:()=>{Vt(lt==="60px"?"100vh":"60px")}},ne.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ne.createElement(pt.Z,{onClick:()=>{window.saveDrawData(En=>{if(En===null){mt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}mt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),en({src:`/api/attachments/${En}`,id:En,disabledClose:!0})})}},ne.createElement(Me.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ne.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Ct||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Nn})))}),se=ce(90524),re=ce(47889),Se=ce(71051);const et=re.ZP.Group,Lt={margin:"0 8px"};var vt=({callback:gt,onCancel:Ct})=>{function en(pn){gt(pn)}return z.createElement(je.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:en},z.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},z.createElement("span",{style:Lt},"\u5355\u5143\u683C\u6570\uFF1A"),z.createElement("span",{style:Lt},"\u884C\u6570"),z.createElement(je.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},z.createElement(Se.Z,null)),z.createElement("span",{style:Lt},"\u5217\u6570"),z.createElement(je.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},z.createElement(Se.Z,null))),z.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},z.createElement("span",{style:Lt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),z.createElement(je.default.Item,{name:"align"},z.createElement(et,null,z.createElement(re.ZP,{value:"default"},z.createElement("i",{className:"fa fa-align-justify"})),z.createElement(re.ZP,{value:"left"},z.createElement("i",{className:"fa fa-align-left"})),z.createElement(re.ZP,{value:"center"},z.createElement("i",{className:"fa fa-align-center"})),z.createElement(re.ZP,{value:"right"},z.createElement("i",{className:"fa fa-align-right"}))))),z.createElement("div",{className:"flex-container flex-end"},z.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),z.createElement(Me.ZP,{type:"ghost",onClick:Ct},"\u53D6\u6D88")))},bt=ce(71411),St=ce(11081),Gt=ce.n(St),rn=(0,z.forwardRef)(({use3d:gt,width:Ct,height:en,callback:pn,showSaveButton:cn},Nn)=>{const Vn=(0,z.useRef)(),Hn=(0,z.useRef)(),[Bn,Rn]=(0,z.useState)(!1),Mt=(0,z.useRef)({id:Vn,appName:"graphing",width:Ct||1e3,height:en||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,z.useEffect)(()=>{Hn.current=new(Gt())(Mt.current,!0),window.onload=function(){Hn.current.inject("applet_container")}},[]);const lt=()=>{var Vt=window.ggbApplet.getPNGBase64(1,!0,72);return pn&&pn(Vt),Vt};return(0,z.useEffect)(()=>{Mt.current.appName=Bn?"3D":"graphing",Hn.current.inject("applet_container")},[Bn]),(0,z.useEffect)(()=>{Rn(gt)},[gt]),(0,z.useImperativeHandle)(Nn,()=>({getImgData:lt})),z.createElement(z.Fragment,null,z.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Vn}),z.createElement(nt.Z,{align:"middle"},z.createElement(pt.Z,{flex:1},z.createElement(bt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Bn,onChange:Vt=>Rn(Vt)})),z.createElement(pt.Z,null,z.createElement(Me.ZP,{size:"large",onClick:lt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),on=ce(88615);const Bt="link",Sn="upload-image",Yt="add-flowchart",sn="draw-image",ft="add-flowchart",wn="code-block",Ut="add-table",Jt="------------",gn={default:Jt,left:`:${Jt}`,center:`:${Jt}:`,right:`${Jt}:`};var Xn=ce(17904),yn=ce(49661);function On(){}let Cr=0;const ar=1e4,Hr="\u2581",Or="@\u2581\u2581@",kr="@\u2581@",mr=`
|
|
**\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`,bn=["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 lr(gt){return/^\d+$/.test(gt)?`${gt}px`:gt}const Gn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",wr={[Gn+"-B"]:"bold",[Gn+"-I"]:"italic"},Ft={[Bt]:"\u6DFB\u52A0\u94FE\u63A5",[wn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Sn]:"\u6DFB\u52A0\u56FE\u7247",[sn]:"\u6DFB\u52A0\u753B\u56FE",[Yt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ut]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var zt=({defaultValue:gt="",onChange:Ct,width:en="100%",height:pn=400,miniToolbar:cn=!1,isFocus:Nn=!1,watch:Vn,insertTemp:Hn,mode:Bn="markdown",id:Rn="markdown-editor-id",showResizeBar:Mt=!1,noStorage:lt=!1,showNullButton:Vt=!1,showNullProgramButton:En=!1,hidetoolBar:jn=!1,fullScreen:Pe=!1,onBlur:Re,onCMBeforeChange:Wt,onFullScreen:Ee,className:me="",disablePaste:ye=!1,disabled:rt=!1,disabledFill:Zt=!1,placeholder:$t="",values:xt="",extraUse:st})=>{const[pe,qt]=(0,z.useState)(null),[Dt,an]=(0,z.useState)(gt),[dn,Cn]=(0,z.useState)(Vn),[hn,er]=(0,z.useState)(Pe),[Dn,Ln]=(0,z.useState)(""),[Qn,Fn]=(0,z.useState)(0),[tr,fr]=(0,z.useState)(pn),[nr,Jn]=(0,z.useState)(!1),[Wn,zn]=(0,z.useState)(0),[un,br]=(0,z.useState)(0),xn=(0,z.useRef)(),Kt=(0,z.useRef)(),Pn=(0,z.useRef)(),_n=(0,z.useRef)(),gr=(0,z.useRef)(),qn=(0,z.useRef)(),Tn=(0,Ye.useDispatch)();(0,z.useEffect)(()=>{const Xt=window.scrollY||window.pageYOffset;an(xt),pe==null||pe.setValue(xt),window.scrollTo(0,Xt)},[xt]),(0,z.useEffect)(()=>{Ee==null||Ee(hn)},[hn]),(0,z.useEffect)(()=>{if(xn.current){let Xt=function(tn,ln){var ir;if(ye){ln.preventDefault();return}const cr=ln.clipboardData;if(cr){const Fr=cr.types.toString(),vr=cr.items;if(Fr==="Files"||cr.types.indexOf("Files")>-1){if(ln.preventDefault(),Bn=="stex")return;try{let Er=vr[1];((ir=vr[0])==null?void 0:ir.kind)==="file"&&(Er=vr[0]);const Nr=Er.getAsFile(),Gr=Nr.name.split(".").pop();(0,Ne.I)(Nr,_r=>{var Yr,Mr,oi;_r.id?((Yr=Nr==null?void 0:Nr.type)==null?void 0:Yr.indexOf("image"))>-1?Nt.replaceSelection(`<img width="100%" src="/api/attachments/${_r.id}?type=${_r.content_type})" alt="" />`):((Mr=Nr==null?void 0:Nr.type)==null?void 0:Mr.indexOf("video"))>-1?Nt.replaceSelection(`<video width="100%" controls src="/api/attachments/${_r.id}"></video>`):((oi=Nr==null?void 0:Nr.type)==null?void 0:oi.indexOf("pdf"))>-1?Nt.replaceSelection(`<a href="/api/attachments/${_r.id}?type=${Nr.type}&disposition=inline" target="_blank">${Nr.name}</a>`):bn.includes(Gr)?Nt.replaceSelection(`<a href="/api/attachments/${_r.id}?type=office&disposition=inline" target="_blank">${Nr.name}</a>`):Nt.replaceSelection(`[${Nr.name}](/api/attachments/${_r.id}?type=${_r.content_type})`):(_r==null?void 0:_r.status)===401&&(document.location.href="/user/login")})}catch(Er){mt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Nt=Ve().fromTextArea(xn.current,{mode:Bn,lineNumbers:!cn,lineWrapping:!0,value:gt,autoCloseTags:!0,autoCloseBrackets:!0});return Nt.on("keyup",function(tn,ln){ln.keyCode===8&&(tn.getValue()==""?Nt.setOption("placeholder",$t):Nt.setOption("placeholder",null))}),Nt.on("keydown",function(tn,ln){if(ln.keyCode===8){var ir=In(tn);ir&&ln.preventDefault()}}),Nn&&Nt.focus(),Nt.on("paste",Xt),rt&&Nt.on("beforeChange",function(tn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),qt(Nt),()=>{Nt.off("paste",Xt)}}},[]);const hr=(0,z.useCallback)(()=>{if(Kt.current)try{}catch(Xt){console.log(Xt,"---- to set md editor body height")}},[tr,Kt,hn]);(0,z.useEffect)(()=>{function Xt(){let Nt=new xe.Z(tn=>{for(let ln of tn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(hr(),pe.setSize("100%","100%"),pe.refresh())});return Nt.observe(xn.current.parentElement),Nt}if(pe){const Nt=Xt();return()=>{var tn,ln;(tn=xn.current)!=null&&tn.parentElement&&Nt.unobserve((ln=xn.current)==null?void 0:ln.parentElement)}}},[pe,hr]),(0,z.useEffect)(()=>{if(pe){let Xt=[];for(const[Nt,tn]of Object.entries(wr)){let ln={[Nt]:()=>{Yn(tn)}};Xt.push(ln),pe.addKeyMap(ln)}return()=>{for(let Nt of Xt)pe.removeKeyMap(Nt)}}},[pe]),(0,z.useEffect)(()=>{Pe!==hn&&er(Pe)},[Pe]),(0,Xn.Z)(()=>{if(!lt&&Qn>0){let Xt=new Date().getTime(),Nt=window.sessionStorage.getItem(Rn);Xt>=Qn+ar&&(!Nt||Nt!==Dt)&&(window.sessionStorage.setItem(Rn,Dt),Jn(!0))}},ar),(0,z.useEffect)(()=>{Cn(Vn)},[pe,Vn]),(0,z.useEffect)(()=>{pe&&Nn&&pe.focus()},[pe,Nn]),(0,z.useEffect)(()=>{if(dn&&pe){let Xt=function(tn){let ln=tn.target;if(_n.current){let ir=ln.scrollTop/ln.scrollHeight;_n.current.scrollTop=_n.current.scrollHeight*ir}};const Nt=pe.getScrollerElement();return Nt.addEventListener("scroll",Xt),()=>{Nt.removeEventListener("scroll",Xt)}}},[pe,dn]),(0,z.useEffect)(()=>{if(pe&&Wt){let Xt=function(Nt,tn){Wt(Nt,tn)};return pe.on("beforeChange",Xt),()=>{pe.off("beforeChange",Xt)}}},[pe,Wt]),(0,z.useEffect)(()=>{if(pe&&Re){let Xt=function(){Re(pe.getValue())};return pe.on("blur",Xt),()=>{pe.off("blur",Xt)}}},[pe,Re]);function In(Xt,Nt){var tn=Xt.getDoc(),ln=tn.getCursor(),ir=tn.getLine(ln.line),cr=ir.charAt(ln.ch-1),Fr=ir.lastIndexOf("@\u2581@",ln.ch),vr=ir.lastIndexOf("@\u2581\u2581@",ln.ch),Er=Fr>vr?Fr:vr,Nr=Fr>vr?3:4;if(Or.indexOf(cr)===-1)return null;if(console.log("change1:",Nt,Xt,ir,ln,Er,Fr,vr,cr),Er>=0&&ln.ch-Er<5){var Gr=Er+Nr;return tn.replaceRange("",{line:ln.line,ch:Er},{line:ln.line,ch:Gr}),{line:ln.line,ch:Gr}}return null}(0,z.useEffect)(()=>{if(pe){let Xt=function(Nt,tn){const ln=Nt.getValue();an(ln),Fn(new Date().getTime()),Nt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ct&&(En?Ct(ln,It(ln)):Ct(ln))};return pe.on("change",Xt),()=>{pe.off("change",Xt)}}},[pe,Ct]),(0,z.useEffect)(()=>{if(pe)if(gt==null)pe.setValue(""),an("");else{const Xt=window.scrollY||window.pageYOffset;gt!==pe.getValue()&&(pe.setValue(gt),an(gt),pe.setCursor(rt?1:pe.lineCount(),0),window.scrollTo(0,Xt))}},[pe,gt]);const Yn=(0,z.useCallback)(Xt=>{const Nt=pe.getCursor(),tn=pe.getSelection();let ln=tn.split(`
|
|
`);switch(Xt){case"bold":return pe.replaceSelection("**"+tn+"**"),tn===""&&pe.setCursor(Nt.line,Nt.ch+2),pe.focus();case"italic":return pe.replaceSelection("*"+tn+"*"),tn===""&&pe.setCursor(Nt.line,Nt.ch+1),pe.focus();case"code":return pe.replaceSelection("`"+tn+"`"),tn===""&&pe.setCursor(Nt.line,Nt.ch+1),pe.focus();case"inline-latex":return(0,yn.Ye)(Tn)?void 0:(Ln("inline-latex"),pe.focus());case"latex":return pe.replaceSelection("```latex\n"+tn+"\n```"),pe.setCursor(Nt.line+1,tn.length+1),pe.focus();case"line-break":return pe.replaceSelection(`<br/>
|
|
`),pe.focus();case"list-ul":return tn===""?pe.replaceSelection("- "+tn):pe.replaceSelection(ln.map(ir=>ir===""?"":`- ${ir}`).join(`
|
|
`)),pe.focus();case"list-ol":return tn===""?pe.replaceSelection("1. "+tn):pe.replaceSelection(ln.map((ir,cr)=>ir===""?"":`${cr+1}. ${ir}`).join(`
|
|
`)),pe.focus();case"add-null-ch":return tn===""&&pe.setCursor(Nt.line,Nt.ch),pe.replaceSelection(Hr),pe.focus();case"add-signal":return tn===""&&pe.setCursor(Nt.line,Nt.ch),pe.replaceSelection(kr),pe.focus();case"add-multiple":return tn===""&&pe.setCursor(Nt.line,Nt.ch),pe.replaceSelection(Or),pe.focus();case"inster-template-1":return tn===""&&pe.setCursor(Nt.line,Nt.ch),pe.replaceSelection(mr),pe.focus();case"eraser":return pe.setValue(""),pe.focus();case"trigger-watch":return Cn(!dn),pe.focus();case"trigger-full-screen":return er(!hn),pe.focus();case Bt:Ln(Bt);return;case wn:Ln(wn);return;case Sn:Ln(Sn);return;case sn:Ln(sn);return;case"maths-latex":if((0,yn.Ye)(Tn))return;Ln("maths-latex");return;case Yt:gr.current="",sessionStorage.removeItem("file_id"),Ln(Yt);return;case Ut:Ln(Ut);return;default:throw new Error}},[pe,dn,hn]),Zn=(0,z.useCallback)((Xt,Nt)=>{var tn,ln,ir,cr,Fr,vr;Xt!=null&&Xt.disabledClose||Ln("");const{src:Er,alt:Nr,id:Gr}=Xt||{};switch(Dn){case Bt:const{title:Vr,link:Hi}=Xt;return pe.replaceSelection(`[${Vr}](${Hi})`),pe.focus();case wn:const{language:ui,content:ni}=Xt;return pe.replaceSelection(["```"+ui,ni,"```"].join(`
|
|
`)),pe.focus();case"maths-latex":for(var _r=atob(Xt),Yr=new Uint8Array(_r.length),Mr=0;Mr<_r.length;Mr++)Yr[Mr]=_r.charCodeAt(Mr);var oi=new Blob([Yr],{type:"image/png"});(0,Ne.I)(oi,ci=>{ci.id?pe.replaceSelection(``):(ci==null?void 0:ci.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,yn.Ye)(Tn))return;pe.replaceSelection("`$$"+Xt+"$$`");break;case ft:if(!Gr)return;pe.getValue().indexOf(Er)===-1?pe.replaceSelection(`<center><img id="${Gr}" width="80%" src="${Er}" class="draw-flowchart" alt="${Nr||""}" /></center>`):document.getElementById(Gr).src=se.Z.API_SERVER+Er+"?t="+Date.now();break;case Sn:case sn:const Ar=Nt,vi=(ir=(ln=(tn=Ar==null?void 0:Ar.name)==null?void 0:tn.split("."))==null?void 0:ln.pop)==null?void 0:ir.call(ln);return((cr=Ar==null?void 0:Ar.type)==null?void 0:cr.indexOf("image"))>-1||!(Ar!=null&&Ar.type)?Ar!=null&&Ar.align||Ar!=null&&Ar.width?pe.replaceSelection(`<p style="text-align:${Ar.align||"initial"}"><img width="${Ar.width?Ar.width+"%":"initial"}" src="${Er}" alt="${Nr||""}" /></p>`):pe.replaceSelection(`<img width="100%" src="${Er}" alt="${Nr||""}" />`):((Fr=Ar==null?void 0:Ar.type)==null?void 0:Fr.indexOf("video"))>-1?pe.replaceSelection(`<video width="100%" controls src="${Er}"></video>`):((vr=Ar==null?void 0:Ar.type)==null?void 0:vr.indexOf("pdf"))>-1?pe.replaceSelection(`<a href="${Er}?type=${Ar.type}&disposition=inline" target="_blank">${Ar.name}</a>`):bn.includes(vi)?pe.replaceSelection(`<a href="${Er}?type=office&disposition=inline" target="_blank">${Ar.name}</a>`):pe.replaceSelection(`[${Ar.name}](${Er})`),pe.focus();case Ut:const{row:Ui,col:Qr,align:Wi}=Xt;let Si=`
|
|
`;for(let ci=0;ci<Ui;ci++){let oo=[],Bi=[];for(let Wr=0;Wr<Qr;Wr++)ci===1&&Bi.push(gn[Wi]),oo.push(" ");ci===1&&(Si+=`| ${Bi.join(" | ")} |
|
|
`),Si+=`| ${oo.join(Qr===1?"":" | ")} |
|
|
`}return pe.replaceSelection(Si+`
|
|
`),pe.focus();default:throw new Error}},[pe,Dn]),Lr=(0,z.useMemo)(()=>{switch(Dn){case Bt:return z.createElement(kt,{callback:Zn,onCancel:sr});case wn:return z.createElement(yt.Z,{callback:Zn,onCancel:sr});case Sn:return z.createElement(Ne.Z,{callback:Zn,onCancel:sr});case Yt:return z.createElement(oe,{editImgId:gr.current,callback:Zn,onCancel:sr});case Ut:return z.createElement(vt,{callback:Zn,onCancel:sr});case"maths-latex":return z.createElement(rn,{showSaveButton:!0,callback:Zn});case"inline-latex":return z.createElement(on.Z,{showSaveButton:!0,callback:Zn});default:return null}},[Dn]);function sr(){Ln("")}(0,z.useEffect)(()=>{if(Pn.current){let Xt=function(Fr){ir=!0,cr=Fr.pageY},Nt=function(){ir=!1},tn=function(Fr){if(ir){let vr=Fr.pageY-cr;vr<0&&(vr=0),vr>300&&(vr=300);let Er=pn+vr+"px";fr(Er)}},ln=Pn.current,ir=!1,cr=0;return ln.addEventListener("mousedown",Xt),document.addEventListener("mousemove",tn),document.addEventListener("mouseup",Nt),()=>{ln.removeEventListener("mousedown",Xt),document.removeEventListener("mousemove",tn),document.removeEventListener("mouseup",Nt)}}},[pe,Pn]),(0,z.useEffect)(()=>{fr(pn)},[pn]);const jr=lr(en),Kr=lr(tr),Rr={width:jr,height:Kr},ur=(0,z.useMemo)(()=>{if(Qn){let Xt=new Date(Qn),Nt=Xt.getHours(),tn=Xt.getMinutes(),ln=Xt.getSeconds();return Nt=Nt<10?"0"+Nt:Nt,tn=tn<10?"0"+tn:tn,ln=ln<10?"0"+ln:ln,`${Nt}:${tn}:${ln}`}return 0},[Qn]),It=Xt=>{const Nt=[];if(En){let tn=-1;Xt=Xt.replace(/(@▁▁@|@▁@)/g,function(ln,ir,cr){Nt.push({multiLine:ln!==kr})})}return Nt};function Qt(){window.sessionStorage.removeItem(Rn),Jn(!1),Fn(0)}function An(){Jn(!1),Fn(0),pe.setValue(window.sessionStorage.getItem(Rn))}(0,z.useEffect)(()=>{Ft[Dn]&&Dn!==sn&&Dn!==Yt&&setTimeout(()=>{const Xt=document.getElementsByClassName("markdown-popup-form")[0],Nt=window.innerWidth/2-Xt.offsetWidth/2,tn=window.innerHeight/2-Xt.offsetHeight/2;zn(Nt),br(tn)},0)},[Dn]);const fn=Xt=>{Xt.preventDefault();const Nt=Xt.clientX-Wn,tn=Xt.clientY-un;document.body.onmousemove=ln=>{let ir=ln.clientX-Nt,cr=ln.clientY-tn;const Fr=document.getElementsByClassName("markdown-popup-form")[0],vr=window.innerWidth-Fr.offsetWidth,Er=window.innerHeight-Fr.offsetHeight;ir=Math.max(0,Math.min(ir,vr)),cr=Math.max(0,Math.min(cr,Er)),Un(ln.clientX,ln.clientY,Nt,tn)&&(zn(ir),br(cr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Un=(Xt,Nt,tn,ln)=>{const ir=document.body.clientHeight,cr=document.body.clientWidth;return Xt<20&&tn>Xt||Xt>cr-20&&tn<Xt||Nt<20&&ln>Nt||Nt>ir-20&&ln<Nt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return z.createElement(z.Fragment,null,z.createElement("div",{className:"markdown-editor-wrapper",ref:Kt},z.createElement("div",{className:`markdown-editor-container ${me} ${dn?"on-preview":""} ${cn?"mini":""} ${hn?"full-screen":""}`,style:Rr},z.createElement(Ot,{insertTemp:Hn,watch:dn,fullScreen:hn,showNullButton:Vt,showNullProgramButton:En,onActionCallback:Yn,hidetoolBar:jn,extraUse:st}),z.createElement("div",{className:"markdown-editor-body"},z.createElement("div",{className:"codemirror-container"},z.createElement("textarea",{ref:xn,placeholder:$t})),dn?z.createElement("div",{ref:_n,className:"preview-container"},Bn==="stex"&&z.createElement(Ue,{value:Dt}),Bn!=="stex"&&z.createElement(be.Z,{edit:!0,disabledFill:Zt,showProgramFill:En,value:Dt,openEditor:Xt=>{var Nt;gr.current=Xt,(Nt=qn.current)==null||Nt.setHeight("100vh"),setTimeout(()=>{Ln("add-flowchart")},150)}})):null))),Mt?z.createElement("a",{ref:Pn,className:"editor-resize"}):null,Dn===sn&&z.createElement(At,{callback:Zn,onCancel:sr}),Dn===Yt&&z.createElement(oe,{ref:qn,editImgId:gr.current,callback:Zn,onCancel:sr}),z.createElement(Qe.Z,null,Ft[Dn]&&Dn!==sn&&Dn!==Yt?z.createElement(at.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Wn,top:un},title:z.createElement("div",{style:{cursor:"move"},onMouseDown:fn},Ft[Dn]),open:!0,onCancel:sr,footer:null,destroyOnClose:!0,width:Dn===Yt?"1200px":null,height:Dn===Yt?"80vh":null,className:"markdown-popup-form"},Lr):null))}},45596:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return Xe},I:function(){return Ot}});var z=ce(28284),Ye=ce(6767),Oe=ce(37568),Ve=ce(77736),xe=ce(71051),we=ce(47889),He=ce(99571),We=ce(67303),Be=ce(59301),he=ce(59301),$e=Object.defineProperty,be=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,De=(Qe,je,ct)=>je in Qe?$e(Qe,je,{enumerable:!0,configurable:!0,writable:!0,value:ct}):Qe[je]=ct,Ke=(Qe,je)=>{for(var ct in je||(je={}))ge.call(je,ct)&&De(Qe,ct,je[ct]);if(Le)for(var ct of Le(je))Ce.call(je,ct)&&De(Qe,ct,je[ct]);return Qe},it=(Qe,je)=>be(Qe,Ue(je));const{useForm:tt}=z.default,ze={width:280,marginRight:10},Ze={labelCol:{span:5},wrapperCol:{span:19}};var Xe=({callback:Qe,onCancel:je})=>{const[ct]=tt();let Me=(0,Be.useRef)();function Ge(ht){Me.current.width=ct.getFieldValue("width"),Me.current.align=ct.getFieldValue("align"),Qe(ht,Me.current)}function ke(ht,dt){if(ht.status===-1){Ye.ZP.error(ht.message);return}ct.setFieldsValue({src:`/api/attachments/${ht.id}`,type:dt.type})}function Te(ht){let dt=ht.target.files[0];Me.current=dt,Ot(dt,ke)}return he.createElement(z.default,it(Ke({form:ct},Ze),{className:"upload-image-panel",onFinish:Ge,style:{width:470,overflow:"hidden"}}),he.createElement(z.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},he.createElement("div",{className:"flex-container"},he.createElement(z.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},he.createElement(Oe.default,{style:ze})),he.createElement(_e,{onFileChange:Te}))),he.createElement(z.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(Oe.default,{style:{width:264}})),he.createElement(z.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},he.createElement(Ve.Z,null,he.createElement(z.default.Item,{name:"width",style:{margin:0}},he.createElement(xe.Z,{style:{width:264}})),he.createElement("span",{className:"ml8"},"%"))),he.createElement(z.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},he.createElement(we.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),he.createElement("aside",null,he.createElement(z.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},he.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(He.ZP,{type:"default",onClick:je},"\u53D6\u6D88"))))};function _e({onFileChange:Qe}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:Qe}))}function Ot(Qe,je){if(!Qe)throw new String("\u6CA1\u6709\u6587\u4EF6");let ct=new FormData;ct.append("editormd-image-file",Qe),ct.append("file_param_name","editormd-image-file"),ct.append("byxhr","true");var Me=new window.XMLHttpRequest;Me.withCredentials=!0,Me.addEventListener("load",function(Ge){je(JSON.parse(Ge.target.responseText),Qe)},!1),Me.addEventListener("error",function(Ge){console.error(Ge)},!1),Me.open("POST",`${We.KI}/api/attachments.json`),Me.send(ct)}},75790:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return Oe}});var z=ce(59301),Ye=ce(4676);class Oe extends z.Component{constructor(xe){super(xe);const we=window.document;this.node=we.createElement("div"),we.body.appendChild(this.node)}render(){const{children:xe}=this.props;return(0,Ye.createPortal)(xe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(_t,Pt,ce){"use strict";ce.d(Pt,{SV:function(){return At},ZP:function(){return ut}});var z=ce(59301),Ye=ce(76374);const Oe={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"]},Ve={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},xe={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},we={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},He={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var We=ce(53184),Be=ce.n(We),he=(Ie,pt,mt)=>new Promise((ae,ne)=>{var ee=re=>{try{se(mt.next(re))}catch(Se){ne(Se)}},oe=re=>{try{se(mt.throw(re))}catch(Se){ne(Se)}},se=re=>re.done?ae(re.value):Promise.resolve(re.value).then(ee,oe);se((mt=mt.apply(Ie,pt)).next())});const $e={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},be=(Ie,pt,mt,ae)=>{const ne=pt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:mt.lineNumber,endColumn:mt.column});return Array.from(new Set(ne.match(/\b\w{2,}\b/g)||[])).map(oe=>({label:oe,kind:Ie.languages.CompletionItemKind.Text,insertText:oe,range:ae}))},Ue=(Ie,pt,mt,ae)=>{Ie.languages.registerCompletionItemProvider(pt,{provideCompletionItems(ne,ee){const oe=ne.getWordUntilPosition(ee),se={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:oe.startColumn,endColumn:oe.endColumn},re=ne.getLineContent(ee.lineNumber).substring(oe.startColumn-2,oe.endColumn);return{suggestions:[...be(Ie,ne,ee,se),...mt.map(et=>({label:et,kind:Ie.languages.CompletionItemKind.Keyword,documentation:et,insertText:et,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se})),...ae.map(et=>({label:et.label,kind:Ie.languages.CompletionItemKind.Snippet,documentation:et.content,insertText:re.startsWith("#")?et.content.replace(/#/,""):et.content,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}))]}}})};var Le=Ie=>{$e.languages.forEach(pt=>{Ie.languages.registerDocumentFormattingEditProvider(pt,{provideDocumentFormattingEdits(mt){return he(this,null,function*(){const ae=Be()(mt.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:mt.getFullModelRange(),text:ae}]})}})}),Ue(Ie,"java",Ve.keywords,Ve.quickKey),Ue(Ie,"cpp",xe.keywords,xe.quickKey),Ue(Ie,"c",Oe.keywords,[]),Ue(Ie,"python",we.keywords,we.quickKey),Ue(Ie,"scala",He.keywords,He.quickKey)};const ge="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ce=Object.defineProperty,De=(Ie,pt,mt)=>pt in Ie?Ce(Ie,pt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):Ie[pt]=mt,Ke=(Ie,pt,mt)=>De(Ie,typeof pt!="symbol"?pt+"":pt,mt);const it=class Is{constructor(pt,mt,ae){this.placeholder=pt,this.editor=mt,this.monaco=ae,mt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Is.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)}};Ke(it,"ID","editor.widget.placeholderHint");var ze=it,Ze=ce(96236),Xe=ce(6767),_e=ce(25399),Ot=ce(89392),Qe=ce(33796),je=ce(56102),ct=Object.defineProperty,Me=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,dt=(Ie,pt,mt)=>pt in Ie?ct(Ie,pt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):Ie[pt]=mt,Rt=(Ie,pt)=>{for(var mt in pt||(pt={}))Te.call(pt,mt)&&dt(Ie,mt,pt[mt]);if(ke)for(var mt of ke(pt))ht.call(pt,mt)&&dt(Ie,mt,pt[mt]);return Ie},wt=(Ie,pt)=>Me(Ie,Ge(pt)),ve=(Ie,pt)=>{var mt={};for(var ae in Ie)Te.call(Ie,ae)&&pt.indexOf(ae)<0&&(mt[ae]=Ie[ae]);if(Ie!=null&&ke)for(var ae of ke(Ie))pt.indexOf(ae)<0&&ht.call(Ie,ae)&&(mt[ae]=Ie[ae]);return mt},de=(Ie,pt,mt)=>new Promise((ae,ne)=>{var ee=re=>{try{se(mt.next(re))}catch(Se){ne(Se)}},oe=re=>{try{se(mt.throw(re))}catch(Se){ne(Se)}},se=re=>re.done?ae(re.value):Promise.resolve(re.value).then(ee,oe);se((mt=mt.apply(Ie,pt)).next())});function qe(Ie){return/^\d+$/.test(Ie)?`${Ie}px`:Ie}function kt(){}let yt=!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 at(Ie=[]){let pt=Ie;if(Array.isArray(Ie)){for(let mt=0;mt<Ie.length;mt++){let ae=Ne[Ie[mt]];if(ae)return ae}return pt[0]}return Ne[pt]||pt}let nt=null;const Tt=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Ie){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Ie)}});var ut=Ie=>{var pt=Ie,{width:mt="100%",height:ae="100%",value:ne,language:ee="javascript",style:oe={},options:se={},overrideServices:re={},theme:Se="vs-dark",onEditBlur:et,isCopy:Lt=!1,onSave:vt,autoHeight:bt=!1,forbidCopy:St=!1,onChange:Gt=kt,editorDidMount:jt=kt,onFocus:rn=kt,onBreakPoint:on=kt,breakPointValue:Bt=[],filename:Sn="educoder.txt",errorLine:Yt,errorContent:sn="",highlightLine:ft,openBreakPoint:wn=!1,placeholder:Ut="",showMiniMap:Jt=!0}=pt,gn=ve(pt,["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 Xn=(0,z.useRef)(),yn=(0,z.useRef)({}),On=(0,z.useRef)(),Cr=(0,z.useRef)(),ar=(0,z.useRef)([]),Hr=(0,z.useRef)(!1),Or=(0,z.useRef)(),kr=(0,z.useRef)(),mr=(0,z.useRef)(!1),[bn,lr]=(0,z.useState)(!1);function pr(){let Mt;return Xn.current&&(Mt=new Ye.Z(lt=>{for(let Vt of lt)(Vt.target.offsetHeight>0||Vt.target.offsetWidth>0)&&yn.current.instance.layout()}),Mt.observe(Xn.current)),Mt}function Gn(){Xe.ZP.warning({content:decodeURIComponent(ge),key:"monaco-editor-tip"})}const wr=()=>{let Mt=yn.current.instance;if(ne!=null&&Mt&&bn){const lt=Mt.getModel();lt&&ne!==lt.getValue()&&(yt=!0,lt.setValue(ne),Mt.layout(),yt=!1)}};(0,z.useEffect)(()=>{const Mt=Qe.Z.subscribe("formatDocument",lt=>{var Vt;let En=yn.current.instance;(Vt=En==null?void 0:En.getAction)==null||Vt.call(En,"editor.action.formatDocument").run()});return window.updateMonacoValue=lt=>{Gt(lt)},Mt},[]),(0,z.useEffect)(()=>{var Mt;let lt=yn.current.instance;Cr.current&&clearTimeout(Cr.current),Cr.current=setTimeout(()=>{wr()},500),ne&&(ne!=null&&ne.length)&&((Mt=lt==null?void 0:lt.updateOptions)==null||Mt.call(lt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ne.split(/\r\n|\r|\n/g).length))+3,5)}))},[ne,bn,yn.current]),(0,z.useEffect)(()=>{if(Yt&&yn.current&&yn.current.instance){let lt=yn.current.instance;lt.changeViewZones(function(Vt){var En=document.createElement("div");En.style.padding="10px 20px",En.style.width="calc(100% - 20px)",En.className="my-error-line-wrp",En.innerHTML=sn,Vt.addZone({afterLineNumber:Yt||11,heightInLines:3,domNode:En})});var Mt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};lt.addOverlayWidget(Mt),lt.revealPositionInCenter({lineNumber:20,column:1})}},[Yt,yn.current,bn]);const Ft=(Mt="",lt)=>{if(!Mt||Mt.trim()==="")return!0;const En=yn.current.instance.getModel().getLineTokens(lt);let jn=!1;for(let Pe=0;Pe<2;Pe++)En.getStandardTokenType(Pe)===1&&(jn=!0);return jn};(0,z.useEffect)(()=>{var Mt;const lt=(Mt=yn.current)==null?void 0:Mt.instance;if(lt&&bn&&St){const Vt=lt.onDidBlurEditorWidget(()=>{mr.current=!1}),En=lt.onDidFocusEditorText(()=>{mr.current=!0});return()=>{Vt.dispose(),En.dispose()}}},[yn.current,bn,St]),(0,z.useEffect)(()=>{var Mt;if((Mt=yn.current)!=null&&Mt.instance&&bn&&wn){let lt=yn.current.instance,Vt=lt.getModel();if(!Vt)return;(()=>{var xt;let st=[],pe=[];const qt=Vt.getAllDecorations();for(let an of qt)an.options.className==="highlighted-line"&&(st.push((xt=an==null?void 0:an.range)==null?void 0:xt.startLineNumber),pe.push(an==null?void 0:an.id));if(ft===st[0])return;Vt.deltaDecorations(pe,[]);const Dt=Vt.getLineCount();ft&&ft<=Dt&&(lt.deltaDecorations([],[{range:new nt.Range(ft,1,ft,Vt.getLineMaxColumn(ft)),options:{isWholeLine:!0,className:"highlighted-line"}}]),lt.revealLineInCenter(ft))})();const jn=(xt=!1)=>{var st;let pe=[],qt=[];const Dt=Vt.getAllDecorations();for(let an of Dt)an.options.linesDecorationsClassName==="breakpoints-select"&&(pe.push((st=an==null?void 0:an.range)==null?void 0:st.startLineNumber),qt.push(an==null?void 0:an.id));if(xt)return{lines:pe,ids:qt};on(pe)},Pe=xt=>de(void 0,null,function*(){let st={range:new nt.Range(xt,1,xt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Vt.deltaDecorations([],[st]),jn()}),Re=xt=>de(void 0,null,function*(){let st=[];const pe=lt.getLineDecorations(xt);for(let qt of pe)qt.options.linesDecorationsClassName==="breakpoints-select"&&st.push(qt.id);yield Vt.deltaDecorations(st,[]),jn()}),Wt=xt=>{let st=lt.getLineDecorations(xt);for(let pe of st)if(pe.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ot.isEqual)(Bt,jn(!0).lines)){Vt.deltaDecorations(jn(!0).ids,[]);const xt=Bt.map(st=>({range:new nt.Range(st,1,st,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Vt.deltaDecorations([],xt)}const Ee=lt.onDidChangeModelContent(xt=>{let st=lt.getPosition();if(st){let pe=st.lineNumber;clearTimeout(kr.current),kr.current=setTimeout(()=>{Ft(Vt.getLineContent(pe),pe)?Re(pe):Wt(pe)?(Re(pe),Pe(pe)):jn()},100)}}),me=lt.onMouseDown(xt=>{var st,pe,qt;if(xt.target.detail&&((qt=(pe=(st=xt.target)==null?void 0:st.element)==null?void 0:pe.className)!=null&&qt.includes("line-numbers"))){let Dt=xt.target.position.lineNumber;if(Ft(Vt.getLineContent(Dt),Dt))return;Wt(Dt)?Re(Dt):Pe(Dt)}}),ye=xt=>{let st={range:new nt.Range(xt,1,xt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ar.current=lt.deltaDecorations(ar.current,[st])},rt=()=>{ar.current=lt.deltaDecorations(ar.current,[])},Zt=lt.onMouseMove(xt=>{var st,pe,qt;if(rt(),xt.target.detail&&((qt=(pe=(st=xt.target)==null?void 0:st.element)==null?void 0:pe.className)!=null&&qt.includes("line-numbers"))){let Dt=xt.target.position.lineNumber;if(Ft(Vt.getLineContent(Dt),Dt))return;ye(Dt)}}),$t=lt.onMouseLeave(()=>{rt()});return()=>{Ee.dispose(),me.dispose(),Zt.dispose(),$t.dispose()}}},[yn.current,bn,Bt,ft,wn,ee]),(0,z.useEffect)(()=>{var Mt;(Mt=yn.current)!=null&&Mt.instance&&wn&&yn.current.instance.setPosition({lineNumber:0,column:0})},[ft]);function zt(){let Mt=yn.current.instance;if(Mt){const lt=Mt.getSelection(),Vt=yn.current.pastePos||{},En=new nt.Range(Vt.startLineNumber||lt.endLineNumber,Vt.startColumn||lt.endColumn,Vt.endLineNumber||lt.endLineNumber,Vt.endColumn||lt.endColumn);setTimeout(()=>{Mt.executeEdits("",[{range:En,text:""}])},300)}}function gt(Mt){(window.navigator.platform.match("Mac")?Mt.metaKey:Mt.ctrlKey)&&Mt.keyCode==83&&(Mt.preventDefault(),vt())}const Ct=()=>{if(bt&&yn.current.instance){const Mt=yn.current.instance.getContentHeight();Bn(Mt<ae?ae:Mt)}else Bn(ae)};function en(Mt){var lt=document.createEvent("MouseEvents");lt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Mt.dispatchEvent(lt)}const pn=Mt=>{if(!mr.current)return;const{keyCode:lt,ctrlKey:Vt,metaKey:En,target:jn,type:Pe}=Mt;return(Pe==="paste"||(lt===67||lt===86)&&(En||Vt))&&jn.nodeName==="TEXTAREA"&&(Gn(),Mt.preventDefault()),!1};function cn(Mt,lt){var Vt=window.URL||window.webkitURL||window,En=new Blob([lt]),jn=document.createElementNS("http://www.w3.org/1999/xhtml","a");jn.href=Vt.createObjectURL(En),jn.download=Mt,en(jn)}(0,z.useEffect)(()=>{Ct()},[Ct]),(0,z.useEffect)(()=>{Xn.current&&!bn&&Promise.all([ce.e(8909),ce.e(5028)]).then(ce.bind(ce,71448)).then(Mt=>{try{nt=Mt,yn.current.instance=nt.editor.create(Xn.current,{value:ne,language:at(ee),theme:Se,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Jt||!1}},re);const lt=yn.current.instance;let jn=[...Ze.BH._menuItems].find(Ee=>Ee[0]._debugName=="EditorContext")[1],Pe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Re=(Ee,me)=>{var ye,rt;let Zt=Ee._first;do me.includes((rt=(ye=Zt.element)==null?void 0:ye.command)==null?void 0:rt.id)&&Ee._remove(Zt);while(Zt=Zt.next)};if(jt(lt,nt),setTimeout(()=>{Ct(),yn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{cn(Sn||"educoder.txt",lt.getValue())}})},500),yn.current.subscription=lt.onDidChangeModelContent(Ee=>{Hr.current?clearTimeout(Or.current):(Ct(),Gt(lt.getValue(),Ee)),Or.current=setTimeout(()=>{Hr.current=!1},500)}),window.Monaco||Le(nt,at(ee)),St&&(Re(jn,Pe),Xn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",pn),window.removeEventListener("paste",pn),window.addEventListener("keydown",pn),window.addEventListener("paste",pn)),window.Monaco=nt,et&<.onDidBlurEditorWidget(()=>{et(lt.getValue())}),rn&<.onDidFocusEditorText(()=>{St&&Tt(),rn(lt.getValue())}),St){Tt();try{lt.onDidPaste(Ee=>{const me=lt.getSelection(),ye=yn.current.pastePos||{},rt=new nt.Range(ye.startLineNumber||me.endLineNumber,ye.startColumn||me.endColumn,ye.endLineNumber||me.endLineNumber,ye.endColumn||me.endColumn);lt.executeEdits("",[{range:Ee.range,text:""}])})}catch(Ee){}}let Wt=pr();return Ut&&typeof Ut=="string"&&new ze(Ut,lt,nt),lr(!0),()=>{const Ee=yn.current.instance;Ee.dispose();const me=Ee.getModel();me&&me.dispose(),yn.current.subscription&&yn.current.subscription.dispose(),Wt.unobserve(Xn.current)}}catch(lt){}})},[]),(0,z.useEffect)(()=>{if(yn.current.instance&&bn)return document.addEventListener("keydown",gt,!1),()=>{document.removeEventListener("keydown",gt)}},[vt,bn]),(0,z.useEffect)(()=>{let Mt=yn.current.instance;if(Mt&&bn){let lt=at(ee);nt.editor.setModelLanguage(Mt.getModel(),lt)}},[ee,bn]),(0,z.useEffect)(()=>{yn.current.instance&&bn&&nt.editor.setTheme(Se)},[Se,bn]),(0,z.useEffect)(()=>{let Mt=yn.current.instance;On.current=se,Mt&&bn&&(Mt.updateOptions(Rt({},se)),setTimeout(()=>{Mt.getModel().updateOptions(Rt({},se))},200))},[JSON.stringify(se),bn]),(0,z.useEffect)(()=>{let Mt=yn.current.instance;Mt&&bn&&Mt.layout()},[mt,ae,bn]);const[Nn,Vn]=(0,z.useState)(qe(mt)),[Hn,Bn]=(0,z.useState)(qe(ae)),Rn=wt(Rt({},oe),{width:Nn,height:Hn,position:"relative"});return z.createElement("div",{className:"my-monaco-editor",ref:Xn,style:Rn},Lt&&z.createElement(je.CopyToClipboard,{text:ne,onCopy:()=>Xe.ZP.success("\u590D\u5236\u6210\u529F")},z.createElement(_e.Z,{title:"\u590D\u5236\u4EE3\u7801"},z.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},z.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function At({width:Ie="100%",height:pt="100%",original:mt,modified:ae,language:ne,options:ee={}}){const oe=(0,z.useRef)(),[se,re]=(0,z.useState)(null);function Se(bt){let St;return oe.current&&(St=new Ye.Z(Gt=>{for(let jt of Gt)(jt.target.offsetHeight>0||jt.target.offsetWidth>0)&&bt.layout()}),St.observe(oe.current)),St}(0,z.useEffect)(()=>(oe.current&&Promise.all([ce.e(8909),ce.e(9404)]).then(ce.bind(ce,2550)).then(bt=>{nt=bt;const St=nt.editor.createDiffEditor(oe.current,wt(Rt({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},ee),{wordWrap:!0}));re(St);let Gt=Se(St);return()=>{St.dispose();const jt=St.getModel();jt&&jt.dispose(),Gt.unobserve(oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,z.useEffect)(()=>{se&&se.setModel({original:nt.editor.createModel(mt,ne),modified:nt.editor.createModel(ae,ne)})},[mt,ae,ne,se]);const et=qe(Ie),Lt=qe(pt),vt={width:et,height:Lt};return z.createElement("div",{className:"my-diff-editor",ref:oe,style:vt})}},929:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return be}});var z={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT"},Ye=ce(29787),Oe=ce(25399),Ve=ce(60242),xe=ce(92310),we=ce.n(xe),He=ce(49661),We=ce(57884),Be=ce(34055),he=ce(59301),be=({className:Ue,dataSource:Le=[],col:ge=4,right:Ce,bottom:De=23,precision:Ke=0,wrapWidth:it=1200,trackEventItems:tt,loading:ze,onRemove:Ze=()=>{},isCurrent:Xe=!0,showProgress:_e=!1,showAlias:Ot=!1})=>{const Qe=Math.floor((it-(ge-1)*Ce)/ge),je=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return he.createElement(Ye.Z,{spinning:ze},he.createElement("div",{className:we()(z.list,Ue)},!!(Le!=null&&Le.length)&&(Le==null?void 0:Le.map((ct,Me)=>{var Ge,ke,Te,ht,dt,Rt;const{name:wt,id:ve,identifier:de,featured:qe,school_name:kt,image_url:yt,excellent:Ne,is_plan:at}=ct;return he.createElement("div",{key:ve,className:Xe&&_e?z.wrapisCurrent:z.wrap,style:{width:Qe,marginRight:(1+Me)%ge===0?0:Ce+Ke,marginBottom:De}},he.createElement("a",{className:z.li,onClick:nt=>{nt.preventDefault(),nt.stopPropagation(),tt&&(0,He.L9)([tt]),(0,He.xg)(`/paths/${de}`)}},he.createElement("div",{className:z.img},he.createElement("img",{className:z.cover,src:`${yt}`}),Xe&&(0,Be.bg)()&&(ct==null?void 0:ct.studying)&&he.createElement("div",{className:`${z.movebq} user-path-items`,onClick:nt=>{nt.stopPropagation(),Ze(ct)}},he.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),he.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ge=ct==null?void 0:ct.subject_tags)==null?void 0:Ge.map((nt,Tt)=>{var ut,At;if(Tt===0){const pt=(ut=je.find(mt=>mt.name==nt))==null?void 0:ut.swimg;return he.createElement("img",{className:z.sign,src:pt,style:{left:"-4px"}})}const Ie=(At=je.find(pt=>pt.name==nt))==null?void 0:At.ptimg;return he.createElement("img",{className:z.sign,src:Ie,style:{left:`${48+52*(Tt-1)+2*Tt}px`}})}),he.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(ct==null?void 0:ct.excellent)&&he.createElement("div",{className:z.bq},"\u5F00\u653E\u8BFE\u7A0B"))),he.createElement("div",{className:z.name},he.createElement(Oe.Z,{title:Ot&&(ct!=null&&ct.excellent_alias_name)?he.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${wt}`,he.createElement("br",null),he.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${ct==null?void 0:ct.excellent_alias_name}`)):wt},he.createElement("span",{className:z.e},Ot&&(ct==null?void 0:ct.excellent_alias_name)||wt))),Xe&&_e&&((ke=ct==null?void 0:ct.progress)==null?void 0:ke.all_score)!=0&&he.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},he.createElement(Ve.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((Te=ct==null?void 0:ct.progress)==null?void 0:Te.my_score)/((ht=ct==null?void 0:ct.progress)==null?void 0:ht.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(dt=ct==null?void 0:ct.progress)==null?void 0:dt.my_score,"/",(Rt=ct==null?void 0:ct.progress)==null?void 0:Rt.all_score),(!Xe||!_e)&&he.createElement(Oe.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${kt}`},he.createElement("div",{className:z.unit},he.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),kt)),(!Xe||!_e)&&he.createElement("div",{className:z.tags},he.createElement("div",null,he.createElement(Oe.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),he.createElement("span",null,ct.stages_count))),he.createElement(Oe.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),he.createElement("span",null,ct.members_count)))))))})),!Le.length&&he.createElement(We.Z,null)))}},71360:function(_t,Pt,ce){"use strict";ce.d(Pt,{jL:function(){return xe},w9:function(){return qe},QD:function(){return Yt},cQ:function(){return dt.Z},op:function(){return Gt},O5:function(){return wr},_b:function(){return gn},t7:function(){return Ke},Gi:function(){return Tt},YG:function(){return at},qp:function(){return $e},vr:function(){return wn},qE:function(){return on},Je:function(){return ze},wb:function(){return ht},cq:function(){return ae},tp:function(){return Le}});var z=ce(59301),Ye={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aP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WTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",xe=({dataSource:Ft=[],img:zt,imgWidth:gt=346,title:Ct,sunTitle:en,bannerExtraContent:pn})=>z.createElement("div",{className:Ye.banner},z.createElement("div",{className:Ye.content},z.createElement("aside",null,z.createElement("p",null,z.createElement("b",null,Ct),z.createElement("span",null,en)),Ft.length>0&&z.createElement("div",{className:Ye.btns},Ft.map((cn,Nn)=>z.createElement("div",{key:Nn,onClick:cn.click},cn.name,cn.sign?z.createElement("img",{src:Oe,width:39}):null))),pn),zt&&z.createElement("img",{style:{marginTop:33,marginRight:38},src:zt,width:gt}))),we={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},He=ce(92310),We=ce.n(He),Be=ce(89392),$e=({dataSource:Ft=[],value:zt,onChange:gt,onTitleChange:Ct,className:en,title:pn,titleWidth:cn=41,style:Nn={},fontColor:Vn="#6A7283",showCount:Hn})=>{const[Bn,Rn]=(0,z.useState)(0),[Mt,lt]=(0,z.useState)(!1),Vt=(0,z.useRef)(null),En=(0,z.useRef)(null);return(0,z.useEffect)(()=>{var jn;Ft.length!==0&&(((jn=Vt==null?void 0:Vt.current)==null?void 0:jn.clientHeight)>97?Rn(1):Rn(0)),Ft.length===0&&Rn(0),lt(!1)},[Ft]),z.createElement("div",{className:We()(we.row,en),style:Nn},z.createElement("div",{onClick:(0,Be.throttle)(()=>Ct==null?void 0:Ct(),2e3),style:{width:cn,marginTop:Mt?12:4},className:`${we.title} ${Ct?"current":""}`},pn),z.createElement("div",{className:Mt?`${we.tagsWrap} ${we.tagsBorderWrap}`:we.tagsWrap},z.createElement("div",{className:we.bar,ref:En,style:Bn>0?{height:Bn===1?97:"auto",overflow:Bn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},z.createElement("div",{className:we.tag,ref:Vt},Ft==null?void 0:Ft.map(jn=>z.createElement("span",{onClick:()=>gt(jn.id),key:jn.id,style:{color:Vn},className:zt===jn.id?we.active:""},z.createElement("span",{title:jn.name,className:we.name},jn.name),!!Hn&&z.createElement("span",{className:we.num},jn.count))))),!!Bn&&z.createElement(z.Fragment,null,Bn===1?z.createElement("div",{onClick:()=>{var jn;Rn(2),((jn=Vt==null?void 0:Vt.current)==null?void 0:jn.clientHeight)>245?lt(!0):lt(!1)},className:we.action},"\u5C55\u5F00",z.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):z.createElement("div",{onClick:()=>{En.current.scrollTop=0,Rn(1),lt(!1)},className:we.action},"\u6536\u8D77",z.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},be={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Le=({dataSource:Ft=[],value:zt,onChange:gt,className:Ct,style:en={}})=>z.createElement("div",{style:en,className:We()(be.tabs,Ct)},Ft.map(pn=>z.createElement("span",{onClick:()=>gt(pn.id),className:zt===pn.id?be.active:"",key:pn.id},pn.name))),ge={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},Ce=ce(37568),Ke=({dataSource:Ft=[],value:zt="",onChange:gt,onInputChange:Ct=()=>{},className:en,style:pn={},placeholder:cn,allowClear:Nn=!1})=>{var Vn;const[Hn,Bn]=(0,z.useState)(""),[Rn,Mt]=(0,z.useState)("");(0,z.useEffect)(()=>{var En;let jn=zt;(En=JSON.stringify(zt))!=null&&En.includes("{")&&(Bn(zt.id),jn=zt.value||"");try{Mt(decodeURIComponent(jn||""))}catch(Pe){Mt(decodeURIComponent(jn||""))}},[zt]);const lt=()=>{gt(encodeURIComponent(Rn),Hn||null)},Vt=En=>{En!==Hn&&(Bn(En),gt(encodeURIComponent(Rn),En))};return z.createElement("div",{className:We()(ge.input,en),style:pn},!!Ft.length&&z.createElement("div",{className:ge.dropdown},z.createElement("div",{className:ge.text},(Vn=Ft.find(En=>En.id===Hn))==null?void 0:Vn.name,z.createElement("i",{className:"iconfont icon-zhankai4"}),z.createElement("b",{className:ge.b1}),z.createElement("b",{className:ge.b2})),z.createElement("div",{className:ge.menu},Ft.map((En,jn)=>z.createElement("div",{key:jn,onClick:()=>Vt(En.id)},En.name)))),z.createElement(Ce.default,{onPressEnter:lt,value:Rn,onChange:En=>{Mt(En.target.value),Ct(encodeURIComponent(En.target.value),Hn||null)},placeholder:cn,variant:"borderless",allowClear:Nn,onClear:()=>gt("",Hn||null)}),z.createElement("i",{onClick:lt,className:"iconfont icon-sousuo9 font14 current"}))},it={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},ze=({value:Ft,onChange:zt,className:gt,total:Ct,pageSize:en,style:pn={}})=>{const cn=Ft<2,Nn=Ft>=Math.ceil(Ct/en);return Ct<=en?z.createElement(z.Fragment,null):z.createElement("div",{className:We()(it.quickPager,gt),style:pn},z.createElement("div",{onClick:()=>{cn||zt(Ft-1,"prev")},className:cn?it.disabled:""},"\u4E0A\u4E00\u9875"),z.createElement("div",{onClick:()=>{Nn||zt(Ft+1,"next")},className:Nn?it.disabled:""},"\u4E0B\u4E00\u9875"))},Ze={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Xe=ce(29787),_e=ce(25399),Ot=ce(58018),Qe=ce(90524),je=ce(49661),ct=ce(96908),Me=ce(57177),Ge=ce(81378),ke=ce(57884),ht=({className:Ft,dataSource:zt=[],col:gt=4,right:Ct,bottom:en=23,precision:pn=0,wrapWidth:cn=1200,trackEventItems:Nn,loading:Vn})=>{const Hn=Math.floor((cn-(gt-1)*Ct)/gt);return z.createElement(Xe.Z,{spinning:Vn},z.createElement("div",{className:We()(Ze.list,Ft)},!!zt.length&&zt.map((Bn,Rn)=>{const{name:Mt,id:lt,identifier:Vt,power:En,cover_image_id:jn,pic:Pe}=Bn;return z.createElement("div",{className:Ze.wrap,key:lt,style:{width:Hn,marginRight:(1+Rn)%gt===0?0:Ct+pn,marginBottom:en}},z.createElement("a",{target:"_blank",href:`/shixuns/${Vt}/challenges`,className:Ze.li,onClick:Re=>{Re.preventDefault(),Nn&&(0,je.L9)([Nn]),En&&(0,je.xg)(`/shixuns/${Vt}/challenges`)}},z.createElement("div",{className:Ze.img},z.createElement("img",{className:Ze.cover,src:`${Pe}`}),Bn.is_jupyter&&z.createElement("img",{className:Ze.sign,src:ct}),Bn.is_jupyter_lab&&z.createElement("img",{className:Ze.sign,src:Me}),Bn.is_unity_3d&&z.createElement("img",{className:Ze.sign,src:Ge})),z.createElement("div",{className:Ze.name},z.createElement(_e.Z,{title:Mt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},z.createElement("span",{className:Ze.e},Mt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),z.createElement("div",{className:Ze.tags},z.createElement(_e.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},z.createElement("span",null,z.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),z.createElement("span",null,Bn.challenges_count))),!!Bn.myshixuns_count&&z.createElement(_e.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},z.createElement("span",null,z.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),z.createElement("span",null,Bn.myshixuns_count))),z.createElement(_e.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},z.createElement("span",null,z.createElement("span",null,Bn.level))),z.createElement("div",{className:Ze.rate},z.createElement(Ot.Z,{allowHalf:!0,disabled:!0,defaultValue:Bn.score_info}),z.createElement("span",null,"\xA0",Bn.score_info?`${Bn.score_info}\u5206`:"5\u5206")))),!En&&z.createElement("div",{className:Ze.lockWrap},z.createElement("img",{src:`${Qe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),z.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!zt.length&&z.createElement(ke.Z,null)))},dt=ce(929),Rt={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+y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6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",ve=ce(59301),qe=({className:Ft,dataSource:zt=[],col:gt=4,right:Ct,bottom:en=23,precision:pn=0,wrapWidth:cn=1200,trackEventItems:Nn,loading:Vn,handleVery:Hn=()=>!0})=>{const Bn=Math.floor((cn-(gt-1)*Ct)/gt);return ve.createElement(Xe.Z,{spinning:Vn},ve.createElement("div",{className:We()(Rt.list,Ft)},!!zt.length&&zt.map((Rn,Mt)=>{const{subject_identifier:lt,id:Vt,identifier:En,power:jn}=Rn,Pe=Rn.is_public!=0&&Rn.is_public;return ve.createElement("div",{className:Rt.wrap,key:Vt,style:{width:Bn,marginRight:(1+Mt)%gt===0?0:Ct+pn,marginBottom:en}},ve.createElement("a",{className:Rt.li,onClick:Re=>{Re.preventDefault(),Hn(Rn==null?void 0:Rn.first_category_url)&&(Nn&&(0,je.L9)([Nn]),(0,je.xg)(Rn.first_category_url))}},ve.createElement("div",{className:Rt.top},ve.createElement(_e.Z,{title:Rn.name},ve.createElement("div",{className:Rt.name},Rn.name)),ve.createElement("img",{className:Rt.img,src:Qe.Z.IMG_SERVER+"/images/"+Rn.avatar_url}),ve.createElement("div",{className:Rt.text,title:Rn.creator},Rn.creator),lt&&ve.createElement("div",{className:Rt.btns},ve.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ve.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Pe&&ve.createElement("div",{className:Rt.sign},"\u516C\u5F00")),ve.createElement("div",{className:Rt.bottom},Rn.visits>0&&ve.createElement(_e.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ve.createElement("span",null,ve.createElement("i",{className:"iconfont icon-liulanyan"}),ve.createElement("span",null,Rn.visits))),Rn.course_members_count>0&&ve.createElement(_e.Z,{title:"\u6210\u5458",placement:"bottom"},ve.createElement("span",null,ve.createElement("i",{className:"iconfont icon-chengyuan"}),Rn.course_members_count)),Rn.tasks_count>0&&ve.createElement(_e.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ve.createElement("span",null,ve.createElement("i",{className:"iconfont icon-zuoye"}),Rn.tasks_count)),Rn.is_end?ve.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ve.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Rn.is_accessible&&ve.createElement("div",{className:Rt.lockWrap},ve.createElement("img",{src:`${Qe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ve.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!zt.length&&ve.createElement(ke.Z,null)))},kt={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},yt=ce(76560),at=({dataSource:Ft=[],value:zt,onChange:gt,className:Ct,style:en={},tabBarExtraContent:pn})=>z.createElement("div",{className:We()(kt.tabs,Ct),style:en},z.createElement("div",{className:kt.tabsWrap},Ft.map((cn,Nn)=>!(cn!=null&&cn.hide)&&z.createElement("aside",{className:kt.tab,onClick:()=>{gt(cn.id),cn.link&&yt.history.push(cn.link)},key:Nn},z.createElement("div",{className:zt===cn.id?kt.active:""},cn.name),(cn==null?void 0:cn.resetCount)==null&&(cn==null?void 0:cn.total)!==void 0&&z.createElement("span",null,"\uFF08",cn==null?void 0:cn.total,"\uFF09"),(cn==null?void 0:cn.resetCount)!==void 0&&(cn==null?void 0:cn.total)!==void 0&&z.createElement(_e.Z,{title:(cn==null?void 0:cn.tip)!=null?cn==null?void 0:cn.tip:""},z.createElement("span",{style:{color:"#9096A3"}},"\uFF08",z.createElement("span",{style:{color:"#000"}},cn==null?void 0:cn.resetCount),"/",z.createElement("span",null,cn==null?void 0:cn.total),"\uFF09"))))),z.createElement("div",{className:kt.tabBar},pn)),Tt=({className:Ft,style:zt={},children:gt})=>z.createElement("div",{className:We()(Ft),style:zt},gt),ut={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},At=ce(75727),Ie=ce(93041);const pt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ae=({sortValue:Ft,dropValue:zt,className:gt,onSort:Ct,onDrop:en,dataSource:pn=pt})=>{var cn;return z.createElement("div",{className:We()(ut.orderWrap,gt)},z.createElement(At.Z,{dropdownRender:()=>z.createElement(Ie.default,null,pn.map((Nn,Vn)=>z.createElement(Ie.default.Item,{key:Vn,onClick:()=>en(Nn.id)},Nn.name)))},z.createElement("span",{className:ut.orderTextWrap},(cn=pn.find(Nn=>zt===Nn.id))==null?void 0:cn.name)),z.createElement("span",{className:ut.orderIconWrap},z.createElement("span",{className:ut.orderAsc},z.createElement("i",{className:Ft==="asc"?`iconfont icon-sanjiaoxing-up font12 ${ut.cursorPointer} ${ut.active}`:`iconfont icon-sanjiaoxing-up font12 ${ut.cursorPointer}`,onClick:()=>Ct(Ft==="asc"?"desc":"asc")})),z.createElement("span",{className:ut.orderDesc},z.createElement("i",{className:Ft==="desc"?`iconfont icon-sanjiaoxing-down font12 ${ut.cursorPointer} ${ut.active}`:`iconfont icon-sanjiaoxing-down font12 ${ut.cursorPointer}`,onClick:()=>Ct(Ft==="asc"?"desc":"asc")}))))},ne={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},ee=ce(99571),oe=Object.defineProperty,se=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,et=(Ft,zt,gt)=>zt in Ft?oe(Ft,zt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Ft[zt]=gt,Lt=(Ft,zt)=>{for(var gt in zt||(zt={}))re.call(zt,gt)&&et(Ft,gt,zt[gt]);if(se)for(var gt of se(zt))Se.call(zt,gt)&&et(Ft,gt,zt[gt]);return Ft},vt=(Ft,zt)=>{var gt={};for(var Ct in Ft)re.call(Ft,Ct)&&zt.indexOf(Ct)<0&&(gt[Ct]=Ft[Ct]);if(Ft!=null&&se)for(var Ct of se(Ft))zt.indexOf(Ct)<0&&Se.call(Ft,Ct)&&(gt[Ct]=Ft[Ct]);return gt},bt=(Ft,zt,gt)=>new Promise((Ct,en)=>{var pn=Vn=>{try{Nn(gt.next(Vn))}catch(Hn){en(Hn)}},cn=Vn=>{try{Nn(gt.throw(Vn))}catch(Hn){en(Hn)}},Nn=Vn=>Vn.done?Ct(Vn.value):Promise.resolve(Vn.value).then(pn,cn);Nn((gt=gt.apply(Ft,zt)).next())}),Gt=Ft=>{var zt=Ft,{className:gt,style:Ct,children:en,loading:pn=!1,openLoading:cn,onClick:Nn=()=>{},size:Vn="middle",shape:Hn="round"}=zt,Bn=vt(zt,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Rn,Mt]=(0,z.useState)(!1);return z.createElement(ee.ZP,Lt({onClick:(0,Be.throttle)(lt=>bt(void 0,null,function*(){cn&&Mt(!0);try{yield Nn(lt)}catch(Vt){console.log("error",Vt)}cn&&Mt(!1)}),2e3,{leading:!0,trailing:!1}),className:We()(ne.btn,ne[`${Vn}-${Hn}`],gt),style:Ct,size:Vn,shape:Hn,loading:Rn||pn},Bn),en)},jt={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},on=({className:Ft,style:zt,children:gt=null,onClick:Ct,title:en})=>z.createElement("div",{className:We()(jt.head,Ft),style:zt},z.createElement("span",{className:"primary-hover",onClick:Ct},z.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),z.createElement("b",{title:en},en),z.createElement("div",{className:jt.node},gt)),Bt={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Yt=({confirmShow:Ft=!0,confirmTitle:zt,confirmClick:gt,cancelShow:Ct=!0,cancelTitle:en,cancelClick:pn,className:cn,style:Nn,confirmLoading:Vn=!1})=>z.createElement("div",{className:We()(Bt.btns,cn),style:Nn},Ft&&z.createElement(ee.ZP,{loading:Vn,onClick:gt,type:"primary",className:Bt.confirm},zt),Ct&&z.createElement(ee.ZP,{onClick:pn,className:Bt.cancel},en)),sn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},wn=({className:Ft,style:zt={},LeftContent:gt,children:Ct,RightContent:en})=>z.createElement("div",{className:We()(sn.fixedBottom,Ft),style:zt},z.createElement("div",{className:sn.wrap},z.createElement("div",{className:sn.left},gt),z.createElement("div",{className:sn.center},Ct),z.createElement("div",{className:sn.right},en))),Ut={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},gn=({className:Ft,style:zt={},dataSource:gt=[]})=>z.createElement("div",{className:We()(Ut.crumbs,Ft),style:zt},gt.map((Ct,en)=>en<gt.length-1?z.createElement(z.Fragment,{key:en},Ct.path||Ct.onClick?z.createElement("span",{className:Ut.hover,onClick:Ct!=null&&Ct.onClick?Ct.onClick:()=>yt.history.push(Ct.path)},Ct.name):z.createElement("span",null,Ct.name),z.createElement("span",null,"\xA0",">","\xA0")):z.createElement("span",{key:en,style:{color:"#5F6368"}},Ct.name))),Xn=ce(11938),yn=Object.defineProperty,On=Object.defineProperties,Cr=Object.getOwnPropertyDescriptors,ar=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,kr=(Ft,zt,gt)=>zt in Ft?yn(Ft,zt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Ft[zt]=gt,mr=(Ft,zt)=>{for(var gt in zt||(zt={}))Hr.call(zt,gt)&&kr(Ft,gt,zt[gt]);if(ar)for(var gt of ar(zt))Or.call(zt,gt)&&kr(Ft,gt,zt[gt]);return Ft},bn=(Ft,zt)=>On(Ft,Cr(zt)),lr=(Ft,zt)=>{var gt={};for(var Ct in Ft)Hr.call(Ft,Ct)&&zt.indexOf(Ct)<0&&(gt[Ct]=Ft[Ct]);if(Ft!=null&&ar)for(var Ct of ar(Ft))zt.indexOf(Ct)<0&&Or.call(Ft,Ct)&&(gt[Ct]=Ft[Ct]);return gt};const{Countdown:pr}=Xn.default;var wr=Ft=>{var zt=Ft,{onChange:gt}=zt,Ct=lr(zt,["onChange"]);const[en,pn]=(0,z.useState)(null);(0,z.useEffect)(()=>{typeof en=="number"&&en>=0&>(en)},[en]);const cn=Nn=>{const Vn=Math.floor(Nn/1e3);pn(Vn)};return z.createElement(pr,bn(mr({},Ct),{onChange:cn}))}},17904:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return Ye}});var z=ce(59301);function Ye(Oe,Ve){const xe=(0,z.useRef)();(0,z.useEffect)(()=>{xe.current=Oe}),(0,z.useEffect)(()=>{function we(){xe.current()}if(Ve!==null){let He=setInterval(we,Ve);return()=>clearInterval(He)}},[Ve])}},81279:function(_t,Pt,ce){"use strict";ce.r(Pt),ce.d(Pt,{default:function(){return Wt}});var z=ce(59301),Ye=ce(76560),Oe=ce(93041),Ve=ce(24404),xe=ce(28284),we=ce(6767),He=ce(37285),We=ce(91882),Be=ce(77019),he=ce(5269),$e=ce(62957),be=ce(20554),Ue=ce(37568),Le=ce(99571),ge=ce(79763),Ce=ce(63423),De=ce(57884),Ke=ce(25399),it=ce(62673),tt=ce(71051),ze=ce(72664),Ze=ce(2978),Xe=ce(38394),_e={flex_box_center:"flex_box_center___p1qG1",flex_space_between:"flex_space_between___EHoRl",flex_box_vertical_center:"flex_box_vertical_center___c0u2d",flex_box_center_end:"flex_box_center_end___ueiDD",flex_box_column:"flex_box_column___tyRHS",wrap:"wrap___ce8sS",modal:"modal___yzD47",titleWrap:"titleWrap___OBPcs",required:"required___ncxFF",title:"title___cxIaz",colorGray:"colorGray___NXXsn",choiceWrap:"choiceWrap___AhJbr",answer:"answer____f42Z",activeAnswer:"activeAnswer___BqxNg",deleteIcon:"deleteIcon___iHXv4",addIcon:"addIcon___Kb1l4",editorWrap:"editorWrap___UmeId",htmlWrap:"htmlWrap____EtjV",radio:"radio___zqqhF",color333:"color333___PUxW5",color999:"color999___Uiwst",questionType:"questionType___GcJoU",questionChoices:"questionChoices___WgikS"},Ot=Object.defineProperty,Qe=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Me=(Ee,me,ye)=>me in Ee?Ot(Ee,me,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[me]=ye,Ge=(Ee,me)=>{for(var ye in me||(me={}))je.call(me,ye)&&Me(Ee,ye,me[ye]);if(Qe)for(var ye of Qe(me))ct.call(me,ye)&&Me(Ee,ye,me[ye]);return Ee},ke=(Ee,me)=>{var ye={};for(var rt in Ee)je.call(Ee,rt)&&me.indexOf(rt)<0&&(ye[rt]=Ee[rt]);if(Ee!=null&&Qe)for(var rt of Qe(Ee))me.indexOf(rt)<0&&ct.call(Ee,rt)&&(ye[rt]=Ee[rt]);return ye},Te=(Ee,me,ye)=>new Promise((rt,Zt)=>{var $t=pe=>{try{st(ye.next(pe))}catch(qt){Zt(qt)}},xt=pe=>{try{st(ye.throw(pe))}catch(qt){Zt(qt)}},st=pe=>pe.done?rt(pe.value):Promise.resolve(pe.value).then($t,xt);st((ye=ye.apply(Ee,me)).next())});const ht=["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"],dt=(Ee,me)=>{var ye=Ee,{problemset:rt,globalSetting:Zt,loading:$t,dispatch:xt,onRef:st=()=>{},editData:pe}=ye,qt=ke(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Dt,an]=(0,z.useState)([]),[dn,Cn]=(0,z.useState)(),[hn,er]=(0,z.useState)([]),[Dn,Ln]=(0,z.useState)(""),[Qn,Fn]=(0,z.useState)(5),[tr,fr]=(0,z.useState)(!1),nr=(0,Ye.useParams)();(0,z.useEffect)(()=>{an(["","","",""])},[]),(0,z.useEffect)(()=>{if(!(pe!=null&&pe.question_choices)){fr(!0);return}Ln(pe==null?void 0:pe.question_title),Fn(parseInt(pe==null?void 0:pe.question_score)),an(pe==null?void 0:pe.question_choices.map(Kt=>Kt.choice_text));const xn=[];pe==null||pe.standard_answer.map((Kt,Pn)=>{xn.push(Kt-1)}),er(xn)},[pe]),(0,z.useImperativeHandle)(me,()=>({onSave:Jn,isEdit:tr}));const Jn=()=>Te(void 0,null,function*(){if(!Dn)return we.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const xn=Dt.findIndex(_n=>!_n);if(xn>-1)return we.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${ht[xn]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!hn.length)return we.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(hn.length<1)return we.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const Kt=Dt.map((_n,gr)=>({choice_text:_n,is_answer:hn.includes(gr)?gr+1:0}));let Pn;pe.question_id?Pn=yield xt({type:"exercise/editExerciseQuestion",payload:{id:pe.question_id,question_title:Dn,question_type:1,question_score:"5.0",question_choices:Kt.map(_n=>_n.choice_text),standard_answers:Kt.filter(_n=>_n.is_answer).map(_n=>_n.is_answer)}}):Pn=yield xt({type:"exercise/addExerciseQuestion",payload:{categoryId:nr.categoryId,question_title:Dn,question_type:1,question_score:"5.0",question_choices:Kt.map(_n=>_n.choice_text),standard_answers:Kt.filter(_n=>_n.is_answer).map(_n=>_n.is_answer)}}),Pn.status===0&&(we.ZP.success("\u4FDD\u5B58\u6210\u529F"),fr(!1),xt({type:"exercise/editExercise",payload:Ge({},nr)}))}),Wn=[{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=xn=>Te(void 0,null,function*(){switch(xn.id){case"del":let Kt;$e.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Te(this,null,function*(){yield(0,ze.Fl)({id:pe.question_id}),xt({type:"exercise/editExercise",payload:Ge({},nr)})})}});break;case"up":case"down":yield xt({type:"exercise/exeriseMoveUpDown",payload:{id:pe.question_id,opr:xn.id}}),xt({type:"exercise/editExercise",payload:Ge({},nr)});break;case"edit":fr(!0);break}}),un=()=>{var xn;return z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.createElement("span",{className:"font16 c-blue"},pe.key,"\u3001\u591A\u9009\u9898"),"\uFF08",pe.question_score,"\u5206\uFF09"),!pe.hideAction&&Wn.map(function(Kt,Pn){return Kt.id==="up"&&pe.key===1||Kt.id==="down"&&pe.key===pe.len?null:z.createElement(Ke.Z,{key:Pn,placement:"bottom",title:Kt.name},z.createElement("span",{onClick:()=>zn(Kt),className:Kt.icon}))})),z.createElement("div",{className:"mt5"},z.createElement(Xe.Z,{value:pe.question_title})),z.createElement("div",{className:_e.questionChoices},(xn=pe==null?void 0:pe.question_choices)==null?void 0:xn.map(function(Kt,Pn){return z.createElement(Be.Z,null,z.createElement(he.Z,null,z.createElement(it.default,{key:Pn,checked:pe.standard_answer.includes(Pn+1),disabled:!0},ht[Pn],".")),z.createElement(he.Z,{flex:"1"},z.createElement("span",{className:"c-black font14"},z.createElement(Xe.Z,{value:Kt.choice_text}))))})))},br=()=>z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.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")),z.createElement("p",{className:_e.titleWrap},z.createElement("span",{className:_e.required},"*"),z.createElement("span",{className:_e.title},"\u9898\u5E72\uFF1A")),z.createElement(Ze.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Dn,onChange:xn=>Ln(xn)}),z.createElement("p",{className:_e.titleWrap},z.createElement("span",{className:_e.required},"*"),z.createElement("span",{className:_e.title},"\u7B54\u6848\u9009\u9879\uFF1A",z.createElement("span",{className:_e.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Dt.map((xn,Kt)=>z.createElement("div",{className:_e.choiceWrap,key:Kt},z.createElement(Ke.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},z.createElement("div",{className:`${_e.answer} ${hn.includes(Kt)?_e.activeAnswer:""}`,onClick:()=>{hn.includes(Kt)?er(hn.filter(Pn=>Pn!==Kt)):er([...hn,Kt])}},ht[Kt])),z.createElement("div",{className:_e.editorWrap},dn===Kt?z.createElement(Ze.Z,{id:`single-question-option-${Kt}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:xn,onChange:Pn=>{Dt[Kt]=Pn,an(Dt)}}):z.createElement("div",{className:_e.htmlWrap,onClick:()=>Cn(Kt)},z.createElement(Xe.Z,{value:xn}))),Kt>1&&z.createElement(Ke.Z,{title:"\u5220\u9664"},z.createElement("i",{className:`${_e.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>an(Dt.filter((Pn,_n)=>_n!==Kt))})),Kt<7&&Kt===Dt.length-1&&z.createElement(Ke.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},z.createElement("i",{className:`${_e.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>an([...Dt,""])})))),z.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"),z.createElement("p",{className:""},"\u5206\u503C\uFF1A",z.createElement(tt.Z,{value:Qn,max:1e4,min:-1,onChange:xn=>{Fn(xn)}})," \u5206"),z.createElement("aside",{className:"tr"},pe.question_id&&z.createElement(Le.ZP,{type:"default",onClick:()=>fr(!1)},"\u53D6\u6D88"),z.createElement(Le.ZP,{className:"ml20",type:"primary",onClick:()=>Jn()},"\u4FDD\u5B58")));return z.createElement("section",{className:_e.wrap},!tr&&un(),tr&&br())};var Rt=(0,Ye.connect)(({problemset:Ee,loading:me,globalSetting:ye})=>({problemset:Ee,globalSetting:ye,loading:me.effects}),null,null,{forwardRef:!0})((0,z.forwardRef)(dt)),wt=ce(47889),ve=Object.defineProperty,de=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,yt=(Ee,me,ye)=>me in Ee?ve(Ee,me,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[me]=ye,Ne=(Ee,me)=>{for(var ye in me||(me={}))qe.call(me,ye)&&yt(Ee,ye,me[ye]);if(de)for(var ye of de(me))kt.call(me,ye)&&yt(Ee,ye,me[ye]);return Ee},at=(Ee,me)=>{var ye={};for(var rt in Ee)qe.call(Ee,rt)&&me.indexOf(rt)<0&&(ye[rt]=Ee[rt]);if(Ee!=null&&de)for(var rt of de(Ee))me.indexOf(rt)<0&&kt.call(Ee,rt)&&(ye[rt]=Ee[rt]);return ye},nt=(Ee,me,ye)=>new Promise((rt,Zt)=>{var $t=pe=>{try{st(ye.next(pe))}catch(qt){Zt(qt)}},xt=pe=>{try{st(ye.throw(pe))}catch(qt){Zt(qt)}},st=pe=>pe.done?rt(pe.value):Promise.resolve(pe.value).then($t,xt);st((ye=ye.apply(Ee,me)).next())});const Tt=["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"],ut=(Ee,me)=>{var ye=Ee,{problemset:rt,globalSetting:Zt,loading:$t,dispatch:xt,onRef:st=()=>{},editData:pe}=ye,qt=at(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Dt,an]=(0,z.useState)([]),[dn,Cn]=(0,z.useState)(),[hn,er]=(0,z.useState)([]),[Dn,Ln]=(0,z.useState)(""),[Qn,Fn]=(0,z.useState)(0),[tr,fr]=(0,z.useState)(!1),nr=(0,Ye.useParams)();(0,z.useEffect)(()=>{an(["","","",""])},[]),(0,z.useEffect)(()=>{if(!(pe!=null&&pe.question_choices)){fr(!0);return}Ln(pe==null?void 0:pe.question_title),Fn(parseInt(pe==null?void 0:pe.question_score)),an(pe==null?void 0:pe.question_choices.map(Kt=>Kt.choice_text));const xn=[];pe==null||pe.standard_answer.map((Kt,Pn)=>{xn.push(Kt-1)}),er(xn)},[pe]),(0,z.useImperativeHandle)(me,()=>({onSave:Jn,isEdit:tr}));const Jn=()=>nt(void 0,null,function*(){if(!Dn)return we.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const xn=Dt.findIndex(_n=>!_n);if(xn>-1)return we.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Tt[xn]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!hn.length)return we.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(hn.length<1)return we.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const Kt=Dt.map((_n,gr)=>({choice_text:_n,is_answer:hn.includes(gr)?gr+1:0}));let Pn;pe.question_id?Pn=yield(0,ge.Kc)({id:pe.question_id,question_title:Dn,question_type:1,question_score:Qn,question_choices:Kt.map(_n=>_n.choice_text),standard_answers:Kt.filter(_n=>_n.is_answer).map(_n=>_n.is_answer)}):Pn=yield(0,ge.iV)({exercise_bank_id:nr.topicId,question_title:Dn,question_type:1,question_score:"5.0",question_choices:Kt.map(_n=>_n.choice_text),standard_answers:Kt.filter(_n=>_n.is_answer).map(_n=>_n.is_answer)}),Pn.status===0&&(we.ZP.success("\u4FDD\u5B58\u6210\u529F"),fr(!1)),yield xt({type:"polls/getExerciseBanks",payload:Ne({},nr)})}),Wn=[{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=xn=>nt(void 0,null,function*(){switch(xn.id){case"del":let Kt;$e.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return nt(this,null,function*(){yield(0,ge.x$)({pollsId:pe.question_id}),xt({type:"polls/getExerciseBanks",payload:Ne({},nr)})})}});break;case"up":case"down":yield(0,ge.W)({exerciseId:pe==null?void 0:pe.question_id,opr:xn.id}),xt({type:"polls/getExerciseBanks",payload:Ne({},nr)});break;case"edit":fr(!0);break}}),un=()=>{var xn;return z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.createElement("span",{className:"font16 c-blue"},pe.key,"\u3001\u5355\u9009\u9898"),"\uFF08",pe.question_score,"\u5206\uFF09"),!pe.hideAction&&Wn.map(function(Kt,Pn){return Kt.id==="up"&&pe.key===1||Kt.id==="down"&&pe.key===pe.len?null:z.createElement(Ke.Z,{key:Pn,placement:"bottom",title:Kt.name},z.createElement("span",{onClick:()=>zn(Kt),className:Kt.icon}))})),z.createElement("div",{className:"mt5"},z.createElement(Xe.Z,{value:pe.question_title})),z.createElement("div",{className:_e.questionChoices},(xn=pe==null?void 0:pe.question_choices)==null?void 0:xn.map(function(Kt,Pn){return z.createElement(Be.Z,null,z.createElement(he.Z,null,z.createElement(wt.ZP,{key:Pn,checked:pe.standard_answer.includes(Pn+1),disabled:!0},Tt[Pn],".")),z.createElement(he.Z,{flex:"1"},z.createElement("span",{className:"c-black font14"},z.createElement(Xe.Z,{value:Kt.choice_text}))))})))},br=()=>z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.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")),z.createElement("p",{className:_e.titleWrap},z.createElement("span",{className:_e.required},"*"),z.createElement("span",{className:_e.title},"\u9898\u5E72\uFF1A")),z.createElement(Ze.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Dn,onChange:xn=>Ln(xn)}),z.createElement("p",{className:_e.titleWrap},z.createElement("span",{className:_e.required},"*"),z.createElement("span",{className:_e.title},"\u7B54\u6848\u9009\u9879\uFF1A",z.createElement("span",{className:_e.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Dt.map((xn,Kt)=>z.createElement("div",{className:_e.choiceWrap,key:Kt},z.createElement(Ke.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},z.createElement("div",{className:`${_e.answer} ${hn.includes(Kt)?_e.activeAnswer:""}`,onClick:()=>{hn.includes(Kt)?er(hn.filter(Pn=>Pn!==Kt)):er([...hn,Kt])}},Tt[Kt])),z.createElement("div",{className:_e.editorWrap},dn===Kt?z.createElement(Ze.Z,{id:`single-question-option-${Kt}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:xn,onChange:Pn=>{Dt[Kt]=Pn,an(Dt)}}):z.createElement("div",{className:_e.htmlWrap,onClick:()=>Cn(Kt)},z.createElement(Xe.Z,{value:xn}))),Kt>1&&z.createElement(Ke.Z,{title:"\u5220\u9664"},z.createElement("i",{className:`${_e.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>an(Dt.filter((Pn,_n)=>_n!==Kt))})),Kt<7&&Kt===Dt.length-1&&z.createElement(Ke.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},z.createElement("i",{className:`${_e.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>an([...Dt,""])})))),z.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"),z.createElement("p",{className:""},"\u5206\u503C\uFF1A",z.createElement(tt.Z,{value:Qn,max:1e4,min:-1,onChange:xn=>{Fn(xn)}})," \u5206"),z.createElement("aside",{className:"tr"},pe.question_id&&z.createElement(Le.ZP,{type:"default",onClick:()=>fr(!1)},"\u53D6\u6D88"),z.createElement(Le.ZP,{className:"ml20",type:"primary",onClick:()=>Jn()},"\u4FDD\u5B58")));return z.createElement("section",{className:_e.wrap},!tr&&un(),tr&&br())};var At=(0,Ye.connect)(({problemset:Ee,loading:me,globalSetting:ye})=>({problemset:Ee,globalSetting:ye,loading:me.effects}),null,null,{forwardRef:!0})((0,z.forwardRef)(ut)),Ie=Object.defineProperty,pt=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,ne=(Ee,me,ye)=>me in Ee?Ie(Ee,me,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[me]=ye,ee=(Ee,me)=>{for(var ye in me||(me={}))mt.call(me,ye)&&ne(Ee,ye,me[ye]);if(pt)for(var ye of pt(me))ae.call(me,ye)&&ne(Ee,ye,me[ye]);return Ee},oe=(Ee,me)=>{var ye={};for(var rt in Ee)mt.call(Ee,rt)&&me.indexOf(rt)<0&&(ye[rt]=Ee[rt]);if(Ee!=null&&pt)for(var rt of pt(Ee))me.indexOf(rt)<0&&ae.call(Ee,rt)&&(ye[rt]=Ee[rt]);return ye},se=(Ee,me,ye)=>new Promise((rt,Zt)=>{var $t=pe=>{try{st(ye.next(pe))}catch(qt){Zt(qt)}},xt=pe=>{try{st(ye.throw(pe))}catch(qt){Zt(qt)}},st=pe=>pe.done?rt(pe.value):Promise.resolve(pe.value).then($t,xt);st((ye=ye.apply(Ee,me)).next())});const re=["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=(Ee,me)=>{var ye=Ee,{problemset:rt,globalSetting:Zt,loading:$t,dispatch:xt,onRef:st=()=>{},editData:pe}=ye,qt=oe(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Dt,an]=(0,z.useState)(),[dn,Cn]=(0,z.useState)(""),[hn,er]=(0,z.useState)(!1),[Dn,Ln]=(0,z.useState)(5),Qn=(0,Ye.useParams)();(0,z.useEffect)(()=>{if(!(pe!=null&&pe.question_choices)){er(!0);return}Cn(pe==null?void 0:pe.question_title),Ln(pe==null?void 0:pe.question_score),an(pe.standard_answer[0]+"")},[pe]),(0,z.useImperativeHandle)(me,()=>({onSave:Fn,isEdit:hn}));const Fn=()=>se(void 0,null,function*(){if(!dn)return we.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!Dt)return we.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;const Wn=[{choice_text:"\u6B63\u786E",is_answer:Dt==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Dt==="2"?2:0}];let zn;return pe.question_id?zn=yield(0,ge.Kc)({id:pe.question_id,question_title:dn,question_type:2,question_score:Dn,question_choices:Wn.map(un=>un.choice_text),standard_answers:Wn.filter(un=>un.is_answer).map(un=>un.is_answer)}):zn=yield(0,ge.iV)({exercise_bank_id:Qn.topicId,question_title:dn,question_type:2,question_score:Dn,question_choices:Wn.map(un=>un.choice_text),standard_answers:Wn.filter(un=>un.is_answer).map(un=>un.is_answer)}),zn.status===0&&(we.ZP.success("\u4FDD\u5B58\u6210\u529F"),er(!1)),xt({type:"polls/getExerciseBanks",payload:ee({},Qn)}),{name:dn,choices:Wn}}),tr=[{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"}],fr=Wn=>se(void 0,null,function*(){switch(Wn.id){case"del":let zn;$e.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return se(this,null,function*(){yield(0,ge.x$)({pollsId:pe.question_id}),xt({type:"polls/getExerciseBanks",payload:ee({},Qn)})})}});break;case"up":case"down":yield(0,ge.W)({exerciseId:pe==null?void 0:pe.question_id,opr:Wn.id}),xt({type:"polls/getExerciseBanks",payload:ee({},Qn)});break;case"edit":er(!0);break}}),nr=()=>{var Wn;return z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.createElement("span",{className:"font16 c-blue"},pe.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",pe.question_score,"\u5206\uFF09"),!pe.hideAction&&tr.map(function(zn,un){return zn.id==="up"&&pe.key===1||zn.id==="down"&&pe.key===pe.len?null:z.createElement(Ke.Z,{key:un,placement:"bottom",title:zn.name},z.createElement("span",{onClick:()=>fr(zn),className:zn.icon}))})),z.createElement("div",{className:"mt5"},pe.question_title),z.createElement("div",{className:_e.questionChoices},(Wn=pe==null?void 0:pe.question_choices)==null?void 0:Wn.map(function(zn,un){return z.createElement(wt.ZP,{key:un,checked:pe.standard_answer.includes(un+1),disabled:!0},re[un],". ",z.createElement("span",{className:"c-black font14"},zn.choice_text))})))},Jn=()=>z.createElement("aside",null,z.createElement("div",null,z.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"),z.createElement("p",{className:_e.titleWrap},z.createElement("span",{className:_e.required},"*"),z.createElement("span",{className:_e.title},"\u9898\u5E72\uFF1A")),z.createElement(Ze.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:dn,onChange:Wn=>Cn(Wn)}),z.createElement("p",{className:_e.titleWrap},z.createElement("span",{className:_e.required},"*"),z.createElement("span",{className:_e.title},"\u7B54\u6848\u9009\u9879\uFF1A",z.createElement("span",{className:_e.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),z.createElement(wt.ZP.Group,{buttonStyle:"solid",value:Dt,onChange:Wn=>an(Wn.target.value)},z.createElement(wt.ZP.Button,{value:"1",className:`${_e.radio} mr40`},"\u6B63\u786E"),z.createElement(wt.ZP.Button,{value:"2",className:_e.radio},"\u9519\u8BEF")),z.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"),z.createElement("p",{className:""},"\u5206\u503C\uFF1A",z.createElement(tt.Z,{value:Dn,max:1e4,min:-1,onChange:Wn=>{Ln(Wn)}})," \u5206"),z.createElement("aside",{className:"tr"},pe.question_id&&z.createElement(Le.ZP,{type:"default",onClick:()=>er(!1)},"\u53D6\u6D88"),z.createElement(Le.ZP,{className:"ml20",type:"primary",onClick:()=>Fn()},"\u4FDD\u5B58")));return z.createElement("section",{className:_e.wrap},!hn&&nr(),hn&&Jn())};var et=(0,Ye.connect)(({problemset:Ee,loading:me,globalSetting:ye})=>({problemset:Ee,globalSetting:ye,loading:me.effects}),null,null,{forwardRef:!0})((0,z.forwardRef)(Se)),Lt=ce(48106),vt=ce(20927),bt=ce(49661),St=Object.defineProperty,Gt=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,on=(Ee,me,ye)=>me in Ee?St(Ee,me,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[me]=ye,Bt=(Ee,me)=>{for(var ye in me||(me={}))jt.call(me,ye)&&on(Ee,ye,me[ye]);if(Gt)for(var ye of Gt(me))rn.call(me,ye)&&on(Ee,ye,me[ye]);return Ee},Sn=(Ee,me)=>{var ye={};for(var rt in Ee)jt.call(Ee,rt)&&me.indexOf(rt)<0&&(ye[rt]=Ee[rt]);if(Ee!=null&&Gt)for(var rt of Gt(Ee))me.indexOf(rt)<0&&rn.call(Ee,rt)&&(ye[rt]=Ee[rt]);return ye},Yt=(Ee,me,ye)=>new Promise((rt,Zt)=>{var $t=pe=>{try{st(ye.next(pe))}catch(qt){Zt(qt)}},xt=pe=>{try{st(ye.throw(pe))}catch(qt){Zt(qt)}},st=pe=>pe.done?rt(pe.value):Promise.resolve(pe.value).then($t,xt);st((ye=ye.apply(Ee,me)).next())});const sn=null,ft=(Ee,me)=>{var ye=Ee,{problemset:rt,globalSetting:Zt,loading:$t,dispatch:xt,editData:st}=ye,pe=Sn(ye,["problemset","globalSetting","loading","dispatch","editData"]);const[qt,Dt]=(0,z.useState)(""),[an,dn]=(0,z.useState)(""),[Cn,hn]=(0,z.useState)([]),[er,Dn]=(0,z.useState)(""),[Ln,Qn]=(0,z.useState)(),[Fn,tr]=(0,z.useState)(!1),[fr,nr]=(0,z.useState)(5),[Jn,Wn]=(0,z.useState)(!1),zn=(0,Ye.useParams)();(0,z.useEffect)(()=>{if(!(st!=null&&st.question_title)){Wn(!0);return}Dt(st==null?void 0:st.question_title),Qn(st==null?void 0:st.is_ordered),nr(st==null?void 0:st.question_score);const In=st==null?void 0:st.standard_answer.map(Yn=>Yn.answer_text);hn(In)},[rt.editData]),(0,z.useEffect)(()=>{tr(!1)},[Jn]),(0,z.useImperativeHandle)(me,()=>({onSave:un,isEdit:Jn}));const un=()=>Yt(void 0,null,function*(){let In=[],Yn=!1;if(Cn.forEach((Lr,sr)=>{In.push({choice_id:sr+1,answer_text:[]}),Lr.forEach((jr,Kr)=>{In[sr].answer_text.push(jr),(!jr||!(0,bt.eR)(jr,1e4))&&(Dn(`${sr}-${Kr}`),we.ZP.info(jr?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Yn=!0)})}),Yn)return!1;let Zn;return st.question_id?Zn=yield(0,ge.Kc)({id:st.question_id,question_title:qt,question_type:3,question_score:fr,is_ordered:Ln,standard_answers:In}):Zn=yield(0,ge.iV)({exercise_bank_id:zn.topicId,question_title:qt,question_type:3,question_score:fr,is_ordered:Ln,standard_answers:In}),Zn.status===0&&(we.ZP.success("\u4FDD\u5B58\u6210\u529F"),Wn(!1)),xt({type:"polls/getExerciseBanks",payload:Bt({},zn)}),{name:qt,analysis:an,standard_answers:In,is_ordered:Ln}}),br=(In,Yn,Zn)=>{const Lr=Cn.slice();if(Yn&&Lr.splice(In,Yn),Zn&&Fn)for(let sr=0;sr<Zn;sr++)Lr.splice(In+sr,0,[""]);tr(!0),hn(Lr)},xn=(In,Yn,Zn)=>{Dn("");let Lr=Cn.slice();Lr[In][Yn]=Zn,hn(Lr)},Kt=In=>{let Yn=Cn.slice();Yn[In]=[...Yn[In],""],hn(Yn)},Pn=(In,Yn)=>{let Zn=Cn.slice();if(!Zn[In][Yn]){Zn[In]=Zn[In].filter((Lr,sr)=>sr!==Yn),hn(Zn);return}$e.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:_e.modal,onOk:()=>{Zn[In]=Zn[In].filter((Lr,sr)=>sr!==Yn),hn(Zn)}})},_n=In=>{$e.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:_e.modal,onOk:()=>{let Yn=Cn.slice();Yn=Cn.filter((Zn,Lr)=>In!==Lr),hn(Yn)}})},gr=()=>z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.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")),z.createElement("div",null,z.createElement(Lt.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:qt,onChange:In=>Dt(In),showNullButton:!0,onPlaceholderChange:br})),z.createElement("div",{className:"mt20"},Cn.map((In,Yn)=>z.createElement(vt.Z,{key:Yn,answers:In,index:Yn,is_md:!0,activeOptionErrorIndex:er,onAnswerChange:xn,addChildAnswer:Kt,deleteChildAnswer:Pn,deleteChildAnswermain:_n}))),z.createElement("div",{className:"mt20"},Cn.length>1&&z.createElement("span",null,z.createElement(it.default,{checked:Ln,onChange:In=>Qn(In.target.checked),className:`${_e.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),z.createElement("span",{className:`${_e.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"))),z.createElement("p",{className:""},"\u5206\u503C\uFF1A",z.createElement(tt.Z,{value:fr,max:1e4,min:-1,onChange:In=>{nr(In)}})," \u5206"),z.createElement("aside",{className:"tr"},st.question_id&&z.createElement(Le.ZP,{type:"default",onClick:()=>Wn(!1)},"\u53D6\u6D88"),z.createElement(Le.ZP,{className:"ml20",type:"primary",onClick:()=>un()},"\u4FDD\u5B58"))),qn=[{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"}],Tn=In=>Yt(void 0,null,function*(){switch(In.id){case"del":let Yn;$e.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Yt(this,null,function*(){yield(0,ge.x$)({pollsId:st.question_id}),xt({type:"polls/getExerciseBanks",payload:Bt({},zn)})})}});break;case"up":case"down":yield(0,ge.W)({exerciseId:st==null?void 0:st.question_id,opr:In.id}),xt({type:"polls/getExerciseBanks",payload:Bt({},zn)});break;case"edit":Wn(!0);break}}),hr=()=>{var In;return z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.createElement("span",{className:"font16 c-blue"},st.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",st.question_score,"\u5206\uFF09"),!st.hideAction&&qn.map(function(Yn,Zn){return Yn.id==="up"&&st.key===1||Yn.id==="down"&&st.key===st.len?null:z.createElement(Ke.Z,{key:Zn,placement:"bottom",title:Yn.name},z.createElement("span",{onClick:()=>Tn(Yn),className:Yn.icon}))})),z.createElement("div",{className:"mt5"},st.question_title),z.createElement("div",{className:_e.questionChoices},(In=st==null?void 0:st.standard_answer)==null?void 0:In.map(function(Yn,Zn){return z.createElement(Be.Z,null,z.createElement(he.Z,null,"\u7B54\u6848\uFF08\u586B\u7A7A",Yn.choice_id,"\uFF09\uFF1A"),z.createElement(he.Z,{flex:"1"},z.createElement(Ue.default,{key:Zn,checked:st.standard_answer.includes(Zn),disabled:!0,value:Yn.answer_text})))})))};return z.createElement("section",{className:_e.wrap},!Jn&&hr(),Jn&&gr())};var wn=(0,Ye.connect)(({problemset:Ee,loading:me,globalSetting:ye})=>({problemset:Ee,globalSetting:ye,loading:me.effects}),null,null,{forwardRef:!0})((0,z.forwardRef)(ft)),Ut=Object.defineProperty,Jt=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable,yn=(Ee,me,ye)=>me in Ee?Ut(Ee,me,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[me]=ye,On=(Ee,me)=>{for(var ye in me||(me={}))gn.call(me,ye)&&yn(Ee,ye,me[ye]);if(Jt)for(var ye of Jt(me))Xn.call(me,ye)&&yn(Ee,ye,me[ye]);return Ee},Cr=(Ee,me)=>{var ye={};for(var rt in Ee)gn.call(Ee,rt)&&me.indexOf(rt)<0&&(ye[rt]=Ee[rt]);if(Ee!=null&&Jt)for(var rt of Jt(Ee))me.indexOf(rt)<0&&Xn.call(Ee,rt)&&(ye[rt]=Ee[rt]);return ye},ar=(Ee,me,ye)=>new Promise((rt,Zt)=>{var $t=pe=>{try{st(ye.next(pe))}catch(qt){Zt(qt)}},xt=pe=>{try{st(ye.throw(pe))}catch(qt){Zt(qt)}},st=pe=>pe.done?rt(pe.value):Promise.resolve(pe.value).then($t,xt);st((ye=ye.apply(Ee,me)).next())});const Hr=null,Or=(Ee,me)=>{var ye=Ee,{problemset:rt,globalSetting:Zt,loading:$t,dispatch:xt,onRef:st=()=>{},editData:pe}=ye,qt=Cr(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Dt,an]=(0,z.useState)(""),[dn,Cn]=(0,z.useState)(""),[hn,er]=(0,z.useState)(""),[Dn,Ln]=(0,z.useState)(5),[Qn,Fn]=(0,z.useState)(!1),tr=(0,Ye.useParams)();(0,z.useEffect)(()=>{var un;if(!(pe!=null&&pe.question_title)){Fn(!0);return}an(pe==null?void 0:pe.question_title),er((un=pe==null?void 0:pe.standard_answer)==null?void 0:un[0]),Ln(pe==null?void 0:pe.question_score)},[rt.editData]),(0,z.useImperativeHandle)(me,()=>({onSave:fr,isEdit:Qn}));const fr=()=>ar(void 0,null,function*(){if(!Dt)return we.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;let un;return pe.question_id?un=yield(0,ge.Kc)({id:pe.question_id,question_title:Dt,question_type:4,question_score:Dn,standard_answers:[hn]}):un=yield(0,ge.iV)({exercise_bank_id:tr.topicId,question_title:Dt,question_type:4,question_score:Dn,standard_answers:[hn]}),un.status===0&&(we.ZP.success("\u4FDD\u5B58\u6210\u529F"),Fn(!1),xt({type:"polls/getExerciseBanks",payload:On({},tr)})),{name:Dt,answer_texts:[hn],analysis:dn}}),nr=()=>z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.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")),z.createElement(Ze.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Dt,onChange:un=>an(un)}),z.createElement("p",{className:_e.titleWrap},z.createElement("span",{className:_e.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),z.createElement(Ze.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:hn,onChange:un=>er(un)}),z.createElement("p",{className:""},"\u5206\u503C\uFF1A",z.createElement(tt.Z,{value:Dn,max:1e4,min:-1,onChange:un=>{Ln(un)}})," \u5206"),z.createElement("aside",{className:"tr"},pe.question_id&&z.createElement(Le.ZP,{type:"default",onClick:()=>Fn(!1)},"\u53D6\u6D88"),z.createElement(Le.ZP,{className:"ml20",type:"primary",onClick:()=>fr()},"\u4FDD\u5B58"))),Jn=[{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"}],Wn=un=>ar(void 0,null,function*(){switch(un.id){case"del":let br;$e.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return ar(this,null,function*(){yield(0,ge.x$)({pollsId:pe.question_id}),xt({type:"polls/getExerciseBanks",payload:On({},tr)})})}});break;case"up":case"down":yield(0,ge.W)({exerciseId:pe==null?void 0:pe.question_id,opr:un.id}),xt({type:"polls/getExerciseBanks",payload:On({},tr)});break;case"edit":Fn(!0);break}}),zn=()=>z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.createElement("span",{className:"font16 c-blue"},pe.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",pe.question_score,"\u5206\uFF09"),!pe.hideAction&&Jn.map(function(un,br){return un.id==="up"&&pe.key===1||un.id==="down"&&pe.key===pe.len?null:z.createElement(Ke.Z,{key:br,placement:"bottom",title:un.name},z.createElement("span",{onClick:()=>Wn(un),className:un.icon}))})),z.createElement("div",{className:"mt5"},pe.question_title),z.createElement("div",{className:_e.questionChoices},z.createElement("p",null,z.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),z.createElement(Xe.Z,{value:hn})));return z.createElement("section",{className:_e.wrap},!Qn&&zn(),Qn&&nr())};var kr=(0,Ye.connect)(({problemset:Ee,loading:me,globalSetting:ye})=>({problemset:Ee,globalSetting:ye,loading:me.effects}),null,null,{forwardRef:!0})((0,z.forwardRef)(Or)),mr=Object.defineProperty,bn=Object.getOwnPropertySymbols,lr=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable,Gn=(Ee,me,ye)=>me in Ee?mr(Ee,me,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[me]=ye,wr=(Ee,me)=>{for(var ye in me||(me={}))lr.call(me,ye)&&Gn(Ee,ye,me[ye]);if(bn)for(var ye of bn(me))pr.call(me,ye)&&Gn(Ee,ye,me[ye]);return Ee},Ft=(Ee,me)=>{var ye={};for(var rt in Ee)lr.call(Ee,rt)&&me.indexOf(rt)<0&&(ye[rt]=Ee[rt]);if(Ee!=null&&bn)for(var rt of bn(Ee))me.indexOf(rt)<0&&pr.call(Ee,rt)&&(ye[rt]=Ee[rt]);return ye},zt=(Ee,me,ye)=>new Promise((rt,Zt)=>{var $t=pe=>{try{st(ye.next(pe))}catch(qt){Zt(qt)}},xt=pe=>{try{st(ye.throw(pe))}catch(qt){Zt(qt)}},st=pe=>pe.done?rt(pe.value):Promise.resolve(pe.value).then($t,xt);st((ye=ye.apply(Ee,me)).next())});const gt=null,Ct=(Ee,me)=>{var ye=Ee,{problemset:rt,globalSetting:Zt,loading:$t,dispatch:xt,editData:st}=ye,pe=Ft(ye,["problemset","globalSetting","loading","dispatch","editData"]);const[qt,Dt]=(0,z.useState)(""),[an,dn]=(0,z.useState)(""),[Cn,hn]=(0,z.useState)(""),[er,Dn]=(0,z.useState)([]),[Ln,Qn]=(0,z.useState)(""),[Fn,tr]=(0,z.useState)(),[fr,nr]=(0,z.useState)(!1),[Jn,Wn]=(0,z.useState)([]),[zn,un]=(0,z.useState)(!1),br=(0,Ye.useParams)();(0,z.useEffect)(()=>{var qn;st.edit&&un(!0),Dt(st.shixun_name),dn(st.question_title);const Tn=[];(qn=st.shixun)==null||qn.map(hr=>{Tn.push(hr.challenge_score)}),Wn(Tn)},[st]),(0,z.useEffect)(()=>{nr(!1)},[zn]),(0,z.useImperativeHandle)(me,()=>({onSave:xn,isEdit:zn}));const xn=()=>zt(void 0,null,function*(){let qn=[];if(!1)return!1;let hr;return st.question_id?hr=yield(0,ge.Kc)({id:st.question_id,question_title:an,shixun_name:qt,shixun_id:st.shixun_id,question_type:5,question_scores:Jn}):hr=yield(0,ge.iV)({exercise_bank_id:br.topicId,question_title:an,shixun_name:qt,shixun_id:st.shixun_id,question_type:5,question_scores:Jn}),hr.status===0&&(we.ZP.success("\u4FDD\u5B58\u6210\u529F"),un(!1)),yield xt({type:"polls/getExerciseBanks",payload:wr({},br)}),{name:an,analysis:Cn,standard_answers:qn,is_ordered:Fn}}),Kt=()=>{var qn;return z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.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")),z.createElement("div",{className:"mt10"},z.createElement(Ue.default,{defaultValue:qt,onChange:Tn=>{Dt(Tn.target.value)}})),z.createElement("div",{className:"mt10"},z.createElement(Ze.Z,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:an,onChange:Tn=>{dn(Tn)}})),z.createElement("div",{className:"mt20"},(qn=st.shixun)==null?void 0:qn.map((Tn,hr)=>z.createElement(Be.Z,{gutter:[20,20]},z.createElement(he.Z,{flex:"1"},hr+1,".",Tn.challenge_name),z.createElement(he.Z,null,z.createElement(tt.Z,{defaultValue:Jn[hr],onChange:In=>{Jn[hr]=In,Wn(Jn),console.log("srore:L",Jn[hr])}}))))),z.createElement("div",{className:"mt20"},er.length>1&&z.createElement("span",null,z.createElement(it.default,{checked:Fn,onChange:Tn=>tr(Tn.target.checked),className:`${_e.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),z.createElement("span",{className:`${_e.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"))),z.createElement("aside",{className:"tr"},!(st!=null&&st.edit)&&z.createElement(Le.ZP,{type:"default",onClick:()=>un(!1)},"\u53D6\u6D88"),z.createElement(Le.ZP,{className:"ml20",type:"primary",onClick:()=>xn()},"\u4FDD\u5B58")))},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"}],_n=qn=>zt(void 0,null,function*(){switch(qn.id){case"del":let Tn;$e.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return zt(this,null,function*(){yield(0,ge.x$)({pollsId:st.question_id}),xt({type:"polls/getExerciseBanks",payload:wr({},br)})})}});break;case"up":case"down":yield(0,ge.W)({exerciseId:st==null?void 0:st.question_id,opr:qn.id}),xt({type:"polls/getExerciseBanks",payload:wr({},br)});break;case"edit":un(!0);break}}),gr=()=>{var qn;return z.createElement("aside",null,z.createElement("div",{className:_e.questionType},z.createElement("div",null,z.createElement("span",{className:"font16 c-blue"},st.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",st.question_score,"\u5206\uFF09"),z.createElement("div",{className:"tr"},z.createElement(Ye.Link,{target:"_blank",to:`/shixuns/${st.shixun_identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),!st.hideAction&&Pn.map(function(Tn,hr){return Tn.id==="up"&&st.key===1||Tn.id==="down"&&st.key===st.len?null:z.createElement(Ke.Z,{key:hr,placement:"bottom",title:Tn.name},z.createElement("span",{onClick:()=>_n(Tn),className:Tn.icon}))}))),z.createElement("div",{className:"font16"},st.shixun_name),z.createElement("div",{className:"mt30"}),(qn=st.shixun)==null?void 0:qn.map(function(Tn,hr){return z.createElement("div",{key:hr},"\u7B2C",hr+1,"\u5173 ",z.createElement("span",{className:"ml10"},Tn.challenge_name)," ",z.createElement("span",{className:"ml10"},Tn.challenge_score))}))};return z.createElement("section",{className:_e.wrap},!zn&&gr(),zn&&Kt())};var en=(0,Ye.connect)(({problemset:Ee,loading:me,globalSetting:ye})=>({problemset:Ee,globalSetting:ye,loading:me.effects}),null,null,{forwardRef:!0})((0,z.forwardRef)(Ct)),pn={flex_box_center:"flex_box_center___eWsYC",flex_space_between:"flex_space_between___RALuo",flex_box_vertical_center:"flex_box_vertical_center___f7uVp",flex_box_center_end:"flex_box_center_end___UxPR3",flex_box_column:"flex_box_column___YUFuv",bg:"bg___zWTsF",containerTitle:"containerTitle___DzTZh",containerDesc:"containerDesc___a3TiA",listItem:"listItem____nHKG",info:"info___LWlgA",title:"title___gtaI4",titleLeft:"titleLeft___Ce3h9",titleRight:"titleRight___gARIc",acitons:"acitons___MrR2u",export:"export___u_8cL"},cn=ce(64977),Nn=Object.defineProperty,Vn=Object.getOwnPropertySymbols,Hn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Rn=(Ee,me,ye)=>me in Ee?Nn(Ee,me,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[me]=ye,Mt=(Ee,me)=>{for(var ye in me||(me={}))Hn.call(me,ye)&&Rn(Ee,ye,me[ye]);if(Vn)for(var ye of Vn(me))Bn.call(me,ye)&&Rn(Ee,ye,me[ye]);return Ee},lt=(Ee,me)=>{var ye={};for(var rt in Ee)Hn.call(Ee,rt)&&me.indexOf(rt)<0&&(ye[rt]=Ee[rt]);if(Ee!=null&&Vn)for(var rt of Vn(Ee))me.indexOf(rt)<0&&Bn.call(Ee,rt)&&(ye[rt]=Ee[rt]);return ye},Vt=(Ee,me,ye)=>new Promise((rt,Zt)=>{var $t=pe=>{try{st(ye.next(pe))}catch(qt){Zt(qt)}},xt=pe=>{try{st(ye.throw(pe))}catch(qt){Zt(qt)}},st=pe=>pe.done?rt(pe.value):Promise.resolve(pe.value).then($t,xt);st((ye=ye.apply(Ee,me)).next())});const{SubMenu:En}=Oe.default,{Content:jn,Sider:Pe}=Ve.default,Re=Ee=>{var me=Ee,{polls:ye,globalSetting:rt,loading:Zt,user:$t,dispatch:xt}=me,st=lt(me,["polls","globalSetting","loading","user","dispatch"]),pe,qt,Dt,an,dn,Cn,hn,er,Dn,Ln,Qn,Fn,tr,fr,nr,Jn,Wn,zn,un,br,xn,Kt,Pn,_n,gr,qn,Tn,hr,In,Yn,Zn,Lr,sr,jr,Kr,Rr,ur,It,Qt,An,fn,Un,Xt,Nt,tn,ln,ir,cr,Fr,vr,Er,Nr,Gr,_r,Yr,Mr,oi;const Vr=(0,Ye.useParams)(),Hi=(0,Ye.useLocation)(),{userInfo:ui}=$t,[ni]=xe.default.useForm(),[Ar,vi]=(0,z.useState)([]),[Ui,Qr]=(0,z.useState)(!1),Wi=[{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}],Si=(0,z.useRef)();(0,z.useEffect)(()=>{var Br,ai,mi,Xr,eo,Ki;(Br=ye.exerciseBanks)!=null&&Br.exercise_questions&&(vi([...(ai=ye.exerciseBanks)==null?void 0:ai.exercise_questions]),ni.setFieldsValue({exercise_name:(Xr=(mi=ye.exerciseBanks)==null?void 0:mi.exercise)==null?void 0:Xr.exercise_name,exercise_description:(Ki=(eo=ye.exerciseBanks)==null?void 0:eo.exercise)==null?void 0:Ki.exercise_description}))},[ye.exerciseBanks]),(0,z.useEffect)(()=>{xt({type:"polls/getExerciseBanks",payload:Mt({},Vr)})},[Vr.categoryId]);const ci=()=>Vt(void 0,null,function*(){var Br,ai;yield ni.validateFields();const mi=ni.getFieldValue();mi.is_md=!0,mi.topicId=(ai=(Br=ye.exerciseBanks)==null?void 0:Br.exercise)==null?void 0:ai.id,Qr(!1),yield(0,ge.hO)(Mt({},mi)),xt({type:"polls/getExerciseBanks",payload:Mt({},Vr)})}),oo=Br=>Vt(void 0,null,function*(){const ai=yield Si==null?void 0:Si.current;if(ai!=null&&ai.isEdit){we.ZP.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898");return}Br===5?xt({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):vi([...Ar,{question_type:Br}])}),Bi=()=>{xt({type:"userDetail/setActionTabs",payload:{key:"UserDetail-SendToClass",params:{object_id:[Vr.topicId],object_type:"exercise"}}})},Wr=function(){return Ar==null?void 0:Ar.map(function(Br,ai){if(Br.key=ai+1,Br.len=Ar.length,Br.question_type===0)return z.createElement("aside",null,z.createElement(At,{ref:Si,editData:Br}),z.createElement(He.Z,null));if(Br.question_type===1)return z.createElement("aside",null,z.createElement(Rt,{ref:Si,editData:Br}),z.createElement(He.Z,null));if(Br.question_type===2)return z.createElement("aside",null,z.createElement(et,{ref:Si,editData:Br}),z.createElement(He.Z,null));if(Br.question_type===3)return z.createElement("aside",null,z.createElement(wn,{editData:Br}),z.createElement(He.Z,null));if(Br.question_type===4)return z.createElement("aside",null,z.createElement(kr,{editData:Br}),z.createElement(He.Z,null));if(Br.question_type===5)return z.createElement("aside",null,z.createElement(en,{editData:Br}),z.createElement(He.Z,null))})};return z.createElement("section",{className:"edu-container"},z.createElement("section",{className:"animated fadeIn"},z.createElement("aside",{className:"mt10"},ui&&z.createElement(We.Z,{separator:">"},z.createElement(We.Z.Item,null,z.createElement(Ye.Link,{to:`/users/${Vr.username}/${Vr.topictype==="personal"?"topics":"topicbank"}/${Vr.topictype}`},Vr.topictype==="personal"?"\u6211\u7684\u9898\u5E93":"\u516C\u5171\u9898\u5E93")),z.createElement(We.Z.Item,null,"\u8BE6\u60C5"))),z.createElement("aside",{className:[pn.title,"mt20"].join(" ")},z.createElement(Be.Z,{style:{width:"100%"},align:"middle"},z.createElement(he.Z,{flex:"1"},z.createElement("strong",{className:"font20 ml5"},(qt=(pe=ye.exerciseBanks)==null?void 0:pe.exercise)==null?void 0:qt.exercise_name),z.createElement(bt.VV,{status:[(an=(Dt=ye.exerciseBanks)==null?void 0:Dt.exercise)!=null&&an.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),z.createElement(he.Z,null,z.createElement(Ye.Link,{className:"font16 c-light-black",to:`/users/${ui.login}/topics/${Vr.topictype}`},"\u8FD4\u56DE"))))),z.createElement("section",{className:[pn.bg,"pl30","pr30","pb30","mt20 relative"].join(" ")},z.createElement("div",{className:pn.export},((dn=ye.exerciseBanks)==null?void 0:dn.authorize)&&z.createElement(z.Fragment,null,z.createElement("a",{onClick:Br=>{Br.preventDefault(),$e.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:()=>Vt(void 0,null,function*(){(yield(0,Ce.Tv)({object_type:"normal",object_id:[Vr.topicId]})).status===0&&Ye.history.push(`/users/${Vr.username}/topics/personal`)})})}},"\u5220\u9664"),z.createElement(Ye.Link,{to:`/users/${ui.login}/topics/${Vr.topicId}/${Vr.topictype}/exercise/edit`},"\u7F16\u8F91")),z.createElement("a",{onClick:Br=>{Br.preventDefault(),Bi()}},"\u53D1\u9001")),z.createElement(be.default,{className:pn.tabs},z.createElement(be.default.TabPane,{tab:z.createElement("span",{className:"font16 pt10 pb12"},"\u5185\u5BB9\u8BE6\u60C5"),key:"1"},z.createElement("div",{className:"c-light-black"},(hn=(Cn=ye.exerciseBanks)==null?void 0:Cn.exercise)==null?void 0:hn.exercise_description))),Ui&&z.createElement(xe.default,{layout:"vertical",form:ni},z.createElement(xe.default.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},z.createElement(Ue.default,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),z.createElement(xe.default.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},z.createElement(Ue.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"})),z.createElement(xe.default.Item,{className:"tr"},z.createElement(Le.ZP,{type:"primary",onClick:()=>{ci()}},"\u4FDD\u5B58")))),z.createElement("p",{className:"mt10",style:{display:"flex"}},z.createElement("span",{className:"fl",style:{flex:"1"}},!!((Dn=(er=ye.exerciseBanks)==null?void 0:er.exercise_types)!=null&&Dn.q_singles)&&z.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(Qn=(Ln=ye.exerciseBanks)==null?void 0:Ln.exercise_types)==null?void 0:Qn.q_singles,"\u9898\uFF0C\u5171",(tr=(Fn=ye.exerciseBanks)==null?void 0:Fn.exercise_types)==null?void 0:tr.q_singles_scores,"\u5206"),!!((nr=(fr=ye.exerciseBanks)==null?void 0:fr.exercise_types)!=null&&nr.q_doubles)&&z.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(Wn=(Jn=ye.exerciseBanks)==null?void 0:Jn.exercise_types)==null?void 0:Wn.q_doubles,"\u9898\uFF0C\u5171",(un=(zn=ye.exerciseBanks)==null?void 0:zn.exercise_types)==null?void 0:un.q_doubles_scores,"\u5206"),!!((xn=(br=ye.exerciseBanks)==null?void 0:br.exercise_types)!=null&&xn.q_judges)&&z.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(Pn=(Kt=ye.exerciseBanks)==null?void 0:Kt.exercise_types)==null?void 0:Pn.q_judges,"\u9898\uFF0C\u5171",(gr=(_n=ye.exerciseBanks)==null?void 0:_n.exercise_types)==null?void 0:gr.q_judges_scores,"\u5206"),!!((Tn=(qn=ye.exerciseBanks)==null?void 0:qn.exercise_types)!=null&&Tn.q_nulls)&&z.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(In=(hr=ye.exerciseBanks)==null?void 0:hr.exercise_types)==null?void 0:In.q_nulls,"\u9898\uFF0C\u5171",(Zn=(Yn=ye.exerciseBanks)==null?void 0:Yn.exercise_types)==null?void 0:Zn.q_nulls_scores,"\u5206"),!!((sr=(Lr=ye.exerciseBanks)==null?void 0:Lr.exercise_types)!=null&&sr.q_mains)&&z.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(Kr=(jr=ye.exerciseBanks)==null?void 0:jr.exercise_types)==null?void 0:Kr.q_mains,"\u9898\uFF0C\u5171",(ur=(Rr=ye.exerciseBanks)==null?void 0:Rr.exercise_types)==null?void 0:ur.q_mains_scores,"\u5206"),!!((Qt=(It=ye.exerciseBanks)==null?void 0:It.exercise_types)!=null&&Qt.q_shixuns)&&z.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(fn=(An=ye.exerciseBanks)==null?void 0:An.exercise_types)==null?void 0:fn.q_shixuns,"\u9898\uFF0C\u5171",(Xt=(Un=ye.exerciseBanks)==null?void 0:Un.exercise_types)==null?void 0:Xt.q_shixuns_scores,"\u5206"),!!((tn=(Nt=ye.exerciseBanks)==null?void 0:Nt.exercise_types)!=null&&tn.q_pros)&&z.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(ir=(ln=ye.exerciseBanks)==null?void 0:ln.exercise_types)==null?void 0:ir.q_pros,"\u9898\uFF0C\u5171",(Fr=(cr=ye.exerciseBanks)==null?void 0:cr.exercise_types)==null?void 0:Fr.q_pros_scores,"\u5206")),z.createElement("span",{className:"fr"},!!((Er=(vr=ye.exerciseBanks)==null?void 0:vr.exercise_types)!=null&&Er.q_counts)&&z.createElement("span",null,"\u5408\u8BA1 ",z.createElement("span",{className:"color-blue"},(Gr=(Nr=ye.exerciseBanks)==null?void 0:Nr.exercise_types)==null?void 0:Gr.q_counts)," \u9898\uFF0C \u5171 ",z.createElement("span",{className:`${((Yr=(_r=ye.exerciseBanks)==null?void 0:_r.exercise_types)==null?void 0:Yr.q_scores)>100?"color-red font-bd":"color-orange"}`},(oi=(Mr=ye.exerciseBanks)==null?void 0:Mr.exercise_types)==null?void 0:oi.q_scores)," \u5206"))),z.createElement("section",{className:[pn.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},Ar!=""&&Wr(),Ar==""&&z.createElement(De.Z,null)),z.createElement(cn.Z,null))};var Wt=(0,Ye.connect)(({polls:Ee,loading:me,user:ye,globalSetting:rt})=>({polls:Ee,globalSetting:rt,user:ye,loading:me.effects}))(Re)},64977:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return Ge}});var z=ce(59301),Ye=ce(76560),Oe=ce(6767),Ve=ce(62957),xe=ce(20554),we=ce(458),He=ce(47889),We={title:"title___XAxiE",radioWrap:"radioWrap___k0pOB",radio:"radio___x9kMt",colorFF0000:"colorFF0000___IMgd0",pagination:"pagination___ou2ht",checkboxWrapper:"checkboxWrapper___kF7xI"},Be=ce(49661),he=ce(71360),$e=ce(29787),be=ce(62673),Ue=ce(63423),Le=ce(26724),ge=ce.n(Le),Ce=(ke,Te,ht)=>new Promise((dt,Rt)=>{var wt=qe=>{try{de(ht.next(qe))}catch(kt){Rt(kt)}},ve=qe=>{try{de(ht.throw(qe))}catch(kt){Rt(kt)}},de=qe=>qe.done?dt(qe.value):Promise.resolve(qe.value).then(wt,ve);de((ht=ht.apply(ke,Te)).next())}),Ke=({username:ke,setStages:Te,stages:ht,hasError:dt,setHasError:Rt})=>{const[wt,ve]=(0,z.useState)(""),[de,qe]=(0,z.useState)(1),[kt,yt]=(0,z.useState)([]),[Ne,at]=(0,z.useState)(!1),[nt,Tt]=(0,z.useState)(0);(0,z.useEffect)(()=>{ut({page:1,search:""},!0)},[]);const ut=(Ie,pt)=>Ce(void 0,null,function*(){at(!0);const mt=yield(0,Ue.w3)({username:ke,category:"manage",page:Ie.page,search:Ie.search});at(!1),yt(ae=>pt?mt==null?void 0:mt.subjects:[...ae,...mt==null?void 0:mt.subjects]),Tt(mt==null?void 0:mt.count)}),At=(0,z.useRef)();return z.createElement("div",{className:We.wrap},z.createElement("div",{className:"mb10"},z.createElement(he.t7,{placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:wt,style:{width:500},onChange:Ie=>{ve(Ie),qe(1),At.current.scrollTo({behavior:"smooth",top:0}),ut({page:1,search:Ie},!0)}})),z.createElement($e.Z,{spinning:Ne},z.createElement("div",{className:We.radioWrap,ref:At},z.createElement(ge(),{initialLoad:!1,pageStart:1,threshold:6,loadMore:()=>{qe(de+1),ut({page:de+1,search:wt},!1)},hasMore:kt.length<nt,useWindow:!1},z.createElement(He.ZP.Group,{value:ht.subjectId,onChange:Ie=>{Te({subjectId:Ie.target.value,stage_ids:[]}),Rt(!1)}},kt.map(Ie=>{const pt=Ie.stages.map(mt=>({label:mt.name,value:mt.id}));return z.createElement("div",{key:Ie.id},z.createElement(He.ZP,{className:We.radio,value:Ie.id},Ie.name),Ie.id===ht.subjectId&&z.createElement("div",{className:We.checkboxWrapper},pt.length>0&&z.createElement(be.default,{indeterminate:ht.stage_ids.length>0&&ht.stage_ids.length<pt.length,onChange:mt=>{Te({subjectId:Ie.id,stage_ids:mt.target.checked?pt.map(ae=>ae.value):[]})},checked:ht.stage_ids.length===pt.length},"\u5168\u9009"),z.createElement(be.default.Group,{options:pt,value:ht.stage_ids,onChange:mt=>Te({subjectId:Ie.id,stage_ids:mt})})))}))))),dt&&z.createElement("div",{className:We.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u5B9E\u8DF5\u8BFE\u7A0B\u53CA\u7AE0\u8282"))},it=ce(77277),tt=ce(96047),ze=Object.defineProperty,Ze=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ot=(ke,Te,ht)=>Te in ke?ze(ke,Te,{enumerable:!0,configurable:!0,writable:!0,value:ht}):ke[Te]=ht,Qe=(ke,Te)=>{for(var ht in Te||(Te={}))Xe.call(Te,ht)&&Ot(ke,ht,Te[ht]);if(Ze)for(var ht of Ze(Te))_e.call(Te,ht)&&Ot(ke,ht,Te[ht]);return ke},je=(ke,Te)=>{var ht={};for(var dt in ke)Xe.call(ke,dt)&&Te.indexOf(dt)<0&&(ht[dt]=ke[dt]);if(ke!=null&&Ze)for(var dt of Ze(ke))Te.indexOf(dt)<0&&_e.call(ke,dt)&&(ht[dt]=ke[dt]);return ht},ct=(ke,Te,ht)=>new Promise((dt,Rt)=>{var wt=qe=>{try{de(ht.next(qe))}catch(kt){Rt(kt)}},ve=qe=>{try{de(ht.throw(qe))}catch(kt){Rt(kt)}},de=qe=>qe.done?dt(qe.value):Promise.resolve(qe.value).then(wt,ve);de((ht=ht.apply(ke,Te)).next())});const Me=ke=>{var Te=ke,{userDetail:ht,globalSetting:dt,loading:Rt,user:wt,dispatch:ve}=Te,de=je(Te,["userDetail","globalSetting","loading","user","dispatch"]),qe,kt,yt,Ne,at;const[nt,Tt]=(0,z.useState)("course"),[ut,At]=(0,z.useState)(""),[Ie,pt]=(0,z.useState)([]),[mt,ae]=(0,z.useState)(),[ne,ee]=(0,z.useState)(!1),[oe,se]=(0,z.useState)(!1);(0,z.useEffect)(()=>{ht.actionTabs.key==="UserDetail-SendToClass"&&re(ut)},[ht.actionTabs.key]);const re=vt=>ct(void 0,null,function*(){ee(!0);const bt=yield ve({type:"userDetail/topicGetCourseList",payload:{search:vt}});bt&&pt((bt==null?void 0:bt.courses)||[]),ee(!1)}),[Se,et]=(0,z.useState)({subjectId:"",stage_ids:[]}),Lt=()=>ct(void 0,null,function*(){var vt,bt,St,Gt,jt,rn;if(nt==="course"){if(!mt){se(!0);return}const on=yield ve({type:"userDetail/topicSendToClass",payload:Qe({course_id:mt},(vt=ht.actionTabs)==null?void 0:vt.params)});if(ve({type:"userDetail/setActionTabs",payload:{}}),on&&on.status===0){const Bt={normal:"common_homework",group:"group_homework",exercise:"exercise",poll:"poll",videos:"video"};(0,Be.xg)(`/classrooms/${mt}/${Bt[(St=(bt=ht.actionTabs)==null?void 0:bt.params)==null?void 0:St.object_type]}`)}}else{if(!Se.subjectId||!Se.stage_ids.length){se(!0);return}(yield(0,tt.nI)({id:(jt=(Gt=ht.actionTabs)==null?void 0:Gt.params)==null?void 0:jt.object_id,login:(rn=wt.userInfo)==null?void 0:rn.login},{stage_ids:Se.stage_ids})).status===0&&(Oe.ZP.success("\u53D1\u9001\u6210\u529F"),ve({type:"userDetail/setActionTabs",payload:{}}),(0,Be.xg)(`/paths/${Se.subjectId}`))}});return z.createElement(Ve.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:ht.actionTabs.key==="UserDetail-SendToClass",title:"\u53D1\u9001",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:Rt["userDetail/sendToClass"],width:600,afterClose:()=>{se(!1),pt([]),et({subjectId:"",stage_ids:[]}),At("")},onOk:Lt,wrapClassName:it.Z.CustomCss,onCancel:()=>{ve({type:"userDetail/setActionTabs",payload:{}})}},z.createElement(xe.default,{activeKey:nt,onChange:vt=>{se(!1),Tt(vt)},items:[{label:"\u8BFE\u5802",key:"course",children:z.createElement("div",{className:We.wrap},z.createElement("div",{className:"mb10"},z.createElement(he.t7,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:ut,style:{width:500},onChange:vt=>{At(vt),re(vt)}})),z.createElement(we.Z,{active:!0,loading:ne},z.createElement("div",{className:We.radioWrap},z.createElement(He.ZP.Group,{value:mt,onChange:vt=>{ae(vt.target.value),se(!1)}},Ie.map((vt,bt)=>z.createElement(He.ZP,{className:We.radio,value:vt.course_id,key:vt.course_id},vt.course_name))))),((kt=(qe=ht.actionTabs)==null?void 0:qe.params)==null?void 0:kt.object_type)!=="videos"&&z.createElement("div",{className:We.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u9009\u62E9\u7684\u9898\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802"),oe&&z.createElement("div",{className:We.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802")),show:!0},{label:"\u5B9E\u8DF5\u8BFE\u7A0B",key:"subject",children:z.createElement(Ke,{username:(yt=wt.userInfo)==null?void 0:yt.login,stages:Se,setStages:et,hasError:oe,setHasError:se}),show:((at=(Ne=ht.actionTabs)==null?void 0:Ne.params)==null?void 0:at.object_type)==="videos"}].filter(vt=>vt.show)}))};var Ge=(0,Ye.connect)(({userDetail:ke,loading:Te,globalSetting:ht,user:dt})=>({userDetail:ke,globalSetting:ht,loading:Te.effects,user:dt}))(Me)},90290:function(_t,Pt,ce){"use strict";ce.d(Pt,{AL:function(){return ze},Iy:function(){return $e},Qv:function(){return Le},ez:function(){return tt},jb:function(){return be}});var z=ce(32834),Ye=ce.n(z),Oe=ce(11690),Ve=ce.n(Oe);let xe=1;function we(Qe,je){const ct=Qe.match(/^(\s+)(?:```)/);if(ct===null)return je;const Me=ct[1];return je.split(`
|
|
`).map(Ge=>{const ke=Ge.match(/^\s+/);if(ke===null)return Ge;const[Te]=ke;return Te.length>=Me.length?Ge.slice(Me.length):Ge}).join(`
|
|
`)}let He=[],We=["<ul>"];const Be=new(Ye()).Renderer,he=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function $e(){He.length=0,We=["<ul>"]}const be={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ue(Qe,je,ct,Me){if(je>=Qe.length||Qe[je].level<=ct)return je;var Ge=Qe[je];Me.push("<li><a href='#"+xe+Ge.anchor+"'>"+Ge.text+"</a>"),je++;var ke=[];return je=Ue(Qe,je,Ge.level,ke),ke.length>0&&(Me.push("<ul>"),ke.forEach(function(Te){Me.push(Te)}),Me.push("</ul>")),Me.push("</li>"),je=Ue(Qe,je,ct,Me),je}function Le(){return Ue(He,0,0,We),We.push("</ul>"),We.join("")}const ge={heading(Qe){const je=he.exec(Qe);if(xe+=1,je)return{type:"heading",raw:je[0],depth:je[1].length,text:je[2]}},fences(Qe){const je=this.rules.block.fences.exec(Qe);if(je){const ct=je[0];let Me=we(ct,je[3]||"");const Ge=je[2]?je[2].trim():je[2];if(["latex","katex","math"].indexOf(Ge)>=0){const ke=Ke(),Te=Me;Me=ke,it[ke]={type:"block",expression:Te}}return{type:"code",raw:ct,lang:Ge,text:Me}}}},Ce=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const Ke=()=>`__special_katext_id_${De++}__`;let it={};function tt(){return it}function ze(){De=0,it={}}function Ze(Qe){return Qe=Qe.replace(Ce,(je,ct)=>{const Me=Ke();return it[Me]={type:"inline",expression:ct},Me}),Qe}const Xe=Be.listitem;Be.listitem=function(Qe){return Xe(Ze(Qe))};const _e=Be.paragraph;Be.paragraph=function(Qe){return _e(Ze(Qe))};const Ot=Be.tablecell;Be.tablecell=function(Qe,je){return Ot(Ze(Qe),je)},Be.code=function(Qe,je,ct){const Me=(je||"").match(/\S*/)[0];return Me?["latex","katex","math"].indexOf(Me)>=0?`<p class='editormd-tex'>${Qe}</p>`:`<pre class="prettyprint linenums"><code class="language-${je}">${ct?Qe:(0,Oe.escape)(Qe,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(ct?Qe:(0,Oe.escape)(Qe,!0))+"</code></pre>"},Be.heading=function(Qe,je,ct){let Me=this.options.headerPrefix+ct.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return He.push({anchor:Me,level:je,text:Qe}),"<h"+je+' id="'+xe+Me+'">'+Qe+"</h"+je+">"},Ye().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ye().use({tokenizer:ge,renderer:Be}),Pt.ZP=Ye()},99498:function(_t,Pt,ce){(function(z){z(ce(89780))})(function(z){z.defineOption("placeholder","",function(We,Be,he){var $e=he&&he!=z.Init;if(Be&&!$e)We.on("blur",xe),We.on("change",we),We.on("swapDoc",we),z.on(We.getInputField(),"compositionupdate",We.state.placeholderCompose=function(){Ve(We)}),we(We);else if(!Be&&$e){We.off("blur",xe),We.off("change",we),We.off("swapDoc",we),z.off(We.getInputField(),"compositionupdate",We.state.placeholderCompose),Ye(We);var be=We.getWrapperElement();be.className=be.className.replace(" CodeMirror-empty","")}Be&&!We.hasFocus()&&xe(We)});function Ye(We){We.state.placeholder&&(We.state.placeholder.parentNode.removeChild(We.state.placeholder),We.state.placeholder=null)}function Oe(We){Ye(We);var Be=We.state.placeholder=document.createElement("pre");Be.style.cssText="height: 0; overflow: visible",Be.style.direction=We.getOption("direction"),Be.className="CodeMirror-placeholder CodeMirror-line-like";var he=We.getOption("placeholder");typeof he=="string"&&(he=document.createTextNode(he)),Be.appendChild(he),We.display.lineSpace.insertBefore(Be,We.display.lineSpace.firstChild)}function Ve(We){setTimeout(function(){var Be=!1,he=We.getInputField();he.nodeName=="TEXTAREA"?Be=!he.value:We.lineCount()==1&&(Be=!/[^\u200b]/.test(he.querySelector(".CodeMirror-line").textContent)),Be?Oe(We):Ye(We)},20)}function xe(We){He(We)&&Oe(We)}function we(We){var Be=We.getWrapperElement(),he=He(We);Be.className=Be.className.replace(" CodeMirror-empty","")+(he?" CodeMirror-empty":""),he?Oe(We):Ye(We)}function He(We){return We.lineCount()===1&&We.getLine(0)===""}})},25717:function(_t,Pt,ce){(function(z){z(ce(89780))})(function(z){var Ye={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Oe=z.Pos;z.defineOption("autoCloseBrackets",!1,function(ge,Ce,De){De&&De!=z.Init&&(ge.removeKeyMap(xe),ge.state.closeBrackets=null),Ce&&(we(Ve(Ce,"pairs")),ge.state.closeBrackets=Ce,ge.addKeyMap(xe))});function Ve(ge,Ce){return Ce=="pairs"&&typeof ge=="string"?ge:typeof ge=="object"&&ge[Ce]!=null?ge[Ce]:Ye[Ce]}var xe={Backspace:Be,Enter:he};function we(ge){for(var Ce=0;Ce<ge.length;Ce++){var De=ge.charAt(Ce),Ke="'"+De+"'";xe[Ke]||(xe[Ke]=He(De))}}we(Ye.pairs+"`");function He(ge){return function(Ce){return be(Ce,ge)}}function We(ge){var Ce=ge.state.closeBrackets;if(!Ce||Ce.override)return Ce;var De=ge.getModeAt(ge.getCursor());return De.closeBrackets||Ce}function Be(ge){var Ce=We(ge);if(!Ce||ge.getOption("disableInput"))return z.Pass;for(var De=Ve(Ce,"pairs"),Ke=ge.listSelections(),it=0;it<Ke.length;it++){if(!Ke[it].empty())return z.Pass;var tt=Ue(ge,Ke[it].head);if(!tt||De.indexOf(tt)%2!=0)return z.Pass}for(var it=Ke.length-1;it>=0;it--){var ze=Ke[it].head;ge.replaceRange("",Oe(ze.line,ze.ch-1),Oe(ze.line,ze.ch+1),"+delete")}}function he(ge){var Ce=We(ge),De=Ce&&Ve(Ce,"explode");if(!De||ge.getOption("disableInput"))return z.Pass;for(var Ke=ge.listSelections(),it=0;it<Ke.length;it++){if(!Ke[it].empty())return z.Pass;var tt=Ue(ge,Ke[it].head);if(!tt||De.indexOf(tt)%2!=0)return z.Pass}ge.operation(function(){var ze=ge.lineSeparator()||`
|
|
`;ge.replaceSelection(ze+ze,null),ge.execCommand("goCharLeft"),Ke=ge.listSelections();for(var Ze=0;Ze<Ke.length;Ze++){var Xe=Ke[Ze].head.line;ge.indentLine(Xe,null,!0),ge.indentLine(Xe+1,null,!0)}})}function $e(ge){var Ce=z.cmpPos(ge.anchor,ge.head)>0;return{anchor:new Oe(ge.anchor.line,ge.anchor.ch+(Ce?-1:1)),head:new Oe(ge.head.line,ge.head.ch+(Ce?1:-1))}}function be(ge,Ce){var De=We(ge);if(!De||ge.getOption("disableInput"))return z.Pass;var Ke=Ve(De,"pairs"),it=Ke.indexOf(Ce);if(it==-1)return z.Pass;for(var tt=Ve(De,"closeBefore"),ze=Ve(De,"triples"),Ze=Ke.charAt(it+1)==Ce,Xe=ge.listSelections(),_e=it%2==0,Ot,Qe=0;Qe<Xe.length;Qe++){var je=Xe[Qe],ct=je.head,Me,Ge=ge.getRange(ct,Oe(ct.line,ct.ch+1));if(_e&&!je.empty())Me="surround";else if((Ze||!_e)&&Ge==Ce)Ze&&Le(ge,ct)?Me="both":ze.indexOf(Ce)>=0&&ge.getRange(ct,Oe(ct.line,ct.ch+3))==Ce+Ce+Ce?Me="skipThree":Me="skip";else if(Ze&&ct.ch>1&&ze.indexOf(Ce)>=0&&ge.getRange(Oe(ct.line,ct.ch-2),ct)==Ce+Ce){if(ct.ch>2&&/\bstring/.test(ge.getTokenTypeAt(Oe(ct.line,ct.ch-2))))return z.Pass;Me="addFour"}else if(Ze){var ke=ct.ch==0?" ":ge.getRange(Oe(ct.line,ct.ch-1),ct);if(!z.isWordChar(Ge)&&ke!=Ce&&!z.isWordChar(ke))Me="both";else return z.Pass}else if(_e&&(Ge.length===0||/\s/.test(Ge)||tt.indexOf(Ge)>-1))Me="both";else return z.Pass;if(!Ot)Ot=Me;else if(Ot!=Me)return z.Pass}var Te=it%2?Ke.charAt(it-1):Ce,ht=it%2?Ce:Ke.charAt(it+1);ge.operation(function(){if(Ot=="skip")ge.execCommand("goCharRight");else if(Ot=="skipThree")for(var dt=0;dt<3;dt++)ge.execCommand("goCharRight");else if(Ot=="surround"){for(var Rt=ge.getSelections(),dt=0;dt<Rt.length;dt++)Rt[dt]=Te+Rt[dt]+ht;ge.replaceSelections(Rt,"around"),Rt=ge.listSelections().slice();for(var dt=0;dt<Rt.length;dt++)Rt[dt]=$e(Rt[dt]);ge.setSelections(Rt)}else Ot=="both"?(ge.replaceSelection(Te+ht,null),ge.triggerElectric(Te+ht),ge.execCommand("goCharLeft")):Ot=="addFour"&&(ge.replaceSelection(Te+Te+Te+Te,"before"),ge.execCommand("goCharRight"))})}function Ue(ge,Ce){var De=ge.getRange(Oe(Ce.line,Ce.ch-1),Oe(Ce.line,Ce.ch+1));return De.length==2?De:null}function Le(ge,Ce){var De=ge.getTokenAt(Oe(Ce.line,Ce.ch+1));return/\bstring/.test(De.type)&&De.start==Ce.ch&&(Ce.ch==0||!/\bstring/.test(ge.getTokenTypeAt(Ce)))}})},6313:function(_t,Pt,ce){(function(z){z(ce(89780),ce(52730))})(function(z){z.defineOption("autoCloseTags",!1,function(Be,he,$e){if($e!=z.Init&&$e&&Be.removeKeyMap("autoCloseTags"),!!he){var be={name:"autoCloseTags"};(typeof he!="object"||he.whenClosing!==!1)&&(be["'/'"]=function(Ue){return we(Ue)}),(typeof he!="object"||he.whenOpening!==!1)&&(be["'>'"]=function(Ue){return Ve(Ue)}),Be.addKeyMap(be)}});var Ye=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Oe=["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 Ve(Be){if(Be.getOption("disableInput"))return z.Pass;for(var he=Be.listSelections(),$e=[],be=Be.getOption("autoCloseTags"),Ue=0;Ue<he.length;Ue++){if(!he[Ue].empty())return z.Pass;var Le=he[Ue].head,ge=Be.getTokenAt(Le),Ce=z.innerMode(Be.getMode(),ge.state),De=Ce.state,Ke=Ce.mode.xmlCurrentTag&&Ce.mode.xmlCurrentTag(De),it=Ke&&Ke.name;if(!it)return z.Pass;var tt=Ce.mode.configuration=="html",ze=typeof be=="object"&&be.dontCloseTags||tt&&Ye,Ze=typeof be=="object"&&be.indentTags||tt&&Oe;ge.end>Le.ch&&(it=it.slice(0,it.length-ge.end+Le.ch));var Xe=it.toLowerCase();if(!it||ge.type=="string"&&(ge.end!=Le.ch||!/[\"\']/.test(ge.string.charAt(ge.string.length-1))||ge.string.length==1)||ge.type=="tag"&&Ke.close||ge.string.indexOf("/")==Le.ch-ge.start-1||ze&&He(ze,Xe)>-1||We(Be,Ce.mode.xmlCurrentContext&&Ce.mode.xmlCurrentContext(De)||[],it,Le,!0))return z.Pass;var _e=typeof be=="object"&&be.emptyTags;if(_e&&He(_e,it)>-1){$e[Ue]={text:"/>",newPos:z.Pos(Le.line,Le.ch+2)};continue}var Ot=Ze&&He(Ze,Xe)>-1;$e[Ue]={indent:Ot,text:">"+(Ot?`
|
|
|
|
`:"")+"</"+it+">",newPos:Ot?z.Pos(Le.line+1,0):z.Pos(Le.line,Le.ch+1)}}for(var Qe=typeof be=="object"&&be.dontIndentOnAutoClose,Ue=he.length-1;Ue>=0;Ue--){var je=$e[Ue];Be.replaceRange(je.text,he[Ue].head,he[Ue].anchor,"+insert");var ct=Be.listSelections().slice(0);ct[Ue]={head:je.newPos,anchor:je.newPos},Be.setSelections(ct),!Qe&&je.indent&&(Be.indentLine(je.newPos.line,null,!0),Be.indentLine(je.newPos.line+1,null,!0))}}function xe(Be,he){for(var $e=Be.listSelections(),be=[],Ue=he?"/":"</",Le=Be.getOption("autoCloseTags"),ge=typeof Le=="object"&&Le.dontIndentOnSlash,Ce=0;Ce<$e.length;Ce++){if(!$e[Ce].empty())return z.Pass;var De=$e[Ce].head,Ke=Be.getTokenAt(De),it=z.innerMode(Be.getMode(),Ke.state),tt=it.state;if(he&&(Ke.type=="string"||Ke.string.charAt(0)!="<"||Ke.start!=De.ch-1))return z.Pass;var ze,Ze=it.mode.name!="xml"&&Be.getMode().name=="htmlmixed";if(Ze&&it.mode.name=="javascript")ze=Ue+"script";else if(Ze&&it.mode.name=="css")ze=Ue+"style";else{var Xe=it.mode.xmlCurrentContext&&it.mode.xmlCurrentContext(tt);if(!Xe||Xe.length&&We(Be,Xe,Xe[Xe.length-1],De))return z.Pass;ze=Ue+Xe[Xe.length-1]}Be.getLine(De.line).charAt(Ke.end)!=">"&&(ze+=">"),be[Ce]=ze}if(Be.replaceSelections(be),$e=Be.listSelections(),!ge)for(var Ce=0;Ce<$e.length;Ce++)(Ce==$e.length-1||$e[Ce].head.line<$e[Ce+1].head.line)&&Be.indentLine($e[Ce].head.line)}function we(Be){return Be.getOption("disableInput")?z.Pass:xe(Be,!0)}z.commands.closeTag=function(Be){return xe(Be)};function He(Be,he){if(Be.indexOf)return Be.indexOf(he);for(var $e=0,be=Be.length;$e<be;++$e)if(Be[$e]==he)return $e;return-1}function We(Be,he,$e,be,Ue){if(!z.scanForClosingTag)return!1;var Le=Math.min(Be.lastLine()+1,be.line+500),ge=z.scanForClosingTag(Be,be,null,Le);if(!ge||ge.tag!=$e)return!1;for(var Ce=Ue?1:0,De=he.length-1;De>=0&&he[De]==$e;De--)++Ce;be=ge.to;for(var De=1;De<Ce;De++){var Ke=z.scanForClosingTag(Be,be,null,Le);if(!Ke||Ke.tag!=$e)return!1;be=Ke.to}return!0}})},52730:function(_t,Pt,ce){(function(z){z(ce(89780))})(function(z){"use strict";var Ye=z.Pos;function Oe(De,Ke){return De.line-Ke.line||De.ch-Ke.ch}var Ve="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",xe=Ve+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",we=new RegExp("<(/?)(["+Ve+"]["+xe+"]*)","g");function He(De,Ke,it,tt){this.line=Ke,this.ch=it,this.cm=De,this.text=De.getLine(Ke),this.min=tt?Math.max(tt.from,De.firstLine()):De.firstLine(),this.max=tt?Math.min(tt.to-1,De.lastLine()):De.lastLine()}function We(De,Ke){var it=De.cm.getTokenTypeAt(Ye(De.line,Ke));return it&&/\btag\b/.test(it)}function Be(De){if(!(De.line>=De.max))return De.ch=0,De.text=De.cm.getLine(++De.line),!0}function he(De){if(!(De.line<=De.min))return De.text=De.cm.getLine(--De.line),De.ch=De.text.length,!0}function $e(De){for(;;){var Ke=De.text.indexOf(">",De.ch);if(Ke==-1){if(Be(De))continue;return}if(!We(De,Ke+1)){De.ch=Ke+1;continue}var it=De.text.lastIndexOf("/",Ke),tt=it>-1&&!/\S/.test(De.text.slice(it+1,Ke));return De.ch=Ke+1,tt?"selfClose":"regular"}}function be(De){for(;;){var Ke=De.ch?De.text.lastIndexOf("<",De.ch-1):-1;if(Ke==-1){if(he(De))continue;return}if(!We(De,Ke+1)){De.ch=Ke;continue}we.lastIndex=Ke,De.ch=Ke;var it=we.exec(De.text);if(it&&it.index==Ke)return it}}function Ue(De){for(;;){we.lastIndex=De.ch;var Ke=we.exec(De.text);if(!Ke){if(Be(De))continue;return}if(!We(De,Ke.index+1)){De.ch=Ke.index+1;continue}return De.ch=Ke.index+Ke[0].length,Ke}}function Le(De){for(;;){var Ke=De.ch?De.text.lastIndexOf(">",De.ch-1):-1;if(Ke==-1){if(he(De))continue;return}if(!We(De,Ke+1)){De.ch=Ke;continue}var it=De.text.lastIndexOf("/",Ke),tt=it>-1&&!/\S/.test(De.text.slice(it+1,Ke));return De.ch=Ke+1,tt?"selfClose":"regular"}}function ge(De,Ke){for(var it=[];;){var tt=Ue(De),ze,Ze=De.line,Xe=De.ch-(tt?tt[0].length:0);if(!tt||!(ze=$e(De)))return;if(ze!="selfClose")if(tt[1]){for(var _e=it.length-1;_e>=0;--_e)if(it[_e]==tt[2]){it.length=_e;break}if(_e<0&&(!Ke||Ke==tt[2]))return{tag:tt[2],from:Ye(Ze,Xe),to:Ye(De.line,De.ch)}}else it.push(tt[2])}}function Ce(De,Ke){for(var it=[];;){var tt=Le(De);if(!tt)return;if(tt=="selfClose"){be(De);continue}var ze=De.line,Ze=De.ch,Xe=be(De);if(!Xe)return;if(Xe[1])it.push(Xe[2]);else{for(var _e=it.length-1;_e>=0;--_e)if(it[_e]==Xe[2]){it.length=_e;break}if(_e<0&&(!Ke||Ke==Xe[2]))return{tag:Xe[2],from:Ye(De.line,De.ch),to:Ye(ze,Ze)}}}}z.registerHelper("fold","xml",function(De,Ke){for(var it=new He(De,Ke.line,0);;){var tt=Ue(it);if(!tt||it.line!=Ke.line)return;var ze=$e(it);if(!ze)return;if(!tt[1]&&ze!="selfClose"){var Ze=Ye(it.line,it.ch),Xe=ge(it,tt[2]);return Xe&&Oe(Xe.from,Ze)>0?{from:Ze,to:Xe.from}:null}}}),z.findMatchingTag=function(De,Ke,it){var tt=new He(De,Ke.line,Ke.ch,it);if(!(tt.text.indexOf(">")==-1&&tt.text.indexOf("<")==-1)){var ze=$e(tt),Ze=ze&&Ye(tt.line,tt.ch),Xe=ze&&be(tt);if(!(!ze||!Xe||Oe(tt,Ke)>0)){var _e={from:Ye(tt.line,tt.ch),to:Ze,tag:Xe[2]};return ze=="selfClose"?{open:_e,close:null,at:"open"}:Xe[1]?{open:Ce(tt,Xe[2]),close:_e,at:"close"}:(tt=new He(De,Ze.line,Ze.ch,it),{open:_e,close:ge(tt,Xe[2]),at:"open"})}}},z.findEnclosingTag=function(De,Ke,it,tt){for(var ze=new He(De,Ke.line,Ke.ch,it);;){var Ze=Ce(ze,tt);if(!Ze)break;var Xe=new He(De,Ke.line,Ke.ch,it),_e=ge(Xe,Ze.tag);if(_e)return{open:Ze,close:_e}}},z.scanForClosingTag=function(De,Ke,it,tt){var ze=new He(De,Ke.line,Ke.ch,tt?{from:0,to:tt}:null);return ge(ze,it)}})},89780:function(_t){(function(Pt,ce){_t.exports=ce()})(this,function(){"use strict";var Pt=navigator.userAgent,ce=navigator.platform,z=/gecko\/\d/i.test(Pt),Ye=/MSIE \d/.test(Pt),Oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Pt),Ve=/Edge\/(\d+)/.exec(Pt),xe=Ye||Oe||Ve,we=xe&&(Ye?document.documentMode||6:+(Ve||Oe)[1]),He=!Ve&&/WebKit\//.test(Pt),We=He&&/Qt\/\d+\.\d+/.test(Pt),Be=!Ve&&/Chrome\//.test(Pt),he=/Opera\//.test(Pt),$e=/Apple Computer/.test(navigator.vendor),be=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Pt),Ue=/PhantomJS/.test(Pt),Le=!Ve&&/AppleWebKit/.test(Pt)&&/Mobile\/\w+/.test(Pt),ge=/Android/.test(Pt),Ce=Le||ge||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Pt),De=Le||/Mac/.test(ce),Ke=/\bCrOS\b/.test(Pt),it=/win/i.test(ce),tt=he&&Pt.match(/Version\/(\d*\.\d*)/);tt&&(tt=Number(tt[1])),tt&&tt>=15&&(he=!1,He=!0);var ze=De&&(We||he&&(tt==null||tt<12.11)),Ze=z||xe&&we>=9;function Xe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var _e=function(a,y){var x=a.className,b=Xe(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 Ot(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Qe(a,y){return Ot(a).appendChild(y)}function je(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 te=0;te<y.length;++te)E.appendChild(y[te]);return E}function ct(a,y,x,b){var E=je(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 Ge(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 ke(){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 Te(a,y){var x=a.className;Xe(y).test(x)||(a.className+=(x?" ":"")+y)}function ht(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!Xe(x[b]).test(y)&&(y+=" "+x[b]);return y}var dt=function(a){a.select()};Le?dt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:xe&&(dt=function(a){try{a.select()}catch(y){}});function Rt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function wt(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function ve(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var te=b||0,ie=E||0;;){var le=a.indexOf(" ",te);if(le<0||le>=y)return ie+(y-te);ie+=le-te,ie+=x-ie%x,te=le+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=Rt(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 qe(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var kt=50,yt={toString:function(){return"CodeMirror.Pass"}},Ne={scroll:!1},at={origin:"*mouse"},nt={origin:"+move"};function Tt(a,y,x){for(var b=0,E=0;;){var te=a.indexOf(" ",b);te==-1&&(te=a.length);var ie=te-b;if(te==a.length||E+ie>=y)return b+Math.min(ie,y-E);if(E+=te-b,E+=x-E%x,b=te+1,E>=y)return b}}var ut=[""];function At(a){for(;ut.length<=a;)ut.push(Ie(ut)+" ");return ut[a]}function Ie(a){return a[a.length-1]}function pt(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function mt(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&&wt(y,x),x}var ee=/[\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()||ee.test(a))}function se(a,y){return y?y.source.indexOf("\\w")>-1&&oe(a)?!0:y.test(a):oe(a)}function re(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var Se=/[\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 et(a){return a.charCodeAt(0)>=768&&Se.test(a)}function Lt(a,y,x){for(;(x<0?y>0:y<a.length)&&et(a.charAt(y));)y+=x;return y}function vt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,te=b<0?Math.ceil(E):Math.floor(E);if(te==y)return a(te)?y:x;a(te)?x=te:y=te+b}}function bt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,te=0;te<a.length;++te){var ie=a[te];(ie.from<x&&ie.to>y||y==x&&ie.to==y)&&(b(Math.max(ie.from,y),Math.min(ie.to,x),ie.level==1?"rtl":"ltr",te),E=!0)}E||b(y,x,"ltr")}var St=null;function Gt(a,y,x){var b;St=null;for(var E=0;E<a.length;++E){var te=a[E];if(te.from<y&&te.to>y)return E;te.to==y&&(te.from!=te.to&&x=="before"?b=E:St=E),te.from==y&&(te.from!=te.to&&x!="before"?b=E:St=E)}return b!=null?b:St}var jt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(fe){return fe<=247?a.charAt(fe):1424<=fe&&fe<=1524?"R":1536<=fe&&fe<=1785?y.charAt(fe-1536):1774<=fe&&fe<=2220?"r":8192<=fe&&fe<=8203?"w":fe==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,te=/[LRr]/,ie=/[Lb1n]/,le=/[1n]/;function ue(fe,Ae,Fe){this.level=fe,this.from=Ae,this.to=Fe}return function(fe,Ae){var Fe=Ae=="ltr"?"L":"R";if(fe.length==0||Ae=="ltr"&&!b.test(fe))return!1;for(var ot=fe.length,Je=[],Et=0;Et<ot;++Et)Je.push(x(fe.charCodeAt(Et)));for(var Ht=0,nn=Fe;Ht<ot;++Ht){var vn=Je[Ht];vn=="m"?Je[Ht]=nn:nn=vn}for(var kn=0,mn=Fe;kn<ot;++kn){var Mn=Je[kn];Mn=="1"&&mn=="r"?Je[kn]="n":te.test(Mn)&&(mn=Mn,Mn=="r"&&(Je[kn]="R"))}for(var rr=1,Kn=Je[0];rr<ot-1;++rr){var Sr=Je[rr];Sr=="+"&&Kn=="1"&&Je[rr+1]=="1"?Je[rr]="1":Sr==","&&Kn==Je[rr+1]&&(Kn=="1"||Kn=="n")&&(Je[rr]=Kn),Kn=Sr}for(var Zr=0;Zr<ot;++Zr){var hi=Je[Zr];if(hi==",")Je[Zr]="N";else if(hi=="%"){var Jr=void 0;for(Jr=Zr+1;Jr<ot&&Je[Jr]=="%";++Jr);for(var Ii=Zr&&Je[Zr-1]=="!"||Jr<ot&&Je[Jr]=="1"?"1":"N",Fi=Zr;Fi<Jr;++Fi)Je[Fi]=Ii;Zr=Jr-1}}for(var ri=0,Pi=Fe;ri<ot;++ri){var bi=Je[ri];Pi=="L"&&bi=="1"?Je[ri]="L":te.test(bi)&&(Pi=bi)}for(var si=0;si<ot;++si)if(E.test(Je[si])){var ii=void 0;for(ii=si+1;ii<ot&&E.test(Je[ii]);++ii);for(var qr=(si?Je[si-1]:Fe)=="L",Mi=(ii<ot?Je[ii]:Fe)=="L",Vo=qr==Mi?qr?"L":"R":Fe,xo=si;xo<ii;++xo)Je[xo]=Vo;si=ii-1}for(var Ci=[],io,pi=0;pi<ot;)if(ie.test(Je[pi])){var bl=pi;for(++pi;pi<ot&&ie.test(Je[pi]);++pi);Ci.push(new ue(0,bl,pi))}else{var uo=pi,Do=Ci.length,_o=Ae=="rtl"?1:0;for(++pi;pi<ot&&Je[pi]!="L";++pi);for(var Ai=uo;Ai<pi;)if(le.test(Je[Ai])){uo<Ai&&(Ci.splice(Do,0,new ue(1,uo,Ai)),Do+=_o);var Uo=Ai;for(++Ai;Ai<pi&&le.test(Je[Ai]);++Ai);Ci.splice(Do,0,new ue(2,Uo,Ai)),Do+=_o,uo=Ai}else++Ai;uo<pi&&Ci.splice(Do,0,new ue(1,uo,pi))}return Ae=="ltr"&&(Ci[0].level==1&&(io=fe.match(/^\s+/))&&(Ci[0].from=io[0].length,Ci.unshift(new ue(0,0,io[0].length))),Ie(Ci).level==1&&(io=fe.match(/\s+$/))&&(Ie(Ci).to-=io[0].length,Ci.push(new ue(0,ot-io[0].length,ot)))),Ae=="rtl"?Ci.reverse():Ci}}();function rn(a,y){var x=a.order;return x==null&&(x=a.order=jt(a.text,y)),x}var on=[],Bt=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]||on).concat(x)}};function Sn(a,y){return a._handlers&&a._handlers[y]||on}function Yt(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 te=qe(E,x);te>-1&&(b[y]=E.slice(0,te).concat(E.slice(te+1)))}}}function sn(a,y){var x=Sn(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function ft(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),sn(a,x||y.type,a,y),yn(y)||y.codemirrorIgnore}function wn(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)qe(x,y[b])==-1&&x.push(y[b])}function Ut(a,y){return Sn(a,y).length>0}function Jt(a){a.prototype.on=function(y,x){Bt(this,y,x)},a.prototype.off=function(y,x){Yt(this,y,x)}}function gn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Xn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function yn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function On(a){gn(a),Xn(a)}function Cr(a){return a.target||a.srcElement}function ar(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),De&&a.ctrlKey&&y==1&&(y=3),y}var Hr=function(){if(xe&&we<9)return!1;var a=je("div");return"draggable"in a||"dragDrop"in a}(),Or;function kr(a){if(Or==null){var y=je("span","\u200B");Qe(a,je("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Or=y.offsetWidth<=1&&y.offsetHeight>2&&!(xe&&we<8))}var x=Or?je("span","\u200B"):je("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var mr;function bn(a){if(mr!=null)return mr;var y=Qe(a,document.createTextNode("A\u062EA")),x=Me(y,0,1).getBoundingClientRect(),b=Me(y,1,2).getBoundingClientRect();return Ot(a),!x||x.left==x.right?!1:mr=b.right-x.right<3}var lr=`
|
|
|
|
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 te=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ie=te.indexOf("\r");ie!=-1?(x.push(te.slice(0,ie)),y+=ie+1):(x.push(te),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},pr=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},Gn=function(){var a=je("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),wr=null;function Ft(a){if(wr!=null)return wr;var y=Qe(a,je("span","x")),x=y.getBoundingClientRect(),b=Me(y,0,1).getBoundingClientRect();return wr=Math.abs(x.left-b.left)>1}var zt={},gt={};function Ct(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),zt[a]=y}function en(a,y){gt[a]=y}function pn(a){if(typeof a=="string"&>.hasOwnProperty(a))a=gt[a];else if(a&&typeof a.name=="string"&>.hasOwnProperty(a.name)){var y=gt[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 pn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return pn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function cn(a,y){y=pn(y);var x=zt[y.name];if(!x)return cn(a,"text/plain");var b=x(a,y);if(Nn.hasOwnProperty(y.name)){var E=Nn[y.name];for(var te in E)E.hasOwnProperty(te)&&(b.hasOwnProperty(te)&&(b["_"+te]=b[te]),b[te]=E[te])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var ie in y.modeProps)b[ie]=y.modeProps[ie];return b}var Nn={};function Vn(a,y){var x=Nn.hasOwnProperty(a)?Nn[a]:Nn[a]={};wt(y,x)}function Hn(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 Bn(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 Rn(a,y,x){return a.startState?a.startState(y,x):!0}var Mt=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};Mt.prototype.eol=function(){return this.pos>=this.string.length},Mt.prototype.sol=function(){return this.pos==this.lineStart},Mt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Mt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Mt.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},Mt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Mt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Mt.prototype.skipToEnd=function(){this.pos=this.string.length},Mt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Mt.prototype.backUp=function(a){this.pos-=a},Mt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},Mt.prototype.indentation=function(){return ve(this.string,null,this.tabSize)-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},Mt.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(ie){return x?ie.toLowerCase():ie},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var te=this.string.slice(this.pos).match(a);return te&&te.index>0?null:(te&&y!==!1&&(this.pos+=te[0].length),te)}},Mt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Mt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Mt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Mt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function lt(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],te=E.chunkSize();if(y<te){x=E;break}y-=te}return x.lines[y]}function Vt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(te){var ie=te.text;E==x.line&&(ie=ie.slice(0,x.ch)),E==y.line&&(ie=ie.slice(y.ch)),b.push(ie),++E}),b}function En(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function jn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Pe(a){if(a.parent==null)return null;for(var y=a.parent,x=qe(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 Re(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],te=E.height;if(y<te){a=E;continue e}y-=te,x+=E.chunkSize()}return x}while(!a.lines);for(var ie=0;ie<a.lines.length;++ie){var le=a.lines[ie],ue=le.height;if(y<ue)break;y-=ue}return x+ie}function Wt(a,y){return y>=a.first&&y<a.first+a.size}function Ee(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function me(a,y,x){if(x===void 0&&(x=null),!(this instanceof me))return new me(a,y,x);this.line=a,this.ch=y,this.sticky=x}function ye(a,y){return a.line-y.line||a.ch-y.ch}function rt(a,y){return a.sticky==y.sticky&&ye(a,y)==0}function Zt(a){return me(a.line,a.ch)}function $t(a,y){return ye(a,y)<0?y:a}function xt(a,y){return ye(a,y)<0?a:y}function st(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function pe(a,y){if(y.line<a.first)return me(a.first,0);var x=a.first+a.size-1;return y.line>x?me(x,lt(a,x).text.length):qt(y,lt(a,y.line).text.length)}function qt(a,y){var x=a.ch;return x==null||x>y?me(a.line,y):x<0?me(a.line,0):a}function Dt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=pe(a,y[b]);return x}var an=function(a,y){this.state=a,this.lookAhead=y},dn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};dn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},dn.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}},dn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dn.fromSaved=function(a,y,x){return y instanceof an?new dn(a,Hn(a.mode,y.state),x,y.lookAhead):new dn(a,Hn(a.mode,y),x)},dn.prototype.save=function(a){var y=a!==!1?Hn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new an(y,this.maxLookAhead):y};function Cn(a,y,x,b){var E=[a.state.modeGen],te={};nr(a,y.text,a.doc.mode,x,function(fe,Ae){return E.push(fe,Ae)},te,b);for(var ie=x.state,le=function(fe){x.baseTokens=E;var Ae=a.state.overlays[fe],Fe=1,ot=0;x.state=!0,nr(a,y.text,Ae.mode,x,function(Je,Et){for(var Ht=Fe;ot<Je;){var nn=E[Fe];nn>Je&&E.splice(Fe,1,Je,E[Fe+1],nn),Fe+=2,ot=Math.min(Je,nn)}if(Et)if(Ae.opaque)E.splice(Ht,Fe-Ht,Je,"overlay "+Et),Fe=Ht+2;else for(;Ht<Fe;Ht+=2){var vn=E[Ht+1];E[Ht+1]=(vn?vn+" ":"")+"overlay "+Et}},te),x.state=ie,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)le(ue);return{styles:E,classes:te.bgClass||te.textClass?te:null}}function hn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=er(a,Pe(y)),E=y.text.length>a.options.maxHighlightLength&&Hn(a.doc.mode,b.state),te=Cn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=te.styles,te.classes?y.styleClasses=te.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 er(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new dn(b,!0,y);var te=Jn(a,y,x),ie=te>b.first&<(b,te-1).stateAfter,le=ie?dn.fromSaved(b,ie,te):new dn(b,Rn(b.mode),te);return b.iter(te,y,function(ue){Dn(a,ue.text,le);var fe=le.line;ue.stateAfter=fe==y-1||fe%5==0||fe>=E.viewFrom&&fe<E.viewTo?le.save():null,le.nextLine()}),x&&(b.modeFrontier=le.line),le}function Dn(a,y,x,b){var E=a.doc.mode,te=new Mt(y,a.options.tabSize,x);for(te.start=te.pos=b||0,y==""&&Ln(E,x.state);!te.eol();)Qn(E,te,x.state),te.start=te.pos}function Ln(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Bn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function Qn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Bn(a,x).mode);var te=a.token(y,x);if(y.pos>y.start)return te}throw new Error("Mode "+a.name+" failed to advance stream.")}var Fn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function tr(a,y,x,b){var E=a.doc,te=E.mode,ie;y=pe(E,y);var le=lt(E,y.line),ue=er(a,y.line,x),fe=new Mt(le.text,a.options.tabSize,ue),Ae;for(b&&(Ae=[]);(b||fe.pos<y.ch)&&!fe.eol();)fe.start=fe.pos,ie=Qn(te,fe,ue.state),b&&Ae.push(new Fn(fe,ie,Hn(E.mode,ue.state)));return b?Ae:new Fn(fe,ie,ue.state)}function fr(a,y){if(a)for(;;){var x=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;a=a.slice(0,x.index)+a.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";y[b]==null?y[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(y[b])||(y[b]+=" "+x[2])}return a}function nr(a,y,x,b,E,te,ie){var le=x.flattenSpans;le==null&&(le=a.options.flattenSpans);var ue=0,fe=null,Ae=new Mt(y,a.options.tabSize,b),Fe,ot=a.options.addModeClass&&[null];for(y==""&&fr(Ln(x,b.state),te);!Ae.eol();){if(Ae.pos>a.options.maxHighlightLength?(le=!1,ie&&Dn(a,y,b,Ae.pos),Ae.pos=y.length,Fe=null):Fe=fr(Qn(x,Ae,b.state,ot),te),ot){var Je=ot[0].name;Je&&(Fe="m-"+(Fe?Je+" "+Fe:Je))}if(!le||fe!=Fe){for(;ue<Ae.start;)ue=Math.min(Ae.start,ue+5e3),E(ue,fe);fe=Fe}Ae.start=Ae.pos}for(;ue<Ae.pos;){var Et=Math.min(Ae.pos,ue+5e3);E(Et,fe),ue=Et}}function Jn(a,y,x){for(var b,E,te=a.doc,ie=x?-1:y-(a.doc.mode.innerMode?1e3:100),le=y;le>ie;--le){if(le<=te.first)return te.first;var ue=lt(te,le-1),fe=ue.stateAfter;if(fe&&(!x||le+(fe instanceof an?fe.lookAhead:0)<=te.modeFrontier))return le;var Ae=ve(ue.text,null,a.options.tabSize);(E==null||b>Ae)&&(E=le-1,b=Ae)}return E}function Wn(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=lt(a,b).stateAfter;if(E&&(!(E instanceof an)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var zn=!1,un=!1;function br(){zn=!0}function xn(){un=!0}function Kt(a,y,x){this.marker=a,this.from=y,this.to=x}function Pn(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function _n(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function gr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function qn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,le=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);if(le||te.from==y&&ie.type=="bookmark"&&(!x||!te.marker.insertLeft)){var ue=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);(b||(b=[])).push(new Kt(ie,te.from,ue?null:te.to))}}return b}function Tn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,le=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);if(le||te.from==y&&ie.type=="bookmark"&&(!x||te.marker.insertLeft)){var ue=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);(b||(b=[])).push(new Kt(ie,ue?null:te.from-y,te.to==null?null:te.to-y))}}return b}function hr(a,y){if(y.full)return null;var x=Wt(a,y.from.line)&<(a,y.from.line).markedSpans,b=Wt(a,y.to.line)&<(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,te=y.to.ch,ie=ye(y.from,y.to)==0,le=qn(x,E,ie),ue=Tn(b,te,ie),fe=y.text.length==1,Ae=Ie(y.text).length+(fe?E:0);if(le)for(var Fe=0;Fe<le.length;++Fe){var ot=le[Fe];if(ot.to==null){var Je=Pn(ue,ot.marker);Je?fe&&(ot.to=Je.to==null?null:Je.to+Ae):ot.to=E}}if(ue)for(var Et=0;Et<ue.length;++Et){var Ht=ue[Et];if(Ht.to!=null&&(Ht.to+=Ae),Ht.from==null){var nn=Pn(le,Ht.marker);nn||(Ht.from=Ae,fe&&(le||(le=[])).push(Ht))}else Ht.from+=Ae,fe&&(le||(le=[])).push(Ht)}le&&(le=In(le)),ue&&ue!=le&&(ue=In(ue));var vn=[le];if(!fe){var kn=y.text.length-2,mn;if(kn>0&&le)for(var Mn=0;Mn<le.length;++Mn)le[Mn].to==null&&(mn||(mn=[])).push(new Kt(le[Mn].marker,null,null));for(var rr=0;rr<kn;++rr)vn.push(mn);vn.push(ue)}return vn}function In(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 Yn(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Je){if(Je.markedSpans)for(var Et=0;Et<Je.markedSpans.length;++Et){var Ht=Je.markedSpans[Et].marker;Ht.readOnly&&(!b||qe(b,Ht)==-1)&&(b||(b=[])).push(Ht)}}),!b)return null;for(var E=[{from:y,to:x}],te=0;te<b.length;++te)for(var ie=b[te],le=ie.find(0),ue=0;ue<E.length;++ue){var fe=E[ue];if(!(ye(fe.to,le.from)<0||ye(fe.from,le.to)>0)){var Ae=[ue,1],Fe=ye(fe.from,le.from),ot=ye(fe.to,le.to);(Fe<0||!ie.inclusiveLeft&&!Fe)&&Ae.push({from:fe.from,to:le.from}),(ot>0||!ie.inclusiveRight&&!ot)&&Ae.push({from:le.to,to:fe.to}),E.splice.apply(E,Ae),ue+=Ae.length-3}}return E}function Zn(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Lr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function sr(a){return a.inclusiveLeft?-1:0}function jr(a){return a.inclusiveRight?1:0}function Kr(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),te=ye(b.from,E.from)||sr(a)-sr(y);if(te)return-te;var ie=ye(b.to,E.to)||jr(a)-jr(y);return ie||y.id-a.id}function Rr(a,y){var x=un&&a.markedSpans,b;if(x)for(var E=void 0,te=0;te<x.length;++te)E=x[te],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||Kr(b,E.marker)<0)&&(b=E.marker);return b}function ur(a){return Rr(a,!0)}function It(a){return Rr(a,!1)}function Qt(a,y){var x=un&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var te=x[E];te.marker.collapsed&&(te.from==null||te.from<y)&&(te.to==null||te.to>y)&&(!b||Kr(b,te.marker)<0)&&(b=te.marker)}return b}function An(a,y,x,b,E){var te=lt(a,y),ie=un&&te.markedSpans;if(ie)for(var le=0;le<ie.length;++le){var ue=ie[le];if(ue.marker.collapsed){var fe=ue.marker.find(0),Ae=ye(fe.from,x)||sr(ue.marker)-sr(E),Fe=ye(fe.to,b)||jr(ue.marker)-jr(E);if(!(Ae>=0&&Fe<=0||Ae<=0&&Fe>=0)&&(Ae<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?ye(fe.to,x)>=0:ye(fe.to,x)>0)||Ae>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?ye(fe.from,b)<=0:ye(fe.from,b)<0)))return!0}}}function fn(a){for(var y;y=ur(a);)a=y.find(-1,!0).line;return a}function Un(a){for(var y;y=It(a);)a=y.find(1,!0).line;return a}function Xt(a){for(var y,x;y=It(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Nt(a,y){var x=lt(a,y),b=fn(x);return x==b?y:Pe(b)}function tn(a,y){if(y>a.lastLine())return y;var x=lt(a,y),b;if(!ln(a,x))return y;for(;b=It(x);)x=b.find(1,!0).line;return Pe(x)+1}function ln(a,y){var x=un&&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&&ir(a,y,b))return!0}}}function ir(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return ir(a,b.line,Pn(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,te=0;te<y.markedSpans.length;++te)if(E=y.markedSpans[te],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&ir(a,y,E))return!0}function cr(a){a=fn(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 te=x.parent;te;x=te,te=x.parent)for(var ie=0;ie<te.children.length;++ie){var le=te.children[ie];if(le==x)break;y+=le.height}return y}function Fr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=ur(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=It(b);){var te=x.find(0,!0);y-=b.text.length-te.from.ch,b=te.to.line,y+=b.text.length-te.to.ch}return y}function vr(a){var y=a.display,x=a.doc;y.maxLine=lt(x,x.first),y.maxLineLength=Fr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Fr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Er=function(a,y,x){this.text=a,Lr(this,y),this.height=x?x(this):1};Er.prototype.lineNo=function(){return Pe(this)},Jt(Er);function Nr(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Zn(a),Lr(a,x);var E=b?b(a):1;E!=a.height&&jn(a,E)}function Gr(a){a.parent=null,Zn(a)}var _r={},Yr={};function Mr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Yr:_r;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function oi(a,y){var x=ct("span",null,null,He?"padding-right: .1px":null),b={pre:ct("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var te=E?y.rest[E-1]:y.line,ie=void 0;b.pos=0,b.addToken=Hi,bn(a.display.measure)&&(ie=rn(te,a.doc.direction))&&(b.addToken=ni(b.addToken,ie)),b.map=[];var le=y!=a.display.externalMeasured&&Pe(te);vi(te,b,hn(a,te,le)),te.styleClasses&&(te.styleClasses.bgClass&&(b.bgClass=ht(te.styleClasses.bgClass,b.bgClass||"")),te.styleClasses.textClass&&(b.textClass=ht(te.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(kr(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(He){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return sn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=ht(b.pre.className,b.textClass||"")),b}function Vr(a){var y=je("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Hi(a,y,x,b,E,te,ie){if(y){var le=a.splitSpaces?ui(y,a.trailingSpace):y,ue=a.cm.state.specialChars,fe=!1,Ae;if(!ue.test(y))a.col+=y.length,Ae=document.createTextNode(le),a.map.push(a.pos,a.pos+y.length,Ae),xe&&we<9&&(fe=!0),a.pos+=y.length;else{Ae=document.createDocumentFragment();for(var Fe=0;;){ue.lastIndex=Fe;var ot=ue.exec(y),Je=ot?ot.index-Fe:y.length-Fe;if(Je){var Et=document.createTextNode(le.slice(Fe,Fe+Je));xe&&we<9?Ae.appendChild(je("span",[Et])):Ae.appendChild(Et),a.map.push(a.pos,a.pos+Je,Et),a.col+=Je,a.pos+=Je}if(!ot)break;Fe+=Je+1;var Ht=void 0;if(ot[0]==" "){var nn=a.cm.options.tabSize,vn=nn-a.col%nn;Ht=Ae.appendChild(je("span",At(vn),"cm-tab")),Ht.setAttribute("role","presentation"),Ht.setAttribute("cm-text"," "),a.col+=vn}else ot[0]=="\r"||ot[0]==`
|
|
`?(Ht=Ae.appendChild(je("span",ot[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ht.setAttribute("cm-text",ot[0]),a.col+=1):(Ht=a.cm.options.specialCharPlaceholder(ot[0]),Ht.setAttribute("cm-text",ot[0]),xe&&we<9?Ae.appendChild(je("span",[Ht])):Ae.appendChild(Ht),a.col+=1);a.map.push(a.pos,a.pos+1,Ht),a.pos++}}if(a.trailingSpace=le.charCodeAt(y.length-1)==32,x||b||E||fe||te||ie){var kn=x||"";b&&(kn+=b),E&&(kn+=E);var mn=je("span",[Ae],kn,te);if(ie)for(var Mn in ie)ie.hasOwnProperty(Mn)&&Mn!="style"&&Mn!="class"&&mn.setAttribute(Mn,ie[Mn]);return a.content.appendChild(mn)}a.content.appendChild(Ae)}}function ui(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var te=a.charAt(E);te==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(te="\xA0"),b+=te,x=te==" "}return b}function ni(a,y){return function(x,b,E,te,ie,le,ue){E=E?E+" cm-force-border":"cm-force-border";for(var fe=x.pos,Ae=fe+b.length;;){for(var Fe=void 0,ot=0;ot<y.length&&(Fe=y[ot],!(Fe.to>fe&&Fe.from<=fe));ot++);if(Fe.to>=Ae)return a(x,b,E,te,ie,le,ue);a(x,b.slice(0,Fe.to-fe),E,te,null,le,ue),te=null,b=b.slice(Fe.to-fe),fe=Fe.to}}}function Ar(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 vi(a,y,x){var b=a.markedSpans,E=a.text,te=0;if(!b){for(var ie=1;ie<x.length;ie+=2)y.addToken(y,E.slice(te,te=x[ie]),Mr(x[ie+1],y.cm.options));return}for(var le=E.length,ue=0,fe=1,Ae="",Fe,ot,Je=0,Et,Ht,nn,vn,kn;;){if(Je==ue){Et=Ht=nn=ot="",kn=null,vn=null,Je=1/0;for(var mn=[],Mn=void 0,rr=0;rr<b.length;++rr){var Kn=b[rr],Sr=Kn.marker;if(Sr.type=="bookmark"&&Kn.from==ue&&Sr.widgetNode)mn.push(Sr);else if(Kn.from<=ue&&(Kn.to==null||Kn.to>ue||Sr.collapsed&&Kn.to==ue&&Kn.from==ue)){if(Kn.to!=null&&Kn.to!=ue&&Je>Kn.to&&(Je=Kn.to,Ht=""),Sr.className&&(Et+=" "+Sr.className),Sr.css&&(ot=(ot?ot+";":"")+Sr.css),Sr.startStyle&&Kn.from==ue&&(nn+=" "+Sr.startStyle),Sr.endStyle&&Kn.to==Je&&(Mn||(Mn=[])).push(Sr.endStyle,Kn.to),Sr.title&&((kn||(kn={})).title=Sr.title),Sr.attributes)for(var Zr in Sr.attributes)(kn||(kn={}))[Zr]=Sr.attributes[Zr];Sr.collapsed&&(!vn||Kr(vn.marker,Sr)<0)&&(vn=Kn)}else Kn.from>ue&&Je>Kn.from&&(Je=Kn.from)}if(Mn)for(var hi=0;hi<Mn.length;hi+=2)Mn[hi+1]==Je&&(Ht+=" "+Mn[hi]);if(!vn||vn.from==ue)for(var Jr=0;Jr<mn.length;++Jr)Ar(y,0,mn[Jr]);if(vn&&(vn.from||0)==ue){if(Ar(y,(vn.to==null?le+1:vn.to)-ue,vn.marker,vn.from==null),vn.to==null)return;vn.to==ue&&(vn=!1)}}if(ue>=le)break;for(var Ii=Math.min(le,Je);;){if(Ae){var Fi=ue+Ae.length;if(!vn){var ri=Fi>Ii?Ae.slice(0,Ii-ue):Ae;y.addToken(y,ri,Fe?Fe+Et:Et,nn,ue+ri.length==Je?Ht:"",ot,kn)}if(Fi>=Ii){Ae=Ae.slice(Ii-ue),ue=Ii;break}ue=Fi,nn=""}Ae=E.slice(te,te=x[fe++]),Fe=Mr(x[fe++],y.cm.options)}}}function Ui(a,y,x){this.line=y,this.rest=Xt(y),this.size=this.rest?Pe(Ie(this.rest))-x+1:1,this.node=this.text=null,this.hidden=ln(a,y)}function Qr(a,y,x){for(var b=[],E,te=y;te<x;te=E){var ie=new Ui(a.doc,lt(a.doc,te),te);E=te+ie.size,b.push(ie)}return b}var Wi=null;function Si(a){Wi?Wi.ops.push(a):a.ownsGroup=Wi={ops:[a],delayedCallbacks:[]}}function ci(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 oo(a,y){var x=a.ownsGroup;if(x)try{ci(x)}finally{Wi=null,y(x)}}var Bi=null;function Wr(a,y){var x=Sn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Wi?E=Wi.delayedCallbacks:Bi?E=Bi:(E=Bi=[],setTimeout(Br,0));for(var te=function(le){E.push(function(){return x[le].apply(null,b)})},ie=0;ie<x.length;++ie)te(ie)}}function Br(){var a=Bi;Bi=null;for(var y=0;y<a.length;++y)a[y]()}function ai(a,y,x,b){for(var E=0;E<y.changes.length;E++){var te=y.changes[E];te=="text"?Ki(a,y):te=="gutter"?yr(a,y,x,b):te=="class"?$n(a,y):te=="widget"&&or(a,y,b)}y.changes=null}function mi(a){return a.node==a.text&&(a.node=je("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),xe&&we<8&&(a.node.style.zIndex=2)),a.node}function Xr(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=mi(y);y.background=b.insertBefore(je("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function eo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):oi(a,y)}function Ki(a,y){var x=y.text.className,b=eo(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,$n(a,y)):x&&(y.text.className=x)}function $n(a,y){Xr(a,y),y.line.wrapClass?mi(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 yr(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=mi(y);y.gutterBackground=je("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 te=y.line.gutterMarkers;if(a.options.lineNumbers||te){var ie=mi(y),le=y.gutter=je("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(le),ie.insertBefore(le,y.text),y.line.gutterClass&&(le.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(y.lineNumber=le.appendChild(je("div",Ee(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),te)for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var fe=a.display.gutterSpecs[ue].className,Ae=te.hasOwnProperty(fe)&&te[fe];Ae&&le.appendChild(je("div",[Ae],"CodeMirror-gutter-elt","left: "+b.gutterLeft[fe]+"px; width: "+b.gutterWidth[fe]+"px"))}}}function or(a,y,x){y.alignable&&(y.alignable=null);for(var b=Xe("CodeMirror-linewidget"),E=y.node.firstChild,te=void 0;E;E=te)te=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);Pr(a,y,x)}function dr(a,y,x,b){var E=eo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),$n(a,y),yr(a,y,x,b),Pr(a,y,b),y.node}function Pr(a,y,x){if(zr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)zr(a,y.rest[b],y,x,!1)}function zr(a,y,x,b,E){if(y.widgets)for(var te=mi(x),ie=0,le=y.widgets;ie<le.length;++ie){var ue=le[ie],fe=je("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||fe.setAttribute("cm-ignore-events","true"),Yi(ue,fe,x,b),a.display.input.setUneditable(fe),E&&ue.above?te.insertBefore(fe,x.gutter||x.text):te.appendChild(fe),Wr(ue,"redraw")}}function Yi(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 Ei(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Ge(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;"),Qe(y.display.measure,je("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function gi(a,y){for(var x=Cr(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 $r(a){return a.lineSpace.offsetTop}function ji(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function to(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Qe(a.measure,je("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 Ti(a){return kt-a.display.nativeBarWidth}function no(a){return a.display.scroller.clientWidth-Ti(a)-a.display.barWidth}function ao(a){return a.display.scroller.clientHeight-Ti(a)-a.display.barHeight}function Xi(a,y,x){var b=a.options.lineWrapping,E=b&&no(a);if(!y.measure.heights||b&&y.measure.width!=E){var te=y.measure.heights=[];if(b){y.measure.width=E;for(var ie=y.text.firstChild.getClientRects(),le=0;le<ie.length-1;le++){var ue=ie[le],fe=ie[le+1];Math.abs(ue.bottom-fe.bottom)>2&&te.push((ue.bottom+fe.top)/2-x.top)}}te.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(Pe(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=fn(y);var x=Pe(y),b=a.display.externalMeasured=new Ui(a.doc,y,x);b.lineN=x;var E=b.built=oi(a,b);return b.text=E.pre,Qe(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Gi(a,co(a,y),x,b)}function ro(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[So(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function co(a,y){var x=Pe(y),b=ro(a,x);b&&!b.text?b=null:b&&b.changes&&(ai(a,b,x,fo(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 Gi(a,y,x,b,E){y.before&&(x=-1);var te=x+(b||""),ie;return y.cache.hasOwnProperty(te)?ie=y.cache[te]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Xi(a,y.view,y.rect),y.hasHeights=!0),ie=wa(a,y,x,b),ie.bogus||(y.cache[te]=ie)),{left:ie.left,right:ie.right,top:E?ie.rtop:ie.top,bottom:E?ie.rbottom:ie.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,te,ie,le,ue,fe=0;fe<a.length;fe+=3)if(le=a[fe],ue=a[fe+1],y<le?(E=0,te=1,ie="left"):y<ue?(E=y-le,te=E+1):(fe==a.length-3||y==ue&&a[fe+3]>y)&&(te=ue-le,E=te-1,y>=ue&&(ie="right")),E!=null){if(b=a[fe+2],le==ue&&x==(b.insertLeft?"left":"right")&&(ie=x),x=="left"&&E==0)for(;fe&&a[fe-2]==a[fe-3]&&a[fe-1].insertLeft;)b=a[(fe-=3)+2],ie="left";if(x=="right"&&E==ue-le)for(;fe<a.length-3&&a[fe+3]==a[fe+4]&&!a[fe+5].insertLeft;)b=a[(fe+=3)+2],ie="right";break}return{node:b,start:E,end:te,collapse:ie,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),te=E.node,ie=E.start,le=E.end,ue=E.collapse,fe;if(te.nodeType==3){for(var Ae=0;Ae<4;Ae++){for(;ie&&et(y.line.text.charAt(E.coverStart+ie));)--ie;for(;E.coverStart+le<E.coverEnd&&et(y.line.text.charAt(E.coverStart+le));)++le;if(xe&&we<9&&ie==0&&le==E.coverEnd-E.coverStart?fe=te.parentNode.getBoundingClientRect():fe=Va(Me(te,ie,le).getClientRects(),b),fe.left||fe.right||ie==0)break;le=ie,ie=ie-1,ue="right"}xe&&we<11&&(fe=Ua(a.display.measure,fe))}else{ie>0&&(ue=b="right");var Fe;a.options.lineWrapping&&(Fe=te.getClientRects()).length>1?fe=Fe[b=="right"?Fe.length-1:0]:fe=te.getBoundingClientRect()}if(xe&&we<9&&!ie&&(!fe||!fe.left&&!fe.right)){var ot=te.parentNode.getClientRects()[0];ot?fe={left:ot.left,right:ot.left+Qi(a.display),top:ot.top,bottom:ot.bottom}:fe=ba}for(var Je=fe.top-y.rect.top,Et=fe.bottom-y.rect.top,Ht=(Je+Et)/2,nn=y.view.measure.heights,vn=0;vn<nn.length-1&&!(Ht<nn[vn]);vn++);var kn=vn?nn[vn-1]:0,mn=nn[vn],Mn={left:(ue=="right"?fe.right:fe.left)-y.rect.left,right:(ue=="left"?fe.left:fe.right)-y.rect.left,top:kn,bottom:mn};return!fe.left&&!fe.right&&(Mn.bogus=!0),a.options.singleCursorHeightPerLine||(Mn.rtop=Je,Mn.rbottom=Et),Mn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ft(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,Ot(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ko(a.display.view[y])}function wo(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 Xo(){return Be&&ge?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return Be&&ge?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Jo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=Ei(a.widgets[x]));return y}function Fo(a,y,x,b,E){if(!E){var te=Jo(y);x.top+=te,x.bottom+=te}if(b=="line")return x;b||(b="local");var ie=cr(y);if(b=="local"?ie+=$r(a.display):ie-=a.display.viewOffset,b=="page"||b=="window"){var le=a.display.lineSpace.getBoundingClientRect();ie+=le.top+(b=="window"?0:Ca());var ue=le.left+(b=="window"?0:Xo());x.left+=ue,x.right+=ue}return x.top+=ie,x.bottom+=ie,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();else if(x=="local"||!x){var te=a.display.sizer.getBoundingClientRect();b+=te.left,E+=te.top}var ie=a.display.lineSpace.getBoundingClientRect();return{left:b-ie.left,top:E-ie.top}}function Po(a,y,x,b,E){return b||(b=lt(a.doc,y.line)),Fo(a,b,ya(a,b,y.ch,E),x)}function Di(a,y,x,b,E,te){b=b||lt(a.doc,y.line),E||(E=co(a,b));function ie(Et,Ht){var nn=Gi(a,E,Et,Ht?"right":"left",te);return Ht?nn.left=nn.right:nn.right=nn.left,Fo(a,b,nn,x)}var le=rn(b,a.doc.direction),ue=y.ch,fe=y.sticky;if(ue>=b.text.length?(ue=b.text.length,fe="before"):ue<=0&&(ue=0,fe="after"),!le)return ie(fe=="before"?ue-1:ue,fe=="before");function Ae(Et,Ht,nn){var vn=le[Ht],kn=vn.level==1;return ie(nn?Et-1:Et,kn!=nn)}var Fe=Gt(le,ue,fe),ot=St,Je=Ae(ue,Fe,fe=="before");return ot!=null&&(Je.other=Ae(ue,ot,fe!="before")),Je}function Dr(a,y){var x=0;y=pe(a.doc,y),a.options.lineWrapping||(x=Qi(a.display)*y.ch);var b=lt(a.doc,y.line),E=cr(b)+$r(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function xr(a,y,x,b,E){var te=me(a,y,x);return te.xRel=E,b&&(te.outside=b),te}function yi(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return xr(b.first,0,null,-1,-1);var E=Re(b,x),te=b.first+b.size-1;if(E>te)return xr(b.first+b.size-1,lt(b,te).text.length,null,1,1);y<0&&(y=0);for(var ie=lt(b,E);;){var le=Ji(a,ie,E,y,x),ue=Qt(ie,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var fe=ue.find(1);if(fe.line==E)return fe;ie=lt(b,E=fe.line)}}function xi(a,y,x,b){b-=Jo(y);var E=y.text.length,te=vt(function(ie){return Gi(a,x,ie-1).bottom<=b},E,0);return E=vt(function(ie){return Gi(a,x,ie).top>b},te,E),{begin:te,end:E}}function ei(a,y,x,b){x||(x=co(a,y));var E=Fo(a,y,Gi(a,x,b),"line").top;return xi(a,y,x,E)}function li(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Ji(a,y,x,b,E){E-=cr(y);var te=co(a,y),ie=Jo(y),le=0,ue=y.text.length,fe=!0,Ae=rn(y,a.doc.direction);if(Ae){var Fe=(a.options.lineWrapping?lo:Vi)(a,y,x,te,Ae,b,E);fe=Fe.level!=1,le=fe?Fe.from:Fe.to-1,ue=fe?Fe.to:Fe.from-1}var ot=null,Je=null,Et=vt(function(rr){var Kn=Gi(a,te,rr);return Kn.top+=ie,Kn.bottom+=ie,li(Kn,b,E,!1)?(Kn.top<=E&&Kn.left<=b&&(ot=rr,Je=Kn),!0):!1},le,ue),Ht,nn,vn=!1;if(Je){var kn=b-Je.left<Je.right-b,mn=kn==fe;Et=ot+(mn?0:1),nn=mn?"after":"before",Ht=kn?Je.left:Je.right}else{!fe&&(Et==ue||Et==le)&&Et++,nn=Et==0?"after":Et==y.text.length?"before":Gi(a,te,Et-(fe?1:0)).bottom+ie<=E==fe?"after":"before";var Mn=Di(a,me(x,Et,nn),"line",y,te);Ht=Mn.left,vn=E<Mn.top?-1:E>=Mn.bottom?1:0}return Et=Lt(y.text,Et,1),xr(x,Et,nn,vn,b-Ht)}function Vi(a,y,x,b,E,te,ie){var le=vt(function(Fe){var ot=E[Fe],Je=ot.level!=1;return li(Di(a,me(x,Je?ot.to:ot.from,Je?"before":"after"),"line",y,b),te,ie,!0)},0,E.length-1),ue=E[le];if(le>0){var fe=ue.level!=1,Ae=Di(a,me(x,fe?ue.from:ue.to,fe?"after":"before"),"line",y,b);li(Ae,te,ie,!0)&&Ae.top>ie&&(ue=E[le-1])}return ue}function lo(a,y,x,b,E,te,ie){var le=xi(a,y,b,ie),ue=le.begin,fe=le.end;/\s/.test(y.text.charAt(fe-1))&&fe--;for(var Ae=null,Fe=null,ot=0;ot<E.length;ot++){var Je=E[ot];if(!(Je.from>=fe||Je.to<=ue)){var Et=Je.level!=1,Ht=Gi(a,b,Et?Math.min(fe,Je.to)-1:Math.max(ue,Je.from)).right,nn=Ht<te?te-Ht+1e9:Ht-te;(!Ae||Fe>nn)&&(Ae=Je,Fe=nn)}}return Ae||(Ae=E[E.length-1]),Ae.from<ue&&(Ae={from:ue,to:Ae.to,level:Ae.level}),Ae.to>fe&&(Ae={from:Ae.from,to:fe,level:Ae.level}),Ae}var Ni;function Oi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ni==null){Ni=je("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ni.appendChild(document.createTextNode("x")),Ni.appendChild(je("br"));Ni.appendChild(document.createTextNode("x"))}Qe(a.measure,Ni);var x=Ni.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Ot(a.measure),x||1}function Qi(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=je("span","xxxxxxxxxx"),x=je("pre",[y],"CodeMirror-line-like");Qe(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function fo(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,te=y.gutters.firstChild,ie=0;te;te=te.nextSibling,++ie){var le=a.display.gutterSpecs[ie].className;x[le]=te.offsetLeft+te.clientLeft+E,b[le]=te.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=Oi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Qi(a.display)-3);return function(E){if(ln(a.doc,E))return 0;var te=0;if(E.widgets)for(var ie=0;ie<E.widgets.length;ie++)E.widgets[ie].height&&(te+=E.widgets[ie].height);return x?te+(Math.ceil(E.text.length/b)||1)*y:te+y}}function Ya(a){var y=a.doc,x=wl(a);y.iter(function(b){var E=x(b);E!=b.height&&jn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&Cr(y).getAttribute("cm-not-content")=="true")return null;var te,ie,le=E.lineSpace.getBoundingClientRect();try{te=y.clientX-le.left,ie=y.clientY-le.top}catch(Fe){return null}var ue=yi(a,te,ie),fe;if(b&&ue.xRel>0&&(fe=lt(a.doc,ue.line).text).length==ue.ch){var Ae=ve(fe,fe.length,a.options.tabSize)-fe.length;ue=me(ue.line,Math.max(0,Math.round((te-to(a.display).left)/Qi(a.display))-Ae))}return ue}function So(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 _i(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)un&&Nt(a.doc,y)<E.viewTo&&po(a);else if(x<=E.viewFrom)un&&tn(a.doc,x+b)>E.viewFrom?po(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)po(a);else if(y<=E.viewFrom){var te=Ea(a,x,x+b,1);te?(E.view=E.view.slice(te.index),E.viewFrom=te.lineN,E.viewTo+=b):po(a)}else if(x>=E.viewTo){var ie=Ea(a,y,y,-1);ie?(E.view=E.view.slice(0,ie.index),E.viewTo=ie.lineN):po(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(Qr(a,le.lineN,ue.lineN)).concat(E.view.slice(ue.index)),E.viewTo+=b):po(a)}var fe=E.externalMeasured;fe&&(x<fe.lineN?fe.lineN+=b:y<fe.lineN+fe.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 te=b.view[So(a,y)];if(te.node!=null){var ie=te.changes||(te.changes=[]);qe(ie,x)==-1&&ie.push(x)}}}function po(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=So(a,y),te,ie=a.display.view;if(!un||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var le=a.display.viewFrom,ue=0;ue<E;ue++)le+=ie[ue].size;if(le!=y){if(b>0){if(E==ie.length-1)return null;te=le+ie[E].size-y,E++}else te=le-y;y+=te,x+=te}for(;Nt(a.doc,x)!=x;){if(E==(b<0?0:ie.length-1))return null;x+=b*ie[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hs(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=Qr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Qr(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(So(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(Qr(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(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 Qo(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(),te=b.selection=document.createDocumentFragment(),ie=0;ie<x.sel.ranges.length;ie++)if(!(!y&&ie==x.sel.primIndex)){var le=x.sel.ranges[ie];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||Ws(a,le,te)}}return b}function El(a,y,x){var b=Di(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(je("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 te=x.appendChild(je("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=b.other.left+"px",te.style.top=b.other.top+"px",te.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ka(a,y){return a.top-y.top||a.left-y.left}function Ws(a,y,x){var b=a.display,E=a.doc,te=document.createDocumentFragment(),ie=to(a.display),le=ie.left,ue=Math.max(b.sizerWidth,no(a)-b.sizer.offsetLeft)-ie.right,fe=E.direction=="ltr";function Ae(mn,Mn,rr,Kn){Mn<0&&(Mn=0),Mn=Math.round(Mn),Kn=Math.round(Kn),te.appendChild(je("div",null,"CodeMirror-selected","position: absolute; left: "+mn+`px;
|
|
top: `+Mn+"px; width: "+(rr==null?ue-mn:rr)+`px;
|
|
height: `+(Kn-Mn)+"px"))}function Fe(mn,Mn,rr){var Kn=lt(E,mn),Sr=Kn.text.length,Zr,hi;function Jr(ri,Pi){return Po(a,me(mn,ri),"div",Kn,Pi)}function Ii(ri,Pi,bi){var si=ei(a,Kn,null,ri),ii=Pi=="ltr"==(bi=="after")?"left":"right",qr=bi=="after"?si.begin:si.end-(/\s/.test(Kn.text.charAt(si.end-1))?2:1);return Jr(qr,ii)[ii]}var Fi=rn(Kn,E.direction);return bt(Fi,Mn||0,rr==null?Sr:rr,function(ri,Pi,bi,si){var ii=bi=="ltr",qr=Jr(ri,ii?"left":"right"),Mi=Jr(Pi-1,ii?"right":"left"),Vo=Mn==null&&ri==0,xo=rr==null&&Pi==Sr,Ci=si==0,io=!Fi||si==Fi.length-1;if(Mi.top-qr.top<=3){var pi=(fe?Vo:xo)&&Ci,bl=(fe?xo:Vo)&&io,uo=pi?le:(ii?qr:Mi).left,Do=bl?ue:(ii?Mi:qr).right;Ae(uo,qr.top,Do-uo,qr.bottom)}else{var _o,Ai,Uo,xl;ii?(_o=fe&&Vo&&Ci?le:qr.left,Ai=fe?ue:Ii(ri,bi,"before"),Uo=fe?le:Ii(Pi,bi,"after"),xl=fe&&xo&&io?ue:Mi.right):(_o=fe?Ii(ri,bi,"before"):le,Ai=!fe&&Vo&&Ci?ue:qr.right,Uo=!fe&&xo&&io?le:Mi.left,xl=fe?Ii(Pi,bi,"after"):ue),Ae(_o,qr.top,Ai-_o,qr.bottom),qr.bottom<Mi.top&&Ae(le,qr.bottom,null,Mi.top),Ae(Uo,Mi.top,xl-Uo,Mi.bottom)}(!Zr||ka(qr,Zr)<0)&&(Zr=qr),ka(Mi,Zr)<0&&(Zr=Mi),(!hi||ka(qr,hi)<0)&&(hi=qr),ka(Mi,hi)<0&&(hi=Mi)}),{start:Zr,end:hi}}var ot=y.from(),Je=y.to();if(ot.line==Je.line)Fe(ot.line,ot.ch,Je.ch);else{var Et=lt(E,ot.line),Ht=lt(E,Je.line),nn=fn(Et)==fn(Ht),vn=Fe(ot.line,ot.ch,nn?Et.text.length+1:null).end,kn=Fe(Je.line,nn?0:null,Je.ch).start;nn&&(vn.top<kn.top-2?(Ae(vn.right,vn.top,null,vn.bottom),Ae(le,kn.top,kn.left,kn.bottom)):Ae(vn.right,vn.top,kn.left-vn.right,vn.bottom)),vn.bottom<kn.top&&Ae(le,vn.bottom,null,kn.top)}x.appendChild(te)}function Xa(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()||Mo(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(),Ja(a))}function Al(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Mo(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(sn(a,"focus",a,y),a.state.focused=!0,Te(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),He&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Mo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(sn(a,"blur",a,y),a.state.focused=!1,_e(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],te=a.options.lineWrapping,ie=void 0,le=0;if(!E.hidden){if(xe&&we<8){var ue=E.node.offsetTop+E.node.offsetHeight;ie=ue-x,x=ue}else{var fe=E.node.getBoundingClientRect();ie=fe.bottom-fe.top,!te&&E.text.firstChild&&(le=E.text.firstChild.getBoundingClientRect().right-fe.left-1)}var Ae=E.line.height-ie;if((Ae>.005||Ae<-.005)&&(jn(E.line,ie),Bl(E.line),E.rest))for(var Fe=0;Fe<E.rest.length;Fe++)Bl(E.rest[Fe]);if(le>a.display.sizerWidth){var ot=Math.ceil(le/Qi(a.display));ot>a.display.maxLineLength&&(a.display.maxLineLength=ot,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-$r(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,te=Re(y,b),ie=Re(y,E);if(x&&x.ensure){var le=x.ensure.from.line,ue=x.ensure.to.line;le<te?(te=le,ie=Re(y,cr(lt(y,le))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=ie&&(te=Re(y,cr(lt(y,ue))-a.wrapper.clientHeight),ie=ue)}return{from:te,to:Math.max(ie,te+1)}}function zs(a,y){if(!ft(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&&!Ue){var te=je("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-x.viewOffset-$r(a.display))+`px;
|
|
height: `+(y.bottom-y.top+Ti(a)+x.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(te),te.scrollIntoView(E),a.display.lineSpace.removeChild(te)}}}function Zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?me(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?me(y.line,y.ch+1,"before"):y);for(var te=0;te<5;te++){var ie=!1,le=Di(a,y),ue=!x||x==y?le:Di(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 fe=Qa(a,E),Ae=a.doc.scrollTop,Fe=a.doc.scrollLeft;if(fe.scrollTop!=null&&($o(a,fe.scrollTop),Math.abs(a.doc.scrollTop-Ae)>1&&(ie=!0)),fe.scrollLeft!=null&&(Eo(a,fe.scrollLeft),Math.abs(a.doc.scrollLeft-Fe)>1&&(ie=!0)),!ie)break}return E}function js(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&Eo(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Oi(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,te=ao(a),ie={};y.bottom-y.top>te&&(y.bottom=y.top+te);var le=a.doc.height+ji(x),ue=y.top<b,fe=y.bottom>le-b;if(y.top<E)ie.scrollTop=ue?0:y.top;else if(y.bottom>E+te){var Ae=Math.min(y.top,(fe?le:y.bottom)-te);Ae!=E&&(ie.scrollTop=Ae)}var Fe=a.options.fixedGutter?0:x.gutters.offsetWidth,ot=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Fe,Je=no(a)-x.gutters.offsetWidth,Et=y.right-y.left>Je;return Et&&(y.right=y.left+Je),y.left<10?ie.scrollLeft=0:y.left<ot?ie.scrollLeft=Math.max(0,y.left+Fe-(Et?0:10)):y.right>Je+ot-3&&(ie.scrollLeft=y.right+(Et?0:10)-Je),ie}function qa(a,y){y!=null&&(Da(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function To(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=Dr(a,y.from),b=Dr(a,y.to);Dl(a,x,b,y.margin)}}function Dl(a,y,x,b){var E=Qa(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||(z||el(a,{top:y}),_l(a,y,!0),z&&el(a),na(a,100))}function _l(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 Eo(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,Tl(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+ji(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+Ti(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=je("div",[je("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=je("div",[je("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Bt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Bt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xe&&we<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ko.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 te=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+te)+"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}},ko.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ko.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ko.prototype.zeroWidthHack=function(){var a=De&&!be?"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},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),te=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);te!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},ko.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 Fl={native:ko,null:ta};function Pl(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&_e(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Fl[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Bt(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"?Eo(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&Te(a.display.wrapper,a.display.scrollbars.addClass)}var Vs=0;function Ao(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},Si(a.curOp)}function Bo(a){var y=a.curOp;y&&oo(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Us(x)})}function Us(a){for(var y=a.ops,x=0;x<y.length;x++)Ks(y[x]);for(var b=0;b<y.length;b++)Ys(y[b]);for(var E=0;E<y.length;E++)Xs(y[E]);for(var te=0;te<y.length;te++)Js(y[te]);for(var ie=0;ie<y.length;ie++)Qs(y[ie])}function Ks(a){var y=a.cm,x=y.display;$s(y),a.updateMaxLine&&vr(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 _a(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xs(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+Ti(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-no(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Js(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Eo(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==ke();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&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&kl(a.cm)}function Qs(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Ml(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&_l(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Eo(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,pe(b,a.scrollToPos.from),pe(b,a.scrollToPos.to),a.scrollToPos.margin);zs(y,E)}var te=a.maybeHiddenMarkers,ie=a.maybeUnhiddenMarkers;if(te)for(var le=0;le<te.length;++le)te[le].lines.length||sn(te[le],"hide");if(ie)for(var ue=0;ue<ie.length;++ue)ie[ue].lines.length&&sn(ie[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&sn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Ri(a,y){if(a.curOp)return y();Ao(a);try{return y()}finally{Bo(a)}}function di(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Ao(a);try{return y.apply(a,arguments)}finally{Bo(a)}}}function ki(a){return function(){if(this.curOp)return a.apply(this,arguments);Ao(this);try{return a.apply(this,arguments)}finally{Bo(this)}}}function fi(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Ao(y);try{return a.apply(this,arguments)}finally{Bo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Rt(qs,a))}function qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=er(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(te){if(b.line>=a.display.viewFrom){var ie=te.styles,le=te.text.length>a.options.maxHighlightLength?Hn(y.mode,b.state):null,ue=Cn(a,te,b,!0);le&&(b.state=le),te.styles=ue.styles;var fe=te.styleClasses,Ae=ue.classes;Ae?te.styleClasses=Ae:fe&&(te.styleClasses=null);for(var Fe=!ie||ie.length!=te.styles.length||fe!=Ae&&(!fe||!Ae||fe.bgClass!=Ae.bgClass||fe.textClass!=Ae.textClass),ot=0;!Fe&&ot<ie.length;++ot)Fe=ie[ot]!=te.styles[ot];Fe&&E.push(b.line),te.stateAfter=b.save(),b.nextLine()}else te.text.length<=a.options.maxHighlightLength&&Dn(a,te.text,b),te.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&&Ri(a,function(){for(var te=0;te<E.length;te++)ho(a,E[te],"text")})}}var _a=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=no(a),this.force=x,this.dims=fo(a),this.events=[]};_a.prototype.signal=function(a,y){Ut(a,y)&&this.events.push(arguments)},_a.prototype.finish=function(){for(var a=0;a<this.events.length;a++)sn.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=Ti(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Ti(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=ke();if(!y||!Ge(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Ge(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==ke())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ge(document.body,a.anchorNode)&&Ge(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 po(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)&&(po(a),y.dims=fo(a));var E=b.first+b.size,te=Math.max(y.visible.from-a.options.viewportMargin,b.first),ie=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<te&&te-x.viewFrom<20&&(te=Math.max(b.first,x.viewFrom)),x.viewTo>ie&&x.viewTo-ie<20&&(ie=Math.min(E,x.viewTo)),un&&(te=Nt(a.doc,te),ie=tn(a.doc,ie));var le=te!=x.viewFrom||ie!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hs(a,te,ie),x.viewOffset=cr(lt(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 fe=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(fe),Ot(x.cursorDiv),Ot(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 Ml(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==no(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+ji(a.display)-ao(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);Qo(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 _a(a,y);if($a(a,x)){Aa(a),Ml(a,x);var b=ea(a);Qo(a),No(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,te=b.lineDiv,ie=te.firstChild;function le(Et){var Ht=Et.nextSibling;return He&&De&&a.display.currentWheelTarget==Et?Et.style.display="none":Et.parentNode.removeChild(Et),Ht}for(var ue=b.view,fe=b.viewFrom,Ae=0;Ae<ue.length;Ae++){var Fe=ue[Ae];if(!Fe.hidden)if(!Fe.node||Fe.node.parentNode!=te){var ot=dr(a,Fe,fe,x);te.insertBefore(ot,ie)}else{for(;ie!=Fe.node;)ie=le(ie);var Je=E&&y!=null&&y<=fe&&Fe.lineNumber;Fe.changes&&(qe(Fe.changes,"gutter")>-1&&(Je=!1),ai(a,Fe,fe,x)),Je&&(Ot(Fe.lineNumber),Fe.lineNumber.appendChild(document.createTextNode(Ee(a.options,fe)))),ie=Fe.node.nextSibling}fe+=Fe.size}for(;ie;)ie=le(ie)}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+Ti(a)+"px"}function Tl(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,te=b+"px",ie=0;ie<x.length;ie++)if(!x[ie].hidden){a.options.fixedGutter&&(x[ie].gutter&&(x[ie].gutter.style.left=te),x[ie].gutterBackground&&(x[ie].gutterBackground.style.left=te));var le=x[ie].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=te}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Nl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Ee(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(je("div",[je("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=E.firstChild.offsetWidth,ie=E.offsetWidth-te;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(te,b.lineGutter.offsetWidth-ie)+1,b.lineNumWidth=b.lineNumInnerWidth+ie,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function rl(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var te=a[E],ie=null;if(typeof te!="string"&&(ie=te.style,te=te.className),te=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:te,style:ie})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Ol(a){var y=a.gutters,x=a.gutterSpecs;Ot(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],te=E.className,ie=E.style,le=y.appendChild(je("div",null,"CodeMirror-gutter "+te));ie&&(le.style.cssText=ie),te=="CodeMirror-linenumbers"&&(a.lineGutter=le,le.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function ra(a){Ol(a.display),_i(a),Tl(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=je("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=je("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=ct("div",null,"CodeMirror-code"),E.selectionDiv=je("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=je("div",null,"CodeMirror-cursors"),E.measure=je("div",null,"CodeMirror-measure"),E.lineMeasure=je("div",null,"CodeMirror-measure"),E.lineSpace=ct("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var te=ct("div",[E.lineSpace],"CodeMirror-lines");E.mover=je("div",[te],null,"position: relative"),E.sizer=je("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=je("div",null,null,"position: absolute; height: "+kt+"px; width: 1px;"),E.gutters=je("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=je("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=je("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),xe&&we<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!He&&!(z&&Ce)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rl(b.gutters,b.lineNumbers),Ol(E),x.init(E)}var La=0,zi=null;xe?zi=-.53:z?zi=15:Be?zi=-.7:$e&&(zi=-1/3);function Rl(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function iu(a){var y=Rl(a);return y.x*=zi,y.y*=zi,y}function Il(a,y){var x=Rl(y),b=x.x,E=x.y,te=a.display,ie=te.scroller,le=ie.scrollWidth>ie.clientWidth,ue=ie.scrollHeight>ie.clientHeight;if(b&&le||E&&ue){if(E&&De&&He){e:for(var fe=y.target,Ae=te.view;fe!=ie;fe=fe.parentNode)for(var Fe=0;Fe<Ae.length;Fe++)if(Ae[Fe].node==fe){a.display.currentWheelTarget=fe;break e}}if(b&&!z&&!he&&zi!=null){E&&ue&&$o(a,Math.max(0,ie.scrollTop+E*zi)),Eo(a,Math.max(0,ie.scrollLeft+b*zi)),(!E||E&&ue)&&gn(y),te.wheelStartX=null;return}if(E&&zi!=null){var ot=E*zi,Je=a.doc.scrollTop,Et=Je+te.wrapper.clientHeight;ot<0?Je=Math.max(0,Je+ot-50):Et=Math.min(a.doc.height,Et+ot+50),el(a,{top:Je,bottom:Et})}La<20&&(te.wheelStartX==null?(te.wheelStartX=ie.scrollLeft,te.wheelStartY=ie.scrollTop,te.wheelDX=b,te.wheelDY=E,setTimeout(function(){if(te.wheelStartX!=null){var Ht=ie.scrollLeft-te.wheelStartX,nn=ie.scrollTop-te.wheelStartY,vn=nn&&te.wheelDY&&nn/te.wheelDY||Ht&&te.wheelDX&&Ht/te.wheelDX;te.wheelStartX=te.wheelStartY=null,vn&&(zi=(zi*La+vn)/(La+1),++La)}},200)):(te.wheelDX+=b,te.wheelDY+=E))}}var Zi=function(a,y){this.ranges=a,this.primIndex=y};Zi.prototype.primary=function(){return this.ranges[this.primIndex]},Zi.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(!rt(x.anchor,b.anchor)||!rt(x.head,b.head))return!1}return!0},Zi.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Tr(Zt(this.ranges[y].anchor),Zt(this.ranges[y].head));return new Zi(a,this.primIndex)},Zi.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Zi.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(ye(y,b.from())>=0&&ye(a,b.to())<=0)return x}return-1};var Tr=function(a,y){this.anchor=a,this.head=y};Tr.prototype.from=function(){return xt(this.anchor,this.head)},Tr.prototype.to=function(){return $t(this.anchor,this.head)},Tr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function qi(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(ot,Je){return ye(ot.from(),Je.from())}),x=qe(y,E);for(var te=1;te<y.length;te++){var ie=y[te],le=y[te-1],ue=ye(le.to(),ie.from());if(b&&!ie.empty()?ue>0:ue>=0){var fe=xt(le.from(),ie.from()),Ae=$t(le.to(),ie.to()),Fe=le.empty()?ie.from()==ie.head:le.from()==le.head;te<=x&&--x,y.splice(--te,2,new Tr(Fe?Ae:fe,Fe?fe:Ae))}}return new Zi(y,x)}function vo(a,y){return new Zi([new Tr(a,y||a)],0)}function mo(a){return a.text?me(a.from.line+a.text.length-1,Ie(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hl(a,y){if(ye(a,y.from)<0)return a;if(ye(a,y.to)<=0)return mo(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+=mo(y).ch-y.to.ch),me(x,b)}function il(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Tr(Hl(E.anchor,y),Hl(E.head,y)))}return qi(a.cm,x,a.sel.primIndex)}function Wl(a,y,x){return a.line==y.line?me(x.line,a.ch-y.ch+x.ch):me(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=me(a.first,0),te=E,ie=0;ie<y.length;ie++){var le=y[ie],ue=Wl(le.from,E,te),fe=Wl(mo(le),E,te);if(E=le.to,te=fe,x=="around"){var Ae=a.sel.ranges[ie],Fe=ye(Ae.head,Ae.anchor)<0;b[ie]=new Tr(Fe?fe:ue,Fe?ue:fe)}else b[ie]=new Tr(ue,ue)}return new Zi(b,a.sel.primIndex)}function ol(a){a.doc.mode=cn(a.options,a.doc.modeOption),ia(a)}function ia(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&&_i(a)}function zl(a,y){return y.from.ch==0&&y.to.ch==0&&Ie(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function al(a,y,x,b){function E(kn){return x?x[kn]:null}function te(kn,mn,Mn){Nr(kn,mn,Mn,b),Wr(kn,"change",kn,y)}function ie(kn,mn){for(var Mn=[],rr=kn;rr<mn;++rr)Mn.push(new Er(fe[rr],E(rr),b));return Mn}var le=y.from,ue=y.to,fe=y.text,Ae=lt(a,le.line),Fe=lt(a,ue.line),ot=Ie(fe),Je=E(fe.length-1),Et=ue.line-le.line;if(y.full)a.insert(0,ie(0,fe.length)),a.remove(fe.length,a.size-fe.length);else if(zl(a,y)){var Ht=ie(0,fe.length-1);te(Fe,Fe.text,Je),Et&&a.remove(le.line,Et),Ht.length&&a.insert(le.line,Ht)}else if(Ae==Fe)if(fe.length==1)te(Ae,Ae.text.slice(0,le.ch)+ot+Ae.text.slice(ue.ch),Je);else{var nn=ie(1,fe.length-1);nn.push(new Er(ot+Ae.text.slice(ue.ch),Je,b)),te(Ae,Ae.text.slice(0,le.ch)+fe[0],E(0)),a.insert(le.line+1,nn)}else if(fe.length==1)te(Ae,Ae.text.slice(0,le.ch)+fe[0]+Fe.text.slice(ue.ch),E(0)),a.remove(le.line+1,Et);else{te(Ae,Ae.text.slice(0,le.ch)+fe[0],E(0)),te(Fe,ot+Fe.text.slice(ue.ch),Je);var vn=ie(1,fe.length-1);Et>1&&a.remove(le.line+1,Et-1),a.insert(le.line+1,vn)}Wr(a,"change",a,y)}function go(a,y,x){function b(E,te,ie){if(E.linked)for(var le=0;le<E.linked.length;++le){var ue=E.linked[le];if(ue.doc!=te){var fe=ie&&ue.sharedHist;x&&!fe||(y(ue.doc,fe),b(ue.doc,E,fe))}}}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||vr(a),a.options.mode=y.modeOption,_i(a)}function jl(a){(a.doc.direction=="rtl"?Te:_e)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Ri(a,function(){jl(a),_i(a)})}function Fa(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:Zt(y.from),to:mo(y),text:Vt(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),go(a,function(b){return Ul(b,x,y.from.line,y.to.line+1)},!0),x}function Gl(a){for(;a.length;){var y=Ie(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return Gl(a.done),Ie(a.done);if(a.done.length&&!Ie(a.done).ranges)return Ie(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),Ie(a.done)}function Vl(a,y,x,b){var E=a.history;E.undone.length=0;var te=+new Date,ie,le;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>te-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ie=lu(E,E.lastOp==b)))le=Ie(ie.changes),ye(y.from,y.to)==0&&ye(y.from,le.to)==0?le.to=mo(y):ie.changes.push(ll(a,y));else{var ue=Ie(E.done);for((!ue||!ue.ranges)&&Pa(a.sel,E.done),ie={changes:[ll(a,y)],generation:E.generation},E.done.push(ie);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=te,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,le||sn(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,te=b&&b.origin;x==E.lastSelOp||te&&E.lastSelOrigin==te&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==te||su(a,te,Ie(E.done),y))?E.done[E.done.length-1]=y:Pa(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=te,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gl(E.undone)}function Pa(a,y){var x=Ie(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Ul(a,y,x,b){var E=y["spans_"+a.id],te=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(ie){ie.markedSpans&&((E||(E=y["spans_"+a.id]={}))[te]=ie.markedSpans),++te})}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=hr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var te=x[E],ie=b[E];if(te&&ie)e:for(var le=0;le<ie.length;++le){for(var ue=ie[le],fe=0;fe<te.length;++fe)if(te[fe].marker==ue.marker)continue e;te.push(ue)}else ie&&(x[E]=ie)}return x}function Oo(a,y,x){for(var b=[],E=0;E<a.length;++E){var te=a[E];if(te.ranges){b.push(x?Zi.prototype.deepCopy.call(te):te);continue}var ie=te.changes,le=[];b.push({changes:le});for(var ue=0;ue<ie.length;++ue){var fe=ie[ue],Ae=void 0;if(le.push({from:fe.from,to:fe.to,text:fe.text}),y)for(var Fe in fe)(Ae=Fe.match(/^spans_(\d+)$/))&&qe(y,Number(Ae[1]))>-1&&(Ie(le)[Fe]=fe[Fe],delete fe[Fe])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var te=ye(y,E)<0;te!=ye(x,E)<0?(E=y,y=x):te!=ye(y,x)<0&&(y=x)}return new Tr(E,y)}else return new Tr(x||y,y)}function Ma(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),wi(a,new Zi([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),te=0;te<a.sel.ranges.length;te++)b[te]=sl(a.sel.ranges[te],y[te],null,E);var ie=qi(a.cm,b,a.sel.primIndex);wi(a,ie,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,wi(a,qi(a.cm,E,a.sel.primIndex),b)}function Xl(a,y,x,b){wi(a,vo(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var te=0;te<E.length;te++)this.ranges[te]=new Tr(pe(a,E[te].anchor),pe(a,E[te].head))},origin:x&&x.origin};return sn(a,"beforeSelectionChange",a,b),a.cm&&sn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?qi(a.cm,b.ranges,b.ranges.length-1):y}function Jl(a,y,x){var b=a.history.done,E=Ie(b);E&&E.ranges?(b[b.length-1]=y,Ta(a,y,x)):wi(a,y,x)}function wi(a,y,x){Ta(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ta(a,y,x){(Ut(a,"beforeSelectionChange")||a.cm&&Ut(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(ye(y.primary().head,a.sel.primary().head)<0?-1:1);Ql(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&To(a.cm)}function Ql(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,wn(a.cm)),Wr(a,"cursorActivity",a))}function ql(a){Ql(a,$l(a,a.sel,null,!1))}function $l(a,y,x,b){for(var E,te=0;te<y.ranges.length;te++){var ie=y.ranges[te],le=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[te],ue=Na(a,ie.anchor,le&&le.anchor,x,b),fe=Na(a,ie.head,le&&le.head,x,b);(E||ue!=ie.anchor||fe!=ie.head)&&(E||(E=y.ranges.slice(0,te)),E[te]=new Tr(ue,fe))}return E?qi(a.cm,E,y.primIndex):y}function Ro(a,y,x,b,E){var te=lt(a,y.line);if(te.markedSpans)for(var ie=0;ie<te.markedSpans.length;++ie){var le=te.markedSpans[ie],ue=le.marker,fe="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Ae="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(fe?le.from<=y.ch:le.from<y.ch))&&(le.to==null||(Ae?le.to>=y.ch:le.to>y.ch))){if(E&&(sn(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(te.markedSpans){--ie;continue}else break;if(!ue.atomic)continue;if(x){var Fe=ue.find(b<0?1:-1),ot=void 0;if((b<0?Ae:fe)&&(Fe=es(a,Fe,-b,Fe&&Fe.line==y.line?te:null)),Fe&&Fe.line==y.line&&(ot=ye(Fe,x))&&(b<0?ot<0:ot>0))return Ro(a,Fe,y,b,E)}var Je=ue.find(b<0?-1:1);return(b<0?fe:Ae)&&(Je=es(a,Je,b,Je.line==y.line?te:null)),Je?Ro(a,Je,y,b,E):null}}return y}function Na(a,y,x,b,E){var te=b||1,ie=Ro(a,y,x,te,E)||!E&&Ro(a,y,x,te,!0)||Ro(a,y,x,-te,E)||!E&&Ro(a,y,x,-te,!0);return ie||(a.cantEdit=!0,me(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?pe(a,me(y.line-1)):null:x>0&&y.ch==(b||lt(a,y.line)).text.length?y.line<a.first+a.size-1?me(y.line+1,0):null:new me(y.line,y.ch+x)}function ts(a){a.setSelection(me(a.firstLine(),0),me(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,te,ie,le){E&&(b.from=pe(a,E)),te&&(b.to=pe(a,te)),ie&&(b.text=ie),le!==void 0&&(b.origin=le)}),sn(a,"beforeChange",a,b),a.cm&&sn(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 Io(a,y,x){if(a.cm){if(!a.cm.curOp)return di(a.cm,Io)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Ut(a,"beforeChange")||a.cm&&Ut(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=zn&&!x&&Yn(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rs(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rs(a,y)}}function rs(a,y){if(!(y.text.length==1&&y.text[0]==""&&ye(y.from,y.to)==0)){var x=il(a,y);Vl(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,hr(a,y));var b=[];go(a,function(E,te){!te&&qe(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),oa(E,y,null,hr(E,y))})}}function Oa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,te,ie=a.sel,le=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,fe=0;fe<le.length&&(te=le[fe],!(x?te.ranges&&!te.equals(a.sel):!te.ranges));fe++);if(fe!=le.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(te=le.pop(),te.ranges){if(Pa(te,ue),x&&!te.equals(a.sel)){wi(a,te,{clearRedo:!1});return}ie=te}else if(b){le.push(te);return}else break;var Ae=[];Pa(ie,ue),ue.push({changes:Ae,generation:E.generation}),E.generation=te.generation||++E.maxGeneration;for(var Fe=Ut(a,"beforeChange")||a.cm&&Ut(a.cm,"beforeChange"),ot=function(Ht){var nn=te.changes[Ht];if(nn.origin=y,Fe&&!ns(a,nn,!1))return le.length=0,{};Ae.push(ll(a,nn));var vn=Ht?il(a,nn):Ie(le);oa(a,nn,vn,Kl(a,nn)),!Ht&&a.cm&&a.cm.scrollIntoView({from:nn.from,to:mo(nn)});var kn=[];go(a,function(mn,Mn){!Mn&&qe(kn,mn.history)==-1&&(ls(mn.history,nn),kn.push(mn.history)),oa(mn,nn,null,Kl(mn,nn))})},Je=te.changes.length-1;Je>=0;--Je){var Et=ot(Je);if(Et)return Et.v}}}}function is(a,y){if(y!=0&&(a.first+=y,a.sel=new Zi(pt(a.sel.ranges,function(E){return new Tr(me(E.anchor.line+y,E.anchor.ch),me(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){_i(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 di(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){is(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);is(a,E),y={from:me(a.first,0),to:me(y.to.line+E,y.to.ch),text:[Ie(y.text)],origin:y.origin}}var te=a.lastLine();y.to.line>te&&(y={from:y.from,to:me(te,lt(a,te).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Vt(a,y.from,y.to),x||(x=il(a,y)),a.cm?hu(a.cm,y,b):al(a,y,b),Ta(a,x,Ne),a.cantEdit&&Na(a,me(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,te=y.from,ie=y.to,le=!1,ue=te.line;a.options.lineWrapping||(ue=Pe(fn(lt(b,te.line))),b.iter(ue,ie.line+1,function(Je){if(Je==E.maxLine)return le=!0,!0})),b.sel.contains(y.from,y.to)>-1&&wn(a),al(b,y,x,wl(a)),a.options.lineWrapping||(b.iter(ue,te.line+y.text.length,function(Je){var Et=Fr(Je);Et>E.maxLineLength&&(E.maxLine=Je,E.maxLineLength=Et,E.maxLineChanged=!0,le=!1)}),le&&(a.curOp.updateMaxLine=!0)),Wn(b,te.line),na(a,400);var fe=y.text.length-(ie.line-te.line)-1;y.full?_i(a):te.line==ie.line&&y.text.length==1&&!zl(a.doc,y)?ho(a,te.line,"text"):_i(a,te.line,ie.line+1,fe);var Ae=Ut(a,"changes"),Fe=Ut(a,"change");if(Fe||Ae){var ot={from:te,to:ie,text:y.text,removed:y.removed,origin:y.origin};Fe&&Wr(a,"change",a,ot),Ae&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(ot)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var te;b||(b=x),ye(b,x)<0&&(te=[b,x],x=te[0],b=te[1]),typeof y=="string"&&(y=a.splitLines(y)),Io(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 te=a[E],ie=!0;if(te.ranges){te.copied||(te=a[E]=te.deepCopy(),te.copied=!0);for(var le=0;le<te.ranges.length;le++)os(te.ranges[le].anchor,y,x,b),os(te.ranges[le].head,y,x,b);continue}for(var ue=0;ue<te.changes.length;++ue){var fe=te.changes[ue];if(x<fe.from.line)fe.from=me(fe.from.line+b,fe.from.ch),fe.to=me(fe.to.line+b,fe.to.ch);else if(y<=fe.to.line){ie=!1;break}}ie||(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,te=y;return typeof y=="number"?te=lt(a,st(a,y)):E=Pe(y),E==null?null:(b(te,E)&&a.cm&&ho(a.cm,E,x),te)}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,Gr(E),Wr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function 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 te=Math.min(y,E-a),ie=b.height;if(b.removeInner(a,te),this.height-=ie-b.height,E==te&&(this.children.splice(x--,1),b.parent=null),(y-=te)==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],te=E.chunkSize();if(a<=te){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var ie=E.lines.length%25+25,le=ie;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,ie),this.maybeSpill()}break}a-=te}},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=qe(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],te=E.chunkSize();if(a<te){var ie=Math.min(y,te-a);if(E.iterN(a,ie,x))return!0;if((y-=ie)==0)break;a=0}else a-=te}}};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=Pe(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 te=Ei(this);jn(x,Math.max(0,x.height-te)),a&&(Ri(a,function(){ss(a,x,-te),ho(a,b,"widget")}),Wr(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=Ei(this)-y;E&&(ln(this.doc,b)||jn(b,b.height+E),x&&Ri(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Wr(x,"lineWidgetChanged",x,a,Pe(b))}))},Jt(ua);function ss(a,y,x){cr(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),te=a.cm;return te&&E.noHScroll&&(te.display.alignWidgets=!0),aa(a,y,"widget",function(ie){var le=ie.widgets||(ie.widgets=[]);if(E.insertAt==null?le.push(E):le.splice(Math.min(le.length-1,Math.max(0,E.insertAt)),0,E),E.line=ie,te&&!ln(a,ie)){var ue=cr(ie)<a.scrollTop;jn(ie,ie.height+Ei(E)),ue&&qa(te,E.height),te.curOp.forceUpdate=!0}return!0}),te&&Wr(te,"lineWidgetAdded",te,E,typeof y=="number"?y:Pe(y)),E}var us=0,yo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};yo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Ao(a),Ut(this,"clear")){var x=this.find();x&&Wr(this,"clear",x.from,x.to)}for(var b=null,E=null,te=0;te<this.lines.length;++te){var ie=this.lines[te],le=Pn(ie.markedSpans,this);a&&!this.collapsed?ho(a,Pe(ie),"text"):a&&(le.to!=null&&(E=Pe(ie)),le.from!=null&&(b=Pe(ie))),ie.markedSpans=_n(ie.markedSpans,le),le.from==null&&this.collapsed&&!ln(this.doc,ie)&&a&&jn(ie,Oi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var fe=fn(this.lines[ue]),Ae=Fr(fe);Ae>a.display.maxLineLength&&(a.display.maxLine=fe,a.display.maxLineLength=Ae,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&_i(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&ql(a.doc)),a&&Wr(a,"markerCleared",a,this,b,E),y&&Bo(a),this.parent&&this.parent.clear()}},yo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var te=this.lines[E],ie=Pn(te.markedSpans,this);if(ie.from!=null&&(x=me(y?te:Pe(te),ie.from),a==-1))return x;if(ie.to!=null&&(b=me(y?te:Pe(te),ie.to),a==1))return b}return x&&{from:x,to:b}},yo.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Ri(b,function(){var E=y.line,te=Pe(y.line),ie=ro(b,te);if(ie&&(Ko(ie),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!ln(x.doc,E)&&x.height!=null){var le=x.height;x.height=null;var ue=Ei(x)-le;ue&&jn(E,E.height+ue)}Wr(b,"markerChanged",b,a)})},yo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||qe(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},yo.prototype.detachLine=function(a){if(this.lines.splice(qe(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Jt(yo);function Wo(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return di(a.cm,Wo)(a,y,x,b,E);var te=new yo(a,E),ie=ye(y,x);if(b&&wt(b,te,!1),ie>0||ie==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=ct("span",[te.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(An(a,y.line,y,x,te)||y.line!=x.line&&An(a,x.line,y,x,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");xn()}te.addToHistory&&Vl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var le=y.line,ue=a.cm,fe;if(a.iter(le,x.line+1,function(Fe){ue&&te.collapsed&&!ue.options.lineWrapping&&fn(Fe)==ue.display.maxLine&&(fe=!0),te.collapsed&&le!=y.line&&jn(Fe,0),gr(Fe,new Kt(te,le==y.line?y.ch:null,le==x.line?x.ch:null)),++le}),te.collapsed&&a.iter(y.line,x.line+1,function(Fe){ln(a,Fe)&&jn(Fe,0)}),te.clearOnEnter&&Bt(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(br(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),te.collapsed&&(te.id=++us,te.atomic=!0),ue){if(fe&&(ue.curOp.updateMaxLine=!0),te.collapsed)_i(ue,y.line,x.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var Ae=y.line;Ae<=x.line;Ae++)ho(ue,Ae,"text");te.atomic&&ql(ue.doc),Wr(ue,"markerAdded",ue,te)}return te}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();Wr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Jt(ca);function vu(a,y,x,b,E){b=wt(b),b.shared=!1;var te=[Wo(a,y,x,b,E)],ie=te[0],le=b.widgetNode;return go(a,function(ue){le&&(b.widgetNode=le.cloneNode(!0)),te.push(Wo(ue,pe(ue,y),pe(ue,x),b,E));for(var fe=0;fe<ue.linked.length;++fe)if(ue.linked[fe].isParent)return;ie=Ie(te)}),new ca(te,ie)}function cs(a){return a.findMarks(me(a.first,0),a.clipPos(me(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(),te=a.clipPos(E.from),ie=a.clipPos(E.to);if(ye(te,ie)){var le=Wo(a,te,ie,b.primary,b.primary.type);b.markers.push(le),le.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],te=[E.primary.doc];go(E.primary.doc,function(ue){return te.push(ue)});for(var ie=0;ie<E.markers.length;ie++){var le=E.markers[ie];qe(te,le.doc)==-1&&(le.parent=null,E.markers.splice(ie--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Li=function(a,y,x,b,E){if(!(this instanceof Li))return new Li(a,y,x,b,E);x==null&&(x=0),sa.call(this,[new la([new Er("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var te=me(x,0);this.sel=vo(te),this.history=new Fa(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:te,to:te,text:a}),wi(this,vo(te),Ne)};Li.prototype=ne(sa.prototype,{constructor:Li,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=En(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:fi(function(a){var y=me(this.first,0),x=this.first+this.size-1;Io(this,{from:y,to:me(x,lt(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),wi(this,vo(y),Ne)}),replaceRange:function(a,y,x,b){y=pe(this,y),x=x?pe(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Vt(this,pe(this,a),pe(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(Wt(this,a))return lt(this,a)},getLineNumber:function(a){return Pe(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=lt(this,a)),fn(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return pe(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:fi(function(a,y,x){Xl(this,pe(this,typeof a=="number"?me(a,y||0):a),null,x)}),setSelection:fi(function(a,y,x){Xl(this,pe(this,a),pe(this,y||a),x)}),extendSelection:fi(function(a,y,x){Ma(this,pe(this,a),y&&pe(this,y),x)}),extendSelections:fi(function(a,y){Yl(this,Dt(this,a),y)}),extendSelectionsBy:fi(function(a,y){var x=pt(this.sel.ranges,a);Yl(this,Dt(this,x),y)}),setSelections:fi(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Tr(pe(this,a[E].anchor),pe(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),wi(this,qi(this.cm,b,y),x)}}),addSelection:fi(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Tr(pe(this,a),pe(this,y||a))),wi(this,qi(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Vt(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=Vt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:fi(function(a,y,x){for(var b=[],E=this.sel,te=0;te<E.ranges.length;te++){var ie=E.ranges[te];b[te]={from:ie.from(),to:ie.to(),text:this.splitLines(a[te]),origin:x}}for(var le=y&&y!="end"&&ou(this,b,y),ue=b.length-1;ue>=0;ue--)Io(this,b[ue]);le?Jl(this,le):this.cm&&To(this.cm)}),undo:fi(function(){Oa(this,"undo")}),redo:fi(function(){Oa(this,"redo")}),undoSelection:fi(function(){Oa(this,"undo",!0)}),redoSelection:fi(function(){Oa(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 Fa(this.history.maxGeneration),go(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:Oo(this.history.done),undone:Oo(this.history.undone)}},setHistory:function(a){var y=this.history=new Fa(this.history.maxGeneration);y.done=Oo(a.done.slice(0),null,!0),y.undone=Oo(a.undone.slice(0),null,!0)},setGutterMarker:fi(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&re(E)&&(b.gutterMarkers=null),!0})}),clearGutter:fi(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,re(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Wt(this,a)||(y=a,a=lt(this,a),!a))return null}else if(y=Pe(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:fi(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(Xe(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:fi(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",te=b[E];if(te)if(x==null)b[E]=null;else{var ie=te.match(Xe(x));if(!ie)return!1;var le=ie.index+ie[0].length;b[E]=te.slice(0,ie.index)+(!ie.index||le==te.length?"":" ")+te.slice(le)||null}else return!1;return!0})}),addLineWidget:fi(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Wo(this,pe(this,a),pe(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=pe(this,a),Wo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=pe(this,a);var y=[],x=lt(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=pe(this,a),y=pe(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(te){var ie=te.markedSpans;if(ie)for(var le=0;le<ie.length;le++){var ue=ie[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 te=E.text.length+b;if(te>a)return y=a,!0;a-=te,++x}),pe(this,me(x,y))},indexFromPos:function(a){a=pe(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 Li(En(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 Li(En(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 Ur&&(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];go(a,function(E){return b.push(E.id)},!0),a.history=new Fa(null),a.history.done=Oo(this.history.done,b),a.history.undone=Oo(this.history.undone,b)}},iterLinkedDocs:function(a){go(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):lr(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:fi(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))})}),Li.prototype.eachLine=Li.prototype.iter;var ds=0;function bu(a){var y=this;if(fs(y),!(ft(y,a)||gi(y.display,a))){gn(a),xe&&(ds=+new Date);var x=Co(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,te=Array(E),ie=0,le=function(){++ie==E&&di(y,function(){x=pe(y.doc,x);var Je={from:x,to:x,text:y.doc.splitLines(te.filter(function(Et){return Et!=null}).join(y.doc.lineSeparator())),origin:"paste"};Io(y.doc,Je),Jl(y.doc,vo(pe(y.doc,x),pe(y.doc,mo(Je))))})()},ue=function(Je,Et){if(y.options.allowDropFileTypes&&qe(y.options.allowDropFileTypes,Je.type)==-1){le();return}var Ht=new FileReader;Ht.onerror=function(){return le()},Ht.onload=function(){var nn=Ht.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(nn)){le();return}te[Et]=nn,le()},Ht.readAsText(Je)},fe=0;fe<b.length;fe++)ue(b[fe],fe);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 Ae=a.dataTransfer.getData("Text");if(Ae){var Fe;if(y.state.draggingText&&!y.state.draggingText.copy&&(Fe=y.listSelections()),Ta(y.doc,vo(x,x)),Fe)for(var ot=0;ot<Fe.length;++ot)Ho(y.doc,"",Fe[ot].anchor,Fe[ot].head,"drag");y.replaceSelection(Ae,"around","paste"),y.display.input.focus()}}catch(Je){}}}}function xu(a,y){if(xe&&(!a.state.draggingText||+new Date-ds<100)){On(y);return}if(!(ft(a,y)||gi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!$e)){var x=je("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",he&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),he&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();El(a,x,b),a.display.dragCursor||(a.display.dragCursor=je("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Qe(a.display.dragCursor,b)}}function fs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hs(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 te=0;te<x.length;te++)a(x[te])})}}var ps=!1;function Cu(){ps||(Su(),ps=!0)}function Su(){var a;Bt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hs(Eu)},100))}),Bt(window,"blur",function(){return hs(Mo)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var bo={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++)bo[da+48]=bo[da+96]=String(da);for(var Ra=65;Ra<=90;Ra++)bo[Ra]=String.fromCharCode(Ra);for(var fa=1;fa<=12;fa++)bo[fa+111]=bo[fa+63235]="F"+fa;var so={};so.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"},so.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"},so.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"},so.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"]},so.default=De?so.macDefault:so.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,te,ie=0;ie<y.length-1;ie++){var le=y[ie];if(/^(cmd|meta|m)$/i.test(le))te=!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),te&&(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=pt(x.split(" "),ku),te=0;te<E.length;te++){var ie=void 0,le=void 0;te==E.length-1?(le=E.join(" "),ie=b):(le=E.slice(0,te+1).join(" "),ie="...");var ue=y[le];if(!ue)y[le]=ie;else if(ue!=ie)throw new Error("Inconsistent bindings for "+le)}delete a[x]}for(var fe in y)a[fe]=y[fe];return a}function zo(a,y,x,b){y=Ia(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 zo(a,y.fallthrough,x,b);for(var te=0;te<y.fallthrough.length;te++){var ie=zo(a,y.fallthrough[te],x,b);if(ie)return ie}}}function vs(a){var y=typeof a=="string"?a:bo[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),(ze?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(ze?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(he&&a.keyCode==34&&a.char)return!1;var x=bo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function Ia(a){return typeof a=="string"?so[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var te=y(x[E]);b.length&&ye(te.from,Ie(b).to)<=0;){var ie=b.pop();if(ye(ie.from,te.from)<0){te.from=ie.from;break}}b.push(te)}Ri(a,function(){for(var le=b.length-1;le>=0;le--)Ho(a.doc,"",b[le].from,b[le].to,"+delete");To(a)})}function cl(a,y,x){var b=Lt(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 me(y.line,b,x<0?"after":"before")}function fl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var te=rn(x,y.doc.direction);if(te){var ie=E<0?Ie(te):te[0],le=E<0==(ie.level==1),ue=le?"after":"before",fe;if(ie.level>0||y.doc.direction=="rtl"){var Ae=co(y,x);fe=E<0?x.text.length-1:0;var Fe=Gi(y,Ae,fe).top;fe=vt(function(ot){return Gi(y,Ae,ot).top==Fe},E<0==(ie.level==1)?ie.from:ie.to-1,fe),ue=="before"&&(fe=cl(x,fe,1))}else fe=E<0?ie.to:ie.from;return new me(b,fe,ue)}}return new me(b,E<0?x.text.length:0,E<0?"before":"after")}function Bu(a,y,x,b){var E=rn(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 te=Gt(E,x.ch,x.sticky),ie=E[te];if(a.doc.direction=="ltr"&&ie.level%2==0&&(b>0?ie.to>x.ch:ie.from<x.ch))return dl(y,x,b);var le=function(vn,kn){return cl(y,vn instanceof me?vn.ch:vn,kn)},ue,fe=function(vn){return a.options.lineWrapping?(ue=ue||co(a,y),ei(a,y,ue,vn)):{begin:0,end:y.text.length}},Ae=fe(x.sticky=="before"?le(x,-1):x.ch);if(a.doc.direction=="rtl"||ie.level==1){var Fe=ie.level==1==b<0,ot=le(x,Fe?1:-1);if(ot!=null&&(Fe?ot<=ie.to&&ot<=Ae.end:ot>=ie.from&&ot>=Ae.begin)){var Je=Fe?"before":"after";return new me(x.line,ot,Je)}}var Et=function(vn,kn,mn){for(var Mn=function(Zr,hi){return hi?new me(x.line,le(Zr,1),"before"):new me(x.line,Zr,"after")};vn>=0&&vn<E.length;vn+=kn){var rr=E[vn],Kn=kn>0==(rr.level!=1),Sr=Kn?mn.begin:le(mn.end,-1);if(rr.from<=Sr&&Sr<rr.to||(Sr=Kn?rr.from:le(rr.to,-1),mn.begin<=Sr&&Sr<mn.end))return Mn(Sr,Kn)}},Ht=Et(te+b,b,Ae);if(Ht)return Ht;var nn=b>0?Ae.end:le(Ae.begin,-1);return nn!=null&&!(b>0&&nn==y.text.length)&&(Ht=Et(b>0?0:E.length-1,b,fe(nn)),Ht)?Ht:null}var ha={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=lt(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:me(y.head.line+1,0)}:{from:y.head,to:me(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:me(y.from().line,0),to:pe(a.doc,me(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:me(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(me(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(me(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")},nt)},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")},nt)},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},nt)},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 te=x[E].from(),ie=ve(a.getLine(te.line),te.ch,b);y.push(At(b-ie%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Ri(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,te=lt(a.doc,E.line).text;if(te){if(E.ch==te.length&&(E=new me(E.line,E.ch-1)),E.ch>0)E=new me(E.line,E.ch+1),a.replaceRange(te.charAt(E.ch-1)+te.charAt(E.ch-2),me(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ie=lt(a.doc,E.line-1).text;ie&&(E=new me(E.line,1),a.replaceRange(te.charAt(0)+a.doc.lineSeparator()+ie.charAt(ie.length-1),me(E.line-1,ie.length-1),E,"+transpose"))}}x.push(new Tr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Ri(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);To(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=lt(a.doc,y),b=fn(x);return b!=x&&(y=Pe(b)),fl(!0,a,b,y,1)}function Du(a,y){var x=lt(a.doc,y),b=Un(x);return b!=x&&(y=Pe(b)),fl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=lt(a.doc,x.line),E=rn(b,a.doc.direction);if(!E||E[0].level==0){var te=Math.max(x.ch,b.text.search(/\S/)),ie=y.line==x.line&&y.ch<=te&&y.ch;return me(x.line,ie?0:te,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=ha[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)!=yt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function _u(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=zo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&zo(y,a.options.extraKeys,x,a)||zo(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=_u(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Wr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(gn(x),Xa(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 Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Fu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var hl=null;function Cs(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=ke(),!ft(y,a))){xe&&we<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=ws(y,a);he&&(hl=b?x:null,!b&&x==88&&!Gn&&(De?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),z&&!De&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Pu(y)}}function Pu(a){var y=a.display.lineDiv;Te(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(_e(y,"CodeMirror-crosshair"),Yt(document,"keyup",x),Yt(document,"mouseover",x))}Bt(document,"keyup",x),Bt(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),ft(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(gi(y.display,a)||ft(y,a)||a.ctrlKey&&!a.altKey||De&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(he&&x==hl){hl=null,gn(a);return}if(!(he&&(!a.which||a.which<10)&&ws(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Fu(y,a,E)||y.display.input.onKeyPress(a))}}}var Mu=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+Mu>a&&ye(y,this.pos)==0&&x==this.button};var va,ma;function Tu(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(!(ft(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,gi(x,a)){He||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=Co(y,a),E=ar(a),te=b?Tu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,te,a))&&(E==1?b?Ru(y,b,te,a):Cr(a)==x.scroller&&gn(a):E==2?(b&&Ma(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Ze?y.display.input.onContextMenu(a):Al(y)))}}}function Nu(a,y,x,b,E){var te="Click";return b=="double"?te="Double"+te:b=="triple"&&(te="Triple"+te),te=(y==1?"Left":y==2?"Middle":"Right")+te,pa(a,ms(te,E),E,function(ie){if(typeof ie=="string"&&(ie=ha[ie]),!ie)return!1;var le=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),le=ie(a,x)!=yt}finally{a.state.suppressEdits=!1}return le})}function Ou(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var te=Ke?x.shiftKey&&x.metaKey:x.altKey;E.unit=te?"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=De?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(De?x.altKey:x.ctrlKey)),E}function Ru(a,y,x,b){xe?setTimeout(Rt(kl,a),0):a.curOp.focus=ke();var E=Ou(a,x,b),te=a.doc.sel,ie;a.options.dragDrop&&Hr&&!a.isReadOnly()&&x=="single"&&(ie=te.contains(y))>-1&&(ye((ie=te.ranges[ie]).from(),y)<0||y.xRel>0)&&(ye(ie.to(),y)>0||y.xRel<0)?Iu(a,b,y,E):Hu(a,b,y,E)}function Iu(a,y,x,b){var E=a.display,te=!1,ie=di(a,function(fe){He&&(E.scroller.draggable=!1),a.state.draggingText=!1,Yt(E.wrapper.ownerDocument,"mouseup",ie),Yt(E.wrapper.ownerDocument,"mousemove",le),Yt(E.scroller,"dragstart",ue),Yt(E.scroller,"drop",ie),te||(gn(fe),b.addNew||Ma(a.doc,x,null,null,b.extend),He&&!$e||xe&&we==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),le=function(fe){te=te||Math.abs(y.clientX-fe.clientX)+Math.abs(y.clientY-fe.clientY)>=10},ue=function(){return te=!0};He&&(E.scroller.draggable=!0),a.state.draggingText=ie,ie.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Bt(E.wrapper.ownerDocument,"mouseup",ie),Bt(E.wrapper.ownerDocument,"mousemove",le),Bt(E.scroller,"dragstart",ue),Bt(E.scroller,"drop",ie),Al(a),setTimeout(function(){return E.input.focus()},20)}function As(a,y,x){if(x=="char")return new Tr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Tr(me(y.line,0),pe(a.doc,me(y.line+1,0)));var b=x(a,y);return new Tr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,te=a.doc;gn(y);var ie,le,ue=te.sel,fe=ue.ranges;if(b.addNew&&!b.extend?(le=te.sel.contains(x),le>-1?ie=fe[le]:ie=new Tr(x,x)):(ie=te.sel.primary(),le=te.sel.primIndex),b.unit=="rectangle")b.addNew||(ie=new Tr(x,x)),x=Co(a,y,!0,!0),le=-1;else{var Ae=As(a,x,b.unit);b.extend?ie=sl(ie,Ae.anchor,Ae.head,b.extend):ie=Ae}b.addNew?le==-1?(le=fe.length,wi(te,qi(a,fe.concat([ie]),le),{scroll:!1,origin:"*mouse"})):fe.length>1&&fe[le].empty()&&b.unit=="char"&&!b.extend?(wi(te,qi(a,fe.slice(0,le).concat(fe.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=te.sel):ul(te,le,ie,at):(le=0,wi(te,new Zi([ie],0),at),ue=te.sel);var Fe=x;function ot(mn){if(ye(Fe,mn)!=0)if(Fe=mn,b.unit=="rectangle"){for(var Mn=[],rr=a.options.tabSize,Kn=ve(lt(te,x.line).text,x.ch,rr),Sr=ve(lt(te,mn.line).text,mn.ch,rr),Zr=Math.min(Kn,Sr),hi=Math.max(Kn,Sr),Jr=Math.min(x.line,mn.line),Ii=Math.min(a.lastLine(),Math.max(x.line,mn.line));Jr<=Ii;Jr++){var Fi=lt(te,Jr).text,ri=Tt(Fi,Zr,rr);Zr==hi?Mn.push(new Tr(me(Jr,ri),me(Jr,ri))):Fi.length>ri&&Mn.push(new Tr(me(Jr,ri),me(Jr,Tt(Fi,hi,rr))))}Mn.length||Mn.push(new Tr(x,x)),wi(te,qi(a,ue.ranges.slice(0,le).concat(Mn),le),{origin:"*mouse",scroll:!1}),a.scrollIntoView(mn)}else{var Pi=ie,bi=As(a,mn,b.unit),si=Pi.anchor,ii;ye(bi.anchor,si)>0?(ii=bi.head,si=xt(Pi.from(),bi.anchor)):(ii=bi.anchor,si=$t(Pi.to(),bi.head));var qr=ue.ranges.slice(0);qr[le]=Wu(a,new Tr(pe(te,si),ii)),wi(te,qi(a,qr,le),at)}}var Je=E.wrapper.getBoundingClientRect(),Et=0;function Ht(mn){var Mn=++Et,rr=Co(a,mn,!0,b.unit=="rectangle");if(rr)if(ye(rr,Fe)!=0){a.curOp.focus=ke(),ot(rr);var Kn=Ba(E,te);(rr.line>=Kn.to||rr.line<Kn.from)&&setTimeout(di(a,function(){Et==Mn&&Ht(mn)}),150)}else{var Sr=mn.clientY<Je.top?-20:mn.clientY>Je.bottom?20:0;Sr&&setTimeout(di(a,function(){Et==Mn&&(E.scroller.scrollTop+=Sr,Ht(mn))}),50)}}function nn(mn){a.state.selectingText=!1,Et=1/0,mn&&(gn(mn),E.input.focus()),Yt(E.wrapper.ownerDocument,"mousemove",vn),Yt(E.wrapper.ownerDocument,"mouseup",kn),te.history.lastSelOrigin=null}var vn=di(a,function(mn){mn.buttons===0||!ar(mn)?nn(mn):Ht(mn)}),kn=di(a,nn);a.state.selectingText=kn,Bt(E.wrapper.ownerDocument,"mousemove",vn),Bt(E.wrapper.ownerDocument,"mouseup",kn)}function Wu(a,y){var x=y.anchor,b=y.head,E=lt(a.doc,x.line);if(ye(x,b)==0&&x.sticky==b.sticky)return y;var te=rn(E);if(!te)return y;var ie=Gt(te,x.ch,x.sticky),le=te[ie];if(le.from!=x.ch&&le.to!=x.ch)return y;var ue=ie+(le.from==x.ch==(le.level!=1)?0:1);if(ue==0||ue==te.length)return y;var fe;if(b.line!=x.line)fe=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Ae=Gt(te,b.ch,b.sticky),Fe=Ae-ie||(b.ch-x.ch)*(le.level==1?-1:1);Ae==ue-1||Ae==ue?fe=Fe<0:fe=Fe>0}var ot=te[ue+(fe?-1:0)],Je=fe==(ot.level==1),Et=Je?ot.from:ot.to,Ht=Je?"after":"before";return x.ch==Et&&x.sticky==Ht?y:new Tr(new me(x.line,Et,Ht),b)}function Bs(a,y,x,b){var E,te;if(y.touches)E=y.touches[0].clientX,te=y.touches[0].clientY;else try{E=y.clientX,te=y.clientY}catch(ot){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&gn(y);var ie=a.display,le=ie.lineDiv.getBoundingClientRect();if(te>le.bottom||!Ut(a,x))return yn(y);te-=le.top-ie.viewOffset;for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var fe=ie.gutters.childNodes[ue];if(fe&&fe.getBoundingClientRect().right>=E){var Ae=Re(a.doc,te),Fe=a.display.gutterSpecs[ue];return sn(a,x,a,Ae,Fe.className,y),yn(y)}}}function vl(a,y){return Bs(a,y,"gutterClick",!0)}function Ds(a,y){gi(a.display,y)||zu(a,y)||ft(a,y,"contextmenu")||Ze||a.display.input.onContextMenu(y)}function zu(a,y){return Ut(a,"gutterContextMenu")?Bs(a,y,"gutterContextMenu",!1):!1}function _s(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wo(a)}var jo={toString:function(){return"CodeMirror.Init"}},Ls={},Wa={};function Zu(a){var y=a.optionHandlers;function x(b,E,te,ie){a.defaults[b]=E,te&&(y[b]=ie?function(le,ue,fe){fe!=jo&&te(le,ue,fe)}:te)}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){ia(b),wo(b),_i(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var te=[],ie=b.doc.first;b.doc.iter(function(ue){for(var fe=0;;){var Ae=ue.text.indexOf(E,fe);if(Ae==-1)break;fe=Ae+E.length,te.push(me(ie,Ae))}ie++});for(var le=te.length-1;le>=0;le--)Ho(b.doc,E,te[le],me(te[le].line,te[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,te){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),te!=jo&&b.refresh()}),x("specialCharPlaceholder",Vr,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Ce?"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",!it),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){_s(b),ra(b)},!0),x("keyMap","default",function(b,E,te){var ie=Ia(E),le=te!=jo&&Ia(te);le&&le.detach&&le.detach(b,ie),ie.attach&&ie.attach(b,le||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rl(E,b.options.lineNumbers),ra(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){Pl(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=rl(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Mo(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,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!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,ia,!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,te=y?Bt:Yt;te(a.display.scroller,"dragstart",E.start),te(a.display.scroller,"dragenter",E.enter),te(a.display.scroller,"dragover",E.over),te(a.display.scroller,"dragleave",E.leave),te(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(Te(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(_e(a.display.wrapper,"CodeMirror-wrap"),vr(a)),Ya(a),_i(a),wo(a),setTimeout(function(){return No(a)},100)}function Ur(a,y){var x=this;if(!(this instanceof Ur))return new Ur(a,y);this.options=y=y?wt(y):{},wt(Ls,y,!1);var b=y.value;typeof b=="string"?b=new Li(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Ur.inputStyles[y.inputStyle](this),te=this.display=new ru(a,b,E,y);te.wrapper.CodeMirror=this,_s(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Pl(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&&!Ce&&te.input.focus(),xe&&we<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Ao(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Ce||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Mo(this);for(var ie in Wa)Wa.hasOwnProperty(ie)&&Wa[ie](this,y[ie],jo);Nl(this),y.finishInit&&y.finishInit(this);for(var le=0;le<ml.length;++le)ml[le](this);Bo(this),He&&y.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Ur.defaults=Ls,Ur.optionHandlers=Wa;function Vu(a){var y=a.display;Bt(y.scroller,"mousedown",di(a,ks)),xe&&we<11?Bt(y.scroller,"dblclick",di(a,function(ue){if(!ft(a,ue)){var fe=Co(a,ue);if(!(!fe||vl(a,ue)||gi(a.display,ue))){gn(ue);var Ae=a.findWordAt(fe);Ma(a.doc,Ae.anchor,Ae.head)}}})):Bt(y.scroller,"dblclick",function(ue){return ft(a,ue)||gn(ue)}),Bt(y.scroller,"contextmenu",function(ue){return Ds(a,ue)}),Bt(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 te(ue){if(ue.touches.length!=1)return!1;var fe=ue.touches[0];return fe.radiusX<=1&&fe.radiusY<=1}function ie(ue,fe){if(fe.left==null)return!0;var Ae=fe.left-ue.left,Fe=fe.top-ue.top;return Ae*Ae+Fe*Fe>20*20}Bt(y.scroller,"touchstart",function(ue){if(!ft(a,ue)&&!te(ue)&&!vl(a,ue)){y.input.ensurePolled(),clearTimeout(x);var fe=+new Date;y.activeTouch={start:fe,moved:!1,prev:fe-b.end<=300?b:null},ue.touches.length==1&&(y.activeTouch.left=ue.touches[0].pageX,y.activeTouch.top=ue.touches[0].pageY)}}),Bt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Bt(y.scroller,"touchend",function(ue){var fe=y.activeTouch;if(fe&&!gi(y,ue)&&fe.left!=null&&!fe.moved&&new Date-fe.start<300){var Ae=a.coordsChar(y.activeTouch,"page"),Fe;!fe.prev||ie(fe,fe.prev)?Fe=new Tr(Ae,Ae):!fe.prev.prev||ie(fe,fe.prev.prev)?Fe=a.findWordAt(Ae):Fe=new Tr(me(Ae.line,0),pe(a.doc,me(Ae.line+1,0))),a.setSelection(Fe.anchor,Fe.head),a.focus(),gn(ue)}E()}),Bt(y.scroller,"touchcancel",E),Bt(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),Eo(a,y.scroller.scrollLeft,!0),sn(a,"scroll",a))}),Bt(y.scroller,"mousewheel",function(ue){return Il(a,ue)}),Bt(y.scroller,"DOMMouseScroll",function(ue){return Il(a,ue)}),Bt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){ft(a,ue)||On(ue)},over:function(ue){ft(a,ue)||(wu(a,ue),On(ue))},start:function(ue){return xu(a,ue)},drop:di(a,bu),leave:function(ue){ft(a,ue)||fs(a)}};var le=y.input.getField();Bt(le,"keyup",function(ue){return Ss.call(a,ue)}),Bt(le,"keydown",di(a,Cs)),Bt(le,"keypress",di(a,Es)),Bt(le,"focus",function(ue){return Ja(a,ue)}),Bt(le,"blur",function(ue){return Mo(a,ue)})}var ml=[];Ur.defineInitHook=function(a){return ml.push(a)};function ga(a,y,x,b){var E=a.doc,te;x==null&&(x="add"),x=="smart"&&(E.mode.indent?te=er(a,y).state:x="prev");var ie=a.options.tabSize,le=lt(E,y),ue=ve(le.text,null,ie);le.stateAfter&&(le.stateAfter=null);var fe=le.text.match(/^\s*/)[0],Ae;if(!b&&!/\S/.test(le.text))Ae=0,x="not";else if(x=="smart"&&(Ae=E.mode.indent(te,le.text.slice(fe.length),le.text),Ae==yt||Ae>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?Ae=ve(lt(E,y-1).text,null,ie):Ae=0:x=="add"?Ae=ue+a.options.indentUnit:x=="subtract"?Ae=ue-a.options.indentUnit:typeof x=="number"&&(Ae=ue+x),Ae=Math.max(0,Ae);var Fe="",ot=0;if(a.options.indentWithTabs)for(var Je=Math.floor(Ae/ie);Je;--Je)ot+=ie,Fe+=" ";if(ot<Ae&&(Fe+=At(Ae-ot)),Fe!=fe)return Ho(E,Fe,me(y,0),me(y,fe.length),"+input"),le.stateAfter=null,!0;for(var Et=0;Et<E.sel.ranges.length;Et++){var Ht=E.sel.ranges[Et];if(Ht.head.line==y&&Ht.head.ch<fe.length){var nn=me(y,fe.length);ul(E,Et,new Tr(nn,nn));break}}}var $i=null;function za(a){$i=a}function gl(a,y,x,b,E){var te=a.doc;a.display.shift=!1,b||(b=te.sel);var ie=+new Date-200,le=E=="paste"||a.state.pasteIncoming>ie,ue=lr(y),fe=null;if(le&&b.ranges.length>1)if($i&&$i.text.join(`
|
|
`)==y){if(b.ranges.length%$i.text.length==0){fe=[];for(var Ae=0;Ae<$i.text.length;Ae++)fe.push(te.splitLines($i.text[Ae]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(fe=pt(ue,function(vn){return[vn]}));for(var Fe=a.curOp.updateInput,ot=b.ranges.length-1;ot>=0;ot--){var Je=b.ranges[ot],Et=Je.from(),Ht=Je.to();Je.empty()&&(x&&x>0?Et=me(Et.line,Et.ch-x):a.state.overwrite&&!le?Ht=me(Ht.line,Math.min(lt(te,Ht.line).text.length,Ht.ch+Ie(ue).length)):le&&$i&&$i.lineWise&&$i.text.join(`
|
|
`)==ue.join(`
|
|
`)&&(Et=Ht=me(Et.line,0)));var nn={from:Et,to:Ht,text:fe?fe[ot%fe.length]:ue,origin:E||(le?"paste":a.state.cutIncoming>ie?"cut":"+input")};Io(a.doc,nn),Wr(a,"inputRead",a,nn)}y&&!le&&Ps(a,y),To(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Fe),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Fs(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Ri(y,function(){return gl(y,x,0,null,"paste")}),!0}function Ps(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 te=a.getModeAt(E.head),ie=!1;if(te.electricChars){for(var le=0;le<te.electricChars.length;le++)if(y.indexOf(te.electricChars.charAt(le))>-1){ie=ga(a,E.head.line,"smart");break}}else te.electricInput&&te.electricInput.test(lt(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ie=ga(a,E.head.line,"smart"));ie&&Wr(a,"electricInput",a,E.head.line)}}}function Ms(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,te={anchor:me(E,0),head:me(E+1,0)};x.push(te),y.push(a.getRange(te.anchor,te.head))}return{text:y,ranges:x}}function Ts(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Ns(){var a=je("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=je("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return He?a.style.width="1000px":a.setAttribute("wrap","off"),Le&&(a.style.border="1px solid black"),Ts(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 te=this.options,ie=te[b];te[b]==E&&b!="mode"||(te[b]=E,y.hasOwnProperty(b)&&di(this,y[b])(this,E,ie),sn(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"](Ia(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,te=0;te<E.length;++te)if(E[te]==b||E[te].name==b)return E.splice(te,1),!0},addOverlay:ki(function(b,E){var te=b.token?b:a.getMode(this.options,b);if(te.startState)throw new Error("Overlays may not be stateful.");mt(this.state.overlays,{mode:te,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ie){return ie.priority}),this.state.modeGen++,_i(this)}),removeOverlay:ki(function(b){for(var E=this.state.overlays,te=0;te<E.length;++te){var ie=E[te].modeSpec;if(ie==b||typeof b=="string"&&ie.name==b){E.splice(te,1),this.state.modeGen++,_i(this);return}}}),indentLine:ki(function(b,E,te){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Wt(this.doc,b)&&ga(this,b,E,te)}),indentSelection:ki(function(b){for(var E=this.doc.sel.ranges,te=-1,ie=0;ie<E.length;ie++){var le=E[ie];if(le.empty())le.head.line>te&&(ga(this,le.head.line,b,!0),te=le.head.line,ie==this.doc.sel.primIndex&&To(this));else{var ue=le.from(),fe=le.to(),Ae=Math.max(te,ue.line);te=Math.min(this.lastLine(),fe.line-(fe.ch?0:1))+1;for(var Fe=Ae;Fe<te;++Fe)ga(this,Fe,b);var ot=this.doc.sel.ranges;ue.ch==0&&E.length==ot.length&&ot[ie].from().ch>0&&ul(this.doc,ie,new Tr(ue,ot[ie].to()),Ne)}}}),getTokenAt:function(b,E){return tr(this,b,E)},getLineTokens:function(b,E){return tr(this,me(b),E,!0)},getTokenTypeAt:function(b){b=pe(this.doc,b);var E=hn(this,lt(this.doc,b.line)),te=0,ie=(E.length-1)/2,le=b.ch,ue;if(le==0)ue=E[2];else for(;;){var fe=te+ie>>1;if((fe?E[fe*2-1]:0)>=le)ie=fe;else if(E[fe*2+1]<le)te=fe+1;else{ue=E[fe*2+2];break}}var Ae=ue?ue.indexOf("overlay "):-1;return Ae<0?ue:Ae==0?null:ue.slice(0,Ae-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 te=[];if(!x.hasOwnProperty(E))return te;var ie=x[E],le=this.getModeAt(b);if(typeof le[E]=="string")ie[le[E]]&&te.push(ie[le[E]]);else if(le[E])for(var ue=0;ue<le[E].length;ue++){var fe=ie[le[E][ue]];fe&&te.push(fe)}else le.helperType&&ie[le.helperType]?te.push(ie[le.helperType]):ie[le.name]&&te.push(ie[le.name]);for(var Ae=0;Ae<ie._global.length;Ae++){var Fe=ie._global[Ae];Fe.pred(le,this)&&qe(te,Fe.val)==-1&&te.push(Fe.val)}return te},getStateAfter:function(b,E){var te=this.doc;return b=st(te,b==null?te.first+te.size-1:b),er(this,b+1,E).state},cursorCoords:function(b,E){var te,ie=this.doc.sel.primary();return b==null?te=ie.head:typeof b=="object"?te=pe(this.doc,b):te=b?ie.from():ie.to(),Di(this,te,E||"page")},charCoords:function(b,E){return Po(this,pe(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),yi(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Re(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,te){var ie=!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,ie=!0),le=lt(this.doc,b)}else le=b;return Fo(this,le,{top:0,left:0},E||"page",te||ie).top+(ie?this.doc.height-cr(le):0)},defaultTextHeight:function(){return Oi(this.display)},defaultCharWidth:function(){return Qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,te,ie,le){var ue=this.display;b=Di(this,pe(this.doc,b));var fe=b.bottom,Ae=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ue.sizer.appendChild(E),ie=="over")fe=b.top;else if(ie=="above"||ie=="near"){var Fe=Math.max(ue.wrapper.clientHeight,this.doc.height),ot=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(ie=="above"||b.bottom+E.offsetHeight>Fe)&&b.top>E.offsetHeight?fe=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Fe&&(fe=b.bottom),Ae+E.offsetWidth>ot&&(Ae=ot-E.offsetWidth)}E.style.top=fe+"px",E.style.left=E.style.right="",le=="right"?(Ae=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(le=="left"?Ae=0:le=="middle"&&(Ae=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=Ae+"px"),te&&js(this,{left:Ae,top:fe,right:Ae+E.offsetWidth,bottom:fe+E.offsetHeight})},triggerOnKeyDown:ki(Cs),triggerOnKeyPress:ki(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:ki(ks),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:ki(function(b){Ps(this,b)}),findPosH:function(b,E,te,ie){var le=1;E<0&&(le=-1,E=-E);for(var ue=pe(this.doc,b),fe=0;fe<E&&(ue=yl(this.doc,ue,le,te,ie),!ue.hitSide);++fe);return ue},moveH:ki(function(b,E){var te=this;this.extendSelectionsBy(function(ie){return te.display.shift||te.doc.extend||ie.empty()?yl(te.doc,ie.head,b,E,te.options.rtlMoveVisually):b<0?ie.from():ie.to()},nt)}),deleteH:ki(function(b,E){var te=this.doc.sel,ie=this.doc;te.somethingSelected()?ie.replaceSelection("",null,"+delete"):Zo(this,function(le){var ue=yl(ie,le.head,b,E,!1);return b<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(b,E,te,ie){var le=1,ue=ie;E<0&&(le=-1,E=-E);for(var fe=pe(this.doc,b),Ae=0;Ae<E;++Ae){var Fe=Di(this,fe,"div");if(ue==null?ue=Fe.left:Fe.left=ue,fe=Os(this,Fe,le,te),fe.hitSide)break}return fe},moveV:ki(function(b,E){var te=this,ie=this.doc,le=[],ue=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(Ae){if(ue)return b<0?Ae.from():Ae.to();var Fe=Di(te,Ae.head,"div");Ae.goalColumn!=null&&(Fe.left=Ae.goalColumn),le.push(Fe.left);var ot=Os(te,Fe,b,E);return E=="page"&&Ae==ie.sel.primary()&&qa(te,Po(te,ot,"div").top-Fe.top),ot},nt),le.length)for(var fe=0;fe<ie.sel.ranges.length;fe++)ie.sel.ranges[fe].goalColumn=le[fe]}),findWordAt:function(b){var E=this.doc,te=lt(E,b.line).text,ie=b.ch,le=b.ch;if(te){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||le==te.length)&&ie?--ie:++le;for(var fe=te.charAt(ie),Ae=se(fe,ue)?function(Fe){return se(Fe,ue)}:/\s/.test(fe)?function(Fe){return/\s/.test(Fe)}:function(Fe){return!/\s/.test(Fe)&&!se(Fe)};ie>0&&Ae(te.charAt(ie-1));)--ie;for(;le<te.length&&Ae(te.charAt(le));)++le}return new Tr(me(b.line,ie),me(b.line,le))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Te(this.display.cursorDiv,"CodeMirror-overwrite"):_e(this.display.cursorDiv,"CodeMirror-overwrite"),sn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ke()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ki(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Ti(this)-this.display.barHeight,width:b.scrollWidth-Ti(this)-this.display.barWidth,clientHeight:ao(this),clientWidth:no(this)}},scrollIntoView:ki(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:me(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:ki(function(b,E){var te=this,ie=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};b!=null&&(this.display.wrapper.style.width=ie(b)),E!=null&&(this.display.wrapper.style.height=ie(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 fe=0;fe<ue.widgets.length;fe++)if(ue.widgets[fe].noHScroll){ho(te,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,sn(this,"refresh",this)}),operation:function(b){return Ri(this,b)},startOperation:function(){return Ao(this)},endOperation:function(){return Bo(this)},refresh:ki(function(){var b=this.display.cachedTextHeight;_i(this),this.curOp.forceUpdate=!0,wo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-Oi(this.display))>.5||this.options.lineWrapping)&&Ya(this),sn(this,"refresh",this)}),swapDoc:ki(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Wr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Jt(a),a.registerHelper=function(b,E,te){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=te},a.registerGlobalHelper=function(b,E,te,ie){a.registerHelper(b,E,ie),x[b]._global.push({pred:te,val:ie})}}function yl(a,y,x,b,E){var te=y,ie=x,le=lt(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function fe(){var kn=y.line+ue;return kn<a.first||kn>=a.first+a.size?!1:(y=new me(kn,y.ch,y.sticky),le=lt(a,kn))}function Ae(kn){var mn;if(b=="codepoint"){var Mn=le.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Mn)?mn=null:mn=new me(y.line,Math.max(0,Math.min(le.text.length,y.ch+x*(Mn>=55296&&Mn<56320?2:1))),-x)}else E?mn=Bu(a.cm,le,y,x):mn=dl(le,y,x);if(mn==null)if(!kn&&fe())y=fl(E,a.cm,le,y.line,ue);else return!1;else y=mn;return!0}if(b=="char"||b=="codepoint")Ae();else if(b=="column")Ae(!0);else if(b=="word"||b=="group")for(var Fe=null,ot=b=="group",Je=a.cm&&a.cm.getHelper(y,"wordChars"),Et=!0;!(x<0&&!Ae(!Et));Et=!1){var Ht=le.text.charAt(y.ch)||`
|
|
`,nn=se(Ht,Je)?"w":ot&&Ht==`
|
|
`?"n":!ot||/\s/.test(Ht)?null:"p";if(ot&&!Et&&!nn&&(nn="s"),Fe&&Fe!=nn){x<0&&(x=1,Ae(),y.sticky="after");break}if(nn&&(Fe=nn),x>0&&!Ae(!Et))break}var vn=Na(a,y,te,ie,!0);return rt(te,vn)&&(vn.hitSide=!0),vn}function Os(a,y,x,b){var E=a.doc,te=y.left,ie;if(b=="page"){var le=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*Oi(a.display),3);ie=(x>0?y.bottom:y.top)+x*ue}else b=="line"&&(ie=x>0?y.bottom+3:y.top-3);for(var fe;fe=yi(a,te,ie),!!fe.outside;){if(x<0?ie<=0:ie>=E.height){fe.hitSide=!0;break}ie+=x*5}return fe}var Ir=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ir.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Ts(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function te(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}Bt(E,"paste",function(le){!te(le)||ft(b,le)||Fs(le,b)||we<=11&&setTimeout(di(b,function(){return y.updateFromDOM()}),20)}),Bt(E,"compositionstart",function(le){y.composing={data:le.data,done:!1}}),Bt(E,"compositionupdate",function(le){y.composing||(y.composing={data:le.data,done:!1})}),Bt(E,"compositionend",function(le){y.composing&&(le.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Bt(E,"touchstart",function(){return x.forceCompositionEnd()}),Bt(E,"input",function(){y.composing||y.readFromDOMSoon()});function ie(le){if(!(!te(le)||ft(b,le))){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()}),le.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Ms(b);za({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 fe=$i.text.join(`
|
|
`);if(le.clipboardData.setData("Text",fe),le.clipboardData.getData("Text")==fe){le.preventDefault();return}}var Ae=Ns(),Fe=Ae.firstChild;b.display.lineSpace.insertBefore(Ae,b.display.lineSpace.firstChild),Fe.value=$i.text.join(`
|
|
`);var ot=document.activeElement;dt(Fe),setTimeout(function(){b.display.lineSpace.removeChild(Ae),ot.focus(),ot==E&&x.showPrimarySelection()},50)}}Bt(E,"copy",ie),Bt(E,"cut",ie)},Ir.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Ir.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Ir.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Ir.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ir.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var te=Za(y,a.anchorNode,a.anchorOffset),ie=Za(y,a.focusNode,a.focusOffset);if(!(te&&!te.bad&&ie&&!ie.bad&&ye(xt(te,ie),b)==0&&ye($t(te,ie),E)==0)){var le=y.display.view,ue=b.line>=y.display.viewFrom&&Rs(y,b)||{node:le[0].measure.map[2],offset:0},fe=E.line<y.display.viewTo&&Rs(y,E);if(!fe){var Ae=le[le.length-1].measure,Fe=Ae.maps?Ae.maps[Ae.maps.length-1]:Ae.map;fe={node:Fe[Fe.length-1],offset:Fe[Fe.length-2]-Fe[Fe.length-3]}}if(!ue||!fe){a.removeAllRanges();return}var ot=a.rangeCount&&a.getRangeAt(0),Je;try{Je=Me(ue.node,ue.offset,fe.offset,fe.node)}catch(Et){}Je&&(!z&&y.state.focused?(a.collapse(ue.node,ue.offset),Je.collapsed||(a.removeAllRanges(),a.addRange(Je))):(a.removeAllRanges(),a.addRange(Je)),ot&&a.anchorNode==null?a.addRange(ot):z&&this.startGracePeriod()),this.rememberSelection()}},Ir.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},Ir.prototype.showMultipleSelections=function(a){Qe(this.cm.display.cursorDiv,a.cursors),Qe(this.cm.display.selectionDiv,a.selection)},Ir.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Ir.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ge(this.div,y)},Ir.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ir.prototype.blur=function(){this.div.blur()},Ir.prototype.getField=function(){return this.div},Ir.prototype.supportsTouch=function(){return!0},Ir.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Ri(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function y(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,y))}this.polling.set(this.cm.options.pollInterval,y)},Ir.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Ir.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(ge&&Be&&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&&Ri(y,function(){wi(y.doc,vo(x,b),Ne),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Ir.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=me(b.line-1,lt(a.doc,b.line-1).length)),E.ch==lt(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=me(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var te,ie,le;b.line==y.viewFrom||(te=So(a,b.line))==0?(ie=Pe(y.view[0].line),le=y.view[0].node):(ie=Pe(y.view[te].line),le=y.view[te-1].node.nextSibling);var ue=So(a,E.line),fe,Ae;if(ue==y.view.length-1?(fe=y.viewTo-1,Ae=y.lineDiv.lastChild):(fe=Pe(y.view[ue+1].line)-1,Ae=y.view[ue+1].node.previousSibling),!le)return!1;for(var Fe=a.doc.splitLines(Yu(a,le,Ae,ie,fe)),ot=Vt(a.doc,me(ie,0),me(fe,lt(a.doc,fe).text.length));Fe.length>1&&ot.length>1;)if(Ie(Fe)==Ie(ot))Fe.pop(),ot.pop(),fe--;else if(Fe[0]==ot[0])Fe.shift(),ot.shift(),ie++;else break;for(var Je=0,Et=0,Ht=Fe[0],nn=ot[0],vn=Math.min(Ht.length,nn.length);Je<vn&&Ht.charCodeAt(Je)==nn.charCodeAt(Je);)++Je;for(var kn=Ie(Fe),mn=Ie(ot),Mn=Math.min(kn.length-(Fe.length==1?Je:0),mn.length-(ot.length==1?Je:0));Et<Mn&&kn.charCodeAt(kn.length-Et-1)==mn.charCodeAt(mn.length-Et-1);)++Et;if(Fe.length==1&&ot.length==1&&ie==b.line)for(;Je&&Je>b.ch&&kn.charCodeAt(kn.length-Et-1)==mn.charCodeAt(mn.length-Et-1);)Je--,Et++;Fe[Fe.length-1]=kn.slice(0,kn.length-Et).replace(/^\u200b+/,""),Fe[0]=Fe[0].slice(Je).replace(/\u200b+$/,"");var rr=me(ie,Je),Kn=me(fe,ot.length?Ie(ot).length-Et:0);if(Fe.length>1||Fe[0]||ye(rr,Kn))return Ho(a.doc,Fe,rr,Kn,"+input"),!0},Ir.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ir.prototype.reset=function(){this.forceCompositionEnd()},Ir.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ir.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},Ir.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Ri(this.cm,function(){return _i(a.cm)})},Ir.prototype.setUneditable=function(a){a.contentEditable="false"},Ir.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||di(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Ir.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Ir.prototype.onContextMenu=function(){},Ir.prototype.resetPosition=function(){},Ir.prototype.needsContentAttribute=!0;function Rs(a,y){var x=ro(a,y.line);if(!x||x.hidden)return null;var b=lt(a.doc,y.line),E=Lo(x,b,y.line),te=rn(b,a.doc.direction),ie="left";if(te){var le=Gt(te,y.ch);ie=le%2?"right":"left"}var ue=xa(E.map,y.ch,ie);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 te="",ie=!1,le=a.doc.lineSeparator(),ue=!1;function fe(Je){return function(Et){return Et.id==Je}}function Ae(){ie&&(te+=le,ue&&(te+=le),ie=ue=!1)}function Fe(Je){Je&&(Ae(),te+=Je)}function ot(Je){if(Je.nodeType==1){var Et=Je.getAttribute("cm-text");if(Et){Fe(Et);return}var Ht=Je.getAttribute("cm-marker"),nn;if(Ht){var vn=a.findMarks(me(b,0),me(E+1,0),fe(+Ht));vn.length&&(nn=vn[0].find(0))&&Fe(Vt(a.doc,nn.from,nn.to).join(le));return}if(Je.getAttribute("contenteditable")=="false")return;var kn=/^(pre|div|p|li|table|br)$/i.test(Je.nodeName);if(!/^br$/i.test(Je.nodeName)&&Je.textContent.length==0)return;kn&&Ae();for(var mn=0;mn<Je.childNodes.length;mn++)ot(Je.childNodes[mn]);/^(pre|p)$/i.test(Je.nodeName)&&(ue=!0),kn&&(ie=!0)}else Je.nodeType==3&&Fe(Je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ot(y),y!=x;)y=y.nextSibling,ue=!1;return te}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(me(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 te=a.display.view[E];if(te.node==b)return Xu(te,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Ge(b,y))return Go(me(Pe(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var te=a.rest?Ie(a.rest):a.line;return Go(me(Pe(te),te.text.length),E)}var ie=y.nodeType==3?y:null,le=y;for(!ie&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ie=y.firstChild,x&&(x=ie.nodeValue.length));le.parentNode!=b;)le=le.parentNode;var ue=a.measure,fe=ue.maps;function Ae(nn,vn,kn){for(var mn=-1;mn<(fe?fe.length:0);mn++)for(var Mn=mn<0?ue.map:fe[mn],rr=0;rr<Mn.length;rr+=3){var Kn=Mn[rr+2];if(Kn==nn||Kn==vn){var Sr=Pe(mn<0?a.line:a.rest[mn]),Zr=Mn[rr]+kn;return(kn<0||Kn!=nn)&&(Zr=Mn[rr+(kn?1:0)]),me(Sr,Zr)}}}var Fe=Ae(ie,le,x);if(Fe)return Go(Fe,E);for(var ot=le.nextSibling,Je=ie?ie.nodeValue.length-x:0;ot;ot=ot.nextSibling){if(Fe=Ae(ot,ot.firstChild,0),Fe)return Go(me(Fe.line,Fe.ch-Je),E);Je+=ot.textContent.length}for(var Et=le.previousSibling,Ht=x;Et;Et=Et.previousSibling){if(Fe=Ae(Et,Et.firstChild,-1),Fe)return Go(me(Fe.line,Fe.ch+Ht),E);Ht+=Et.textContent.length}}var ti=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};ti.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),Le&&(E.style.width="0px"),Bt(E,"input",function(){xe&&we>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Bt(E,"paste",function(ie){ft(b,ie)||Fs(ie,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function te(ie){if(!ft(b,ie)){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var le=Ms(b);za({lineWise:!0,text:le.text}),ie.type=="cut"?b.setSelections(le.ranges,null,Ne):(x.prevInput="",E.value=le.text.join(`
|
|
`),dt(E))}else return;ie.type=="cut"&&(b.state.cutIncoming=+new Date)}}Bt(E,"cut",te),Bt(E,"copy",te),Bt(a.scroller,"paste",function(ie){if(!(gi(a,ie)||ft(b,ie))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var le=new Event("paste");le.clipboardData=ie.clipboardData,E.dispatchEvent(le)}}),Bt(a.lineSpace,"selectstart",function(ie){gi(a,ie)||gn(ie)}),Bt(E,"compositionstart",function(){var ie=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:ie,range:b.markText(ie,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Bt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},ti.prototype.createField=function(a){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},ti.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},ti.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=Di(a,x.sel.primary().head,"div"),te=y.wrapper.getBoundingClientRect(),ie=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ie.top-te.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ie.left-te.left))}return b},ti.prototype.showSelection=function(a){var y=this.cm,x=y.display;Qe(x.cursorDiv,a.cursors),Qe(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},ti.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&dt(this.textarea),xe&&we>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",xe&&we>=9&&(this.hasSelection=null))}},ti.prototype.getField=function(){return this.textarea},ti.prototype.supportsTouch=function(){return!1},ti.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ce||ke()!=this.textarea))try{this.textarea.focus()}catch(a){}},ti.prototype.blur=function(){this.textarea.blur()},ti.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ti.prototype.receivedFocus=function(){this.slowPoll()},ti.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},ti.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},ti.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||pr(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(xe&&we>=9&&this.hasSelection===E||De&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var te=E.charCodeAt(0);if(te==8203&&!b&&(b="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,le=Math.min(b.length,E.length);ie<le&&b.charCodeAt(ie)==E.charCodeAt(ie);)++ie;return Ri(y,function(){gl(y,E.slice(ie),b.length-ie,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},ti.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ti.prototype.onKeyPress=function(){xe&&we>=9&&(this.hasSelection=null),this.fastPoll()},ti.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var te=Co(x,a),ie=b.scroller.scrollTop;if(!te||he)return;var le=x.options.resetSelectionOnContextMenu;le&&x.doc.sel.contains(te)==-1&&di(x,wi)(x.doc,vo(te),Ne);var ue=E.style.cssText,fe=y.wrapper.style.cssText,Ae=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-Ae.top-5)+"px; left: "+(a.clientX-Ae.left-5)+`px;
|
|
z-index: 1000; background: `+(xe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Fe;He&&(Fe=window.scrollY),b.input.focus(),He&&window.scrollTo(null,Fe),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Je,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function ot(){if(E.selectionStart!=null){var Ht=x.somethingSelected(),nn="\u200B"+(Ht?E.value:"");E.value="\u21DA",E.value=nn,y.prevInput=Ht?"":"\u200B",E.selectionStart=1,E.selectionEnd=nn.length,b.selForContextMenu=x.doc.sel}}function Je(){if(y.contextMenuPending==Je&&(y.contextMenuPending=!1,y.wrapper.style.cssText=fe,E.style.cssText=ue,xe&&we<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=ie),E.selectionStart!=null)){(!xe||xe&&we<9)&&ot();var Ht=0,nn=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?di(x,ts)(x):Ht++<10?b.detectingSelectAll=setTimeout(nn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(nn,200)}}if(xe&&we>=9&&ot(),Ze){On(a);var Et=function(){Yt(window,"mouseup",Et),setTimeout(Je,20)};Bt(window,"mouseup",Et)}else setTimeout(Je,50)},ti.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},ti.prototype.setUneditable=function(){},ti.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?wt(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=ke();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=le.getValue()}var E;if(a.form&&(Bt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var te=a.form;E=te.submit;try{var ie=te.submit=function(){b(),te.submit=E,te.submit(),te.submit=ie}}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&&(Yt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var le=Ur(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return le}function Qu(a){a.off=Yt,a.on=Bt,a.wheelEventPixels=iu,a.Doc=Li,a.splitLines=lr,a.countColumn=ve,a.findColumn=Tt,a.isWordChar=oe,a.Pass=yt,a.signal=sn,a.Line=Er,a.changeEnd=mo,a.scrollbarModel=Fl,a.Pos=me,a.cmpPos=ye,a.modes=zt,a.mimeModes=gt,a.resolveMode=pn,a.getMode=cn,a.modeExtensions=Nn,a.extendMode=Vn,a.copyState=Hn,a.startState=Rn,a.innerMode=Bn,a.commands=ha,a.keyMap=so,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=zo,a.normalizeKeyMap=Au,a.StringStream=Mt,a.SharedTextMarker=ca,a.TextMarker=yo,a.LineWidget=ua,a.e_preventDefault=gn,a.e_stopPropagation=Xn,a.e_stop=On,a.addClass=Te,a.contains=Ge,a.rmClass=_e,a.keyNames=bo}Zu(Ur),Uu(Ur);var qu="iter insert remove copy getEditor constructor".split(" ");for(var ja in Li.prototype)Li.prototype.hasOwnProperty(ja)&&qe(qu,ja)<0&&(Ur.prototype[ja]=function(a){return function(){return a.apply(this.doc,arguments)}}(Li.prototype[ja]));return Jt(Li),Ur.inputStyles={textarea:ti,contenteditable:Ir},Ur.defineMode=function(a){!Ur.defaults.mode&&a!="null"&&(Ur.defaults.mode=a),Ct.apply(this,arguments)},Ur.defineMIME=en,Ur.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ur.defineMIME("text/plain","null"),Ur.defineExtension=function(a,y){Ur.prototype[a]=y},Ur.defineDocExtension=function(a,y){Li.prototype[a]=y},Ur.fromTextArea=Ju,Qu(Ur),Ur.version="5.58.2",Ur})},25419:function(_t,Pt,ce){(function(z){z(ce(89780),ce(15525),ce(98101))})(function(z){"use strict";z.defineMode("markdown",function(Ye,Oe){var Ve=z.getMode(Ye,"text/html"),xe=Ve.name=="null";function we(ve){if(z.findModeByName){var de=z.findModeByName(ve);de&&(ve=de.mime||de.mimes[0])}var qe=z.getMode(Ye,ve);return qe.name=="null"?null:qe}Oe.highlightFormatting===void 0&&(Oe.highlightFormatting=!1),Oe.maxBlockquoteDepth===void 0&&(Oe.maxBlockquoteDepth=0),Oe.taskLists===void 0&&(Oe.taskLists=!1),Oe.strikethrough===void 0&&(Oe.strikethrough=!1),Oe.emoji===void 0&&(Oe.emoji=!1),Oe.fencedCodeBlockHighlighting===void 0&&(Oe.fencedCodeBlockHighlighting=!0),Oe.fencedCodeBlockDefaultMode===void 0&&(Oe.fencedCodeBlockDefaultMode="text/plain"),Oe.xml===void 0&&(Oe.xml=!0),Oe.tokenTypeOverrides===void 0&&(Oe.tokenTypeOverrides={});var He={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var We in He)He.hasOwnProperty(We)&&Oe.tokenTypeOverrides[We]&&(He[We]=Oe.tokenTypeOverrides[We]);var Be=/^([*\-_])(?:\s*\1){2,}\s*$/,he=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,$e=/^\[(x| )\](?=\s)/i,be=Oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ue=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Le=/^[^#!\[\]*_\\<>` "'(~:]+/,ge=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ce=/^\s*\[[^\]]+?\]:.*$/,De=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Ke=" ";function it(ve,de,qe){return de.f=de.inline=qe,qe(ve,de)}function tt(ve,de,qe){return de.f=de.block=qe,qe(ve,de)}function ze(ve){return!ve||!/\S/.test(ve.string)}function Ze(ve){if(ve.linkTitle=!1,ve.linkHref=!1,ve.linkText=!1,ve.em=!1,ve.strong=!1,ve.strikethrough=!1,ve.quote=0,ve.indentedCode=!1,ve.f==_e){var de=xe;if(!de){var qe=z.innerMode(Ve,ve.htmlState);de=qe.mode.name=="xml"&&qe.state.tagStart===null&&!qe.state.context&&qe.state.tokenize.isInText}de&&(ve.f=ct,ve.block=Xe,ve.htmlState=null)}return ve.trailingSpace=0,ve.trailingSpaceNewLine=!1,ve.prevLine=ve.thisLine,ve.thisLine={stream:null},null}function Xe(ve,de){var qe=ve.column()===de.indentation,kt=ze(de.prevLine.stream),yt=de.indentedCode,Ne=de.prevLine.hr,at=de.list!==!1,nt=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var Tt=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,at)){for(de.list=null;Tt<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=Tt-de.listStack[de.listStack.length-1])}var ut=!kt&&!Ne&&!de.prevLine.header&&(!at||!yt)&&!de.prevLine.fencedCodeEnd,At=(de.list===!1||Ne||kt)&&de.indentation<=nt&&ve.match(Be),Ie=null;if(de.indentationDiff>=4&&(yt||de.prevLine.fencedCodeEnd||de.prevLine.header||kt))return ve.skipToEnd(),de.indentedCode=!0,He.code;if(ve.eatSpace())return null;if(qe&&de.indentation<=nt&&(Ie=ve.match(be))&&Ie[1].length<=6)return de.quote=0,de.header=Ie[1].length,de.thisLine.header=!0,Oe.highlightFormatting&&(de.formatting="header"),de.f=de.inline,Qe(de);if(de.indentation<=nt&&ve.eat(">"))return de.quote=qe?1:de.quote+1,Oe.highlightFormatting&&(de.formatting="quote"),ve.eatSpace(),Qe(de);if(!At&&!de.setext&&qe&&de.indentation<=nt&&(Ie=ve.match(he))){var pt=Ie[1]?"ol":"ul";return de.indentation=Tt+ve.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,Oe.taskLists&&ve.match($e,!1)&&(de.taskList=!0),de.f=de.inline,Oe.highlightFormatting&&(de.formatting=["list","list-"+pt]),Qe(de)}else{if(qe&&de.indentation<=nt&&(Ie=ve.match(ge,!0)))return de.quote=0,de.fencedEndRE=new RegExp(Ie[1]+"+ *$"),de.localMode=Oe.fencedCodeBlockHighlighting&&we(Ie[2]||Oe.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=z.startState(de.localMode)),de.f=de.block=Ot,Oe.highlightFormatting&&(de.formatting="code-block"),de.code=-1,Qe(de);if(de.setext||(!ut||!at)&&!de.quote&&de.list===!1&&!de.code&&!At&&!Ce.test(ve.string)&&(Ie=ve.lookAhead(1))&&(Ie=Ie.match(Ue)))return de.setext?(de.header=de.setext,de.setext=0,ve.skipToEnd(),Oe.highlightFormatting&&(de.formatting="header")):(de.header=Ie[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,Qe(de);if(At)return ve.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,He.hr;if(ve.peek()==="[")return it(ve,de,ht)}return it(ve,de,de.inline)}function _e(ve,de){var qe=Ve.token(ve,de.htmlState);if(!xe){var kt=z.innerMode(Ve,de.htmlState);(kt.mode.name=="xml"&&kt.state.tagStart===null&&!kt.state.context&&kt.state.tokenize.isInText||de.md_inside&&ve.current().indexOf(">")>-1)&&(de.f=ct,de.block=Xe,de.htmlState=null)}return qe}function Ot(ve,de){var qe=de.listStack[de.listStack.length-1]||0,kt=de.indentation<qe,yt=qe+3;if(de.fencedEndRE&&de.indentation<=yt&&(kt||ve.match(de.fencedEndRE))){Oe.highlightFormatting&&(de.formatting="code-block");var Ne;return kt||(Ne=Qe(de)),de.localMode=de.localState=null,de.block=Xe,de.f=ct,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,kt?tt(ve,de,de.block):Ne}else return de.localMode?de.localMode.token(ve,de.localState):(ve.skipToEnd(),He.code)}function Qe(ve){var de=[];if(ve.formatting){de.push(He.formatting),typeof ve.formatting=="string"&&(ve.formatting=[ve.formatting]);for(var qe=0;qe<ve.formatting.length;qe++)de.push(He.formatting+"-"+ve.formatting[qe]),ve.formatting[qe]==="header"&&de.push(He.formatting+"-"+ve.formatting[qe]+"-"+ve.header),ve.formatting[qe]==="quote"&&(!Oe.maxBlockquoteDepth||Oe.maxBlockquoteDepth>=ve.quote?de.push(He.formatting+"-"+ve.formatting[qe]+"-"+ve.quote):de.push("error"))}if(ve.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(ve.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(ve.linkHref?de.push(He.linkHref,"url"):(ve.strong&&de.push(He.strong),ve.em&&de.push(He.em),ve.strikethrough&&de.push(He.strikethrough),ve.emoji&&de.push(He.emoji),ve.linkText&&de.push(He.linkText),ve.code&&de.push(He.code),ve.image&&de.push(He.image),ve.imageAltText&&de.push(He.imageAltText,"link"),ve.imageMarker&&de.push(He.imageMarker)),ve.header&&de.push(He.header,He.header+"-"+ve.header),ve.quote&&(de.push(He.quote),!Oe.maxBlockquoteDepth||Oe.maxBlockquoteDepth>=ve.quote?de.push(He.quote+"-"+ve.quote):de.push(He.quote+"-"+Oe.maxBlockquoteDepth)),ve.list!==!1){var kt=(ve.listStack.length-1)%3;kt?kt===1?de.push(He.list2):de.push(He.list3):de.push(He.list1)}return ve.trailingSpaceNewLine?de.push("trailing-space-new-line"):ve.trailingSpace&&de.push("trailing-space-"+(ve.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function je(ve,de){if(ve.match(Le,!0))return Qe(de)}function ct(ve,de){var qe=de.text(ve,de);if(typeof qe!="undefined")return qe;if(de.list)return de.list=null,Qe(de);if(de.taskList){var kt=ve.match($e,!0)[1]===" ";return kt?de.taskOpen=!0:de.taskClosed=!0,Oe.highlightFormatting&&(de.formatting="task"),de.taskList=!1,Qe(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&ve.match(/^#+$/,!0))return Oe.highlightFormatting&&(de.formatting="header"),Qe(de);var yt=ve.next();if(de.linkTitle){de.linkTitle=!1;var Ne=yt;yt==="("&&(Ne=")"),Ne=(Ne+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var at="^\\s*(?:[^"+Ne+"\\\\]+|\\\\\\\\|\\\\.)"+Ne;if(ve.match(new RegExp(at),!0))return He.linkHref}if(yt==="`"){var nt=de.formatting;Oe.highlightFormatting&&(de.formatting="code"),ve.eatWhile("`");var Tt=ve.current().length;if(de.code==0&&(!de.quote||Tt==1))return de.code=Tt,Qe(de);if(Tt==de.code){var ut=Qe(de);return de.code=0,ut}else return de.formatting=nt,Qe(de)}else if(de.code)return Qe(de);if(yt==="\\"&&(ve.next(),Oe.highlightFormatting)){var At=Qe(de),Ie=He.formatting+"-escape";return At?At+" "+Ie:Ie}if(yt==="!"&&ve.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,Oe.highlightFormatting&&(de.formatting="image"),Qe(de);if(yt==="["&&de.imageMarker&&ve.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,Oe.highlightFormatting&&(de.formatting="image"),Qe(de);if(yt==="]"&&de.imageAltText){Oe.highlightFormatting&&(de.formatting="image");var At=Qe(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=Ge,At}if(yt==="["&&!de.image)return de.linkText&&ve.match(/^.*?\]/)||(de.linkText=!0,Oe.highlightFormatting&&(de.formatting="link")),Qe(de);if(yt==="]"&&de.linkText){Oe.highlightFormatting&&(de.formatting="link");var At=Qe(de);return de.linkText=!1,de.inline=de.f=ve.match(/\(.*?\)| ?\[.*?\]/,!1)?Ge:ct,At}if(yt==="<"&&ve.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Me,Oe.highlightFormatting&&(de.formatting="link");var At=Qe(de);return At?At+=" ":At="",At+He.linkInline}if(yt==="<"&&ve.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Me,Oe.highlightFormatting&&(de.formatting="link");var At=Qe(de);return At?At+=" ":At="",At+He.linkEmail}if(Oe.xml&&yt==="<"&&ve.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var pt=ve.string.indexOf(">",ve.pos);if(pt!=-1){var mt=ve.string.substring(ve.start,pt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(mt)&&(de.md_inside=!0)}return ve.backUp(1),de.htmlState=z.startState(Ve),tt(ve,de,_e)}if(Oe.xml&&yt==="<"&&ve.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(yt==="*"||yt==="_"){for(var ae=1,ne=ve.pos==1?" ":ve.string.charAt(ve.pos-2);ae<3&&ve.eat(yt);)ae++;var ee=ve.peek()||" ",oe=!/\s/.test(ee)&&(!De.test(ee)||/\s/.test(ne)||De.test(ne)),se=!/\s/.test(ne)&&(!De.test(ne)||/\s/.test(ee)||De.test(ee)),re=null,Se=null;if(ae%2&&(!de.em&&oe&&(yt==="*"||!se||De.test(ne))?re=!0:de.em==yt&&se&&(yt==="*"||!oe||De.test(ee))&&(re=!1)),ae>1&&(!de.strong&&oe&&(yt==="*"||!se||De.test(ne))?Se=!0:de.strong==yt&&se&&(yt==="*"||!oe||De.test(ee))&&(Se=!1)),Se!=null||re!=null){Oe.highlightFormatting&&(de.formatting=re==null?"strong":Se==null?"em":"strong em"),re===!0&&(de.em=yt),Se===!0&&(de.strong=yt);var ut=Qe(de);return re===!1&&(de.em=!1),Se===!1&&(de.strong=!1),ut}}else if(yt===" "&&(ve.eat("*")||ve.eat("_"))){if(ve.peek()===" ")return Qe(de);ve.backUp(1)}if(Oe.strikethrough){if(yt==="~"&&ve.eatWhile(yt)){if(de.strikethrough){Oe.highlightFormatting&&(de.formatting="strikethrough");var ut=Qe(de);return de.strikethrough=!1,ut}else if(ve.match(/^[^\s]/,!1))return de.strikethrough=!0,Oe.highlightFormatting&&(de.formatting="strikethrough"),Qe(de)}else if(yt===" "&&ve.match(/^~~/,!0)){if(ve.peek()===" ")return Qe(de);ve.backUp(2)}}if(Oe.emoji&&yt===":"&&ve.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,Oe.highlightFormatting&&(de.formatting="emoji");var et=Qe(de);return de.emoji=!1,et}return yt===" "&&(ve.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),Qe(de)}function Me(ve,de){var qe=ve.next();if(qe===">"){de.f=de.inline=ct,Oe.highlightFormatting&&(de.formatting="link");var kt=Qe(de);return kt?kt+=" ":kt="",kt+He.linkInline}return ve.match(/^[^>]+/,!0),He.linkInline}function Ge(ve,de){if(ve.eatSpace())return null;var qe=ve.next();return qe==="("||qe==="["?(de.f=de.inline=Te(qe==="("?")":"]"),Oe.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,Qe(de)):"error"}var ke={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Te(ve){return function(de,qe){var kt=de.next();if(kt===ve){qe.f=qe.inline=ct,Oe.highlightFormatting&&(qe.formatting="link-string");var yt=Qe(qe);return qe.linkHref=!1,yt}return de.match(ke[ve]),qe.linkHref=!0,Qe(qe)}}function ht(ve,de){return ve.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=dt,ve.next(),Oe.highlightFormatting&&(de.formatting="link"),de.linkText=!0,Qe(de)):it(ve,de,ct)}function dt(ve,de){if(ve.match(/^\]:/,!0)){de.f=de.inline=Rt,Oe.highlightFormatting&&(de.formatting="link");var qe=Qe(de);return de.linkText=!1,qe}return ve.match(/^([^\]\\]|\\.)+/,!0),He.linkText}function Rt(ve,de){return ve.eatSpace()?null:(ve.match(/^[^\s]+/,!0),ve.peek()===void 0?de.linkTitle=!0:ve.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=ct,He.linkHref+" url")}var wt={startState:function(){return{f:Xe,prevLine:{stream:null},thisLine:{stream:null},block:Xe,htmlState:null,indentation:0,inline:ct,text:je,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(ve){return{f:ve.f,prevLine:ve.prevLine,thisLine:ve.thisLine,block:ve.block,htmlState:ve.htmlState&&z.copyState(Ve,ve.htmlState),indentation:ve.indentation,localMode:ve.localMode,localState:ve.localMode?z.copyState(ve.localMode,ve.localState):null,inline:ve.inline,text:ve.text,formatting:!1,linkText:ve.linkText,linkTitle:ve.linkTitle,linkHref:ve.linkHref,code:ve.code,em:ve.em,strong:ve.strong,strikethrough:ve.strikethrough,emoji:ve.emoji,header:ve.header,setext:ve.setext,hr:ve.hr,taskList:ve.taskList,list:ve.list,listStack:ve.listStack.slice(0),quote:ve.quote,indentedCode:ve.indentedCode,trailingSpace:ve.trailingSpace,trailingSpaceNewLine:ve.trailingSpaceNewLine,md_inside:ve.md_inside,fencedEndRE:ve.fencedEndRE}},token:function(ve,de){if(de.formatting=!1,ve!=de.thisLine.stream){if(de.header=0,de.hr=!1,ve.match(/^\s*$/,!0))return Ze(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:ve},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=_e)){var qe=ve.match(/^\s*/,!0)[0].replace(/\t/g,Ke).length;if(de.indentation=qe,de.indentationDiff=null,qe>0)return null}}return de.f(ve,de)},innerMode:function(ve){return ve.block==_e?{state:ve.htmlState,mode:Ve}:ve.localState?{state:ve.localState,mode:ve.localMode}:{state:ve,mode:wt}},indent:function(ve,de,qe){return ve.block==_e&&Ve.indent?Ve.indent(ve.htmlState,de,qe):ve.localState&&ve.localMode.indent?ve.localMode.indent(ve.localState,de,qe):z.Pass},blankLine:Ze,getType:Qe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return wt},"xml"),z.defineMIME("text/markdown","markdown"),z.defineMIME("text/x-markdown","markdown")})},98101:function(_t,Pt,ce){(function(z){z(ce(89780))})(function(z){"use strict";z.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 Ye=0;Ye<z.modeInfo.length;Ye++){var Oe=z.modeInfo[Ye];Oe.mimes&&(Oe.mime=Oe.mimes[0])}z.findModeByMIME=function(Ve){Ve=Ve.toLowerCase();for(var xe=0;xe<z.modeInfo.length;xe++){var we=z.modeInfo[xe];if(we.mime==Ve)return we;if(we.mimes){for(var He=0;He<we.mimes.length;He++)if(we.mimes[He]==Ve)return we}}if(/\+xml$/.test(Ve))return z.findModeByMIME("application/xml");if(/\+json$/.test(Ve))return z.findModeByMIME("application/json")},z.findModeByExtension=function(Ve){Ve=Ve.toLowerCase();for(var xe=0;xe<z.modeInfo.length;xe++){var we=z.modeInfo[xe];if(we.ext){for(var He=0;He<we.ext.length;He++)if(we.ext[He]==Ve)return we}}},z.findModeByFileName=function(Ve){for(var xe=0;xe<z.modeInfo.length;xe++){var we=z.modeInfo[xe];if(we.file&&we.file.test(Ve))return we}var He=Ve.lastIndexOf("."),We=He>-1&&Ve.substring(He+1,Ve.length);if(We)return z.findModeByExtension(We)},z.findModeByName=function(Ve){Ve=Ve.toLowerCase();for(var xe=0;xe<z.modeInfo.length;xe++){var we=z.modeInfo[xe];if(we.name.toLowerCase()==Ve)return we;if(we.alias){for(var He=0;He<we.alias.length;He++)if(we.alias[He].toLowerCase()==Ve)return we}}}})},67549:function(_t,Pt,ce){(function(z){z(ce(89780))})(function(z){"use strict";z.defineMode("stex",function(Ye,Oe){"use strict";function Ve(Le,ge){Le.cmdState.push(ge)}function xe(Le){return Le.cmdState.length>0?Le.cmdState[Le.cmdState.length-1]:null}function we(Le){var ge=Le.cmdState.pop();ge&&ge.closeBracket()}function He(Le){for(var ge=Le.cmdState,Ce=ge.length-1;Ce>=0;Ce--){var De=ge[Ce];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function We(Le,ge,Ce){return function(){this.name=Le,this.bracketNo=0,this.style=ge,this.styles=Ce,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Be={};Be.importmodule=We("importmodule","tag",["string","builtin"]),Be.documentclass=We("documentclass","tag",["","atom"]),Be.usepackage=We("usepackage","tag",["atom"]),Be.begin=We("begin","tag",["atom"]),Be.end=We("end","tag",["atom"]),Be.label=We("label","tag",["atom"]),Be.ref=We("ref","tag",["atom"]),Be.eqref=We("eqref","tag",["atom"]),Be.cite=We("cite","tag",["atom"]),Be.bibitem=We("bibitem","tag",["atom"]),Be.Bibitem=We("Bibitem","tag",["atom"]),Be.RBibitem=We("RBibitem","tag",["atom"]),Be.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function he(Le,ge){Le.f=ge}function $e(Le,ge){var Ce;if(Le.match(/^\\[a-zA-Z@]+/)){var De=Le.current().slice(1);return Ce=Be.hasOwnProperty(De)?Be[De]:Be.DEFAULT,Ce=new Ce,Ve(ge,Ce),he(ge,Ue),Ce.style}if(Le.match(/^\\[$&%#{}_]/)||Le.match(/^\\[,;!\/\\]/))return"tag";if(Le.match("\\["))return he(ge,function(it,tt){return be(it,tt,"\\]")}),"keyword";if(Le.match("\\("))return he(ge,function(it,tt){return be(it,tt,"\\)")}),"keyword";if(Le.match("$$"))return he(ge,function(it,tt){return be(it,tt,"$$")}),"keyword";if(Le.match("$"))return he(ge,function(it,tt){return be(it,tt,"$")}),"keyword";var Ke=Le.next();if(Ke=="%")return Le.skipToEnd(),"comment";if(Ke=="}"||Ke=="]"){if(Ce=xe(ge),Ce)Ce.closeBracket(Ke),he(ge,Ue);else return"error";return"bracket"}else return Ke=="{"||Ke=="["?(Ce=Be.DEFAULT,Ce=new Ce,Ve(ge,Ce),"bracket"):/\d/.test(Ke)?(Le.eatWhile(/[\w.%]/),"atom"):(Le.eatWhile(/[\w\-_]/),Ce=He(ge),Ce.name=="begin"&&(Ce.argument=Le.current()),Ce.styleIdentifier())}function be(Le,ge,Ce){if(Le.eatSpace())return null;if(Ce&&Le.match(Ce))return he(ge,$e),"keyword";if(Le.match(/^\\[a-zA-Z@]+/))return"tag";if(Le.match(/^[a-zA-Z]+/))return"variable-2";if(Le.match(/^\\[$&%#{}_]/)||Le.match(/^\\[,;!\/]/)||Le.match(/^[\^_&]/))return"tag";if(Le.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Le.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var De=Le.next();return De=="{"||De=="}"||De=="["||De=="]"||De=="("||De==")"?"bracket":De=="%"?(Le.skipToEnd(),"comment"):"error"}function Ue(Le,ge){var Ce=Le.peek(),De;return Ce=="{"||Ce=="["?(De=xe(ge),De.openBracket(Ce),Le.eat(Ce),he(ge,$e),"bracket"):/[ \t\r]/.test(Ce)?(Le.eat(Ce),null):(he(ge,$e),we(ge),$e(Le,ge))}return{startState:function(){var Le=Oe.inMathMode?function(ge,Ce){return be(ge,Ce)}:$e;return{cmdState:[],f:Le}},copyState:function(Le){return{cmdState:Le.cmdState.slice(),f:Le.f}},token:function(Le,ge){return ge.f(Le,ge)},blankLine:function(Le){Le.f=$e,Le.cmdState.length=0},lineComment:"%"}}),z.defineMIME("text/x-stex","stex"),z.defineMIME("text/x-latex","stex")})},15525:function(_t,Pt,ce){(function(z){z(ce(89780))})(function(z){"use strict";var Ye={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},Oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};z.defineMode("xml",function(Ve,xe){var we=Ve.indentUnit,He={},We=xe.htmlMode?Ye:Oe;for(var Be in We)He[Be]=We[Be];for(var Be in xe)He[Be]=xe[Be];var he,$e;function be(Me,Ge){function ke(dt){return Ge.tokenize=dt,dt(Me,Ge)}var Te=Me.next();if(Te=="<")return Me.eat("!")?Me.eat("[")?Me.match("CDATA[")?ke(ge("atom","]]>")):null:Me.match("--")?ke(ge("comment","-->")):Me.match("DOCTYPE",!0,!0)?(Me.eatWhile(/[\w\._\-]/),ke(Ce(1))):null:Me.eat("?")?(Me.eatWhile(/[\w\._\-]/),Ge.tokenize=ge("meta","?>"),"meta"):(he=Me.eat("/")?"closeTag":"openTag",Ge.tokenize=Ue,"tag bracket");if(Te=="&"){var ht;return Me.eat("#")?Me.eat("x")?ht=Me.eatWhile(/[a-fA-F\d]/)&&Me.eat(";"):ht=Me.eatWhile(/[\d]/)&&Me.eat(";"):ht=Me.eatWhile(/[\w\.\-:]/)&&Me.eat(";"),ht?"atom":"error"}else return Me.eatWhile(/[^&<]/),null}be.isInText=!0;function Ue(Me,Ge){var ke=Me.next();if(ke==">"||ke=="/"&&Me.eat(">"))return Ge.tokenize=be,he=ke==">"?"endTag":"selfcloseTag","tag bracket";if(ke=="=")return he="equals",null;if(ke=="<"){Ge.tokenize=be,Ge.state=tt,Ge.tagName=Ge.tagStart=null;var Te=Ge.tokenize(Me,Ge);return Te?Te+" tag error":"tag error"}else return/[\'\"]/.test(ke)?(Ge.tokenize=Le(ke),Ge.stringStartCol=Me.column(),Ge.tokenize(Me,Ge)):(Me.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Le(Me){var Ge=function(ke,Te){for(;!ke.eol();)if(ke.next()==Me){Te.tokenize=Ue;break}return"string"};return Ge.isInAttribute=!0,Ge}function ge(Me,Ge){return function(ke,Te){for(;!ke.eol();){if(ke.match(Ge)){Te.tokenize=be;break}ke.next()}return Me}}function Ce(Me){return function(Ge,ke){for(var Te;(Te=Ge.next())!=null;){if(Te=="<")return ke.tokenize=Ce(Me+1),ke.tokenize(Ge,ke);if(Te==">")if(Me==1){ke.tokenize=be;break}else return ke.tokenize=Ce(Me-1),ke.tokenize(Ge,ke)}return"meta"}}function De(Me,Ge,ke){this.prev=Me.context,this.tagName=Ge,this.indent=Me.indented,this.startOfLine=ke,(He.doNotIndent.hasOwnProperty(Ge)||Me.context&&Me.context.noIndent)&&(this.noIndent=!0)}function Ke(Me){Me.context&&(Me.context=Me.context.prev)}function it(Me,Ge){for(var ke;;){if(!Me.context||(ke=Me.context.tagName,!He.contextGrabbers.hasOwnProperty(ke)||!He.contextGrabbers[ke].hasOwnProperty(Ge)))return;Ke(Me)}}function tt(Me,Ge,ke){return Me=="openTag"?(ke.tagStart=Ge.column(),ze):Me=="closeTag"?Ze:tt}function ze(Me,Ge,ke){return Me=="word"?(ke.tagName=Ge.current(),$e="tag",Ot):He.allowMissingTagName&&Me=="endTag"?($e="tag bracket",Ot(Me,Ge,ke)):($e="error",ze)}function Ze(Me,Ge,ke){if(Me=="word"){var Te=Ge.current();return ke.context&&ke.context.tagName!=Te&&He.implicitlyClosed.hasOwnProperty(ke.context.tagName)&&Ke(ke),ke.context&&ke.context.tagName==Te||He.matchClosing===!1?($e="tag",Xe):($e="tag error",_e)}else return He.allowMissingTagName&&Me=="endTag"?($e="tag bracket",Xe(Me,Ge,ke)):($e="error",_e)}function Xe(Me,Ge,ke){return Me!="endTag"?($e="error",Xe):(Ke(ke),tt)}function _e(Me,Ge,ke){return $e="error",Xe(Me,Ge,ke)}function Ot(Me,Ge,ke){if(Me=="word")return $e="attribute",Qe;if(Me=="endTag"||Me=="selfcloseTag"){var Te=ke.tagName,ht=ke.tagStart;return ke.tagName=ke.tagStart=null,Me=="selfcloseTag"||He.autoSelfClosers.hasOwnProperty(Te)?it(ke,Te):(it(ke,Te),ke.context=new De(ke,Te,ht==ke.indented)),tt}return $e="error",Ot}function Qe(Me,Ge,ke){return Me=="equals"?je:(He.allowMissing||($e="error"),Ot(Me,Ge,ke))}function je(Me,Ge,ke){return Me=="string"?ct:Me=="word"&&He.allowUnquoted?($e="string",Ot):($e="error",Ot(Me,Ge,ke))}function ct(Me,Ge,ke){return Me=="string"?ct:Ot(Me,Ge,ke)}return{startState:function(Me){var Ge={tokenize:be,state:tt,indented:Me||0,tagName:null,tagStart:null,context:null};return Me!=null&&(Ge.baseIndent=Me),Ge},token:function(Me,Ge){if(!Ge.tagName&&Me.sol()&&(Ge.indented=Me.indentation()),Me.eatSpace())return null;he=null;var ke=Ge.tokenize(Me,Ge);return(ke||he)&&ke!="comment"&&($e=null,Ge.state=Ge.state(he||ke,Me,Ge),$e&&(ke=$e=="error"?ke+" error":$e)),ke},indent:function(Me,Ge,ke){var Te=Me.context;if(Me.tokenize.isInAttribute)return Me.tagStart==Me.indented?Me.stringStartCol+1:Me.indented+we;if(Te&&Te.noIndent)return z.Pass;if(Me.tokenize!=Ue&&Me.tokenize!=be)return ke?ke.match(/^(\s*)/)[0].length:0;if(Me.tagName)return He.multilineTagIndentPastTag!==!1?Me.tagStart+Me.tagName.length+2:Me.tagStart+we*(He.multilineTagIndentFactor||1);if(He.alignCDATA&&/<!\[CDATA\[/.test(Ge))return 0;var ht=Ge&&/^<(\/)?([\w_:\.-]*)/.exec(Ge);if(ht&&ht[1])for(;Te;)if(Te.tagName==ht[2]){Te=Te.prev;break}else if(He.implicitlyClosed.hasOwnProperty(Te.tagName))Te=Te.prev;else break;else if(ht)for(;Te;){var dt=He.contextGrabbers[Te.tagName];if(dt&&dt.hasOwnProperty(ht[2]))Te=Te.prev;else break}for(;Te&&Te.prev&&!Te.startOfLine;)Te=Te.prev;return Te?Te.indent+we:Me.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:He.htmlMode?"html":"xml",helperType:He.htmlMode?"html":"xml",skipAttribute:function(Me){Me.state==je&&(Me.state=Ot)},xmlCurrentTag:function(Me){return Me.tagName?{name:Me.tagName,close:Me.type=="closeTag"}:null},xmlCurrentContext:function(Me){for(var Ge=[],ke=Me.context;ke;ke=ke.prev)ke.tagName&&Ge.push(ke.tagName);return Ge.reverse()}}}),z.defineMIME("text/xml","xml"),z.defineMIME("application/xml","xml"),z.mimeModes.hasOwnProperty("text/html")||z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(_t,Pt,ce){"use strict";ce.d(Pt,{hP:function(){return mt}});var z=function(ae,ne){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,oe){ee.__proto__=oe}||function(ee,oe){for(var se in oe)Object.prototype.hasOwnProperty.call(oe,se)&&(ee[se]=oe[se])})(ae,ne)};function Ye(ae,ne){function ee(){this.constructor=ae}z(ae,ne),ae.prototype=ne===null?Object.create(ne):(ee.prototype=ne.prototype,new ee)}function Oe(ae,ne,ee,oe){return new(ee||(ee=Promise))(function(se,re){function Se(vt){try{Lt(oe.next(vt))}catch(bt){re(bt)}}function et(vt){try{Lt(oe.throw(vt))}catch(bt){re(bt)}}function Lt(vt){var bt;vt.done?se(vt.value):(bt=vt.value,bt instanceof ee?bt:new ee(function(St){St(bt)})).then(Se,et)}Lt((oe=oe.apply(ae,ne||[])).next())})}function Ve(ae,ne){var ee,oe,se,re,Se={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return re={next:et(0),throw:et(1),return:et(2)},typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;function et(Lt){return function(vt){return function(bt){if(ee)throw new TypeError("Generator is already executing.");for(;Se;)try{if(ee=1,oe&&(se=2&bt[0]?oe.return:bt[0]?oe.throw||((se=oe.return)&&se.call(oe),0):oe.next)&&!(se=se.call(oe,bt[1])).done)return se;switch(oe=0,se&&(bt=[2&bt[0],se.value]),bt[0]){case 0:case 1:se=bt;break;case 4:return Se.label++,{value:bt[1],done:!1};case 5:Se.label++,oe=bt[1],bt=[0];continue;case 7:bt=Se.ops.pop(),Se.trys.pop();continue;default:if(se=Se.trys,!((se=se.length>0&&se[se.length-1])||bt[0]!==6&&bt[0]!==2)){Se=0;continue}if(bt[0]===3&&(!se||bt[1]>se[0]&&bt[1]<se[3])){Se.label=bt[1];break}if(bt[0]===6&&Se.label<se[1]){Se.label=se[1],se=bt;break}if(se&&Se.label<se[2]){Se.label=se[2],Se.ops.push(bt);break}se[2]&&Se.ops.pop(),Se.trys.pop();continue}bt=ne.call(ae,Se)}catch(St){bt=[6,St],oe=0}finally{ee=se=0}if(5&bt[0])throw bt[1];return{value:bt[0]?bt[1]:void 0,done:!0}}([Lt,vt])}}}function xe(){for(var ae=0,ne=0,ee=arguments.length;ne<ee;ne++)ae+=arguments[ne].length;var oe=Array(ae),se=0;for(ne=0;ne<ee;ne++)for(var re=arguments[ne],Se=0,et=re.length;Se<et;Se++,se++)oe[se]=re[Se];return oe}var we=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(ne,ee){for(var oe=0,se=ee;oe<se.length;oe++){var re=se[oe],Se=re[0],et=re[1];ne.setAttribute(Se,et)}},ae.createRect=function(ne,ee,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","rect");return se.setAttribute("width",ne.toString()),se.setAttribute("height",ee.toString()),oe&&ae.setAttributes(se,oe),se},ae.createLine=function(ne,ee,oe,se,re){var Se=document.createElementNS("http://www.w3.org/2000/svg","line");return Se.setAttribute("x1",ne.toString()),Se.setAttribute("y1",ee.toString()),Se.setAttribute("x2",oe.toString()),Se.setAttribute("y2",se.toString()),re&&ae.setAttributes(Se,re),Se},ae.createPolygon=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",ne),ee&&ae.setAttributes(oe,ee),oe},ae.createCircle=function(ne,ee){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()),ee&&ae.setAttributes(oe,ee),oe},ae.createEllipse=function(ne,ee,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return se.setAttribute("cx",(ne/2).toString()),se.setAttribute("cy",(ee/2).toString()),se.setAttribute("rx",(ne/2).toString()),se.setAttribute("ry",(ee/2).toString()),oe&&ae.setAttributes(se,oe),se},ae.createGroup=function(ne){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return ne&&ae.setAttributes(ee,ne),ee},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(ne,ee,oe,se,re,Se,et){var Lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Lt,[["id",ne],["orient",ee],["markerWidth",oe.toString()],["markerHeight",se.toString()],["refX",re.toString()],["refY",Se.toString()]]),Lt.appendChild(et),Lt},ae.createText=function(ne){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),ne&&ae.setAttributes(ee,ne),ee},ae.createTSpan=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=ne,ee&&ae.setAttributes(oe,ee),oe},ae.createImage=function(ne){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return ne&&ae.setAttributes(ee,ne),ee},ae.createPoint=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=ne,oe.y=ee,oe},ae.createPath=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",ne),ee&&ae.setAttributes(oe,ee),oe},ae}(),He=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}(),We=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(ne,ee,oe){var se=this;return new Promise(function(re){var Se=oe!==void 0?oe:document.createElement("canvas");ne===null&&(se.markersOnly=!0,se.naturalSize=!1);var et=document.createElementNS("http://www.w3.org/2000/svg","svg");et.setAttribute("xmlns","http://www.w3.org/2000/svg"),et.setAttribute("width",ee.width.baseVal.valueAsString),et.setAttribute("height",ee.height.baseVal.valueAsString),et.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),et.innerHTML=ee.innerHTML,se.naturalSize===!0?(et.width.baseVal.value=ne.naturalWidth,et.height.baseVal.value=ne.naturalHeight):se.width!==void 0&&se.height!==void 0&&(et.width.baseVal.value=se.width,et.height.baseVal.value=se.height),Se.width=et.width.baseVal.value,Se.height=et.height.baseVal.value;var Lt=et.outerHTML,vt=Se.getContext("2d");se.markersOnly!==!0&&vt.drawImage(ne,0,0,Se.width,Se.height);var bt=window.URL,St=new Image(Se.width,Se.height);St.setAttribute("crossOrigin","anonymous");var Gt=new Blob([Lt],{type:"image/svg+xml"}),jt=bt.createObjectURL(Gt);St.onload=function(){vt.drawImage(St,0,0),bt.revokeObjectURL(jt);var rn=Se.toDataURL(se.imageType,se.imageQuality);re(rn)},St.src=jt})},ae}(),Be=function(){},he=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 $e("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new be("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new be("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}(),$e=function(ae,ne){this.selector=ae,this.style=ne},be=function(ae,ne){this.localName=ae,this.style=ne},Ue=function(){function ae(ne,ee,oe,se,re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ne,this.displayMode=ee,this.markerItems=oe,this.uiStyleSettings=se,this.styles=re,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 ee=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(re){var Se=document.createElement("div");Se.className=""+ee.toolbarButtonStyleClass.name,Se.setAttribute("data-type-name",re.typeName),Se.innerHTML=re.icon,Se.addEventListener("click",function(){ee.markerToolbarButtonClicked(Se,re)}),ee.buttons.push(Se),ee.markerButtons.push(Se)}),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 ee=0;ee<this.markerButtons.length;ee++)ee<ne||ee===ne&&this.markerButtons.length-1===ne?this.markerButtonBlock.appendChild(this.markerButtons[ee]):(ee===ne&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ee]))}},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(ee){ee.className=ee.className.replace(ne.uiStyleSettings.toolbarButtonStyleColorsClassName?ne.uiStyleSettings.toolbarButtonStyleColorsClassName:ne.toolbarButtonStyleColorsClass.name,"").trim(),ee.className=ee.className.replace(ne.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ne.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ne.toolbarActiveButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(ne.uiStyleSettings.toolbarButtonStyleColorsClassName?ne.uiStyleSettings.toolbarButtonStyleColorsClassName:ne.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(ne,ee,oe){var se=this,re=document.createElement("div");switch(re.className=""+this.toolbarButtonStyleClass.name,re.innerHTML=ee,re.setAttribute("data-action",oe),re.addEventListener("click",function(){se.actionToolbarButtonClicked(re,oe)}),oe){case"select":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":re.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":re.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":re.style.fill=this.uiStyleSettings.closeButtonColor}ne.appendChild(re),this.buttons.push(re)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new be("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 be("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new be("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new be("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 be("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var ne=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new be("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 be("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new be("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new $e("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new $e("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ae.prototype.markerToolbarButtonClicked=function(ne,ee){this.setActiveButton(ne),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(ne,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",ee)}),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 ee=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===ne});ee&&this.setActiveButton(ee)},ae.prototype.setCurrentMarker=function(ne){var ee=this;this.currentMarker=ne,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){ee.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},ae}(),Le=function(){function ae(ne,ee,oe,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=ne,this.displayMode=ee,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 be("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 be("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new be("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new be("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new be("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 be("toolbox-panel-row_colors",`
|
|
background-color: `+((ne=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ne!==void 0?ne:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new be("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
padding: `+ee+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new be("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new be("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new $e("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new $e("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ae.prototype.show=function(ne){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ne,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(ne){var ee,oe,se=this;this.panels=ne,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee: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(re){var Se;re.uiStyleSettings=se.uiStyleSettings;var et=document.createElement("div");et.className=se.toolboxButtonStyleClass.name+" "+((Se=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Se!==void 0?Se:se.toolboxButtonStyleColorsClass.name),et.innerHTML=re.icon,et.title=re.title,et.addEventListener("click",function(){se.panelButtonClick(re)}),se.panelButtons.push(et),se.buttonRow.appendChild(et)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(ne){var ee=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(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(re,Se){var et,Lt;re.className=ee.toolboxButtonStyleClass.name+" "+(Se===oe?""+((et=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&et!==void 0?et:ee.toolboxActiveButtonStyleColorsClass.name):""+((Lt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Lt!==void 0?Lt:ee.toolboxButtonStyleColorsClass.name))})},ae}(),ge=function(ae,ne){this.title=ae,this.icon=ne},Ce=function(ae){function ne(ee,oe,se,re){var Se=ae.call(this,ee,re||'<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 Se.colors=[],Se.addTransparent=!1,Se.colorBoxes=[],Se.colors=oe,Se.currentColor=se,Se.setCurrentColor=Se.setCurrentColor.bind(Se),Se.getColorBox=Se.getColorBox.bind(Se),Se}return Ye(ne,ae),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(se){var re=ee.getColorBox(se);oe.appendChild(re),ee.colorBoxes.push(re)}),oe},ne.prototype.getColorBox=function(ee){var oe=this,se=this.uiStyleSettings.toolbarHeight/4,re=this.uiStyleSettings.toolbarHeight-se,Se=document.createElement("div");Se.style.display="inline-block",Se.style.boxSizing="content-box",Se.style.width=re-2+"px",Se.style.height=re-2+"px",Se.style.padding="1px",Se.style.marginRight="2px",Se.style.marginBottom="2px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.borderRadius=(re+2)/2+"px",Se.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){oe.setCurrentColor(ee,Se)});var et=document.createElement("div");return et.style.display="inline-block",et.style.width=re-2+"px",et.style.height=re-2+"px",et.style.backgroundColor=ee,et.style.borderRadius=re/2+"px",ee==="transparent"&&(et.style.fill=this.uiStyleSettings.toolboxAccentColor,et.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>`),Se.appendChild(et),Se},ne.prototype.setCurrentColor=function(ee,oe){var se=this;this.currentColor=ee,this.colorBoxes.forEach(function(re){re.style.borderColor=re===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},ne}(ge),De=function(){function ae(ne,ee,oe){this._state="new",this._isSelected=!1,this._container=ne,this._overlayContainer=ee,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,ee){},ae.prototype.dblClick=function(ne,ee){},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,ee){},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}(),Ke=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}(),it=function(){function ae(){this.GRIP_SIZE=10,this.visual=we.createGroup(),this.visual.appendChild(we.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(we.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}(),tt=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,ee){return ne.a=ee.a,ne.b=ee.b,ne.c=ee.c,ne.d=ee.d,ne.e=ee.e,ne.f=ee.f,ne},ae}(),ze=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.left=0,re.top=0,re.width=0,re.height=0,re.defaultSize={x:50,y:20},re.offsetX=0,re.offsetY=0,re.rotationAngle=0,re.CB_DISTANCE=10,re._suppressMarkerCreateEvent=!1,re.container.transform.baseVal.appendItem(we.createTransform()),re.setupControlBox(),re}return Ye(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(ee){this._visual=ee;var oe=we.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),ne.prototype.ownsTarget=function(ee){return!!ae.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},ne.prototype.pointerDown=function(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var se=this.unrotatePoint(ee);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 re=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=re.x-this.width/2,this.top=re.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Se=this.container.transform.baseVal.getItem(0);Se.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Se,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ne.prototype.pointerUp=function(ee){var oe=this.state;ae.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ne.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},ne.prototype.manipulate=function(ee){var oe=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):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(ee)},ne.prototype.resize=function(ee){var oe=this.manipulationStartLeft,se=this.manipulationStartWidth,re=this.manipulationStartTop,Se=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+ee.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+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:re=this.manipulationStartTop+ee.y-this.manipulationStartY,Se=this.manipulationStartHeight+this.manipulationStartTop-re;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Se=this.manipulationStartHeight+ee.y-this.manipulationStartY}se>=0?(this.left=oe,this.width=se):(this.left=oe+se,this.width=-se),Se>=0?(this.top=re,this.height=Se):(this.top=re+Se,this.height=-Se),this.setSize()},ne.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ne.prototype.rotate=function(ee){if(Math.abs(ee.x-this.centerX)>.1){var oe=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},ne.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},ne.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM(),se=we.createPoint(ee.x,ee.y);return{x:(se=se.matrixTransform(oe)).x,y:se.y}},ne.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM();oe=oe.inverse();var se=we.createPoint(ee.x,ee.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=we.createGroup();var ee=we.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=we.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=we.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 Ke,this.addControlGrips(),this.controlBox.style.display="none"},ne.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,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 ee=new it;return ee.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(ee.visual),ee},ne.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,oe=-ee/2,se=oe,re=(this.width+this.CB_DISTANCE)/2-ee/2,Se=(this.height+this.CB_DISTANCE)/2-ee/2,et=this.height+this.CB_DISTANCE-ee/2,Lt=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,se),this.positionGrip(this.controlGrips.topCenter.visual,re,se),this.positionGrip(this.controlGrips.topRight.visual,Lt,se),this.positionGrip(this.controlGrips.centerLeft.visual,oe,Se),this.positionGrip(this.controlGrips.centerRight.visual,Lt,Se),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,et),this.positionGrip(this.controlGrips.bottomCenter.visual,re,et),this.positionGrip(this.controlGrips.bottomRight.visual,Lt,et),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,re,se-3*this.CB_DISTANCE)},ne.prototype.positionGrip=function(ee,oe,se){var re=ee.transform.baseVal.getItem(0);re.setTranslate(oe,se),ee.transform.baseVal.replaceItem(re,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:tt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:tt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},ne.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var oe=ee;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(tt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,oe);var se=this.rotatePoint({x:this.left,y:this.top}),re=this.unrotatePoint({x:se.x*ee,y:se.y*oe});this.left=re.x,this.top=re.y,this.width=this.width*ee,this.height=this.height*oe,this.adjustControlBox()},ne}(De),Ze=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},ne.prototype.createVisual=function(){this.visual=we.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(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.setSize()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ne.prototype.pointerUp=function(ee){ae.prototype.pointerUp.call(this,ee),this.setSize()},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},ne.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&we.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(ee){var oe=ee;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,ee),this.setSize()},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,oe),this.setSize()},ne.title="Rectangle marker",ne}(ze),Xe=function(ae){function ne(ee,oe,se,re){var Se=ae.call(this,ee,re||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Se.widths=[],Se.widthBoxes=[],Se.widths=oe,Se.currentWidth=se,Se.setCurrentWidth=Se.setCurrentWidth.bind(Se),Se}return Ye(ne,ae),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(se){var re=document.createElement("div");re.style.display="flex",re.style.flexGrow="2",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=se===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){ee.setCurrentWidth(se,re)}),oe.appendChild(re);var Se=document.createElement("div");Se.innerText=se.toString(),Se.style.marginRight="5px",re.appendChild(Se);var et=document.createElement("div");et.style.minHeight="20px",et.style.flexGrow="2",et.style.display="flex",et.style.alignItems="center";var Lt=document.createElement("hr");Lt.style.minWidth="20px",Lt.style.border="0px",Lt.style.borderTop=se+"px solid "+ee.uiStyleSettings.toolboxColor,Lt.style.flexGrow="2",et.appendChild(Lt),re.appendChild(et),ee.widthBoxes.push(re)}),oe},ne.prototype.setCurrentWidth=function(ee,oe){var se=this;this.currentWidth=ee,this.widthBoxes.forEach(function(re){re.style.borderColor=re===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ne}(ge),_e=function(ae){function ne(ee,oe,se,re){var Se=ae.call(this,ee,re||'<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 Se.styles=[],Se.styleBoxes=[],Se.styles=oe,Se.currentStyle=se,Se.setCurrentStyle=Se.setCurrentStyle.bind(Se),Se}return Ye(ne,ae),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(se){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/ee.styles.length-5+"%",re.style.borderColor=se===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){ee.setCurrentStyle(se,re)}),oe.appendChild(re);var Se=document.createElement("div");Se.style.minHeight="20px",Se.style.flexGrow="2",Se.style.overflow="hidden";var et=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ee.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(se!==""?'stroke-dasharray="'+se+'"':"")+` />
|
|
</svg>`;Se.innerHTML=et,re.appendChild(Se),ee.styleBoxes.push(re)}),oe},ne.prototype.setCurrentStyle=function(ee,oe){var se=this;this.currentStyle=ee,this.styleBoxes.forEach(function(re){re.style.borderColor=re===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ne}(ge),Ot=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.strokeColor=se.defaultColor,re.strokeWidth=se.defaultStrokeWidth,re.strokeDasharray=se.defaultStrokeDasharray,re.strokePanel=new Ce("Line color",se.defaultColorSet,se.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new Xe("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new _e("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return Ye(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 ee=ae.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.typeName="FrameMarker",ne.title="Frame marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ne}(Ze),Qe=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"},je=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.x1=0,re.y1=0,re.x2=0,re.y2=0,re.defaultLength=50,re.manipulationStartX=0,re.manipulationStartY=0,re.manipulationStartX1=0,re.manipulationStartY1=0,re.manipulationStartX2=0,re.manipulationStartY2=0,re.setupControlBox(),re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!!ae.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},ne.prototype.pointerDown=function(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.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(ee){var oe=this.state;ae.prototype.pointerUp.call(this,ee),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(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ne.prototype.adjustVisual=function(){},ne.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},ne.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.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=we.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 ee=new it;return ee.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(ee.visual),ee},ne.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},ne.prototype.positionGrip=function(ee,oe,se){var re=ee.transform.baseVal.getItem(0);re.setTranslate(oe,se),ee.transform.baseVal.replaceItem(re,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(ee){ae.prototype.restoreState.call(this,ee);var oe=ee;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,oe),this.x1=this.x1*ee,this.y1=this.y1*oe,this.x2=this.x2*ee,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},ne}(De),ct=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.strokeColor=se.defaultColor,re.strokeWidth=se.defaultStrokeWidth,re.strokeDasharray=se.defaultStrokeDasharray,re.strokePanel=new Ce("Line color",se.defaultColorSet,se.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new Xe("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new _e("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},ne.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=we.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(ee,oe){ae.prototype.pointerDown.call(this,ee,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()),we.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,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 ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var oe=ee;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}(je),Me=function(ae){function ne(ee,oe,se,re){var Se=ae.call(this,ee,re||'<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 Se.fonts=[],Se.fontBoxes=[],Se.fonts=oe,Se.currentFont=se,Se.setCurrentFont=Se.setCurrentFont.bind(Se),Se}return Ye(ne,ae),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(se){var re=document.createElement("div");re.style.display="inline-block",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/ee.fonts.length-5+"%",re.style.borderColor=se===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){ee.setCurrentFont(se,re)}),oe.appendChild(re);var Se=document.createElement("div");Se.style.display="flex",Se.style.minHeight="20px",Se.style.flexGrow="2",Se.style.fontFamily=se,Se.style.overflow="hidden";var et=document.createElement("div");et.style.whiteSpace="nowrap",et.style.overflow="hidden",et.style.textOverflow="ellipsis",et.innerHTML="The quick brown fox jumps over the lazy dog",Se.appendChild(et),re.appendChild(Se),ee.fontBoxes.push(re)}),oe},ne.prototype.setCurrentFont=function(ee,oe){var se=this;this.currentFont=ee,this.fontBoxes.forEach(function(re){re.style.borderColor=re===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ne}(ge),Ge=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.color="transparent",re.padding=5,re.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",re.text=re.DEFAULT_TEXT,re.isMoved=!1,re.color=se.defaultColor,re.fontFamily=se.defaultFontFamily,re.defaultSize={x:100,y:30},re.setColor=re.setColor.bind(re),re.setFont=re.setFont.bind(re),re.renderText=re.renderText.bind(re),re.sizeText=re.sizeText.bind(re),re.textEditDivClicked=re.textEditDivClicked.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.setSize=re.setSize.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.colorPanel=new Ce("Color",se.defaultColorSet,se.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.fontFamilyPanel=new Me("Font",se.defaultFontFamilies,se.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){if(ae.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(se){se===ee&&(oe=!0)}),oe},ne.prototype.createVisual=function(){this.visual=we.createGroup(),this.bgRectangle=we.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=we.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ne.prototype.pointerDown=function(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.renderText=function(){var ee=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){ee.textElement.appendChild(we.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ne.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),oe=1;if(ee.width>0&&ee.height>0){var se=(1*this.width-this.width*this.padding*2/100)/ee.width,re=(1*this.height-this.height*this.padding*2/100)/ee.height;oe=Math.min(se,re)}return oe},ne.prototype.getTextPosition=function(ee){var oe=this.textElement.getBBox(),se=0,re=0;return oe.width>0&&oe.height>0&&(se=(this.width-oe.width*ee)/2,re=this.height/2-oe.height*ee/2),{x:se,y:re}},ne.prototype.sizeText=function(){var ee=this.textElement.getBBox(),oe=this.getTextScale(),se=this.getTextPosition(oe);se.y-=ee.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(ee){ae.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},ne.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ne.prototype.pointerUp=function(ee){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,ee),this.setSize(),(oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ne.prototype.showTextEditor=function(){var ee=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(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,ee.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"),re=window.getSelection();if(!re.rangeCount)return!1;re.deleteFromDocument(),re.getRangeAt(0).insertNode(document.createTextNode(se)),oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ee.textEditDivClicked(ee.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 ee=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),se=this.textElement.getBBox(),re={x:se.width*ee,y:se.height*ee};oe.x-=re.x/2,oe.y-=re.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*ee,12)+"px",this.textElement.style.display="none"}},ne.prototype.textEditDivClicked=function(ee){this.text=ee.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(ee,oe){ae.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},ne.prototype.setColor=function(ee){this.textElement&&we.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},ne.prototype.setFont=function(ee){this.textElement&&we.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,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 ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),ae.prototype.restoreState.call(this,ee),this.setSize()},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,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}(ze),ke=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.color="transparent",re.lineWidth=3,re.drawing=!1,re.pixelRatio=1,re.color=se.defaultColor,re.lineWidth=se.defaultStrokeWidth,re.pixelRatio=se.freehandPixelRatio,re.setColor=re.setColor.bind(re),re.addCanvas=re.addCanvas.bind(re),re.finishCreation=re.finishCreation.bind(re),re.setLineWidth=re.setLineWidth.bind(re),re.colorPanel=new Ce("Color",se.defaultColorSet,se.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.lineWidthPanel=new Xe("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),re.lineWidthPanel.onWidthChanged=re.setLineWidth,re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},ne.prototype.createVisual=function(){this.visual=we.createGroup(),this.drawingImage=we.createImage(),this.visual.appendChild(this.drawingImage);var ee=we.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},ne.prototype.pointerDown=function(ee,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(ee.x,ee.y),this.drawing=!0):ae.prototype.pointerDown.call(this,ee,oe)},ne.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ne.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,ee)},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 ee=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],re=oe[1],Se=oe[2],et=oe[3],Lt=!1,vt=0;vt<this.canvasElement.height;vt++)for(var bt=0;bt<this.canvasElement.width;bt++)ee.data[vt*this.canvasElement.width*4+4*bt+3]>0&&(Lt=!0,vt<re&&(re=vt),bt<se&&(se=bt),vt>et&&(et=vt),bt>Se&&(Se=bt));if(Lt){this.left=se/this.pixelRatio,this.top=re/this.pixelRatio,this.width=(Se-se)/this.pixelRatio,this.height=(et-re)/this.pixelRatio;var St=document.createElement("canvas");St.width=Se-se,St.height=et-re,St.getContext("2d").putImageData(this.canvasContext.getImageData(se,re,Se-se,et-re),0,0),this.drawingImgUrl=St.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ne.prototype.setDrawingImage=function(){we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ne.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},ne.prototype.setLineWidth=function(ee){this.lineWidth=ee},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 ee=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){this.createVisual(),ae.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,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}(ze),Te=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,se||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return re.typeBoxes=[],re.currentType=oe,re.setCurrentType=re.setCurrentType.bind(re),re}return Ye(ne,ae),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var se=function(et){var Lt="both";switch(et){case 0:Lt="both";break;case 1:Lt="start";break;case 2:Lt="end";break;case 3:Lt="none"}var vt=document.createElement("div");if(vt.style.display="flex",vt.style.flexGrow="2",vt.style.alignItems="center",vt.style.justifyContent="space-between",vt.style.padding="5px",vt.style.borderWidth="2px",vt.style.borderStyle="solid",vt.style.borderColor=Lt===re.currentType?re.uiStyleSettings.toolboxAccentColor:"transparent",vt.addEventListener("click",function(){ee.setCurrentType(Lt,vt)}),oe.appendChild(vt),Lt==="both"||Lt==="start"){var bt=document.createElement("div");bt.style.display="flex",bt.style.alignItems="center",bt.style.minHeight="20px",bt.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="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,bt.style.marginLeft="5px",vt.appendChild(bt)}var St=document.createElement("div");St.style.display="flex",St.style.alignItems="center",St.style.minHeight="20px",St.style.flexGrow="2";var Gt=document.createElement("hr");if(Gt.style.minWidth="20px",Gt.style.border="0px",Gt.style.borderTop="3px solid "+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee"),Gt.style.flexGrow="2",St.appendChild(Gt),vt.appendChild(St),Lt==="both"||Lt==="end"){var jt=document.createElement("div");jt.style.display="flex",jt.style.alignItems="center",jt.style.minHeight="20px",jt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,jt.style.marginRight="5px",vt.appendChild(jt)}re.typeBoxes.push(vt)},re=this,Se=0;Se<4;Se++)se(Se);return oe},ne.prototype.setCurrentType=function(ee,oe){var se=this;this.currentType=ee,this.typeBoxes.forEach(function(re){re.style.borderColor=re===oe?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ne}(ge),ht=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.arrowType="end",re.arrowBaseHeight=10,re.arrowBaseWidth=10,re.getArrowPoints=re.getArrowPoints.bind(re),re.setArrowType=re.setArrowType.bind(re),re.arrowTypePanel=new Te("Arrow type","end"),re.arrowTypePanel.onArrowTypeChanged=re.setArrowType,re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},ne.prototype.getArrowPoints=function(ee,oe){var se=this.arrowBaseWidth+2*this.strokeWidth,re=this.arrowBaseHeight+2*this.strokeWidth;return ee-se/2+","+(oe+re/2)+" "+ee+","+(oe-re/2)+" "+(ee+se/2)+","+(oe+re/2)},ne.prototype.createTips=function(){this.arrow1=we.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=we.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow2)},ne.prototype.pointerDown=function(ee,oe){ae.prototype.pointerDown.call(this,ee,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",we.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),we.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=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(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},ne.prototype.setArrowType=function(ee){this.arrowType=ee,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 ee=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var oe=ee;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}(ct),dt=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.fillColor=se.defaultFillColor,re.strokeWidth=0,re.fillPanel=new Ce("Color",se.defaultColorSet,se.defaultFillColor),re.fillPanel.onColorChanged=re.setFillColor,re}return Ye(ne,ae),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=ae.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.typeName="CoverMarker",ne.title="Cover marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ne}(Ze),Rt=function(ae){function ne(ee,oe,se,re){var Se=ae.call(this,ee,re||'<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 Se.opacities=[],Se.opacityBoxes=[],Se.opacities=oe,Se.currentOpacity=se,Se.setCurrentOpacity=Se.setCurrentOpacity.bind(Se),Se}return Ye(ne,ae),ne.prototype.getUi=function(){var ee=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 re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="center",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=se===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){ee.setCurrentOpacity(se,re)}),oe.appendChild(re);var Se=document.createElement("div");Se.innerText=100*se+"%",re.appendChild(Se),ee.opacityBoxes.push(re)}),oe},ne.prototype.setCurrentOpacity=function(ee,oe){var se=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(re){re.style.borderColor=re===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ne}(ge),wt=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.setOpacity=re.setOpacity.bind(re),re.fillColor=se.defaultHighlightColor,re.strokeWidth=0,re.opacity=se.defaultHighlightOpacity,re.fillPanel=new Ce("Color",se.defaultColorSet,re.fillColor),re.fillPanel.onColorChanged=re.setFillColor,re.opacityPanel=new Rt("Opacity",se.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return Ye(ne,ae),ne.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&we.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 ee=ae.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},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}(dt),ve='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',de='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',qe=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.bgColor="transparent",re.tipPosition={x:0,y:0},re.tipBase1Position={x:0,y:0},re.tipBase2Position={x:0,y:0},re.tipMoving=!1,re.color=se.defaultStrokeColor,re.bgColor=se.defaultFillColor,re.fontFamily=se.defaultFontFamily,re.defaultSize={x:100,y:30},re.setBgColor=re.setBgColor.bind(re),re.getTipPoints=re.getTipPoints.bind(re),re.positionTip=re.positionTip.bind(re),re.setTipPoints=re.setTipPoints.bind(re),re.colorPanel=new Ce("Text color",se.defaultColorSet,re.color,ve),re.colorPanel.onColorChanged=re.setColor,re.bgColorPanel=new Ce("Fill color",se.defaultColorSet,re.bgColor,de),re.bgColorPanel.onColorChanged=re.setBgColor,re.fontFamilyPanel=new Me("Font",se.defaultFontFamilies,se.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.tipGrip=new it,re.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),re.controlBox.appendChild(re.tipGrip.visual),re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return ae.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},ne.prototype.createTip=function(){we.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=we.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ne.prototype.pointerDown=function(ee,oe){this.state==="new"&&ae.prototype.pointerDown.call(this,ee,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,ee,oe)},ne.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,ee);else{var oe=this.state==="creating";ae.prototype.pointerUp.call(this,ee),this.setTipPoints(oe),this.positionTip()}},ne.prototype.manipulate=function(ee){if(this.tipMoving){var oe=this.unrotatePoint(ee);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,ee)},ne.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(we.setAttributes(this.bgRectangle,[["fill",ee]]),we.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},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(ee){ee===void 0&&(ee=!1);var oe=Math.min(this.height/2,15),se=this.height/5;ee&&(this.tipPosition={x:oe+se/2,y:this.height+20});var re=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?re<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?re<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?re<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}):re<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(ee){ae.prototype.resize.call(this,ee),this.positionTip()},ne.prototype.positionTip=function(){we.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ee=this.tipGrip.visual.transform.baseVal.getItem(0);ee.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ee,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 ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,ae.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,oe),this.tipPosition={x:this.tipPosition.x*ee,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}(Ge),kt=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.strokeColor=se.defaultColor,re.strokeWidth=se.defaultStrokeWidth,re.strokeDasharray=se.defaultStrokeDasharray,re.fillColor=se.defaultFillColor,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.setOpacity=re.setOpacity.bind(re),re.createVisual=re.createVisual.bind(re),re.strokePanel=new Ce("Line color",xe(se.defaultColorSet,["transparent"]),se.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new Ce("Fill color",xe(se.defaultColorSet,["transparent"]),re.fillColor,de),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new Xe("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new _e("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.opacityPanel=new Rt("Opacity",se.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},ne.prototype.createVisual=function(){this.visual=we.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(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.setSize()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),we.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(ee){ae.prototype.pointerUp.call(this,ee),this.setSize()},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},ne.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ne.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&we.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 ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;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,ee),this.setSize()},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,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}(ze),yt=function(ae){function ne(ee,oe,se){return ae.call(this,ee,oe,se)||this}return Ye(ne,ae),Object.defineProperty(ne.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},ne.prototype.createTips=function(){this.tip1=we.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(we.createTransform()),this.visual.appendChild(this.tip1),this.tip2=we.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(we.createTransform()),this.visual.appendChild(this.tip2)},ne.prototype.pointerDown=function(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.state==="creating"&&this.createTips()},ne.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(we.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()]]),we.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 ee=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(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,0);var se=this.tip2.transform.baseVal.getItem(0);se.setRotate(ee+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 ee=ae.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee),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}(ct),Ne=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.strokePanel.colors=se.defaultColorSet,re.fillColor="transparent",re}return Ye(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 ee=ae.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},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}(kt),at=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(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}(),nt=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.curveX=0,re.curveY=0,re.manipulationStartCurveX=0,re.manipulationStartCurveY=0,re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.positionGrips=re.positionGrips.bind(re),re.addControlGrips=re.addControlGrips.bind(re),re.adjustVisual=re.adjustVisual.bind(re),re.setupControlBox=re.setupControlBox.bind(re),re.resize=re.resize.bind(re),re.strokeColor=se.defaultColor,re.strokeWidth=se.defaultStrokeWidth,re.strokeDasharray=se.defaultStrokeDasharray,re.strokePanel=new Ce("Line color",se.defaultColorSet,se.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new Xe("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new _e("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},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=we.createGroup(),this.selectorCurve=we.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=we.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(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.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()),we.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ne.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=we.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=we.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 ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/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(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),ae.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),ae.prototype.resize.call(this,ee),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(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},ne.prototype.scale=function(ee,oe){this.curveX=this.curveX*ee,this.curveY=this.curveY*oe,ae.prototype.scale.call(this,ee,oe)},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var oe=ee;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}(je),Tt=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,oe,se)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.textColor="transparent",re.fontSize="1rem",re.isMoved=!1,re.captionText="Caption",re.PADDING=5,re.captionBoxWidth=0,re.captionBoxHeight=0,re.strokeColor=se.defaultColor,re.strokeWidth=se.defaultStrokeWidth,re.strokeDasharray=se.defaultStrokeDasharray,re.fillColor=se.defaultFillColor,re.textColor=se.defaultStrokeColor,re.fontFamily=se.defaultFontFamily,re.fontSize=se.defaultCaptionFontSize,re.captionText=se.defaultCaptionText,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re.sizeCaption=re.sizeCaption.bind(re),re.setCaptionText=re.setCaptionText.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.finishTextEditing=re.finishTextEditing.bind(re),re.setFont=re.setFont.bind(re),re.setTextColor=re.setTextColor.bind(re),re.strokePanel=new Ce("Line color",xe(se.defaultColorSet,["transparent"]),re.strokeColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new Ce("Fill color",xe(se.defaultColorSet,["transparent"]),re.fillColor,de),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new Xe("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new _e("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.fontFamilyPanel=new Me("Font",se.defaultFontFamilies,se.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.textColorPanel=new Ce("Text color",se.defaultColorSet,re.textColor,ve),re.textColorPanel.onColorChanged=re.setTextColor,re}return Ye(ne,ae),ne.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},ne.prototype.createVisual=function(){this.visual=we.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=we.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=we.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=we.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(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},ne.prototype.pointerDown=function(ee,oe){ae.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},ne.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.setSize()},ne.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),we.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')"]]),we.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 ee=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"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.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(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ne.prototype.setFont=function(ee){this.captionElement&&we.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ne.prototype.setTextColor=function(ee){this.captionElement&&we.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ne.prototype.setSize=function(){ae.prototype.setSize.call(this),we.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ne.prototype.pointerUp=function(ee){ae.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ne.prototype.dblClick=function(ee,oe){ae.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&we.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},ne.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&we.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&we.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&we.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 ee=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 ee.typeName=this.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;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,ee),this.setSize()},ne.prototype.scale=function(ee,oe){ae.prototype.scale.call(this,ee,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}(ze),ut=function(){function ae(ne,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ne,this.cancelable=ee}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),At=function(ae){function ne(ee,oe,se){var re=ae.call(this,ee,!1)||this;return re.dataUrl=oe,re.state=se,re}return Ye(ne,ae),ne}(ut),Ie=function(ae){function ne(ee,oe,se){se===void 0&&(se=!1);var re=ae.call(this,ee,se)||this;return re.marker=oe,re}return Ye(ne,ae),ne}(ut),pt=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,ee){this[ne].push(ee)},ae.prototype.removeEventListener=function(ne,ee){var oe=this[ne].indexOf(ee);oe>-1&&this[ne].splice(oe,1)},ae}(),mt=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 Qe,this._isOpen=!1,this.undoRedoManager=new at,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new pt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new he(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[Ot,ke,ht,Ge,Ne,kt,wt,qe,yt,dt,ct,nt,Tt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ot,ke,ht,Ge,kt,wt,qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ot,ke,ht,Ge,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ne){var ee=this;this._availableMarkerTypes.splice(0),ne.forEach(function(oe){if(typeof oe=="string"){var se=ee.ALL_MARKER_TYPES.find(function(re){return re.typeName===oe});se!==void 0&&ee._availableMarkerTypes.push(se)}else ee._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(),He.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var ne=this;this.styles.styleSheetRoot===void 0&&Be.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Be.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new ut(ne))})},ae.prototype.render=function(){return Oe(this,void 0,void 0,function(){var ne;return Ve(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(ne=new We).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 ee.sent(),[4,ne.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},ae.prototype.close=function(ne){var ee=this;if(ne===void 0&&(ne=!1),this.isOpen){var oe=!1;ne||this.eventListeners.beforeclose.forEach(function(se){var re=new ut(ee,!0);se(re),re.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 ut(ee))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var ne,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];(ne=this._availableMarkerTypes).push.apply(ne,ee)},ae.prototype.addRenderEventListener=function(ne){this.addEventListener("render",function(ee){ne(ee.dataUrl,ee.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,ee=this.editorCanvas.clientWidth/ne>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ne:this.editorCanvas.clientWidth,oe=ee<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ne;this.resize(ee,oe)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(ne,ee){this._isResizing=!0;var oe=ne/this.imageWidth,se=ee/this.imageHeight;this.imageWidth=Math.round(ne),this.imageHeight=Math.round(ee),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,ee){var oe,se=this;this._currentMarker&&this._currentMarker instanceof Ge?this._currentMarker.scale(ne,ee):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(re){re!==se._currentMarker&&re.scale(ne,ee)}),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(),ee=this.editorCanvas.getBoundingClientRect();this.left=ne.left-ee.left,this.top=ne.top-ee.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,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];this.defs=we.createDefs(),this.addDefsToImage(),(ne=this.defs).append.apply(ne,ee)},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 Ue(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 Le(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,ee){if(ne==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(ne==="action")switch(ee){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 ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var re=new Ie(ne,ne._currentMarker,!0);se(re),re.defaultPrevented&&(ee=!0)}),!ee){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 Ie(ne,oe))})}}},ae.prototype.clear=function(){var ne=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Se){var et=new Ie(ne,void 0,!0);Se(et),et.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var oe=function(Se){var et=se.markers[Se];se.setCurrentMarker(se.markers[Se]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(Lt){return Lt(new Ie(ne,et))})},se=this,re=this.markers.length-1;re>=0;re--)oe(re);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 ee=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===ee.width&&oe.height===ee.height){var se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(re){return re(new ut(ne))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(re){return re(new ut(ne))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var ne=this,ee=this.undoRedoManager.undo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new ut(ne))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var ne=this,ee=this.undoRedoManager.redo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new ut(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 Oe(this,void 0,void 0,function(){var ne,ee,oe=this;return Ve(this,function(se){switch(se.label){case 0:return[4,this.render()];case 1:return ne=se.sent(),ee=this.getState(),this.eventListeners.render.forEach(function(re){return re(new At(oe,ne,ee))}),this.close(!0),[2]}})})},ae.prototype.getState=function(ne){ne===!0&&this.setCurrentMarker();var ee={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return ee.markers.push(oe.getState())}),ee},ae.prototype.restoreState=function(ne){var ee=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ne.markers.forEach(function(oe){var se=ee._availableMarkerTypes.find(function(Se){return Se.typeName===oe.typeName});if(se!==void 0){var re=ee.addNewMarker(se);re.restoreState(oe),ee.markers.push(re)}}),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 ut(ee))})},ae.prototype.addNewMarker=function(ne){var ee=we.createGroup();return this.markerImage.appendChild(ee),new ne(ee,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(ne){var ee,oe=this;(ee=typeof ne=="string"?this._availableMarkerTypes.find(function(se){return se.typeName===ne}):ne)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ee),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(ee.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(se){return se(new Ie(oe,oe._currentMarker))}))},ae.prototype.markerCreated=function(ne){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ne),this.setCurrentMarker(ne),ne instanceof ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new Ie(ee,ee._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 ee=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new Ie(ee,ne))})},ae.prototype.setCurrentMarker=function(ne){var ee=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 Ie(ee,ee._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 Ie(ee,ee._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 ee=this.markers.find(function(oe){return oe.ownsTarget(ne.target)});ee!==void 0?(this.setCurrentMarker(ee),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 ee=this.markers.find(function(oe){return oe.ownsTarget(ne.target)});ee!==void 0&&ee!==this._currentMarker&&this.setCurrentMarker(ee),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,ee){var oe=this.markerImage.getBoundingClientRect();return{x:(ne-oe.left)/this.zoomLevel,y:(ee-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){He.addKey(ne)},ae.prototype.addEventListener=function(ne,ee){this.eventListeners.addEventListener(ne,ee)},ae.prototype.removeEventListener=function(ne,ee){this.eventListeners.removeEventListener(ne,ee)},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(ee){return ee(new ut(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(ee){return ee(new ut(ne))}))},ae.instanceCounter=0,ae}()},66042:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return Ge}});var z=ce(27247),Ye=ce(11913),Oe=ce(43403),Ve=ce(34280),xe=ce(59301),we=xe.createContext(null),He=xe.createContext({}),We=we,Be=ce(74430),he=ce(32855),$e=ce(92310),be=ce.n($e),Ue=ce(77900),Le=ce(10228),ge=ce(26112),Ce=ce(43079),De=ce(8654),Ke=["prefixCls","className","containerRef"],it=function(Te){var ht=Te.prefixCls,dt=Te.className,Rt=Te.containerRef,wt=(0,Ce.Z)(Te,Ke),ve=xe.useContext(He),de=ve.panel,qe=(0,De.x1)(de,Rt);return xe.createElement("div",(0,he.Z)({className:be()("".concat(ht,"-content"),dt),role:"dialog",ref:qe},(0,ge.Z)(Te,{aria:!0}),{"aria-modal":"true"},wt))},tt=it,ze=ce(48736);function Ze(ke){return typeof ke=="string"&&String(Number(ke))===ke?((0,ze.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(ke)):ke}function Xe(ke){warning(!("wrapperClassName"in ke),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!ke.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var _e={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ot(ke,Te){var ht,dt,Rt,wt=ke.prefixCls,ve=ke.open,de=ke.placement,qe=ke.inline,kt=ke.push,yt=ke.forceRender,Ne=ke.autoFocus,at=ke.keyboard,nt=ke.classNames,Tt=ke.rootClassName,ut=ke.rootStyle,At=ke.zIndex,Ie=ke.className,pt=ke.id,mt=ke.style,ae=ke.motion,ne=ke.width,ee=ke.height,oe=ke.children,se=ke.mask,re=ke.maskClosable,Se=ke.maskMotion,et=ke.maskClassName,Lt=ke.maskStyle,vt=ke.afterOpenChange,bt=ke.onClose,St=ke.onMouseEnter,Gt=ke.onMouseOver,jt=ke.onMouseLeave,rn=ke.onClick,on=ke.onKeyDown,Bt=ke.onKeyUp,Sn=ke.styles,Yt=ke.drawerRender,sn=xe.useRef(),ft=xe.useRef(),wn=xe.useRef();xe.useImperativeHandle(Te,function(){return sn.current});var Ut=function(wr){var Ft=wr.keyCode,zt=wr.shiftKey;switch(Ft){case Le.Z.TAB:{if(Ft===Le.Z.TAB){if(!zt&&document.activeElement===wn.current){var gt;(gt=ft.current)===null||gt===void 0||gt.focus({preventScroll:!0})}else if(zt&&document.activeElement===ft.current){var Ct;(Ct=wn.current)===null||Ct===void 0||Ct.focus({preventScroll:!0})}}break}case Le.Z.ESC:{bt&&at&&(wr.stopPropagation(),bt(wr));break}}};xe.useEffect(function(){if(ve&&Ne){var Gn;(Gn=sn.current)===null||Gn===void 0||Gn.focus({preventScroll:!0})}},[ve]);var Jt=xe.useState(!1),gn=(0,Ye.Z)(Jt,2),Xn=gn[0],yn=gn[1],On=xe.useContext(We),Cr;typeof kt=="boolean"?Cr=kt?{}:{distance:0}:Cr=kt||{};var ar=(ht=(dt=(Rt=Cr)===null||Rt===void 0?void 0:Rt.distance)!==null&&dt!==void 0?dt:On==null?void 0:On.pushDistance)!==null&&ht!==void 0?ht:180,Hr=xe.useMemo(function(){return{pushDistance:ar,push:function(){yn(!0)},pull:function(){yn(!1)}}},[ar]);xe.useEffect(function(){if(ve){var Gn;On==null||(Gn=On.push)===null||Gn===void 0||Gn.call(On)}else{var wr;On==null||(wr=On.pull)===null||wr===void 0||wr.call(On)}},[ve]),xe.useEffect(function(){return function(){var Gn;On==null||(Gn=On.pull)===null||Gn===void 0||Gn.call(On)}},[]);var Or=se&&xe.createElement(Ue.default,(0,he.Z)({key:"mask"},Se,{visible:ve}),function(Gn,wr){var Ft=Gn.className,zt=Gn.style;return xe.createElement("div",{className:be()("".concat(wt,"-mask"),Ft,nt==null?void 0:nt.mask,et),style:(0,z.Z)((0,z.Z)((0,z.Z)({},zt),Lt),Sn==null?void 0:Sn.mask),onClick:re&&ve?bt:void 0,ref:wr})}),kr=typeof ae=="function"?ae(de):ae,mr={};if(Xn&&ar)switch(de){case"top":mr.transform="translateY(".concat(ar,"px)");break;case"bottom":mr.transform="translateY(".concat(-ar,"px)");break;case"left":mr.transform="translateX(".concat(ar,"px)");break;default:mr.transform="translateX(".concat(-ar,"px)");break}de==="left"||de==="right"?mr.width=Ze(ne):mr.height=Ze(ee);var bn={onMouseEnter:St,onMouseOver:Gt,onMouseLeave:jt,onClick:rn,onKeyDown:on,onKeyUp:Bt},lr=xe.createElement(Ue.default,(0,he.Z)({key:"panel"},kr,{visible:ve,forceRender:yt,onVisibleChanged:function(wr){vt==null||vt(wr)},removeOnLeave:!1,leavedClassName:"".concat(wt,"-content-wrapper-hidden")}),function(Gn,wr){var Ft=Gn.className,zt=Gn.style,gt=xe.createElement(tt,(0,he.Z)({id:pt,containerRef:wr,prefixCls:wt,className:be()(Ie,nt==null?void 0:nt.content),style:(0,z.Z)((0,z.Z)({},mt),Sn==null?void 0:Sn.content)},(0,ge.Z)(ke,{aria:!0}),bn),oe);return xe.createElement("div",(0,he.Z)({className:be()("".concat(wt,"-content-wrapper"),nt==null?void 0:nt.wrapper,Ft),style:(0,z.Z)((0,z.Z)((0,z.Z)({},mr),zt),Sn==null?void 0:Sn.wrapper)},(0,ge.Z)(ke,{data:!0})),Yt?Yt(gt):gt)}),pr=(0,z.Z)({},ut);return At&&(pr.zIndex=At),xe.createElement(We.Provider,{value:Hr},xe.createElement("div",{className:be()(wt,"".concat(wt,"-").concat(de),Tt,(0,Be.Z)((0,Be.Z)({},"".concat(wt,"-open"),ve),"".concat(wt,"-inline"),qe)),style:pr,tabIndex:-1,ref:sn,onKeyDown:Ut},Or,xe.createElement("div",{tabIndex:0,ref:ft,style:_e,"aria-hidden":"true","data-sentinel":"start"}),lr,xe.createElement("div",{tabIndex:0,ref:wn,style:_e,"aria-hidden":"true","data-sentinel":"end"})))}var Qe=xe.forwardRef(Ot),je=Qe,ct=function(Te){var ht=Te.open,dt=ht===void 0?!1:ht,Rt=Te.prefixCls,wt=Rt===void 0?"rc-drawer":Rt,ve=Te.placement,de=ve===void 0?"right":ve,qe=Te.autoFocus,kt=qe===void 0?!0:qe,yt=Te.keyboard,Ne=yt===void 0?!0:yt,at=Te.width,nt=at===void 0?378:at,Tt=Te.mask,ut=Tt===void 0?!0:Tt,At=Te.maskClosable,Ie=At===void 0?!0:At,pt=Te.getContainer,mt=Te.forceRender,ae=Te.afterOpenChange,ne=Te.destroyOnClose,ee=Te.onMouseEnter,oe=Te.onMouseOver,se=Te.onMouseLeave,re=Te.onClick,Se=Te.onKeyDown,et=Te.onKeyUp,Lt=Te.panelRef,vt=xe.useState(!1),bt=(0,Ye.Z)(vt,2),St=bt[0],Gt=bt[1],jt=xe.useState(!1),rn=(0,Ye.Z)(jt,2),on=rn[0],Bt=rn[1];(0,Ve.Z)(function(){Bt(!0)},[]);var Sn=on?dt:!1,Yt=xe.useRef(),sn=xe.useRef();(0,Ve.Z)(function(){Sn&&(sn.current=document.activeElement)},[Sn]);var ft=function(Xn){var yn;if(Gt(Xn),ae==null||ae(Xn),!Xn&&sn.current&&!((yn=Yt.current)!==null&&yn!==void 0&&yn.contains(sn.current))){var On;(On=sn.current)===null||On===void 0||On.focus({preventScroll:!0})}},wn=xe.useMemo(function(){return{panel:Lt}},[Lt]);if(!mt&&!St&&!Sn&&ne)return null;var Ut={onMouseEnter:ee,onMouseOver:oe,onMouseLeave:se,onClick:re,onKeyDown:Se,onKeyUp:et},Jt=(0,z.Z)((0,z.Z)({},Te),{},{open:Sn,prefixCls:wt,placement:de,autoFocus:kt,keyboard:Ne,width:nt,mask:ut,maskClosable:Ie,inline:pt===!1,afterOpenChange:ft,ref:Yt},Ut);return xe.createElement(He.Provider,{value:wn},xe.createElement(Oe.Z,{open:Sn||mt||St,autoDestroy:!1,getContainer:pt,autoLock:ut&&(Sn||St)},xe.createElement(je,Jt)))},Me=ct,Ge=Me},25930:function(_t,Pt,ce){"use strict";ce.d(Pt,{Cd:function(){return ct}});var z=ce(32855),Ye=ce(27247),Oe=ce(43079),Ve=ce(59301),xe=ce(92310),we=ce.n(xe),He={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},We=function(){var ke=(0,Ve.useRef)([]),Te=(0,Ve.useRef)(null);return(0,Ve.useEffect)(function(){var ht=Date.now(),dt=!1;ke.current.forEach(function(Rt){if(Rt){dt=!0;var wt=Rt.style;wt.transitionDuration=".3s, .3s, .3s, .06s",Te.current&&ht-Te.current<100&&(wt.transitionDuration="0s, 0s")}}),dt&&(Te.current=Date.now())}),ke.current},Be=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],he=function(ke){var Te=(0,Ye.Z)((0,Ye.Z)({},He),ke),ht=Te.className,dt=Te.percent,Rt=Te.prefixCls,wt=Te.strokeColor,ve=Te.strokeLinecap,de=Te.strokeWidth,qe=Te.style,kt=Te.trailColor,yt=Te.trailWidth,Ne=Te.transition,at=(0,Oe.Z)(Te,Be);delete at.gapPosition;var nt=Array.isArray(dt)?dt:[dt],Tt=Array.isArray(wt)?wt:[wt],ut=We(),At=de/2,Ie=100-de/2,pt="M ".concat(ve==="round"?At:0,",").concat(At,`
|
|
L `).concat(ve==="round"?Ie:100,",").concat(At),mt="0 0 100 ".concat(de),ae=0;return Ve.createElement("svg",(0,z.Z)({className:we()("".concat(Rt,"-line"),ht),viewBox:mt,preserveAspectRatio:"none",style:qe},at),Ve.createElement("path",{className:"".concat(Rt,"-line-trail"),d:pt,strokeLinecap:ve,stroke:kt,strokeWidth:yt||de,fillOpacity:"0"}),nt.map(function(ne,ee){var oe=1;switch(ve){case"round":oe=1-de/100;break;case"square":oe=1-de/2/100;break;default:oe=1;break}var se={strokeDasharray:"".concat(ne*oe,"px, 100px"),strokeDashoffset:"-".concat(ae,"px"),transition:Ne||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},re=Tt[ee]||Tt[Tt.length-1];return ae+=ne,Ve.createElement("path",{key:ee,className:"".concat(Rt,"-line-path"),d:pt,strokeLinecap:ve,stroke:re,strokeWidth:de,fillOpacity:"0",ref:function(et){ut[ee]=et},style:se})}))},$e=he,be=ce(34666),Ue=ce(11913),Le=ce(47273),ge=0,Ce=(0,Le.Z)();function De(){var Ge;return Ce?(Ge=ge,ge+=1):Ge="TEST_OR_SSR",Ge}var Ke=function(Ge){var ke=Ve.useState(),Te=(0,Ue.Z)(ke,2),ht=Te[0],dt=Te[1];return Ve.useEffect(function(){dt("rc_progress_".concat(De()))},[]),Ge||ht},it=function(ke){var Te=ke.bg,ht=ke.children;return Ve.createElement("div",{style:{width:"100%",height:"100%",background:Te}},ht)};function tt(Ge,ke){return Object.keys(Ge).map(function(Te){var ht=parseFloat(Te),dt="".concat(Math.floor(ht*ke),"%");return"".concat(Ge[Te]," ").concat(dt)})}var ze=Ve.forwardRef(function(Ge,ke){var Te=Ge.prefixCls,ht=Ge.color,dt=Ge.gradientId,Rt=Ge.radius,wt=Ge.style,ve=Ge.ptg,de=Ge.strokeLinecap,qe=Ge.strokeWidth,kt=Ge.size,yt=Ge.gapDegree,Ne=ht&&(0,be.Z)(ht)==="object",at=Ne?"#FFF":void 0,nt=kt/2,Tt=Ve.createElement("circle",{className:"".concat(Te,"-circle-path"),r:Rt,cx:nt,cy:nt,stroke:at,strokeLinecap:de,strokeWidth:qe,opacity:ve===0?0:1,style:wt,ref:ke});if(!Ne)return Tt;var ut="".concat(dt,"-conic"),At=yt?"".concat(180+yt/2,"deg"):"0deg",Ie=tt(ht,(360-yt)/360),pt=tt(ht,1),mt="conic-gradient(from ".concat(At,", ").concat(Ie.join(", "),")"),ae="linear-gradient(to ".concat(yt?"bottom":"top",", ").concat(pt.join(", "),")");return Ve.createElement(Ve.Fragment,null,Ve.createElement("mask",{id:ut},Tt),Ve.createElement("foreignObject",{x:0,y:0,width:kt,height:kt,mask:"url(#".concat(ut,")")},Ve.createElement(it,{bg:ae},Ve.createElement(it,{bg:mt}))))}),Ze=ze,Xe=100,_e=function(ke,Te,ht,dt,Rt,wt,ve,de,qe,kt){var yt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ne=ht/100*360*((360-wt)/360),at=wt===0?0:{bottom:0,top:180,left:90,right:-90}[ve],nt=(100-dt)/100*Te;qe==="round"&&dt!==100&&(nt+=kt/2,nt>=Te&&(nt=Te-.01));var Tt=Xe/2;return{stroke:typeof de=="string"?de:void 0,strokeDasharray:"".concat(Te,"px ").concat(ke),strokeDashoffset:nt+yt,transform:"rotate(".concat(Rt+Ne+at,"deg)"),transformOrigin:"".concat(Tt,"px ").concat(Tt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Ot=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Qe(Ge){var ke=Ge!=null?Ge:[];return Array.isArray(ke)?ke:[ke]}var je=function(ke){var Te=(0,Ye.Z)((0,Ye.Z)({},He),ke),ht=Te.id,dt=Te.prefixCls,Rt=Te.steps,wt=Te.strokeWidth,ve=Te.trailWidth,de=Te.gapDegree,qe=de===void 0?0:de,kt=Te.gapPosition,yt=Te.trailColor,Ne=Te.strokeLinecap,at=Te.style,nt=Te.className,Tt=Te.strokeColor,ut=Te.percent,At=(0,Oe.Z)(Te,Ot),Ie=Xe/2,pt=Ke(ht),mt="".concat(pt,"-gradient"),ae=Ie-wt/2,ne=Math.PI*2*ae,ee=qe>0?90+qe/2:-90,oe=ne*((360-qe)/360),se=(0,be.Z)(Rt)==="object"?Rt:{count:Rt,gap:2},re=se.count,Se=se.gap,et=Qe(ut),Lt=Qe(Tt),vt=Lt.find(function(Bt){return Bt&&(0,be.Z)(Bt)==="object"}),bt=vt&&(0,be.Z)(vt)==="object",St=bt?"butt":Ne,Gt=_e(ne,oe,0,100,ee,qe,kt,yt,St,wt),jt=We(),rn=function(){var Sn=0;return et.map(function(Yt,sn){var ft=Lt[sn]||Lt[Lt.length-1],wn=_e(ne,oe,Sn,Yt,ee,qe,kt,ft,St,wt);return Sn+=Yt,Ve.createElement(Ze,{key:sn,color:ft,ptg:Yt,radius:ae,prefixCls:dt,gradientId:mt,style:wn,strokeLinecap:St,strokeWidth:wt,gapDegree:qe,ref:function(Jt){jt[sn]=Jt},size:Xe})}).reverse()},on=function(){var Sn=Math.round(re*(et[0]/100)),Yt=100/re,sn=0;return new Array(re).fill(null).map(function(ft,wn){var Ut=wn<=Sn-1?Lt[0]:yt,Jt=Ut&&(0,be.Z)(Ut)==="object"?"url(#".concat(mt,")"):void 0,gn=_e(ne,oe,sn,Yt,ee,qe,kt,Ut,"butt",wt,Se);return sn+=(oe-gn.strokeDashoffset+Se)*100/oe,Ve.createElement("circle",{key:wn,className:"".concat(dt,"-circle-path"),r:ae,cx:Ie,cy:Ie,stroke:Jt,strokeWidth:wt,opacity:1,style:gn,ref:function(yn){jt[wn]=yn}})})};return Ve.createElement("svg",(0,z.Z)({className:we()("".concat(dt,"-circle"),nt),viewBox:"0 0 ".concat(Xe," ").concat(Xe),style:at,id:ht,role:"presentation"},At),!re&&Ve.createElement("circle",{className:"".concat(dt,"-circle-trail"),r:ae,cx:Ie,cy:Ie,stroke:yt,strokeLinecap:St,strokeWidth:ve||wt,style:Gt}),re?on():rn())},ct=je,Me={Line:$e,Circle:ct}},738:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return tt}});var z=ce(32855),Ye=ce(74430),Oe=ce(11913),Ve=ce(43079),xe=ce(92310),we=ce.n(xe),He=ce(18929),We=ce(10228),Be=ce(26112),he=ce(59301);function $e(ze,Ze){var Xe=ze.disabled,_e=ze.prefixCls,Ot=ze.character,Qe=ze.characterRender,je=ze.index,ct=ze.count,Me=ze.value,Ge=ze.allowHalf,ke=ze.focused,Te=ze.onHover,ht=ze.onClick,dt=function(Ne){Te(Ne,je)},Rt=function(Ne){ht(Ne,je)},wt=function(Ne){Ne.keyCode===We.Z.ENTER&&ht(Ne,je)},ve=je+1,de=new Set([_e]);Me===0&&je===0&&ke?de.add("".concat(_e,"-focused")):Ge&&Me+.5>=ve&&Me<ve?(de.add("".concat(_e,"-half")),de.add("".concat(_e,"-active")),ke&&de.add("".concat(_e,"-focused"))):(ve<=Me?de.add("".concat(_e,"-full")):de.add("".concat(_e,"-zero")),ve===Me&&ke&&de.add("".concat(_e,"-focused")));var qe=typeof Ot=="function"?Ot(ze):Ot,kt=he.createElement("li",{className:we()(Array.from(de)),ref:Ze},he.createElement("div",{onClick:Xe?null:Rt,onKeyDown:Xe?null:wt,onMouseMove:Xe?null:dt,role:"radio","aria-checked":Me>je?"true":"false","aria-posinset":je+1,"aria-setsize":ct,tabIndex:Xe?-1:0},he.createElement("div",{className:"".concat(_e,"-first")},qe),he.createElement("div",{className:"".concat(_e,"-second")},qe)));return Qe&&(kt=Qe(kt,ze)),kt}var be=he.forwardRef($e);function Ue(){var ze=he.useRef({});function Ze(_e){return ze.current[_e]}function Xe(_e){return function(Ot){ze.current[_e]=Ot}}return[Ze,Xe]}function Le(ze){var Ze=ze.pageXOffset,Xe="scrollLeft";if(typeof Ze!="number"){var _e=ze.document;Ze=_e.documentElement[Xe],typeof Ze!="number"&&(Ze=_e.body[Xe])}return Ze}function ge(ze){var Ze,Xe,_e=ze.ownerDocument,Ot=_e.body,Qe=_e&&_e.documentElement,je=ze.getBoundingClientRect();return Ze=je.left,Xe=je.top,Ze-=Qe.clientLeft||Ot.clientLeft||0,Xe-=Qe.clientTop||Ot.clientTop||0,{left:Ze,top:Xe}}function Ce(ze){var Ze=ge(ze),Xe=ze.ownerDocument,_e=Xe.defaultView||Xe.parentWindow;return Ze.left+=Le(_e),Ze.left}var De=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Ke(ze,Ze){var Xe=ze.prefixCls,_e=Xe===void 0?"rc-rate":Xe,Ot=ze.className,Qe=ze.defaultValue,je=ze.value,ct=ze.count,Me=ct===void 0?5:ct,Ge=ze.allowHalf,ke=Ge===void 0?!1:Ge,Te=ze.allowClear,ht=Te===void 0?!0:Te,dt=ze.keyboard,Rt=dt===void 0?!0:dt,wt=ze.character,ve=wt===void 0?"\u2605":wt,de=ze.characterRender,qe=ze.disabled,kt=ze.direction,yt=kt===void 0?"ltr":kt,Ne=ze.tabIndex,at=Ne===void 0?0:Ne,nt=ze.autoFocus,Tt=ze.onHoverChange,ut=ze.onChange,At=ze.onFocus,Ie=ze.onBlur,pt=ze.onKeyDown,mt=ze.onMouseLeave,ae=(0,Ve.Z)(ze,De),ne=Ue(),ee=(0,Oe.Z)(ne,2),oe=ee[0],se=ee[1],re=he.useRef(null),Se=function(){if(!qe){var bn;(bn=re.current)===null||bn===void 0||bn.focus()}};he.useImperativeHandle(Ze,function(){return{focus:Se,blur:function(){if(!qe){var bn;(bn=re.current)===null||bn===void 0||bn.blur()}}}});var et=(0,He.Z)(Qe||0,{value:je}),Lt=(0,Oe.Z)(et,2),vt=Lt[0],bt=Lt[1],St=(0,He.Z)(null),Gt=(0,Oe.Z)(St,2),jt=Gt[0],rn=Gt[1],on=function(bn,lr){var pr=yt==="rtl",Gn=bn+1;if(ke){var wr=oe(bn),Ft=Ce(wr),zt=wr.clientWidth;(pr&&lr-Ft>zt/2||!pr&&lr-Ft<zt/2)&&(Gn-=.5)}return Gn},Bt=function(bn){bt(bn),ut==null||ut(bn)},Sn=he.useState(!1),Yt=(0,Oe.Z)(Sn,2),sn=Yt[0],ft=Yt[1],wn=function(){ft(!0),At==null||At()},Ut=function(){ft(!1),Ie==null||Ie()},Jt=he.useState(null),gn=(0,Oe.Z)(Jt,2),Xn=gn[0],yn=gn[1],On=function(bn,lr){var pr=on(lr,bn.pageX);pr!==jt&&(yn(pr),rn(null)),Tt==null||Tt(pr)},Cr=function(bn){qe||(yn(null),rn(null),Tt==null||Tt(void 0)),bn&&(mt==null||mt(bn))},ar=function(bn,lr){var pr=on(lr,bn.pageX),Gn=!1;ht&&(Gn=pr===vt),Cr(),Bt(Gn?0:pr),rn(Gn?pr:null)},Hr=function(bn){var lr=bn.keyCode,pr=yt==="rtl",Gn=ke?.5:1;Rt&&(lr===We.Z.RIGHT&&vt<Me&&!pr?(Bt(vt+Gn),bn.preventDefault()):lr===We.Z.LEFT&&vt>0&&!pr||lr===We.Z.RIGHT&&vt>0&&pr?(Bt(vt-Gn),bn.preventDefault()):lr===We.Z.LEFT&&vt<Me&&pr&&(Bt(vt+Gn),bn.preventDefault())),pt==null||pt(bn)};he.useEffect(function(){nt&&!qe&&Se()},[]);var Or=new Array(Me).fill(0).map(function(mr,bn){return he.createElement(be,{ref:se(bn),index:bn,count:Me,disabled:qe,prefixCls:"".concat(_e,"-star"),allowHalf:ke,value:Xn===null?vt:Xn,onClick:ar,onHover:On,key:mr||bn,character:ve,characterRender:de,focused:sn})}),kr=we()(_e,Ot,(0,Ye.Z)((0,Ye.Z)({},"".concat(_e,"-disabled"),qe),"".concat(_e,"-rtl"),yt==="rtl"));return he.createElement("ul",(0,z.Z)({className:kr,onMouseLeave:Cr,tabIndex:qe?-1:at,onFocus:qe?null:wn,onBlur:qe?null:Ut,onKeyDown:qe?null:Hr,ref:re},(0,Be.Z)(ae,{aria:!0,data:!0,attr:!0})),Or)}var it=he.forwardRef(Ke),tt=it},6551:function(_t,Pt,ce){"use strict";ce.d(Pt,{ZP:function(){return He}});var z=ce(11913),Ye=ce(59301),Oe=ce(47273),Ve=0,xe=(0,Oe.Z)();function we(){var We;return xe?(We=Ve,Ve+=1):We="TEST_OR_SSR",We}function He(We){var Be=Ye.useState(),he=(0,z.Z)(Be,2),$e=he[0],be=he[1];return Ye.useEffect(function(){be("rc_select_".concat(we()))},[]),We||$e}},37463:function(_t,Pt,ce){"use strict";ce.d(Pt,{Ac:function(){return ft},Xo:function(){return Ut},Wx:function(){return gn},ZP:function(){return jn},lk:function(){return tt}});var z=ce(32855),Ye=ce(3300),Oe=ce(74430),Ve=ce(27247),xe=ce(11913),we=ce(43079),He=ce(34666),We=ce(18929),Be=ce(48736),he=ce(59301),$e=ce(92310),be=ce.n($e),Ue=ce(34280),Le=ce(49658),ge=ce(8654),Ce=function(Re){var Wt=Re.className,Ee=Re.customizeIcon,me=Re.customizeIconProps,ye=Re.children,rt=Re.onMouseDown,Zt=Re.onClick,$t=typeof Ee=="function"?Ee(me):Ee;return he.createElement("span",{className:Wt,onMouseDown:function(st){st.preventDefault(),rt==null||rt(st)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Zt,"aria-hidden":!0},$t!==void 0?$t:he.createElement("span",{className:be()(Wt.split(/\s+/).map(function(xt){return"".concat(xt,"-icon")}))},ye))},De=Ce,Ke=function(Re,Wt,Ee,me,ye){var rt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Zt=arguments.length>6?arguments[6]:void 0,$t=arguments.length>7?arguments[7]:void 0,xt=he.useMemo(function(){if((0,He.Z)(me)==="object")return me.clearIcon;if(ye)return ye},[me,ye]),st=he.useMemo(function(){return!!(!rt&&me&&(Ee.length||Zt)&&!($t==="combobox"&&Zt===""))},[me,rt,Ee.length,Zt,$t]);return{allowClear:st,clearIcon:he.createElement(De,{className:"".concat(Re,"-clear"),onMouseDown:Wt,customizeIcon:xt},"\xD7")}},it=he.createContext(null);function tt(){return he.useContext(it)}function ze(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Re=he.useState(!1),Wt=(0,xe.Z)(Re,2),Ee=Wt[0],me=Wt[1],ye=he.useRef(null),rt=function(){window.clearTimeout(ye.current)};he.useEffect(function(){return rt},[]);var Zt=function(xt,st){rt(),ye.current=window.setTimeout(function(){me(xt),st&&st()},Pe)};return[Ee,Zt,rt]}function Ze(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Re=he.useRef(null),Wt=he.useRef(null);he.useEffect(function(){return function(){window.clearTimeout(Wt.current)}},[]);function Ee(me){(me||Re.current===null)&&(Re.current=me),window.clearTimeout(Wt.current),Wt.current=window.setTimeout(function(){Re.current=null},Pe)}return[function(){return Re.current},Ee]}function Xe(Pe,Re,Wt,Ee){var me=he.useRef(null);me.current={open:Re,triggerOpen:Wt,customizedTrigger:Ee},he.useEffect(function(){function ye(rt){var Zt;if(!((Zt=me.current)!==null&&Zt!==void 0&&Zt.customizedTrigger)){var $t=rt.target;$t.shadowRoot&&rt.composed&&($t=rt.composedPath()[0]||$t),me.current.open&&Pe().filter(function(xt){return xt}).every(function(xt){return!xt.contains($t)&&xt!==$t})&&me.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ye),function(){return window.removeEventListener("mousedown",ye)}},[])}var _e=ce(10228);function Ot(Pe){return Pe&&![_e.Z.ESC,_e.Z.SHIFT,_e.Z.BACKSPACE,_e.Z.TAB,_e.Z.WIN_KEY,_e.Z.ALT,_e.Z.META,_e.Z.WIN_KEY_RIGHT,_e.Z.CTRL,_e.Z.SEMICOLON,_e.Z.EQUALS,_e.Z.CAPS_LOCK,_e.Z.CONTEXT_MENU,_e.Z.F1,_e.Z.F2,_e.Z.F3,_e.Z.F4,_e.Z.F5,_e.Z.F6,_e.Z.F7,_e.Z.F8,_e.Z.F9,_e.Z.F10,_e.Z.F11,_e.Z.F12].includes(Pe)}var Qe=ce(26112),je=ce(11780);function ct(Pe,Re,Wt){var Ee=(0,Ve.Z)((0,Ve.Z)({},Pe),Wt?Re:{});return Object.keys(Re).forEach(function(me){var ye=Re[me];typeof ye=="function"&&(Ee[me]=function(){for(var rt,Zt=arguments.length,$t=new Array(Zt),xt=0;xt<Zt;xt++)$t[xt]=arguments[xt];return ye.apply(void 0,$t),(rt=Pe[me])===null||rt===void 0?void 0:rt.call.apply(rt,[Pe].concat($t))})}),Ee}var Me=ct,Ge=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],ke=function(Re,Wt){var Ee=Re.prefixCls,me=Re.id,ye=Re.inputElement,rt=Re.autoFocus,Zt=Re.autoComplete,$t=Re.editable,xt=Re.activeDescendantId,st=Re.value,pe=Re.open,qt=Re.attrs,Dt=(0,we.Z)(Re,Ge),an=ye||he.createElement("input",null),dn=an,Cn=dn.ref,hn=dn.props;return(0,Be.Kp)(!("maxLength"in an.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),an=he.cloneElement(an,(0,Ve.Z)((0,Ve.Z)((0,Ve.Z)({type:"search"},Me(Dt,hn,!0)),{},{id:me,ref:(0,ge.sQ)(Wt,Cn),autoComplete:Zt||"off",autoFocus:rt,className:be()("".concat(Ee,"-selection-search-input"),hn==null?void 0:hn.className),role:"combobox","aria-expanded":pe||!1,"aria-haspopup":"listbox","aria-owns":"".concat(me,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(me,"_list"),"aria-activedescendant":pe?xt:void 0},qt),{},{value:$t?st:"",readOnly:!$t,unselectable:$t?null:"on",style:(0,Ve.Z)((0,Ve.Z)({},hn.style),{},{opacity:$t?null:0})})),an},Te=he.forwardRef(ke),ht=Te;function dt(Pe){return Array.isArray(Pe)?Pe:Pe!==void 0?[Pe]:[]}var Rt=typeof window!="undefined"&&window.document&&window.document.documentElement,wt=Rt;function ve(Pe){return Pe!=null}function de(Pe){return!Pe&&Pe!==0}function qe(Pe){return["string","number"].includes((0,He.Z)(Pe))}function kt(Pe){var Re=void 0;return Pe&&(qe(Pe.title)?Re=Pe.title.toString():qe(Pe.label)&&(Re=Pe.label.toString())),Re}function yt(Pe,Re){wt?he.useLayoutEffect(Pe,Re):he.useEffect(Pe,Re)}function Ne(Pe){var Re;return(Re=Pe.key)!==null&&Re!==void 0?Re:Pe.value}var at=function(Re){Re.preventDefault(),Re.stopPropagation()},nt=function(Re){var Wt=Re.id,Ee=Re.prefixCls,me=Re.values,ye=Re.open,rt=Re.searchValue,Zt=Re.autoClearSearchValue,$t=Re.inputRef,xt=Re.placeholder,st=Re.disabled,pe=Re.mode,qt=Re.showSearch,Dt=Re.autoFocus,an=Re.autoComplete,dn=Re.activeDescendantId,Cn=Re.tabIndex,hn=Re.removeIcon,er=Re.maxTagCount,Dn=Re.maxTagTextLength,Ln=Re.maxTagPlaceholder,Qn=Ln===void 0?function(An){return"+ ".concat(An.length," ...")}:Ln,Fn=Re.tagRender,tr=Re.onToggleOpen,fr=Re.onRemove,nr=Re.onInputChange,Jn=Re.onInputPaste,Wn=Re.onInputKeyDown,zn=Re.onInputMouseDown,un=Re.onInputCompositionStart,br=Re.onInputCompositionEnd,xn=Re.onInputBlur,Kt=he.useRef(null),Pn=(0,he.useState)(0),_n=(0,xe.Z)(Pn,2),gr=_n[0],qn=_n[1],Tn=(0,he.useState)(!1),hr=(0,xe.Z)(Tn,2),In=hr[0],Yn=hr[1],Zn="".concat(Ee,"-selection"),Lr=ye||pe==="multiple"&&Zt===!1||pe==="tags"?rt:"",sr=pe==="tags"||pe==="multiple"&&Zt===!1||qt&&(ye||In);yt(function(){qn(Kt.current.scrollWidth)},[Lr]);var jr=function(fn,Un,Xt,Nt,tn){return he.createElement("span",{title:kt(fn),className:be()("".concat(Zn,"-item"),(0,Oe.Z)({},"".concat(Zn,"-item-disabled"),Xt))},he.createElement("span",{className:"".concat(Zn,"-item-content")},Un),Nt&&he.createElement(De,{className:"".concat(Zn,"-item-remove"),onMouseDown:at,onClick:tn,customizeIcon:hn},"\xD7"))},Kr=function(fn,Un,Xt,Nt,tn,ln){var ir=function(Fr){at(Fr),tr(!ye)};return he.createElement("span",{onMouseDown:ir},Fn({label:Un,value:fn,disabled:Xt,closable:Nt,onClose:tn,isMaxTag:!!ln}))},Rr=function(fn){var Un=fn.disabled,Xt=fn.label,Nt=fn.value,tn=!st&&!Un,ln=Xt;if(typeof Dn=="number"&&(typeof Xt=="string"||typeof Xt=="number")){var ir=String(ln);ir.length>Dn&&(ln="".concat(ir.slice(0,Dn),"..."))}var cr=function(vr){vr&&vr.stopPropagation(),fr(fn)};return typeof Fn=="function"?Kr(Nt,ln,Un,tn,cr):jr(fn,ln,Un,tn,cr)},ur=function(fn){if(!me.length)return null;var Un=typeof Qn=="function"?Qn(fn):Qn;return typeof Fn=="function"?Kr(void 0,Un,!1,!1,void 0,!0):jr({title:Un},Un,!1)},It=he.createElement("div",{className:"".concat(Zn,"-search"),style:{width:gr},onFocus:function(){Yn(!0)},onBlur:function(){Yn(!1)}},he.createElement(ht,{ref:$t,open:ye,prefixCls:Ee,id:Wt,inputElement:null,disabled:st,autoFocus:Dt,autoComplete:an,editable:sr,activeDescendantId:dn,value:Lr,onKeyDown:Wn,onMouseDown:zn,onChange:nr,onPaste:Jn,onCompositionStart:un,onCompositionEnd:br,onBlur:xn,tabIndex:Cn,attrs:(0,Qe.Z)(Re,!0)}),he.createElement("span",{ref:Kt,className:"".concat(Zn,"-search-mirror"),"aria-hidden":!0},Lr,"\xA0")),Qt=he.createElement(je.Z,{prefixCls:"".concat(Zn,"-overflow"),data:me,renderItem:Rr,renderRest:ur,suffix:It,itemKey:Ne,maxCount:er});return he.createElement("span",{className:"".concat(Zn,"-wrap")},Qt,!me.length&&!Lr&&he.createElement("span",{className:"".concat(Zn,"-placeholder")},xt))},Tt=nt,ut=function(Re){var Wt=Re.inputElement,Ee=Re.prefixCls,me=Re.id,ye=Re.inputRef,rt=Re.disabled,Zt=Re.autoFocus,$t=Re.autoComplete,xt=Re.activeDescendantId,st=Re.mode,pe=Re.open,qt=Re.values,Dt=Re.placeholder,an=Re.tabIndex,dn=Re.showSearch,Cn=Re.searchValue,hn=Re.activeValue,er=Re.maxLength,Dn=Re.onInputKeyDown,Ln=Re.onInputMouseDown,Qn=Re.onInputChange,Fn=Re.onInputPaste,tr=Re.onInputCompositionStart,fr=Re.onInputCompositionEnd,nr=Re.onInputBlur,Jn=Re.title,Wn=he.useState(!1),zn=(0,xe.Z)(Wn,2),un=zn[0],br=zn[1],xn=st==="combobox",Kt=xn||dn,Pn=qt[0],_n=Cn||"";xn&&hn&&!un&&(_n=hn),he.useEffect(function(){xn&&br(!1)},[xn,hn]);var gr=st!=="combobox"&&!pe&&!dn?!1:!!_n,qn=Jn===void 0?kt(Pn):Jn,Tn=he.useMemo(function(){return Pn?null:he.createElement("span",{className:"".concat(Ee,"-selection-placeholder"),style:gr?{visibility:"hidden"}:void 0},Dt)},[Pn,gr,Dt,Ee]);return he.createElement("span",{className:"".concat(Ee,"-selection-wrap")},he.createElement("span",{className:"".concat(Ee,"-selection-search")},he.createElement(ht,{ref:ye,prefixCls:Ee,id:me,open:pe,inputElement:Wt,disabled:rt,autoFocus:Zt,autoComplete:$t,editable:Kt,activeDescendantId:xt,value:_n,onKeyDown:Dn,onMouseDown:Ln,onChange:function(In){br(!0),Qn(In)},onPaste:Fn,onCompositionStart:tr,onCompositionEnd:fr,onBlur:nr,tabIndex:an,attrs:(0,Qe.Z)(Re,!0),maxLength:xn?er:void 0})),!xn&&Pn?he.createElement("span",{className:"".concat(Ee,"-selection-item"),title:qn,style:gr?{visibility:"hidden"}:void 0},Pn.label):null,Tn)},At=ut,Ie=function(Re,Wt){var Ee=(0,he.useRef)(null),me=(0,he.useRef)(!1),ye=Re.prefixCls,rt=Re.open,Zt=Re.mode,$t=Re.showSearch,xt=Re.tokenWithEnter,st=Re.disabled,pe=Re.prefix,qt=Re.autoClearSearchValue,Dt=Re.onSearch,an=Re.onSearchSubmit,dn=Re.onToggleOpen,Cn=Re.onInputKeyDown,hn=Re.onInputBlur,er=Re.domRef;he.useImperativeHandle(Wt,function(){return{focus:function(qn){Ee.current.focus(qn)},blur:function(){Ee.current.blur()}}});var Dn=Ze(0),Ln=(0,xe.Z)(Dn,2),Qn=Ln[0],Fn=Ln[1],tr=function(qn){var Tn=qn.which,hr=Ee.current instanceof HTMLTextAreaElement;!hr&&rt&&(Tn===_e.Z.UP||Tn===_e.Z.DOWN)&&qn.preventDefault(),Cn&&Cn(qn),Tn===_e.Z.ENTER&&Zt==="tags"&&!me.current&&!rt&&(an==null||an(qn.target.value)),!(hr&&!rt&&~[_e.Z.UP,_e.Z.DOWN,_e.Z.LEFT,_e.Z.RIGHT].indexOf(Tn))&&Ot(Tn)&&dn(!0)},fr=function(){Fn(!0)},nr=(0,he.useRef)(null),Jn=function(qn){Dt(qn,!0,me.current)!==!1&&dn(!0)},Wn=function(){me.current=!0},zn=function(qn){me.current=!1,Zt!=="combobox"&&Jn(qn.target.value)},un=function(qn){var Tn=qn.target.value;if(xt&&nr.current&&/[\r\n]/.test(nr.current)){var hr=nr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Tn=Tn.replace(hr,nr.current)}nr.current=null,Jn(Tn)},br=function(qn){var Tn=qn.clipboardData,hr=Tn==null?void 0:Tn.getData("text");nr.current=hr||""},xn=function(qn){var Tn=qn.target;if(Tn!==Ee.current){var hr=document.body.style.msTouchAction!==void 0;hr?setTimeout(function(){Ee.current.focus()}):Ee.current.focus()}},Kt=function(qn){var Tn=Qn();qn.target!==Ee.current&&!Tn&&!(Zt==="combobox"&&st)&&qn.preventDefault(),(Zt!=="combobox"&&(!$t||!Tn)||!rt)&&(rt&&qt!==!1&&Dt("",!0,!1),dn())},Pn={inputRef:Ee,onInputKeyDown:tr,onInputMouseDown:fr,onInputChange:un,onInputPaste:br,onInputCompositionStart:Wn,onInputCompositionEnd:zn,onInputBlur:hn},_n=Zt==="multiple"||Zt==="tags"?he.createElement(Tt,(0,z.Z)({},Re,Pn)):he.createElement(At,(0,z.Z)({},Re,Pn));return he.createElement("div",{ref:er,className:"".concat(ye,"-selector"),onClick:xn,onMouseDown:Kt},pe&&he.createElement("div",{className:"".concat(ye,"-prefix")},pe),_n)},pt=he.forwardRef(Ie),mt=pt,ae=ce(65030),ne=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ee=function(Re){var Wt=Re===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"}}},oe=function(Re,Wt){var Ee=Re.prefixCls,me=Re.disabled,ye=Re.visible,rt=Re.children,Zt=Re.popupElement,$t=Re.animation,xt=Re.transitionName,st=Re.dropdownStyle,pe=Re.dropdownClassName,qt=Re.direction,Dt=qt===void 0?"ltr":qt,an=Re.placement,dn=Re.builtinPlacements,Cn=Re.dropdownMatchSelectWidth,hn=Re.dropdownRender,er=Re.dropdownAlign,Dn=Re.getPopupContainer,Ln=Re.empty,Qn=Re.getTriggerDOMNode,Fn=Re.onPopupVisibleChange,tr=Re.onPopupMouseEnter,fr=(0,we.Z)(Re,ne),nr="".concat(Ee,"-dropdown"),Jn=Zt;hn&&(Jn=hn(Zt));var Wn=he.useMemo(function(){return dn||ee(Cn)},[dn,Cn]),zn=$t?"".concat(nr,"-").concat($t):xt,un=typeof Cn=="number",br=he.useMemo(function(){return un?null:Cn===!1?"minWidth":"width"},[Cn,un]),xn=st;un&&(xn=(0,Ve.Z)((0,Ve.Z)({},xn),{},{width:Cn}));var Kt=he.useRef(null);return he.useImperativeHandle(Wt,function(){return{getPopupElement:function(){var _n;return(_n=Kt.current)===null||_n===void 0?void 0:_n.popupElement}}}),he.createElement(ae.Z,(0,z.Z)({},fr,{showAction:Fn?["click"]:[],hideAction:Fn?["click"]:[],popupPlacement:an||(Dt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Wn,prefixCls:nr,popupTransitionName:zn,popup:he.createElement("div",{onMouseEnter:tr},Jn),ref:Kt,stretch:br,popupAlign:er,popupVisible:ye,getPopupContainer:Dn,popupClassName:be()(pe,(0,Oe.Z)({},"".concat(nr,"-empty"),Ln)),popupStyle:xn,getTriggerDOMNode:Qn,onPopupVisibleChange:Fn}),rt)},se=he.forwardRef(oe),re=se,Se=ce(40954);function et(Pe,Re){var Wt=Pe.key,Ee;return"value"in Pe&&(Ee=Pe.value),Wt!=null?Wt:Ee!==void 0?Ee:"rc-index-key-".concat(Re)}function Lt(Pe){return typeof Pe!="undefined"&&!Number.isNaN(Pe)}function vt(Pe,Re){var Wt=Pe||{},Ee=Wt.label,me=Wt.value,ye=Wt.options,rt=Wt.groupLabel,Zt=Ee||(Re?"children":"label");return{label:Zt,value:me||"value",options:ye||"options",groupLabel:rt||Zt}}function bt(Pe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Wt=Re.fieldNames,Ee=Re.childrenAsData,me=[],ye=vt(Wt,!1),rt=ye.label,Zt=ye.value,$t=ye.options,xt=ye.groupLabel;function st(pe,qt){Array.isArray(pe)&&pe.forEach(function(Dt){if(qt||!($t in Dt)){var an=Dt[Zt];me.push({key:et(Dt,me.length),groupOption:qt,data:Dt,label:Dt[rt],value:an})}else{var dn=Dt[xt];dn===void 0&&Ee&&(dn=Dt.label),me.push({key:et(Dt,me.length),group:!0,data:Dt,label:dn}),st(Dt[$t],!0)}})}return st(Pe,!1),me}function St(Pe){var Re=(0,Ve.Z)({},Pe);return"props"in Re||Object.defineProperty(Re,"props",{get:function(){return(0,Be.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Re}}),Re}var Gt=function(Re,Wt,Ee){if(!Wt||!Wt.length)return null;var me=!1,ye=function Zt($t,xt){var st=(0,Se.Z)(xt),pe=st[0],qt=st.slice(1);if(!pe)return[$t];var Dt=$t.split(pe);return me=me||Dt.length>1,Dt.reduce(function(an,dn){return[].concat((0,Ye.Z)(an),(0,Ye.Z)(Zt(dn,qt)))},[]).filter(Boolean)},rt=ye(Re,Wt);return me?typeof Ee!="undefined"?rt.slice(0,Ee):rt:null},jt=he.createContext(null),rn=jt;function on(Pe){var Re=Pe.visible,Wt=Pe.values;if(!Re)return null;var Ee=50;return he.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Wt.slice(0,Ee).map(function(me){var ye=me.label,rt=me.value;return["number","string"].includes((0,He.Z)(ye))?ye:rt}).join(", ")),Wt.length>Ee?", ...":null)}var Bt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Sn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Yt=function(Re){return Re==="tags"||Re==="multiple"},sn=he.forwardRef(function(Pe,Re){var Wt,Ee=Pe.id,me=Pe.prefixCls,ye=Pe.className,rt=Pe.showSearch,Zt=Pe.tagRender,$t=Pe.direction,xt=Pe.omitDomProps,st=Pe.displayValues,pe=Pe.onDisplayValuesChange,qt=Pe.emptyOptions,Dt=Pe.notFoundContent,an=Dt===void 0?"Not Found":Dt,dn=Pe.onClear,Cn=Pe.mode,hn=Pe.disabled,er=Pe.loading,Dn=Pe.getInputElement,Ln=Pe.getRawInputElement,Qn=Pe.open,Fn=Pe.defaultOpen,tr=Pe.onDropdownVisibleChange,fr=Pe.activeValue,nr=Pe.onActiveValueChange,Jn=Pe.activeDescendantId,Wn=Pe.searchValue,zn=Pe.autoClearSearchValue,un=Pe.onSearch,br=Pe.onSearchSplit,xn=Pe.tokenSeparators,Kt=Pe.allowClear,Pn=Pe.prefix,_n=Pe.suffixIcon,gr=Pe.clearIcon,qn=Pe.OptionList,Tn=Pe.animation,hr=Pe.transitionName,In=Pe.dropdownStyle,Yn=Pe.dropdownClassName,Zn=Pe.dropdownMatchSelectWidth,Lr=Pe.dropdownRender,sr=Pe.dropdownAlign,jr=Pe.placement,Kr=Pe.builtinPlacements,Rr=Pe.getPopupContainer,ur=Pe.showAction,It=ur===void 0?[]:ur,Qt=Pe.onFocus,An=Pe.onBlur,fn=Pe.onKeyUp,Un=Pe.onKeyDown,Xt=Pe.onMouseDown,Nt=(0,we.Z)(Pe,Bt),tn=Yt(Cn),ln=(rt!==void 0?rt:tn)||Cn==="combobox",ir=(0,Ve.Z)({},Nt);Sn.forEach(function(Dr){delete ir[Dr]}),xt==null||xt.forEach(function(Dr){delete ir[Dr]});var cr=he.useState(!1),Fr=(0,xe.Z)(cr,2),vr=Fr[0],Er=Fr[1];he.useEffect(function(){Er((0,Le.Z)())},[]);var Nr=he.useRef(null),Gr=he.useRef(null),_r=he.useRef(null),Yr=he.useRef(null),Mr=he.useRef(null),oi=he.useRef(!1),Vr=ze(),Hi=(0,xe.Z)(Vr,3),ui=Hi[0],ni=Hi[1],Ar=Hi[2];he.useImperativeHandle(Re,function(){var Dr,xr;return{focus:(Dr=Yr.current)===null||Dr===void 0?void 0:Dr.focus,blur:(xr=Yr.current)===null||xr===void 0?void 0:xr.blur,scrollTo:function(xi){var ei;return(ei=Mr.current)===null||ei===void 0?void 0:ei.scrollTo(xi)},nativeElement:Nr.current||Gr.current}});var vi=he.useMemo(function(){var Dr;if(Cn!=="combobox")return Wn;var xr=(Dr=st[0])===null||Dr===void 0?void 0:Dr.value;return typeof xr=="string"||typeof xr=="number"?String(xr):""},[Wn,Cn,st]),Ui=Cn==="combobox"&&typeof Dn=="function"&&Dn()||null,Qr=typeof Ln=="function"&&Ln(),Wi=(0,ge.x1)(Gr,Qr==null||(Wt=Qr.props)===null||Wt===void 0?void 0:Wt.ref),Si=he.useState(!1),ci=(0,xe.Z)(Si,2),oo=ci[0],Bi=ci[1];(0,Ue.Z)(function(){Bi(!0)},[]);var Wr=(0,We.Z)(!1,{defaultValue:Fn,value:Qn}),Br=(0,xe.Z)(Wr,2),ai=Br[0],mi=Br[1],Xr=oo?ai:!1,eo=!an&&qt;(hn||eo&&Xr&&Cn==="combobox")&&(Xr=!1);var Ki=eo?!1:Xr,$n=he.useCallback(function(Dr){var xr=Dr!==void 0?Dr:!Xr;hn||(mi(xr),Xr!==xr&&(tr==null||tr(xr)))},[hn,Xr,mi,tr]),yr=he.useMemo(function(){return(xn||[]).some(function(Dr){return[`
|
|
`,`\r
|
|
`].includes(Dr)})},[xn]),or=he.useContext(rn)||{},dr=or.maxCount,Pr=or.rawValues,zr=function(xr,yi,xi){if(!(tn&&Lt(dr)&&(Pr==null?void 0:Pr.size)>=dr)){var ei=!0,li=xr;nr==null||nr(null);var Ji=Gt(xr,xn,Lt(dr)?dr-Pr.size:void 0),Vi=xi?null:Ji;return Cn!=="combobox"&&Vi&&(li="",br==null||br(Vi),$n(!1),ei=!1),un&&vi!==li&&un(li,{source:yi?"typing":"effect"}),ei}},Yi=function(xr){!xr||!xr.trim()||un(xr,{source:"submit"})};he.useEffect(function(){!Xr&&!tn&&Cn!=="combobox"&&zr("",!1,!1)},[Xr]),he.useEffect(function(){ai&&hn&&mi(!1),hn&&!oi.current&&ni(!1)},[hn]);var Ei=Ze(),gi=(0,xe.Z)(Ei,2),$r=gi[0],ji=gi[1],to=he.useRef(!1),Ti=function(xr){var yi=$r(),xi=xr.key,ei=xi==="Enter";if(ei&&(Cn!=="combobox"&&xr.preventDefault(),Xr||$n(!0)),ji(!!vi),xi==="Backspace"&&!yi&&tn&&!vi&&st.length){for(var li=(0,Ye.Z)(st),Ji=null,Vi=li.length-1;Vi>=0;Vi-=1){var lo=li[Vi];if(!lo.disabled){li.splice(Vi,1),Ji=lo;break}}Ji&&pe(li,{type:"remove",values:[Ji]})}for(var Ni=arguments.length,Oi=new Array(Ni>1?Ni-1:0),Qi=1;Qi<Ni;Qi++)Oi[Qi-1]=arguments[Qi];if(Xr&&(!ei||!to.current)){var fo;ei&&(to.current=!0),(fo=Mr.current)===null||fo===void 0||fo.onKeyDown.apply(fo,[xr].concat(Oi))}Un==null||Un.apply(void 0,[xr].concat(Oi))},no=function(xr){for(var yi=arguments.length,xi=new Array(yi>1?yi-1:0),ei=1;ei<yi;ei++)xi[ei-1]=arguments[ei];if(Xr){var li;(li=Mr.current)===null||li===void 0||li.onKeyUp.apply(li,[xr].concat(xi))}xr.key==="Enter"&&(to.current=!1),fn==null||fn.apply(void 0,[xr].concat(xi))},ao=function(xr){var yi=st.filter(function(xi){return xi!==xr});pe(yi,{type:"remove",values:[xr]})},Xi=function(){to.current=!1},Lo=he.useRef(!1),Ga=function(){ni(!0),hn||(Qt&&!Lo.current&&Qt.apply(void 0,arguments),It.includes("focus")&&$n(!0)),Lo.current=!0},ya=function(){oi.current=!0,ni(!1,function(){Lo.current=!1,oi.current=!1,$n(!1)}),!hn&&(vi&&(Cn==="tags"?un(vi,{source:"submit"}):Cn==="multiple"&&un("",{source:"blur"})),An&&An.apply(void 0,arguments))},ro=[];he.useEffect(function(){return function(){ro.forEach(function(Dr){return clearTimeout(Dr)}),ro.splice(0,ro.length)}},[]);var co=function(xr){var yi,xi=xr.target,ei=(yi=_r.current)===null||yi===void 0?void 0:yi.getPopupElement();if(ei&&ei.contains(xi)){var li=setTimeout(function(){var Ni=ro.indexOf(li);if(Ni!==-1&&ro.splice(Ni,1),Ar(),!vr&&!ei.contains(document.activeElement)){var Oi;(Oi=Yr.current)===null||Oi===void 0||Oi.focus()}});ro.push(li)}for(var Ji=arguments.length,Vi=new Array(Ji>1?Ji-1:0),lo=1;lo<Ji;lo++)Vi[lo-1]=arguments[lo];Xt==null||Xt.apply(void 0,[xr].concat(Vi))},Gi=he.useState({}),ba=(0,xe.Z)(Gi,2),xa=ba[1];function Va(){xa({})}var wa;Qr&&(wa=function(xr){$n(xr)}),Xe(function(){var Dr;return[Nr.current,(Dr=_r.current)===null||Dr===void 0?void 0:Dr.getPopupElement()]},Ki,$n,!!Qr);var Ua=he.useMemo(function(){return(0,Ve.Z)((0,Ve.Z)({},Pe),{},{notFoundContent:an,open:Xr,triggerOpen:Ki,id:Ee,showSearch:ln,multiple:tn,toggleOpen:$n})},[Pe,an,Ki,Xr,Ee,ln,tn,$n]),Ko=!!_n||er,Yo;Ko&&(Yo=he.createElement(De,{className:be()("".concat(me,"-arrow"),(0,Oe.Z)({},"".concat(me,"-arrow-loading"),er)),customizeIcon:_n,customizeIconProps:{loading:er,searchValue:vi,open:Xr,focused:ui,showSearch:ln}}));var wo=function(){var xr;dn==null||dn(),(xr=Yr.current)===null||xr===void 0||xr.focus(),pe([],{type:"clear",values:st}),zr("",!1,!1)},Xo=Ke(me,wo,st,Kt,gr,hn,vi,Cn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Fo=he.createElement(qn,{ref:Mr}),Sa=be()(me,ye,(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},"".concat(me,"-focused"),ui),"".concat(me,"-multiple"),tn),"".concat(me,"-single"),!tn),"".concat(me,"-allow-clear"),Kt),"".concat(me,"-show-arrow"),Ko),"".concat(me,"-disabled"),hn),"".concat(me,"-loading"),er),"".concat(me,"-open"),Xr),"".concat(me,"-customize-input"),Ui),"".concat(me,"-show-search"),ln)),Po=he.createElement(re,{ref:_r,disabled:hn,prefixCls:me,visible:Ki,popupElement:Fo,animation:Tn,transitionName:hr,dropdownStyle:In,dropdownClassName:Yn,direction:$t,dropdownMatchSelectWidth:Zn,dropdownRender:Lr,dropdownAlign:sr,placement:jr,builtinPlacements:Kr,getPopupContainer:Rr,empty:qt,getTriggerDOMNode:function(xr){return Gr.current||xr},onPopupVisibleChange:wa,onPopupMouseEnter:Va},Qr?he.cloneElement(Qr,{ref:Wi}):he.createElement(mt,(0,z.Z)({},Pe,{domRef:Gr,prefixCls:me,inputElement:Ui,ref:Yr,id:Ee,prefix:Pn,showSearch:ln,autoClearSearchValue:zn,mode:Cn,activeDescendantId:Jn,tagRender:Zt,values:st,open:Xr,onToggleOpen:$n,activeValue:fr,searchValue:vi,onSearch:zr,onSearchSubmit:Yi,onRemove:ao,tokenWithEnter:yr,onInputBlur:Xi}))),Di;return Qr?Di=Po:Di=he.createElement("div",(0,z.Z)({className:Sa},ir,{ref:Nr,onMouseDown:co,onKeyDown:Ti,onKeyUp:no,onFocus:Ga,onBlur:ya}),he.createElement(on,{visible:ui&&!Xr,values:st}),Po,Yo,Ca&&Jo),he.createElement(it.Provider,{value:Ua},Di)}),ft=sn,wn=function(){return null};wn.isSelectOptGroup=!0;var Ut=wn,Jt=function(){return null};Jt.isSelectOption=!0;var gn=Jt,Xn=ce(80547),yn=ce(2738),On=ce(6790);function Cr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var ar=["disabled","title","children","style","className"];function Hr(Pe){return typeof Pe=="string"||typeof Pe=="number"}var Or=function(Re,Wt){var Ee=tt(),me=Ee.prefixCls,ye=Ee.id,rt=Ee.open,Zt=Ee.multiple,$t=Ee.mode,xt=Ee.searchValue,st=Ee.toggleOpen,pe=Ee.notFoundContent,qt=Ee.onPopupScroll,Dt=he.useContext(rn),an=Dt.maxCount,dn=Dt.flattenOptions,Cn=Dt.onActiveValue,hn=Dt.defaultActiveFirstOption,er=Dt.onSelect,Dn=Dt.menuItemSelectedIcon,Ln=Dt.rawValues,Qn=Dt.fieldNames,Fn=Dt.virtual,tr=Dt.direction,fr=Dt.listHeight,nr=Dt.listItemHeight,Jn=Dt.optionRender,Wn="".concat(me,"-item"),zn=(0,Xn.Z)(function(){return dn},[rt,dn],function(ur,It){return It[0]&&ur[1]!==It[1]}),un=he.useRef(null),br=he.useMemo(function(){return Zt&&Lt(an)&&(Ln==null?void 0:Ln.size)>=an},[Zt,an,Ln==null?void 0:Ln.size]),xn=function(It){It.preventDefault()},Kt=function(It){var Qt;(Qt=un.current)===null||Qt===void 0||Qt.scrollTo(typeof It=="number"?{index:It}:It)},Pn=he.useCallback(function(ur){return $t==="combobox"?!1:Ln.has(ur)},[$t,(0,Ye.Z)(Ln).toString(),Ln.size]),_n=function(It){for(var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,An=zn.length,fn=0;fn<An;fn+=1){var Un=(It+fn*Qt+An)%An,Xt=zn[Un]||{},Nt=Xt.group,tn=Xt.data;if(!Nt&&!(tn!=null&&tn.disabled)&&(Pn(tn.value)||!br))return Un}return-1},gr=he.useState(function(){return _n(0)}),qn=(0,xe.Z)(gr,2),Tn=qn[0],hr=qn[1],In=function(It){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;hr(It);var An={source:Qt?"keyboard":"mouse"},fn=zn[It];if(!fn){Cn(null,-1,An);return}Cn(fn.value,It,An)};(0,he.useEffect)(function(){In(hn!==!1?_n(0):-1)},[zn.length,xt]);var Yn=he.useCallback(function(ur){return $t==="combobox"?String(ur).toLowerCase()===xt.toLowerCase():Ln.has(ur)},[$t,xt,(0,Ye.Z)(Ln).toString(),Ln.size]);(0,he.useEffect)(function(){var ur=setTimeout(function(){if(!Zt&&rt&&Ln.size===1){var Qt=Array.from(Ln)[0],An=zn.findIndex(function(fn){var Un=fn.data;return xt?String(Un.value).startsWith(xt):Un.value===Qt});An!==-1&&(In(An),Kt(An))}});if(rt){var It;(It=un.current)===null||It===void 0||It.scrollTo(void 0)}return function(){return clearTimeout(ur)}},[rt,xt]);var Zn=function(It){It!==void 0&&er(It,{selected:!Ln.has(It)}),Zt||st(!1)};if(he.useImperativeHandle(Wt,function(){return{onKeyDown:function(It){var Qt=It.which,An=It.ctrlKey;switch(Qt){case _e.Z.N:case _e.Z.P:case _e.Z.UP:case _e.Z.DOWN:{var fn=0;if(Qt===_e.Z.UP?fn=-1:Qt===_e.Z.DOWN?fn=1:Cr()&&An&&(Qt===_e.Z.N?fn=1:Qt===_e.Z.P&&(fn=-1)),fn!==0){var Un=_n(Tn+fn,fn);Kt(Un),In(Un,!0)}break}case _e.Z.TAB:case _e.Z.ENTER:{var Xt,Nt=zn[Tn];Nt&&!(Nt!=null&&(Xt=Nt.data)!==null&&Xt!==void 0&&Xt.disabled)&&!br?Zn(Nt.value):Zn(void 0),rt&&It.preventDefault();break}case _e.Z.ESC:st(!1),rt&&It.stopPropagation()}},onKeyUp:function(){},scrollTo:function(It){Kt(It)}}}),zn.length===0)return he.createElement("div",{role:"listbox",id:"".concat(ye,"_list"),className:"".concat(Wn,"-empty"),onMouseDown:xn},pe);var Lr=Object.keys(Qn).map(function(ur){return Qn[ur]}),sr=function(It){return It.label};function jr(ur,It){var Qt=ur.group;return{role:Qt?"presentation":"option",id:"".concat(ye,"_list_").concat(It)}}var Kr=function(It){var Qt=zn[It];if(!Qt)return null;var An=Qt.data||{},fn=An.value,Un=Qt.group,Xt=(0,Qe.Z)(An,!0),Nt=sr(Qt);return Qt?he.createElement("div",(0,z.Z)({"aria-label":typeof Nt=="string"&&!Un?Nt:null},Xt,{key:It},jr(Qt,It),{"aria-selected":Yn(fn)}),fn):null},Rr={role:"listbox",id:"".concat(ye,"_list")};return he.createElement(he.Fragment,null,Fn&&he.createElement("div",(0,z.Z)({},Rr,{style:{height:0,width:0,overflow:"hidden"}}),Kr(Tn-1),Kr(Tn),Kr(Tn+1)),he.createElement(On.Z,{itemKey:"key",ref:un,data:zn,height:fr,itemHeight:nr,fullHeight:!1,onMouseDown:xn,onScroll:qt,virtual:Fn,direction:tr,innerProps:Fn?null:Rr},function(ur,It){var Qt=ur.group,An=ur.groupOption,fn=ur.data,Un=ur.label,Xt=ur.value,Nt=fn.key;if(Qt){var tn,ln=(tn=fn.title)!==null&&tn!==void 0?tn:Hr(Un)?Un.toString():void 0;return he.createElement("div",{className:be()(Wn,"".concat(Wn,"-group"),fn.className),title:ln},Un!==void 0?Un:Nt)}var ir=fn.disabled,cr=fn.title,Fr=fn.children,vr=fn.style,Er=fn.className,Nr=(0,we.Z)(fn,ar),Gr=(0,yn.Z)(Nr,Lr),_r=Pn(Xt),Yr=ir||!_r&&br,Mr="".concat(Wn,"-option"),oi=be()(Wn,Mr,Er,(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},"".concat(Mr,"-grouped"),An),"".concat(Mr,"-active"),Tn===It&&!Yr),"".concat(Mr,"-disabled"),Yr),"".concat(Mr,"-selected"),_r)),Vr=sr(ur),Hi=!Dn||typeof Dn=="function"||_r,ui=typeof Vr=="number"?Vr:Vr||Xt,ni=Hr(ui)?ui.toString():void 0;return cr!==void 0&&(ni=cr),he.createElement("div",(0,z.Z)({},(0,Qe.Z)(Gr),Fn?{}:jr(ur,It),{"aria-selected":Yn(Xt),className:oi,title:ni,onMouseMove:function(){Tn===It||Yr||In(It)},onClick:function(){Yr||Zn(Xt)},style:vr}),he.createElement("div",{className:"".concat(Mr,"-content")},typeof Jn=="function"?Jn(ur,{index:It}):ui),he.isValidElement(Dn)||_r,Hi&&he.createElement(De,{className:"".concat(Wn,"-option-state"),customizeIcon:Dn,customizeIconProps:{value:Xt,disabled:Yr,isSelected:_r}},_r?"\u2713":null))}))},kr=he.forwardRef(Or),mr=kr,bn=function(Pe,Re){var Wt=he.useRef({values:new Map,options:new Map}),Ee=he.useMemo(function(){var ye=Wt.current,rt=ye.values,Zt=ye.options,$t=Pe.map(function(pe){if(pe.label===void 0){var qt;return(0,Ve.Z)((0,Ve.Z)({},pe),{},{label:(qt=rt.get(pe.value))===null||qt===void 0?void 0:qt.label})}return pe}),xt=new Map,st=new Map;return $t.forEach(function(pe){xt.set(pe.value,pe),st.set(pe.value,Re.get(pe.value)||Zt.get(pe.value))}),Wt.current.values=xt,Wt.current.options=st,$t},[Pe,Re]),me=he.useCallback(function(ye){return Re.get(ye)||Wt.current.options.get(ye)},[Re]);return[Ee,me]};function lr(Pe,Re){return dt(Pe).join("").toUpperCase().includes(Re)}var pr=function(Pe,Re,Wt,Ee,me){return he.useMemo(function(){if(!Wt||Ee===!1)return Pe;var ye=Re.options,rt=Re.label,Zt=Re.value,$t=[],xt=typeof Ee=="function",st=Wt.toUpperCase(),pe=xt?Ee:function(Dt,an){return me?lr(an[me],st):an[ye]?lr(an[rt!=="children"?rt:"label"],st):lr(an[Zt],st)},qt=xt?function(Dt){return St(Dt)}:function(Dt){return Dt};return Pe.forEach(function(Dt){if(Dt[ye]){var an=pe(Wt,qt(Dt));if(an)$t.push(Dt);else{var dn=Dt[ye].filter(function(Cn){return pe(Wt,qt(Cn))});dn.length&&$t.push((0,Ve.Z)((0,Ve.Z)({},Dt),{},(0,Oe.Z)({},ye,dn)))}return}pe(Wt,qt(Dt))&&$t.push(Dt)}),$t},[Pe,Ee,me,Wt,Re])},Gn=ce(6551),wr=ce(11592),Ft=["children","value"],zt=["children"];function gt(Pe){var Re=Pe,Wt=Re.key,Ee=Re.props,me=Ee.children,ye=Ee.value,rt=(0,we.Z)(Ee,Ft);return(0,Ve.Z)({key:Wt,value:ye!==void 0?ye:Wt,children:me},rt)}function Ct(Pe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,wr.Z)(Pe).map(function(Wt,Ee){if(!he.isValidElement(Wt)||!Wt.type)return null;var me=Wt,ye=me.type.isSelectOptGroup,rt=me.key,Zt=me.props,$t=Zt.children,xt=(0,we.Z)(Zt,zt);return Re||!ye?gt(Wt):(0,Ve.Z)((0,Ve.Z)({key:"__RC_SELECT_GRP__".concat(rt===null?Ee:rt,"__"),label:rt},xt),{},{options:Ct($t)})}).filter(function(Wt){return Wt})}var en=function(Re,Wt,Ee,me,ye){return he.useMemo(function(){var rt=Re,Zt=!Re;Zt&&(rt=Ct(Wt));var $t=new Map,xt=new Map,st=function(Dt,an,dn){dn&&typeof dn=="string"&&Dt.set(an[dn],an)},pe=function qt(Dt){for(var an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dn=0;dn<Dt.length;dn+=1){var Cn=Dt[dn];!Cn[Ee.options]||an?($t.set(Cn[Ee.value],Cn),st(xt,Cn,Ee.label),st(xt,Cn,me),st(xt,Cn,ye)):qt(Cn[Ee.options],!0)}};return pe(rt),{options:rt,valueOptions:$t,labelOptions:xt}},[Re,Wt,Ee,me,ye])},pn=en;function cn(Pe){var Re=he.useRef();Re.current=Pe;var Wt=he.useCallback(function(){return Re.current.apply(Re,arguments)},[]);return Wt}function Nn(Pe){var Re=Pe.mode,Wt=Pe.options,Ee=Pe.children,me=Pe.backfill,ye=Pe.allowClear,rt=Pe.placeholder,Zt=Pe.getInputElement,$t=Pe.showSearch,xt=Pe.onSearch,st=Pe.defaultOpen,pe=Pe.autoFocus,qt=Pe.labelInValue,Dt=Pe.value,an=Pe.inputValue,dn=Pe.optionLabelProp,Cn=isMultiple(Re),hn=$t!==void 0?$t:Cn||Re==="combobox",er=Wt||convertChildrenToData(Ee);if(warning(Re!=="tags"||er.every(function(Fn){return!Fn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Re==="tags"||Re==="combobox"){var Dn=er.some(function(Fn){return Fn.options?Fn.options.some(function(tr){return typeof("value"in tr?tr.value:tr.key)=="number"}):typeof("value"in Fn?Fn.value:Fn.key)=="number"});warning(!Dn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Re!=="combobox"||!dn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Re==="combobox"||!me,"`backfill` only works with `combobox` mode."),warning(Re==="combobox"||!Zt,"`getInputElement` only work with `combobox` mode."),noteOnce(Re!=="combobox"||!Zt||!ye||!rt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xt&&!hn&&Re!=="combobox"&&Re!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!st||pe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Dt!=null){var Ln=toArray(Dt);warning(!qt||Ln.every(function(Fn){return _typeof(Fn)==="object"&&("key"in Fn||"value"in Fn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Cn||Array.isArray(Dt),"`value` should be array when `mode` is `multiple` or `tags`")}if(Ee){var Qn=null;toNodeArray(Ee).some(function(Fn){if(!React.isValidElement(Fn)||!Fn.type)return!1;var tr=Fn,fr=tr.type;if(fr.isSelectOption)return!1;if(fr.isSelectOptGroup){var nr=toNodeArray(Fn.props.children).every(function(Jn){return!React.isValidElement(Jn)||!Fn.type||Jn.type.isSelectOption?!0:(Qn=Jn.type,!1)});return!nr}return Qn=fr,!0}),Qn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Qn.displayName||Qn.name||Qn,"`.")),warning(an===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Vn(Pe,Re){if(Pe){var Wt=function Ee(me){for(var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rt=0;rt<me.length;rt++){var Zt=me[rt];if(Zt[Re==null?void 0:Re.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!ye&&Array.isArray(Zt[Re==null?void 0:Re.options])&&Ee(Zt[Re==null?void 0:Re.options],!0))break}};Wt(Pe)}}var Hn=null,Bn=["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"],Rn=["inputValue"];function Mt(Pe){return!Pe||(0,He.Z)(Pe)!=="object"}var lt=he.forwardRef(function(Pe,Re){var Wt=Pe.id,Ee=Pe.mode,me=Pe.prefixCls,ye=me===void 0?"rc-select":me,rt=Pe.backfill,Zt=Pe.fieldNames,$t=Pe.inputValue,xt=Pe.searchValue,st=Pe.onSearch,pe=Pe.autoClearSearchValue,qt=pe===void 0?!0:pe,Dt=Pe.onSelect,an=Pe.onDeselect,dn=Pe.dropdownMatchSelectWidth,Cn=dn===void 0?!0:dn,hn=Pe.filterOption,er=Pe.filterSort,Dn=Pe.optionFilterProp,Ln=Pe.optionLabelProp,Qn=Pe.options,Fn=Pe.optionRender,tr=Pe.children,fr=Pe.defaultActiveFirstOption,nr=Pe.menuItemSelectedIcon,Jn=Pe.virtual,Wn=Pe.direction,zn=Pe.listHeight,un=zn===void 0?200:zn,br=Pe.listItemHeight,xn=br===void 0?20:br,Kt=Pe.labelRender,Pn=Pe.value,_n=Pe.defaultValue,gr=Pe.labelInValue,qn=Pe.onChange,Tn=Pe.maxCount,hr=(0,we.Z)(Pe,Bn),In=(0,Gn.ZP)(Wt),Yn=Yt(Ee),Zn=!!(!Qn&&tr),Lr=he.useMemo(function(){return hn===void 0&&Ee==="combobox"?!1:hn},[hn,Ee]),sr=he.useMemo(function(){return vt(Zt,Zn)},[JSON.stringify(Zt),Zn]),jr=(0,We.Z)("",{value:xt!==void 0?xt:$t,postState:function(yr){return yr||""}}),Kr=(0,xe.Z)(jr,2),Rr=Kr[0],ur=Kr[1],It=pn(Qn,tr,sr,Dn,Ln),Qt=It.valueOptions,An=It.labelOptions,fn=It.options,Un=he.useCallback(function($n){var yr=dt($n);return yr.map(function(or){var dr,Pr,zr,Yi,Ei;if(Mt(or))dr=or;else{var gi;zr=or.key,Pr=or.label,dr=(gi=or.value)!==null&&gi!==void 0?gi:zr}var $r=Qt.get(dr);if($r){var ji;if(Pr===void 0&&(Pr=$r==null?void 0:$r[Ln||sr.label]),zr===void 0&&(zr=(ji=$r==null?void 0:$r.key)!==null&&ji!==void 0?ji:dr),Yi=$r==null?void 0:$r.disabled,Ei=$r==null?void 0:$r.title,0)var to}return{label:Pr,value:dr,key:zr,disabled:Yi,title:Ei}})},[sr,Ln,Qt]),Xt=(0,We.Z)(_n,{value:Pn}),Nt=(0,xe.Z)(Xt,2),tn=Nt[0],ln=Nt[1],ir=he.useMemo(function(){var $n,yr=Yn&&tn===null?[]:tn,or=Un(yr);return Ee==="combobox"&&de(($n=or[0])===null||$n===void 0?void 0:$n.value)?[]:or},[tn,Un,Ee,Yn]),cr=bn(ir,Qt),Fr=(0,xe.Z)(cr,2),vr=Fr[0],Er=Fr[1],Nr=he.useMemo(function(){if(!Ee&&vr.length===1){var $n=vr[0];if($n.value===null&&($n.label===null||$n.label===void 0))return[]}return vr.map(function(yr){var or;return(0,Ve.Z)((0,Ve.Z)({},yr),{},{label:(or=typeof Kt=="function"?Kt(yr):yr.label)!==null&&or!==void 0?or:yr.value})})},[Ee,vr,Kt]),Gr=he.useMemo(function(){return new Set(vr.map(function($n){return $n.value}))},[vr]);he.useEffect(function(){if(Ee==="combobox"){var $n,yr=($n=vr[0])===null||$n===void 0?void 0:$n.value;ur(ve(yr)?String(yr):"")}},[vr]);var _r=cn(function($n,yr){var or=yr!=null?yr:$n;return(0,Oe.Z)((0,Oe.Z)({},sr.value,$n),sr.label,or)}),Yr=he.useMemo(function(){if(Ee!=="tags")return fn;var $n=(0,Ye.Z)(fn),yr=function(dr){return Qt.has(dr)};return(0,Ye.Z)(vr).sort(function(or,dr){return or.value<dr.value?-1:1}).forEach(function(or){var dr=or.value;yr(dr)||$n.push(_r(dr,or.label))}),$n},[_r,fn,Qt,vr,Ee]),Mr=pr(Yr,sr,Rr,Lr,Dn),oi=he.useMemo(function(){return Ee!=="tags"||!Rr||Mr.some(function($n){return $n[Dn||"value"]===Rr})||Mr.some(function($n){return $n[sr.value]===Rr})?Mr:[_r(Rr)].concat((0,Ye.Z)(Mr))},[_r,Dn,Ee,Mr,Rr,sr]),Vr=function $n(yr){var or=(0,Ye.Z)(yr).sort(function(dr,Pr){return er(dr,Pr,{searchValue:Rr})});return or.map(function(dr){return Array.isArray(dr.options)?(0,Ve.Z)((0,Ve.Z)({},dr),{},{options:dr.options.length>0?$n(dr.options):dr.options}):dr})},Hi=he.useMemo(function(){return er?Vr(oi):oi},[oi,er,Rr]),ui=he.useMemo(function(){return bt(Hi,{fieldNames:sr,childrenAsData:Zn})},[Hi,sr,Zn]),ni=function(yr){var or=Un(yr);if(ln(or),qn&&(or.length!==vr.length||or.some(function(zr,Yi){var Ei;return((Ei=vr[Yi])===null||Ei===void 0?void 0:Ei.value)!==(zr==null?void 0:zr.value)}))){var dr=gr?or:or.map(function(zr){return zr.value}),Pr=or.map(function(zr){return St(Er(zr.value))});qn(Yn?dr:dr[0],Yn?Pr:Pr[0])}},Ar=he.useState(null),vi=(0,xe.Z)(Ar,2),Ui=vi[0],Qr=vi[1],Wi=he.useState(0),Si=(0,xe.Z)(Wi,2),ci=Si[0],oo=Si[1],Bi=fr!==void 0?fr:Ee!=="combobox",Wr=he.useCallback(function($n,yr){var or=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},dr=or.source,Pr=dr===void 0?"keyboard":dr;oo(yr),rt&&Ee==="combobox"&&$n!==null&&Pr==="keyboard"&&Qr(String($n))},[rt,Ee]),Br=function(yr,or,dr){var Pr=function(){var ao,Xi=Er(yr);return[gr?{label:Xi==null?void 0:Xi[sr.label],value:yr,key:(ao=Xi==null?void 0:Xi.key)!==null&&ao!==void 0?ao:yr}:yr,St(Xi)]};if(or&&Dt){var zr=Pr(),Yi=(0,xe.Z)(zr,2),Ei=Yi[0],gi=Yi[1];Dt(Ei,gi)}else if(!or&&an&&dr!=="clear"){var $r=Pr(),ji=(0,xe.Z)($r,2),to=ji[0],Ti=ji[1];an(to,Ti)}},ai=cn(function($n,yr){var or,dr=Yn?yr.selected:!0;dr?or=Yn?[].concat((0,Ye.Z)(vr),[$n]):[$n]:or=vr.filter(function(Pr){return Pr.value!==$n}),ni(or),Br($n,dr),Ee==="combobox"?Qr(""):(!Yt||qt)&&(ur(""),Qr(""))}),mi=function(yr,or){ni(yr);var dr=or.type,Pr=or.values;(dr==="remove"||dr==="clear")&&Pr.forEach(function(zr){Br(zr.value,!1,dr)})},Xr=function(yr,or){if(ur(yr),Qr(null),or.source==="submit"){var dr=(yr||"").trim();if(dr){var Pr=Array.from(new Set([].concat((0,Ye.Z)(Gr),[dr])));ni(Pr),Br(dr,!0),ur("")}return}or.source!=="blur"&&(Ee==="combobox"&&ni(yr),st==null||st(yr))},eo=function(yr){var or=yr;Ee!=="tags"&&(or=yr.map(function(Pr){var zr=An.get(Pr);return zr==null?void 0:zr.value}).filter(function(Pr){return Pr!==void 0}));var dr=Array.from(new Set([].concat((0,Ye.Z)(Gr),(0,Ye.Z)(or))));ni(dr),dr.forEach(function(Pr){Br(Pr,!0)})},Ki=he.useMemo(function(){var $n=Jn!==!1&&Cn!==!1;return(0,Ve.Z)((0,Ve.Z)({},It),{},{flattenOptions:ui,onActiveValue:Wr,defaultActiveFirstOption:Bi,onSelect:ai,menuItemSelectedIcon:nr,rawValues:Gr,fieldNames:sr,virtual:$n,direction:Wn,listHeight:un,listItemHeight:xn,childrenAsData:Zn,maxCount:Tn,optionRender:Fn})},[Tn,It,ui,Wr,Bi,ai,nr,Gr,sr,Jn,Cn,Wn,un,xn,Zn,Fn]);return he.createElement(rn.Provider,{value:Ki},he.createElement(ft,(0,z.Z)({},hr,{id:In,prefixCls:ye,ref:Re,omitDomProps:Rn,mode:Ee,displayValues:Nr,onDisplayValuesChange:mi,direction:Wn,searchValue:Rr,onSearch:Xr,autoClearSearchValue:qt,onSearchSplit:eo,dropdownMatchSelectWidth:Cn,OptionList:mr,emptyOptions:!ui.length,activeValue:Ui,activeDescendantId:"".concat(In,"_list_").concat(ci)})))}),Vt=lt;Vt.Option=gn,Vt.OptGroup=Ut;var En=Vt,jn=En},63158:function(_t,Pt,ce){"use strict";var z=ce(32855),Ye=ce(74430),Oe=ce(11913),Ve=ce(43079),xe=ce(59301),we=ce(92310),He=ce.n(we),We=ce(18929),Be=ce(10228),he=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],$e=xe.forwardRef(function(be,Ue){var Le,ge=be.prefixCls,Ce=ge===void 0?"rc-switch":ge,De=be.className,Ke=be.checked,it=be.defaultChecked,tt=be.disabled,ze=be.loadingIcon,Ze=be.checkedChildren,Xe=be.unCheckedChildren,_e=be.onClick,Ot=be.onChange,Qe=be.onKeyDown,je=(0,Ve.Z)(be,he),ct=(0,We.Z)(!1,{value:Ke,defaultValue:it}),Me=(0,Oe.Z)(ct,2),Ge=Me[0],ke=Me[1];function Te(wt,ve){var de=Ge;return tt||(de=wt,ke(de),Ot==null||Ot(de,ve)),de}function ht(wt){wt.which===Be.Z.LEFT?Te(!1,wt):wt.which===Be.Z.RIGHT&&Te(!0,wt),Qe==null||Qe(wt)}function dt(wt){var ve=Te(!Ge,wt);_e==null||_e(ve,wt)}var Rt=He()(Ce,De,(Le={},(0,Ye.Z)(Le,"".concat(Ce,"-checked"),Ge),(0,Ye.Z)(Le,"".concat(Ce,"-disabled"),tt),Le));return xe.createElement("button",(0,z.Z)({},je,{type:"button",role:"switch","aria-checked":Ge,disabled:tt,className:Rt,ref:Ue,onKeyDown:ht,onClick:dt}),ze,xe.createElement("span",{className:"".concat(Ce,"-inner")},xe.createElement("span",{className:"".concat(Ce,"-inner-checked")},Ze),xe.createElement("span",{className:"".concat(Ce,"-inner-unchecked")},Xe)))});$e.displayName="Switch",Pt.Z=$e},22711:function(_t,Pt,ce){"use strict";ce.r(Pt),ce.d(Pt,{ResizableTextArea:function(){return Me},default:function(){return ht}});var z=ce(32855),Ye=ce(74430),Oe=ce(27247),Ve=ce(3300),xe=ce(11913),we=ce(43079),He=ce(92310),We=ce.n(He),Be=ce(36901),he=ce(66003),$e=ce(30292),be=ce(18929),Ue=ce(59301),Le=ce(34666),ge=ce(29301),Ce=ce(34280),De=ce(16089),Ke=`
|
|
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;
|
|
`,it=["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"],tt={},ze;function Ze(dt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wt=dt.getAttribute("id")||dt.getAttribute("data-reactid")||dt.getAttribute("name");if(Rt&&tt[wt])return tt[wt];var ve=window.getComputedStyle(dt),de=ve.getPropertyValue("box-sizing")||ve.getPropertyValue("-moz-box-sizing")||ve.getPropertyValue("-webkit-box-sizing"),qe=parseFloat(ve.getPropertyValue("padding-bottom"))+parseFloat(ve.getPropertyValue("padding-top")),kt=parseFloat(ve.getPropertyValue("border-bottom-width"))+parseFloat(ve.getPropertyValue("border-top-width")),yt=it.map(function(at){return"".concat(at,":").concat(ve.getPropertyValue(at))}).join(";"),Ne={sizingStyle:yt,paddingSize:qe,borderSize:kt,boxSizing:de};return Rt&&wt&&(tt[wt]=Ne),Ne}function Xe(dt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ze||(ze=document.createElement("textarea"),ze.setAttribute("tab-index","-1"),ze.setAttribute("aria-hidden","true"),ze.setAttribute("name","hiddenTextarea"),document.body.appendChild(ze)),dt.getAttribute("wrap")?ze.setAttribute("wrap",dt.getAttribute("wrap")):ze.removeAttribute("wrap");var de=Ze(dt,Rt),qe=de.paddingSize,kt=de.borderSize,yt=de.boxSizing,Ne=de.sizingStyle;ze.setAttribute("style","".concat(Ne,";").concat(Ke)),ze.value=dt.value||dt.placeholder||"";var at=void 0,nt=void 0,Tt,ut=ze.scrollHeight;if(yt==="border-box"?ut+=kt:yt==="content-box"&&(ut-=qe),wt!==null||ve!==null){ze.value=" ";var At=ze.scrollHeight-qe;wt!==null&&(at=At*wt,yt==="border-box"&&(at=at+qe+kt),ut=Math.max(at,ut)),ve!==null&&(nt=At*ve,yt==="border-box"&&(nt=nt+qe+kt),Tt=ut>nt?"":"hidden",ut=Math.min(nt,ut))}var Ie={height:ut,overflowY:Tt,resize:"none"};return at&&(Ie.minHeight=at),nt&&(Ie.maxHeight=nt),Ie}var _e=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ot=0,Qe=1,je=2,ct=Ue.forwardRef(function(dt,Rt){var wt=dt,ve=wt.prefixCls,de=wt.defaultValue,qe=wt.value,kt=wt.autoSize,yt=wt.onResize,Ne=wt.className,at=wt.style,nt=wt.disabled,Tt=wt.onChange,ut=wt.onInternalAutoSize,At=(0,we.Z)(wt,_e),Ie=(0,be.Z)(de,{value:qe,postState:function(gn){return gn!=null?gn:""}}),pt=(0,xe.Z)(Ie,2),mt=pt[0],ae=pt[1],ne=function(gn){ae(gn.target.value),Tt==null||Tt(gn)},ee=Ue.useRef();Ue.useImperativeHandle(Rt,function(){return{textArea:ee.current}});var oe=Ue.useMemo(function(){return kt&&(0,Le.Z)(kt)==="object"?[kt.minRows,kt.maxRows]:[]},[kt]),se=(0,xe.Z)(oe,2),re=se[0],Se=se[1],et=!!kt,Lt=function(){try{if(document.activeElement===ee.current){var gn=ee.current,Xn=gn.selectionStart,yn=gn.selectionEnd,On=gn.scrollTop;ee.current.setSelectionRange(Xn,yn),ee.current.scrollTop=On}}catch(Cr){}},vt=Ue.useState(je),bt=(0,xe.Z)(vt,2),St=bt[0],Gt=bt[1],jt=Ue.useState(),rn=(0,xe.Z)(jt,2),on=rn[0],Bt=rn[1],Sn=function(){Gt(Ot)};(0,Ce.Z)(function(){et&&Sn()},[qe,re,Se,et]),(0,Ce.Z)(function(){if(St===Ot)Gt(Qe);else if(St===Qe){var Jt=Xe(ee.current,!1,re,Se);Gt(je),Bt(Jt)}else Lt()},[St]);var Yt=Ue.useRef(),sn=function(){De.Z.cancel(Yt.current)},ft=function(gn){St===je&&(yt==null||yt(gn),kt&&(sn(),Yt.current=(0,De.Z)(function(){Sn()})))};Ue.useEffect(function(){return sn},[]);var wn=et?on:null,Ut=(0,Oe.Z)((0,Oe.Z)({},at),wn);return(St===Ot||St===Qe)&&(Ut.overflowY="hidden",Ut.overflowX="hidden"),Ue.createElement(ge.Z,{onResize:ft,disabled:!(kt||yt)},Ue.createElement("textarea",(0,z.Z)({},At,{ref:ee,style:Ut,className:We()(ve,Ne,(0,Ye.Z)({},"".concat(ve,"-disabled"),nt)),disabled:nt,value:mt,onChange:ne})))}),Me=ct,Ge=["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"],ke=Ue.forwardRef(function(dt,Rt){var wt,ve=dt.defaultValue,de=dt.value,qe=dt.onFocus,kt=dt.onBlur,yt=dt.onChange,Ne=dt.allowClear,at=dt.maxLength,nt=dt.onCompositionStart,Tt=dt.onCompositionEnd,ut=dt.suffix,At=dt.prefixCls,Ie=At===void 0?"rc-textarea":At,pt=dt.showCount,mt=dt.count,ae=dt.className,ne=dt.style,ee=dt.disabled,oe=dt.hidden,se=dt.classNames,re=dt.styles,Se=dt.onResize,et=dt.onClear,Lt=dt.onPressEnter,vt=dt.readOnly,bt=dt.autoSize,St=dt.onKeyDown,Gt=(0,we.Z)(dt,Ge),jt=(0,be.Z)(ve,{value:de,defaultValue:ve}),rn=(0,xe.Z)(jt,2),on=rn[0],Bt=rn[1],Sn=on==null?"":String(on),Yt=Ue.useState(!1),sn=(0,xe.Z)(Yt,2),ft=sn[0],wn=sn[1],Ut=Ue.useRef(!1),Jt=Ue.useState(null),gn=(0,xe.Z)(Jt,2),Xn=gn[0],yn=gn[1],On=(0,Ue.useRef)(null),Cr=(0,Ue.useRef)(null),ar=function(){var Vt;return(Vt=Cr.current)===null||Vt===void 0?void 0:Vt.textArea},Hr=function(){ar().focus()};(0,Ue.useImperativeHandle)(Rt,function(){var lt;return{resizableTextArea:Cr.current,focus:Hr,blur:function(){ar().blur()},nativeElement:((lt=On.current)===null||lt===void 0?void 0:lt.nativeElement)||ar()}}),(0,Ue.useEffect)(function(){wn(function(lt){return!ee&<})},[ee]);var Or=Ue.useState(null),kr=(0,xe.Z)(Or,2),mr=kr[0],bn=kr[1];Ue.useEffect(function(){if(mr){var lt;(lt=ar()).setSelectionRange.apply(lt,(0,Ve.Z)(mr))}},[mr]);var lr=(0,he.Z)(mt,pt),pr=(wt=lr.max)!==null&&wt!==void 0?wt:at,Gn=Number(pr)>0,wr=lr.strategy(Sn),Ft=!!pr&&wr>pr,zt=function(Vt,En){var jn=En;!Ut.current&&lr.exceedFormatter&&lr.max&&lr.strategy(En)>lr.max&&(jn=lr.exceedFormatter(En,{max:lr.max}),En!==jn&&bn([ar().selectionStart||0,ar().selectionEnd||0])),Bt(jn),(0,$e.rJ)(Vt.currentTarget,Vt,yt,jn)},gt=function(Vt){Ut.current=!0,nt==null||nt(Vt)},Ct=function(Vt){Ut.current=!1,zt(Vt,Vt.currentTarget.value),Tt==null||Tt(Vt)},en=function(Vt){zt(Vt,Vt.target.value)},pn=function(Vt){Vt.key==="Enter"&&Lt&&Lt(Vt),St==null||St(Vt)},cn=function(Vt){wn(!0),qe==null||qe(Vt)},Nn=function(Vt){wn(!1),kt==null||kt(Vt)},Vn=function(Vt){Bt(""),Hr(),(0,$e.rJ)(ar(),Vt,yt)},Hn=ut,Bn;lr.show&&(lr.showFormatter?Bn=lr.showFormatter({value:Sn,count:wr,maxLength:pr}):Bn="".concat(wr).concat(Gn?" / ".concat(pr):""),Hn=Ue.createElement(Ue.Fragment,null,Hn,Ue.createElement("span",{className:We()("".concat(Ie,"-data-count"),se==null?void 0:se.count),style:re==null?void 0:re.count},Bn)));var Rn=function(Vt){var En;Se==null||Se(Vt),(En=ar())!==null&&En!==void 0&&En.style.height&&yn(!0)},Mt=!bt&&!pt&&!Ne;return Ue.createElement(Be.BaseInput,{ref:On,value:Sn,allowClear:Ne,handleReset:Vn,suffix:Hn,prefixCls:Ie,classNames:(0,Oe.Z)((0,Oe.Z)({},se),{},{affixWrapper:We()(se==null?void 0:se.affixWrapper,(0,Ye.Z)((0,Ye.Z)({},"".concat(Ie,"-show-count"),pt),"".concat(Ie,"-textarea-allow-clear"),Ne))}),disabled:ee,focused:ft,className:We()(ae,Ft&&"".concat(Ie,"-out-of-range")),style:(0,Oe.Z)((0,Oe.Z)({},ne),Xn&&!Mt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Bn=="string"?Bn:void 0}},hidden:oe,readOnly:vt,onClear:et},Ue.createElement(Me,(0,z.Z)({},Gt,{autoSize:bt,maxLength:at,onKeyDown:pn,onChange:en,onFocus:cn,onBlur:Nn,onCompositionStart:gt,onCompositionEnd:Ct,className:We()(se==null?void 0:se.textarea),style:(0,Oe.Z)((0,Oe.Z)({},re==null?void 0:re.textarea),{},{resize:ne==null?void 0:ne.resize}),disabled:ee,prefixCls:Ie,onResize:Rn,ref:Cr,readOnly:vt})))}),Te=ke,ht=Te},6790:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return mt}});var z=ce(32855),Ye=ce(34666),Oe=ce(27247),Ve=ce(74430),xe=ce(11913),we=ce(43079),He=ce(92310),We=ce.n(He),Be=ce(29301),he=ce(70425),$e=ce(34280),be=ce(59301),Ue=ce(4676),Le=be.forwardRef(function(ae,ne){var ee=ae.height,oe=ae.offsetY,se=ae.offsetX,re=ae.children,Se=ae.prefixCls,et=ae.onInnerResize,Lt=ae.innerProps,vt=ae.rtl,bt=ae.extra,St={},Gt={display:"flex",flexDirection:"column"};return oe!==void 0&&(St={height:ee,position:"relative",overflow:"hidden"},Gt=(0,Oe.Z)((0,Oe.Z)({},Gt),{},(0,Ve.Z)((0,Ve.Z)((0,Ve.Z)((0,Ve.Z)((0,Ve.Z)({transform:"translateY(".concat(oe,"px)")},vt?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),be.createElement("div",{style:St},be.createElement(Be.Z,{onResize:function(rn){var on=rn.offsetHeight;on&&et&&et()}},be.createElement("div",(0,z.Z)({style:Gt,className:We()((0,Ve.Z)({},"".concat(Se,"-holder-inner"),Se)),ref:ne},Lt),re,bt)))});Le.displayName="Filler";var ge=Le;function Ce(ae){var ne=ae.children,ee=ae.setRef,oe=be.useCallback(function(se){ee(se)},[]);return be.cloneElement(ne,{ref:oe})}function De(ae,ne,ee,oe,se,re,Se,et){var Lt=et.getKey;return ae.slice(ne,ee+1).map(function(vt,bt){var St=ne+bt,Gt=Se(vt,St,{style:{width:oe},offsetX:se}),jt=Lt(vt);return be.createElement(Ce,{key:jt,setRef:function(on){return re(vt,on)}},Gt)})}function Ke(ae,ne,ee,oe){var se=ee-ae,re=ne-ee,Se=Math.min(se,re)*2;if(oe<=Se){var et=Math.floor(oe/2);return oe%2?ee+et+1:ee-et}return se>re?ee-(oe-re):ee+(oe-se)}function it(ae,ne,ee){var oe=ae.length,se=ne.length,re,Se;if(oe===0&&se===0)return null;oe<se?(re=ae,Se=ne):(re=ne,Se=ae);var et={__EMPTY_ITEM__:!0};function Lt(rn){return rn!==void 0?ee(rn):et}for(var vt=null,bt=Math.abs(oe-se)!==1,St=0;St<Se.length;St+=1){var Gt=Lt(re[St]),jt=Lt(Se[St]);if(Gt!==jt){vt=St,bt=bt||Gt!==Lt(Se[St+1]);break}}return vt===null?null:{index:vt,multiple:bt}}function tt(ae,ne,ee){var oe=be.useState(ae),se=(0,xe.Z)(oe,2),re=se[0],Se=se[1],et=be.useState(null),Lt=(0,xe.Z)(et,2),vt=Lt[0],bt=Lt[1];return be.useEffect(function(){var St=it(re||[],ae||[],ne);(St==null?void 0:St.index)!==void 0&&(ee==null||ee(St.index),bt(ae[St.index])),Se(ae)},[ae]),[vt]}var ze=ce(16089),Ze=(typeof navigator=="undefined"?"undefined":(0,Ye.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Xe=Ze,_e=function(ae,ne,ee,oe){var se=(0,be.useRef)(!1),re=(0,be.useRef)(null);function Se(){clearTimeout(re.current),se.current=!0,re.current=setTimeout(function(){se.current=!1},50)}var et=(0,be.useRef)({top:ae,bottom:ne,left:ee,right:oe});return et.current.top=ae,et.current.bottom=ne,et.current.left=ee,et.current.right=oe,function(Lt,vt){var bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,St=Lt?vt<0&&et.current.left||vt>0&&et.current.right:vt<0&&et.current.top||vt>0&&et.current.bottom;return bt&&St?(clearTimeout(re.current),se.current=!1):(!St||se.current)&&Se(),!se.current&&St}};function Ot(ae,ne,ee,oe,se,re,Se){var et=(0,be.useRef)(0),Lt=(0,be.useRef)(null),vt=(0,be.useRef)(null),bt=(0,be.useRef)(!1),St=_e(ne,ee,oe,se);function Gt(Yt,sn){if(ze.Z.cancel(Lt.current),!St(!1,sn)){var ft=Yt;if(!ft._virtualHandled)ft._virtualHandled=!0;else return;et.current+=sn,vt.current=sn,Xe||ft.preventDefault(),Lt.current=(0,ze.Z)(function(){var wn=bt.current?10:1;Se(et.current*wn,!1),et.current=0})}}function jt(Yt,sn){Se(sn,!0),Xe||Yt.preventDefault()}var rn=(0,be.useRef)(null),on=(0,be.useRef)(null);function Bt(Yt){if(ae){ze.Z.cancel(on.current),on.current=(0,ze.Z)(function(){rn.current=null},2);var sn=Yt.deltaX,ft=Yt.deltaY,wn=Yt.shiftKey,Ut=sn,Jt=ft;(rn.current==="sx"||!rn.current&&wn&&ft&&!sn)&&(Ut=ft,Jt=0,rn.current="sx");var gn=Math.abs(Ut),Xn=Math.abs(Jt);rn.current===null&&(rn.current=re&&gn>Xn?"x":"y"),rn.current==="y"?Gt(Yt,Jt):jt(Yt,Ut)}}function Sn(Yt){ae&&(bt.current=Yt.detail===vt.current)}return[Bt,Sn]}function Qe(ae,ne,ee,oe){var se=be.useMemo(function(){return[new Map,[]]},[ae,ee.id,oe]),re=(0,xe.Z)(se,2),Se=re[0],et=re[1],Lt=function(bt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bt,Gt=Se.get(bt),jt=Se.get(St);if(Gt===void 0||jt===void 0)for(var rn=ae.length,on=et.length;on<rn;on+=1){var Bt,Sn=ae[on],Yt=ne(Sn);Se.set(Yt,on);var sn=(Bt=ee.get(Yt))!==null&&Bt!==void 0?Bt:oe;if(et[on]=(et[on-1]||0)+sn,Yt===bt&&(Gt=on),Yt===St&&(jt=on),Gt!==void 0&&jt!==void 0)break}return{top:et[Gt-1]||0,bottom:et[jt]}};return Lt}var je=ce(33377),ct=ce(93912),Me=function(){function ae(){(0,je.Z)(this,ae),(0,Ve.Z)(this,"maps",void 0),(0,Ve.Z)(this,"id",0),(0,Ve.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ct.Z)(ae,[{key:"set",value:function(ee,oe){this.diffRecords.set(ee,this.maps[ee]),this.maps[ee]=oe,this.id+=1}},{key:"get",value:function(ee){return this.maps[ee]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ae}(),Ge=Me;function ke(ae){var ne=parseFloat(ae);return isNaN(ne)?0:ne}function Te(ae,ne,ee){var oe=be.useState(0),se=(0,xe.Z)(oe,2),re=se[0],Se=se[1],et=(0,be.useRef)(new Map),Lt=(0,be.useRef)(new Ge),vt=(0,be.useRef)(0);function bt(){vt.current+=1}function St(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;bt();var rn=function(){var Sn=!1;et.current.forEach(function(Yt,sn){if(Yt&&Yt.offsetParent){var ft=Yt.offsetHeight,wn=getComputedStyle(Yt),Ut=wn.marginTop,Jt=wn.marginBottom,gn=ke(Ut),Xn=ke(Jt),yn=ft+gn+Xn;Lt.current.get(sn)!==yn&&(Lt.current.set(sn,yn),Sn=!0)}}),Sn&&Se(function(Yt){return Yt+1})};if(jt)rn();else{vt.current+=1;var on=vt.current;Promise.resolve().then(function(){on===vt.current&&rn()})}}function Gt(jt,rn){var on=ae(jt),Bt=et.current.get(on);rn?(et.current.set(on,rn),St()):et.current.delete(on),!Bt!=!rn&&(rn?ne==null||ne(jt):ee==null||ee(jt))}return(0,be.useEffect)(function(){return bt},[]),[Gt,St,Lt.current,re]}var ht=14/15;function dt(ae,ne,ee){var oe=(0,be.useRef)(!1),se=(0,be.useRef)(0),re=(0,be.useRef)(0),Se=(0,be.useRef)(null),et=(0,be.useRef)(null),Lt,vt=function(jt){if(oe.current){var rn=Math.ceil(jt.touches[0].pageX),on=Math.ceil(jt.touches[0].pageY),Bt=se.current-rn,Sn=re.current-on,Yt=Math.abs(Bt)>Math.abs(Sn);Yt?se.current=rn:re.current=on;var sn=ee(Yt,Yt?Bt:Sn,!1,jt);sn&&jt.preventDefault(),clearInterval(et.current),sn&&(et.current=setInterval(function(){Yt?Bt*=ht:Sn*=ht;var ft=Math.floor(Yt?Bt:Sn);(!ee(Yt,ft,!0)||Math.abs(ft)<=.1)&&clearInterval(et.current)},16))}},bt=function(){oe.current=!1,Lt()},St=function(jt){Lt(),jt.touches.length===1&&!oe.current&&(oe.current=!0,se.current=Math.ceil(jt.touches[0].pageX),re.current=Math.ceil(jt.touches[0].pageY),Se.current=jt.target,Se.current.addEventListener("touchmove",vt,{passive:!1}),Se.current.addEventListener("touchend",bt,{passive:!0}))};Lt=function(){Se.current&&(Se.current.removeEventListener("touchmove",vt),Se.current.removeEventListener("touchend",bt))},(0,$e.Z)(function(){return ae&&ne.current.addEventListener("touchstart",St,{passive:!0}),function(){var Gt;(Gt=ne.current)===null||Gt===void 0||Gt.removeEventListener("touchstart",St),Lt(),clearInterval(et.current)}},[ae])}function Rt(ae){return Math.floor(Math.pow(ae,.5))}function wt(ae,ne){var ee="touches"in ae?ae.touches[0]:ae;return ee[ne?"pageX":"pageY"]-window[ne?"scrollX":"scrollY"]}function ve(ae,ne,ee){be.useEffect(function(){var oe=ne.current;if(ae&&oe){var se=!1,re,Se,et=function(){ze.Z.cancel(re)},Lt=function Gt(){et(),re=(0,ze.Z)(function(){ee(Se),Gt()})},vt=function(jt){if(!(jt.target.draggable||jt.button!==0)){var rn=jt;rn._virtualHandled||(rn._virtualHandled=!0,se=!0)}},bt=function(){se=!1,et()},St=function(jt){if(se){var rn=wt(jt,!1),on=oe.getBoundingClientRect(),Bt=on.top,Sn=on.bottom;if(rn<=Bt){var Yt=Bt-rn;Se=-Rt(Yt),Lt()}else if(rn>=Sn){var sn=rn-Sn;Se=Rt(sn),Lt()}else et()}};return oe.addEventListener("mousedown",vt),oe.ownerDocument.addEventListener("mouseup",bt),oe.ownerDocument.addEventListener("mousemove",St),function(){oe.removeEventListener("mousedown",vt),oe.ownerDocument.removeEventListener("mouseup",bt),oe.ownerDocument.removeEventListener("mousemove",St),et()}}},[ae])}var de=10;function qe(ae,ne,ee,oe,se,re,Se,et){var Lt=be.useRef(),vt=be.useState(null),bt=(0,xe.Z)(vt,2),St=bt[0],Gt=bt[1];return(0,$e.Z)(function(){if(St&&St.times<de){if(!ae.current){Gt(function(lr){return(0,Oe.Z)({},lr)});return}re();var jt=St.targetAlign,rn=St.originAlign,on=St.index,Bt=St.offset,Sn=ae.current.clientHeight,Yt=!1,sn=jt,ft=null;if(Sn){for(var wn=jt||rn,Ut=0,Jt=0,gn=0,Xn=Math.min(ne.length-1,on),yn=0;yn<=Xn;yn+=1){var On=se(ne[yn]);Jt=Ut;var Cr=ee.get(On);gn=Jt+(Cr===void 0?oe:Cr),Ut=gn}for(var ar=wn==="top"?Bt:Sn-Bt,Hr=Xn;Hr>=0;Hr-=1){var Or=se(ne[Hr]),kr=ee.get(Or);if(kr===void 0){Yt=!0;break}if(ar-=kr,ar<=0)break}switch(wn){case"top":ft=Jt-Bt;break;case"bottom":ft=gn-Sn+Bt;break;default:{var mr=ae.current.scrollTop,bn=mr+Sn;Jt<mr?sn="top":gn>bn&&(sn="bottom")}}ft!==null&&Se(ft),ft!==St.lastTop&&(Yt=!0)}Yt&&Gt((0,Oe.Z)((0,Oe.Z)({},St),{},{times:St.times+1,targetAlign:sn,lastTop:ft}))}},[St,ae.current]),function(jt){if(jt==null){et();return}if(ze.Z.cancel(Lt.current),typeof jt=="number")Se(jt);else if(jt&&(0,Ye.Z)(jt)==="object"){var rn,on=jt.align;"index"in jt?rn=jt.index:rn=ne.findIndex(function(Yt){return se(Yt)===jt.key});var Bt=jt.offset,Sn=Bt===void 0?0:Bt;Gt({times:0,index:rn,offset:Sn,originAlign:on})}}}var kt=be.forwardRef(function(ae,ne){var ee=ae.prefixCls,oe=ae.rtl,se=ae.scrollOffset,re=ae.scrollRange,Se=ae.onStartMove,et=ae.onStopMove,Lt=ae.onScroll,vt=ae.horizontal,bt=ae.spinSize,St=ae.containerSize,Gt=ae.style,jt=ae.thumbStyle,rn=ae.showScrollBar,on=be.useState(!1),Bt=(0,xe.Z)(on,2),Sn=Bt[0],Yt=Bt[1],sn=be.useState(null),ft=(0,xe.Z)(sn,2),wn=ft[0],Ut=ft[1],Jt=be.useState(null),gn=(0,xe.Z)(Jt,2),Xn=gn[0],yn=gn[1],On=!oe,Cr=be.useRef(),ar=be.useRef(),Hr=be.useState(rn),Or=(0,xe.Z)(Hr,2),kr=Or[0],mr=Or[1],bn=be.useRef(),lr=function(){rn===!0||rn===!1||(clearTimeout(bn.current),mr(!0),bn.current=setTimeout(function(){mr(!1)},3e3))},pr=re-St||0,Gn=St-bt||0,wr=be.useMemo(function(){if(se===0||pr===0)return 0;var Vn=se/pr;return Vn*Gn},[se,pr,Gn]),Ft=function(Hn){Hn.stopPropagation(),Hn.preventDefault()},zt=be.useRef({top:wr,dragging:Sn,pageY:wn,startTop:Xn});zt.current={top:wr,dragging:Sn,pageY:wn,startTop:Xn};var gt=function(Hn){Yt(!0),Ut(wt(Hn,vt)),yn(zt.current.top),Se(),Hn.stopPropagation(),Hn.preventDefault()};be.useEffect(function(){var Vn=function(Mt){Mt.preventDefault()},Hn=Cr.current,Bn=ar.current;return Hn.addEventListener("touchstart",Vn,{passive:!1}),Bn.addEventListener("touchstart",gt,{passive:!1}),function(){Hn.removeEventListener("touchstart",Vn),Bn.removeEventListener("touchstart",gt)}},[]);var Ct=be.useRef();Ct.current=pr;var en=be.useRef();en.current=Gn,be.useEffect(function(){if(Sn){var Vn,Hn=function(Mt){var lt=zt.current,Vt=lt.dragging,En=lt.pageY,jn=lt.startTop;ze.Z.cancel(Vn);var Pe=Cr.current.getBoundingClientRect(),Re=St/(vt?Pe.width:Pe.height);if(Vt){var Wt=(wt(Mt,vt)-En)*Re,Ee=jn;!On&&vt?Ee-=Wt:Ee+=Wt;var me=Ct.current,ye=en.current,rt=ye?Ee/ye:0,Zt=Math.ceil(rt*me);Zt=Math.max(Zt,0),Zt=Math.min(Zt,me),Vn=(0,ze.Z)(function(){Lt(Zt,vt)})}},Bn=function(){Yt(!1),et()};return window.addEventListener("mousemove",Hn,{passive:!0}),window.addEventListener("touchmove",Hn,{passive:!0}),window.addEventListener("mouseup",Bn,{passive:!0}),window.addEventListener("touchend",Bn,{passive:!0}),function(){window.removeEventListener("mousemove",Hn),window.removeEventListener("touchmove",Hn),window.removeEventListener("mouseup",Bn),window.removeEventListener("touchend",Bn),ze.Z.cancel(Vn)}}},[Sn]),be.useEffect(function(){return lr(),function(){clearTimeout(bn.current)}},[se]),be.useImperativeHandle(ne,function(){return{delayHidden:lr}});var pn="".concat(ee,"-scrollbar"),cn={position:"absolute",visibility:kr?null:"hidden"},Nn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return vt?(Object.assign(cn,{height:8,left:0,right:0,bottom:0}),Object.assign(Nn,(0,Ve.Z)({height:"100%",width:bt},On?"left":"right",wr))):(Object.assign(cn,(0,Ve.Z)({width:8,top:0,bottom:0},On?"right":"left",0)),Object.assign(Nn,{width:"100%",height:bt,top:wr})),be.createElement("div",{ref:Cr,className:We()(pn,(0,Ve.Z)((0,Ve.Z)((0,Ve.Z)({},"".concat(pn,"-horizontal"),vt),"".concat(pn,"-vertical"),!vt),"".concat(pn,"-visible"),kr)),style:(0,Oe.Z)((0,Oe.Z)({},cn),Gt),onMouseDown:Ft,onMouseMove:lr},be.createElement("div",{ref:ar,className:We()("".concat(pn,"-thumb"),(0,Ve.Z)({},"".concat(pn,"-thumb-moving"),Sn)),style:(0,Oe.Z)((0,Oe.Z)({},Nn),jt),onMouseDown:gt}))}),yt=kt,Ne=20;function at(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ee=ae/ne*ae;return isNaN(ee)&&(ee=0),ee=Math.max(ee,Ne),Math.floor(ee)}var nt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Tt=[],ut={overflowY:"auto",overflowAnchor:"none"};function At(ae,ne){var ee=ae.prefixCls,oe=ee===void 0?"rc-virtual-list":ee,se=ae.className,re=ae.height,Se=ae.itemHeight,et=ae.fullHeight,Lt=et===void 0?!0:et,vt=ae.style,bt=ae.data,St=ae.children,Gt=ae.itemKey,jt=ae.virtual,rn=ae.direction,on=ae.scrollWidth,Bt=ae.component,Sn=Bt===void 0?"div":Bt,Yt=ae.onScroll,sn=ae.onVirtualScroll,ft=ae.onVisibleChange,wn=ae.innerProps,Ut=ae.extraRender,Jt=ae.styles,gn=ae.showScrollBar,Xn=gn===void 0?"optional":gn,yn=(0,we.Z)(ae,nt),On=be.useCallback(function(It){return typeof Gt=="function"?Gt(It):It==null?void 0:It[Gt]},[Gt]),Cr=Te(On,null,null),ar=(0,xe.Z)(Cr,4),Hr=ar[0],Or=ar[1],kr=ar[2],mr=ar[3],bn=!!(jt!==!1&&re&&Se),lr=be.useMemo(function(){return Object.values(kr.maps).reduce(function(It,Qt){return It+Qt},0)},[kr.id,kr.maps]),pr=bn&&bt&&(Math.max(Se*bt.length,lr)>re||!!on),Gn=rn==="rtl",wr=We()(oe,(0,Ve.Z)({},"".concat(oe,"-rtl"),Gn),se),Ft=bt||Tt,zt=(0,be.useRef)(),gt=(0,be.useRef)(),Ct=(0,be.useRef)(),en=(0,be.useState)(0),pn=(0,xe.Z)(en,2),cn=pn[0],Nn=pn[1],Vn=(0,be.useState)(0),Hn=(0,xe.Z)(Vn,2),Bn=Hn[0],Rn=Hn[1],Mt=(0,be.useState)(!1),lt=(0,xe.Z)(Mt,2),Vt=lt[0],En=lt[1],jn=function(){En(!0)},Pe=function(){En(!1)},Re={getKey:On};function Wt(It){Nn(function(Qt){var An;typeof It=="function"?An=It(Qt):An=It;var fn=fr(An);return zt.current.scrollTop=fn,fn})}var Ee=(0,be.useRef)({start:0,end:Ft.length}),me=(0,be.useRef)(),ye=tt(Ft,On),rt=(0,xe.Z)(ye,1),Zt=rt[0];me.current=Zt;var $t=be.useMemo(function(){if(!bn)return{scrollHeight:void 0,start:0,end:Ft.length-1,offset:void 0};if(!pr){var It;return{scrollHeight:((It=gt.current)===null||It===void 0?void 0:It.offsetHeight)||0,start:0,end:Ft.length-1,offset:void 0}}for(var Qt=0,An,fn,Un,Xt=Ft.length,Nt=0;Nt<Xt;Nt+=1){var tn=Ft[Nt],ln=On(tn),ir=kr.get(ln),cr=Qt+(ir===void 0?Se:ir);cr>=cn&&An===void 0&&(An=Nt,fn=Qt),cr>cn+re&&Un===void 0&&(Un=Nt),Qt=cr}return An===void 0&&(An=0,fn=0,Un=Math.ceil(re/Se)),Un===void 0&&(Un=Ft.length-1),Un=Math.min(Un+1,Ft.length-1),{scrollHeight:Qt,start:An,end:Un,offset:fn}},[pr,bn,cn,Ft,mr,re]),xt=$t.scrollHeight,st=$t.start,pe=$t.end,qt=$t.offset;Ee.current.start=st,Ee.current.end=pe,be.useLayoutEffect(function(){var It=kr.getRecord();if(It.size===1){var Qt=Array.from(It.keys())[0],An=It.get(Qt),fn=Ft[st];if(fn&&An===void 0){var Un=On(fn);if(Un===Qt){var Xt=kr.get(Qt),Nt=Xt-Se;Wt(function(tn){return tn+Nt})}}}kr.resetRecord()},[xt]);var Dt=be.useState({width:0,height:re}),an=(0,xe.Z)(Dt,2),dn=an[0],Cn=an[1],hn=function(Qt){Cn({width:Qt.offsetWidth,height:Qt.offsetHeight})},er=(0,be.useRef)(),Dn=(0,be.useRef)(),Ln=be.useMemo(function(){return at(dn.width,on)},[dn.width,on]),Qn=be.useMemo(function(){return at(dn.height,xt)},[dn.height,xt]),Fn=xt-re,tr=(0,be.useRef)(Fn);tr.current=Fn;function fr(It){var Qt=It;return Number.isNaN(tr.current)||(Qt=Math.min(Qt,tr.current)),Qt=Math.max(Qt,0),Qt}var nr=cn<=0,Jn=cn>=Fn,Wn=Bn<=0,zn=Bn>=on,un=_e(nr,Jn,Wn,zn),br=function(){return{x:Gn?-Bn:Bn,y:cn}},xn=(0,be.useRef)(br()),Kt=(0,he.zX)(function(It){if(sn){var Qt=(0,Oe.Z)((0,Oe.Z)({},br()),It);(xn.current.x!==Qt.x||xn.current.y!==Qt.y)&&(sn(Qt),xn.current=Qt)}});function Pn(It,Qt){var An=It;Qt?((0,Ue.flushSync)(function(){Rn(An)}),Kt()):Wt(An)}function _n(It){var Qt=It.currentTarget.scrollTop;Qt!==cn&&Wt(Qt),Yt==null||Yt(It),Kt()}var gr=function(Qt){var An=Qt,fn=on?on-dn.width:0;return An=Math.max(An,0),An=Math.min(An,fn),An},qn=(0,he.zX)(function(It,Qt){Qt?((0,Ue.flushSync)(function(){Rn(function(An){var fn=An+(Gn?-It:It);return gr(fn)})}),Kt()):Wt(function(An){var fn=An+It;return fn})}),Tn=Ot(bn,nr,Jn,Wn,zn,!!on,qn),hr=(0,xe.Z)(Tn,2),In=hr[0],Yn=hr[1];dt(bn,zt,function(It,Qt,An,fn){var Un=fn;return un(It,Qt,An)?!1:!Un||!Un._virtualHandled?(Un&&(Un._virtualHandled=!0),In({preventDefault:function(){},deltaX:It?Qt:0,deltaY:It?0:Qt}),!0):!1}),ve(pr,zt,function(It){Wt(function(Qt){return Qt+It})}),(0,$e.Z)(function(){function It(An){var fn=nr&&An.detail<0,Un=Jn&&An.detail>0;bn&&!fn&&!Un&&An.preventDefault()}var Qt=zt.current;return Qt.addEventListener("wheel",In,{passive:!1}),Qt.addEventListener("DOMMouseScroll",Yn,{passive:!0}),Qt.addEventListener("MozMousePixelScroll",It,{passive:!1}),function(){Qt.removeEventListener("wheel",In),Qt.removeEventListener("DOMMouseScroll",Yn),Qt.removeEventListener("MozMousePixelScroll",It)}},[bn,nr,Jn]),(0,$e.Z)(function(){if(on){var It=gr(Bn);Rn(It),Kt({x:It})}},[dn.width,on]);var Zn=function(){var Qt,An;(Qt=er.current)===null||Qt===void 0||Qt.delayHidden(),(An=Dn.current)===null||An===void 0||An.delayHidden()},Lr=qe(zt,Ft,kr,Se,On,function(){return Or(!0)},Wt,Zn);be.useImperativeHandle(ne,function(){return{nativeElement:Ct.current,getScrollInfo:br,scrollTo:function(Qt){function An(fn){return fn&&(0,Ye.Z)(fn)==="object"&&("left"in fn||"top"in fn)}An(Qt)?(Qt.left!==void 0&&Rn(gr(Qt.left)),Lr(Qt.top)):Lr(Qt)}}}),(0,$e.Z)(function(){if(ft){var It=Ft.slice(st,pe+1);ft(It,Ft)}},[st,pe,Ft]);var sr=Qe(Ft,On,kr,Se),jr=Ut==null?void 0:Ut({start:st,end:pe,virtual:pr,offsetX:Bn,offsetY:qt,rtl:Gn,getSize:sr}),Kr=De(Ft,st,pe,on,Bn,Hr,St,Re),Rr=null;re&&(Rr=(0,Oe.Z)((0,Ve.Z)({},Lt?"height":"maxHeight",re),ut),bn&&(Rr.overflowY="hidden",on&&(Rr.overflowX="hidden"),Vt&&(Rr.pointerEvents="none")));var ur={};return Gn&&(ur.dir="rtl"),be.createElement("div",(0,z.Z)({ref:Ct,style:(0,Oe.Z)((0,Oe.Z)({},vt),{},{position:"relative"}),className:wr},ur,yn),be.createElement(Be.Z,{onResize:hn},be.createElement(Sn,{className:"".concat(oe,"-holder"),style:Rr,ref:zt,onScroll:_n,onMouseEnter:Zn},be.createElement(ge,{prefixCls:oe,height:xt,offsetX:Bn,offsetY:qt,scrollWidth:on,onInnerResize:Or,ref:gt,innerProps:wn,rtl:Gn,extra:jr},Kr))),pr&&xt>re&&be.createElement(yt,{ref:er,prefixCls:oe,scrollOffset:cn,scrollRange:xt,rtl:Gn,onScroll:Pn,onStartMove:jn,onStopMove:Pe,spinSize:Qn,containerSize:dn.height,style:Jt==null?void 0:Jt.verticalScrollBar,thumbStyle:Jt==null?void 0:Jt.verticalScrollBarThumb,showScrollBar:Xn}),pr&&on>dn.width&&be.createElement(yt,{ref:Dn,prefixCls:oe,scrollOffset:Bn,scrollRange:on,rtl:Gn,onScroll:Pn,onStartMove:jn,onStopMove:Pe,spinSize:Ln,containerSize:dn.width,horizontal:!0,style:Jt==null?void 0:Jt.horizontalScrollBar,thumbStyle:Jt==null?void 0:Jt.horizontalScrollBarThumb,showScrollBar:Xn}))}var Ie=be.forwardRef(At);Ie.displayName="List";var pt=Ie,mt=pt},51581:function(_t,Pt,ce){"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});var z=function(){function be(Ue,Le){for(var ge=0;ge<Le.length;ge++){var Ce=Le[ge];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(Ue,Ce.key,Ce)}}return function(Ue,Le,ge){return Le&&be(Ue.prototype,Le),ge&&be(Ue,ge),Ue}}(),Ye=ce(59301),Oe=we(Ye),Ve=ce(12708),xe=we(Ve);function we(be){return be&&be.__esModule?be:{default:be}}function He(be,Ue){var Le={};for(var ge in be)Ue.indexOf(ge)>=0||Object.prototype.hasOwnProperty.call(be,ge)&&(Le[ge]=be[ge]);return Le}function We(be,Ue){if(!(be instanceof Ue))throw new TypeError("Cannot call a class as a function")}function Be(be,Ue){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ue&&(typeof Ue=="object"||typeof Ue=="function")?Ue:be}function he(be,Ue){if(typeof Ue!="function"&&Ue!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ue);be.prototype=Object.create(Ue&&Ue.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),Ue&&(Object.setPrototypeOf?Object.setPrototypeOf(be,Ue):be.__proto__=Ue)}var $e=function(be){he(Ue,be);function Ue(Le){We(this,Ue);var ge=Be(this,(Ue.__proto__||Object.getPrototypeOf(Ue)).call(this,Le));return ge.scrollListener=ge.scrollListener.bind(ge),ge.eventListenerOptions=ge.eventListenerOptions.bind(ge),ge.mousewheelListener=ge.mousewheelListener.bind(ge),ge}return z(Ue,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var ge=this.getParentElement(this.scrollComponent);ge.scrollTop=ge.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var ge=!1,Ce={get passive(){ge=!0}};try{document.addEventListener("test",null,Ce),document.removeEventListener("test",null,Ce)}catch(De){}return ge}},{key:"eventListenerOptions",value:function(){var ge=this.props.useCapture;return this.isPassiveSupported()&&(ge={useCapture:this.props.useCapture,passive:!0}),ge}},{key:"setDefaultLoader",value:function(ge){this.defaultLoader=ge}},{key:"detachMousewheelListener",value:function(){var ge=window;this.props.useWindow===!1&&(ge=this.scrollComponent.parentNode),ge.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var ge=window;this.props.useWindow===!1&&(ge=this.getParentElement(this.scrollComponent)),ge.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),ge.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(ge){var Ce=this.props.getScrollParent&&this.props.getScrollParent();return Ce!=null?Ce:ge&&ge.parentNode}},{key:"filterProps",value:function(ge){return ge}},{key:"attachScrollListener",value:function(){var ge=this.getParentElement(this.scrollComponent);if(!(!this.props.hasMore||!ge)){var Ce=window;this.props.useWindow===!1&&(Ce=ge),Ce.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),Ce.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),Ce.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(ge){ge.deltaY===1&&!this.isPassiveSupported()&&ge.preventDefault()}},{key:"scrollListener",value:function(){var ge=this.scrollComponent,Ce=window,De=this.getParentElement(ge),Ke=void 0;if(this.props.useWindow){var it=document.documentElement||document.body.parentNode||document.body,tt=Ce.pageYOffset!==void 0?Ce.pageYOffset:it.scrollTop;this.props.isReverse?Ke=tt:Ke=this.calculateOffset(ge,tt)}else this.props.isReverse?Ke=De.scrollTop:Ke=ge.scrollHeight-De.scrollTop-De.clientHeight;Ke<Number(this.props.threshold)&&ge&&ge.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=De.scrollHeight,this.beforeScrollTop=De.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(ge,Ce){return ge?this.calculateTopPosition(ge)+(ge.offsetHeight-Ce-window.innerHeight):0}},{key:"calculateTopPosition",value:function(ge){return ge?ge.offsetTop+this.calculateTopPosition(ge.offsetParent):0}},{key:"render",value:function(){var ge=this,Ce=this.filterProps(this.props),De=Ce.children,Ke=Ce.element,it=Ce.hasMore,tt=Ce.initialLoad,ze=Ce.isReverse,Ze=Ce.loader,Xe=Ce.loadMore,_e=Ce.pageStart,Ot=Ce.ref,Qe=Ce.threshold,je=Ce.useCapture,ct=Ce.useWindow,Me=Ce.getScrollParent,Ge=He(Ce,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);Ge.ref=function(Te){ge.scrollComponent=Te,Ot&&Ot(Te)};var ke=[De];return it&&(Ze?ze?ke.unshift(Ze):ke.push(Ze):this.defaultLoader&&(ze?ke.unshift(this.defaultLoader):ke.push(this.defaultLoader))),Oe.default.createElement(Ke,Ge,ke)}}]),Ue}(Ye.Component);$e.propTypes={children:xe.default.node.isRequired,element:xe.default.node,hasMore:xe.default.bool,initialLoad:xe.default.bool,isReverse:xe.default.bool,loader:xe.default.node,loadMore:xe.default.func.isRequired,pageStart:xe.default.number,ref:xe.default.func,getScrollParent:xe.default.func,threshold:xe.default.number,useCapture:xe.default.bool,useWindow:xe.default.bool},$e.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},Pt.default=$e,_t.exports=Pt.default},26724:function(_t,Pt,ce){_t.exports=ce(51581)},93314:function(_t){"use strict";_t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBB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NOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(_t,Pt,ce){"use strict";ce.d(Pt,{Z:function(){return We}});const z=Be=>typeof Be=="object"&&Be!=null&&Be.nodeType===1,Ye=(Be,he)=>(!he||Be!=="hidden")&&Be!=="visible"&&Be!=="clip",Oe=(Be,he)=>{if(Be.clientHeight<Be.scrollHeight||Be.clientWidth<Be.scrollWidth){const $e=getComputedStyle(Be,null);return Ye($e.overflowY,he)||Ye($e.overflowX,he)||(be=>{const Ue=(Le=>{if(!Le.ownerDocument||!Le.ownerDocument.defaultView)return null;try{return Le.ownerDocument.defaultView.frameElement}catch(ge){return null}})(be);return!!Ue&&(Ue.clientHeight<be.scrollHeight||Ue.clientWidth<be.scrollWidth)})(Be)}return!1},Ve=(Be,he,$e,be,Ue,Le,ge,Ce)=>Le<Be&&ge>he||Le>Be&&ge<he?0:Le<=Be&&Ce<=$e||ge>=he&&Ce>=$e?Le-Be-be:ge>he&&Ce<$e||Le<Be&&Ce>$e?ge-he+Ue:0,xe=Be=>{const he=Be.parentElement;return he==null?Be.getRootNode().host||null:he},we=(Be,he)=>{var $e,be,Ue,Le;if(typeof document=="undefined")return[];const{scrollMode:ge,block:Ce,inline:De,boundary:Ke,skipOverflowHiddenElements:it}=he,tt=typeof Ke=="function"?Ke:yt=>yt!==Ke;if(!z(Be))throw new TypeError("Invalid target");const ze=document.scrollingElement||document.documentElement,Ze=[];let Xe=Be;for(;z(Xe)&&tt(Xe);){if(Xe=xe(Xe),Xe===ze){Ze.push(Xe);break}Xe!=null&&Xe===document.body&&Oe(Xe)&&!Oe(document.documentElement)||Xe!=null&&Oe(Xe,it)&&Ze.push(Xe)}const _e=(be=($e=window.visualViewport)==null?void 0:$e.width)!=null?be:innerWidth,Ot=(Le=(Ue=window.visualViewport)==null?void 0:Ue.height)!=null?Le:innerHeight,{scrollX:Qe,scrollY:je}=window,{height:ct,width:Me,top:Ge,right:ke,bottom:Te,left:ht}=Be.getBoundingClientRect(),{top:dt,right:Rt,bottom:wt,left:ve}=(yt=>{const Ne=window.getComputedStyle(yt);return{top:parseFloat(Ne.scrollMarginTop)||0,right:parseFloat(Ne.scrollMarginRight)||0,bottom:parseFloat(Ne.scrollMarginBottom)||0,left:parseFloat(Ne.scrollMarginLeft)||0}})(Be);let de=Ce==="start"||Ce==="nearest"?Ge-dt:Ce==="end"?Te+wt:Ge+ct/2-dt+wt,qe=De==="center"?ht+Me/2-ve+Rt:De==="end"?ke+Rt:ht-ve;const kt=[];for(let yt=0;yt<Ze.length;yt++){const Ne=Ze[yt],{height:at,width:nt,top:Tt,right:ut,bottom:At,left:Ie}=Ne.getBoundingClientRect();if(ge==="if-needed"&&Ge>=0&&ht>=0&&Te<=Ot&&ke<=_e&&(Ne===ze&&!Oe(Ne)||Ge>=Tt&&Te<=At&&ht>=Ie&&ke<=ut))return kt;const pt=getComputedStyle(Ne),mt=parseInt(pt.borderLeftWidth,10),ae=parseInt(pt.borderTopWidth,10),ne=parseInt(pt.borderRightWidth,10),ee=parseInt(pt.borderBottomWidth,10);let oe=0,se=0;const re="offsetWidth"in Ne?Ne.offsetWidth-Ne.clientWidth-mt-ne:0,Se="offsetHeight"in Ne?Ne.offsetHeight-Ne.clientHeight-ae-ee:0,et="offsetWidth"in Ne?Ne.offsetWidth===0?0:nt/Ne.offsetWidth:0,Lt="offsetHeight"in Ne?Ne.offsetHeight===0?0:at/Ne.offsetHeight:0;if(ze===Ne)oe=Ce==="start"?de:Ce==="end"?de-Ot:Ce==="nearest"?Ve(je,je+Ot,Ot,ae,ee,je+de,je+de+ct,ct):de-Ot/2,se=De==="start"?qe:De==="center"?qe-_e/2:De==="end"?qe-_e:Ve(Qe,Qe+_e,_e,mt,ne,Qe+qe,Qe+qe+Me,Me),oe=Math.max(0,oe+je),se=Math.max(0,se+Qe);else{oe=Ce==="start"?de-Tt-ae:Ce==="end"?de-At+ee+Se:Ce==="nearest"?Ve(Tt,At,at,ae,ee+Se,de,de+ct,ct):de-(Tt+at/2)+Se/2,se=De==="start"?qe-Ie-mt:De==="center"?qe-(Ie+nt/2)+re/2:De==="end"?qe-ut+ne+re:Ve(Ie,ut,nt,mt,ne+re,qe,qe+Me,Me);const{scrollLeft:vt,scrollTop:bt}=Ne;oe=Lt===0?0:Math.max(0,Math.min(bt+oe/Lt,Ne.scrollHeight-at/Lt+Se)),se=et===0?0:Math.max(0,Math.min(vt+se/et,Ne.scrollWidth-nt/et+re)),de+=bt-oe,qe+=vt-se}kt.push({el:Ne,top:oe,left:se})}return kt},He=Be=>Be===!1?{block:"end",inline:"nearest"}:(he=>he===Object(he)&&Object.keys(he).length!==0)(Be)?Be:{block:"start",inline:"nearest"};function We(Be,he){if(!Be.isConnected||!(Ue=>{let Le=Ue;for(;Le&&Le.parentNode;){if(Le.parentNode===document)return!0;Le=Le.parentNode instanceof ShadowRoot?Le.parentNode.host:Le.parentNode}return!1})(Be))return;const $e=(Ue=>{const Le=window.getComputedStyle(Ue);return{top:parseFloat(Le.scrollMarginTop)||0,right:parseFloat(Le.scrollMarginRight)||0,bottom:parseFloat(Le.scrollMarginBottom)||0,left:parseFloat(Le.scrollMarginLeft)||0}})(Be);if((Ue=>typeof Ue=="object"&&typeof Ue.behavior=="function")(he))return he.behavior(we(Be,he));const be=typeof he=="boolean"||he==null?void 0:he.behavior;for(const{el:Ue,top:Le,left:ge}of we(Be,He(he))){const Ce=Le-$e.top+$e.bottom,De=ge-$e.left+$e.right;Ue.scroll({top:Ce,left:De,behavior:be})}}}}]);
|