You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1105 lines
616 KiB
1105 lines
616 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[7857],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(xt,Et){"use strict";Et.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11081:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var xt={},Et="5.0",de={},ue=null,Xe=!1,Te=!1,He=null,pe=!1,ge=null,Fe=null,Ne=0;Ne<arguments.length;Ne++){var xe=arguments[Ne];if(xe!==null)switch(typeof xe){case"number":Et=xe.toFixed(1);break;case"string":xe.match(new RegExp("^[0-9]\\.[0-9]+$"))?Et=xe:He=xe;break;case"object":typeof xe.is3D!="undefined"?ue=xe:de=xe;break;case"boolean":Xe=xe,Te=!0;break}}ue===null&&(ue={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},de.material_id!==void 0&&!Te&&(Xe=!0)),He!==null&&de.id===void 0&&(de.id=He);var fe="",je="",me=!1,Ue=null,Le=null,Ce=null,De=!1,ke=null,Ye=null,tt=null,it=null,nt=null;de.height!==void 0&&(de.height=Math.round(de.height)),de.width!==void 0&&(de.width=Math.round(de.width));var Ve=function(Be){return parseFloat(Be)>4?parseFloat(Be):5};xt.setHTML5Codebase=function(Be,Ke){Fe=Be,at(Be,Ke)},xt.setJavaCodebase=xt.setJavaCodebaseVersion=xt.isCompiledInstalled=xt.setPreCompiledScriptPath=xt.setPreCompiledResourcePath=function(){},xt.setHTML5CodebaseVersion=function(Be,Ke){var qe=parseFloat(Be);if(qe!==NaN&&qe<5){console.log("The GeoGebra HTML5 codebase version "+qe+" is deprecated. Using version latest instead.");return}ge=Be,he(Be,Ke)},xt.getHTML5CodebaseVersion=function(){return Le},xt.getParameters=function(){return de},xt.setFontsCSSURL=function(Be){it=Be},xt.setGiacJSURL=function(Be){},xt.setJNLPFile=function(Be){fe=Be},xt.setJNLPBaseDir=function(Be){},xt.inject=function(){function Be(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ke="auto",qe=de.id,Kt,st=!1,Lt=0;Lt<arguments.length;Lt++){var Oe=arguments[Lt];typeof Oe=="string"?(Oe=Oe.toLowerCase(),Oe.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ke=Oe:qe=arguments[Lt]):typeof Oe=="boolean"?st=Oe:Oe instanceof HTMLElement&&(Kt=Oe)}ut();function ut(){if(!pe){setTimeout(ut,200);return}Ke=Dt(Ke);var ft=Kt||document.getElementById(qe);if(!ft){console.log("possibly bug on ajax loading? ");return}if(xt.removeExistingApplet(ft,!1),de.width===void 0&&ft.clientWidth&&(de.width=ft.clientWidth),de.height===void 0&&ft.clientHeight&&(de.height=ft.clientHeight),!(de.width&&de.height)&&Ke==="html5"&&(delete de.width,delete de.height),Ue=Ke,Ke==="screenshot")Pe(ft,de);else{var oe=!1;de.hasOwnProperty("playButton")&&de.playButton||de.hasOwnProperty("clickToLoad")&&de.clickToLoad?oe=!0:de.hasOwnProperty("playButtonAutoDecide")&&de.playButtonAutoDecide&&(oe=(!rt()||Be())&&$e()),oe?(Ue="screenshot",Ot(ft,de,st,Ke)):We(ft,de,st)}}};function rt(){try{return window.self!==window.top}catch(Be){return!0}}function $e(){return de.hasOwnProperty("screenshotGenerator")&&de.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}xt.getViews=function(){return ue},xt.isJavaInstalled=function(){return!1};var Ht=function(Be){var Ke=function(Lt){var Oe=JSON.parse(Lt),ut=function(te){return te.type=="G"||te.type=="E"},ft=Oe.elements?Oe.elements.filter(ut)[0]:Oe;if(!ft||!ft.url){qe();return}de.fileName=ft.url,Ge(ft.settings||{}),ue.is3D=!0;var oe="https://www.geogebra.org/images/";xt.setPreviewImage(ke||ft.previewUrl,oe+"GeoGebra_loading.png",oe+"applet_play.png"),Be()},qe=function(){de.onError&&de.onError(),Gt("Error: Fetching material (id "+de.material_id+") failed.",de)},Kt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",st="/materials/"+de.material_id+"?scope=basic";_e("https://"+Kt+"/api/proxy.php?path="+encodeURIComponent(st),Ke,qe)};function Ge(Be){var Ke=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(qe){Be[qe]=!!Be[qe]}),Ke.forEach(function(qe){de[qe]===void 0&&Be[qe]!==void 0&&(de[qe]=Be[qe])}),de.showToolBarHelp===void 0&&(de.showToolBarHelp=de.showToolBar)}function _e(Be,Ke,qe){var Kt=new XMLHttpRequest;Kt.open("GET",Be),Kt.onload=function(){Ke(Kt.responseText)},Kt.onerror=qe,Kt.send()}xt.isHTML5Installed=function(){return!0},xt.getLoadedAppletType=function(){return Ue},xt.setPreviewImage=function(Be,Ke,qe){ke=Be,Ye=Ke,tt=qe},xt.removeExistingApplet=function(Be,Ke){var qe;typeof Be=="string"&&(Be=document.getElementById(Be)),Ue=null;var Kt=null;for(qe=0;qe<Be.childNodes.length;qe++){var st=Be.childNodes[qe],Lt=st.className;Lt==="applet_screenshot"?Ke?(st.style.display="block",Ue="screenshot"):st.style.display="none":Lt!=="applet_scaler prerender"&&(Be.removeChild(st),Kt=Lt&&Lt.indexOf("appletParameters")!=-1?st.id:null,qe--)}var Oe=de.id!==void 0?de.id:Kt,ut=window[Oe];ut&&typeof ut.getBase64=="function"&&(ut.remove(),window[Oe]=null)},xt.refreshHitPoints=function(){if(Ve(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Be=xt.getAppletObject();return Be&&typeof Be.recalculateEnvironments=="function"?(Be.recalculateEnvironments(),!0):!1},xt.startAnimation=function(){var Be=xt.getAppletObject();return Be&&typeof Be.startAnimation=="function"?(Be.startAnimation(),!0):!1},xt.stopAnimation=function(){var Be=xt.getAppletObject();return Be&&typeof Be.stopAnimation=="function"?(Be.stopAnimation(),!0):!1},xt.getAppletObject=function(){var Be=de.id!==void 0?de.id:"ggbApplet";return window[Be]},xt.resize=function(){};var ot=function(Be,Ke,qe){var Kt=document.createElement("param");Kt.setAttribute("name",Ke),Kt.setAttribute("value",qe),Be.appendChild(Kt)},Se=function(Be){return Be&&Be!=="false"},We=function(Be,Ke,qe){Ve(Le)<=4.2&&(qe=!0);var Kt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Le||ggbHTML5LoadedCodebaseIsWebSimple&&!De)&&(Kt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var st=document.createElement("div");st.classList.add("appletParameters","notranslate");var Lt=Ke.width,Oe=Ke.height;if(Ke.disableAutoScale=Ke.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ke.disableAutoScale,Ke.width!==void 0)if(Ve(Le)<=4.4)Se(Ke.showToolBar)&&(Ke.height-=7),Se(Ke.showAlgebraInput)&&(Ke.height-=37),Ke.width<605&&Se(Ke.showToolBar)&&(Ke.width=605,Lt=605);else{var ut=100;(Se(Ke.showToolBar)||Se(Ke.showMenuBar))&&(Ke.hasOwnProperty("customToolBar")&&(Ke.customToolbar=Ke.customToolBar),ut=Se(Ke.showMenuBar)?245:155),Lt<ut&&(Ke.width=ut,Lt=ut)}st.style.border="none",st.style.display="inline-block";for(var ft in Ke)Ke.hasOwnProperty(ft)&&ft!=="appletOnLoad"&&st.setAttribute("data-param-"+ft,Ke[ft]);it&&st.setAttribute("data-param-fontscssurl",it),xt.resize=function(){GGBAppletUtils.responsiveResize(Be,Ke)},window.addEventListener("resize",function(Wt){xt.resize()});var oe=typeof Ke.appletOnLoad=="function"?Ke.appletOnLoad:function(){};if(!qe&&Ke.width!==void 0){Ke.hasOwnProperty("showSplash")||st.setAttribute("data-param-showSplash","false");var te=Be.querySelector(".applet_scaler.prerender"),z=te!==null;if(z)var re=te.querySelector(".ggb_preview");else{var re=en(Lt,Oe,Ke.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=Lt+"px",te.style.height=Oe+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),Ve(Le)>=5?(Ke.appletOnLoad=function(Wt){var Rt=Be.querySelector(".ggb_preview");Rt&&Rt.parentNode.removeChild(Rt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),oe(Wt)},z||te.appendChild(re)):st.appendChild(re),te.appendChild(st),z||Be.appendChild(te),setTimeout(function(){xt.resize()},1)}else{var le=document.createElement("div");le.className="applet_scaler",le.style.position="relative",le.style.display="block",le.appendChild(st),Be.appendChild(le),Ke.appletOnLoad=function(Wt){xt.resize(),oe(Wt)}}function ne(Wt,Rt){Rt&&typeof Rt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Wt,Rt.appletOnLoad):renderGGBElement(Wt),Gt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Rt)}function be(Wt,Rt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Wt,params:Rt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(qt){ne(qt.article,qt.params)}),html5AppletsToProcess=null)},Ve(Le)<5&&(Wt.className+=" geogebraweb")):ne(Wt,Rt)}if(Kt){scriptLoadStarted=!0;for(var Ze=0;Ze<st.childNodes.length;Ze++){var St=st.childNodes[Ze].tagName;St==="TABLE"&&(st.removeChild(st.childNodes[Ze]),Ze--)}if(ggbHTML5LoadedScript!==null){var gt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');gt!=null&>.parentNode.removeChild(gt)}var dt=document.createElement("script"),vt=function(){be(st,Ke)};dt.src=je+Ce,ggbHTML5LoadedCodebaseIsWebSimple=De,ggbHTML5LoadedCodebaseVersion=Le,ggbHTML5LoadedScript=dt.src,Gt("GeoGebra HTML5 codebase loaded: '"+je+"'.",Ke),!Fe&&(!ge||ge=="5.0")?(De?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),vt()):je.requirejs?__webpack_require__.e(981).then(function(){var Wt=[__webpack_require__(60981)];vt.apply(null,Wt)}.bind(this)).catch(__webpack_require__.oe):(dt.onload=vt,Be.appendChild(dt))}else be(st,Ke);Ke.height=Oe,Ke.width=Lt},Pe=function(Be,Ke,qe){var Kt=en(Ke.width,Ke.height,Ke.borderColor,qe),st=document.createElement("div");st.style.position="relative",st.style.display="block",st.style.width=Ke.width+"px",st.style.height=Ke.height+"px",st.className="applet_screenshot applet_scaler"+(qe?" applet_screenshot_play":""),st.appendChild(Kt);var Lt=GGBAppletUtils.getScale(Ke,Be,qe);qe?(Be.appendChild(pt()),window.GGBT_wsf_view||(Be.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(st,"66%"),Be.appendChild(st),Lt!==1&&!isNaN(Lt)&&(GGBAppletUtils.scaleElement(st,Lt),st.style.width=Ke.width+"px",st.style.height=Ke.height+"px",st.parentNode.style.width=Ke.width*Lt+"px",st.parentNode.style.height=Ke.height*Lt+"px"),xt.resize=function(){Je(Be,Kt,st,qe)},window.addEventListener("resize",function(Oe){xt.resize()}),xt.resize()};function Je(Be,Ke,qe,Kt){if(Be.contains(Ke)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Be.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Be)}var st=GGBAppletUtils.getScale(de,Be,Kt);qe.parentNode!==null&&(!isNaN(st)&&st!==1?(GGBAppletUtils.scaleElement(qe,st),qe.parentNode.style.width=de.width*st+"px",qe.parentNode.style.height=de.height*st+"px"):(GGBAppletUtils.scaleElement(qe,1),qe.parentNode.style.width=de.width+"px",qe.parentNode.style.height=de.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Be),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}xt.onExitFullscreen=function(Be,Ke){Ke.appendChild(Be)};var Ot=function(Be,Ke,qe,Kt){Pe(Be,Ke,!0);for(var st=function(){var ut=[];for(Oe=0;Oe<Be.childNodes.length;Oe++)ut.push(Be.childNodes[Oe]);if(window.GGBT_wsf_view){var ft=window.GGBT_wsf_view.renderFullScreen(Be,Ke.id),oe=document.getElementById("fullscreencontainer"),te=jQuery(Be).find(".fullscreencontent");te.length>0?(ft.remove(),te.attr("id","fullscreencontent").show(),jQuery(oe).append(te),window.dispatchEvent(new Event("resize"))):We(ft,Ke,!1),window.GGBT_wsf_view.launchFullScreen(oe)}else Ue=Kt,We(Be,Ke,!1);if(!window.GGBT_wsf_view)for(Oe=0;Oe<ut.length;Oe++)Be.removeChild(ut[Oe])},Lt=Be.getElementsByClassName("ggb_preview_play"),Oe=0;Oe<Lt.length;Oe++)Lt[Oe].addEventListener("click",st,!1),Lt[Oe].addEventListener("ontouchstart",st,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Be),$e()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},pt=function(){var Be=document.createElement("div");if(Be.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ke='.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");}',qe=document.createElement("style");qe.styleSheet?qe.styleSheet.cssText=Ke:qe.appendChild(document.createTextNode(Ke)),document.getElementsByTagName("head")[0].appendChild(qe)}return Be},en=function(Be,Ke,qe,Kt){var st=document.createElement("div");st.className="ggb_preview",st.style.position="absolute",st.style.zIndex="90",st.style.width=Be-2+"px",st.style.height=Ke-2+"px",st.style.top="0px",st.style.left="0px",st.style.overflow="hidden",st.style.backgroundColor="white";var Lt="lightgrey";qe!==void 0&&(qe==="none"?Lt="transparent":Lt=qe),st.style.border="1px solid "+Lt;var Oe=document.createElement("img");if(Oe.style.position="relative",Oe.style.zIndex="1000",Oe.style.top="-1px",Oe.style.left="-1px",ke!==null&&Oe.setAttribute("src",ke),Oe.style.opacity=.7,Ye!==null){var ut,ft,oe;if(!Kt){ut=document.createElement("img"),ut.style.position="absolute",ut.style.zIndex="1001",ut.style.opacity=1,Oe.style.opacity=.3,ft=360,ft>Be/4*3&&(ft=Be/4*3),oe=ft/5.8,ut.setAttribute("src",Ye),ut.setAttribute("width",ft),ut.setAttribute("height",oe);var te=(Be-ft)/2,z=(Ke-oe)/2;ut.style.left=te+"px",ut.style.top=z+"px",st.appendChild(ut)}}return st.appendChild(Oe),st},Dt=function(Be){return Be=Be.toLowerCase(),Be==="html5"||Be==="screenshot"?Be:"html5"},ve=["web","webSimple","web3d","tablet","tablet3d","phone"],he=function(Be,Ke){if(Le=Be,Ke){at(Le,!0);return}var qe=!Xe;if(qe){var Kt=Ve(Le);!isNaN(Kt)&&Kt<4.4&&(qe=!1)}var st,Lt;window.location.protocol.substr(0,4)==="http"?st=window.location.protocol:st="http:";var Oe=Le.indexOf("//");Oe>0?Lt=Le:Oe===0?Lt=st+Le:Lt="https://www.geogebra.org/apps/5.2.814.0/";for(var ut in ve)if(Le.slice(ve[ut].length*-1)===ve[ut]||Le.slice((ve[ut].length+1)*-1)===ve[ut]+"/"){at(Lt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&qe&&!ue.is3D&&!ue.AV&&!ue.SV&&!ue.CV&&!ue.EV2&&!ue.CP&&!ue.PC&&!ue.DA&&!ue.FI&&!ue.PV&&!Se(de.showToolBar)&&!Se(de.showMenuBar)&&!Se(de.showAlgebraInput)&&!Se(de.enableRightClick)&&(!de.appName||de.appName=="classic")?Lt+="webSimple/":Lt+="web3d/",at(Lt,!1)},at=function(Be,Ke){if(Be.requirejs){je=Be;return}Be.slice(-1)!=="/"&&(Be+="/"),je=Be,Ke===null&&(Ke=Be.indexOf("http")===-1),me=Ke,Ce="web.nocache.js",De=!1;var qe=je.split("/");qe.length>1&&(!Ke&&qe[qe.length-2]==="webSimple"?(Ce="webSimple.nocache.js",De=!0):ve.indexOf(qe[qe.length-2])>=0&&(Ce=qe[qe.length-2]+".nocache.js")),qe=Be.split("/"),Le=qe[qe.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 Kt=parseFloat(Le);Kt!==NaN&&Kt<5&&Be.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Kt+" is deprecated. Using version latest instead."),he("5.0",Ke))},Gt=function(Be,Ke){window.console&&window.console.log&&(!Ke||typeof Ke.showLogging=="undefined"||Ke.showLogging&&Ke.showLogging!=="false")&&console.log(Be)};de.material_id!==void 0?Ht(mt):mt();function mt(){var Be=Et;ge!==null?Be=ge:parseFloat(Be)<5&&(Be="5.0"),he(Be,!1),Fe!==null&&at(Fe,me),pe=!0}return xt},GGBAppletUtils=function(){"use strict";function xt(){return window.GGBT_wsf_edit!==void 0}function Et(pe,ge){ge!=1?(pe.style.transformOrigin="0% 0% 0px",pe.style.webkitTransformOrigin="0% 0% 0px",pe.style.transform="scale("+ge+","+ge+")",pe.style.webkitTransform="scale("+ge+","+ge+")",pe.style.maxWidth="initial",pe.querySelector(".ggb_preview")!==null&&(pe.querySelector(".ggb_preview").style.maxWidth="initial"),pe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(pe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),pe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(pe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(pe.style.transform="none",pe.style.webkitTransform="none")}function de(pe,ge,Fe,Ne,xe,fe){var je=null;if(fe!=null&&fe!="")for(var me=pe.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+fe+" ")>-1){je=me;break}else me=me.parentNode;var Ue=0,Le=0,Ce=0,De=0,ke=0,Ye=0,tt=0;if(je)Ue=je.offsetWidth,Le=Math.max(Ne?je.offsetWidth:0,je.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Ue=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),Ce=Ue):(Ue=window.innerWidth,Le=window.innerHeight,Ce=window.innerWidth),pe){var it=pe.getBoundingClientRect();it.left>0&&it.left<=Ue&&(xe===void 0||!xe)&&(document.dir==="rtl"?(ke=Ue-it.width-it.left,Ye=Ce<=480?10:30):(Ye=it.left,ke=Ce<=480?10:30),De=Ye+ke)}if(pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var nt=pe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(De=40,tt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(De=0,tt=40)}}return pe&&((Fe===void 0||!Fe)&&ge>0&&ge+De<Ue?Ue=ge:Ue-=De,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Fe===void 0||!Fe)&&(Le-=tt)),{width:Ue,height:Le}}function ue(pe,ge,Fe,Ne,xe){if(pe.isScreenshoGenerator)return 1;var fe=Ne!==void 0&&Ne,je=pe.noScaleMargin!=null&&pe.noScaleMargin,me=function(nt){return nt&&nt!=="false"},Ue=me(pe.autoHeight),Le=de(ge,pe.width,Fe,Ue,fe&&window.GGBT_wsf_view||je,xe),Ce=parseInt(Le.width),De=pe.width,ke=pe.height;if(De===void 0){var Ye=ge.querySelector(".appletParameters");Ye&&(De=Ye.offsetWidth,ke=Ye.offsetHeight)}var tt=Ce/De,it=fe?1:Le.height/ke;return Fe!==void 0&&!Fe&&(tt=Math.min(1,tt),it=Math.min(1,it)),Math.min(tt,it)}function Xe(pe,ge,Fe){var Ne=1,xe,fe=!1;if(pe.hasOwnProperty("allowUpscale")&&(fe=pe.allowUpscale),pe.hasOwnProperty("scale")&&(Ne=parseFloat(pe.scale),(isNaN(Ne)||Ne===null||Ne===0)&&(Ne=1),Ne>1&&(fe=!0)),ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(pe.hasOwnProperty("disableAutoScale")&&pe.disableAutoScale))xe=ue(pe,ge,fe,Fe,pe.scaleContainerClass);else return Ne;return fe&&(!pe.hasOwnProperty("scale")||Ne===1)?xe:Math.min(Ne,xe)}function Te(pe){var ge=Math.min(window.innerWidth,document.documentElement.clientWidth),Fe=Math.min(window.innerHeight,document.documentElement.clientHeight),Ne=pe.getBoundingClientRect(),xe=(ge-Ne.width)/2,fe=(Fe-Ne.height)/2;fe<0&&(fe=0),pe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(xe<40?pe.style.left="40px":pe.style.left=xe+"px",pe.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?pe.style.top="40px":pe.style.top=fe+"px",pe.style.left=xe+"px")}function He(pe,ge){var Fe=pe.querySelector(".appletParameters");if(Fe){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ge.id!==Fe.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(pe)}if(Fe.parentElement&&/fullscreen/.test(Fe.parentElement.className))return;var Ne=Xe(ge,pe);xt()&&Fe.setAttribute("data-param-scale",Ne);for(var xe=null,fe=0;fe<pe.childNodes.length;fe++)if(pe.childNodes[fe].className!==void 0&&pe.childNodes[fe].className.match(/^applet_scaler/)){xe=pe.childNodes[fe];break}if(xe!==null&&xe.querySelector(".noscale")!==null)return;var je=ge.id!==void 0?ge.id:"ggbApplet",me=window[je];(me==null||!me.recalculateEnvironments)&&xe!==null&&!xe.className.match(/fullscreen/)&&(xe.parentNode.style.transform="",!isNaN(Ne)&&Ne!==1?(xe.parentNode.style.width=ge.width*Ne+"px",xe.parentNode.style.height=ge.height*Ne+"px",Et(xe,Ne)):(Et(xe,1),xe.parentNode.style.width=ge.width+"px",xe.parentNode.style.height=ge.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Te(pe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Fe).parents(".content-added-content"))}}return{responsiveResize:He,isFlexibleWorksheetEditor:xt,positionCenter:Te,getScale:Xe,scaleElement:Et}}();__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 xt=n.location.search;return xt.indexOf(J)!=-1||xt.indexOf(K)!=-1}function q(xt,Et){}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(xt){var Et=s[L].bindings;s[L].bindings=function(){for(var de=Et?Et():{},ue=xt[webModule.__softPermutationId],Xe=O;Xe<ue.length;Xe++){var Te=ue[Xe];de[Te[O]]=Te[P]}return de}};var t;function u(){return v(),t}function v(){if(!t){var xt=o.createElement(Q);if(xt.id=L,xt.style.cssText=R+S,xt.tabIndex=-1,o.body.appendChild(xt),t=xt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Et=document.compatMode==U?V:W;t.write(Et+X),t.close()}}}function w(xt){function Et(ue){function Xe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Te=Xe();if(Te){ue();return}function He(){if(!Te){if(!Xe())return;Te=!0,ue(),o.removeEventListener&&o.removeEventListener(Z,He,!1),pe&&clearInterval(pe)}}o.addEventListener&&o.addEventListener(Z,He,!1);var pe=setInterval(function(){He()},$)}function de(ue){var Xe=u(),Te=Xe.body,He=Xe.createElement(_);He.language=ab,He.crossOrigin=W,He.src=ue,webModule.__errFn&&(He.onerror=function(){webModule.__errFn(L,new Error(bb+ue))}),Te.appendChild(He)}Et(function(){de(xt)})}webModule.__startLoadingFragment=function(xt){return C(xt)},webModule.__installRunAsyncCode=function(xt){var Et=u(),de=Et.body,ue=Et.createElement(_);ue.language=ab,ue.text=xt,de.appendChild(ue),de.removeChild(ue)};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(xt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(xt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(xt){var Et=c[xt];return Et==null?null:Et},r=d,webModule.__errFn=e}function B(){function xt(pe){var ge=pe.lastIndexOf(rb);ge==-1&&(ge=pe.length);var Fe=pe.indexOf(sb);Fe==-1&&(Fe=pe.length);var Ne=pe.lastIndexOf(tb,Math.min(Fe,ge));return Ne>=O?pe.substring(O,Ne+P):W}function Et(pe){if(!pe.match(/^\w+:\/\//)){var ge=o.createElement(ub);ge.src=pe+vb,pe=xt(ge.src)}return pe}function de(){var pe=__gwt_getMetaProperty(wb);return pe!=null?pe:W}function ue(){for(var pe=o.getElementsByTagName(_),ge=O;ge<pe.length;++ge)if(pe[ge].src.indexOf(xb)!=-1)return xt(pe[ge].src);return W}function Xe(){var pe=o.getElementsByTagName(yb);return pe.length>O?pe[pe.length-P].href:W}function Te(){var pe=o.location;return pe.href==pe.protocol+zb+pe.host+pe.pathname+pe.search+pe.hash}var He=de();return He==W&&(He=ue()),He==W&&(He=Xe()),He==W&&Te()&&(He=xt(o.location.href)),He=Et(He),He}function C(xt){return xt.match(/^\//)||xt.match(/^[a-zA-Z]+:\/\//)?xt:webModule.__moduleBase+xt}function D(){var xt=[],Et=O,de=[],ue=[];function Xe(pe){var ge=ue[pe](),Fe=de[pe];if(ge in Fe)return ge;var Ne=[];for(var xe in Fe)Ne[Fe[xe]]=xe;throw r&&r(pe,Ne,ge),null}if(__gwt_isKnownPropertyValue=function(pe,ge){return ge in de[pe]},webModule.__getPropMap=function(){var pe={};for(var ge in de)de.hasOwnProperty(ge)&&(pe[ge]=Xe(ge));return pe},webModule.__computePropValue=Xe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Te;try{Te=Cb;var He=Te.indexOf(Db);He!=-1&&(Et=parseInt(Te.substring(He+P),$),Te=Te.substring(O,He))}catch(pe){}return webModule.__softPermutationId=Et,C(Te+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(xt,Et,de){"use strict";de.d(Et,{Ax:function(){return He},Ds:function(){return pe},KI:function(){return Fe},SI:function(){return Te},f1:function(){return Xe}});var ue=de(90524);function Xe(Ne){let xe=!0;if(Ne.length>0){for(let fe=0;fe<Ne.length;fe++)if(Ne[fe].compile_success==0||!Ne[fe].compile_success){xe=!1;break}}else xe=!1;return xe}function Te(Ne,xe=""){let fe=[];for(let je=0;je<Ne.length;je++){let me=Ne[je],Ue=xe?`${xe}/${me.name}`:`${me.name}`;fe.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:Ue})}return fe}function He(Ne,xe,fe){for(let je=0;je<Ne.length;je++){let me=Ne[je];if(me.key===xe){me.children=fe;break}me.children&&He(me.children,xe,fe)}return Ne}function pe(Ne,xe,fe){let je;return function(){let me=this,Ue=arguments,Le=function(){je=null,fe||Ne.apply(me,Ue)},Ce=fe&&!je;clearTimeout(je),je=setTimeout(Le,xe),Ce&&Ne.apply(me,Ue)}}const ge=!0,Fe=ue.Z.API_SERVER},84236:function(xt,Et,de){"use strict";de.d(Et,{t:function(){return me}});var ue=de(59301),Xe=de(99571),Te={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},He=de(92310),pe=de.n(He),ge=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,fe=(Ue,Le,Ce)=>Le in Ue?ge(Ue,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):Ue[Le]=Ce,je=(Ue,Le)=>{for(var Ce in Le||(Le={}))Ne.call(Le,Ce)&&fe(Ue,Ce,Le[Ce]);if(Fe)for(var Ce of Fe(Le))xe.call(Le,Ce)&&fe(Ue,Ce,Le[Ce]);return Ue};const me=({cancelText:Ue="\u53D6\u6D88",okText:Le="\u786E\u5B9A",loading:Ce=!1,hasOkBtn:De=!0,hasCancelBtn:ke=!0,okButtonProps:Ye={},onCancel:tt=()=>{},onOk:it=()=>{},className:nt=""})=>ue.createElement("div",{className:pe()(Te.buttonFixed,nt)},ue.createElement("div",{className:Te.buttonWrap},ke&&ue.createElement(Xe.ZP,{size:"middle",className:`${Te.button} mr20`,onClick:tt},Ue),De&&ue.createElement(Xe.ZP,je({size:"middle",type:"primary",className:`${Te.button} mr20`,loading:Ce,onClick:it},Ye),Le)))},6077:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return je}});var ue=de(59301),Xe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Te=de(92310),He=de.n(Te),pe=de(29787),ge=de(2859),Fe=de(82093),Ne=de(49661),xe=(me,Ue,Le)=>new Promise((Ce,De)=>{var ke=it=>{try{tt(Le.next(it))}catch(nt){De(nt)}},Ye=it=>{try{tt(Le.throw(it))}catch(nt){De(nt)}},tt=it=>it.done?Ce(it.value):Promise.resolve(it.value).then(ke,Ye);tt((Le=Le.apply(me,Ue)).next())}),je=({data:me,className:Ue,fullWidth:Le,style:Ce={},onClose:De,onOk:ke,showFullTools:Ye,noAssociationId:tt})=>{const it=(0,ue.useRef)(null),nt=(0,ue.useRef)(null),Ve=(0,ue.useRef)(null),rt=(0,ue.useRef)(null),[$e,Ht]=(0,ue.useState)(!1),[Ge,_e]=(0,ue.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ue.useEffect)(()=>(Ve.current||(Ve.current=document.createElement("style"),document.head.appendChild(Ve.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),Ve.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&ot()):(document.body.removeAttribute("data-custom"),Ve.current&&(document.head.removeChild(Ve.current),Ve.current=null)),()=>{document.body.removeAttribute("data-custom"),Ve.current&&(document.head.removeChild(Ve.current),Ve.current=null)}),[me==null?void 0:me.visible]);const ot=()=>xe(void 0,null,function*(){Ht(!0),_e("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Je=yield(0,Ne.ZJ)(me==null?void 0:me.src);it.current.src="",it.current.src=Je,it.current.onload=function(){Pe()},Ht(!1),_e("")}),Se=Je=>xe(void 0,null,function*(){Ht(!0),_e("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Ot=yield(0,Fe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file:Je.dataUrl}});Ot!=null&&Ot.id&&!tt?(yield(0,Fe.ZP)(`/api/attachments/${me.id}/add_subitem.json`,{method:"post",body:{subitem_id:Ot==null?void 0:Ot.id,settings:JSON.stringify(Je.state)}})).status===0&&ke():Ot!=null&&Ot.id&&ke(Ot),Ht(!1),_e("")}),We=()=>{const Je=document.querySelector('a[href="https://markerjs.com/"]');Je&&Je.parentNode&&(Je.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(pt=>{const en=document.querySelector(pt.name);en&&en.setAttribute("title",pt.title)})},Pe=()=>{nt.current=new ge.hP(it.current),nt.current.targetRoot=rt.current,nt.current.addEventListener("render",Se),nt.current.addEventListener("beforeclose",De),Ye&&(nt.current.availableMarkerTypes=nt.current.ALL_MARKER_TYPES,nt.current.uiStyleSettings.redoButtonVisible=!0,nt.current.uiStyleSettings.notesButtonVisible=!0,nt.current.uiStyleSettings.zoomButtonVisible=!0,nt.current.uiStyleSettings.zoomOutButtonVisible=!0,nt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=nt.current.uiStyleSettings,nt.current.show(),me!=null&&me.snapshotData&&nt.current.restoreState(me.snapshotData),setTimeout(()=>{window.scrollTo(0,0),We()},300)};return ue.createElement(ue.Fragment,null,(me==null?void 0:me.visible)&&ue.createElement(pe.Z,{spinning:$e,tip:Ge,style:{position:"absolute",width:"100vw"}},ue.createElement("div",{ref:rt,className:He()(Xe.imageDimensions,Ue,Le?Xe.fullWidth:""),style:Ce},ue.createElement("img",{className:Xe.img,ref:it}))))}},88615:function(xt,Et,de){"use strict";var ue=de(59301),Xe=de(77019),Te=de(5269),He=de(20554),pe=de(99571),ge=de(38394),Fe=de(21697),Ne=de(48136),xe=de(59301);const fe=(0,ue.forwardRef)(({callback:je,showSaveButton:me,value:Ue=""},Le)=>{const Ce=(0,ue.useRef)(),De=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ke=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
y=b + r\\text{sin}\\theta \r
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\left\\{\\begin{matrix} \r
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
\\end{matrix}\\right. \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
a \\perp \\alpha \\ \r
|
|
b \\perp \\alpha \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
a \\perp m,a \\perp n \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
a^{2}+b^{2}=c^{2} \r
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
a,b \\in R^{+} \\ \r
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
a,b \\in R \\ \r
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
P \\left( S \\right) =1 \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
\\forall A \\in S \\\\ \r
|
|
P \\left( A \\right) \\ge 0 \r
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
P_{n}=n! \\\\ \r
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
\\end{array}`}]}]}],Ye=nt=>{Ce.current.setValue(Ce.current.getValue()+" "+nt.value+" ")},tt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:xe.createElement(Xe.Z,{className:Fe.Z.lists,gutter:[10,10]},De.map((nt,Ve)=>xe.createElement(Te.Z,{flex:"110px",className:Fe.Z.item},xe.createElement("div",null,xe.createElement(ge.Z,{value:`$$${nt.value}$$`}),nt.name),xe.createElement("div",{className:Fe.Z.children},nt.children.map((rt,$e)=>xe.createElement("div",{key:$e},xe.createElement("h1",null,rt.name),xe.createElement(Xe.Z,{gutter:[10,10]},rt.data.map((Ht,Ge)=>xe.createElement(Te.Z,{key:Ge,onClick:()=>Ye(Ht),className:Fe.Z.diamond},xe.createElement(ge.Z,{value:"`$$"+Ht.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:xe.createElement(Xe.Z,{className:Fe.Z.lists,gutter:[10,10]},ke.map((nt,Ve)=>xe.createElement(Te.Z,{flex:"110px",className:Fe.Z.item},xe.createElement("div",null,xe.createElement(ge.Z,{value:"`$$"+nt.value+"$$`"}),nt.name),xe.createElement("div",{className:Fe.Z.children},nt.children.map((rt,$e)=>xe.createElement("div",{key:$e},rt.name&&xe.createElement("h1",null,rt.name),xe.createElement(Xe.Z,{gutter:[10,10]},rt.data.map((Ht,Ge)=>xe.createElement(Te.Z,{key:Ge,onClick:()=>Ye(Ht),className:Fe.Z.diamond},xe.createElement(ge.Z,{value:"`$$"+Ht.value+"$$`"}))))))))))}],it=()=>{var nt=document.createElement("div");nt.innerHTML=Ce.current.getValue();var Ve=nt.innerText;return je&&je(Ve),Ve};return(0,ue.useImperativeHandle)(Le,()=>({getData:it})),xe.createElement("div",{className:Fe.Z.mathWrap},xe.createElement(He.default,{defaultActiveKey:"1",items:tt}),xe.createElement("math-field",{locale:"zh_cn",className:Fe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ce,style:{width:800,marginTop:30,fontSize:18}},Ue||""),me&&xe.createElement("div",{className:Fe.Z.button},xe.createElement(pe.ZP,{size:"large",onClick:it,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Et.Z=fe},57884:function(xt,Et,de){"use strict";var ue=de(59301),Xe=de(93314),Te=de(99571),He=Object.defineProperty,pe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,fe=(Le,Ce,De)=>Ce in Le?He(Le,Ce,{enumerable:!0,configurable:!0,writable:!0,value:De}):Le[Ce]=De,je=(Le,Ce)=>{for(var De in Ce||(Ce={}))Ne.call(Ce,De)&&fe(Le,De,Ce[De]);if(Fe)for(var De of Fe(Ce))xe.call(Ce,De)&&fe(Le,De,Ce[De]);return Le},me=(Le,Ce)=>pe(Le,ge(Ce));const Ue=({img:Le,buttonProps:Ce={},styles:De={},customText:ke,ButtonText:Ye,ButtonClick:tt,Buttonclass:it,ButtonTwo:nt,imgStyles:Ve,loading:rt=!1,className:$e=""})=>ue.createElement("section",{className:`tc animated fadeIn ${$e}`,style:je({color:"#999",margin:"100px auto",visibility:rt?"hidden":"visible"},De)},ue.createElement("img",{src:Le||Xe,style:me(je({},Ve),{pointerEvents:"none",userSelect:"none"})}),ue.createElement("p",{className:"mt20 font14"},ke||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Ye&&ue.createElement(Te.ZP,je({className:it,onClick:tt},Ce),Ye),nt&&nt);Et.Z=Ue},41550:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return it}});var ue=de(59301),Xe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Te=de(99571),He=de(70557),pe=de(51124),ge=de(25399),Fe=de(49661),Ne=de(72664),xe=de(57884),fe=de(90524),je=de(14794),me=de(59301),Ue=Object.defineProperty,Le=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ke=(nt,Ve,rt)=>Ve in nt?Ue(nt,Ve,{enumerable:!0,configurable:!0,writable:!0,value:rt}):nt[Ve]=rt,Ye=(nt,Ve)=>{for(var rt in Ve||(Ve={}))Ce.call(Ve,rt)&&ke(nt,rt,Ve[rt]);if(Le)for(var rt of Le(Ve))De.call(Ve,rt)&&ke(nt,rt,Ve[rt]);return nt},tt=(nt,Ve,rt)=>new Promise(($e,Ht)=>{var Ge=Se=>{try{ot(rt.next(Se))}catch(We){Ht(We)}},_e=Se=>{try{ot(rt.throw(Se))}catch(We){Ht(We)}},ot=Se=>Se.done?$e(Se.value):Promise.resolve(Se.value).then(Ge,_e);ot((rt=rt.apply(nt,Ve)).next())}),it=({editOffice:nt="view",data:Ve,issaver:rt,onSaver:$e,theme:Ht,type:Ge,filename:_e,monacoEditor:ot,className:Se,style:We,close:Pe,onClose:Je,hasMask:Ot,disabledDownload:pt,onImgDimensions:en,showNodata:Dt,recordInfo:ve})=>{const[he,at]=(0,ue.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Gt,mt]=(0,ue.useState)(""),[Be,Ke]=(0,ue.useState)(),qe=window.ENV==="build"?"/react/build":"",Kt=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,Lt=10*(1024*1024),Oe=(0,ue.useRef)();Ve!=null&&Ve.startsWith("/api")&&Ge!=="txt"&&(Ve=fe.Z.API_SERVER+Ve);const ut=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();_e&&ot&&(ot.filename=_e),(0,ue.useEffect)(()=>{var re,le;const ne=(le=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:le.split(";");ne==null||ne.map(be=>{let Ze=be.split("=");Ze[0]==="_educoder_session"&&mt(Ze[1])})},[]),(0,ue.useEffect)(()=>{Ge==="office"&&(Ve.indexOf("bigfilescdn.")>-1||Ve.indexOf("bigfiles1")>-1?Ke({url:Ve,fileType:ut(Ve),model:Ve.indexOf("model=edit")?"edit":"view"}):oe())},[Ge,Ve]);function ft(re){return tt(this,null,function*(){re.data.type==="pdfdata"&&($e(re.data.data),window.removeEventListener("message",ft,!1)),console.log("mess---:",re.data)})}const oe=()=>tt(void 0,null,function*(){console.log("data:",Ve);let re=Ve;Ve.startsWith("http")||(re=location.origin+re);let le=new URL(re).pathname.split("/").pop();const ne=yield(0,Ne.gJ)({attachment_id:le});ne.url=Kt+ne.url,Ke(ne)}),te=()=>{if(Ve.startsWith("http")||Ve.startsWith("blob:")){z();return}(0,Fe.Sv)(_e||"educoder",Ve,_e)},z=()=>{ve&&(0,je.fc)({id:ve==null?void 0:ve.id,watch_type:1,course_id:ve==null?void 0:ve.course_id}),(0,Fe.Nd)(_e||"educoder",decodeURIComponent(Ve))};return me.createElement("div",{style:Ye({},We||{}),className:`${Ot&&Xe.bgBlack} ${Ge?Xe.wrp:"hide"}`},Pe&&me.createElement("div",{className:Xe.close,ref:Oe},!!en&&me.createElement(ge.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Oe.current},me.createElement("span",{onClick:()=>{Je(),en()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!pt&&me.createElement(ge.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Oe.current},me.createElement("span",{onClick:z},me.createElement("i",{className:"icon-quxiaozhiding"}))),rt&&me.createElement(ge.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Oe.current},me.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",ft,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},me.createElement("i",{className:"icon-baocun"}))),me.createElement(ge.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Oe.current},me.createElement("span",{className:"",onClick:()=>{Je()}},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${Xe[Se]} ${Se} ${Xe.monaco} ${Ge==="txt"?"show":"hide"}`},Ge==="txt"&&me.createElement(me.Fragment,null,me.createElement(pe.ZP,Ye({},ot)))),Ge==="audio"&&me.createElement("audio",{src:`${(Ve==null?void 0:Ve.indexOf("http://"))>-1||(Ve==null?void 0:Ve.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ve}`,autoPlay:!0}),Ge==="video"&&me.createElement(me.Fragment,null,(Ve==null?void 0:Ve.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${Ve}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ve}`,autoPlay:!0})),Ge==="office"&&Be&&me.createElement("iframe",{src:`${qe}/office.html?key=${Be.key}&url=${btoa(Be.url)}&callbackUrl=${Kt+(Be.callbackUrl||"")}&fileType=${Be.fileType}&title=${Be.title||""}&model=${nt}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!pt}`}),Ge==="html"&&me.createElement("iframe",{src:Ve+"&disposition=inline"}),Ge==="pdf"&&me.createElement("iframe",{id:"pdfiframe",src:`${qe}/js/pdfview/index.html?filename=${_e||"educoder.pdf"}&url=${encodeURIComponent(Ve)}&disabledDownload=${!!pt}&model=${nt}`}),Ge==="image"&&me.createElement("img",{src:`${(Ve==null?void 0:Ve.indexOf("http://"))>-1||(Ve==null?void 0:Ve.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ve}`}),(Ge==="other"||Ge==="download")&&me.createElement(me.Fragment,null,Dt?me.createElement(xe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(Te.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:pt},"\u4E0B\u8F7D")}):me.createElement(Te.ZP,{type:"primary",size:"middle",onClick:te,disabled:pt},me.createElement(He.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ge==="flowChart"&&me.createElement("div",{className:"embed"},me.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Ve||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(xt,Et,de){"use strict";de.d(Et,{z:function(){return ot},Z:function(){return Se}});var ue=de(59301),Xe=de(88831),Te=de(90290),He=de(64018),pe=de(68535),ge=de(90524),Fe=de(49661),Ne=de(15342),xe=de(77736),fe=de(99571),je=de(1012),me=de(41550),Ue=de(59301),Ce=({html:We})=>{const Pe=(0,ue.useRef)(null),Je=(0,ue.useRef)(null),Ot=`.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,ue.useEffect)(()=>{const pt=Pe.current.attachShadow({mode:"open"});Je.current=document.createElement("div"),Je.current.className="markdown-body",Je.current.innerHTML=We,pt.appendChild(Je.current);const en=document.createElement("style");return en.textContent=Ot,pt.appendChild(en),()=>{pt.innerHTML=""}},[]),(0,ue.useEffect)(()=>{Je.current&&(Je.current.innerHTML=We)},[We]),Ue.createElement("div",{ref:Pe})};function De(We){const Pe=["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"],Je=new RegExp(`\\b(${Pe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return We.replace(Je,"").trim()}var ke={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},Ye=Object.defineProperty,tt=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,Ve=(We,Pe,Je)=>Pe in We?Ye(We,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Je}):We[Pe]=Je,rt=(We,Pe)=>{for(var Je in Pe||(Pe={}))it.call(Pe,Je)&&Ve(We,Je,Pe[Je]);if(tt)for(var Je of tt(Pe))nt.call(Pe,Je)&&Ve(We,Je,Pe[Je]);return We};const $e="@\u2581\u2581@",Ht="@\u2581@",Ge=/<pre[^>]*>/g;function _e(We){let Pe=document.createElement("div");return Pe.innerHTML=We,Pe.childNodes.length===0?"":Pe.childNodes[0].nodeValue}const ot=(We,Pe)=>{We=We||"";const Je=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ot=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,pt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,en=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Pe?We.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Je,(Dt,ve,he,at,Gt,mt,Be)=>{const Ke=ve||at||mt,qe=he||Gt||Be||"?";return ge.Z.API_SERVER+"/api/attachments/"+Ke+qe+"&t="+(0,Fe.Jn)(Ke,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(We=We.replace(en,(Dt,ve,he,at,Gt,mt,Be)=>{const Ke=ve||at||mt,qe=he||Gt||Be||"?";return ge.Z.API_SERVER+"/attachments/download/"+Ke+qe+"&t="+(0,Fe.Jn)(Ke,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replace(Je,(Dt,ve,he,at,Gt,mt,Be)=>{const Ke=ve||at||mt,qe=he||Gt||Be||"?";return ge.Z.API_SERVER+"/api/attachments/"+Ke+qe+"&t="+(0,Fe.Jn)(Ke,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replace(Ot,(Dt,ve,he,at,Gt)=>{const mt=ve||at,Be=he||Gt||"";return'"'+ge.Z.API_SERVER+"/api/attachments/"+mt+Be+mt+Be+"&t="+(0,Fe.Jn)(mt,Date.now())}).replace(pt,(Dt,ve,he,at,Gt)=>{const mt=ve||at,Be=he||Gt||"";return"("+ge.Z.API_SERVER+"/files/uploads/"+mt+Be+mt+Be+"&t="+(0,Fe.Jn)(mt,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,`
|
|
`),We)};var Se=({value:We="",edit:Pe=!1,className:Je,showTextOnly:Ot,showLines:pt,style:en={},stylesPrev:Dt={},highlightKeywords:ve,showProgramFill:he,isProgramFill:at,disabledFill:Gt=!1,programFillValue:mt,openEditor:Be=()=>{},onFillChange:Ke=st=>{},onFillBlur:qe=()=>{},onFillFocus:Kt=()=>{}})=>{let st=De(String(We||""));const Lt=(0,ue.useRef)(),Oe=(0,ue.useRef)(),[ut,ft]=(0,ue.useState)(""),[oe,te]=(0,ue.useState)("office"),[z,re]=(0,ue.useState)([]),le=(0,ue.useRef)("a"+(0,je.Z)()),ne={},be=et=>/<style[\s\S]*?>/i.test(et||""),Ze=(et,pn,It)=>{const Vt=document.createElement(et===Ht?"input":"textarea");Vt.style.width="100%",Vt.style.height=et===Ht?"40px":"151px",Vt.rows=5,Vt.spellcheck=!1,Vt.name="edu-program-fill",Vt.placeholder="\u8BF7\u8F93\u5165",Vt.dataset.id=pn;const an=Object.keys(ne).length;return ne[an]=Vt,`<span class="edu-program-fill-wrap ${et===Ht?"":"show"}" style="width:${et===Ht?"600px":"100%"}" title=${It||""}><span>${Vt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function St(et){return et=et.replace(/!\[.*?\]\(.*?\)/g,""),et=et.replace(/\[.*?\]\(.*?\)/g,""),et=et.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),et=et.replace(/<embed.*?>/g,""),et=et.replace(/<img.*?>/g,""),et=et.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),et=et.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),et=et.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),et=et.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),et}const gt=et=>!Ot&&be(st)?et:et.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(pn,It){let Vt=It.replace(/(\n|\r)/g,"").split("}"),an=[];return Vt.map(Pn=>{Pn!=""&&an.push(`.${le.current} ${Pn}`)}),`<style>${an.join("}")}</style>`}),dt=(0,ue.useMemo)(()=>{try{const Vt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,an=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Pn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,sn=/\(\/attachments\/download\//g;st=st.replace(sn,"("+ge.Z.API_SERVER+"/attachments/download/").replace(Vt,"("+ge.Z.API_SERVER+"/api/attachments/").replace(an,'"'+ge.Z.API_SERVER+"/api/attachments/").replace(Pn,'"'+ge.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),Lt.current.style.display="none"}catch(Vt){}if(he){let Vt=-1;return st=st.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(an,Pn,sn){var mn;return++Vt,Ze(an,Vt,(mn=mt==null?void 0:mt[Vt])==null?void 0:mn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${gt(st||"")}</pre>`}let et=gt(st);et=(0,Te.ZP)(et);const pn=(0,Te.ez)();st.match(/\[TOC\]/)&&(et=et.replace("<p>[TOC]</p>",(0,Te.Qv)()),(0,Te.Iy)()),et=et.replace(/(__special_katext_id_\d+__)/g,(Vt,an)=>{const{type:Pn,expression:sn}=pn[an];return(0,Ne.renderToString)(_e(sn)||"",{displayMode:Pn==="block",throwOnError:!1,output:"html"})}),et=et.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Te.AL)();const It=document.createElement("div");if(It.innerHTML=et,Ot)return It.innerText;if(ve){const Vt=ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return qt(It,Vt),It.innerHTML}return setTimeout(()=>hn(),500),It.innerHTML},[st,ve]);(0,ue.useEffect)(()=>{$t.current&&$t.current.querySelectorAll(["input","textarea"]).forEach(pn=>{pn.oninput=vt,pn.onblur=Wt,pn.onfocus=Rt})},[z]),(0,ue.useEffect)(()=>{var et,pn,It,Vt,an;if(mt!=null&&mt.length)try{const Pn=$t.current.querySelectorAll(".edu-program-fill-score"),sn=$t.current.querySelectorAll('[name="edu-program-fill"]');for(const[mn,ni]of sn.entries())ni.value=((et=mt==null?void 0:mt[mn])==null?void 0:et.value)||"",((pn=mt==null?void 0:mt[mn])==null?void 0:pn.type)==="warning"?ni.className="program-fill-warning":((It=mt==null?void 0:mt[mn])==null?void 0:It.type)==="success"?ni.className="program-fill-success":ni.className="";for(const[mn,ni]of Pn.entries())ni.innerHTML=(Vt=mt==null?void 0:mt[mn])!=null&&Vt.score?`${(an=mt==null?void 0:mt[mn])==null?void 0:an.score}\u5206`:"";re(mt)}catch(Pn){console.log(Pn,"error")}},[mt]);const vt=et=>{z[et.target.dataset.id]=z[et.target.dataset.id]||{},z[et.target.dataset.id].value=et.target.value,re([...z]),Ke(z,et.target.dataset.id)},Wt=et=>{z[et.target.dataset.id]=z[et.target.dataset.id]||{},z[et.target.dataset.id].value=et.target.value,re([...z]),qe(z,et.target.dataset.id)},Rt=et=>{z[et.target.dataset.id]=z[et.target.dataset.id]||{},z[et.target.dataset.id].value=et.target.value,re([...z]),Kt(z,et.target.dataset.id)};function qt(et,pn){return et.childNodes.forEach(It=>{var Vt;if(It.childNodes.length>0)qt(It,pn);else if(It.nodeName!=="IMG")if(It.innerHTML)It.innerHTML=(Vt=It.innerHTML)==null?void 0:Vt.replace(new RegExp(pn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const an=document.createElement("span");an.innerHTML=It.textContent.replace(new RegExp(pn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),It.replaceWith(an)}})}const $t=(0,ue.useRef)();Te.jb.WebkitLineClamp=pt,pt&&(en=rt(rt({},en),Te.jb));function kt(et){let pn=et.target;if(pn.tagName.toUpperCase()==="A"){let It=pn.getAttribute("href");if(It.indexOf("office")>-1)et.preventDefault(),ft(It),te("office");else if(It.indexOf("application/pdf")>-1)et.preventDefault(),ft(It),te("pdf");else if(It.indexOf("text/html")>-1)et.preventDefault(),ft(It),te("html");else if(It.startsWith("#")){et.preventDefault();let Vt=document.getElementById(It.replace("#",""));Vt&&Vt.scrollIntoView(!0)}}}const hn=()=>{var et;const pn=(et=$t.current)==null?void 0:et.querySelectorAll("video");pn==null||pn.forEach(It=>{if(It.oncontextmenu=()=>!1,It.src.indexOf(".m3u8")>-1&&!It.canPlayType("application/vnd.apple.mpegurl")){if(pe.ZP.isSupported()){var Vt=new pe.ZP;Vt.loadSource(It.src),Vt.attachMedia(It)}}})};(0,ue.useEffect)(()=>{if($t.current&&dt&&dt.match(Ge)&&window.PR.prettyPrint(),$t.current)return $t.current.addEventListener("click",kt),()=>{var et;(et=$t.current)==null||et.removeEventListener("click",kt),(0,Te.AL)(),(0,Te.Iy)()}},[dt,$t.current,kt]);const jt=et=>{et.target.nodeName==="IMG"&&et.target.className.indexOf("draw-flowchart")>-1?(Lt.current.style.zIndex=1,Lt.current.style.display="flex",Lt.current.style.width=et.target.clientWidth+"px",Lt.current.style.height=et.target.clientHeight+"px",Lt.current.style.top=et.target.offsetTop+"px",Lt.current.style.left=et.target.offsetLeft+"px",et.target.id&&(Oe.current=et.target.id)):Lt.current.style.display="none"},tn=()=>{Lt.current.style.display="none"};return(0,ue.useEffect)(()=>{var et;const pn=It=>{It.preventDefault(),It.clipboardData.setData("text",window.getSelection().toString())};return(et=$t.current)==null||et.addEventListener("copy",pn),()=>{var It;(It=$t.current)==null||It.removeEventListener("copy",pn)}},[$t.current]),ue.createElement("div",{style:{position:"relative"},onMouseLeave:tn},Ot&&ue.createElement("div",{ref:$t,className:`${ke.mdBody} `},dt),!Ot&&!be(dt)&&ue.createElement("div",{ref:$t,style:rt({},en),onMouseOver:jt,className:`${Je||""} ${Gt?"disabled-fill":""} markdown-body ${ke.mdBody} ${le.current}`,dangerouslySetInnerHTML:{__html:dt}}),!Ot&&be(dt)&&ue.createElement(Ce,{html:dt}),ue.createElement("div",{ref:Lt,className:`${ke.button} ${Pe?"":ke.previewFlowChart}`},ue.createElement(xe.Z,null,ue.createElement(fe.ZP,{onClick:()=>{Pe?Be(Oe.current):(ft(Oe.current),te("flowChart"))}},Pe?"\u7F16\u8F91":"\u9884\u89C8"))),ue.createElement(me.Z,{close:!0,data:ut,type:ut!=null&&ut.length?oe:"",style:rt({},Dt),onClose:()=>ft("")}))}},44905:function(xt,Et,de){"use strict";de.d(Et,{h:function(){return nt}});var ue=de(59301),Xe=de(82326),Te=de(28284),He=de(99571),pe=de(89780),ge=de.n(pe),Fe=de(66543),Ne=de(59598),xe=Object.defineProperty,fe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Ce=(Ve,rt,$e)=>rt in Ve?xe(Ve,rt,{enumerable:!0,configurable:!0,writable:!0,value:$e}):Ve[rt]=$e,De=(Ve,rt)=>{for(var $e in rt||(rt={}))Ue.call(rt,$e)&&Ce(Ve,$e,rt[$e]);if(me)for(var $e of me(rt))Le.call(rt,$e)&&Ce(Ve,$e,rt[$e]);return Ve},ke=(Ve,rt)=>fe(Ve,je(rt));const Ye=Xe.default.Option,tt={labelCol:{span:4},wrapperCol:{span:20}},it={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"]};Et.Z=({callback:Ve,onCancel:rt})=>{const[$e,Ht]=(0,ue.useState)("python");function Ge(ot){Ht(it[ot][1])}function _e(ot){Ve(ot)}return ue.createElement(Te.default,ke(De({},tt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:_e,style:{width:500}}),ue.createElement(Te.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ue.createElement(Xe.default,{getPopupContainer:ot=>ot.parentNode,onChange:Ge},Object.keys(it).map(ot=>ue.createElement(Ye,{key:ot,value:ot},it[ot][0])))),ue.createElement(Te.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ue.createElement(nt,{mode:$e})),ue.createElement("div",{className:"flex-container flex-end"},ue.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ue.createElement(He.ZP,{type:"ghost",onClick:rt},"\u53D6\u6D88")))};function nt({value:Ve,onChange:rt,mode:$e,options:Ht={}}){const Ge=(0,ue.useRef)(),[_e,ot]=(0,ue.useState)();return(0,ue.useEffect)(()=>{if(_e){let Se=function(We){const Pe=We.getValue();rt&&rt(Pe)};return _e.on("change",Se),()=>{_e.off("change",Se)}}},[_e,rt]),(0,ue.useEffect)(()=>{_e&&_e.setOption("mode",$e)},[_e,$e]),(0,ue.useEffect)(()=>{_e&&(Ve!==_e.getValue()||Ve==="")&&setTimeout(()=>{_e.setValue(Ve||"")},300)},[_e,Ve]),(0,ue.useEffect)(()=>{if(Ge.current&&!_e){const Se=ge().fromTextArea(Ge.current,De({mode:$e,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ht));ot(Se)}},[Ge.current,_e]),ue.createElement("div",{className:"my-codemirror-container"},ue.createElement("textarea",{ref:Ge}))}},2978:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return ki}});var ue=de(59301),Xe=de(76560),Te=de(89780),He=de.n(Te),pe=de(76374),ge=de(66543),Fe=de(6313),Ne=de(25717),xe=de(99498),fe=de(25419),je=de(67549),me=de(38394),Ue=({value:rn="",className:dn,showTextOnly:gn,showLines:En,style:$n={}})=>{const oi=(0,ue.useMemo)(()=>"",[rn]);return ue.createElement(ue.Fragment,null,ue.createElement("div",{dangerouslySetInnerHTML:{__html:oi}}))},Le=Object.defineProperty,Ce=Object.defineProperties,De=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,it=(rn,dn,gn)=>dn in rn?Le(rn,dn,{enumerable:!0,configurable:!0,writable:!0,value:gn}):rn[dn]=gn,nt=(rn,dn)=>{for(var gn in dn||(dn={}))Ye.call(dn,gn)&&it(rn,gn,dn[gn]);if(ke)for(var gn of ke(dn))tt.call(dn,gn)&&it(rn,gn,dn[gn]);return rn},Ve=(rn,dn)=>Ce(rn,De(dn));let rt=[{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:rn,title:dn,icon:gn,actionName:En,className:$n="",children:oi}){function yi(){rn(En)}return ue.createElement("a",{title:dn,className:$n,onClick:yi},ue.createElement("i",{className:`${gn}`}),oi)}var Ht=({watch:rn,showNullButton:dn,showNullProgramButton:gn,onActionCallback:En,fullScreen:$n,insertTemp:oi,hidetoolBar:yi,extraUse:Zn})=>{const Nn=[...rt,{title:`${rn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${rn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ue.createElement("ul",{className:"markdown-toolbar-container"},!yi&&Nn.map((Ei,At)=>ue.createElement("li",{key:At},Ei.actionName?ue.createElement($e,Ve(nt({},Ei),{onActionCallback:En})):ue.createElement("span",{className:"v-line"}))),dn?ue.createElement("li",null,ue.createElement($e,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:En},ue.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,gn?ue.createElement(ue.Fragment,null,ue.createElement("li",null,ue.createElement($e,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:En},ue.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ue.createElement("li",null,ue.createElement($e,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:En},ue.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,oi&&ue.createElement("li",null,ue.createElement($e,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${oi}`,onActionCallback:En},ue.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Zn&&ue.createElement("li",null,Zn),ue.createElement("li",{className:"btn-full-screen"},ue.createElement($e,{icon:`${$n?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:$n?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:En})))},Ge=de(75790),_e=de(28284),ot=de(37568),Se=de(99571),We=Object.defineProperty,Pe=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Dt=(rn,dn,gn)=>dn in rn?We(rn,dn,{enumerable:!0,configurable:!0,writable:!0,value:gn}):rn[dn]=gn,ve=(rn,dn)=>{for(var gn in dn||(dn={}))pt.call(dn,gn)&&Dt(rn,gn,dn[gn]);if(Ot)for(var gn of Ot(dn))en.call(dn,gn)&&Dt(rn,gn,dn[gn]);return rn},he=(rn,dn)=>Pe(rn,Je(dn));const at={labelCol:{span:4},wrapperCol:{span:20}};var Gt=({callback:rn,onCancel:dn})=>{function gn(En){rn(En)}return ue.createElement(_e.default,he(ve({},at),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:gn,style:{width:500}}),ue.createElement(_e.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ue.createElement(ot.default,null)),ue.createElement(_e.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ue.createElement(ot.default,null)),ue.createElement("div",{className:"flex-container flex-end"},ue.createElement(Se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ue.createElement(Se.ZP,{type:"ghost",onClick:dn},"\u53D6\u6D88")))},mt=de(44905),Be=de(45596),Ke=de(62957),qe=de(77019),Kt=de(6077),st=de(59301),Lt=({callback:rn,onCancel:dn})=>{const gn=document.createElement("canvas"),En=gn.getContext("2d");gn.width=1e3,gn.height=800,En.fillStyle="#ffffff",En.fillRect(0,0,gn.width,gn.height);const $n=gn.toDataURL("image/png");return st.createElement(Ke.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},st.createElement(qe.Z,{style:{height:"100vh"}},st.createElement(Kt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:$n,visible:!0,title:String(Date.now())},onOk:oi=>{rn({src:oi.url})},onClose:dn})))},Oe=de(30641),ut=de(5269),ft=de(6767),oe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},te=de(59301),re=(0,ue.forwardRef)(({onCancel:rn,editImgId:dn,callback:gn},En)=>{let $n=(0,ue.useRef)(),oi=(0,ue.useRef)(),yi=(0,ue.useRef)(),Zn=(0,ue.useRef)(!1);const Nn=(0,ue.useRef)(!1);console.log("ref:",En);const[Ei,At]=(0,ue.useState)(0),[Qe,Ut]=(0,ue.useState)("100vh");return(0,ue.useEffect)(()=>{At(1)},[]),(0,ue.useImperativeHandle)(En,()=>({setHeight:Ut})),te.createElement("div",{ref:Nn,className:"body-overflow-initial"},te.createElement(Oe.Z,{width:"100vw",height:Qe,footer:null,closable:!0,placement:"bottom",open:!!Ei,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${oe.drawerWrap}`,onClose:()=>{window.saveDrawData(Sn=>{gn({src:`/api/attachments/${Sn}`,id:Sn})})},title:te.createElement(qe.Z,{align:"middle"},te.createElement(ut.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),te.createElement(ut.Z,{onClick:()=>{Ut(Qe==="60px"?"100vh":"60px")}},te.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),te.createElement(ut.Z,{onClick:()=>{window.saveDrawData(Sn=>{if(Sn===null){ft.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}ft.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),gn({src:`/api/attachments/${Sn}`,id:Sn,disabledClose:!0})})}},te.createElement(Se.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},te.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${dn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:oi})))}),le=de(90524),ne=de(47889),be=de(71051);const Ze=ne.ZP.Group,St={margin:"0 8px"};var gt=({callback:rn,onCancel:dn})=>{function gn(En){rn(En)}return ue.createElement(_e.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:gn},ue.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ue.createElement("span",{style:St},"\u5355\u5143\u683C\u6570\uFF1A"),ue.createElement("span",{style:St},"\u884C\u6570"),ue.createElement(_e.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ue.createElement(be.Z,null)),ue.createElement("span",{style:St},"\u5217\u6570"),ue.createElement(_e.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ue.createElement(be.Z,null))),ue.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ue.createElement("span",{style:St},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ue.createElement(_e.default.Item,{name:"align"},ue.createElement(Ze,null,ue.createElement(ne.ZP,{value:"default"},ue.createElement("i",{className:"fa fa-align-justify"})),ue.createElement(ne.ZP,{value:"left"},ue.createElement("i",{className:"fa fa-align-left"})),ue.createElement(ne.ZP,{value:"center"},ue.createElement("i",{className:"fa fa-align-center"})),ue.createElement(ne.ZP,{value:"right"},ue.createElement("i",{className:"fa fa-align-right"}))))),ue.createElement("div",{className:"flex-container flex-end"},ue.createElement(Se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ue.createElement(Se.ZP,{type:"ghost",onClick:dn},"\u53D6\u6D88")))},dt=de(71411),vt=de(11081),Wt=de.n(vt),qt=(0,ue.forwardRef)(({use3d:rn,width:dn,height:gn,callback:En,showSaveButton:$n},oi)=>{const yi=(0,ue.useRef)(),Zn=(0,ue.useRef)(),[Nn,Ei]=(0,ue.useState)(!1),At=(0,ue.useRef)({id:yi,appName:"graphing",width:dn||1e3,height:gn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ue.useEffect)(()=>{Zn.current=new(Wt())(At.current,!0),window.onload=function(){Zn.current.inject("applet_container")}},[]);const Qe=()=>{var Ut=window.ggbApplet.getPNGBase64(1,!0,72);return En&&En(Ut),Ut};return(0,ue.useEffect)(()=>{At.current.appName=Nn?"3D":"graphing",Zn.current.inject("applet_container")},[Nn]),(0,ue.useEffect)(()=>{Ei(rn)},[rn]),(0,ue.useImperativeHandle)(oi,()=>({getImgData:Qe})),ue.createElement(ue.Fragment,null,ue.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:yi}),ue.createElement(qe.Z,{align:"middle"},ue.createElement(ut.Z,{flex:1},ue.createElement(dt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Nn,onChange:Ut=>Ei(Ut)})),ue.createElement(ut.Z,null,ue.createElement(Se.ZP,{size:"large",onClick:Qe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),$t=de(88615);const kt="link",hn="upload-image",jt="add-flowchart",tn="draw-image",et="add-flowchart",pn="code-block",It="add-table",Vt="------------",an={default:Vt,left:`:${Vt}`,center:`:${Vt}:`,right:`${Vt}:`};var Pn=de(17904),sn=de(49661);function mn(){}let ni=0;const Vn=1e4,zi="\u2581",Hi="@\u2581\u2581@",xi="@\u2581@",gi=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Wn=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function ri(rn){return/^\d+$/.test(rn)?`${rn}px`:rn}const In=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ii={[In+"-B"]:"bold",[In+"-I"]:"italic"},Un={[kt]:"\u6DFB\u52A0\u94FE\u63A5",[pn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[hn]:"\u6DFB\u52A0\u56FE\u7247",[tn]:"\u6DFB\u52A0\u753B\u56FE",[jt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[It]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var ki=({defaultValue:rn="",onChange:dn,width:gn="100%",height:En=400,miniToolbar:$n=!1,isFocus:oi=!1,watch:yi,insertTemp:Zn,mode:Nn="markdown",id:Ei="markdown-editor-id",showResizeBar:At=!1,noStorage:Qe=!1,showNullButton:Ut=!1,showNullProgramButton:Sn=!1,hidetoolBar:jn=!1,fullScreen:Ee=!1,onBlur:Me,onCMBeforeChange:wt,onFullScreen:lt,className:Re="",disablePaste:ct=!1,disabled:Nt=!1,disabledFill:Qt=!1,placeholder:nn="",values:Mt="",extraUse:_t})=>{const[Ae,yn]=(0,ue.useState)(null),[Zt,fn]=(0,ue.useState)(rn),[ln,bn]=(0,ue.useState)(yi),[Mn,ci]=(0,ue.useState)(Ee),[Bn,Ln]=(0,ue.useState)(""),[ei,Tn]=(0,ue.useState)(0),[hi,Oi]=(0,ue.useState)(En),[ai,di]=(0,ue.useState)(!1),[Li,fi]=(0,ue.useState)(0),[Xn,Mi]=(0,ue.useState)(0),Jn=(0,ue.useRef)(),si=(0,ue.useRef)(),pi=(0,ue.useRef)(),wi=(0,ue.useRef)(),li=(0,ue.useRef)(),Kn=(0,ue.useRef)(),zn=(0,Xe.useDispatch)();(0,ue.useEffect)(()=>{const Tt=window.scrollY||window.pageYOffset;fn(Mt),Ae==null||Ae.setValue(Mt),window.scrollTo(0,Tt)},[Mt]),(0,ue.useEffect)(()=>{lt==null||lt(Mn)},[Mn]),(0,ue.useEffect)(()=>{if(Jn.current){let Tt=function(Ft,zt){var Dn;if(ct){zt.preventDefault();return}const Fn=zt.clipboardData;if(Fn){const bi=Fn.types.toString(),_n=Fn.items;if(bi==="Files"||Fn.types.indexOf("Files")>-1){if(zt.preventDefault(),Nn=="stex")return;try{let Qn=_n[1];((Dn=_n[0])==null?void 0:Dn.kind)==="file"&&(Qn=_n[0]);const Ai=Qn.getAsFile(),ji=Ai.name.split(".").pop();(0,Be.I)(Ai,vi=>{var Yi,Di,hr;vi.id?((Yi=Ai==null?void 0:Ai.type)==null?void 0:Yi.indexOf("image"))>-1?bt.replaceSelection(`<img width="100%" src="/api/attachments/${vi.id}?type=${vi.content_type})" alt="" />`):((Di=Ai==null?void 0:Ai.type)==null?void 0:Di.indexOf("video"))>-1?bt.replaceSelection(`<video width="100%" controls src="/api/attachments/${vi.id}"></video>`):((hr=Ai==null?void 0:Ai.type)==null?void 0:hr.indexOf("pdf"))>-1?bt.replaceSelection(`<a href="/api/attachments/${vi.id}?type=${Ai.type}&disposition=inline" target="_blank">${Ai.name}</a>`):Wn.includes(ji)?bt.replaceSelection(`<a href="/api/attachments/${vi.id}?type=office&disposition=inline" target="_blank">${Ai.name}</a>`):bt.replaceSelection(`[${Ai.name}](/api/attachments/${vi.id}?type=${vi.content_type})`):(vi==null?void 0:vi.status)===401&&(document.location.href="/user/login")})}catch(Qn){ft.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const bt=He().fromTextArea(Jn.current,{mode:Nn,lineNumbers:!$n,lineWrapping:!0,value:rn,autoCloseTags:!0,autoCloseBrackets:!0});return bt.on("keyup",function(Ft,zt){zt.keyCode===8&&(Ft.getValue()==""?bt.setOption("placeholder",nn):bt.setOption("placeholder",null))}),bt.on("keydown",function(Ft,zt){if(zt.keyCode===8){var Dn=Zi(Ft);Dn&&zt.preventDefault()}}),oi&&bt.focus(),bt.on("paste",Tt),Nt&&bt.on("beforeChange",function(Ft,zt){(zt.origin==="paste"||zt.origin==="+input")&&zt.cancel()}),yn(bt),()=>{bt.off("paste",Tt)}}},[]);const Ti=(0,ue.useCallback)(()=>{if(si.current)try{}catch(Tt){console.log(Tt,"---- to set md editor body height")}},[hi,si,Mn]);(0,ue.useEffect)(()=>{function Tt(){let bt=new pe.Z(Ft=>{for(let zt of Ft)(zt.target.offsetHeight>0||zt.target.offsetWidth>0)&&(Ti(),Ae.setSize("100%","100%"),Ae.refresh())});return bt.observe(Jn.current.parentElement),bt}if(Ae){const bt=Tt();return()=>{var Ft,zt;(Ft=Jn.current)!=null&&Ft.parentElement&&bt.unobserve((zt=Jn.current)==null?void 0:zt.parentElement)}}},[Ae,Ti]),(0,ue.useEffect)(()=>{if(Ae){let Tt=[];for(const[bt,Ft]of Object.entries(ii)){let zt={[bt]:()=>{Gi(Ft)}};Tt.push(zt),Ae.addKeyMap(zt)}return()=>{for(let bt of Tt)Ae.removeKeyMap(bt)}}},[Ae]),(0,ue.useEffect)(()=>{Ee!==Mn&&ci(Ee)},[Ee]),(0,Pn.Z)(()=>{if(!Qe&&ei>0){let Tt=new Date().getTime(),bt=window.sessionStorage.getItem(Ei);Tt>=ei+Vn&&(!bt||bt!==Zt)&&(window.sessionStorage.setItem(Ei,Zt),di(!0))}},Vn),(0,ue.useEffect)(()=>{bn(yi)},[Ae,yi]),(0,ue.useEffect)(()=>{Ae&&oi&&Ae.focus()},[Ae,oi]),(0,ue.useEffect)(()=>{if(ln&&Ae){let Tt=function(Ft){let zt=Ft.target;if(wi.current){let Dn=zt.scrollTop/zt.scrollHeight;wi.current.scrollTop=wi.current.scrollHeight*Dn}};const bt=Ae.getScrollerElement();return bt.addEventListener("scroll",Tt),()=>{bt.removeEventListener("scroll",Tt)}}},[Ae,ln]),(0,ue.useEffect)(()=>{if(Ae&&wt){let Tt=function(bt,Ft){wt(bt,Ft)};return Ae.on("beforeChange",Tt),()=>{Ae.off("beforeChange",Tt)}}},[Ae,wt]),(0,ue.useEffect)(()=>{if(Ae&&Me){let Tt=function(){Me(Ae.getValue())};return Ae.on("blur",Tt),()=>{Ae.off("blur",Tt)}}},[Ae,Me]);function Zi(Tt,bt){var Ft=Tt.getDoc(),zt=Ft.getCursor(),Dn=Ft.getLine(zt.line),Fn=Dn.charAt(zt.ch-1),bi=Dn.lastIndexOf("@\u2581@",zt.ch),_n=Dn.lastIndexOf("@\u2581\u2581@",zt.ch),Qn=bi>_n?bi:_n,Ai=bi>_n?3:4;if(Hi.indexOf(Fn)===-1)return null;if(console.log("change1:",bt,Tt,Dn,zt,Qn,bi,_n,Fn),Qn>=0&&zt.ch-Qn<5){var ji=Qn+Ai;return Ft.replaceRange("",{line:zt.line,ch:Qn},{line:zt.line,ch:ji}),{line:zt.line,ch:ji}}return null}(0,ue.useEffect)(()=>{if(Ae){let Tt=function(bt,Ft){const zt=bt.getValue();fn(zt),Tn(new Date().getTime()),bt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),dn&&(Sn?dn(zt,Ct(zt)):dn(zt))};return Ae.on("change",Tt),()=>{Ae.off("change",Tt)}}},[Ae,dn]),(0,ue.useEffect)(()=>{if(Ae)if(rn==null)Ae.setValue(""),fn("");else{const Tt=window.scrollY||window.pageYOffset;rn!==Ae.getValue()&&(Ae.setValue(rn),fn(rn),Ae.setCursor(Nt?1:Ae.lineCount(),0),window.scrollTo(0,Tt))}},[Ae,rn]);const Gi=(0,ue.useCallback)(Tt=>{const bt=Ae.getCursor(),Ft=Ae.getSelection();let zt=Ft.split(`
|
|
`);switch(Tt){case"bold":return Ae.replaceSelection("**"+Ft+"**"),Ft===""&&Ae.setCursor(bt.line,bt.ch+2),Ae.focus();case"italic":return Ae.replaceSelection("*"+Ft+"*"),Ft===""&&Ae.setCursor(bt.line,bt.ch+1),Ae.focus();case"code":return Ae.replaceSelection("`"+Ft+"`"),Ft===""&&Ae.setCursor(bt.line,bt.ch+1),Ae.focus();case"inline-latex":return(0,sn.Ye)(zn)?void 0:(Ln("inline-latex"),Ae.focus());case"latex":return Ae.replaceSelection("```latex\n"+Ft+"\n```"),Ae.setCursor(bt.line+1,Ft.length+1),Ae.focus();case"line-break":return Ae.replaceSelection(`<br/>
|
|
`),Ae.focus();case"list-ul":return Ft===""?Ae.replaceSelection("- "+Ft):Ae.replaceSelection(zt.map(Dn=>Dn===""?"":`- ${Dn}`).join(`
|
|
`)),Ae.focus();case"list-ol":return Ft===""?Ae.replaceSelection("1. "+Ft):Ae.replaceSelection(zt.map((Dn,Fn)=>Dn===""?"":`${Fn+1}. ${Dn}`).join(`
|
|
`)),Ae.focus();case"add-null-ch":return Ft===""&&Ae.setCursor(bt.line,bt.ch),Ae.replaceSelection(zi),Ae.focus();case"add-signal":return Ft===""&&Ae.setCursor(bt.line,bt.ch),Ae.replaceSelection(xi),Ae.focus();case"add-multiple":return Ft===""&&Ae.setCursor(bt.line,bt.ch),Ae.replaceSelection(Hi),Ae.focus();case"inster-template-1":return Ft===""&&Ae.setCursor(bt.line,bt.ch),Ae.replaceSelection(gi),Ae.focus();case"eraser":return Ae.setValue(""),Ae.focus();case"trigger-watch":return bn(!ln),Ae.focus();case"trigger-full-screen":return ci(!Mn),Ae.focus();case kt:Ln(kt);return;case pn:Ln(pn);return;case hn:Ln(hn);return;case tn:Ln(tn);return;case"maths-latex":if((0,sn.Ye)(zn))return;Ln("maths-latex");return;case jt:li.current="",sessionStorage.removeItem("file_id"),Ln(jt);return;case It:Ln(It);return;default:throw new Error}},[Ae,ln,Mn]),Yn=(0,ue.useCallback)((Tt,bt)=>{var Ft,zt,Dn,Fn,bi,_n;Tt!=null&&Tt.disabledClose||Ln("");const{src:Qn,alt:Ai,id:ji}=Tt||{};switch(Bn){case kt:const{title:zr,link:Ir}=Tt;return Ae.replaceSelection(`[${zr}](${Ir})`),Ae.focus();case pn:const{language:xr,content:mr}=Tt;return Ae.replaceSelection(["```"+xr,mr,"```"].join(`
|
|
`)),Ae.focus();case"maths-latex":for(var vi=atob(Tt),Yi=new Uint8Array(vi.length),Di=0;Di<vi.length;Di++)Yi[Di]=vi.charCodeAt(Di);var hr=new Blob([Yi],{type:"image/png"});(0,Be.I)(hr,dr=>{dr.id?Ae.replaceSelection(``):(dr==null?void 0:dr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,sn.Ye)(zn))return;Ae.replaceSelection("`$$"+Tt+"$$`");break;case et:if(!ji)return;Ae.getValue().indexOf(Qn)===-1?Ae.replaceSelection(`<center><img id="${ji}" width="80%" src="${Qn}" class="draw-flowchart" alt="${Ai||""}" /></center>`):document.getElementById(ji).src=le.Z.API_SERVER+Qn+"?t="+Date.now();break;case hn:case tn:const Ci=bt,wr=(Dn=(zt=(Ft=Ci==null?void 0:Ci.name)==null?void 0:Ft.split("."))==null?void 0:zt.pop)==null?void 0:Dn.call(zt);return((Fn=Ci==null?void 0:Ci.type)==null?void 0:Fn.indexOf("image"))>-1||!(Ci!=null&&Ci.type)?Ci!=null&&Ci.align||Ci!=null&&Ci.width?Ae.replaceSelection(`<p style="text-align:${Ci.align||"initial"}"><img width="${Ci.width?Ci.width+"%":"initial"}" src="${Qn}" alt="${Ai||""}" /></p>`):Ae.replaceSelection(`<img width="100%" src="${Qn}" alt="${Ai||""}" />`):((bi=Ci==null?void 0:Ci.type)==null?void 0:bi.indexOf("video"))>-1?Ae.replaceSelection(`<video width="100%" controls src="${Qn}"></video>`):((_n=Ci==null?void 0:Ci.type)==null?void 0:_n.indexOf("pdf"))>-1?Ae.replaceSelection(`<a href="${Qn}?type=${Ci.type}&disposition=inline" target="_blank">${Ci.name}</a>`):Wn.includes(wr)?Ae.replaceSelection(`<a href="${Qn}?type=office&disposition=inline" target="_blank">${Ci.name}</a>`):Ae.replaceSelection(`[${Ci.name}](${Qn})`),Ae.focus();case It:const{row:eo,col:Xi,align:Nr}=Tt;let Xr=`
|
|
`;for(let dr=0;dr<eo;dr++){let ao=[],Rr=[];for(let Ii=0;Ii<Xi;Ii++)dr===1&&Rr.push(an[Nr]),ao.push(" ");dr===1&&(Xr+=`| ${Rr.join(" | ")} |
|
|
`),Xr+=`| ${ao.join(Xi===1?"":" | ")} |
|
|
`}return Ae.replaceSelection(Xr+`
|
|
`),Ae.focus();default:throw new Error}},[Ae,Bn]),ar=(0,ue.useMemo)(()=>{switch(Bn){case kt:return ue.createElement(Gt,{callback:Yn,onCancel:ti});case pn:return ue.createElement(mt.Z,{callback:Yn,onCancel:ti});case hn:return ue.createElement(Be.Z,{callback:Yn,onCancel:ti});case jt:return ue.createElement(re,{editImgId:li.current,callback:Yn,onCancel:ti});case It:return ue.createElement(gt,{callback:Yn,onCancel:ti});case"maths-latex":return ue.createElement(qt,{showSaveButton:!0,callback:Yn});case"inline-latex":return ue.createElement($t.Z,{showSaveButton:!0,callback:Yn});default:return null}},[Bn]);function ti(){Ln("")}(0,ue.useEffect)(()=>{if(pi.current){let Tt=function(bi){Dn=!0,Fn=bi.pageY},bt=function(){Dn=!1},Ft=function(bi){if(Dn){let _n=bi.pageY-Fn;_n<0&&(_n=0),_n>300&&(_n=300);let Qn=En+_n+"px";Oi(Qn)}},zt=pi.current,Dn=!1,Fn=0;return zt.addEventListener("mousedown",Tt),document.addEventListener("mousemove",Ft),document.addEventListener("mouseup",bt),()=>{zt.removeEventListener("mousedown",Tt),document.removeEventListener("mousemove",Ft),document.removeEventListener("mouseup",bt)}}},[Ae,pi]),(0,ue.useEffect)(()=>{Oi(En)},[En]);const sr=ri(gn),tr=ri(hi),Fi={width:sr,height:tr},Rn=(0,ue.useMemo)(()=>{if(ei){let Tt=new Date(ei),bt=Tt.getHours(),Ft=Tt.getMinutes(),zt=Tt.getSeconds();return bt=bt<10?"0"+bt:bt,Ft=Ft<10?"0"+Ft:Ft,zt=zt<10?"0"+zt:zt,`${bt}:${Ft}:${zt}`}return 0},[ei]),Ct=Tt=>{const bt=[];if(Sn){let Ft=-1;Tt=Tt.replace(/(@▁▁@|@▁@)/g,function(zt,Dn,Fn){bt.push({multiLine:zt!==xi})})}return bt};function Pt(){window.sessionStorage.removeItem(Ei),di(!1),Tn(0)}function un(){di(!1),Tn(0),Ae.setValue(window.sessionStorage.getItem(Ei))}(0,ue.useEffect)(()=>{Un[Bn]&&Bn!==tn&&Bn!==jt&&setTimeout(()=>{const Tt=document.getElementsByClassName("markdown-popup-form")[0],bt=window.innerWidth/2-Tt.offsetWidth/2,Ft=window.innerHeight/2-Tt.offsetHeight/2;fi(bt),Mi(Ft)},0)},[Bn]);const Yt=Tt=>{Tt.preventDefault();const bt=Tt.clientX-Li,Ft=Tt.clientY-Xn;document.body.onmousemove=zt=>{let Dn=zt.clientX-bt,Fn=zt.clientY-Ft;const bi=document.getElementsByClassName("markdown-popup-form")[0],_n=window.innerWidth-bi.offsetWidth,Qn=window.innerHeight-bi.offsetHeight;Dn=Math.max(0,Math.min(Dn,_n)),Fn=Math.max(0,Math.min(Fn,Qn)),xn(zt.clientX,zt.clientY,bt,Ft)&&(fi(Dn),Mi(Fn))},document.body.onmouseup=function(){document.body.onmousemove=null}},xn=(Tt,bt,Ft,zt)=>{const Dn=document.body.clientHeight,Fn=document.body.clientWidth;return Tt<20&&Ft>Tt||Tt>Fn-20&&Ft<Tt||bt<20&&zt>bt||bt>Dn-20&&zt<bt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ue.createElement(ue.Fragment,null,ue.createElement("div",{className:"markdown-editor-wrapper",ref:si},ue.createElement("div",{className:`markdown-editor-container ${Re} ${ln?"on-preview":""} ${$n?"mini":""} ${Mn?"full-screen":""}`,style:Fi},ue.createElement(Ht,{insertTemp:Zn,watch:ln,fullScreen:Mn,showNullButton:Ut,showNullProgramButton:Sn,onActionCallback:Gi,hidetoolBar:jn,extraUse:_t}),ue.createElement("div",{className:"markdown-editor-body"},ue.createElement("div",{className:"codemirror-container"},ue.createElement("textarea",{ref:Jn,placeholder:nn})),ln?ue.createElement("div",{ref:wi,className:"preview-container"},Nn==="stex"&&ue.createElement(Ue,{value:Zt}),Nn!=="stex"&&ue.createElement(me.Z,{edit:!0,disabledFill:Qt,showProgramFill:Sn,value:Zt,openEditor:Tt=>{var bt;li.current=Tt,(bt=Kn.current)==null||bt.setHeight("100vh"),setTimeout(()=>{Ln("add-flowchart")},150)}})):null))),At?ue.createElement("a",{ref:pi,className:"editor-resize"}):null,Bn===tn&&ue.createElement(Lt,{callback:Yn,onCancel:ti}),Bn===jt&&ue.createElement(re,{ref:Kn,editImgId:li.current,callback:Yn,onCancel:ti}),ue.createElement(Ge.Z,null,Un[Bn]&&Bn!==tn&&Bn!==jt?ue.createElement(Ke.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Li,top:Xn},title:ue.createElement("div",{style:{cursor:"move"},onMouseDown:Yt},Un[Bn]),open:!0,onCancel:ti,footer:null,destroyOnClose:!0,width:Bn===jt?"1200px":null,height:Bn===jt?"80vh":null,className:"markdown-popup-form"},ar):null))}},45596:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return rt},I:function(){return Ht}});var ue=de(28284),Xe=de(6767),Te=de(37568),He=de(77736),pe=de(71051),ge=de(47889),Fe=de(99571),Ne=de(67303),xe=de(59301),fe=de(59301),je=Object.defineProperty,me=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ke=(Ge,_e,ot)=>_e in Ge?je(Ge,_e,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Ge[_e]=ot,Ye=(Ge,_e)=>{for(var ot in _e||(_e={}))Ce.call(_e,ot)&&ke(Ge,ot,_e[ot]);if(Le)for(var ot of Le(_e))De.call(_e,ot)&&ke(Ge,ot,_e[ot]);return Ge},tt=(Ge,_e)=>me(Ge,Ue(_e));const{useForm:it}=ue.default,nt={width:280,marginRight:10},Ve={labelCol:{span:5},wrapperCol:{span:19}};var rt=({callback:Ge,onCancel:_e})=>{const[ot]=it();let Se=(0,xe.useRef)();function We(Ot){Se.current.width=ot.getFieldValue("width"),Se.current.align=ot.getFieldValue("align"),Ge(Ot,Se.current)}function Pe(Ot,pt){if(Ot.status===-1){Xe.ZP.error(Ot.message);return}ot.setFieldsValue({src:`/api/attachments/${Ot.id}`,type:pt.type})}function Je(Ot){let pt=Ot.target.files[0];Se.current=pt,Ht(pt,Pe)}return fe.createElement(ue.default,tt(Ye({form:ot},Ve),{className:"upload-image-panel",onFinish:We,style:{width:470,overflow:"hidden"}}),fe.createElement(ue.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(ue.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(Te.default,{style:nt})),fe.createElement($e,{onFileChange:Je}))),fe.createElement(ue.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(Te.default,{style:{width:264}})),fe.createElement(ue.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(He.Z,null,fe.createElement(ue.default.Item,{name:"width",style:{margin:0}},fe.createElement(pe.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(ue.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(ge.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),fe.createElement("aside",null,fe.createElement(ue.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Fe.ZP,{type:"default",onClick:_e},"\u53D6\u6D88"))))};function $e({onFileChange:Ge}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Ge}))}function Ht(Ge,_e){if(!Ge)throw new String("\u6CA1\u6709\u6587\u4EF6");let ot=new FormData;ot.append("editormd-image-file",Ge),ot.append("file_param_name","editormd-image-file"),ot.append("byxhr","true");var Se=new window.XMLHttpRequest;Se.withCredentials=!0,Se.addEventListener("load",function(We){_e(JSON.parse(We.target.responseText),Ge)},!1),Se.addEventListener("error",function(We){console.error(We)},!1),Se.open("POST",`${Ne.KI}/api/attachments.json`),Se.send(ot)}},75790:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return Te}});var ue=de(59301),Xe=de(4676);class Te extends ue.Component{constructor(pe){super(pe);const ge=window.document;this.node=ge.createElement("div"),ge.body.appendChild(this.node)}render(){const{children:pe}=this.props;return(0,Xe.createPortal)(pe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(xt,Et,de){"use strict";de.d(Et,{SV:function(){return Lt},ZP:function(){return st}});var ue=de(59301),Xe=de(76374);const Te={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"]},He={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"]},pe={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},ge={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},Fe={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 Ne=de(53184),xe=de.n(Ne),fe=(Oe,ut,ft)=>new Promise((oe,te)=>{var z=ne=>{try{le(ft.next(ne))}catch(be){te(be)}},re=ne=>{try{le(ft.throw(ne))}catch(be){te(be)}},le=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);le((ft=ft.apply(Oe,ut)).next())});const je={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},me=(Oe,ut,ft,oe)=>{const te=ut.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:ft.lineNumber,endColumn:ft.column});return Array.from(new Set(te.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:Oe.languages.CompletionItemKind.Text,insertText:re,range:oe}))},Ue=(Oe,ut,ft,oe)=>{Oe.languages.registerCompletionItemProvider(ut,{provideCompletionItems(te,z){const re=te.getWordUntilPosition(z),le={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=te.getLineContent(z.lineNumber).substring(re.startColumn-2,re.endColumn);return{suggestions:[...me(Oe,te,z,le),...ft.map(Ze=>({label:Ze,kind:Oe.languages.CompletionItemKind.Keyword,documentation:Ze,insertText:Ze,insertTextRules:Oe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le})),...oe.map(Ze=>({label:Ze.label,kind:Oe.languages.CompletionItemKind.Snippet,documentation:Ze.content,insertText:ne.startsWith("#")?Ze.content.replace(/#/,""):Ze.content,insertTextRules:Oe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le}))]}}})};var Le=Oe=>{je.languages.forEach(ut=>{Oe.languages.registerDocumentFormattingEditProvider(ut,{provideDocumentFormattingEdits(ft){return fe(this,null,function*(){const oe=xe()(ft.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:ft.getFullModelRange(),text:oe}]})}})}),Ue(Oe,"java",He.keywords,He.quickKey),Ue(Oe,"cpp",pe.keywords,pe.quickKey),Ue(Oe,"c",Te.keywords,[]),Ue(Oe,"python",ge.keywords,ge.quickKey),Ue(Oe,"scala",Fe.keywords,Fe.quickKey)};const Ce="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var De=Object.defineProperty,ke=(Oe,ut,ft)=>ut in Oe?De(Oe,ut,{enumerable:!0,configurable:!0,writable:!0,value:ft}):Oe[ut]=ft,Ye=(Oe,ut,ft)=>ke(Oe,typeof ut!="symbol"?ut+"":ut,ft);const tt=class _l{constructor(ut,ft,oe){this.placeholder=ut,this.editor=ft,this.monaco=oe,ft.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return _l.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)}};Ye(tt,"ID","editor.widget.placeholderHint");var nt=tt,Ve=de(96236),rt=de(6767),$e=de(25399),Ht=de(89392),Ge=de(33796),_e=de(56102),ot=Object.defineProperty,Se=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,pt=(Oe,ut,ft)=>ut in Oe?ot(Oe,ut,{enumerable:!0,configurable:!0,writable:!0,value:ft}):Oe[ut]=ft,en=(Oe,ut)=>{for(var ft in ut||(ut={}))Je.call(ut,ft)&&pt(Oe,ft,ut[ft]);if(Pe)for(var ft of Pe(ut))Ot.call(ut,ft)&&pt(Oe,ft,ut[ft]);return Oe},Dt=(Oe,ut)=>Se(Oe,We(ut)),ve=(Oe,ut)=>{var ft={};for(var oe in Oe)Je.call(Oe,oe)&&ut.indexOf(oe)<0&&(ft[oe]=Oe[oe]);if(Oe!=null&&Pe)for(var oe of Pe(Oe))ut.indexOf(oe)<0&&Ot.call(Oe,oe)&&(ft[oe]=Oe[oe]);return ft},he=(Oe,ut,ft)=>new Promise((oe,te)=>{var z=ne=>{try{le(ft.next(ne))}catch(be){te(be)}},re=ne=>{try{le(ft.throw(ne))}catch(be){te(be)}},le=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);le((ft=ft.apply(Oe,ut)).next())});function at(Oe){return/^\d+$/.test(Oe)?`${Oe}px`:Oe}function Gt(){}let mt=!1;const Be={"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 Ke(Oe=[]){let ut=Oe;if(Array.isArray(Oe)){for(let ft=0;ft<Oe.length;ft++){let oe=Be[Oe[ft]];if(oe)return oe}return ut[0]}return Be[ut]||ut}let qe=null;const Kt=()=>he(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Oe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Oe)}});var st=Oe=>{var ut=Oe,{width:ft="100%",height:oe="100%",value:te,language:z="javascript",style:re={},options:le={},overrideServices:ne={},theme:be="vs-dark",onEditBlur:Ze,isCopy:St=!1,onSave:gt,autoHeight:dt=!1,forbidCopy:vt=!1,onChange:Wt=Gt,editorDidMount:Rt=Gt,onFocus:qt=Gt,onBreakPoint:$t=Gt,breakPointValue:kt=[],filename:hn="educoder.txt",errorLine:jt,errorContent:tn="",highlightLine:et,openBreakPoint:pn=!1,placeholder:It="",showMiniMap:Vt=!0}=ut,an=ve(ut,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Pn=(0,ue.useRef)(),sn=(0,ue.useRef)({}),mn=(0,ue.useRef)(),ni=(0,ue.useRef)(),Vn=(0,ue.useRef)([]),zi=(0,ue.useRef)(!1),Hi=(0,ue.useRef)(),xi=(0,ue.useRef)(),gi=(0,ue.useRef)(!1),[Wn,ri]=(0,ue.useState)(!1);function Ri(){let At;return Pn.current&&(At=new Xe.Z(Qe=>{for(let Ut of Qe)(Ut.target.offsetHeight>0||Ut.target.offsetWidth>0)&&sn.current.instance.layout()}),At.observe(Pn.current)),At}function In(){rt.ZP.warning({content:decodeURIComponent(Ce),key:"monaco-editor-tip"})}const ii=()=>{let At=sn.current.instance;if(te!=null&&At&&Wn){const Qe=At.getModel();Qe&&te!==Qe.getValue()&&(mt=!0,Qe.setValue(te),At.layout(),mt=!1)}};(0,ue.useEffect)(()=>{const At=Ge.Z.subscribe("formatDocument",Qe=>{var Ut;let Sn=sn.current.instance;(Ut=Sn==null?void 0:Sn.getAction)==null||Ut.call(Sn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Qe=>{Wt(Qe)},At},[]),(0,ue.useEffect)(()=>{var At;let Qe=sn.current.instance;ni.current&&clearTimeout(ni.current),ni.current=setTimeout(()=>{ii()},500),te&&(te!=null&&te.length)&&((At=Qe==null?void 0:Qe.updateOptions)==null||At.call(Qe,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,Wn,sn.current]),(0,ue.useEffect)(()=>{if(jt&&sn.current&&sn.current.instance){let Qe=sn.current.instance;Qe.changeViewZones(function(Ut){var Sn=document.createElement("div");Sn.style.padding="10px 20px",Sn.style.width="calc(100% - 20px)",Sn.className="my-error-line-wrp",Sn.innerHTML=tn,Ut.addZone({afterLineNumber:jt||11,heightInLines:3,domNode:Sn})});var At={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Qe.addOverlayWidget(At),Qe.revealPositionInCenter({lineNumber:20,column:1})}},[jt,sn.current,Wn]);const Un=(At="",Qe)=>{if(!At||At.trim()==="")return!0;const Sn=sn.current.instance.getModel().getLineTokens(Qe);let jn=!1;for(let Ee=0;Ee<2;Ee++)Sn.getStandardTokenType(Ee)===1&&(jn=!0);return jn};(0,ue.useEffect)(()=>{var At;const Qe=(At=sn.current)==null?void 0:At.instance;if(Qe&&Wn&&vt){const Ut=Qe.onDidBlurEditorWidget(()=>{gi.current=!1}),Sn=Qe.onDidFocusEditorText(()=>{gi.current=!0});return()=>{Ut.dispose(),Sn.dispose()}}},[sn.current,Wn,vt]),(0,ue.useEffect)(()=>{var At;if((At=sn.current)!=null&&At.instance&&Wn&&pn){let Qe=sn.current.instance,Ut=Qe.getModel();if(!Ut)return;(()=>{var Mt;let _t=[],Ae=[];const yn=Ut.getAllDecorations();for(let fn of yn)fn.options.className==="highlighted-line"&&(_t.push((Mt=fn==null?void 0:fn.range)==null?void 0:Mt.startLineNumber),Ae.push(fn==null?void 0:fn.id));if(et===_t[0])return;Ut.deltaDecorations(Ae,[]);const Zt=Ut.getLineCount();et&&et<=Zt&&(Qe.deltaDecorations([],[{range:new qe.Range(et,1,et,Ut.getLineMaxColumn(et)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Qe.revealLineInCenter(et))})();const jn=(Mt=!1)=>{var _t;let Ae=[],yn=[];const Zt=Ut.getAllDecorations();for(let fn of Zt)fn.options.linesDecorationsClassName==="breakpoints-select"&&(Ae.push((_t=fn==null?void 0:fn.range)==null?void 0:_t.startLineNumber),yn.push(fn==null?void 0:fn.id));if(Mt)return{lines:Ae,ids:yn};$t(Ae)},Ee=Mt=>he(void 0,null,function*(){let _t={range:new qe.Range(Mt,1,Mt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ut.deltaDecorations([],[_t]),jn()}),Me=Mt=>he(void 0,null,function*(){let _t=[];const Ae=Qe.getLineDecorations(Mt);for(let yn of Ae)yn.options.linesDecorationsClassName==="breakpoints-select"&&_t.push(yn.id);yield Ut.deltaDecorations(_t,[]),jn()}),wt=Mt=>{let _t=Qe.getLineDecorations(Mt);for(let Ae of _t)if(Ae.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ht.isEqual)(kt,jn(!0).lines)){Ut.deltaDecorations(jn(!0).ids,[]);const Mt=kt.map(_t=>({range:new qe.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ut.deltaDecorations([],Mt)}const lt=Qe.onDidChangeModelContent(Mt=>{let _t=Qe.getPosition();if(_t){let Ae=_t.lineNumber;clearTimeout(xi.current),xi.current=setTimeout(()=>{Un(Ut.getLineContent(Ae),Ae)?Me(Ae):wt(Ae)?(Me(Ae),Ee(Ae)):jn()},100)}}),Re=Qe.onMouseDown(Mt=>{var _t,Ae,yn;if(Mt.target.detail&&((yn=(Ae=(_t=Mt.target)==null?void 0:_t.element)==null?void 0:Ae.className)!=null&&yn.includes("line-numbers"))){let Zt=Mt.target.position.lineNumber;if(Un(Ut.getLineContent(Zt),Zt))return;wt(Zt)?Me(Zt):Ee(Zt)}}),ct=Mt=>{let _t={range:new qe.Range(Mt,1,Mt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Vn.current=Qe.deltaDecorations(Vn.current,[_t])},Nt=()=>{Vn.current=Qe.deltaDecorations(Vn.current,[])},Qt=Qe.onMouseMove(Mt=>{var _t,Ae,yn;if(Nt(),Mt.target.detail&&((yn=(Ae=(_t=Mt.target)==null?void 0:_t.element)==null?void 0:Ae.className)!=null&&yn.includes("line-numbers"))){let Zt=Mt.target.position.lineNumber;if(Un(Ut.getLineContent(Zt),Zt))return;ct(Zt)}}),nn=Qe.onMouseLeave(()=>{Nt()});return()=>{lt.dispose(),Re.dispose(),Qt.dispose(),nn.dispose()}}},[sn.current,Wn,kt,et,pn,z]),(0,ue.useEffect)(()=>{var At;(At=sn.current)!=null&&At.instance&&pn&&sn.current.instance.setPosition({lineNumber:0,column:0})},[et]);function ki(){let At=sn.current.instance;if(At){const Qe=At.getSelection(),Ut=sn.current.pastePos||{},Sn=new qe.Range(Ut.startLineNumber||Qe.endLineNumber,Ut.startColumn||Qe.endColumn,Ut.endLineNumber||Qe.endLineNumber,Ut.endColumn||Qe.endColumn);setTimeout(()=>{At.executeEdits("",[{range:Sn,text:""}])},300)}}function rn(At){(window.navigator.platform.match("Mac")?At.metaKey:At.ctrlKey)&&At.keyCode==83&&(At.preventDefault(),gt())}const dn=()=>{if(dt&&sn.current.instance){const At=sn.current.instance.getContentHeight();Nn(At<oe?oe:At)}else Nn(oe)};function gn(At){var Qe=document.createEvent("MouseEvents");Qe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),At.dispatchEvent(Qe)}const En=At=>{if(!gi.current)return;const{keyCode:Qe,ctrlKey:Ut,metaKey:Sn,target:jn,type:Ee}=At;return(Ee==="paste"||(Qe===67||Qe===86)&&(Sn||Ut))&&jn.nodeName==="TEXTAREA"&&(In(),At.preventDefault()),!1};function $n(At,Qe){var Ut=window.URL||window.webkitURL||window,Sn=new Blob([Qe]),jn=document.createElementNS("http://www.w3.org/1999/xhtml","a");jn.href=Ut.createObjectURL(Sn),jn.download=At,gn(jn)}(0,ue.useEffect)(()=>{dn()},[dn]),(0,ue.useEffect)(()=>{Pn.current&&!Wn&&Promise.all([de.e(8909),de.e(5028)]).then(de.bind(de,71448)).then(At=>{try{qe=At,sn.current.instance=qe.editor.create(Pn.current,{value:te,language:Ke(z),theme:be,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Vt||!1}},ne);const Qe=sn.current.instance;let jn=[...Ve.BH._menuItems].find(lt=>lt[0]._debugName=="EditorContext")[1],Ee=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Me=(lt,Re)=>{var ct,Nt;let Qt=lt._first;do Re.includes((Nt=(ct=Qt.element)==null?void 0:ct.command)==null?void 0:Nt.id)&<._remove(Qt);while(Qt=Qt.next)};if(Rt(Qe,qe),setTimeout(()=>{dn(),sn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{$n(hn||"educoder.txt",Qe.getValue())}})},500),sn.current.subscription=Qe.onDidChangeModelContent(lt=>{zi.current?clearTimeout(Hi.current):(dn(),Wt(Qe.getValue(),lt)),Hi.current=setTimeout(()=>{zi.current=!1},500)}),window.Monaco||Le(qe,Ke(z)),vt&&(Me(jn,Ee),Pn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",En),window.removeEventListener("paste",En),window.addEventListener("keydown",En),window.addEventListener("paste",En)),window.Monaco=qe,Ze&&Qe.onDidBlurEditorWidget(()=>{Ze(Qe.getValue())}),qt&&Qe.onDidFocusEditorText(()=>{vt&&Kt(),qt(Qe.getValue())}),vt){Kt();try{Qe.onDidPaste(lt=>{const Re=Qe.getSelection(),ct=sn.current.pastePos||{},Nt=new qe.Range(ct.startLineNumber||Re.endLineNumber,ct.startColumn||Re.endColumn,ct.endLineNumber||Re.endLineNumber,ct.endColumn||Re.endColumn);Qe.executeEdits("",[{range:lt.range,text:""}])})}catch(lt){}}let wt=Ri();return It&&typeof It=="string"&&new nt(It,Qe,qe),ri(!0),()=>{const lt=sn.current.instance;lt.dispose();const Re=lt.getModel();Re&&Re.dispose(),sn.current.subscription&&sn.current.subscription.dispose(),wt.unobserve(Pn.current)}}catch(Qe){}})},[]),(0,ue.useEffect)(()=>{if(sn.current.instance&&Wn)return document.addEventListener("keydown",rn,!1),()=>{document.removeEventListener("keydown",rn)}},[gt,Wn]),(0,ue.useEffect)(()=>{let At=sn.current.instance;if(At&&Wn){let Qe=Ke(z);qe.editor.setModelLanguage(At.getModel(),Qe)}},[z,Wn]),(0,ue.useEffect)(()=>{sn.current.instance&&Wn&&qe.editor.setTheme(be)},[be,Wn]),(0,ue.useEffect)(()=>{let At=sn.current.instance;mn.current=le,At&&Wn&&(At.updateOptions(en({},le)),setTimeout(()=>{At.getModel().updateOptions(en({},le))},200))},[JSON.stringify(le),Wn]),(0,ue.useEffect)(()=>{let At=sn.current.instance;At&&Wn&&At.layout()},[ft,oe,Wn]);const[oi,yi]=(0,ue.useState)(at(ft)),[Zn,Nn]=(0,ue.useState)(at(oe)),Ei=Dt(en({},re),{width:oi,height:Zn,position:"relative"});return ue.createElement("div",{className:"my-monaco-editor",ref:Pn,style:Ei},St&&ue.createElement(_e.CopyToClipboard,{text:te,onCopy:()=>rt.ZP.success("\u590D\u5236\u6210\u529F")},ue.createElement($e.Z,{title:"\u590D\u5236\u4EE3\u7801"},ue.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ue.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Lt({width:Oe="100%",height:ut="100%",original:ft,modified:oe,language:te,options:z={}}){const re=(0,ue.useRef)(),[le,ne]=(0,ue.useState)(null);function be(dt){let vt;return re.current&&(vt=new Xe.Z(Wt=>{for(let Rt of Wt)(Rt.target.offsetHeight>0||Rt.target.offsetWidth>0)&&dt.layout()}),vt.observe(re.current)),vt}(0,ue.useEffect)(()=>(re.current&&Promise.all([de.e(8909),de.e(9404)]).then(de.bind(de,2550)).then(dt=>{qe=dt;const vt=qe.editor.createDiffEditor(re.current,Dt(en({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},z),{wordWrap:!0}));ne(vt);let Wt=be(vt);return()=>{vt.dispose();const Rt=vt.getModel();Rt&&Rt.dispose(),Wt.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ue.useEffect)(()=>{le&&le.setModel({original:qe.editor.createModel(ft,te),modified:qe.editor.createModel(oe,te)})},[ft,oe,te,le]);const Ze=at(Oe),St=at(ut),gt={width:Ze,height:St};return ue.createElement("div",{className:"my-diff-editor",ref:re,style:gt})}},17904:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return Xe}});var ue=de(59301);function Xe(Te,He){const pe=(0,ue.useRef)();(0,ue.useEffect)(()=>{pe.current=Te}),(0,ue.useEffect)(()=>{function ge(){pe.current()}if(He!==null){let Fe=setInterval(ge,He);return()=>clearInterval(Fe)}},[He])}},38498:function(xt,Et,de){"use strict";de.r(Et),de.d(Et,{default:function(){return _e}});var ue=de(59301),Xe=de(76560),Te=de(20554),He=de(28284),pe=de(62957),ge=de(37568),Fe=de(2978),Ne=de(67135),xe={flex_box_center:"flex_box_center___Tn66_",flex_space_between:"flex_space_between___P50q5",flex_box_vertical_center:"flex_box_vertical_center___pL1pq",flex_box_center_end:"flex_box_center_end___dvJxR",flex_box_column:"flex_box_column___rEutz",bg:"bg___QHZnQ",formWrap:"formWrap___izBdR"},fe=de(34055),je=de(21693),me=de(84236),Ue=de(74543),Le=de(59301),Ce=Object.defineProperty,De=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,nt=(ot,Se,We)=>Se in ot?Ce(ot,Se,{enumerable:!0,configurable:!0,writable:!0,value:We}):ot[Se]=We,Ve=(ot,Se)=>{for(var We in Se||(Se={}))tt.call(Se,We)&&nt(ot,We,Se[We]);if(Ye)for(var We of Ye(Se))it.call(Se,We)&&nt(ot,We,Se[We]);return ot},rt=(ot,Se)=>De(ot,ke(Se)),$e=(ot,Se,We)=>new Promise((Pe,Je)=>{var Ot=Dt=>{try{en(We.next(Dt))}catch(ve){Je(ve)}},pt=Dt=>{try{en(We.throw(Dt))}catch(ve){Je(ve)}},en=Dt=>Dt.done?Pe(Dt.value):Promise.resolve(Dt.value).then(Ot,pt);en((We=We.apply(ot,Se)).next())});const{TabPane:Ht}=Te.default,Ge=({shixunsDetail:ot,dispatch:Se,practiceSetting:We})=>{var Pe,Je;const Ot=(0,Xe.useParams)(),[pt]=He.default.useForm(),[en,Dt]=(0,ue.useState)({}),{challengesNew:ve}=ot,he=(0,ue.useRef)(null),{selectQuestionParams:at,id:Gt,newQuestion:mt}=We,[Be,Ke]=(0,ue.useState)(!0);(0,ue.useEffect)(()=>{Ke(!0),Se({type:"shixunsDetail/getChallengesNew",payload:Ve({},Ot)}),Ke(!1)},[Ot]);const qe=(ut,ft=!1,oe=1)=>$e(void 0,null,function*(){var te;const z=Ve({},en),re=!(!ut.unity_3d_routes||ut.unity_3d_routes=="");z.identifier=Ot.id,z.st=1;const le=yield(0,Ne.al)(rt(Ve({},z),{unity_3d_routes:re?ut.unity_3d_routes:null,unity_3d:re,sync_origin_shixun:ft}));le.status===1&&((te=ot==null?void 0:ot.detail)!=null&&te.copy_for_exercise&&(0,je.m)(Se,ot,Ot.id,oe),Xe.history.replace(`/shixuns/${Ot.id}/edit/${le.challenge_id}/editquestion?tab=2`),setTimeout(()=>{Se({type:"practiceSetting/setParams",payload:{newQuestion:null}}),Se({type:"practiceSetting/setUpdateIndex"})},200))}),Kt=()=>{Oe()},st=ut=>{clearTimeout(he.current),he.current=setTimeout(()=>{"subject"in ut&&mt&&Se({type:"practiceSetting/setParams",payload:{newQuestion:{st:1,name:ut==null?void 0:ut.subject}}});const{subject:ft,task_pass:oe}=pt.getFieldsValue();ft!==""||oe!==(0,je.S)(ve.task_pass_default)?Se({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}):Se({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})},500)},Lt=ut=>{Dt(Ve({},pt.getFieldsValue())),st(ut)},Oe=()=>{var ut;const ft=()=>{Xe.history.push(`/shixuns/${Gt}/challenges`),Se({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};(ut=We==null?void 0:We.sideBar)!=null&&ut.confirmLeave?pe.default.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{ft()}}):ft()};return Le.createElement("section",{className:xe.bg},Le.createElement(Te.default,{activeKey:"1"},Le.createElement(Ht,{tab:"\u672C\u5173\u4EFB\u52A1",key:"1"},Le.createElement(He.default,{form:pt,className:xe.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:Lt,onFinish:qe},Le.createElement("div",{className:xe.fieldWrap},Le.createElement(He.default.Item,{initialValue:"",name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},Le.createElement(ge.default,{bordered:!1,maxLength:60,suffix:`${((Pe=en.subject)==null?void 0:Pe.length)||0}/60`,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),Le.createElement("div",{className:xe.mdWrap},Le.createElement(He.default.Item,{name:"task_pass",label:"\u8FC7\u5173\u4EFB\u52A1:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u6700\u5927\u9650\u523635000\u4E2A\u5B57\u7B26"}]},Le.createElement(Fe.Z,{watch:!0,defaultValue:ve.task_pass_default}))),(0,fe.ag)()&&Le.createElement("div",{className:xe.fieldWrap},Le.createElement(He.default.Item,{initialValue:"",name:"unity_3d_routes",label:"\u5D4C\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0:"},Le.createElement(ge.default,{bordered:!1,maxLength:60,suffix:`${((Je=en.unity_3d_routes)==null?void 0:Je.length)||0}/60`,placeholder:"\u8BF7\u8F93\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0\u5730\u5740"}))),Le.createElement(He.default.Item,{noStyle:!0},Le.createElement(me.t,{okButtonProps:{htmlType:"submit"},className:"customFixedButton",onCancel:Kt}))))),Le.createElement(Ue.Z,{loading:Be}))};var _e=(0,Xe.connect)(({shixunsDetail:ot,practiceSetting:Se})=>({shixunsDetail:ot,practiceSetting:Se}))(Ge)},74543:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return pe}});var ue=de(59301),Xe=de(29787),Te={loading:"loading___lueiN"},pe=({loading:ge})=>ge?ue.createElement("div",{className:Te.loading},ue.createElement(Xe.Z,null)):ue.createElement(ue.Fragment,null)},21693:function(xt,Et,de){"use strict";de.d(Et,{S:function(){return ge},m:function(){return Fe}});var ue=de(49661),Xe=de(6767),Te=de(62957),He=de(59301),pe=(Ne,xe,fe)=>new Promise((je,me)=>{var Ue=De=>{try{Ce(fe.next(De))}catch(ke){me(ke)}},Le=De=>{try{Ce(fe.throw(De))}catch(ke){me(ke)}},Ce=De=>De.done?je(De.value):Promise.resolve(De.value).then(Ue,Le);Ce((fe=fe.apply(Ne,xe)).next())});const ge=Ne=>{let xe=document.createElement("textarea");return xe.value=Ne,xe.value},Fe=(Ne,xe,fe,je,me)=>pe(void 0,null,function*(){var Ue,Le;const Ce=yield Ne({type:"shixunsDetail/saveCopyForExercise",payload:{id:fe,save_type:je}});je===1?((Ce==null?void 0:Ce.status)==0&&Xe.ZP.success("\u4FDD\u5B58\u6210\u529F"),(Ue=Ce==null?void 0:Ce.data)!=null&&Ue.exists_same_shixun_name?Ne({type:"classroomList/setActionTabs",payload:{key:"\u91CD\u540D\u4FEE\u6539",name:(Le=Ce==null?void 0:Ce.data)==null?void 0:Le.shixun_name}}):Ne({type:"classroomList/setActionTabs",payload:{}})):(Ne({type:"classroomList/setActionTabs",payload:{}}),(Ce==null?void 0:Ce.status)===0&&Te.default.info({title:"\u63D0\u793A",width:460,icon:null,centered:!0,content:He.createElement("div",null,He.createElement("div",null,"\u5B9E\u8BAD\u540C\u6B65\u4FEE\u6539\u5B8C\u6210\uFF0C\u8BF7\u9A8C\u8BC1\u5B9E\u8BAD\u662F\u5426\u53EF\u4EE5\u6B63\u5E38\u4F7F\u7528\u3002")),okText:"\u524D\u5F80\u539F\u5B9E\u8BAD",onOk:()=>{var De,ke;(0,ue.xg)(`/shixuns/${(ke=(De=xe==null?void 0:xe.detail)==null?void 0:De.fork_from)==null?void 0:ke.fork_identifier}/challenges`)}}))})},90290:function(xt,Et,de){"use strict";de.d(Et,{AL:function(){return nt},Iy:function(){return je},Qv:function(){return Le},ez:function(){return it},jb:function(){return me}});var ue=de(32834),Xe=de.n(ue),Te=de(11690),He=de.n(Te);let pe=1;function ge(Ge,_e){const ot=Ge.match(/^(\s+)(?:```)/);if(ot===null)return _e;const Se=ot[1];return _e.split(`
|
|
`).map(We=>{const Pe=We.match(/^\s+/);if(Pe===null)return We;const[Je]=Pe;return Je.length>=Se.length?We.slice(Se.length):We}).join(`
|
|
`)}let Fe=[],Ne=["<ul>"];const xe=new(Xe()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function je(){Fe.length=0,Ne=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ue(Ge,_e,ot,Se){if(_e>=Ge.length||Ge[_e].level<=ot)return _e;var We=Ge[_e];Se.push("<li><a href='#"+pe+We.anchor+"'>"+We.text+"</a>"),_e++;var Pe=[];return _e=Ue(Ge,_e,We.level,Pe),Pe.length>0&&(Se.push("<ul>"),Pe.forEach(function(Je){Se.push(Je)}),Se.push("</ul>")),Se.push("</li>"),_e=Ue(Ge,_e,ot,Se),_e}function Le(){return Ue(Fe,0,0,Ne),Ne.push("</ul>"),Ne.join("")}const Ce={heading(Ge){const _e=fe.exec(Ge);if(pe+=1,_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},fences(Ge){const _e=this.rules.block.fences.exec(Ge);if(_e){const ot=_e[0];let Se=ge(ot,_e[3]||"");const We=_e[2]?_e[2].trim():_e[2];if(["latex","katex","math"].indexOf(We)>=0){const Pe=Ye(),Je=Se;Se=Pe,tt[Pe]={type:"block",expression:Je}}return{type:"code",raw:ot,lang:We,text:Se}}}},De=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ke=0;const Ye=()=>`__special_katext_id_${ke++}__`;let tt={};function it(){return tt}function nt(){ke=0,tt={}}function Ve(Ge){return Ge=Ge.replace(De,(_e,ot)=>{const Se=Ye();return tt[Se]={type:"inline",expression:ot},Se}),Ge}const rt=xe.listitem;xe.listitem=function(Ge){return rt(Ve(Ge))};const $e=xe.paragraph;xe.paragraph=function(Ge){return $e(Ve(Ge))};const Ht=xe.tablecell;xe.tablecell=function(Ge,_e){return Ht(Ve(Ge),_e)},xe.code=function(Ge,_e,ot){const Se=(_e||"").match(/\S*/)[0];return Se?["latex","katex","math"].indexOf(Se)>=0?`<p class='editormd-tex'>${Ge}</p>`:`<pre class="prettyprint linenums"><code class="language-${_e}">${ot?Ge:(0,Te.escape)(Ge,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(ot?Ge:(0,Te.escape)(Ge,!0))+"</code></pre>"},xe.heading=function(Ge,_e,ot){let Se=this.options.headerPrefix+ot.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Fe.push({anchor:Se,level:_e,text:Ge}),"<h"+_e+' id="'+pe+Se+'">'+Ge+"</h"+_e+">"},Xe().setOptions({silent:!0,gfm:!0,pedantic:!1}),Xe().use({tokenizer:Ce,renderer:xe}),Et.ZP=Xe()},99498:function(xt,Et,de){(function(ue){ue(de(89780))})(function(ue){ue.defineOption("placeholder","",function(Ne,xe,fe){var je=fe&&fe!=ue.Init;if(xe&&!je)Ne.on("blur",pe),Ne.on("change",ge),Ne.on("swapDoc",ge),ue.on(Ne.getInputField(),"compositionupdate",Ne.state.placeholderCompose=function(){He(Ne)}),ge(Ne);else if(!xe&&je){Ne.off("blur",pe),Ne.off("change",ge),Ne.off("swapDoc",ge),ue.off(Ne.getInputField(),"compositionupdate",Ne.state.placeholderCompose),Xe(Ne);var me=Ne.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}xe&&!Ne.hasFocus()&&pe(Ne)});function Xe(Ne){Ne.state.placeholder&&(Ne.state.placeholder.parentNode.removeChild(Ne.state.placeholder),Ne.state.placeholder=null)}function Te(Ne){Xe(Ne);var xe=Ne.state.placeholder=document.createElement("pre");xe.style.cssText="height: 0; overflow: visible",xe.style.direction=Ne.getOption("direction"),xe.className="CodeMirror-placeholder CodeMirror-line-like";var fe=Ne.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),xe.appendChild(fe),Ne.display.lineSpace.insertBefore(xe,Ne.display.lineSpace.firstChild)}function He(Ne){setTimeout(function(){var xe=!1,fe=Ne.getInputField();fe.nodeName=="TEXTAREA"?xe=!fe.value:Ne.lineCount()==1&&(xe=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),xe?Te(Ne):Xe(Ne)},20)}function pe(Ne){Fe(Ne)&&Te(Ne)}function ge(Ne){var xe=Ne.getWrapperElement(),fe=Fe(Ne);xe.className=xe.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?Te(Ne):Xe(Ne)}function Fe(Ne){return Ne.lineCount()===1&&Ne.getLine(0)===""}})},25717:function(xt,Et,de){(function(ue){ue(de(89780))})(function(ue){var Xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Te=ue.Pos;ue.defineOption("autoCloseBrackets",!1,function(Ce,De,ke){ke&&ke!=ue.Init&&(Ce.removeKeyMap(pe),Ce.state.closeBrackets=null),De&&(ge(He(De,"pairs")),Ce.state.closeBrackets=De,Ce.addKeyMap(pe))});function He(Ce,De){return De=="pairs"&&typeof Ce=="string"?Ce:typeof Ce=="object"&&Ce[De]!=null?Ce[De]:Xe[De]}var pe={Backspace:xe,Enter:fe};function ge(Ce){for(var De=0;De<Ce.length;De++){var ke=Ce.charAt(De),Ye="'"+ke+"'";pe[Ye]||(pe[Ye]=Fe(ke))}}ge(Xe.pairs+"`");function Fe(Ce){return function(De){return me(De,Ce)}}function Ne(Ce){var De=Ce.state.closeBrackets;if(!De||De.override)return De;var ke=Ce.getModeAt(Ce.getCursor());return ke.closeBrackets||De}function xe(Ce){var De=Ne(Ce);if(!De||Ce.getOption("disableInput"))return ue.Pass;for(var ke=He(De,"pairs"),Ye=Ce.listSelections(),tt=0;tt<Ye.length;tt++){if(!Ye[tt].empty())return ue.Pass;var it=Ue(Ce,Ye[tt].head);if(!it||ke.indexOf(it)%2!=0)return ue.Pass}for(var tt=Ye.length-1;tt>=0;tt--){var nt=Ye[tt].head;Ce.replaceRange("",Te(nt.line,nt.ch-1),Te(nt.line,nt.ch+1),"+delete")}}function fe(Ce){var De=Ne(Ce),ke=De&&He(De,"explode");if(!ke||Ce.getOption("disableInput"))return ue.Pass;for(var Ye=Ce.listSelections(),tt=0;tt<Ye.length;tt++){if(!Ye[tt].empty())return ue.Pass;var it=Ue(Ce,Ye[tt].head);if(!it||ke.indexOf(it)%2!=0)return ue.Pass}Ce.operation(function(){var nt=Ce.lineSeparator()||`
|
|
`;Ce.replaceSelection(nt+nt,null),Ce.execCommand("goCharLeft"),Ye=Ce.listSelections();for(var Ve=0;Ve<Ye.length;Ve++){var rt=Ye[Ve].head.line;Ce.indentLine(rt,null,!0),Ce.indentLine(rt+1,null,!0)}})}function je(Ce){var De=ue.cmpPos(Ce.anchor,Ce.head)>0;return{anchor:new Te(Ce.anchor.line,Ce.anchor.ch+(De?-1:1)),head:new Te(Ce.head.line,Ce.head.ch+(De?1:-1))}}function me(Ce,De){var ke=Ne(Ce);if(!ke||Ce.getOption("disableInput"))return ue.Pass;var Ye=He(ke,"pairs"),tt=Ye.indexOf(De);if(tt==-1)return ue.Pass;for(var it=He(ke,"closeBefore"),nt=He(ke,"triples"),Ve=Ye.charAt(tt+1)==De,rt=Ce.listSelections(),$e=tt%2==0,Ht,Ge=0;Ge<rt.length;Ge++){var _e=rt[Ge],ot=_e.head,Se,We=Ce.getRange(ot,Te(ot.line,ot.ch+1));if($e&&!_e.empty())Se="surround";else if((Ve||!$e)&&We==De)Ve&&Le(Ce,ot)?Se="both":nt.indexOf(De)>=0&&Ce.getRange(ot,Te(ot.line,ot.ch+3))==De+De+De?Se="skipThree":Se="skip";else if(Ve&&ot.ch>1&&nt.indexOf(De)>=0&&Ce.getRange(Te(ot.line,ot.ch-2),ot)==De+De){if(ot.ch>2&&/\bstring/.test(Ce.getTokenTypeAt(Te(ot.line,ot.ch-2))))return ue.Pass;Se="addFour"}else if(Ve){var Pe=ot.ch==0?" ":Ce.getRange(Te(ot.line,ot.ch-1),ot);if(!ue.isWordChar(We)&&Pe!=De&&!ue.isWordChar(Pe))Se="both";else return ue.Pass}else if($e&&(We.length===0||/\s/.test(We)||it.indexOf(We)>-1))Se="both";else return ue.Pass;if(!Ht)Ht=Se;else if(Ht!=Se)return ue.Pass}var Je=tt%2?Ye.charAt(tt-1):De,Ot=tt%2?De:Ye.charAt(tt+1);Ce.operation(function(){if(Ht=="skip")Ce.execCommand("goCharRight");else if(Ht=="skipThree")for(var pt=0;pt<3;pt++)Ce.execCommand("goCharRight");else if(Ht=="surround"){for(var en=Ce.getSelections(),pt=0;pt<en.length;pt++)en[pt]=Je+en[pt]+Ot;Ce.replaceSelections(en,"around"),en=Ce.listSelections().slice();for(var pt=0;pt<en.length;pt++)en[pt]=je(en[pt]);Ce.setSelections(en)}else Ht=="both"?(Ce.replaceSelection(Je+Ot,null),Ce.triggerElectric(Je+Ot),Ce.execCommand("goCharLeft")):Ht=="addFour"&&(Ce.replaceSelection(Je+Je+Je+Je,"before"),Ce.execCommand("goCharRight"))})}function Ue(Ce,De){var ke=Ce.getRange(Te(De.line,De.ch-1),Te(De.line,De.ch+1));return ke.length==2?ke:null}function Le(Ce,De){var ke=Ce.getTokenAt(Te(De.line,De.ch+1));return/\bstring/.test(ke.type)&&ke.start==De.ch&&(De.ch==0||!/\bstring/.test(Ce.getTokenTypeAt(De)))}})},6313:function(xt,Et,de){(function(ue){ue(de(89780),de(52730))})(function(ue){ue.defineOption("autoCloseTags",!1,function(xe,fe,je){if(je!=ue.Init&&je&&xe.removeKeyMap("autoCloseTags"),!!fe){var me={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(me["'/'"]=function(Ue){return ge(Ue)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(me["'>'"]=function(Ue){return He(Ue)}),xe.addKeyMap(me)}});var Xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Te=["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 He(xe){if(xe.getOption("disableInput"))return ue.Pass;for(var fe=xe.listSelections(),je=[],me=xe.getOption("autoCloseTags"),Ue=0;Ue<fe.length;Ue++){if(!fe[Ue].empty())return ue.Pass;var Le=fe[Ue].head,Ce=xe.getTokenAt(Le),De=ue.innerMode(xe.getMode(),Ce.state),ke=De.state,Ye=De.mode.xmlCurrentTag&&De.mode.xmlCurrentTag(ke),tt=Ye&&Ye.name;if(!tt)return ue.Pass;var it=De.mode.configuration=="html",nt=typeof me=="object"&&me.dontCloseTags||it&&Xe,Ve=typeof me=="object"&&me.indentTags||it&&Te;Ce.end>Le.ch&&(tt=tt.slice(0,tt.length-Ce.end+Le.ch));var rt=tt.toLowerCase();if(!tt||Ce.type=="string"&&(Ce.end!=Le.ch||!/[\"\']/.test(Ce.string.charAt(Ce.string.length-1))||Ce.string.length==1)||Ce.type=="tag"&&Ye.close||Ce.string.indexOf("/")==Le.ch-Ce.start-1||nt&&Fe(nt,rt)>-1||Ne(xe,De.mode.xmlCurrentContext&&De.mode.xmlCurrentContext(ke)||[],tt,Le,!0))return ue.Pass;var $e=typeof me=="object"&&me.emptyTags;if($e&&Fe($e,tt)>-1){je[Ue]={text:"/>",newPos:ue.Pos(Le.line,Le.ch+2)};continue}var Ht=Ve&&Fe(Ve,rt)>-1;je[Ue]={indent:Ht,text:">"+(Ht?`
|
|
|
|
`:"")+"</"+tt+">",newPos:Ht?ue.Pos(Le.line+1,0):ue.Pos(Le.line,Le.ch+1)}}for(var Ge=typeof me=="object"&&me.dontIndentOnAutoClose,Ue=fe.length-1;Ue>=0;Ue--){var _e=je[Ue];xe.replaceRange(_e.text,fe[Ue].head,fe[Ue].anchor,"+insert");var ot=xe.listSelections().slice(0);ot[Ue]={head:_e.newPos,anchor:_e.newPos},xe.setSelections(ot),!Ge&&_e.indent&&(xe.indentLine(_e.newPos.line,null,!0),xe.indentLine(_e.newPos.line+1,null,!0))}}function pe(xe,fe){for(var je=xe.listSelections(),me=[],Ue=fe?"/":"</",Le=xe.getOption("autoCloseTags"),Ce=typeof Le=="object"&&Le.dontIndentOnSlash,De=0;De<je.length;De++){if(!je[De].empty())return ue.Pass;var ke=je[De].head,Ye=xe.getTokenAt(ke),tt=ue.innerMode(xe.getMode(),Ye.state),it=tt.state;if(fe&&(Ye.type=="string"||Ye.string.charAt(0)!="<"||Ye.start!=ke.ch-1))return ue.Pass;var nt,Ve=tt.mode.name!="xml"&&xe.getMode().name=="htmlmixed";if(Ve&&tt.mode.name=="javascript")nt=Ue+"script";else if(Ve&&tt.mode.name=="css")nt=Ue+"style";else{var rt=tt.mode.xmlCurrentContext&&tt.mode.xmlCurrentContext(it);if(!rt||rt.length&&Ne(xe,rt,rt[rt.length-1],ke))return ue.Pass;nt=Ue+rt[rt.length-1]}xe.getLine(ke.line).charAt(Ye.end)!=">"&&(nt+=">"),me[De]=nt}if(xe.replaceSelections(me),je=xe.listSelections(),!Ce)for(var De=0;De<je.length;De++)(De==je.length-1||je[De].head.line<je[De+1].head.line)&&xe.indentLine(je[De].head.line)}function ge(xe){return xe.getOption("disableInput")?ue.Pass:pe(xe,!0)}ue.commands.closeTag=function(xe){return pe(xe)};function Fe(xe,fe){if(xe.indexOf)return xe.indexOf(fe);for(var je=0,me=xe.length;je<me;++je)if(xe[je]==fe)return je;return-1}function Ne(xe,fe,je,me,Ue){if(!ue.scanForClosingTag)return!1;var Le=Math.min(xe.lastLine()+1,me.line+500),Ce=ue.scanForClosingTag(xe,me,null,Le);if(!Ce||Ce.tag!=je)return!1;for(var De=Ue?1:0,ke=fe.length-1;ke>=0&&fe[ke]==je;ke--)++De;me=Ce.to;for(var ke=1;ke<De;ke++){var Ye=ue.scanForClosingTag(xe,me,null,Le);if(!Ye||Ye.tag!=je)return!1;me=Ye.to}return!0}})},52730:function(xt,Et,de){(function(ue){ue(de(89780))})(function(ue){"use strict";var Xe=ue.Pos;function Te(ke,Ye){return ke.line-Ye.line||ke.ch-Ye.ch}var He="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",pe=He+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ge=new RegExp("<(/?)(["+He+"]["+pe+"]*)","g");function Fe(ke,Ye,tt,it){this.line=Ye,this.ch=tt,this.cm=ke,this.text=ke.getLine(Ye),this.min=it?Math.max(it.from,ke.firstLine()):ke.firstLine(),this.max=it?Math.min(it.to-1,ke.lastLine()):ke.lastLine()}function Ne(ke,Ye){var tt=ke.cm.getTokenTypeAt(Xe(ke.line,Ye));return tt&&/\btag\b/.test(tt)}function xe(ke){if(!(ke.line>=ke.max))return ke.ch=0,ke.text=ke.cm.getLine(++ke.line),!0}function fe(ke){if(!(ke.line<=ke.min))return ke.text=ke.cm.getLine(--ke.line),ke.ch=ke.text.length,!0}function je(ke){for(;;){var Ye=ke.text.indexOf(">",ke.ch);if(Ye==-1){if(xe(ke))continue;return}if(!Ne(ke,Ye+1)){ke.ch=Ye+1;continue}var tt=ke.text.lastIndexOf("/",Ye),it=tt>-1&&!/\S/.test(ke.text.slice(tt+1,Ye));return ke.ch=Ye+1,it?"selfClose":"regular"}}function me(ke){for(;;){var Ye=ke.ch?ke.text.lastIndexOf("<",ke.ch-1):-1;if(Ye==-1){if(fe(ke))continue;return}if(!Ne(ke,Ye+1)){ke.ch=Ye;continue}ge.lastIndex=Ye,ke.ch=Ye;var tt=ge.exec(ke.text);if(tt&&tt.index==Ye)return tt}}function Ue(ke){for(;;){ge.lastIndex=ke.ch;var Ye=ge.exec(ke.text);if(!Ye){if(xe(ke))continue;return}if(!Ne(ke,Ye.index+1)){ke.ch=Ye.index+1;continue}return ke.ch=Ye.index+Ye[0].length,Ye}}function Le(ke){for(;;){var Ye=ke.ch?ke.text.lastIndexOf(">",ke.ch-1):-1;if(Ye==-1){if(fe(ke))continue;return}if(!Ne(ke,Ye+1)){ke.ch=Ye;continue}var tt=ke.text.lastIndexOf("/",Ye),it=tt>-1&&!/\S/.test(ke.text.slice(tt+1,Ye));return ke.ch=Ye+1,it?"selfClose":"regular"}}function Ce(ke,Ye){for(var tt=[];;){var it=Ue(ke),nt,Ve=ke.line,rt=ke.ch-(it?it[0].length:0);if(!it||!(nt=je(ke)))return;if(nt!="selfClose")if(it[1]){for(var $e=tt.length-1;$e>=0;--$e)if(tt[$e]==it[2]){tt.length=$e;break}if($e<0&&(!Ye||Ye==it[2]))return{tag:it[2],from:Xe(Ve,rt),to:Xe(ke.line,ke.ch)}}else tt.push(it[2])}}function De(ke,Ye){for(var tt=[];;){var it=Le(ke);if(!it)return;if(it=="selfClose"){me(ke);continue}var nt=ke.line,Ve=ke.ch,rt=me(ke);if(!rt)return;if(rt[1])tt.push(rt[2]);else{for(var $e=tt.length-1;$e>=0;--$e)if(tt[$e]==rt[2]){tt.length=$e;break}if($e<0&&(!Ye||Ye==rt[2]))return{tag:rt[2],from:Xe(ke.line,ke.ch),to:Xe(nt,Ve)}}}}ue.registerHelper("fold","xml",function(ke,Ye){for(var tt=new Fe(ke,Ye.line,0);;){var it=Ue(tt);if(!it||tt.line!=Ye.line)return;var nt=je(tt);if(!nt)return;if(!it[1]&&nt!="selfClose"){var Ve=Xe(tt.line,tt.ch),rt=Ce(tt,it[2]);return rt&&Te(rt.from,Ve)>0?{from:Ve,to:rt.from}:null}}}),ue.findMatchingTag=function(ke,Ye,tt){var it=new Fe(ke,Ye.line,Ye.ch,tt);if(!(it.text.indexOf(">")==-1&&it.text.indexOf("<")==-1)){var nt=je(it),Ve=nt&&Xe(it.line,it.ch),rt=nt&&me(it);if(!(!nt||!rt||Te(it,Ye)>0)){var $e={from:Xe(it.line,it.ch),to:Ve,tag:rt[2]};return nt=="selfClose"?{open:$e,close:null,at:"open"}:rt[1]?{open:De(it,rt[2]),close:$e,at:"close"}:(it=new Fe(ke,Ve.line,Ve.ch,tt),{open:$e,close:Ce(it,rt[2]),at:"open"})}}},ue.findEnclosingTag=function(ke,Ye,tt,it){for(var nt=new Fe(ke,Ye.line,Ye.ch,tt);;){var Ve=De(nt,it);if(!Ve)break;var rt=new Fe(ke,Ye.line,Ye.ch,tt),$e=Ce(rt,Ve.tag);if($e)return{open:Ve,close:$e}}},ue.scanForClosingTag=function(ke,Ye,tt,it){var nt=new Fe(ke,Ye.line,Ye.ch,it?{from:0,to:it}:null);return Ce(nt,tt)}})},89780:function(xt){(function(Et,de){xt.exports=de()})(this,function(){"use strict";var Et=navigator.userAgent,de=navigator.platform,ue=/gecko\/\d/i.test(Et),Xe=/MSIE \d/.test(Et),Te=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Et),He=/Edge\/(\d+)/.exec(Et),pe=Xe||Te||He,ge=pe&&(Xe?document.documentMode||6:+(He||Te)[1]),Fe=!He&&/WebKit\//.test(Et),Ne=Fe&&/Qt\/\d+\.\d+/.test(Et),xe=!He&&/Chrome\//.test(Et),fe=/Opera\//.test(Et),je=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Et),Ue=/PhantomJS/.test(Et),Le=!He&&/AppleWebKit/.test(Et)&&/Mobile\/\w+/.test(Et),Ce=/Android/.test(Et),De=Le||Ce||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Et),ke=Le||/Mac/.test(de),Ye=/\bCrOS\b/.test(Et),tt=/win/i.test(de),it=fe&&Et.match(/Version\/(\d*\.\d*)/);it&&(it=Number(it[1])),it&&it>=15&&(fe=!1,Fe=!0);var nt=ke&&(Ne||fe&&(it==null||it<12.11)),Ve=ue||pe&&ge>=9;function rt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var $e=function(a,y){var x=a.className,b=rt(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 Ht(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ge(a,y){return Ht(a).appendChild(y)}function _e(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ee=0;ee<y.length;++ee)E.appendChild(y[ee]);return E}function ot(a,y,x,b){var E=_e(a,y,x,b);return E.setAttribute("role","presentation"),E}var Se;document.createRange?Se=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Se=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 We(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 Pe(){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 Je(a,y){var x=a.className;rt(y).test(x)||(a.className+=(x?" ":"")+y)}function Ot(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!rt(x[b]).test(y)&&(y+=" "+x[b]);return y}var pt=function(a){a.select()};Le?pt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:pe&&(pt=function(a){try{a.select()}catch(y){}});function en(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Dt(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function ve(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ee=b||0,ie=E||0;;){var ae=a.indexOf(" ",ee);if(ae<0||ae>=y)return ie+(y-ee);ie+=ae-ee,ie+=x-ie%x,ee=ae+1}}var he=function(){this.id=null,this.f=null,this.time=0,this.handler=en(this.onTimeout,this)};he.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},he.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function at(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var Gt=50,mt={toString:function(){return"CodeMirror.Pass"}},Be={scroll:!1},Ke={origin:"*mouse"},qe={origin:"+move"};function Kt(a,y,x){for(var b=0,E=0;;){var ee=a.indexOf(" ",b);ee==-1&&(ee=a.length);var ie=ee-b;if(ee==a.length||E+ie>=y)return b+Math.min(ie,y-E);if(E+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var st=[""];function Lt(a){for(;st.length<=a;)st.push(Oe(st)+" ");return st[a]}function Oe(a){return a[a.length-1]}function ut(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function ft(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function oe(){}function te(a,y){var x;return Object.create?x=Object.create(a):(oe.prototype=a,x=new oe),y&&Dt(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function le(a,y){return y?y.source.indexOf("\\w")>-1&&re(a)?!0:y.test(a):re(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ze(a){return a.charCodeAt(0)>=768&&be.test(a)}function St(a,y,x){for(;(x<0?y>0:y<a.length)&&Ze(a.charAt(y));)y+=x;return y}function gt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function dt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var ie=a[ee];(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",ee),E=!0)}E||b(y,x,"ltr")}var vt=null;function Wt(a,y,x){var b;vt=null;for(var E=0;E<a.length;++E){var ee=a[E];if(ee.from<y&&ee.to>y)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:vt=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:vt=E)}return b!=null?b:vt}var Rt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(ce){return ce<=247?a.charAt(ce):1424<=ce&&ce<=1524?"R":1536<=ce&&ce<=1785?y.charAt(ce-1536):1774<=ce&&ce<=2220?"r":8192<=ce&&ce<=8203?"w":ce==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,ie=/[Lb1n]/,ae=/[1n]/;function se(ce,ye,we){this.level=ce,this.from=ye,this.to=we}return function(ce,ye){var we=ye=="ltr"?"L":"R";if(ce.length==0||ye=="ltr"&&!b.test(ce))return!1;for(var ze=ce.length,Ie=[],ht=0;ht<ze;++ht)Ie.push(x(ce.charCodeAt(ht)));for(var yt=0,Bt=we;yt<ze;++yt){var Xt=Ie[yt];Xt=="m"?Ie[yt]=Bt:Bt=Xt}for(var on=0,Jt=we;on<ze;++on){var cn=Ie[on];cn=="1"&&Jt=="r"?Ie[on]="n":ee.test(cn)&&(Jt=cn,cn=="r"&&(Ie[on]="R"))}for(var Cn=1,vn=Ie[0];Cn<ze-1;++Cn){var Gn=Ie[Cn];Gn=="+"&&vn=="1"&&Ie[Cn+1]=="1"?Ie[Cn]="1":Gn==","&&vn==Ie[Cn+1]&&(vn=="1"||vn=="n")&&(Ie[Cn]=vn),vn=Gn}for(var Bi=0;Bi<ze;++Bi){var rr=Ie[Bi];if(rr==",")Ie[Bi]="N";else if(rr=="%"){var _i=void 0;for(_i=Bi+1;_i<ze&&Ie[_i]=="%";++_i);for(var Br=Bi&&Ie[Bi-1]=="!"||_i<ze&&Ie[_i]=="1"?"1":"N",Er=Bi;Er<_i;++Er)Ie[Er]=Br;Bi=_i-1}}for(var Qi=0,Lr=we;Qi<ze;++Qi){var cr=Ie[Qi];Lr=="L"&&cr=="1"?Ie[Qi]="L":ee.test(cr)&&(Lr=cr)}for(var er=0;er<ze;++er)if(E.test(Ie[er])){var qi=void 0;for(qi=er+1;qi<ze&&E.test(Ie[qi]);++qi);for(var Wi=(er?Ie[er-1]:we)=="L",Dr=(qi<ze?Ie[qi]:we)=="L",Vo=Wi==Dr?Wi?"L":"R":we,bo=er;bo<qi;++bo)Ie[bo]=Vo;er=qi-1}for(var vr=[],$r,or=0;or<ze;)if(ie.test(Ie[or])){var bs=or;for(++or;or<ze&&ie.test(Ie[or]);++or);vr.push(new se(0,bs,or))}else{var oo=or,Mo=vr.length,To=ye=="rtl"?1:0;for(++or;or<ze&&Ie[or]!="L";++or);for(var br=oo;br<or;)if(ae.test(Ie[br])){oo<br&&(vr.splice(Mo,0,new se(1,oo,br)),Mo+=To);var Uo=br;for(++br;br<or&&ae.test(Ie[br]);++br);vr.splice(Mo,0,new se(2,Uo,br)),Mo+=To,oo=br}else++br;oo<or&&vr.splice(Mo,0,new se(1,oo,or))}return ye=="ltr"&&(vr[0].level==1&&($r=ce.match(/^\s+/))&&(vr[0].from=$r[0].length,vr.unshift(new se(0,0,$r[0].length))),Oe(vr).level==1&&($r=ce.match(/\s+$/))&&(Oe(vr).to-=$r[0].length,vr.push(new se(0,ze-$r[0].length,ze)))),ye=="rtl"?vr.reverse():vr}}();function qt(a,y){var x=a.order;return x==null&&(x=a.order=Rt(a.text,y)),x}var $t=[],kt=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]||$t).concat(x)}};function hn(a,y){return a._handlers&&a._handlers[y]||$t}function jt(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var ee=at(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function tn(a,y){var x=hn(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 et(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),tn(a,x||y.type,a,y),sn(y)||y.codemirrorIgnore}function pn(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)at(x,y[b])==-1&&x.push(y[b])}function It(a,y){return hn(a,y).length>0}function Vt(a){a.prototype.on=function(y,x){kt(this,y,x)},a.prototype.off=function(y,x){jt(this,y,x)}}function an(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Pn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function sn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function mn(a){an(a),Pn(a)}function ni(a){return a.target||a.srcElement}function Vn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),ke&&a.ctrlKey&&y==1&&(y=3),y}var zi=function(){if(pe&&ge<9)return!1;var a=_e("div");return"draggable"in a||"dragDrop"in a}(),Hi;function xi(a){if(Hi==null){var y=_e("span","\u200B");Ge(a,_e("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Hi=y.offsetWidth<=1&&y.offsetHeight>2&&!(pe&&ge<8))}var x=Hi?_e("span","\u200B"):_e("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var gi;function Wn(a){if(gi!=null)return gi;var y=Ge(a,document.createTextNode("A\u062EA")),x=Se(y,0,1).getBoundingClientRect(),b=Se(y,1,2).getBoundingClientRect();return Ht(a),!x||x.left==x.right?!1:gi=b.right-x.right<3}var ri=`
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
|
|
`,y);E==-1&&(E=a.length);var ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ie=ee.indexOf("\r");ie!=-1?(x.push(ee.slice(0,ie)),y+=ie+1):(x.push(ee),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Ri=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},In=function(){var a=_e("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),ii=null;function Un(a){if(ii!=null)return ii;var y=Ge(a,_e("span","x")),x=y.getBoundingClientRect(),b=Se(y,0,1).getBoundingClientRect();return ii=Math.abs(x.left-b.left)>1}var ki={},rn={};function dn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),ki[a]=y}function gn(a,y){rn[a]=y}function En(a){if(typeof a=="string"&&rn.hasOwnProperty(a))a=rn[a];else if(a&&typeof a.name=="string"&&rn.hasOwnProperty(a.name)){var y=rn[a.name];typeof y=="string"&&(y={name:y}),a=te(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return En("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return En("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function $n(a,y){y=En(y);var x=ki[y.name];if(!x)return $n(a,"text/plain");var b=x(a,y);if(oi.hasOwnProperty(y.name)){var E=oi[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var ie in y.modeProps)b[ie]=y.modeProps[ie];return b}var oi={};function yi(a,y){var x=oi.hasOwnProperty(a)?oi[a]:oi[a]={};Dt(y,x)}function Zn(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 Nn(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 Ei(a,y,x){return a.startState?a.startState(y,x):!0}var At=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};At.prototype.eol=function(){return this.pos>=this.string.length},At.prototype.sol=function(){return this.pos==this.lineStart},At.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},At.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},At.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},At.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},At.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},At.prototype.skipToEnd=function(){this.pos=this.string.length},At.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},At.prototype.backUp=function(a){this.pos-=a},At.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},At.prototype.indentation=function(){return ve(this.string,null,this.tabSize)-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},At.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(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 ee=this.string.slice(this.pos).match(a);return ee&&ee.index>0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},At.prototype.current=function(){return this.string.slice(this.start,this.pos)},At.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},At.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},At.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function Qe(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],ee=E.chunkSize();if(y<ee){x=E;break}y-=ee}return x.lines[y]}function Ut(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ee){var ie=ee.text;E==x.line&&(ie=ie.slice(0,x.ch)),E==y.line&&(ie=ie.slice(y.ch)),b.push(ie),++E}),b}function Sn(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 Ee(a){if(a.parent==null)return null;for(var y=a.parent,x=at(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 Me(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],ee=E.height;if(y<ee){a=E;continue e}y-=ee,x+=E.chunkSize()}return x}while(!a.lines);for(var ie=0;ie<a.lines.length;++ie){var ae=a.lines[ie],se=ae.height;if(y<se)break;y-=se}return x+ie}function wt(a,y){return y>=a.first&&y<a.first+a.size}function lt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Re(a,y,x){if(x===void 0&&(x=null),!(this instanceof Re))return new Re(a,y,x);this.line=a,this.ch=y,this.sticky=x}function ct(a,y){return a.line-y.line||a.ch-y.ch}function Nt(a,y){return a.sticky==y.sticky&&ct(a,y)==0}function Qt(a){return Re(a.line,a.ch)}function nn(a,y){return ct(a,y)<0?y:a}function Mt(a,y){return ct(a,y)<0?a:y}function _t(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Ae(a,y){if(y.line<a.first)return Re(a.first,0);var x=a.first+a.size-1;return y.line>x?Re(x,Qe(a,x).text.length):yn(y,Qe(a,y.line).text.length)}function yn(a,y){var x=a.ch;return x==null||x>y?Re(a.line,y):x<0?Re(a.line,0):a}function Zt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Ae(a,y[b]);return x}var fn=function(a,y){this.state=a,this.lookAhead=y},ln=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};ln.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},ln.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ln.fromSaved=function(a,y,x){return y instanceof fn?new ln(a,Zn(a.mode,y.state),x,y.lookAhead):new ln(a,Zn(a.mode,y),x)},ln.prototype.save=function(a){var y=a!==!1?Zn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fn(y,this.maxLookAhead):y};function bn(a,y,x,b){var E=[a.state.modeGen],ee={};ai(a,y.text,a.doc.mode,x,function(ce,ye){return E.push(ce,ye)},ee,b);for(var ie=x.state,ae=function(ce){x.baseTokens=E;var ye=a.state.overlays[ce],we=1,ze=0;x.state=!0,ai(a,y.text,ye.mode,x,function(Ie,ht){for(var yt=we;ze<Ie;){var Bt=E[we];Bt>Ie&&E.splice(we,1,Ie,E[we+1],Bt),we+=2,ze=Math.min(Ie,Bt)}if(ht)if(ye.opaque)E.splice(yt,we-yt,Ie,"overlay "+ht),we=yt+2;else for(;yt<we;yt+=2){var Xt=E[yt+1];E[yt+1]=(Xt?Xt+" ":"")+"overlay "+ht}},ee),x.state=ie,x.baseTokens=null,x.baseTokenPos=1},se=0;se<a.state.overlays.length;++se)ae(se);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function Mn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=ci(a,Ee(y)),E=y.text.length>a.options.maxHighlightLength&&Zn(a.doc.mode,b.state),ee=bn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function ci(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new ln(b,!0,y);var ee=di(a,y,x),ie=ee>b.first&&Qe(b,ee-1).stateAfter,ae=ie?ln.fromSaved(b,ie,ee):new ln(b,Ei(b.mode),ee);return b.iter(ee,y,function(se){Bn(a,se.text,ae);var ce=ae.line;se.stateAfter=ce==y-1||ce%5==0||ce>=E.viewFrom&&ce<E.viewTo?ae.save():null,ae.nextLine()}),x&&(b.modeFrontier=ae.line),ae}function Bn(a,y,x,b){var E=a.doc.mode,ee=new At(y,a.options.tabSize,x);for(ee.start=ee.pos=b||0,y==""&&Ln(E,x.state);!ee.eol();)ei(E,ee,x.state),ee.start=ee.pos}function Ln(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Nn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function ei(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Nn(a,x).mode);var ee=a.token(y,x);if(y.pos>y.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var Tn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function hi(a,y,x,b){var E=a.doc,ee=E.mode,ie;y=Ae(E,y);var ae=Qe(E,y.line),se=ci(a,y.line,x),ce=new At(ae.text,a.options.tabSize,se),ye;for(b&&(ye=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,ie=ei(ee,ce,se.state),b&&ye.push(new Tn(ce,ie,Zn(E.mode,se.state)));return b?ye:new Tn(ce,ie,se.state)}function Oi(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 ai(a,y,x,b,E,ee,ie){var ae=x.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var se=0,ce=null,ye=new At(y,a.options.tabSize,b),we,ze=a.options.addModeClass&&[null];for(y==""&&Oi(Ln(x,b.state),ee);!ye.eol();){if(ye.pos>a.options.maxHighlightLength?(ae=!1,ie&&Bn(a,y,b,ye.pos),ye.pos=y.length,we=null):we=Oi(ei(x,ye,b.state,ze),ee),ze){var Ie=ze[0].name;Ie&&(we="m-"+(we?Ie+" "+we:Ie))}if(!ae||ce!=we){for(;se<ye.start;)se=Math.min(ye.start,se+5e3),E(se,ce);ce=we}ye.start=ye.pos}for(;se<ye.pos;){var ht=Math.min(ye.pos,se+5e3);E(ht,ce),se=ht}}function di(a,y,x){for(var b,E,ee=a.doc,ie=x?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>ie;--ae){if(ae<=ee.first)return ee.first;var se=Qe(ee,ae-1),ce=se.stateAfter;if(ce&&(!x||ae+(ce instanceof fn?ce.lookAhead:0)<=ee.modeFrontier))return ae;var ye=ve(se.text,null,a.options.tabSize);(E==null||b>ye)&&(E=ae-1,b=ye)}return E}function Li(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var x=a.first,b=y-1;b>x;b--){var E=Qe(a,b).stateAfter;if(E&&(!(E instanceof fn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var fi=!1,Xn=!1;function Mi(){fi=!0}function Jn(){Xn=!0}function si(a,y,x){this.marker=a,this.from=y,this.to=x}function pi(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function wi(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function li(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function Kn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],ie=ee.marker,ae=ee.from==null||(ie.inclusiveLeft?ee.from<=y:ee.from<y);if(ae||ee.from==y&&ie.type=="bookmark"&&(!x||!ee.marker.insertLeft)){var se=ee.to==null||(ie.inclusiveRight?ee.to>=y:ee.to>y);(b||(b=[])).push(new si(ie,ee.from,se?null:ee.to))}}return b}function zn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],ie=ee.marker,ae=ee.to==null||(ie.inclusiveRight?ee.to>=y:ee.to>y);if(ae||ee.from==y&&ie.type=="bookmark"&&(!x||ee.marker.insertLeft)){var se=ee.from==null||(ie.inclusiveLeft?ee.from<=y:ee.from<y);(b||(b=[])).push(new si(ie,se?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function Ti(a,y){if(y.full)return null;var x=wt(a,y.from.line)&&Qe(a,y.from.line).markedSpans,b=wt(a,y.to.line)&&Qe(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,ie=ct(y.from,y.to)==0,ae=Kn(x,E,ie),se=zn(b,ee,ie),ce=y.text.length==1,ye=Oe(y.text).length+(ce?E:0);if(ae)for(var we=0;we<ae.length;++we){var ze=ae[we];if(ze.to==null){var Ie=pi(se,ze.marker);Ie?ce&&(ze.to=Ie.to==null?null:Ie.to+ye):ze.to=E}}if(se)for(var ht=0;ht<se.length;++ht){var yt=se[ht];if(yt.to!=null&&(yt.to+=ye),yt.from==null){var Bt=pi(ae,yt.marker);Bt||(yt.from=ye,ce&&(ae||(ae=[])).push(yt))}else yt.from+=ye,ce&&(ae||(ae=[])).push(yt)}ae&&(ae=Zi(ae)),se&&se!=ae&&(se=Zi(se));var Xt=[ae];if(!ce){var on=y.text.length-2,Jt;if(on>0&&ae)for(var cn=0;cn<ae.length;++cn)ae[cn].to==null&&(Jt||(Jt=[])).push(new si(ae[cn].marker,null,null));for(var Cn=0;Cn<on;++Cn)Xt.push(Jt);Xt.push(se)}return Xt}function Zi(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 Gi(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Ie){if(Ie.markedSpans)for(var ht=0;ht<Ie.markedSpans.length;++ht){var yt=Ie.markedSpans[ht].marker;yt.readOnly&&(!b||at(b,yt)==-1)&&(b||(b=[])).push(yt)}}),!b)return null;for(var E=[{from:y,to:x}],ee=0;ee<b.length;++ee)for(var ie=b[ee],ae=ie.find(0),se=0;se<E.length;++se){var ce=E[se];if(!(ct(ce.to,ae.from)<0||ct(ce.from,ae.to)>0)){var ye=[se,1],we=ct(ce.from,ae.from),ze=ct(ce.to,ae.to);(we<0||!ie.inclusiveLeft&&!we)&&ye.push({from:ce.from,to:ae.from}),(ze>0||!ie.inclusiveRight&&!ze)&&ye.push({from:ae.to,to:ce.to}),E.splice.apply(E,ye),se+=ye.length-3}}return E}function Yn(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function ar(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function ti(a){return a.inclusiveLeft?-1:0}function sr(a){return a.inclusiveRight?1:0}function tr(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ee=ct(b.from,E.from)||ti(a)-ti(y);if(ee)return-ee;var ie=ct(b.to,E.to)||sr(a)-sr(y);return ie||y.id-a.id}function Fi(a,y){var x=Xn&&a.markedSpans,b;if(x)for(var E=void 0,ee=0;ee<x.length;++ee)E=x[ee],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||tr(b,E.marker)<0)&&(b=E.marker);return b}function Rn(a){return Fi(a,!0)}function Ct(a){return Fi(a,!1)}function Pt(a,y){var x=Xn&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ee=x[E];ee.marker.collapsed&&(ee.from==null||ee.from<y)&&(ee.to==null||ee.to>y)&&(!b||tr(b,ee.marker)<0)&&(b=ee.marker)}return b}function un(a,y,x,b,E){var ee=Qe(a,y),ie=Xn&&ee.markedSpans;if(ie)for(var ae=0;ae<ie.length;++ae){var se=ie[ae];if(se.marker.collapsed){var ce=se.marker.find(0),ye=ct(ce.from,x)||ti(se.marker)-ti(E),we=ct(ce.to,b)||sr(se.marker)-sr(E);if(!(ye>=0&&we<=0||ye<=0&&we>=0)&&(ye<=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?ct(ce.to,x)>=0:ct(ce.to,x)>0)||ye>=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?ct(ce.from,b)<=0:ct(ce.from,b)<0)))return!0}}}function Yt(a){for(var y;y=Rn(a);)a=y.find(-1,!0).line;return a}function xn(a){for(var y;y=Ct(a);)a=y.find(1,!0).line;return a}function Tt(a){for(var y,x;y=Ct(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function bt(a,y){var x=Qe(a,y),b=Yt(x);return x==b?y:Ee(b)}function Ft(a,y){if(y>a.lastLine())return y;var x=Qe(a,y),b;if(!zt(a,x))return y;for(;b=Ct(x);)x=b.find(1,!0).line;return Ee(x)+1}function zt(a,y){var x=Xn&&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&&Dn(a,y,b))return!0}}}function Dn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return Dn(a,b.line,pi(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,ee=0;ee<y.markedSpans.length;++ee)if(E=y.markedSpans[ee],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&Dn(a,y,E))return!0}function Fn(a){a=Yt(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var ee=x.parent;ee;x=ee,ee=x.parent)for(var ie=0;ie<ee.children.length;++ie){var ae=ee.children[ie];if(ae==x)break;y+=ae.height}return y}function bi(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Rn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Ct(b);){var ee=x.find(0,!0);y-=b.text.length-ee.from.ch,b=ee.to.line,y+=b.text.length-ee.to.ch}return y}function _n(a){var y=a.display,x=a.doc;y.maxLine=Qe(x,x.first),y.maxLineLength=bi(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=bi(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Qn=function(a,y,x){this.text=a,ar(this,y),this.height=x?x(this):1};Qn.prototype.lineNo=function(){return Ee(this)},Vt(Qn);function Ai(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Yn(a),ar(a,x);var E=b?b(a):1;E!=a.height&&jn(a,E)}function ji(a){a.parent=null,Yn(a)}var vi={},Yi={};function Di(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Yi:vi;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function hr(a,y){var x=ot("span",null,null,Fe?"padding-right: .1px":null),b={pre:ot("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var ee=E?y.rest[E-1]:y.line,ie=void 0;b.pos=0,b.addToken=Ir,Wn(a.display.measure)&&(ie=qt(ee,a.doc.direction))&&(b.addToken=mr(b.addToken,ie)),b.map=[];var ae=y!=a.display.externalMeasured&&Ee(ee);wr(ee,b,Mn(a,ee,ae)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=Ot(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=Ot(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(xi(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(Fe){var se=b.content.lastChild;(/\bcm-tab\b/.test(se.className)||se.querySelector&&se.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return tn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Ot(b.pre.className,b.textClass||"")),b}function zr(a){var y=_e("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Ir(a,y,x,b,E,ee,ie){if(y){var ae=a.splitSpaces?xr(y,a.trailingSpace):y,se=a.cm.state.specialChars,ce=!1,ye;if(!se.test(y))a.col+=y.length,ye=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,ye),pe&&ge<9&&(ce=!0),a.pos+=y.length;else{ye=document.createDocumentFragment();for(var we=0;;){se.lastIndex=we;var ze=se.exec(y),Ie=ze?ze.index-we:y.length-we;if(Ie){var ht=document.createTextNode(ae.slice(we,we+Ie));pe&&ge<9?ye.appendChild(_e("span",[ht])):ye.appendChild(ht),a.map.push(a.pos,a.pos+Ie,ht),a.col+=Ie,a.pos+=Ie}if(!ze)break;we+=Ie+1;var yt=void 0;if(ze[0]==" "){var Bt=a.cm.options.tabSize,Xt=Bt-a.col%Bt;yt=ye.appendChild(_e("span",Lt(Xt),"cm-tab")),yt.setAttribute("role","presentation"),yt.setAttribute("cm-text"," "),a.col+=Xt}else ze[0]=="\r"||ze[0]==`
|
|
`?(yt=ye.appendChild(_e("span",ze[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),yt.setAttribute("cm-text",ze[0]),a.col+=1):(yt=a.cm.options.specialCharPlaceholder(ze[0]),yt.setAttribute("cm-text",ze[0]),pe&&ge<9?ye.appendChild(_e("span",[yt])):ye.appendChild(yt),a.col+=1);a.map.push(a.pos,a.pos+1,yt),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||ce||ee||ie){var on=x||"";b&&(on+=b),E&&(on+=E);var Jt=_e("span",[ye],on,ee);if(ie)for(var cn in ie)ie.hasOwnProperty(cn)&&cn!="style"&&cn!="class"&&Jt.setAttribute(cn,ie[cn]);return a.content.appendChild(Jt)}a.content.appendChild(ye)}}function xr(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ee=a.charAt(E);ee==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ee="\xA0"),b+=ee,x=ee==" "}return b}function mr(a,y){return function(x,b,E,ee,ie,ae,se){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,ye=ce+b.length;;){for(var we=void 0,ze=0;ze<y.length&&(we=y[ze],!(we.to>ce&&we.from<=ce));ze++);if(we.to>=ye)return a(x,b,E,ee,ie,ae,se);a(x,b.slice(0,we.to-ce),E,ee,null,ae,se),ee=null,b=b.slice(we.to-ce),ce=we.to}}}function Ci(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 wr(a,y,x){var b=a.markedSpans,E=a.text,ee=0;if(!b){for(var ie=1;ie<x.length;ie+=2)y.addToken(y,E.slice(ee,ee=x[ie]),Di(x[ie+1],y.cm.options));return}for(var ae=E.length,se=0,ce=1,ye="",we,ze,Ie=0,ht,yt,Bt,Xt,on;;){if(Ie==se){ht=yt=Bt=ze="",on=null,Xt=null,Ie=1/0;for(var Jt=[],cn=void 0,Cn=0;Cn<b.length;++Cn){var vn=b[Cn],Gn=vn.marker;if(Gn.type=="bookmark"&&vn.from==se&&Gn.widgetNode)Jt.push(Gn);else if(vn.from<=se&&(vn.to==null||vn.to>se||Gn.collapsed&&vn.to==se&&vn.from==se)){if(vn.to!=null&&vn.to!=se&&Ie>vn.to&&(Ie=vn.to,yt=""),Gn.className&&(ht+=" "+Gn.className),Gn.css&&(ze=(ze?ze+";":"")+Gn.css),Gn.startStyle&&vn.from==se&&(Bt+=" "+Gn.startStyle),Gn.endStyle&&vn.to==Ie&&(cn||(cn=[])).push(Gn.endStyle,vn.to),Gn.title&&((on||(on={})).title=Gn.title),Gn.attributes)for(var Bi in Gn.attributes)(on||(on={}))[Bi]=Gn.attributes[Bi];Gn.collapsed&&(!Xt||tr(Xt.marker,Gn)<0)&&(Xt=vn)}else vn.from>se&&Ie>vn.from&&(Ie=vn.from)}if(cn)for(var rr=0;rr<cn.length;rr+=2)cn[rr+1]==Ie&&(yt+=" "+cn[rr]);if(!Xt||Xt.from==se)for(var _i=0;_i<Jt.length;++_i)Ci(y,0,Jt[_i]);if(Xt&&(Xt.from||0)==se){if(Ci(y,(Xt.to==null?ae+1:Xt.to)-se,Xt.marker,Xt.from==null),Xt.to==null)return;Xt.to==se&&(Xt=!1)}}if(se>=ae)break;for(var Br=Math.min(ae,Ie);;){if(ye){var Er=se+ye.length;if(!Xt){var Qi=Er>Br?ye.slice(0,Br-se):ye;y.addToken(y,Qi,we?we+ht:ht,Bt,se+Qi.length==Ie?yt:"",ze,on)}if(Er>=Br){ye=ye.slice(Br-se),se=Br;break}se=Er,Bt=""}ye=E.slice(ee,ee=x[ce++]),we=Di(x[ce++],y.cm.options)}}}function eo(a,y,x){this.line=y,this.rest=Tt(y),this.size=this.rest?Ee(Oe(this.rest))-x+1:1,this.node=this.text=null,this.hidden=zt(a,y)}function Xi(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var ie=new eo(a.doc,Qe(a.doc,ee),ee);E=ee+ie.size,b.push(ie)}return b}var Nr=null;function Xr(a){Nr?Nr.ops.push(a):a.ownsGroup=Nr={ops:[a],delayedCallbacks:[]}}function dr(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 ao(a,y){var x=a.ownsGroup;if(x)try{dr(x)}finally{Nr=null,y(x)}}var Rr=null;function Ii(a,y){var x=hn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Nr?E=Nr.delayedCallbacks:Rr?E=Rr:(E=Rr=[],setTimeout(to,0));for(var ee=function(ae){E.push(function(){return x[ae].apply(null,b)})},ie=0;ie<x.length;++ie)ee(ie)}}function to(){var a=Rr;Rr=null;for(var y=0;y<a.length;++y)a[y]()}function so(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?lo(a,y):ee=="gutter"?On(a,y,x,b):ee=="class"?wn(a,y):ee=="widget"&&kn(a,y,b)}y.changes=null}function Zr(a){return a.node==a.text&&(a.node=_e("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),pe&&ge<8&&(a.node.style.zIndex=2)),a.node}function Ji(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=Zr(y);y.background=b.insertBefore(_e("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):hr(a,y)}function lo(a,y){var x=y.text.className,b=xo(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,wn(a,y)):x&&(y.text.className=x)}function wn(a,y){Ji(a,y),y.line.wrapClass?Zr(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 On(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=Zr(y);y.gutterBackground=_e("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var ee=y.line.gutterMarkers;if(a.options.lineNumbers||ee){var ie=Zr(y),ae=y.gutter=_e("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),ie.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(_e("div",lt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=a.display.gutterSpecs[se].className,ye=ee.hasOwnProperty(ce)&&ee[ce];ye&&ae.appendChild(_e("div",[ye],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ce]+"px; width: "+b.gutterWidth[ce]+"px"))}}}function kn(a,y,x){y.alignable&&(y.alignable=null);for(var b=rt("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);ui(a,y,x)}function An(a,y,x,b){var E=xo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),wn(a,y),On(a,y,x,b),ui(a,y,b),y.node}function ui(a,y,x){if(Pi(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Pi(a,y.rest[b],y,x,!1)}function Pi(a,y,x,b,E){if(y.widgets)for(var ee=Zr(x),ie=0,ae=y.widgets;ie<ae.length;++ie){var se=ae[ie],ce=_e("div",[se.node],"CodeMirror-linewidget"+(se.className?" "+se.className:""));se.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),Gr(se,ce,x,b),a.display.input.setUneditable(ce),E&&se.above?ee.insertBefore(ce,x.gutter||x.text):ee.appendChild(ce),Ii(se,"redraw")}}function Gr(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 gr(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!We(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;"),Ge(y.display.measure,_e("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function lr(a,y){for(var x=ni(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 Vi(a){return a.lineSpace.offsetTop}function _r(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Jr(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ge(a.measure,_e("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 Mr(a){return Gt-a.display.nativeBarWidth}function Qr(a){return a.display.scroller.clientWidth-Mr(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Mr(a)-a.display.barHeight}function jr(a,y,x){var b=a.options.lineWrapping,E=b&&Qr(a);if(!y.measure.heights||b&&y.measure.width!=E){var ee=y.measure.heights=[];if(b){y.measure.width=E;for(var ie=y.text.firstChild.getClientRects(),ae=0;ae<ie.length-1;ae++){var se=ie[ae],ce=ie[ae+1];Math.abs(se.bottom-ce.bottom)>2&&ee.push((se.bottom+ce.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function Ao(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(Ee(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=Yt(y);var x=Ee(y),b=a.display.externalMeasured=new eo(a.doc,y,x);b.lineN=x;var E=b.built=hr(a,b);return b.text=E.pre,Ge(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Hr(a,uo(a,y),x,b)}function qr(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 uo(a,y){var x=Ee(y),b=qr(a,x);b&&!b.text?b=null:b&&b.changes&&(so(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=ja(a,y));var E=Ao(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Hr(a,y,x,b,E){y.before&&(x=-1);var ee=x+(b||""),ie;return y.cache.hasOwnProperty(ee)?ie=y.cache[ee]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(jr(a,y.view,y.rect),y.hasHeights=!0),ie=wa(a,y,x,b),ie.bogus||(y.cache[ee]=ie)),{left:ie.left,right:ie.right,top:E?ie.rtop:ie.top,bottom:E?ie.rbottom:ie.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,ee,ie,ae,se,ce=0;ce<a.length;ce+=3)if(ae=a[ce],se=a[ce+1],y<ae?(E=0,ee=1,ie="left"):y<se?(E=y-ae,ee=E+1):(ce==a.length-3||y==se&&a[ce+3]>y)&&(ee=se-ae,E=ee-1,y>=se&&(ie="right")),E!=null){if(b=a[ce+2],ae==se&&x==(b.insertLeft?"left":"right")&&(ie=x),x=="left"&&E==0)for(;ce&&a[ce-2]==a[ce-3]&&a[ce-1].insertLeft;)b=a[(ce-=3)+2],ie="left";if(x=="right"&&E==se-ae)for(;ce<a.length-3&&a[ce+3]==a[ce+4]&&!a[ce+5].insertLeft;)b=a[(ce+=3)+2],ie="right";break}return{node:b,start:E,end:ee,collapse:ie,coverStart:ae,coverEnd:se}}function Va(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),ee=E.node,ie=E.start,ae=E.end,se=E.collapse,ce;if(ee.nodeType==3){for(var ye=0;ye<4;ye++){for(;ie&&Ze(y.line.text.charAt(E.coverStart+ie));)--ie;for(;E.coverStart+ae<E.coverEnd&&Ze(y.line.text.charAt(E.coverStart+ae));)++ae;if(pe&&ge<9&&ie==0&&ae==E.coverEnd-E.coverStart?ce=ee.parentNode.getBoundingClientRect():ce=Va(Se(ee,ie,ae).getClientRects(),b),ce.left||ce.right||ie==0)break;ae=ie,ie=ie-1,se="right"}pe&&ge<11&&(ce=Ua(a.display.measure,ce))}else{ie>0&&(se=b="right");var we;a.options.lineWrapping&&(we=ee.getClientRects()).length>1?ce=we[b=="right"?we.length-1:0]:ce=ee.getBoundingClientRect()}if(pe&&ge<9&&!ie&&(!ce||!ce.left&&!ce.right)){var ze=ee.parentNode.getClientRects()[0];ze?ce={left:ze.left,right:ze.left+Ur(a.display),top:ze.top,bottom:ze.bottom}:ce=ba}for(var Ie=ce.top-y.rect.top,ht=ce.bottom-y.rect.top,yt=(Ie+ht)/2,Bt=y.view.measure.heights,Xt=0;Xt<Bt.length-1&&!(yt<Bt[Xt]);Xt++);var on=Xt?Bt[Xt-1]:0,Jt=Bt[Xt],cn={left:(se=="right"?ce.right:ce.left)-y.rect.left,right:(se=="left"?ce.left:ce.right)-y.rect.left,top:on,bottom:Jt};return!ce.left&&!ce.right&&(cn.bogus=!0),a.options.singleCursorHeightPerLine||(cn.rtop=Ie,cn.rbottom=ht),cn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Un(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,Ht(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 xe&&Ce?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return xe&&Ce?-(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+=gr(a.widgets[x]));return y}function Po(a,y,x,b,E){if(!E){var ee=Jo(y);x.top+=ee,x.bottom+=ee}if(b=="line")return x;b||(b="local");var ie=Fn(y);if(b=="local"?ie+=Vi(a.display):ie-=a.display.viewOffset,b=="page"||b=="window"){var ae=a.display.lineSpace.getBoundingClientRect();ie+=ae.top+(b=="window"?0:Ca());var se=ae.left+(b=="window"?0:Xo());x.left+=se,x.right+=se}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 ee=a.display.sizer.getBoundingClientRect();b+=ee.left,E+=ee.top}var ie=a.display.lineSpace.getBoundingClientRect();return{left:b-ie.left,top:E-ie.top}}function Bo(a,y,x,b,E){return b||(b=Qe(a.doc,y.line)),Po(a,b,ya(a,b,y.ch,E),x)}function Cr(a,y,x,b,E,ee){b=b||Qe(a.doc,y.line),E||(E=uo(a,b));function ie(ht,yt){var Bt=Hr(a,E,ht,yt?"right":"left",ee);return yt?Bt.left=Bt.right:Bt.right=Bt.left,Po(a,b,Bt,x)}var ae=qt(b,a.doc.direction),se=y.ch,ce=y.sticky;if(se>=b.text.length?(se=b.text.length,ce="before"):se<=0&&(se=0,ce="after"),!ae)return ie(ce=="before"?se-1:se,ce=="before");function ye(ht,yt,Bt){var Xt=ae[yt],on=Xt.level==1;return ie(Bt?ht-1:ht,on!=Bt)}var we=Wt(ae,se,ce),ze=vt,Ie=ye(se,we,ce=="before");return ze!=null&&(Ie.other=ye(se,ze,ce!="before")),Ie}function qn(a,y){var x=0;y=Ae(a.doc,y),a.options.lineWrapping||(x=Ur(a.display)*y.ch);var b=Qe(a.doc,y.line),E=Fn(b)+Vi(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Hn(a,y,x,b,E){var ee=Re(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function ur(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Hn(b.first,0,null,-1,-1);var E=Me(b,x),ee=b.first+b.size-1;if(E>ee)return Hn(b.first+b.size-1,Qe(b,ee).text.length,null,1,1);y<0&&(y=0);for(var ie=Qe(b,E);;){var ae=Vr(a,ie,E,y,x),se=Pt(ie,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!se)return ae;var ce=se.find(1);if(ce.line==E)return ce;ie=Qe(b,E=ce.line)}}function fr(a,y,x,b){b-=Jo(y);var E=y.text.length,ee=gt(function(ie){return Hr(a,x,ie-1).bottom<=b},E,0);return E=gt(function(ie){return Hr(a,x,ie).top>b},ee,E),{begin:ee,end:E}}function Ui(a,y,x,b){x||(x=uo(a,y));var E=Po(a,y,Hr(a,x,b),"line").top;return fr(a,y,x,E)}function $i(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Vr(a,y,x,b,E){E-=Fn(y);var ee=uo(a,y),ie=Jo(y),ae=0,se=y.text.length,ce=!0,ye=qt(y,a.doc.direction);if(ye){var we=(a.options.lineWrapping?io:Wr)(a,y,x,ee,ye,b,E);ce=we.level!=1,ae=ce?we.from:we.to-1,se=ce?we.to:we.from-1}var ze=null,Ie=null,ht=gt(function(Cn){var vn=Hr(a,ee,Cn);return vn.top+=ie,vn.bottom+=ie,$i(vn,b,E,!1)?(vn.top<=E&&vn.left<=b&&(ze=Cn,Ie=vn),!0):!1},ae,se),yt,Bt,Xt=!1;if(Ie){var on=b-Ie.left<Ie.right-b,Jt=on==ce;ht=ze+(Jt?0:1),Bt=Jt?"after":"before",yt=on?Ie.left:Ie.right}else{!ce&&(ht==se||ht==ae)&&ht++,Bt=ht==0?"after":ht==y.text.length?"before":Hr(a,ee,ht-(ce?1:0)).bottom+ie<=E==ce?"after":"before";var cn=Cr(a,Re(x,ht,Bt),"line",y,ee);yt=cn.left,Xt=E<cn.top?-1:E>=cn.bottom?1:0}return ht=St(y.text,ht,1),Hn(x,ht,Bt,Xt,b-yt)}function Wr(a,y,x,b,E,ee,ie){var ae=gt(function(we){var ze=E[we],Ie=ze.level!=1;return $i(Cr(a,Re(x,Ie?ze.to:ze.from,Ie?"before":"after"),"line",y,b),ee,ie,!0)},0,E.length-1),se=E[ae];if(ae>0){var ce=se.level!=1,ye=Cr(a,Re(x,ce?se.from:se.to,ce?"after":"before"),"line",y,b);$i(ye,ee,ie,!0)&&ye.top>ie&&(se=E[ae-1])}return se}function io(a,y,x,b,E,ee,ie){var ae=fr(a,y,b,ie),se=ae.begin,ce=ae.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var ye=null,we=null,ze=0;ze<E.length;ze++){var Ie=E[ze];if(!(Ie.from>=ce||Ie.to<=se)){var ht=Ie.level!=1,yt=Hr(a,b,ht?Math.min(ce,Ie.to)-1:Math.max(se,Ie.from)).right,Bt=yt<ee?ee-yt+1e9:yt-ee;(!ye||we>Bt)&&(ye=Ie,we=Bt)}}return ye||(ye=E[E.length-1]),ye.from<se&&(ye={from:se,to:ye.to,level:ye.level}),ye.to>ce&&(ye={from:ye.from,to:ce,level:ye.level}),ye}var Tr;function Ar(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Tr==null){Tr=_e("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Tr.appendChild(document.createTextNode("x")),Tr.appendChild(_e("br"));Tr.appendChild(document.createTextNode("x"))}Ge(a.measure,Tr);var x=Tr.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Ht(a.measure),x||1}function Ur(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=_e("span","xxxxxxxxxx"),x=_e("pre",[y],"CodeMirror-line-like");Ge(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,ie=0;ee;ee=ee.nextSibling,++ie){var ae=a.display.gutterSpecs[ie].className;x[ae]=ee.offsetLeft+ee.clientLeft+E,b[ae]=ee.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Ar(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ur(a.display)-3);return function(E){if(zt(a.doc,E))return 0;var ee=0;if(E.widgets)for(var ie=0;ie<E.widgets.length;ie++)E.widgets[ie].height&&(ee+=E.widgets[ie].height);return x?ee+(Math.ceil(E.text.length/b)||1)*y:ee+y}}function Ya(a){var y=a.doc,x=ws(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&&ni(y).getAttribute("cm-not-content")=="true")return null;var ee,ie,ae=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-ae.left,ie=y.clientY-ae.top}catch(we){return null}var se=ur(a,ee,ie),ce;if(b&&se.xRel>0&&(ce=Qe(a.doc,se.line).text).length==se.ch){var ye=ve(ce,ce.length,a.options.tabSize)-ce.length;se=Re(se.line,Math.max(0,Math.round((ee-Jr(a.display).left)/Ur(a.display))-ye))}return se}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 Sr(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)Xn&&bt(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)Xn&&Ft(a.doc,x+b)>E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var ee=ka(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var ie=ka(a,y,y,-1);ie?(E.view=E.view.slice(0,ie.index),E.viewTo=ie.lineN):fo(a)}else{var ae=ka(a,y,y,-1),se=ka(a,x,x+b,1);ae&&se?(E.view=E.view.slice(0,ae.index).concat(Xi(a,ae.lineN,se.lineN)).concat(E.view.slice(se.index)),E.viewTo+=b):fo(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function ho(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var ee=b.view[So(a,y)];if(ee.node!=null){var ie=ee.changes||(ee.changes=[]);at(ie,x)==-1&&ie.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=So(a,y),ee,ie=a.display.view;if(!Xn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,se=0;se<E;se++)ae+=ie[se].size;if(ae!=y){if(b>0){if(E==ie.length-1)return null;ee=ae+ie[E].size-y,E++}else ee=ae-y;y+=ee,x+=ee}for(;bt(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 Hl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=Xi(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Xi(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(Xi(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function Cs(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 Ss(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),ee=b.selection=document.createDocumentFragment(),ie=0;ie<x.sel.ranges.length;ie++)if(!(!y&&ie==x.sel.primIndex)){var ae=x.sel.ranges[ie];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var se=ae.empty();(se||a.options.showCursorWhenSelecting)&&ks(a,ae.head,E),se||Wl(a,ae,ee)}}return b}function ks(a,y,x){var b=Cr(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(_e("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var ee=x.appendChild(_e("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ee.style.display="",ee.style.left=b.other.left+"px",ee.style.top=b.other.top+"px",ee.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function Wl(a,y,x){var b=a.display,E=a.doc,ee=document.createDocumentFragment(),ie=Jr(a.display),ae=ie.left,se=Math.max(b.sizerWidth,Qr(a)-b.sizer.offsetLeft)-ie.right,ce=E.direction=="ltr";function ye(Jt,cn,Cn,vn){cn<0&&(cn=0),cn=Math.round(cn),vn=Math.round(vn),ee.appendChild(_e("div",null,"CodeMirror-selected","position: absolute; left: "+Jt+`px;
|
|
top: `+cn+"px; width: "+(Cn==null?se-Jt:Cn)+`px;
|
|
height: `+(vn-cn)+"px"))}function we(Jt,cn,Cn){var vn=Qe(E,Jt),Gn=vn.text.length,Bi,rr;function _i(Qi,Lr){return Bo(a,Re(Jt,Qi),"div",vn,Lr)}function Br(Qi,Lr,cr){var er=Ui(a,vn,null,Qi),qi=Lr=="ltr"==(cr=="after")?"left":"right",Wi=cr=="after"?er.begin:er.end-(/\s/.test(vn.text.charAt(er.end-1))?2:1);return _i(Wi,qi)[qi]}var Er=qt(vn,E.direction);return dt(Er,cn||0,Cn==null?Gn:Cn,function(Qi,Lr,cr,er){var qi=cr=="ltr",Wi=_i(Qi,qi?"left":"right"),Dr=_i(Lr-1,qi?"right":"left"),Vo=cn==null&&Qi==0,bo=Cn==null&&Lr==Gn,vr=er==0,$r=!Er||er==Er.length-1;if(Dr.top-Wi.top<=3){var or=(ce?Vo:bo)&&vr,bs=(ce?bo:Vo)&&$r,oo=or?ae:(qi?Wi:Dr).left,Mo=bs?se:(qi?Dr:Wi).right;ye(oo,Wi.top,Mo-oo,Wi.bottom)}else{var To,br,Uo,xs;qi?(To=ce&&Vo&&vr?ae:Wi.left,br=ce?se:Br(Qi,cr,"before"),Uo=ce?ae:Br(Lr,cr,"after"),xs=ce&&bo&&$r?se:Dr.right):(To=ce?Br(Qi,cr,"before"):ae,br=!ce&&Vo&&vr?se:Wi.right,Uo=!ce&&bo&&$r?ae:Dr.left,xs=ce?Br(Lr,cr,"after"):se),ye(To,Wi.top,br-To,Wi.bottom),Wi.bottom<Dr.top&&ye(ae,Wi.bottom,null,Dr.top),ye(Uo,Dr.top,xs-Uo,Dr.bottom)}(!Bi||Ea(Wi,Bi)<0)&&(Bi=Wi),Ea(Dr,Bi)<0&&(Bi=Dr),(!rr||Ea(Wi,rr)<0)&&(rr=Wi),Ea(Dr,rr)<0&&(rr=Dr)}),{start:Bi,end:rr}}var ze=y.from(),Ie=y.to();if(ze.line==Ie.line)we(ze.line,ze.ch,Ie.ch);else{var ht=Qe(E,ze.line),yt=Qe(E,Ie.line),Bt=Yt(ht)==Yt(yt),Xt=we(ze.line,ze.ch,Bt?ht.text.length+1:null).end,on=we(Ie.line,Bt?0:null,Ie.ch).start;Bt&&(Xt.top<on.top-2?(ye(Xt.right,Xt.top,null,Xt.bottom),ye(ae,on.top,on.left,on.bottom)):ye(Xt.right,Xt.top,on.left-Xt.right,Xt.bottom)),Xt.bottom<on.top&&ye(ae,Xt.bottom,null,on.top)}x.appendChild(ee)}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()||Ro(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Es(a){a.state.focused||(a.display.input.focus(),Ja(a))}function Ls(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ro(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(tn(a,"focus",a,y),a.state.focused=!0,Je(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Fe&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Ro(a,y){a.state.delayingBlurEvent||(a.state.focused&&(tn(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 La(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],ee=a.options.lineWrapping,ie=void 0,ae=0;if(!E.hidden){if(pe&&ge<8){var se=E.node.offsetTop+E.node.offsetHeight;ie=se-x,x=se}else{var ce=E.node.getBoundingClientRect();ie=ce.bottom-ce.top,!ee&&E.text.firstChild&&(ae=E.text.firstChild.getBoundingClientRect().right-ce.left-1)}var ye=E.line.height-ie;if((ye>.005||ye<-.005)&&(jn(E.line,ie),Ds(E.line),E.rest))for(var we=0;we<E.rest.length;we++)Ds(E.rest[we]);if(ae>a.display.sizerWidth){var ze=Math.ceil(ae/Ur(a.display));ze>a.display.maxLineLength&&(a.display.maxLineLength=ze,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ds(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 Da(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Vi(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ee=Me(y,b),ie=Me(y,E);if(x&&x.ensure){var ae=x.ensure.from.line,se=x.ensure.to.line;ae<ee?(ee=ae,ie=Me(y,Fn(Qe(y,ae))+a.wrapper.clientHeight)):Math.min(se,y.lastLine())>=ie&&(ee=Me(y,Fn(Qe(y,se))-a.wrapper.clientHeight),ie=se)}return{from:ee,to:Math.max(ie,ee+1)}}function zl(a,y){if(!et(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 ee=_e("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-x.viewOffset-Vi(a.display))+`px;
|
|
height: `+(y.bottom-y.top+Mr(a)+x.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Re(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Re(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var ie=!1,ae=Cr(a,y),se=!x||x==y?ae:Cr(a,x);E={left:Math.min(ae.left,se.left),top:Math.min(ae.top,se.top)-b,right:Math.max(ae.left,se.left),bottom:Math.max(ae.bottom,se.bottom)+b};var ce=Qa(a,E),ye=a.doc.scrollTop,we=a.doc.scrollLeft;if(ce.scrollTop!=null&&($o(a,ce.scrollTop),Math.abs(a.doc.scrollTop-ye)>1&&(ie=!0)),ce.scrollLeft!=null&&(ko(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-we)>1&&(ie=!0)),!ie)break}return E}function Gl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&ko(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Ar(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=no(a),ie={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var ae=a.doc.height+_r(x),se=y.top<b,ce=y.bottom>ae-b;if(y.top<E)ie.scrollTop=se?0:y.top;else if(y.bottom>E+ee){var ye=Math.min(y.top,(ce?ae:y.bottom)-ee);ye!=E&&(ie.scrollTop=ye)}var we=a.options.fixedGutter?0:x.gutters.offsetWidth,ze=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-we,Ie=Qr(a)-x.gutters.offsetWidth,ht=y.right-y.left>Ie;return ht&&(y.right=y.left+Ie),y.left<10?ie.scrollLeft=0:y.left<ze?ie.scrollLeft=Math.max(0,y.left+we-(ht?0:10)):y.right>Ie+ze-3&&(ie.scrollLeft=y.right+(ht?0:10)-Ie),ie}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Fo(a){Ma(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)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function jl(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=qn(a,y.from),b=qn(a,y.to);Ms(a,x,b,y.margin)}}function Ms(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||(ue||es(a,{top:y}),Ts(a,y,!0),ue&&es(a),na(a,100))}function Ts(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 ko(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,Fs(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+_r(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+Mr(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=_e("div",[_e("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=_e("div",[_e("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),kt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),kt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,pe&&ge<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var ee=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},Eo.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Eo.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Eo.prototype.zeroWidthHack=function(){var a=ke&&!me?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new he,this.disableVert=new he},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},Eo.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function Oo(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;As(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&La(a),As(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function As(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 Ps={native:Eo,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&$e(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ps[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),kt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?ko(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&Je(a.display.wrapper,a.display.scrollbars.addClass)}var Vl=0;function Lo(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:++Vl},Xr(a.curOp)}function Do(a){var y=a.curOp;y&&ao(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Ul(x)})}function Ul(a){for(var y=a.ops,x=0;x<y.length;x++)Kl(y[x]);for(var b=0;b<y.length;b++)Yl(y[b]);for(var E=0;E<y.length;E++)Xl(y[E]);for(var ee=0;ee<y.length;ee++)Jl(y[ee]);for(var ie=0;ie<y.length;ie++)Ql(y[ie])}function Kl(a){var y=a.cm,x=y.display;$l(y),a.updateMaxLine&&_n(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 Ta(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Yl(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&La(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+Mr(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-Qr(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Jl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&ko(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Pe();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Oo(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&Es(a.cm)}function Ql(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Rs(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ts(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ko(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zl(y,Ae(b,a.scrollToPos.from),Ae(b,a.scrollToPos.to),a.scrollToPos.margin);zl(y,E)}var ee=a.maybeHiddenMarkers,ie=a.maybeUnhiddenMarkers;if(ee)for(var ae=0;ae<ee.length;++ae)ee[ae].lines.length||tn(ee[ae],"hide");if(ie)for(var se=0;se<ie.length;++se)ie[se].lines.length&&tn(ie[se],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&tn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Pr(a,y){if(a.curOp)return y();Lo(a);try{return y()}finally{Do(a)}}function nr(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Lo(a);try{return y.apply(a,arguments)}finally{Do(a)}}}function yr(a){return function(){if(this.curOp)return a.apply(this,arguments);Lo(this);try{return a.apply(this,arguments)}finally{Do(this)}}}function ir(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Lo(y);try{return a.apply(this,arguments)}finally{Do(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,en(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=ci(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(b.line>=a.display.viewFrom){var ie=ee.styles,ae=ee.text.length>a.options.maxHighlightLength?Zn(y.mode,b.state):null,se=bn(a,ee,b,!0);ae&&(b.state=ae),ee.styles=se.styles;var ce=ee.styleClasses,ye=se.classes;ye?ee.styleClasses=ye:ce&&(ee.styleClasses=null);for(var we=!ie||ie.length!=ee.styles.length||ce!=ye&&(!ce||!ye||ce.bgClass!=ye.bgClass||ce.textClass!=ye.textClass),ze=0;!we&&ze<ie.length;++ze)we=ie[ze]!=ee.styles[ze];we&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&Bn(a,ee.text,b),ee.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Pr(a,function(){for(var ee=0;ee<E.length;ee++)ho(a,E[ee],"text")})}}var Ta=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Da(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=Qr(a),this.force=x,this.dims=co(a),this.events=[]};Ta.prototype.signal=function(a,y){It(a,y)&&this.events.push(arguments)},Ta.prototype.finish=function(){for(var a=0;a<this.events.length;a++)tn.apply(null,this.events[a])};function $l(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Mr(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Mr(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Pe();if(!y||!We(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&We(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==Pe())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&We(document.body,a.anchorNode)&&We(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return fo(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cs(a)==0)return!1;Os(a)&&(fo(a),y.dims=co(a));var E=b.first+b.size,ee=Math.max(y.visible.from-a.options.viewportMargin,b.first),ie=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ee&&ee-x.viewFrom<20&&(ee=Math.max(b.first,x.viewFrom)),x.viewTo>ie&&x.viewTo-ie<20&&(ie=Math.min(E,x.viewTo)),Xn&&(ee=bt(a.doc,ee),ie=Ft(a.doc,ie));var ae=ee!=x.viewFrom||ie!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,ee,ie),x.viewOffset=Fn(Qe(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var se=Cs(a);if(!ae&&se==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ce=eu(a);return se>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),se>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(ce),Ht(x.cursorDiv),Ht(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ae&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Rs(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==Qr(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+_r(a.display)-no(a),x.top)}),y.visible=Da(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Da(a.display,a.doc,x));if(!$a(a,y))break;La(a);var E=ea(a);Qo(a),Oo(a,E),ns(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 es(a,y){var x=new Ta(a,y);if($a(a,x)){La(a),Rs(a,x);var b=ea(a);Qo(a),Oo(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ee=b.lineDiv,ie=ee.firstChild;function ae(ht){var yt=ht.nextSibling;return Fe&&ke&&a.display.currentWheelTarget==ht?ht.style.display="none":ht.parentNode.removeChild(ht),yt}for(var se=b.view,ce=b.viewFrom,ye=0;ye<se.length;ye++){var we=se[ye];if(!we.hidden)if(!we.node||we.node.parentNode!=ee){var ze=An(a,we,ce,x);ee.insertBefore(ze,ie)}else{for(;ie!=we.node;)ie=ae(ie);var Ie=E&&y!=null&&y<=ce&&we.lineNumber;we.changes&&(at(we.changes,"gutter")>-1&&(Ie=!1),so(a,we,ce,x)),Ie&&(Ht(we.lineNumber),we.lineNumber.appendChild(document.createTextNode(lt(a.options,ce)))),ie=we.node.nextSibling}ce+=we.size}for(;ie;)ie=ae(ie)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(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+Mr(a)+"px"}function Fs(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ee=b+"px",ie=0;ie<x.length;ie++)if(!x[ie].hidden){a.options.fixedGutter&&(x[ie].gutter&&(x[ie].gutter.style.left=ee),x[ie].gutterBackground&&(x[ie].gutterBackground.style.left=ee));var ae=x[ie].alignable;if(ae)for(var se=0;se<ae.length;se++)ae[se].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Os(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=lt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(_e("div",[_e("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ee=E.firstChild.offsetWidth,ie=E.offsetWidth-ee;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ee,b.lineGutter.offsetWidth-ie)+1,b.lineNumWidth=b.lineNumInnerWidth+ie,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",ts(a.display),!0}return!1}function is(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ee=a[E],ie=null;if(typeof ee!="string"&&(ie=ee.style,ee=ee.className),ee=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ee,style:ie})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Is(a){var y=a.gutters,x=a.gutterSpecs;Ht(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ee=E.className,ie=E.style,ae=y.appendChild(_e("div",null,"CodeMirror-gutter "+ee));ie&&(ae.style.cssText=ie),ee=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ia(a){Is(a.display),Sr(a),Fs(a)}function iu(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=_e("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=_e("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=ot("div",null,"CodeMirror-code"),E.selectionDiv=_e("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=_e("div",null,"CodeMirror-cursors"),E.measure=_e("div",null,"CodeMirror-measure"),E.lineMeasure=_e("div",null,"CodeMirror-measure"),E.lineSpace=ot("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=ot("div",[E.lineSpace],"CodeMirror-lines");E.mover=_e("div",[ee],null,"position: relative"),E.sizer=_e("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=_e("div",null,null,"position: absolute; height: "+Gt+"px; width: 1px;"),E.gutters=_e("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=_e("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=_e("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),pe&&ge<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Fe&&!(ue&&De)&&(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=is(b.gutters,b.lineNumbers),Is(E),x.init(E)}var Aa=0,Fr=null;pe?Fr=-.53:ue?Fr=15:xe?Fr=-.7:je&&(Fr=-1/3);function Ns(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function ru(a){var y=Ns(a);return y.x*=Fr,y.y*=Fr,y}function _s(a,y){var x=Ns(y),b=x.x,E=x.y,ee=a.display,ie=ee.scroller,ae=ie.scrollWidth>ie.clientWidth,se=ie.scrollHeight>ie.clientHeight;if(b&&ae||E&&se){if(E&&ke&&Fe){e:for(var ce=y.target,ye=ee.view;ce!=ie;ce=ce.parentNode)for(var we=0;we<ye.length;we++)if(ye[we].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!ue&&!fe&&Fr!=null){E&&se&&$o(a,Math.max(0,ie.scrollTop+E*Fr)),ko(a,Math.max(0,ie.scrollLeft+b*Fr)),(!E||E&&se)&&an(y),ee.wheelStartX=null;return}if(E&&Fr!=null){var ze=E*Fr,Ie=a.doc.scrollTop,ht=Ie+ee.wrapper.clientHeight;ze<0?Ie=Math.max(0,Ie+ze-50):ht=Math.min(a.doc.height,ht+ze+50),es(a,{top:Ie,bottom:ht})}Aa<20&&(ee.wheelStartX==null?(ee.wheelStartX=ie.scrollLeft,ee.wheelStartY=ie.scrollTop,ee.wheelDX=b,ee.wheelDY=E,setTimeout(function(){if(ee.wheelStartX!=null){var yt=ie.scrollLeft-ee.wheelStartX,Bt=ie.scrollTop-ee.wheelStartY,Xt=Bt&&ee.wheelDY&&Bt/ee.wheelDY||yt&&ee.wheelDX&&yt/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,Xt&&(Fr=(Fr*Aa+Xt)/(Aa+1),++Aa)}},200)):(ee.wheelDX+=b,ee.wheelDY+=E))}}var Or=function(a,y){this.ranges=a,this.primIndex=y};Or.prototype.primary=function(){return this.ranges[this.primIndex]},Or.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(!Nt(x.anchor,b.anchor)||!Nt(x.head,b.head))return!1}return!0},Or.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new mi(Qt(this.ranges[y].anchor),Qt(this.ranges[y].head));return new Or(a,this.primIndex)},Or.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Or.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(ct(y,b.from())>=0&&ct(a,b.to())<=0)return x}return-1};var mi=function(a,y){this.anchor=a,this.head=y};mi.prototype.from=function(){return Mt(this.anchor,this.head)},mi.prototype.to=function(){return nn(this.anchor,this.head)},mi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kr(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(ze,Ie){return ct(ze.from(),Ie.from())}),x=at(y,E);for(var ee=1;ee<y.length;ee++){var ie=y[ee],ae=y[ee-1],se=ct(ae.to(),ie.from());if(b&&!ie.empty()?se>0:se>=0){var ce=Mt(ae.from(),ie.from()),ye=nn(ae.to(),ie.to()),we=ae.empty()?ie.from()==ie.head:ae.from()==ae.head;ee<=x&&--x,y.splice(--ee,2,new mi(we?ye:ce,we?ce:ye))}}return new Or(y,x)}function po(a,y){return new Or([new mi(a,y||a)],0)}function vo(a){return a.text?Re(a.from.line+a.text.length-1,Oe(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(ct(a,y.from)<0)return a;if(ct(a,y.to)<=0)return vo(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=vo(y).ch-y.to.ch),Re(x,b)}function rs(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new mi(Hs(E.anchor,y),Hs(E.head,y)))}return Kr(a.cm,x,a.sel.primIndex)}function Ws(a,y,x){return a.line==y.line?Re(x.line,a.ch-y.ch+x.ch):Re(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Re(a.first,0),ee=E,ie=0;ie<y.length;ie++){var ae=y[ie],se=Ws(ae.from,E,ee),ce=Ws(vo(ae),E,ee);if(E=ae.to,ee=ce,x=="around"){var ye=a.sel.ranges[ie],we=ct(ye.head,ye.anchor)<0;b[ie]=new mi(we?ce:se,we?se:ce)}else b[ie]=new mi(se,se)}return new Or(b,a.sel.primIndex)}function os(a){a.doc.mode=$n(a.options,a.doc.modeOption),ra(a)}function ra(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,na(a,100),a.state.modeGen++,a.curOp&&Sr(a)}function zs(a,y){return y.from.ch==0&&y.to.ch==0&&Oe(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(on){return x?x[on]:null}function ee(on,Jt,cn){Ai(on,Jt,cn,b),Ii(on,"change",on,y)}function ie(on,Jt){for(var cn=[],Cn=on;Cn<Jt;++Cn)cn.push(new Qn(ce[Cn],E(Cn),b));return cn}var ae=y.from,se=y.to,ce=y.text,ye=Qe(a,ae.line),we=Qe(a,se.line),ze=Oe(ce),Ie=E(ce.length-1),ht=se.line-ae.line;if(y.full)a.insert(0,ie(0,ce.length)),a.remove(ce.length,a.size-ce.length);else if(zs(a,y)){var yt=ie(0,ce.length-1);ee(we,we.text,Ie),ht&&a.remove(ae.line,ht),yt.length&&a.insert(ae.line,yt)}else if(ye==we)if(ce.length==1)ee(ye,ye.text.slice(0,ae.ch)+ze+ye.text.slice(se.ch),Ie);else{var Bt=ie(1,ce.length-1);Bt.push(new Qn(ze+ye.text.slice(se.ch),Ie,b)),ee(ye,ye.text.slice(0,ae.ch)+ce[0],E(0)),a.insert(ae.line+1,Bt)}else if(ce.length==1)ee(ye,ye.text.slice(0,ae.ch)+ce[0]+we.text.slice(se.ch),E(0)),a.remove(ae.line+1,ht);else{ee(ye,ye.text.slice(0,ae.ch)+ce[0],E(0)),ee(we,ze+we.text.slice(se.ch),Ie);var Xt=ie(1,ce.length-1);ht>1&&a.remove(ae.line+1,ht-1),a.insert(ae.line+1,Xt)}Ii(a,"change",a,y)}function mo(a,y,x){function b(E,ee,ie){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var se=E.linked[ae];if(se.doc!=ee){var ce=ie&&se.sharedHist;x&&!ce||(y(se.doc,ce),b(se.doc,E,ce))}}}b(a,null,!0)}function Zs(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),os(a),Gs(a),a.options.lineWrapping||_n(a),a.options.mode=y.modeOption,Sr(a)}function Gs(a){(a.doc.direction=="rtl"?Je:$e)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Pr(a,function(){Gs(a),Sr(a)})}function Pa(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 ss(a,y){var x={from:Qt(y.from),to:vo(y),text:Ut(a,y.from,y.to)};return Us(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Us(b,x,y.from.line,y.to.line+1)},!0),x}function js(a){for(;a.length;){var y=Oe(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return js(a.done),Oe(a.done);if(a.done.length&&!Oe(a.done).ranges)return Oe(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),Oe(a.done)}function Vs(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,ie,ae;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ie=su(E,E.lastOp==b)))ae=Oe(ie.changes),ct(y.from,y.to)==0&&ct(y.from,ae.to)==0?ae.to=vo(y):ie.changes.push(ss(a,y));else{var se=Oe(E.done);for((!se||!se.ranges)&&Ba(a.sel,E.done),ie={changes:[ss(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=ee,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ae||tn(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||lu(a,ee,Oe(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&js(E.undone)}function Ba(a,y){var x=Oe(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Us(a,y,x,b){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(ie){ie.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=ie.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function hu(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 Ks(a,y){var x=hu(a,y),b=Ti(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ee=x[E],ie=b[E];if(ee&&ie)e:for(var ae=0;ae<ie.length;++ae){for(var se=ie[ae],ce=0;ce<ee.length;++ce)if(ee[ce].marker==se.marker)continue e;ee.push(se)}else ie&&(x[E]=ie)}return x}function Io(a,y,x){for(var b=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){b.push(x?Or.prototype.deepCopy.call(ee):ee);continue}var ie=ee.changes,ae=[];b.push({changes:ae});for(var se=0;se<ie.length;++se){var ce=ie[se],ye=void 0;if(ae.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var we in ce)(ye=we.match(/^spans_(\d+)$/))&&at(y,Number(ye[1]))>-1&&(Oe(ae)[we]=ce[we],delete ce[we])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=ct(y,E)<0;ee!=ct(x,E)<0?(E=y,y=x):ee!=ct(y,x)<0&&(y=x)}return new mi(E,y)}else return new mi(x||y,y)}function Ra(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),pr(a,new Or([ls(a.sel.primary(),y,x,E)],0),b)}function Ys(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ee=0;ee<a.sel.ranges.length;ee++)b[ee]=ls(a.sel.ranges[ee],y[ee],null,E);var ie=Kr(a.cm,b,a.sel.primIndex);pr(a,ie,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,pr(a,Kr(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){pr(a,po(y,x),b)}function du(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ee=0;ee<E.length;ee++)this.ranges[ee]=new mi(Ae(a,E[ee].anchor),Ae(a,E[ee].head))},origin:x&&x.origin};return tn(a,"beforeSelectionChange",a,b),a.cm&&tn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Kr(a.cm,b.ranges,b.ranges.length-1):y}function Js(a,y,x){var b=a.history.done,E=Oe(b);E&&E.ranges?(b[b.length-1]=y,Fa(a,y,x)):pr(a,y,x)}function pr(a,y,x){Fa(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Fa(a,y,x){(It(a,"beforeSelectionChange")||a.cm&&It(a.cm,"beforeSelectionChange"))&&(y=du(a,y,x));var b=x&&x.bias||(ct(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Fo(a.cm)}function Qs(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,pn(a.cm)),Ii(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,ee=0;ee<y.ranges.length;ee++){var ie=y.ranges[ee],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],se=Oa(a,ie.anchor,ae&&ae.anchor,x,b),ce=Oa(a,ie.head,ae&&ae.head,x,b);(E||se!=ie.anchor||ce!=ie.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new mi(se,ce))}return E?Kr(a.cm,E,y.primIndex):y}function No(a,y,x,b,E){var ee=Qe(a,y.line);if(ee.markedSpans)for(var ie=0;ie<ee.markedSpans.length;++ie){var ae=ee.markedSpans[ie],se=ae.marker,ce="selectLeft"in se?!se.selectLeft:se.inclusiveLeft,ye="selectRight"in se?!se.selectRight:se.inclusiveRight;if((ae.from==null||(ce?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(ye?ae.to>=y.ch:ae.to>y.ch))){if(E&&(tn(se,"beforeCursorEnter"),se.explicitlyCleared))if(ee.markedSpans){--ie;continue}else break;if(!se.atomic)continue;if(x){var we=se.find(b<0?1:-1),ze=void 0;if((b<0?ye:ce)&&(we=el(a,we,-b,we&&we.line==y.line?ee:null)),we&&we.line==y.line&&(ze=ct(we,x))&&(b<0?ze<0:ze>0))return No(a,we,y,b,E)}var Ie=se.find(b<0?-1:1);return(b<0?ce:ye)&&(Ie=el(a,Ie,b,Ie.line==y.line?ee:null)),Ie?No(a,Ie,y,b,E):null}}return y}function Oa(a,y,x,b,E){var ee=b||1,ie=No(a,y,x,ee,E)||!E&&No(a,y,x,ee,!0)||No(a,y,x,-ee,E)||!E&&No(a,y,x,-ee,!0);return ie||(a.cantEdit=!0,Re(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Ae(a,Re(y.line-1)):null:x>0&&y.ch==(b||Qe(a,y.line)).text.length?y.line<a.first+a.size-1?Re(y.line+1,0):null:new Re(y.line,y.ch+x)}function tl(a){a.setSelection(Re(a.firstLine(),0),Re(a.lastLine()),Be)}function nl(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,ee,ie,ae){E&&(b.from=Ae(a,E)),ee&&(b.to=Ae(a,ee)),ie&&(b.text=ie),ae!==void 0&&(b.origin=ae)}),tn(a,"beforeChange",a,b),a.cm&&tn(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 _o(a,y,x){if(a.cm){if(!a.cm.curOp)return nr(a.cm,_o)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((It(a,"beforeChange")||a.cm&&It(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=fi&&!x&&Gi(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)il(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else il(a,y)}}function il(a,y){if(!(y.text.length==1&&y.text[0]==""&&ct(y.from,y.to)==0)){var x=rs(a,y);Vs(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Ti(a,y));var b=[];mo(a,function(E,ee){!ee&&at(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Ti(E,y))})}}function Ia(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,ie=a.sel,ae=y=="undo"?E.done:E.undone,se=y=="undo"?E.undone:E.done,ce=0;ce<ae.length&&(ee=ae[ce],!(x?ee.ranges&&!ee.equals(a.sel):!ee.ranges));ce++);if(ce!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=ae.pop(),ee.ranges){if(Ba(ee,se),x&&!ee.equals(a.sel)){pr(a,ee,{clearRedo:!1});return}ie=ee}else if(b){ae.push(ee);return}else break;var ye=[];Ba(ie,se),se.push({changes:ye,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var we=It(a,"beforeChange")||a.cm&&It(a.cm,"beforeChange"),ze=function(yt){var Bt=ee.changes[yt];if(Bt.origin=y,we&&!nl(a,Bt,!1))return ae.length=0,{};ye.push(ss(a,Bt));var Xt=yt?rs(a,Bt):Oe(ae);oa(a,Bt,Xt,Ks(a,Bt)),!yt&&a.cm&&a.cm.scrollIntoView({from:Bt.from,to:vo(Bt)});var on=[];mo(a,function(Jt,cn){!cn&&at(on,Jt.history)==-1&&(sl(Jt.history,Bt),on.push(Jt.history)),oa(Jt,Bt,null,Ks(Jt,Bt))})},Ie=ee.changes.length-1;Ie>=0;--Ie){var ht=ze(Ie);if(ht)return ht.v}}}}function rl(a,y){if(y!=0&&(a.first+=y,a.sel=new Or(ut(a.sel.ranges,function(E){return new mi(Re(E.anchor.line+y,E.anchor.ch),Re(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Sr(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 nr(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){rl(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);rl(a,E),y={from:Re(a.first,0),to:Re(y.to.line+E,y.to.ch),text:[Oe(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:Re(ee,Qe(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Ut(a,y.from,y.to),x||(x=rs(a,y)),a.cm?fu(a.cm,y,b):as(a,y,b),Fa(a,x,Be),a.cantEdit&&Oa(a,Re(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,ee=y.from,ie=y.to,ae=!1,se=ee.line;a.options.lineWrapping||(se=Ee(Yt(Qe(b,ee.line))),b.iter(se,ie.line+1,function(Ie){if(Ie==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&pn(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(se,ee.line+y.text.length,function(Ie){var ht=bi(Ie);ht>E.maxLineLength&&(E.maxLine=Ie,E.maxLineLength=ht,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),Li(b,ee.line),na(a,400);var ce=y.text.length-(ie.line-ee.line)-1;y.full?Sr(a):ee.line==ie.line&&y.text.length==1&&!zs(a.doc,y)?ho(a,ee.line,"text"):Sr(a,ee.line,ie.line+1,ce);var ye=It(a,"changes"),we=It(a,"change");if(we||ye){var ze={from:ee,to:ie,text:y.text,removed:y.removed,origin:y.origin};we&&Ii(a,"change",a,ze),ye&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(ze)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var ee;b||(b=x),ct(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),_o(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function al(a,y,x,b){for(var E=0;E<a.length;++E){var ee=a[E],ie=!0;if(ee.ranges){ee.copied||(ee=a[E]=ee.deepCopy(),ee.copied=!0);for(var ae=0;ae<ee.ranges.length;ae++)ol(ee.ranges[ae].anchor,y,x,b),ol(ee.ranges[ae].head,y,x,b);continue}for(var se=0;se<ee.changes.length;++se){var ce=ee.changes[se];if(x<ce.from.line)ce.from=Re(ce.from.line+b,ce.from.ch),ce.to=Re(ce.to.line+b,ce.to.ch);else if(y<=ce.to.line){ie=!1;break}}ie||(a.splice(0,E+1),E=0)}}function sl(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;al(a.done,x,b,E),al(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ee=y;return typeof y=="number"?ee=Qe(a,_t(a,y)):E=Ee(y),E==null?null:(b(ee,E)&&a.cm&&ho(a.cm,E,x),ee)}function sa(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}sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,ji(E),Ii(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 la(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}la.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var ee=Math.min(y,E-a),ie=b.height;if(b.removeInner(a,ee),this.height-=ie-b.height,E==ee&&(this.children.splice(x--,1),b.parent=null),(y-=ee)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var ae=[];this.collapse(ae),this.children=[new sa(ae)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<=ee){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var ie=E.lines.length%25+25,ae=ie;ae<E.lines.length;){var se=new sa(E.lines.slice(ae,ae+=25));E.height-=se.height,this.children.splice(++b,0,se),se.parent=this}E.lines=E.lines.slice(0,ie),this.maybeSpill()}break}a-=ee}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=at(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new la(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<ee){var ie=Math.min(y,ee-a);if(E.iterN(a,ie,x))return!0;if((y-=ie)==0)break;a=0}else a-=ee}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Ee(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var ee=gr(this);jn(x,Math.max(0,x.height-ee)),a&&(Pr(a,function(){ll(a,x,-ee),ho(a,b,"widget")}),Ii(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=gr(this)-y;E&&(zt(this.doc,b)||jn(b,b.height+E),x&&Pr(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Ii(x,"lineWidgetChanged",x,a,Ee(b))}))},Vt(ua);function ll(a,y,x){Fn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),aa(a,y,"widget",function(ie){var ae=ie.widgets||(ie.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=ie,ee&&!zt(a,ie)){var se=Fn(ie)<a.scrollTop;jn(ie,ie.height+gr(E)),se&&qa(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Ii(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:Ee(y)),E}var ul=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Lo(a),It(this,"clear")){var x=this.find();x&&Ii(this,"clear",x.from,x.to)}for(var b=null,E=null,ee=0;ee<this.lines.length;++ee){var ie=this.lines[ee],ae=pi(ie.markedSpans,this);a&&!this.collapsed?ho(a,Ee(ie),"text"):a&&(ae.to!=null&&(E=Ee(ie)),ae.from!=null&&(b=Ee(ie))),ie.markedSpans=wi(ie.markedSpans,ae),ae.from==null&&this.collapsed&&!zt(this.doc,ie)&&a&&jn(ie,Ar(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var se=0;se<this.lines.length;++se){var ce=Yt(this.lines[se]),ye=bi(ce);ye>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=ye,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Sr(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&qs(a.doc)),a&&Ii(a,"markerCleared",a,this,b,E),y&&Do(a),this.parent&&this.parent.clear()}},go.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var ee=this.lines[E],ie=pi(ee.markedSpans,this);if(ie.from!=null&&(x=Re(y?ee:Ee(ee),ie.from),a==-1))return x;if(ie.to!=null&&(b=Re(y?ee:Ee(ee),ie.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Pr(b,function(){var E=y.line,ee=Ee(y.line),ie=qr(b,ee);if(ie&&(Ko(ie),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!zt(x.doc,E)&&x.height!=null){var ae=x.height;x.height=null;var se=gr(x)-ae;se&&jn(E,E.height+se)}Ii(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||at(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(at(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Vt(go);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 nr(a.cm,Wo)(a,y,x,b,E);var ee=new go(a,E),ie=ct(y,x);if(b&&Dt(b,ee,!1),ie>0||ie==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=ot("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(un(a,y.line,y,x,ee)||y.line!=x.line&&un(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");Jn()}ee.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,se=a.cm,ce;if(a.iter(ae,x.line+1,function(we){se&&ee.collapsed&&!se.options.lineWrapping&&Yt(we)==se.display.maxLine&&(ce=!0),ee.collapsed&&ae!=y.line&&jn(we,0),li(we,new si(ee,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),ee.collapsed&&a.iter(y.line,x.line+1,function(we){zt(a,we)&&jn(we,0)}),ee.clearOnEnter&&kt(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Mi(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++ul,ee.atomic=!0),se){if(ce&&(se.curOp.updateMaxLine=!0),ee.collapsed)Sr(se,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var ye=y.line;ye<=x.line;ye++)ho(se,ye,"text");ee.atomic&&qs(se.doc),Ii(se,"markerAdded",se,ee)}return ee}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Ii(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Vt(ca);function vu(a,y,x,b,E){b=Dt(b),b.shared=!1;var ee=[Wo(a,y,x,b,E)],ie=ee[0],ae=b.widgetNode;return mo(a,function(se){ae&&(b.widgetNode=ae.cloneNode(!0)),ee.push(Wo(se,Ae(se,y),Ae(se,x),b,E));for(var ce=0;ce<se.linked.length;++ce)if(se.linked[ce].isParent)return;ie=Oe(ee)}),new ca(ee,ie)}function cl(a){return a.findMarks(Re(a.first,0),a.clipPos(Re(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),ee=a.clipPos(E.from),ie=a.clipPos(E.to);if(ct(ee,ie)){var ae=Wo(a,ee,ie,b.primary,b.primary.type);b.markers.push(ae),ae.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ee=[E.primary.doc];mo(E.primary.doc,function(se){return ee.push(se)});for(var ie=0;ie<E.markers.length;ie++){var ae=E.markers[ie];at(ee,ae.doc)==-1&&(ae.parent=null,E.markers.splice(ie--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,kr=function(a,y,x,b,E){if(!(this instanceof kr))return new kr(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new Qn("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ee=Re(x,0);this.sel=po(ee),this.history=new Pa(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)),as(this,{from:ee,to:ee,text:a}),pr(this,po(ee),Be)};kr.prototype=te(la.prototype,{constructor:kr,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=Sn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ir(function(a){var y=Re(this.first,0),x=this.first+this.size-1;_o(this,{from:y,to:Re(x,Qe(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),pr(this,po(y),Be)}),replaceRange:function(a,y,x,b){y=Ae(this,y),x=x?Ae(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Ut(this,Ae(this,a),Ae(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 Qe(this,a)},getLineNumber:function(a){return Ee(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=Qe(this,a)),Yt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Ae(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:ir(function(a,y,x){Xs(this,Ae(this,typeof a=="number"?Re(a,y||0):a),null,x)}),setSelection:ir(function(a,y,x){Xs(this,Ae(this,a),Ae(this,y||a),x)}),extendSelection:ir(function(a,y,x){Ra(this,Ae(this,a),y&&Ae(this,y),x)}),extendSelections:ir(function(a,y){Ys(this,Zt(this,a),y)}),extendSelectionsBy:ir(function(a,y){var x=ut(this.sel.ranges,a);Ys(this,Zt(this,x),y)}),setSelections:ir(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new mi(Ae(this,a[E].anchor),Ae(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),pr(this,Kr(this.cm,b,y),x)}}),addSelection:ir(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new mi(Ae(this,a),Ae(this,y||a))),pr(this,Kr(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=Ut(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=Ut(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:ir(function(a,y,x){for(var b=[],E=this.sel,ee=0;ee<E.ranges.length;ee++){var ie=E.ranges[ee];b[ee]={from:ie.from(),to:ie.to(),text:this.splitLines(a[ee]),origin:x}}for(var ae=y&&y!="end"&&ou(this,b,y),se=b.length-1;se>=0;se--)_o(this,b[se]);ae?Js(this,ae):this.cm&&Fo(this.cm)}),undo:ir(function(){Ia(this,"undo")}),redo:ir(function(){Ia(this,"redo")}),undoSelection:ir(function(){Ia(this,"undo",!0)}),redoSelection:ir(function(){Ia(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Pa(this.history.maxGeneration),mo(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Io(this.history.done),undone:Io(this.history.undone)}},setHistory:function(a){var y=this.history=new Pa(this.history.maxGeneration);y.done=Io(a.done.slice(0),null,!0),y.undone=Io(a.undone.slice(0),null,!0)},setGutterMarker:ir(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&ne(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ir(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,ne(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!wt(this,a)||(y=a,a=Qe(this,a),!a))return null}else if(y=Ee(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:ir(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(rt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ir(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",ee=b[E];if(ee)if(x==null)b[E]=null;else{var ie=ee.match(rt(x));if(!ie)return!1;var ae=ie.index+ie[0].length;b[E]=ee.slice(0,ie.index)+(!ie.index||ae==ee.length?"":" ")+ee.slice(ae)||null}else return!1;return!0})}),addLineWidget:ir(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Wo(this,Ae(this,a),Ae(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=Ae(this,a),Wo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Ae(this,a);var y=[],x=Qe(this,a.line).markedSpans;if(x)for(var b=0;b<x.length;++b){var E=x[b];(E.from==null||E.from<=a.ch)&&(E.to==null||E.to>=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,x){a=Ae(this,a),y=Ae(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var ie=ee.markedSpans;if(ie)for(var ae=0;ae<ie.length;ae++){var se=ie[ae];!(se.to!=null&&E==a.line&&a.ch>=se.to||se.from==null&&E!=a.line||se.from!=null&&E==y.line&&se.from>=y.ch)&&(!x||x(se.marker))&&b.push(se.marker.parent||se.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var ee=E.text.length+b;if(ee>a)return y=a,!0;a-=ee,++x}),Ae(this,Re(x,y))},indexFromPos:function(a){a=Ae(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 kr(Sn(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 kr(Sn(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,cl(this)),b},unlinkDoc:function(a){if(a instanceof Ni&&(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(cl(this));break}}if(a.history==this.history){var b=[a.id];mo(a,function(E){return b.push(E.id)},!0),a.history=new Pa(null),a.history.done=Io(this.history.done,b),a.history.undone=Io(this.history.undone,b)}},iterLinkedDocs:function(a){mo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):ri(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:ir(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))})}),kr.prototype.eachLine=kr.prototype.iter;var hl=0;function bu(a){var y=this;if(dl(y),!(et(y,a)||lr(y.display,a))){an(a),pe&&(hl=+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,ee=Array(E),ie=0,ae=function(){++ie==E&&nr(y,function(){x=Ae(y.doc,x);var Ie={from:x,to:x,text:y.doc.splitLines(ee.filter(function(ht){return ht!=null}).join(y.doc.lineSeparator())),origin:"paste"};_o(y.doc,Ie),Js(y.doc,po(Ae(y.doc,x),Ae(y.doc,vo(Ie))))})()},se=function(Ie,ht){if(y.options.allowDropFileTypes&&at(y.options.allowDropFileTypes,Ie.type)==-1){ae();return}var yt=new FileReader;yt.onerror=function(){return ae()},yt.onload=function(){var Bt=yt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Bt)){ae();return}ee[ht]=Bt,ae()},yt.readAsText(Ie)},ce=0;ce<b.length;ce++)se(b[ce],ce);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var ye=a.dataTransfer.getData("Text");if(ye){var we;if(y.state.draggingText&&!y.state.draggingText.copy&&(we=y.listSelections()),Fa(y.doc,po(x,x)),we)for(var ze=0;ze<we.length;++ze)Ho(y.doc,"",we[ze].anchor,we[ze].head,"drag");y.replaceSelection(ye,"around","paste"),y.display.input.focus()}}catch(Ie){}}}}function xu(a,y){if(pe&&(!a.state.draggingText||+new Date-hl<100)){mn(y);return}if(!(et(a,y)||lr(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!je)){var x=_e("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();ks(a,x,b),a.display.dragCursor||(a.display.dragCursor=_e("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ge(a.display.dragCursor,b)}}function dl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function fl(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var ee=0;ee<x.length;ee++)a(x[ee])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;kt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fl(ku)},100))}),kt(window,"blur",function(){return fl(Ro)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var yo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ha=0;ha<10;ha++)yo[ha+48]=yo[ha+96]=String(ha);for(var Na=65;Na<=90;Na++)yo[Na]=String.fromCharCode(Na);for(var da=1;da<=12;da++)yo[da+111]=yo[da+63235]="F"+da;var ro={};ro.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"},ro.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"},ro.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"},ro.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"]},ro.default=ke?ro.macDefault:ro.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ee,ie=0;ie<y.length-1;ie++){var ae=y[ie];if(/^(cmd|meta|m)$/i.test(ae))ee=!0;else if(/^a(lt)?$/i.test(ae))x=!0;else if(/^(c|ctrl|control)$/i.test(ae))b=!0;else if(/^s(hift)?$/i.test(ae))E=!0;else throw new Error("Unrecognized modifier name: "+ae)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ee&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Lu(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=ut(x.split(" "),Eu),ee=0;ee<E.length;ee++){var ie=void 0,ae=void 0;ee==E.length-1?(ae=E.join(" "),ie=b):(ae=E.slice(0,ee+1).join(" "),ie="...");var se=y[ae];if(!se)y[ae]=ie;else if(se!=ie)throw new Error("Inconsistent bindings for "+ae)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function zo(a,y,x,b){y=_a(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 ee=0;ee<y.fallthrough.length;ee++){var ie=zo(a,y.fallthrough[ee],x,b);if(ie)return ie}}}function vl(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ml(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(nt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(nt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(fe&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ml(x,a,y))}function _a(a){return typeof a=="string"?ro[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ee=y(x[E]);b.length&&ct(ee.from,Oe(b).to)<=0;){var ie=b.pop();if(ct(ie.from,ee.from)<0){ee.from=ie.from;break}}b.push(ee)}Pr(a,function(){for(var ae=b.length-1;ae>=0;ae--)Ho(a.doc,"",b[ae].from,b[ae].to,"+delete");Fo(a)})}function cs(a,y,x){var b=St(a.text,y+x,x);return b<0||b>a.text.length?null:b}function hs(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new Re(y.line,b,x<0?"after":"before")}function ds(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=qt(x,y.doc.direction);if(ee){var ie=E<0?Oe(ee):ee[0],ae=E<0==(ie.level==1),se=ae?"after":"before",ce;if(ie.level>0||y.doc.direction=="rtl"){var ye=uo(y,x);ce=E<0?x.text.length-1:0;var we=Hr(y,ye,ce).top;ce=gt(function(ze){return Hr(y,ye,ze).top==we},E<0==(ie.level==1)?ie.from:ie.to-1,ce),se=="before"&&(ce=cs(x,ce,1))}else ce=E<0?ie.to:ie.from;return new Re(b,ce,se)}}return new Re(b,E<0?x.text.length:0,E<0?"before":"after")}function Du(a,y,x,b){var E=qt(y,a.doc.direction);if(!E)return hs(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ee=Wt(E,x.ch,x.sticky),ie=E[ee];if(a.doc.direction=="ltr"&&ie.level%2==0&&(b>0?ie.to>x.ch:ie.from<x.ch))return hs(y,x,b);var ae=function(Xt,on){return cs(y,Xt instanceof Re?Xt.ch:Xt,on)},se,ce=function(Xt){return a.options.lineWrapping?(se=se||uo(a,y),Ui(a,y,se,Xt)):{begin:0,end:y.text.length}},ye=ce(x.sticky=="before"?ae(x,-1):x.ch);if(a.doc.direction=="rtl"||ie.level==1){var we=ie.level==1==b<0,ze=ae(x,we?1:-1);if(ze!=null&&(we?ze<=ie.to&&ze<=ye.end:ze>=ie.from&&ze>=ye.begin)){var Ie=we?"before":"after";return new Re(x.line,ze,Ie)}}var ht=function(Xt,on,Jt){for(var cn=function(Bi,rr){return rr?new Re(x.line,ae(Bi,1),"before"):new Re(x.line,Bi,"after")};Xt>=0&&Xt<E.length;Xt+=on){var Cn=E[Xt],vn=on>0==(Cn.level!=1),Gn=vn?Jt.begin:ae(Jt.end,-1);if(Cn.from<=Gn&&Gn<Cn.to||(Gn=vn?Cn.from:ae(Cn.to,-1),Jt.begin<=Gn&&Gn<Jt.end))return cn(Gn,vn)}},yt=ht(ee+b,b,ye);if(yt)return yt;var Bt=b>0?ye.end:ae(ye.begin,-1);return Bt!=null&&!(b>0&&Bt==y.text.length)&&(yt=ht(b>0?0:E.length-1,b,ce(Bt)),yt)?yt:null}var fa={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Be)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=Qe(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Re(y.head.line+1,0)}:{from:y.head,to:Re(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:Re(y.from().line,0),to:Ae(a.doc,Re(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:Re(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Zo(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return{from:b,to:y.from()}})},delWrappedLineRight:function(a){return Zo(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div");return{from:y.from(),to:b}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(Re(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Re(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return yl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Mu(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")},qe)},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")},qe)},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/)?bl(a,y.head):b},qe)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var ee=x[E].from(),ie=ve(a.getLine(ee.line),ee.ch,b);y.push(Lt(b-ie%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Pr(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ee=Qe(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new Re(E.line,E.ch-1)),E.ch>0)E=new Re(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Re(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ie=Qe(a.doc,E.line-1).text;ie&&(E=new Re(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+ie.charAt(ie.length-1),Re(E.line-1,ie.length-1),E,"+transpose"))}}x.push(new mi(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Pr(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);Fo(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=Qe(a.doc,y),b=Yt(x);return b!=x&&(y=Ee(b)),ds(!0,a,b,y,1)}function Mu(a,y){var x=Qe(a.doc,y),b=xn(x);return b!=x&&(y=Ee(b)),ds(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=Qe(a.doc,x.line),E=qt(b,a.doc.direction);if(!E||E[0].level==0){var ee=Math.max(x.ch,b.text.search(/\S/)),ie=y.line==x.line&&y.ch<=ee&&y.ch;return Re(x.line,ie?0:ee,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=fa[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=mt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Tu(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 Au=new he;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Au.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Tu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Ii(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(an(x),Xa(a)),!!E}function wl(a,y){var x=gl(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 Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var fs=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Pe(),!et(y,a))){pe&&ge<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);fe&&(fs=b?x:null,!b&&x==88&&!In&&(ke?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ue&&!ke&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Bu(y)}}function Bu(a){var y=a.display.lineDiv;Je(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&($e(y,"CodeMirror-crosshair"),jt(document,"keyup",x),jt(document,"mouseover",x))}kt(document,"keyup",x),kt(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),et(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(lr(y.display,a)||et(y,a)||a.ctrlKey&&!a.altKey||ke&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==fs){fs=null,an(a);return}if(!(fe&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Pu(y,a,E)||y.display.input.onKeyPress(a))}}}var Ru=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Ru>a&&ct(y,this.pos)==0&&x==this.button};var va,ma;function Fu(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 ps(x,a,y),va=null,"double"):(va=new ps(x,a,y),ma=null,"single")}function El(a){var y=this,x=y.display;if(!(et(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,lr(x,a)){Fe||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=Vn(a),ee=b?Fu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Ou(y,E,b,ee,a))&&(E==1?b?Nu(y,b,ee,a):ni(a)==x.scroller&&an(a):E==2?(b&&Ra(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Ve?y.display.input.onContextMenu(a):Ls(y)))}}}function Ou(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,pa(a,ml(ee,E),E,function(ie){if(typeof ie=="string"&&(ie=fa[ie]),!ie)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=ie(a,x)!=mt}finally{a.state.suppressEdits=!1}return ae})}function Iu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=Ye?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=ke?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(ke?x.altKey:x.ctrlKey)),E}function Nu(a,y,x,b){pe?setTimeout(en(Es,a),0):a.curOp.focus=Pe();var E=Iu(a,x,b),ee=a.doc.sel,ie;a.options.dragDrop&&zi&&!a.isReadOnly()&&x=="single"&&(ie=ee.contains(y))>-1&&(ct((ie=ee.ranges[ie]).from(),y)<0||y.xRel>0)&&(ct(ie.to(),y)>0||y.xRel<0)?_u(a,b,y,E):Hu(a,b,y,E)}function _u(a,y,x,b){var E=a.display,ee=!1,ie=nr(a,function(ce){Fe&&(E.scroller.draggable=!1),a.state.draggingText=!1,jt(E.wrapper.ownerDocument,"mouseup",ie),jt(E.wrapper.ownerDocument,"mousemove",ae),jt(E.scroller,"dragstart",se),jt(E.scroller,"drop",ie),ee||(an(ce),b.addNew||Ra(a.doc,x,null,null,b.extend),Fe&&!je||pe&&ge==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(ce){ee=ee||Math.abs(y.clientX-ce.clientX)+Math.abs(y.clientY-ce.clientY)>=10},se=function(){return ee=!0};Fe&&(E.scroller.draggable=!0),a.state.draggingText=ie,ie.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),kt(E.wrapper.ownerDocument,"mouseup",ie),kt(E.wrapper.ownerDocument,"mousemove",ae),kt(E.scroller,"dragstart",se),kt(E.scroller,"drop",ie),Ls(a),setTimeout(function(){return E.input.focus()},20)}function Ll(a,y,x){if(x=="char")return new mi(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new mi(Re(y.line,0),Ae(a.doc,Re(y.line+1,0)));var b=x(a,y);return new mi(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;an(y);var ie,ae,se=ee.sel,ce=se.ranges;if(b.addNew&&!b.extend?(ae=ee.sel.contains(x),ae>-1?ie=ce[ae]:ie=new mi(x,x)):(ie=ee.sel.primary(),ae=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(ie=new mi(x,x)),x=Co(a,y,!0,!0),ae=-1;else{var ye=Ll(a,x,b.unit);b.extend?ie=ls(ie,ye.anchor,ye.head,b.extend):ie=ye}b.addNew?ae==-1?(ae=ce.length,pr(ee,Kr(a,ce.concat([ie]),ae),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[ae].empty()&&b.unit=="char"&&!b.extend?(pr(ee,Kr(a,ce.slice(0,ae).concat(ce.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),se=ee.sel):us(ee,ae,ie,Ke):(ae=0,pr(ee,new Or([ie],0),Ke),se=ee.sel);var we=x;function ze(Jt){if(ct(we,Jt)!=0)if(we=Jt,b.unit=="rectangle"){for(var cn=[],Cn=a.options.tabSize,vn=ve(Qe(ee,x.line).text,x.ch,Cn),Gn=ve(Qe(ee,Jt.line).text,Jt.ch,Cn),Bi=Math.min(vn,Gn),rr=Math.max(vn,Gn),_i=Math.min(x.line,Jt.line),Br=Math.min(a.lastLine(),Math.max(x.line,Jt.line));_i<=Br;_i++){var Er=Qe(ee,_i).text,Qi=Kt(Er,Bi,Cn);Bi==rr?cn.push(new mi(Re(_i,Qi),Re(_i,Qi))):Er.length>Qi&&cn.push(new mi(Re(_i,Qi),Re(_i,Kt(Er,rr,Cn))))}cn.length||cn.push(new mi(x,x)),pr(ee,Kr(a,se.ranges.slice(0,ae).concat(cn),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(Jt)}else{var Lr=ie,cr=Ll(a,Jt,b.unit),er=Lr.anchor,qi;ct(cr.anchor,er)>0?(qi=cr.head,er=Mt(Lr.from(),cr.anchor)):(qi=cr.anchor,er=nn(Lr.to(),cr.head));var Wi=se.ranges.slice(0);Wi[ae]=Wu(a,new mi(Ae(ee,er),qi)),pr(ee,Kr(a,Wi,ae),Ke)}}var Ie=E.wrapper.getBoundingClientRect(),ht=0;function yt(Jt){var cn=++ht,Cn=Co(a,Jt,!0,b.unit=="rectangle");if(Cn)if(ct(Cn,we)!=0){a.curOp.focus=Pe(),ze(Cn);var vn=Da(E,ee);(Cn.line>=vn.to||Cn.line<vn.from)&&setTimeout(nr(a,function(){ht==cn&&yt(Jt)}),150)}else{var Gn=Jt.clientY<Ie.top?-20:Jt.clientY>Ie.bottom?20:0;Gn&&setTimeout(nr(a,function(){ht==cn&&(E.scroller.scrollTop+=Gn,yt(Jt))}),50)}}function Bt(Jt){a.state.selectingText=!1,ht=1/0,Jt&&(an(Jt),E.input.focus()),jt(E.wrapper.ownerDocument,"mousemove",Xt),jt(E.wrapper.ownerDocument,"mouseup",on),ee.history.lastSelOrigin=null}var Xt=nr(a,function(Jt){Jt.buttons===0||!Vn(Jt)?Bt(Jt):yt(Jt)}),on=nr(a,Bt);a.state.selectingText=on,kt(E.wrapper.ownerDocument,"mousemove",Xt),kt(E.wrapper.ownerDocument,"mouseup",on)}function Wu(a,y){var x=y.anchor,b=y.head,E=Qe(a.doc,x.line);if(ct(x,b)==0&&x.sticky==b.sticky)return y;var ee=qt(E);if(!ee)return y;var ie=Wt(ee,x.ch,x.sticky),ae=ee[ie];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var se=ie+(ae.from==x.ch==(ae.level!=1)?0:1);if(se==0||se==ee.length)return y;var ce;if(b.line!=x.line)ce=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var ye=Wt(ee,b.ch,b.sticky),we=ye-ie||(b.ch-x.ch)*(ae.level==1?-1:1);ye==se-1||ye==se?ce=we<0:ce=we>0}var ze=ee[se+(ce?-1:0)],Ie=ce==(ze.level==1),ht=Ie?ze.from:ze.to,yt=Ie?"after":"before";return x.ch==ht&&x.sticky==yt?y:new mi(new Re(x.line,ht,yt),b)}function Dl(a,y,x,b){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(ze){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&an(y);var ie=a.display,ae=ie.lineDiv.getBoundingClientRect();if(ee>ae.bottom||!It(a,x))return sn(y);ee-=ae.top-ie.viewOffset;for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=ie.gutters.childNodes[se];if(ce&&ce.getBoundingClientRect().right>=E){var ye=Me(a.doc,ee),we=a.display.gutterSpecs[se];return tn(a,x,a,ye,we.className,y),sn(y)}}}function vs(a,y){return Dl(a,y,"gutterClick",!0)}function Ml(a,y){lr(a.display,y)||zu(a,y)||et(a,y,"contextmenu")||Ve||a.display.input.onContextMenu(y)}function zu(a,y){return It(a,"gutterContextMenu")?Dl(a,y,"gutterContextMenu",!1):!1}function Tl(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 Go={toString:function(){return"CodeMirror.Init"}},Al={},Wa={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,ie){a.defaults[b]=E,ee&&(y[b]=ie?function(ae,se,ce){ce!=Go&&ee(ae,se,ce)}:ee)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ra(b),wo(b),Sr(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ee=[],ie=b.doc.first;b.doc.iter(function(se){for(var ce=0;;){var ye=se.text.indexOf(E,ce);if(ye==-1)break;ce=ye+E.length,ee.push(Re(ie,ye))}ie++});for(var ae=ee.length-1;ae>=0;ae--)Ho(b.doc,E,ee[ae],Re(ee[ae].line,ee[ae].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=Go&&b.refresh()}),x("specialCharPlaceholder",zr,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",De?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!tt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Tl(b),ia(b)},!0),x("keyMap","default",function(b,E,ee){var ie=_a(E),ae=ee!=Go&&_a(ee);ae&&ae.detach&&ae.detach(b,ie),ie.attach&&ie.attach(b,ae||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=is(E,b.options.lineNumbers),ia(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Oo(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Oo(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=is(b.options.gutters,E),ia(b)},!0),x("firstLineNumber",1,ia,!0),x("lineNumberFormatter",function(b){return b},ia,!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"&&(Ro(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ra,!0),x("addModeClass",!1,ra,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ra,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Go;if(!y!=!b){var E=a.display.dragFunctions,ee=y?kt:jt;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(Je(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):($e(a.display.wrapper,"CodeMirror-wrap"),_n(a)),Ya(a),Sr(a),wo(a),setTimeout(function(){return Oo(a)},100)}function Ni(a,y){var x=this;if(!(this instanceof Ni))return new Ni(a,y);this.options=y=y?Dt(y):{},Dt(Al,y,!1);var b=y.value;typeof b=="string"?b=new kr(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Ni.inputStyles[y.inputStyle](this),ee=this.display=new iu(a,b,E,y);ee.wrapper.CodeMirror=this,Tl(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bs(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new he,keySeq:null,specialChars:null},y.autofocus&&!De&&ee.input.focus(),pe&&ge<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Lo(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!De||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Ro(this);for(var ie in Wa)Wa.hasOwnProperty(ie)&&Wa[ie](this,y[ie],Go);Os(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<ms.length;++ae)ms[ae](this);Do(this),Fe&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}Ni.defaults=Al,Ni.optionHandlers=Wa;function Vu(a){var y=a.display;kt(y.scroller,"mousedown",nr(a,El)),pe&&ge<11?kt(y.scroller,"dblclick",nr(a,function(se){if(!et(a,se)){var ce=Co(a,se);if(!(!ce||vs(a,se)||lr(a.display,se))){an(se);var ye=a.findWordAt(ce);Ra(a.doc,ye.anchor,ye.head)}}})):kt(y.scroller,"dblclick",function(se){return et(a,se)||an(se)}),kt(y.scroller,"contextmenu",function(se){return Ml(a,se)}),kt(y.input.getField(),"contextmenu",function(se){y.scroller.contains(se.target)||Ml(a,se)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function ee(se){if(se.touches.length!=1)return!1;var ce=se.touches[0];return ce.radiusX<=1&&ce.radiusY<=1}function ie(se,ce){if(ce.left==null)return!0;var ye=ce.left-se.left,we=ce.top-se.top;return ye*ye+we*we>20*20}kt(y.scroller,"touchstart",function(se){if(!et(a,se)&&!ee(se)&&!vs(a,se)){y.input.ensurePolled(),clearTimeout(x);var ce=+new Date;y.activeTouch={start:ce,moved:!1,prev:ce-b.end<=300?b:null},se.touches.length==1&&(y.activeTouch.left=se.touches[0].pageX,y.activeTouch.top=se.touches[0].pageY)}}),kt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),kt(y.scroller,"touchend",function(se){var ce=y.activeTouch;if(ce&&!lr(y,se)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var ye=a.coordsChar(y.activeTouch,"page"),we;!ce.prev||ie(ce,ce.prev)?we=new mi(ye,ye):!ce.prev.prev||ie(ce,ce.prev.prev)?we=a.findWordAt(ye):we=new mi(Re(ye.line,0),Ae(a.doc,Re(ye.line+1,0))),a.setSelection(we.anchor,we.head),a.focus(),an(se)}E()}),kt(y.scroller,"touchcancel",E),kt(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),tn(a,"scroll",a))}),kt(y.scroller,"mousewheel",function(se){return _s(a,se)}),kt(y.scroller,"DOMMouseScroll",function(se){return _s(a,se)}),kt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(se){et(a,se)||mn(se)},over:function(se){et(a,se)||(wu(a,se),mn(se))},start:function(se){return xu(a,se)},drop:nr(a,bu),leave:function(se){et(a,se)||dl(a)}};var ae=y.input.getField();kt(ae,"keyup",function(se){return Sl.call(a,se)}),kt(ae,"keydown",nr(a,Cl)),kt(ae,"keypress",nr(a,kl)),kt(ae,"focus",function(se){return Ja(a,se)}),kt(ae,"blur",function(se){return Ro(a,se)})}var ms=[];Ni.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=ci(a,y).state:x="prev");var ie=a.options.tabSize,ae=Qe(E,y),se=ve(ae.text,null,ie);ae.stateAfter&&(ae.stateAfter=null);var ce=ae.text.match(/^\s*/)[0],ye;if(!b&&!/\S/.test(ae.text))ye=0,x="not";else if(x=="smart"&&(ye=E.mode.indent(ee,ae.text.slice(ce.length),ae.text),ye==mt||ye>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?ye=ve(Qe(E,y-1).text,null,ie):ye=0:x=="add"?ye=se+a.options.indentUnit:x=="subtract"?ye=se-a.options.indentUnit:typeof x=="number"&&(ye=se+x),ye=Math.max(0,ye);var we="",ze=0;if(a.options.indentWithTabs)for(var Ie=Math.floor(ye/ie);Ie;--Ie)ze+=ie,we+=" ";if(ze<ye&&(we+=Lt(ye-ze)),we!=ce)return Ho(E,we,Re(y,0),Re(y,ce.length),"+input"),ae.stateAfter=null,!0;for(var ht=0;ht<E.sel.ranges.length;ht++){var yt=E.sel.ranges[ht];if(yt.head.line==y&&yt.head.ch<ce.length){var Bt=Re(y,ce.length);us(E,ht,new mi(Bt,Bt));break}}}var Yr=null;function za(a){Yr=a}function gs(a,y,x,b,E){var ee=a.doc;a.display.shift=!1,b||(b=ee.sel);var ie=+new Date-200,ae=E=="paste"||a.state.pasteIncoming>ie,se=ri(y),ce=null;if(ae&&b.ranges.length>1)if(Yr&&Yr.text.join(`
|
|
`)==y){if(b.ranges.length%Yr.text.length==0){ce=[];for(var ye=0;ye<Yr.text.length;ye++)ce.push(ee.splitLines(Yr.text[ye]))}}else se.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=ut(se,function(Xt){return[Xt]}));for(var we=a.curOp.updateInput,ze=b.ranges.length-1;ze>=0;ze--){var Ie=b.ranges[ze],ht=Ie.from(),yt=Ie.to();Ie.empty()&&(x&&x>0?ht=Re(ht.line,ht.ch-x):a.state.overwrite&&!ae?yt=Re(yt.line,Math.min(Qe(ee,yt.line).text.length,yt.ch+Oe(se).length)):ae&&Yr&&Yr.lineWise&&Yr.text.join(`
|
|
`)==se.join(`
|
|
`)&&(ht=yt=Re(ht.line,0)));var Bt={from:ht,to:yt,text:ce?ce[ze%ce.length]:se,origin:E||(ae?"paste":a.state.cutIncoming>ie?"cut":"+input")};_o(a.doc,Bt),Ii(a,"inputRead",a,Bt)}y&&!ae&&Bl(a,y),Fo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=we),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Pl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Pr(y,function(){return gs(y,x,0,null,"paste")}),!0}function Bl(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var ee=a.getModeAt(E.head),ie=!1;if(ee.electricChars){for(var ae=0;ae<ee.electricChars.length;ae++)if(y.indexOf(ee.electricChars.charAt(ae))>-1){ie=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(Qe(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ie=ga(a,E.head.line,"smart"));ie&&Ii(a,"electricInput",a,E.head.line)}}}function Rl(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ee={anchor:Re(E,0),head:Re(E+1,0)};x.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:x}}function Fl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Ol(){var a=_e("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=_e("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Fe?a.style.width="1000px":a.setAttribute("wrap","off"),Le&&(a.style.border="1px solid black"),Fl(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var ee=this.options,ie=ee[b];ee[b]==E&&b!="mode"||(ee[b]=E,y.hasOwnProperty(b)&&nr(this,y[b])(this,E,ie),tn(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"](_a(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,ee=0;ee<E.length;++ee)if(E[ee]==b||E[ee].name==b)return E.splice(ee,1),!0},addOverlay:yr(function(b,E){var ee=b.token?b:a.getMode(this.options,b);if(ee.startState)throw new Error("Overlays may not be stateful.");ft(this.state.overlays,{mode:ee,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ie){return ie.priority}),this.state.modeGen++,Sr(this)}),removeOverlay:yr(function(b){for(var E=this.state.overlays,ee=0;ee<E.length;++ee){var ie=E[ee].modeSpec;if(ie==b||typeof b=="string"&&ie.name==b){E.splice(ee,1),this.state.modeGen++,Sr(this);return}}}),indentLine:yr(function(b,E,ee){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,ee)}),indentSelection:yr(function(b){for(var E=this.doc.sel.ranges,ee=-1,ie=0;ie<E.length;ie++){var ae=E[ie];if(ae.empty())ae.head.line>ee&&(ga(this,ae.head.line,b,!0),ee=ae.head.line,ie==this.doc.sel.primIndex&&Fo(this));else{var se=ae.from(),ce=ae.to(),ye=Math.max(ee,se.line);ee=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var we=ye;we<ee;++we)ga(this,we,b);var ze=this.doc.sel.ranges;se.ch==0&&E.length==ze.length&&ze[ie].from().ch>0&&us(this.doc,ie,new mi(se,ze[ie].to()),Be)}}}),getTokenAt:function(b,E){return hi(this,b,E)},getLineTokens:function(b,E){return hi(this,Re(b),E,!0)},getTokenTypeAt:function(b){b=Ae(this.doc,b);var E=Mn(this,Qe(this.doc,b.line)),ee=0,ie=(E.length-1)/2,ae=b.ch,se;if(ae==0)se=E[2];else for(;;){var ce=ee+ie>>1;if((ce?E[ce*2-1]:0)>=ae)ie=ce;else if(E[ce*2+1]<ae)ee=ce+1;else{se=E[ce*2+2];break}}var ye=se?se.indexOf("overlay "):-1;return ye<0?se:ye==0?null:se.slice(0,ye-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var ee=[];if(!x.hasOwnProperty(E))return ee;var ie=x[E],ae=this.getModeAt(b);if(typeof ae[E]=="string")ie[ae[E]]&&ee.push(ie[ae[E]]);else if(ae[E])for(var se=0;se<ae[E].length;se++){var ce=ie[ae[E][se]];ce&&ee.push(ce)}else ae.helperType&&ie[ae.helperType]?ee.push(ie[ae.helperType]):ie[ae.name]&&ee.push(ie[ae.name]);for(var ye=0;ye<ie._global.length;ye++){var we=ie._global[ye];we.pred(ae,this)&&at(ee,we.val)==-1&&ee.push(we.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=_t(ee,b==null?ee.first+ee.size-1:b),ci(this,b+1,E).state},cursorCoords:function(b,E){var ee,ie=this.doc.sel.primary();return b==null?ee=ie.head:typeof b=="object"?ee=Ae(this.doc,b):ee=b?ie.from():ie.to(),Cr(this,ee,E||"page")},charCoords:function(b,E){return Bo(this,Ae(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ur(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Me(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ee){var ie=!1,ae;if(typeof b=="number"){var se=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>se&&(b=se,ie=!0),ae=Qe(this.doc,b)}else ae=b;return Po(this,ae,{top:0,left:0},E||"page",ee||ie).top+(ie?this.doc.height-Fn(ae):0)},defaultTextHeight:function(){return Ar(this.display)},defaultCharWidth:function(){return Ur(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,ie,ae){var se=this.display;b=Cr(this,Ae(this.doc,b));var ce=b.bottom,ye=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),se.sizer.appendChild(E),ie=="over")ce=b.top;else if(ie=="above"||ie=="near"){var we=Math.max(se.wrapper.clientHeight,this.doc.height),ze=Math.max(se.sizer.clientWidth,se.lineSpace.clientWidth);(ie=="above"||b.bottom+E.offsetHeight>we)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=we&&(ce=b.bottom),ye+E.offsetWidth>ze&&(ye=ze-E.offsetWidth)}E.style.top=ce+"px",E.style.left=E.style.right="",ae=="right"?(ye=se.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?ye=0:ae=="middle"&&(ye=(se.sizer.clientWidth-E.offsetWidth)/2),E.style.left=ye+"px"),ee&&Gl(this,{left:ye,top:ce,right:ye+E.offsetWidth,bottom:ce+E.offsetHeight})},triggerOnKeyDown:yr(Cl),triggerOnKeyPress:yr(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yr(El),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:yr(function(b){Bl(this,b)}),findPosH:function(b,E,ee,ie){var ae=1;E<0&&(ae=-1,E=-E);for(var se=Ae(this.doc,b),ce=0;ce<E&&(se=ys(this.doc,se,ae,ee,ie),!se.hitSide);++ce);return se},moveH:yr(function(b,E){var ee=this;this.extendSelectionsBy(function(ie){return ee.display.shift||ee.doc.extend||ie.empty()?ys(ee.doc,ie.head,b,E,ee.options.rtlMoveVisually):b<0?ie.from():ie.to()},qe)}),deleteH:yr(function(b,E){var ee=this.doc.sel,ie=this.doc;ee.somethingSelected()?ie.replaceSelection("",null,"+delete"):Zo(this,function(ae){var se=ys(ie,ae.head,b,E,!1);return b<0?{from:se,to:ae.head}:{from:ae.head,to:se}})}),findPosV:function(b,E,ee,ie){var ae=1,se=ie;E<0&&(ae=-1,E=-E);for(var ce=Ae(this.doc,b),ye=0;ye<E;++ye){var we=Cr(this,ce,"div");if(se==null?se=we.left:we.left=se,ce=Il(this,we,ae,ee),ce.hitSide)break}return ce},moveV:yr(function(b,E){var ee=this,ie=this.doc,ae=[],se=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(ye){if(se)return b<0?ye.from():ye.to();var we=Cr(ee,ye.head,"div");ye.goalColumn!=null&&(we.left=ye.goalColumn),ae.push(we.left);var ze=Il(ee,we,b,E);return E=="page"&&ye==ie.sel.primary()&&qa(ee,Bo(ee,ze,"div").top-we.top),ze},qe),ae.length)for(var ce=0;ce<ie.sel.ranges.length;ce++)ie.sel.ranges[ce].goalColumn=ae[ce]}),findWordAt:function(b){var E=this.doc,ee=Qe(E,b.line).text,ie=b.ch,ae=b.ch;if(ee){var se=this.getHelper(b,"wordChars");(b.sticky=="before"||ae==ee.length)&&ie?--ie:++ae;for(var ce=ee.charAt(ie),ye=le(ce,se)?function(we){return le(we,se)}:/\s/.test(ce)?function(we){return/\s/.test(we)}:function(we){return!/\s/.test(we)&&!le(we)};ie>0&&ye(ee.charAt(ie-1));)--ie;for(;ae<ee.length&&ye(ee.charAt(ae));)++ae}return new mi(Re(b.line,ie),Re(b.line,ae))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Je(this.display.cursorDiv,"CodeMirror-overwrite"):$e(this.display.cursorDiv,"CodeMirror-overwrite"),tn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Pe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yr(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Mr(this)-this.display.barHeight,width:b.scrollWidth-Mr(this)-this.display.barWidth,clientHeight:no(this),clientWidth:Qr(this)}},scrollIntoView:yr(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:Re(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?jl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:yr(function(b,E){var ee=this,ie=function(se){return typeof se=="number"||/^\d+$/.test(String(se))?se+"px":se};b!=null&&(this.display.wrapper.style.width=ie(b)),E!=null&&(this.display.wrapper.style.height=ie(E)),this.options.lineWrapping&&Yo(this);var ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(se){if(se.widgets){for(var ce=0;ce<se.widgets.length;ce++)if(se.widgets[ce].noHScroll){ho(ee,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,tn(this,"refresh",this)}),operation:function(b){return Pr(this,b)},startOperation:function(){return Lo(this)},endOperation:function(){return Do(this)},refresh:yr(function(){var b=this.display.cachedTextHeight;Sr(this),this.curOp.forceUpdate=!0,wo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Ar(this.display))>.5||this.options.lineWrapping)&&Ya(this),tn(this,"refresh",this)}),swapDoc:yr(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Ii(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Vt(a),a.registerHelper=function(b,E,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,ie){a.registerHelper(b,E,ie),x[b]._global.push({pred:ee,val:ie})}}function ys(a,y,x,b,E){var ee=y,ie=x,ae=Qe(a,y.line),se=E&&a.direction=="rtl"?-x:x;function ce(){var on=y.line+se;return on<a.first||on>=a.first+a.size?!1:(y=new Re(on,y.ch,y.sticky),ae=Qe(a,on))}function ye(on){var Jt;if(b=="codepoint"){var cn=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(cn)?Jt=null:Jt=new Re(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(cn>=55296&&cn<56320?2:1))),-x)}else E?Jt=Du(a.cm,ae,y,x):Jt=hs(ae,y,x);if(Jt==null)if(!on&&ce())y=ds(E,a.cm,ae,y.line,se);else return!1;else y=Jt;return!0}if(b=="char"||b=="codepoint")ye();else if(b=="column")ye(!0);else if(b=="word"||b=="group")for(var we=null,ze=b=="group",Ie=a.cm&&a.cm.getHelper(y,"wordChars"),ht=!0;!(x<0&&!ye(!ht));ht=!1){var yt=ae.text.charAt(y.ch)||`
|
|
`,Bt=le(yt,Ie)?"w":ze&&yt==`
|
|
`?"n":!ze||/\s/.test(yt)?null:"p";if(ze&&!ht&&!Bt&&(Bt="s"),we&&we!=Bt){x<0&&(x=1,ye(),y.sticky="after");break}if(Bt&&(we=Bt),x>0&&!ye(!ht))break}var Xt=Oa(a,y,ee,ie,!0);return Nt(ee,Xt)&&(Xt.hitSide=!0),Xt}function Il(a,y,x,b){var E=a.doc,ee=y.left,ie;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),se=Math.max(ae-.5*Ar(a.display),3);ie=(x>0?y.bottom:y.top)+x*se}else b=="line"&&(ie=x>0?y.bottom+3:y.top-3);for(var ce;ce=ur(a,ee,ie),!!ce.outside;){if(x<0?ie<=0:ie>=E.height){ce.hitSide=!0;break}ie+=x*5}return ce}var Si=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Si.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Fl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(ae){for(var se=ae.target;se;se=se.parentNode){if(se==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(se.className))break}return!1}kt(E,"paste",function(ae){!ee(ae)||et(b,ae)||Pl(ae,b)||ge<=11&&setTimeout(nr(b,function(){return y.updateFromDOM()}),20)}),kt(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),kt(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),kt(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),kt(E,"touchstart",function(){return x.forceCompositionEnd()}),kt(E,"input",function(){y.composing||y.readFromDOMSoon()});function ie(ae){if(!(!ee(ae)||et(b,ae))){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var se=Rl(b);za({lineWise:!0,text:se.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(se.ranges,0,Be),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var ce=Yr.text.join(`
|
|
`);if(ae.clipboardData.setData("Text",ce),ae.clipboardData.getData("Text")==ce){ae.preventDefault();return}}var ye=Ol(),we=ye.firstChild;b.display.lineSpace.insertBefore(ye,b.display.lineSpace.firstChild),we.value=Yr.text.join(`
|
|
`);var ze=document.activeElement;pt(we),setTimeout(function(){b.display.lineSpace.removeChild(ye),ze.focus(),ze==E&&x.showPrimarySelection()},50)}}kt(E,"copy",ie),kt(E,"cut",ie)},Si.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Si.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Si.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Si.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Si.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var ee=Za(y,a.anchorNode,a.anchorOffset),ie=Za(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&ie&&!ie.bad&&ct(Mt(ee,ie),b)==0&&ct(nn(ee,ie),E)==0)){var ae=y.display.view,se=b.line>=y.display.viewFrom&&Nl(y,b)||{node:ae[0].measure.map[2],offset:0},ce=E.line<y.display.viewTo&&Nl(y,E);if(!ce){var ye=ae[ae.length-1].measure,we=ye.maps?ye.maps[ye.maps.length-1]:ye.map;ce={node:we[we.length-1],offset:we[we.length-2]-we[we.length-3]}}if(!se||!ce){a.removeAllRanges();return}var ze=a.rangeCount&&a.getRangeAt(0),Ie;try{Ie=Se(se.node,se.offset,ce.offset,ce.node)}catch(ht){}Ie&&(!ue&&y.state.focused?(a.collapse(se.node,se.offset),Ie.collapsed||(a.removeAllRanges(),a.addRange(Ie))):(a.removeAllRanges(),a.addRange(Ie)),ze&&a.anchorNode==null?a.addRange(ze):ue&&this.startGracePeriod()),this.rememberSelection()}},Si.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)},Si.prototype.showMultipleSelections=function(a){Ge(this.cm.display.cursorDiv,a.cursors),Ge(this.cm.display.selectionDiv,a.selection)},Si.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Si.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return We(this.div,y)},Si.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Si.prototype.blur=function(){this.div.blur()},Si.prototype.getField=function(){return this.div},Si.prototype.supportsTouch=function(){return!0},Si.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Pr(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)},Si.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Si.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ce&&xe&&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&&Pr(y,function(){pr(y.doc,po(x,b),Be),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Si.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=Re(b.line-1,Qe(a.doc,b.line-1).length)),E.ch==Qe(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Re(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,ie,ae;b.line==y.viewFrom||(ee=So(a,b.line))==0?(ie=Ee(y.view[0].line),ae=y.view[0].node):(ie=Ee(y.view[ee].line),ae=y.view[ee-1].node.nextSibling);var se=So(a,E.line),ce,ye;if(se==y.view.length-1?(ce=y.viewTo-1,ye=y.lineDiv.lastChild):(ce=Ee(y.view[se+1].line)-1,ye=y.view[se+1].node.previousSibling),!ae)return!1;for(var we=a.doc.splitLines(Yu(a,ae,ye,ie,ce)),ze=Ut(a.doc,Re(ie,0),Re(ce,Qe(a.doc,ce).text.length));we.length>1&&ze.length>1;)if(Oe(we)==Oe(ze))we.pop(),ze.pop(),ce--;else if(we[0]==ze[0])we.shift(),ze.shift(),ie++;else break;for(var Ie=0,ht=0,yt=we[0],Bt=ze[0],Xt=Math.min(yt.length,Bt.length);Ie<Xt&&yt.charCodeAt(Ie)==Bt.charCodeAt(Ie);)++Ie;for(var on=Oe(we),Jt=Oe(ze),cn=Math.min(on.length-(we.length==1?Ie:0),Jt.length-(ze.length==1?Ie:0));ht<cn&&on.charCodeAt(on.length-ht-1)==Jt.charCodeAt(Jt.length-ht-1);)++ht;if(we.length==1&&ze.length==1&&ie==b.line)for(;Ie&&Ie>b.ch&&on.charCodeAt(on.length-ht-1)==Jt.charCodeAt(Jt.length-ht-1);)Ie--,ht++;we[we.length-1]=on.slice(0,on.length-ht).replace(/^\u200b+/,""),we[0]=we[0].slice(Ie).replace(/\u200b+$/,"");var Cn=Re(ie,Ie),vn=Re(ce,ze.length?Oe(ze).length-ht:0);if(we.length>1||we[0]||ct(Cn,vn))return Ho(a.doc,we,Cn,vn,"+input"),!0},Si.prototype.ensurePolled=function(){this.forceCompositionEnd()},Si.prototype.reset=function(){this.forceCompositionEnd()},Si.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Si.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))},Si.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pr(this.cm,function(){return Sr(a.cm)})},Si.prototype.setUneditable=function(a){a.contentEditable="false"},Si.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||nr(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Si.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Si.prototype.onContextMenu=function(){},Si.prototype.resetPosition=function(){},Si.prototype.needsContentAttribute=!0;function Nl(a,y){var x=qr(a,y.line);if(!x||x.hidden)return null;var b=Qe(a.doc,y.line),E=Ao(x,b,y.line),ee=qt(b,a.doc.direction),ie="left";if(ee){var ae=Wt(ee,y.ch);ie=ae%2?"right":"left"}var se=xa(E.map,y.ch,ie);return se.offset=se.collapse=="right"?se.end:se.start,se}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",ie=!1,ae=a.doc.lineSeparator(),se=!1;function ce(Ie){return function(ht){return ht.id==Ie}}function ye(){ie&&(ee+=ae,se&&(ee+=ae),ie=se=!1)}function we(Ie){Ie&&(ye(),ee+=Ie)}function ze(Ie){if(Ie.nodeType==1){var ht=Ie.getAttribute("cm-text");if(ht){we(ht);return}var yt=Ie.getAttribute("cm-marker"),Bt;if(yt){var Xt=a.findMarks(Re(b,0),Re(E+1,0),ce(+yt));Xt.length&&(Bt=Xt[0].find(0))&&we(Ut(a.doc,Bt.from,Bt.to).join(ae));return}if(Ie.getAttribute("contenteditable")=="false")return;var on=/^(pre|div|p|li|table|br)$/i.test(Ie.nodeName);if(!/^br$/i.test(Ie.nodeName)&&Ie.textContent.length==0)return;on&&ye();for(var Jt=0;Jt<Ie.childNodes.length;Jt++)ze(Ie.childNodes[Jt]);/^(pre|p)$/i.test(Ie.nodeName)&&(se=!0),on&&(ie=!0)}else Ie.nodeType==3&&we(Ie.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ze(y),y!=x;)y=y.nextSibling,se=!1;return ee}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(Re(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ee=a.display.view[E];if(ee.node==b)return Xu(ee,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!We(b,y))return jo(Re(Ee(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ee=a.rest?Oe(a.rest):a.line;return jo(Re(Ee(ee),ee.text.length),E)}var ie=y.nodeType==3?y:null,ae=y;for(!ie&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ie=y.firstChild,x&&(x=ie.nodeValue.length));ae.parentNode!=b;)ae=ae.parentNode;var se=a.measure,ce=se.maps;function ye(Bt,Xt,on){for(var Jt=-1;Jt<(ce?ce.length:0);Jt++)for(var cn=Jt<0?se.map:ce[Jt],Cn=0;Cn<cn.length;Cn+=3){var vn=cn[Cn+2];if(vn==Bt||vn==Xt){var Gn=Ee(Jt<0?a.line:a.rest[Jt]),Bi=cn[Cn]+on;return(on<0||vn!=Bt)&&(Bi=cn[Cn+(on?1:0)]),Re(Gn,Bi)}}}var we=ye(ie,ae,x);if(we)return jo(we,E);for(var ze=ae.nextSibling,Ie=ie?ie.nodeValue.length-x:0;ze;ze=ze.nextSibling){if(we=ye(ze,ze.firstChild,0),we)return jo(Re(we.line,we.ch-Ie),E);Ie+=ze.textContent.length}for(var ht=ae.previousSibling,yt=x;ht;ht=ht.previousSibling){if(we=ye(ht,ht.firstChild,-1),we)return jo(Re(we.line,we.ch+yt),E);yt+=ht.textContent.length}}var Ki=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new he,this.hasSelection=!1,this.composing=null};Ki.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"),kt(E,"input",function(){pe&&ge>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),kt(E,"paste",function(ie){et(b,ie)||Pl(ie,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(ie){if(!et(b,ie)){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Rl(b);za({lineWise:!0,text:ae.text}),ie.type=="cut"?b.setSelections(ae.ranges,null,Be):(x.prevInput="",E.value=ae.text.join(`
|
|
`),pt(E))}else return;ie.type=="cut"&&(b.state.cutIncoming=+new Date)}}kt(E,"cut",ee),kt(E,"copy",ee),kt(a.scroller,"paste",function(ie){if(!(lr(a,ie)||et(b,ie))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=ie.clipboardData,E.dispatchEvent(ae)}}),kt(a.lineSpace,"selectstart",function(ie){lr(a,ie)||an(ie)}),kt(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"})}}),kt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Ki.prototype.createField=function(a){this.wrapper=Ol(),this.textarea=this.wrapper.firstChild},Ki.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Ki.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=Cr(a,x.sel.primary().head,"div"),ee=y.wrapper.getBoundingClientRect(),ie=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ie.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ie.left-ee.left))}return b},Ki.prototype.showSelection=function(a){var y=this.cm,x=y.display;Ge(x.cursorDiv,a.cursors),Ge(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Ki.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&&pt(this.textarea),pe&&ge>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",pe&&ge>=9&&(this.hasSelection=null))}},Ki.prototype.getField=function(){return this.textarea},Ki.prototype.supportsTouch=function(){return!1},Ki.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!De||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},Ki.prototype.blur=function(){this.textarea.blur()},Ki.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ki.prototype.receivedFocus=function(){this.slowPoll()},Ki.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Ki.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)},Ki.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Ri(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(pe&&ge>=9&&this.hasSelection===E||ke&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!b&&(b="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,ae=Math.min(b.length,E.length);ie<ae&&b.charCodeAt(ie)==E.charCodeAt(ie);)++ie;return Pr(y,function(){gs(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},Ki.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ki.prototype.onKeyPress=function(){pe&&ge>=9&&(this.hasSelection=null),this.fastPoll()},Ki.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=Co(x,a),ie=b.scroller.scrollTop;if(!ee||fe)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(ee)==-1&&nr(x,pr)(x.doc,po(ee),Be);var se=E.style.cssText,ce=y.wrapper.style.cssText,ye=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-ye.top-5)+"px; left: "+(a.clientX-ye.left-5)+`px;
|
|
z-index: 1000; background: `+(pe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var we;Fe&&(we=window.scrollY),b.input.focus(),Fe&&window.scrollTo(null,we),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Ie,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function ze(){if(E.selectionStart!=null){var yt=x.somethingSelected(),Bt="\u200B"+(yt?E.value:"");E.value="\u21DA",E.value=Bt,y.prevInput=yt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Bt.length,b.selForContextMenu=x.doc.sel}}function Ie(){if(y.contextMenuPending==Ie&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=se,pe&&ge<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=ie),E.selectionStart!=null)){(!pe||pe&&ge<9)&&ze();var yt=0,Bt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?nr(x,tl)(x):yt++<10?b.detectingSelectAll=setTimeout(Bt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Bt,200)}}if(pe&&ge>=9&&ze(),Ve){mn(a);var ht=function(){jt(window,"mouseup",ht),setTimeout(Ie,20)};kt(window,"mouseup",ht)}else setTimeout(Ie,50)},Ki.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Ki.prototype.setUneditable=function(){},Ki.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?Dt(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=Pe();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(kt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var ie=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=ie}}catch(se){}}y.finishInit=function(se){se.save=b,se.getTextArea=function(){return a},se.toTextArea=function(){se.toTextArea=isNaN,b(),a.parentNode.removeChild(se.getWrapperElement()),a.style.display="",a.form&&(jt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=Ni(function(se){return a.parentNode.insertBefore(se,a.nextSibling)},y);return ae}function Qu(a){a.off=jt,a.on=kt,a.wheelEventPixels=ru,a.Doc=kr,a.splitLines=ri,a.countColumn=ve,a.findColumn=Kt,a.isWordChar=re,a.Pass=mt,a.signal=tn,a.Line=Qn,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=Re,a.cmpPos=ct,a.modes=ki,a.mimeModes=rn,a.resolveMode=En,a.getMode=$n,a.modeExtensions=oi,a.extendMode=yi,a.copyState=Zn,a.startState=Ei,a.innerMode=Nn,a.commands=fa,a.keyMap=ro,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=zo,a.normalizeKeyMap=Lu,a.StringStream=At,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=an,a.e_stopPropagation=Pn,a.e_stop=mn,a.addClass=Je,a.contains=We,a.rmClass=$e,a.keyNames=yo}Zu(Ni),Uu(Ni);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in kr.prototype)kr.prototype.hasOwnProperty(Ga)&&at(qu,Ga)<0&&(Ni.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(kr.prototype[Ga]));return Vt(kr),Ni.inputStyles={textarea:Ki,contenteditable:Si},Ni.defineMode=function(a){!Ni.defaults.mode&&a!="null"&&(Ni.defaults.mode=a),dn.apply(this,arguments)},Ni.defineMIME=gn,Ni.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ni.defineMIME("text/plain","null"),Ni.defineExtension=function(a,y){Ni.prototype[a]=y},Ni.defineDocExtension=function(a,y){kr.prototype[a]=y},Ni.fromTextArea=Ju,Qu(Ni),Ni.version="5.58.2",Ni})},25419:function(xt,Et,de){(function(ue){ue(de(89780),de(15525),de(98101))})(function(ue){"use strict";ue.defineMode("markdown",function(Xe,Te){var He=ue.getMode(Xe,"text/html"),pe=He.name=="null";function ge(ve){if(ue.findModeByName){var he=ue.findModeByName(ve);he&&(ve=he.mime||he.mimes[0])}var at=ue.getMode(Xe,ve);return at.name=="null"?null:at}Te.highlightFormatting===void 0&&(Te.highlightFormatting=!1),Te.maxBlockquoteDepth===void 0&&(Te.maxBlockquoteDepth=0),Te.taskLists===void 0&&(Te.taskLists=!1),Te.strikethrough===void 0&&(Te.strikethrough=!1),Te.emoji===void 0&&(Te.emoji=!1),Te.fencedCodeBlockHighlighting===void 0&&(Te.fencedCodeBlockHighlighting=!0),Te.fencedCodeBlockDefaultMode===void 0&&(Te.fencedCodeBlockDefaultMode="text/plain"),Te.xml===void 0&&(Te.xml=!0),Te.tokenTypeOverrides===void 0&&(Te.tokenTypeOverrides={});var Fe={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 Ne in Fe)Fe.hasOwnProperty(Ne)&&Te.tokenTypeOverrides[Ne]&&(Fe[Ne]=Te.tokenTypeOverrides[Ne]);var xe=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,je=/^\[(x| )\](?=\s)/i,me=Te.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ue=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Le=/^[^#!\[\]*_\\<>` "'(~:]+/,Ce=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,De=/^\s*\[[^\]]+?\]:.*$/,ke=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,Ye=" ";function tt(ve,he,at){return he.f=he.inline=at,at(ve,he)}function it(ve,he,at){return he.f=he.block=at,at(ve,he)}function nt(ve){return!ve||!/\S/.test(ve.string)}function Ve(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 he=pe;if(!he){var at=ue.innerMode(He,ve.htmlState);he=at.mode.name=="xml"&&at.state.tagStart===null&&!at.state.context&&at.state.tokenize.isInText}he&&(ve.f=ot,ve.block=rt,ve.htmlState=null)}return ve.trailingSpace=0,ve.trailingSpaceNewLine=!1,ve.prevLine=ve.thisLine,ve.thisLine={stream:null},null}function rt(ve,he){var at=ve.column()===he.indentation,Gt=nt(he.prevLine.stream),mt=he.indentedCode,Be=he.prevLine.hr,Ke=he.list!==!1,qe=(he.listStack[he.listStack.length-1]||0)+3;he.indentedCode=!1;var Kt=he.indentation;if(he.indentationDiff===null&&(he.indentationDiff=he.indentation,Ke)){for(he.list=null;Kt<he.listStack[he.listStack.length-1];)he.listStack.pop(),he.listStack.length?he.indentation=he.listStack[he.listStack.length-1]:he.list=!1;he.list!==!1&&(he.indentationDiff=Kt-he.listStack[he.listStack.length-1])}var st=!Gt&&!Be&&!he.prevLine.header&&(!Ke||!mt)&&!he.prevLine.fencedCodeEnd,Lt=(he.list===!1||Be||Gt)&&he.indentation<=qe&&ve.match(xe),Oe=null;if(he.indentationDiff>=4&&(mt||he.prevLine.fencedCodeEnd||he.prevLine.header||Gt))return ve.skipToEnd(),he.indentedCode=!0,Fe.code;if(ve.eatSpace())return null;if(at&&he.indentation<=qe&&(Oe=ve.match(me))&&Oe[1].length<=6)return he.quote=0,he.header=Oe[1].length,he.thisLine.header=!0,Te.highlightFormatting&&(he.formatting="header"),he.f=he.inline,Ge(he);if(he.indentation<=qe&&ve.eat(">"))return he.quote=at?1:he.quote+1,Te.highlightFormatting&&(he.formatting="quote"),ve.eatSpace(),Ge(he);if(!Lt&&!he.setext&&at&&he.indentation<=qe&&(Oe=ve.match(fe))){var ut=Oe[1]?"ol":"ul";return he.indentation=Kt+ve.current().length,he.list=!0,he.quote=0,he.listStack.push(he.indentation),he.em=!1,he.strong=!1,he.code=!1,he.strikethrough=!1,Te.taskLists&&ve.match(je,!1)&&(he.taskList=!0),he.f=he.inline,Te.highlightFormatting&&(he.formatting=["list","list-"+ut]),Ge(he)}else{if(at&&he.indentation<=qe&&(Oe=ve.match(Ce,!0)))return he.quote=0,he.fencedEndRE=new RegExp(Oe[1]+"+ *$"),he.localMode=Te.fencedCodeBlockHighlighting&&ge(Oe[2]||Te.fencedCodeBlockDefaultMode),he.localMode&&(he.localState=ue.startState(he.localMode)),he.f=he.block=Ht,Te.highlightFormatting&&(he.formatting="code-block"),he.code=-1,Ge(he);if(he.setext||(!st||!Ke)&&!he.quote&&he.list===!1&&!he.code&&!Lt&&!De.test(ve.string)&&(Oe=ve.lookAhead(1))&&(Oe=Oe.match(Ue)))return he.setext?(he.header=he.setext,he.setext=0,ve.skipToEnd(),Te.highlightFormatting&&(he.formatting="header")):(he.header=Oe[0].charAt(0)=="="?1:2,he.setext=he.header),he.thisLine.header=!0,he.f=he.inline,Ge(he);if(Lt)return ve.skipToEnd(),he.hr=!0,he.thisLine.hr=!0,Fe.hr;if(ve.peek()==="[")return tt(ve,he,Ot)}return tt(ve,he,he.inline)}function $e(ve,he){var at=He.token(ve,he.htmlState);if(!pe){var Gt=ue.innerMode(He,he.htmlState);(Gt.mode.name=="xml"&&Gt.state.tagStart===null&&!Gt.state.context&&Gt.state.tokenize.isInText||he.md_inside&&ve.current().indexOf(">")>-1)&&(he.f=ot,he.block=rt,he.htmlState=null)}return at}function Ht(ve,he){var at=he.listStack[he.listStack.length-1]||0,Gt=he.indentation<at,mt=at+3;if(he.fencedEndRE&&he.indentation<=mt&&(Gt||ve.match(he.fencedEndRE))){Te.highlightFormatting&&(he.formatting="code-block");var Be;return Gt||(Be=Ge(he)),he.localMode=he.localState=null,he.block=rt,he.f=ot,he.fencedEndRE=null,he.code=0,he.thisLine.fencedCodeEnd=!0,Gt?it(ve,he,he.block):Be}else return he.localMode?he.localMode.token(ve,he.localState):(ve.skipToEnd(),Fe.code)}function Ge(ve){var he=[];if(ve.formatting){he.push(Fe.formatting),typeof ve.formatting=="string"&&(ve.formatting=[ve.formatting]);for(var at=0;at<ve.formatting.length;at++)he.push(Fe.formatting+"-"+ve.formatting[at]),ve.formatting[at]==="header"&&he.push(Fe.formatting+"-"+ve.formatting[at]+"-"+ve.header),ve.formatting[at]==="quote"&&(!Te.maxBlockquoteDepth||Te.maxBlockquoteDepth>=ve.quote?he.push(Fe.formatting+"-"+ve.formatting[at]+"-"+ve.quote):he.push("error"))}if(ve.taskOpen)return he.push("meta"),he.length?he.join(" "):null;if(ve.taskClosed)return he.push("property"),he.length?he.join(" "):null;if(ve.linkHref?he.push(Fe.linkHref,"url"):(ve.strong&&he.push(Fe.strong),ve.em&&he.push(Fe.em),ve.strikethrough&&he.push(Fe.strikethrough),ve.emoji&&he.push(Fe.emoji),ve.linkText&&he.push(Fe.linkText),ve.code&&he.push(Fe.code),ve.image&&he.push(Fe.image),ve.imageAltText&&he.push(Fe.imageAltText,"link"),ve.imageMarker&&he.push(Fe.imageMarker)),ve.header&&he.push(Fe.header,Fe.header+"-"+ve.header),ve.quote&&(he.push(Fe.quote),!Te.maxBlockquoteDepth||Te.maxBlockquoteDepth>=ve.quote?he.push(Fe.quote+"-"+ve.quote):he.push(Fe.quote+"-"+Te.maxBlockquoteDepth)),ve.list!==!1){var Gt=(ve.listStack.length-1)%3;Gt?Gt===1?he.push(Fe.list2):he.push(Fe.list3):he.push(Fe.list1)}return ve.trailingSpaceNewLine?he.push("trailing-space-new-line"):ve.trailingSpace&&he.push("trailing-space-"+(ve.trailingSpace%2?"a":"b")),he.length?he.join(" "):null}function _e(ve,he){if(ve.match(Le,!0))return Ge(he)}function ot(ve,he){var at=he.text(ve,he);if(typeof at!="undefined")return at;if(he.list)return he.list=null,Ge(he);if(he.taskList){var Gt=ve.match(je,!0)[1]===" ";return Gt?he.taskOpen=!0:he.taskClosed=!0,Te.highlightFormatting&&(he.formatting="task"),he.taskList=!1,Ge(he)}if(he.taskOpen=!1,he.taskClosed=!1,he.header&&ve.match(/^#+$/,!0))return Te.highlightFormatting&&(he.formatting="header"),Ge(he);var mt=ve.next();if(he.linkTitle){he.linkTitle=!1;var Be=mt;mt==="("&&(Be=")"),Be=(Be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ke="^\\s*(?:[^"+Be+"\\\\]+|\\\\\\\\|\\\\.)"+Be;if(ve.match(new RegExp(Ke),!0))return Fe.linkHref}if(mt==="`"){var qe=he.formatting;Te.highlightFormatting&&(he.formatting="code"),ve.eatWhile("`");var Kt=ve.current().length;if(he.code==0&&(!he.quote||Kt==1))return he.code=Kt,Ge(he);if(Kt==he.code){var st=Ge(he);return he.code=0,st}else return he.formatting=qe,Ge(he)}else if(he.code)return Ge(he);if(mt==="\\"&&(ve.next(),Te.highlightFormatting)){var Lt=Ge(he),Oe=Fe.formatting+"-escape";return Lt?Lt+" "+Oe:Oe}if(mt==="!"&&ve.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return he.imageMarker=!0,he.image=!0,Te.highlightFormatting&&(he.formatting="image"),Ge(he);if(mt==="["&&he.imageMarker&&ve.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return he.imageMarker=!1,he.imageAltText=!0,Te.highlightFormatting&&(he.formatting="image"),Ge(he);if(mt==="]"&&he.imageAltText){Te.highlightFormatting&&(he.formatting="image");var Lt=Ge(he);return he.imageAltText=!1,he.image=!1,he.inline=he.f=We,Lt}if(mt==="["&&!he.image)return he.linkText&&ve.match(/^.*?\]/)||(he.linkText=!0,Te.highlightFormatting&&(he.formatting="link")),Ge(he);if(mt==="]"&&he.linkText){Te.highlightFormatting&&(he.formatting="link");var Lt=Ge(he);return he.linkText=!1,he.inline=he.f=ve.match(/\(.*?\)| ?\[.*?\]/,!1)?We:ot,Lt}if(mt==="<"&&ve.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Se,Te.highlightFormatting&&(he.formatting="link");var Lt=Ge(he);return Lt?Lt+=" ":Lt="",Lt+Fe.linkInline}if(mt==="<"&&ve.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Se,Te.highlightFormatting&&(he.formatting="link");var Lt=Ge(he);return Lt?Lt+=" ":Lt="",Lt+Fe.linkEmail}if(Te.xml&&mt==="<"&&ve.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ut=ve.string.indexOf(">",ve.pos);if(ut!=-1){var ft=ve.string.substring(ve.start,ut);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ft)&&(he.md_inside=!0)}return ve.backUp(1),he.htmlState=ue.startState(He),it(ve,he,$e)}if(Te.xml&&mt==="<"&&ve.match(/^\/\w*?>/))return he.md_inside=!1,"tag";if(mt==="*"||mt==="_"){for(var oe=1,te=ve.pos==1?" ":ve.string.charAt(ve.pos-2);oe<3&&ve.eat(mt);)oe++;var z=ve.peek()||" ",re=!/\s/.test(z)&&(!ke.test(z)||/\s/.test(te)||ke.test(te)),le=!/\s/.test(te)&&(!ke.test(te)||/\s/.test(z)||ke.test(z)),ne=null,be=null;if(oe%2&&(!he.em&&re&&(mt==="*"||!le||ke.test(te))?ne=!0:he.em==mt&&le&&(mt==="*"||!re||ke.test(z))&&(ne=!1)),oe>1&&(!he.strong&&re&&(mt==="*"||!le||ke.test(te))?be=!0:he.strong==mt&&le&&(mt==="*"||!re||ke.test(z))&&(be=!1)),be!=null||ne!=null){Te.highlightFormatting&&(he.formatting=ne==null?"strong":be==null?"em":"strong em"),ne===!0&&(he.em=mt),be===!0&&(he.strong=mt);var st=Ge(he);return ne===!1&&(he.em=!1),be===!1&&(he.strong=!1),st}}else if(mt===" "&&(ve.eat("*")||ve.eat("_"))){if(ve.peek()===" ")return Ge(he);ve.backUp(1)}if(Te.strikethrough){if(mt==="~"&&ve.eatWhile(mt)){if(he.strikethrough){Te.highlightFormatting&&(he.formatting="strikethrough");var st=Ge(he);return he.strikethrough=!1,st}else if(ve.match(/^[^\s]/,!1))return he.strikethrough=!0,Te.highlightFormatting&&(he.formatting="strikethrough"),Ge(he)}else if(mt===" "&&ve.match(/^~~/,!0)){if(ve.peek()===" ")return Ge(he);ve.backUp(2)}}if(Te.emoji&&mt===":"&&ve.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){he.emoji=!0,Te.highlightFormatting&&(he.formatting="emoji");var Ze=Ge(he);return he.emoji=!1,Ze}return mt===" "&&(ve.match(/^ +$/,!1)?he.trailingSpace++:he.trailingSpace&&(he.trailingSpaceNewLine=!0)),Ge(he)}function Se(ve,he){var at=ve.next();if(at===">"){he.f=he.inline=ot,Te.highlightFormatting&&(he.formatting="link");var Gt=Ge(he);return Gt?Gt+=" ":Gt="",Gt+Fe.linkInline}return ve.match(/^[^>]+/,!0),Fe.linkInline}function We(ve,he){if(ve.eatSpace())return null;var at=ve.next();return at==="("||at==="["?(he.f=he.inline=Je(at==="("?")":"]"),Te.highlightFormatting&&(he.formatting="link-string"),he.linkHref=!0,Ge(he)):"error"}var Pe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Je(ve){return function(he,at){var Gt=he.next();if(Gt===ve){at.f=at.inline=ot,Te.highlightFormatting&&(at.formatting="link-string");var mt=Ge(at);return at.linkHref=!1,mt}return he.match(Pe[ve]),at.linkHref=!0,Ge(at)}}function Ot(ve,he){return ve.match(/^([^\]\\]|\\.)*\]:/,!1)?(he.f=pt,ve.next(),Te.highlightFormatting&&(he.formatting="link"),he.linkText=!0,Ge(he)):tt(ve,he,ot)}function pt(ve,he){if(ve.match(/^\]:/,!0)){he.f=he.inline=en,Te.highlightFormatting&&(he.formatting="link");var at=Ge(he);return he.linkText=!1,at}return ve.match(/^([^\]\\]|\\.)+/,!0),Fe.linkText}function en(ve,he){return ve.eatSpace()?null:(ve.match(/^[^\s]+/,!0),ve.peek()===void 0?he.linkTitle=!0:ve.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),he.f=he.inline=ot,Fe.linkHref+" url")}var Dt={startState:function(){return{f:rt,prevLine:{stream:null},thisLine:{stream:null},block:rt,htmlState:null,indentation:0,inline:ot,text:_e,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&&ue.copyState(He,ve.htmlState),indentation:ve.indentation,localMode:ve.localMode,localState:ve.localMode?ue.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,he){if(he.formatting=!1,ve!=he.thisLine.stream){if(he.header=0,he.hr=!1,ve.match(/^\s*$/,!0))return Ve(he),null;if(he.prevLine=he.thisLine,he.thisLine={stream:ve},he.taskList=!1,he.trailingSpace=0,he.trailingSpaceNewLine=!1,!he.localState&&(he.f=he.block,he.f!=$e)){var at=ve.match(/^\s*/,!0)[0].replace(/\t/g,Ye).length;if(he.indentation=at,he.indentationDiff=null,at>0)return null}}return he.f(ve,he)},innerMode:function(ve){return ve.block==$e?{state:ve.htmlState,mode:He}:ve.localState?{state:ve.localState,mode:ve.localMode}:{state:ve,mode:Dt}},indent:function(ve,he,at){return ve.block==$e&&He.indent?He.indent(ve.htmlState,he,at):ve.localState&&ve.localMode.indent?ve.localMode.indent(ve.localState,he,at):ue.Pass},blankLine:Ve,getType:Ge,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Dt},"xml"),ue.defineMIME("text/markdown","markdown"),ue.defineMIME("text/x-markdown","markdown")})},98101:function(xt,Et,de){(function(ue){ue(de(89780))})(function(ue){"use strict";ue.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 Xe=0;Xe<ue.modeInfo.length;Xe++){var Te=ue.modeInfo[Xe];Te.mimes&&(Te.mime=Te.mimes[0])}ue.findModeByMIME=function(He){He=He.toLowerCase();for(var pe=0;pe<ue.modeInfo.length;pe++){var ge=ue.modeInfo[pe];if(ge.mime==He)return ge;if(ge.mimes){for(var Fe=0;Fe<ge.mimes.length;Fe++)if(ge.mimes[Fe]==He)return ge}}if(/\+xml$/.test(He))return ue.findModeByMIME("application/xml");if(/\+json$/.test(He))return ue.findModeByMIME("application/json")},ue.findModeByExtension=function(He){He=He.toLowerCase();for(var pe=0;pe<ue.modeInfo.length;pe++){var ge=ue.modeInfo[pe];if(ge.ext){for(var Fe=0;Fe<ge.ext.length;Fe++)if(ge.ext[Fe]==He)return ge}}},ue.findModeByFileName=function(He){for(var pe=0;pe<ue.modeInfo.length;pe++){var ge=ue.modeInfo[pe];if(ge.file&&ge.file.test(He))return ge}var Fe=He.lastIndexOf("."),Ne=Fe>-1&&He.substring(Fe+1,He.length);if(Ne)return ue.findModeByExtension(Ne)},ue.findModeByName=function(He){He=He.toLowerCase();for(var pe=0;pe<ue.modeInfo.length;pe++){var ge=ue.modeInfo[pe];if(ge.name.toLowerCase()==He)return ge;if(ge.alias){for(var Fe=0;Fe<ge.alias.length;Fe++)if(ge.alias[Fe].toLowerCase()==He)return ge}}}})},67549:function(xt,Et,de){(function(ue){ue(de(89780))})(function(ue){"use strict";ue.defineMode("stex",function(Xe,Te){"use strict";function He(Le,Ce){Le.cmdState.push(Ce)}function pe(Le){return Le.cmdState.length>0?Le.cmdState[Le.cmdState.length-1]:null}function ge(Le){var Ce=Le.cmdState.pop();Ce&&Ce.closeBracket()}function Fe(Le){for(var Ce=Le.cmdState,De=Ce.length-1;De>=0;De--){var ke=Ce[De];if(ke.name!="DEFAULT")return ke}return{styleIdentifier:function(){return null}}}function Ne(Le,Ce,De){return function(){this.name=Le,this.bracketNo=0,this.style=Ce,this.styles=De,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var xe={};xe.importmodule=Ne("importmodule","tag",["string","builtin"]),xe.documentclass=Ne("documentclass","tag",["","atom"]),xe.usepackage=Ne("usepackage","tag",["atom"]),xe.begin=Ne("begin","tag",["atom"]),xe.end=Ne("end","tag",["atom"]),xe.label=Ne("label","tag",["atom"]),xe.ref=Ne("ref","tag",["atom"]),xe.eqref=Ne("eqref","tag",["atom"]),xe.cite=Ne("cite","tag",["atom"]),xe.bibitem=Ne("bibitem","tag",["atom"]),xe.Bibitem=Ne("Bibitem","tag",["atom"]),xe.RBibitem=Ne("RBibitem","tag",["atom"]),xe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(Le,Ce){Le.f=Ce}function je(Le,Ce){var De;if(Le.match(/^\\[a-zA-Z@]+/)){var ke=Le.current().slice(1);return De=xe.hasOwnProperty(ke)?xe[ke]:xe.DEFAULT,De=new De,He(Ce,De),fe(Ce,Ue),De.style}if(Le.match(/^\\[$&%#{}_]/)||Le.match(/^\\[,;!\/\\]/))return"tag";if(Le.match("\\["))return fe(Ce,function(tt,it){return me(tt,it,"\\]")}),"keyword";if(Le.match("\\("))return fe(Ce,function(tt,it){return me(tt,it,"\\)")}),"keyword";if(Le.match("$$"))return fe(Ce,function(tt,it){return me(tt,it,"$$")}),"keyword";if(Le.match("$"))return fe(Ce,function(tt,it){return me(tt,it,"$")}),"keyword";var Ye=Le.next();if(Ye=="%")return Le.skipToEnd(),"comment";if(Ye=="}"||Ye=="]"){if(De=pe(Ce),De)De.closeBracket(Ye),fe(Ce,Ue);else return"error";return"bracket"}else return Ye=="{"||Ye=="["?(De=xe.DEFAULT,De=new De,He(Ce,De),"bracket"):/\d/.test(Ye)?(Le.eatWhile(/[\w.%]/),"atom"):(Le.eatWhile(/[\w\-_]/),De=Fe(Ce),De.name=="begin"&&(De.argument=Le.current()),De.styleIdentifier())}function me(Le,Ce,De){if(Le.eatSpace())return null;if(De&&Le.match(De))return fe(Ce,je),"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 ke=Le.next();return ke=="{"||ke=="}"||ke=="["||ke=="]"||ke=="("||ke==")"?"bracket":ke=="%"?(Le.skipToEnd(),"comment"):"error"}function Ue(Le,Ce){var De=Le.peek(),ke;return De=="{"||De=="["?(ke=pe(Ce),ke.openBracket(De),Le.eat(De),fe(Ce,je),"bracket"):/[ \t\r]/.test(De)?(Le.eat(De),null):(fe(Ce,je),ge(Ce),je(Le,Ce))}return{startState:function(){var Le=Te.inMathMode?function(Ce,De){return me(Ce,De)}:je;return{cmdState:[],f:Le}},copyState:function(Le){return{cmdState:Le.cmdState.slice(),f:Le.f}},token:function(Le,Ce){return Ce.f(Le,Ce)},blankLine:function(Le){Le.f=je,Le.cmdState.length=0},lineComment:"%"}}),ue.defineMIME("text/x-stex","stex"),ue.defineMIME("text/x-latex","stex")})},15525:function(xt,Et,de){(function(ue){ue(de(89780))})(function(ue){"use strict";var Xe={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},Te={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ue.defineMode("xml",function(He,pe){var ge=He.indentUnit,Fe={},Ne=pe.htmlMode?Xe:Te;for(var xe in Ne)Fe[xe]=Ne[xe];for(var xe in pe)Fe[xe]=pe[xe];var fe,je;function me(Se,We){function Pe(pt){return We.tokenize=pt,pt(Se,We)}var Je=Se.next();if(Je=="<")return Se.eat("!")?Se.eat("[")?Se.match("CDATA[")?Pe(Ce("atom","]]>")):null:Se.match("--")?Pe(Ce("comment","-->")):Se.match("DOCTYPE",!0,!0)?(Se.eatWhile(/[\w\._\-]/),Pe(De(1))):null:Se.eat("?")?(Se.eatWhile(/[\w\._\-]/),We.tokenize=Ce("meta","?>"),"meta"):(fe=Se.eat("/")?"closeTag":"openTag",We.tokenize=Ue,"tag bracket");if(Je=="&"){var Ot;return Se.eat("#")?Se.eat("x")?Ot=Se.eatWhile(/[a-fA-F\d]/)&&Se.eat(";"):Ot=Se.eatWhile(/[\d]/)&&Se.eat(";"):Ot=Se.eatWhile(/[\w\.\-:]/)&&Se.eat(";"),Ot?"atom":"error"}else return Se.eatWhile(/[^&<]/),null}me.isInText=!0;function Ue(Se,We){var Pe=Se.next();if(Pe==">"||Pe=="/"&&Se.eat(">"))return We.tokenize=me,fe=Pe==">"?"endTag":"selfcloseTag","tag bracket";if(Pe=="=")return fe="equals",null;if(Pe=="<"){We.tokenize=me,We.state=it,We.tagName=We.tagStart=null;var Je=We.tokenize(Se,We);return Je?Je+" tag error":"tag error"}else return/[\'\"]/.test(Pe)?(We.tokenize=Le(Pe),We.stringStartCol=Se.column(),We.tokenize(Se,We)):(Se.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Le(Se){var We=function(Pe,Je){for(;!Pe.eol();)if(Pe.next()==Se){Je.tokenize=Ue;break}return"string"};return We.isInAttribute=!0,We}function Ce(Se,We){return function(Pe,Je){for(;!Pe.eol();){if(Pe.match(We)){Je.tokenize=me;break}Pe.next()}return Se}}function De(Se){return function(We,Pe){for(var Je;(Je=We.next())!=null;){if(Je=="<")return Pe.tokenize=De(Se+1),Pe.tokenize(We,Pe);if(Je==">")if(Se==1){Pe.tokenize=me;break}else return Pe.tokenize=De(Se-1),Pe.tokenize(We,Pe)}return"meta"}}function ke(Se,We,Pe){this.prev=Se.context,this.tagName=We,this.indent=Se.indented,this.startOfLine=Pe,(Fe.doNotIndent.hasOwnProperty(We)||Se.context&&Se.context.noIndent)&&(this.noIndent=!0)}function Ye(Se){Se.context&&(Se.context=Se.context.prev)}function tt(Se,We){for(var Pe;;){if(!Se.context||(Pe=Se.context.tagName,!Fe.contextGrabbers.hasOwnProperty(Pe)||!Fe.contextGrabbers[Pe].hasOwnProperty(We)))return;Ye(Se)}}function it(Se,We,Pe){return Se=="openTag"?(Pe.tagStart=We.column(),nt):Se=="closeTag"?Ve:it}function nt(Se,We,Pe){return Se=="word"?(Pe.tagName=We.current(),je="tag",Ht):Fe.allowMissingTagName&&Se=="endTag"?(je="tag bracket",Ht(Se,We,Pe)):(je="error",nt)}function Ve(Se,We,Pe){if(Se=="word"){var Je=We.current();return Pe.context&&Pe.context.tagName!=Je&&Fe.implicitlyClosed.hasOwnProperty(Pe.context.tagName)&&Ye(Pe),Pe.context&&Pe.context.tagName==Je||Fe.matchClosing===!1?(je="tag",rt):(je="tag error",$e)}else return Fe.allowMissingTagName&&Se=="endTag"?(je="tag bracket",rt(Se,We,Pe)):(je="error",$e)}function rt(Se,We,Pe){return Se!="endTag"?(je="error",rt):(Ye(Pe),it)}function $e(Se,We,Pe){return je="error",rt(Se,We,Pe)}function Ht(Se,We,Pe){if(Se=="word")return je="attribute",Ge;if(Se=="endTag"||Se=="selfcloseTag"){var Je=Pe.tagName,Ot=Pe.tagStart;return Pe.tagName=Pe.tagStart=null,Se=="selfcloseTag"||Fe.autoSelfClosers.hasOwnProperty(Je)?tt(Pe,Je):(tt(Pe,Je),Pe.context=new ke(Pe,Je,Ot==Pe.indented)),it}return je="error",Ht}function Ge(Se,We,Pe){return Se=="equals"?_e:(Fe.allowMissing||(je="error"),Ht(Se,We,Pe))}function _e(Se,We,Pe){return Se=="string"?ot:Se=="word"&&Fe.allowUnquoted?(je="string",Ht):(je="error",Ht(Se,We,Pe))}function ot(Se,We,Pe){return Se=="string"?ot:Ht(Se,We,Pe)}return{startState:function(Se){var We={tokenize:me,state:it,indented:Se||0,tagName:null,tagStart:null,context:null};return Se!=null&&(We.baseIndent=Se),We},token:function(Se,We){if(!We.tagName&&Se.sol()&&(We.indented=Se.indentation()),Se.eatSpace())return null;fe=null;var Pe=We.tokenize(Se,We);return(Pe||fe)&&Pe!="comment"&&(je=null,We.state=We.state(fe||Pe,Se,We),je&&(Pe=je=="error"?Pe+" error":je)),Pe},indent:function(Se,We,Pe){var Je=Se.context;if(Se.tokenize.isInAttribute)return Se.tagStart==Se.indented?Se.stringStartCol+1:Se.indented+ge;if(Je&&Je.noIndent)return ue.Pass;if(Se.tokenize!=Ue&&Se.tokenize!=me)return Pe?Pe.match(/^(\s*)/)[0].length:0;if(Se.tagName)return Fe.multilineTagIndentPastTag!==!1?Se.tagStart+Se.tagName.length+2:Se.tagStart+ge*(Fe.multilineTagIndentFactor||1);if(Fe.alignCDATA&&/<!\[CDATA\[/.test(We))return 0;var Ot=We&&/^<(\/)?([\w_:\.-]*)/.exec(We);if(Ot&&Ot[1])for(;Je;)if(Je.tagName==Ot[2]){Je=Je.prev;break}else if(Fe.implicitlyClosed.hasOwnProperty(Je.tagName))Je=Je.prev;else break;else if(Ot)for(;Je;){var pt=Fe.contextGrabbers[Je.tagName];if(pt&&pt.hasOwnProperty(Ot[2]))Je=Je.prev;else break}for(;Je&&Je.prev&&!Je.startOfLine;)Je=Je.prev;return Je?Je.indent+ge:Se.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Fe.htmlMode?"html":"xml",helperType:Fe.htmlMode?"html":"xml",skipAttribute:function(Se){Se.state==_e&&(Se.state=Ht)},xmlCurrentTag:function(Se){return Se.tagName?{name:Se.tagName,close:Se.type=="closeTag"}:null},xmlCurrentContext:function(Se){for(var We=[],Pe=Se.context;Pe;Pe=Pe.prev)Pe.tagName&&We.push(Pe.tagName);return We.reverse()}}}),ue.defineMIME("text/xml","xml"),ue.defineMIME("application/xml","xml"),ue.mimeModes.hasOwnProperty("text/html")||ue.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(xt,Et,de){"use strict";de.d(Et,{hP:function(){return ft}});var ue=function(oe,te){return(ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var le in re)Object.prototype.hasOwnProperty.call(re,le)&&(z[le]=re[le])})(oe,te)};function Xe(oe,te){function z(){this.constructor=oe}ue(oe,te),oe.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function Te(oe,te,z,re){return new(z||(z=Promise))(function(le,ne){function be(gt){try{St(re.next(gt))}catch(dt){ne(dt)}}function Ze(gt){try{St(re.throw(gt))}catch(dt){ne(dt)}}function St(gt){var dt;gt.done?le(gt.value):(dt=gt.value,dt instanceof z?dt:new z(function(vt){vt(dt)})).then(be,Ze)}St((re=re.apply(oe,te||[])).next())})}function He(oe,te){var z,re,le,ne,be={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return ne={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Ze(St){return function(gt){return function(dt){if(z)throw new TypeError("Generator is already executing.");for(;be;)try{if(z=1,re&&(le=2&dt[0]?re.return:dt[0]?re.throw||((le=re.return)&&le.call(re),0):re.next)&&!(le=le.call(re,dt[1])).done)return le;switch(re=0,le&&(dt=[2&dt[0],le.value]),dt[0]){case 0:case 1:le=dt;break;case 4:return be.label++,{value:dt[1],done:!1};case 5:be.label++,re=dt[1],dt=[0];continue;case 7:dt=be.ops.pop(),be.trys.pop();continue;default:if(le=be.trys,!((le=le.length>0&&le[le.length-1])||dt[0]!==6&&dt[0]!==2)){be=0;continue}if(dt[0]===3&&(!le||dt[1]>le[0]&&dt[1]<le[3])){be.label=dt[1];break}if(dt[0]===6&&be.label<le[1]){be.label=le[1],le=dt;break}if(le&&be.label<le[2]){be.label=le[2],be.ops.push(dt);break}le[2]&&be.ops.pop(),be.trys.pop();continue}dt=te.call(oe,be)}catch(vt){dt=[6,vt],re=0}finally{z=le=0}if(5&dt[0])throw dt[1];return{value:dt[0]?dt[1]:void 0,done:!0}}([St,gt])}}}function pe(){for(var oe=0,te=0,z=arguments.length;te<z;te++)oe+=arguments[te].length;var re=Array(oe),le=0;for(te=0;te<z;te++)for(var ne=arguments[te],be=0,Ze=ne.length;be<Ze;be++,le++)re[le]=ne[be];return re}var ge=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(te,z){for(var re=0,le=z;re<le.length;re++){var ne=le[re],be=ne[0],Ze=ne[1];te.setAttribute(be,Ze)}},oe.createRect=function(te,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",te.toString()),le.setAttribute("height",z.toString()),re&&oe.setAttributes(le,re),le},oe.createLine=function(te,z,re,le,ne){var be=document.createElementNS("http://www.w3.org/2000/svg","line");return be.setAttribute("x1",te.toString()),be.setAttribute("y1",z.toString()),be.setAttribute("x2",re.toString()),be.setAttribute("y2",le.toString()),ne&&oe.setAttributes(be,ne),be},oe.createPolygon=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",te),z&&oe.setAttributes(re,z),re},oe.createCircle=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(te/2).toString()),re.setAttribute("cy",(te/2).toString()),re.setAttribute("r",te.toString()),z&&oe.setAttributes(re,z),re},oe.createEllipse=function(te,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(te/2).toString()),le.setAttribute("cy",(z/2).toString()),le.setAttribute("rx",(te/2).toString()),le.setAttribute("ry",(z/2).toString()),re&&oe.setAttributes(le,re),le},oe.createGroup=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&oe.setAttributes(z,te),z},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(te,z,re,le,ne,be,Ze){var St=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(St,[["id",te],["orient",z],["markerWidth",re.toString()],["markerHeight",le.toString()],["refX",ne.toString()],["refY",be.toString()]]),St.appendChild(Ze),St},oe.createText=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),te&&oe.setAttributes(z,te),z},oe.createTSpan=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=te,z&&oe.setAttributes(re,z),re},oe.createImage=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&oe.setAttributes(z,te),z},oe.createPoint=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=te,re.y=z,re},oe.createPath=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",te),z&&oe.setAttributes(re,z),re},oe}(),Fe=function(){function oe(){}return oe.addKey=function(te){oe.key=te},Object.defineProperty(oe,"isLicensed",{get:function(){return!!oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(oe.key)},enumerable:!1,configurable:!0}),oe}(),Ne=function(){function oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return oe.prototype.rasterize=function(te,z,re){var le=this;return new Promise(function(ne){var be=re!==void 0?re:document.createElement("canvas");te===null&&(le.markersOnly=!0,le.naturalSize=!1);var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg");Ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ze.setAttribute("width",z.width.baseVal.valueAsString),Ze.setAttribute("height",z.height.baseVal.valueAsString),Ze.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Ze.innerHTML=z.innerHTML,le.naturalSize===!0?(Ze.width.baseVal.value=te.naturalWidth,Ze.height.baseVal.value=te.naturalHeight):le.width!==void 0&&le.height!==void 0&&(Ze.width.baseVal.value=le.width,Ze.height.baseVal.value=le.height),be.width=Ze.width.baseVal.value,be.height=Ze.height.baseVal.value;var St=Ze.outerHTML,gt=be.getContext("2d");le.markersOnly!==!0&>.drawImage(te,0,0,be.width,be.height);var dt=window.URL,vt=new Image(be.width,be.height);vt.setAttribute("crossOrigin","anonymous");var Wt=new Blob([St],{type:"image/svg+xml"}),Rt=dt.createObjectURL(Wt);vt.onload=function(){gt.drawImage(vt,0,0),dt.revokeObjectURL(Rt);var qt=be.toDataURL(le.imageType,le.imageQuality);ne(qt)},vt.src=Rt})},oe}(),xe=function(){},fe=function(){function oe(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(oe.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(oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),oe.prototype.addClass=function(te){return this.styleSheet===void 0&&this.addStyleSheet(),te.name=""+this.classNamePrefix+te.localName,this.classes.push(te),this.styleSheet.sheet.insertRule("."+te.name+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length),te},oe.prototype.addRule=function(te){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(te),this.styleSheet.sheet.insertRule(te.selector+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var te;this.styleSheet=document.createElement("style"),((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).appendChild(this.styleSheet),this.addRule(new je("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new je("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new je("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new me("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new me("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},oe.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),je=function(oe,te){this.selector=oe,this.style=te},me=function(oe,te){this.localName=oe,this.style=te},Ue=function(){function oe(te,z,re,le,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=re,this.uiStyleSettings=le,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return oe.prototype.show=function(te){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",this.uiContainer.appendChild(re),this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ne){var be=document.createElement("div");be.className=""+z.toolbarButtonStyleClass.name,be.setAttribute("data-type-name",ne.typeName),be.innerHTML=ne.icon,be.addEventListener("click",function(){z.markerToolbarButtonClicked(be,ne)}),z.buttons.push(be),z.markerButtons.push(be)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},oe.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},oe.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<te||z===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},oe.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")},oe.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(z){z.className=z.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},oe.prototype.addActionButton=function(te,z,re){var le=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",re),ne.addEventListener("click",function(){le.actionToolbarButtonClicked(ne,re)}),re){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ne),this.buttons.push(ne)},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new me("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new me("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new me("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new me("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new me("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new me("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
padding: `+te+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new me("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new je("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new je("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},oe.prototype.markerToolbarButtonClicked=function(te,z){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},oe.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},oe.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},oe.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},oe.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(re){return/delete|notes/.test(re.getAttribute("data-action"))}).forEach(function(re){z.currentMarker===void 0?(re.style.fillOpacity="0.4",re.style.pointerEvents="none"):(re.style.fillOpacity="1",re.style.pointerEvents="all")})},oe}(),Le=function(){function oe(te,z,re,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=re,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return oe.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new me("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new me("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new me("toolbox-panel-row_colors",`
|
|
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
padding: `+z+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new je("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new je("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},oe.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},oe.prototype.setPanelButtons=function(te){var z,re,le=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((re=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&re!==void 0?re:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var be;ne.uiStyleSettings=le.uiStyleSettings;var Ze=document.createElement("div");Ze.className=le.toolboxButtonStyleClass.name+" "+((be=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&be!==void 0?be:le.toolboxButtonStyleColorsClass.name),Ze.innerHTML=ne.icon,Ze.title=ne.title,Ze.addEventListener("click",function(){le.panelButtonClick(ne)}),le.panelButtons.push(Ze),le.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},oe.prototype.panelButtonClick=function(te){var z=this,re=-1;if(te!==this.activePanel){re=this.panels.indexOf(te),this.panelRow.innerHTML="";var le=te.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,be){var Ze,St;ne.className=z.toolboxButtonStyleClass.name+" "+(be===re?""+((Ze=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:z.toolboxActiveButtonStyleColorsClass.name):""+((St=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&St!==void 0?St:z.toolboxButtonStyleColorsClass.name))})},oe}(),Ce=function(oe,te){this.title=oe,this.icon=te},De=function(oe){function te(z,re,le,ne){var be=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return be.colors=[],be.addTransparent=!1,be.colorBoxes=[],be.colors=re,be.currentColor=le,be.setCurrentColor=be.setCurrentColor.bind(be),be.getColorBox=be.getColorBox.bind(be),be}return Xe(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(le){var ne=z.getColorBox(le);re.appendChild(ne),z.colorBoxes.push(ne)}),re},te.prototype.getColorBox=function(z){var re=this,le=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-le,be=document.createElement("div");be.style.display="inline-block",be.style.boxSizing="content-box",be.style.width=ne-2+"px",be.style.height=ne-2+"px",be.style.padding="1px",be.style.marginRight="2px",be.style.marginBottom="2px",be.style.borderWidth="2px",be.style.borderStyle="solid",be.style.borderRadius=(ne+2)/2+"px",be.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",be.addEventListener("click",function(){re.setCurrentColor(z,be)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=ne-2+"px",Ze.style.height=ne-2+"px",Ze.style.backgroundColor=z,Ze.style.borderRadius=ne/2+"px",z==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),be.appendChild(Ze),be},te.prototype.setCurrentColor=function(z,re){var le=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(Ce),ke=function(){function oe(te,z,re){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=re,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),oe.prototype.ownsTarget=function(te){return!1},Object.defineProperty(oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},oe.prototype.pointerDown=function(te,z){},oe.prototype.dblClick=function(te,z){},oe.prototype.manipulate=function(te){},oe.prototype.pointerUp=function(te){this.stateChanged()},oe.prototype.dispose=function(){},oe.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},oe.prototype.getState=function(){return{typeName:oe.typeName,state:this.state,notes:this.notes}},oe.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},oe.prototype.scale=function(te,z){},oe.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},oe.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},oe.typeName="MarkerBase",oe}(),Ye=function(){function oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return oe.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},oe}(),tt=function(){function oe(){this.GRIP_SIZE=10,this.visual=ge.createGroup(),this.visual.appendChild(ge.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ge.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},oe}(),it=function(){function oe(){}return oe.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},oe.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},oe}(),nt=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(ge.createTransform()),ne.setupControlBox(),ne}return Xe(te,oe),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var re=ge.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!oe.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(z);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(re),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(re)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var be=this.container.transform.baseVal.getItem(0);be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(be,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var re=this.state;oe.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var re=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(re.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(re.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(re):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var re=this.manipulationStartLeft,le=this.manipulationStartWidth,ne=this.manipulationStartTop,be=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,be=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:be=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=re,this.width=le):(this.left=re+le,this.width=-le),be>=0?(this.top=ne,this.height=be):(this.top=ne+be,this.height=-be),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var re=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*re,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM(),le=ge.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var le=ge.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},te.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup();var z=ge.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ge.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ge.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ye,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var z=new tt;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,le=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,be=(this.height+this.CB_DISTANCE)/2-z/2,Ze=this.height+this.CB_DISTANCE-z/2,St=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,le),this.positionGrip(this.controlGrips.topCenter.visual,ne,le),this.positionGrip(this.controlGrips.topRight.visual,St,le),this.positionGrip(this.controlGrips.centerLeft.visual,re,be),this.positionGrip(this.controlGrips.centerRight.visual,St,be),this.positionGrip(this.controlGrips.bottomLeft.visual,re,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,St,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,le-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:it.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:it.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},oe.prototype.getState.call(this))},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.left=re.left,this.top=re.top,this.width=re.width,this.height=re.height,this.rotationAngle=re.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re);var le=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:le.x*z,y:le.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},te}(ke),Ve=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){oe.prototype.setSize.call(this),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this))},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},te.title="Rectangle marker",te}(nt),rt=function(oe){function te(z,re,le,ne){var be=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return be.widths=[],be.widthBoxes=[],be.widths=re,be.currentWidth=le,be.setCurrentWidth=be.setCurrentWidth.bind(be),be}return Xe(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.widths.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=le===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.innerText=le.toString(),be.style.marginRight="5px",ne.appendChild(be);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var St=document.createElement("hr");St.style.minWidth="20px",St.style.border="0px",St.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,St.style.flexGrow="2",Ze.appendChild(St),ne.appendChild(Ze),z.widthBoxes.push(ne)}),re},te.prototype.setCurrentWidth=function(z,re){var le=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Ce),$e=function(oe){function te(z,re,le,ne){var be=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return be.styles=[],be.styleBoxes=[],be.styles=re,be.currentStyle=le,be.setCurrentStyle=be.setCurrentStyle.bind(be),be}return Xe(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.styles.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.styles.length-5+"%",ne.style.borderColor=le===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.style.minHeight="20px",be.style.flexGrow="2",be.style.overflow="hidden";var Ze=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
</svg>`;be.innerHTML=Ze,ne.appendChild(be),z.styleBoxes.push(ne)}),re},te.prototype.setCurrentStyle=function(z,re){var le=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Ce),Ht=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new De("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new $e("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Xe(te,oe),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(Ve),Ge=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"},_e=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!!oe.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(re)?this.activeGrip=this.grip1:this.grip2.ownsTarget(re)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var re=this.state;oe.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var z=new tt;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},oe.prototype.getState.call(this))},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.x1=re.x1,this.y1=re.y1,this.x2=re.x2,this.y2=re.y2},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.x1=this.x1*z,this.y1=this.y1*re,this.x2=this.x2*z,this.y2=this.y2*re,this.adjustVisual(),this.adjustControlBox()},te}(ke),ot=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new De("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new $e("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ge.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(_e),Se=function(oe){function te(z,re,le,ne){var be=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return be.fonts=[],be.fontBoxes=[],be.fonts=re,be.currentFont=le,be.setCurrentFont=be.setCurrentFont.bind(be),be}return Xe(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.flexGrow="2",this.fonts.forEach(function(le){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.fonts.length-5+"%",ne.style.borderColor=le===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.style.display="flex",be.style.minHeight="20px",be.style.flexGrow="2",be.style.fontFamily=le,be.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",be.appendChild(Ze),ne.appendChild(be),z.fontBoxes.push(ne)}),re},te.prototype.setCurrentFont=function(z,re){var le=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Ce),We=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=le.defaultColor,ne.fontFamily=le.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new De("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Se("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){if(oe.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var re=!1;return this.textElement.childNodes.forEach(function(le){le===z&&(re=!0)}),re},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.bgRectangle=ge.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ge.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(re){z.textElement.appendChild(ge.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),re=1;if(z.width>0&&z.height>0){var le=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;re=Math.min(le,ne)}return re},te.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),le=0,ne=0;return re.width>0&&re.height>0&&(le=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:le,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),le=this.getTextPosition(re);le.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},te.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var re=this.state;re==="creating"&&(this._suppressMarkerCreateEvent=!0),oe.prototype.pointerUp.call(this,z),this.setSize(),(re==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var re=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&re>.9;)re-=.1,z.textEditor.style.fontSize=Math.max(re,.9)+"em"}),this.textEditor.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(re){if(re.clipboardData){var le=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(le)),re.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),re=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),ne={x:le.width*z,y:le.height*z};re.x-=ne.x/2,re.y-=ne.y/2,this.textEditor.style.top=re.y+"px",this.textEditor.style.left=re.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-re.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),oe.prototype.deselect.call(this)},te.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&ge.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&ge.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.color=re.color,this.fontFamily=re.fontFamily,this.padding=re.padding,this.text=re.text,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',te}(nt),Pe=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=le.defaultColor,ne.lineWidth=le.defaultStrokeWidth,ne.pixelRatio=le.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new De("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new rt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.drawingImage=ge.createImage(),this.visual.appendChild(this.drawingImage);var z=ge.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):oe.prototype.pointerDown.call(this,z,re)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):oe.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):oe.prototype.pointerUp.call(this,z)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),re=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=re[0],ne=re[1],be=re[2],Ze=re[3],St=!1,gt=0;gt<this.canvasElement.height;gt++)for(var dt=0;dt<this.canvasElement.width;dt++)z.data[gt*this.canvasElement.width*4+4*dt+3]>0&&(St=!0,gt<ne&&(ne=gt),dt<le&&(le=dt),gt>Ze&&(Ze=gt),dt>be&&(be=dt));if(St){this.left=le/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(be-le)/this.pixelRatio,this.height=(Ze-ne)/this.pixelRatio;var vt=document.createElement("canvas");vt.width=be-le,vt.height=Ze-ne,vt.getContext("2d").putImageData(this.canvasContext.getImageData(le,ne,be-le,Ze-ne),0,0),this.drawingImgUrl=vt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),oe.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',te}(nt),Je=function(oe){function te(z,re,le){var ne=oe.call(this,z,le||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=re,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Xe(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var le=function(Ze){var St="both";switch(Ze){case 0:St="both";break;case 1:St="start";break;case 2:St="end";break;case 3:St="none"}var gt=document.createElement("div");if(gt.style.display="flex",gt.style.flexGrow="2",gt.style.alignItems="center",gt.style.justifyContent="space-between",gt.style.padding="5px",gt.style.borderWidth="2px",gt.style.borderStyle="solid",gt.style.borderColor=St===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",gt.addEventListener("click",function(){z.setCurrentType(St,gt)}),re.appendChild(gt),St==="both"||St==="start"){var dt=document.createElement("div");dt.style.display="flex",dt.style.alignItems="center",dt.style.minHeight="20px",dt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,dt.style.marginLeft="5px",gt.appendChild(dt)}var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.style.flexGrow="2";var Wt=document.createElement("hr");if(Wt.style.minWidth="20px",Wt.style.border="0px",Wt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Wt.style.flexGrow="2",vt.appendChild(Wt),gt.appendChild(vt),St==="both"||St==="end"){var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.alignItems="center",Rt.style.minHeight="20px",Rt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Rt.style.marginRight="5px",gt.appendChild(Rt)}ne.typeBoxes.push(gt)},ne=this,be=0;be<4;be++)le(be);return re},te.prototype.setCurrentType=function(z,re){var le=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Ce),Ot=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new Je("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,re){var le=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-le/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+le/2)+","+(re+ne/2)},te.prototype.createTips=function(){this.arrow1=ge.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ge.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ge.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ge.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var re=this.arrow1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(re,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',te}(ot),pt=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.fillColor=le.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new De("Color",le.defaultColorSet,le.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Xe(te,oe),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(Ve),en=function(oe){function te(z,re,le,ne){var be=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return be.opacities=[],be.opacityBoxes=[],be.opacities=re,be.currentOpacity=le,be.setCurrentOpacity=be.setCurrentOpacity.bind(be),be}return Xe(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",re.style.justifyContent="space-between",this.opacities.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=le===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.innerText=100*le+"%",ne.appendChild(be),z.opacityBoxes.push(ne)}),re},te.prototype.setCurrentOpacity=function(z,re){var le=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Ce),Dt=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=le.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=le.defaultHighlightOpacity,ne.fillPanel=new De("Color",le.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new en("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Xe(te,oe),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',te}(pt),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>',he='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',at=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=le.defaultStrokeColor,ne.bgColor=le.defaultFillColor,ne.fontFamily=le.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new De("Text color",le.defaultColorSet,ne.color,ve),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new De("Fill color",le.defaultColorSet,ne.bgColor,he),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Se("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new tt,ne.tipGrip.visual.transform.baseVal.appendItem(ge.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return oe.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},te.prototype.createTip=function(){ge.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ge.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,re){this.state==="new"&&oe.prototype.pointerDown.call(this,z,re),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(re)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):oe.prototype.pointerDown.call(this,z,re)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,oe.prototype.pointerUp.call(this,z);else{var re=this.state==="creating";oe.prototype.pointerUp.call(this,z),this.setTipPoints(re),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var re=this.unrotatePoint(z);this.tipPosition={x:re.x-this.manipulationStartLeft,y:re.y-this.manipulationStartTop},this.positionTip()}else oe.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ge.setAttributes(this.bgRectangle,[["fill",z]]),ge.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var re=Math.min(this.height/2,15),le=this.height/5;z&&(this.tipPosition={x:re+le/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+le,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-le},this.tipBase2Position={x:this.width,y:this.height-re}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-le})},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.positionTip()},te.prototype.positionTip=function(){ge.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),oe.prototype.select.call(this)},te.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.bgColor=re.bgColor,this.tipPosition=re.tipPosition,oe.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*re},this.positionTip()},te.typeName="CalloutMarker",te.title="Callout marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',te}(We),Gt=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new De("Line color",pe(le.defaultColorSet,["transparent"]),le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new De("Fill color",pe(le.defaultColorSet,["transparent"]),ne.fillColor,he),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new rt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new $e("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new en("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){oe.prototype.setSize.call(this),ge.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},te.typeName="EllipseMarker",te.title="Ellipse marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(nt),mt=function(oe){function te(z,re,le){return oe.call(this,z,re,le)||this}return Xe(te,oe),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},te.prototype.createTips=function(){this.tip1=ge.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ge.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ge.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.tip1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(re,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',te}(ot),Be=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.strokePanel.colors=le.defaultColorSet,ne.fillColor="transparent",ne}return Xe(te,oe),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(Gt),Ke=function(){function oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),oe.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},oe.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},oe.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},oe}(),qe=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new De("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new $e("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorCurve=ge.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ge.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(re)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ge.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=ge.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ge.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,oe.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){oe.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),oe.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),oe.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,re){this.curveX=this.curveX*z,this.curveY=this.curveY*re,oe.prototype.scale.call(this,z,re)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.curveX=re.curveX,this.curveY=re.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',te}(_e),Kt=function(oe){function te(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.textColor="transparent",ne.fontSize="1rem",ne.isMoved=!1,ne.captionText="Caption",ne.PADDING=5,ne.captionBoxWidth=0,ne.captionBoxHeight=0,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.textColor=le.defaultStrokeColor,ne.fontFamily=le.defaultFontFamily,ne.fontSize=le.defaultCaptionFontSize,ne.captionText=le.defaultCaptionText,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.sizeCaption=ne.sizeCaption.bind(ne),ne.setCaptionText=ne.setCaptionText.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.finishTextEditing=ne.finishTextEditing.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.setTextColor=ne.setTextColor.bind(ne),ne.strokePanel=new De("Line color",pe(le.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new De("Fill color",pe(le.defaultColorSet,["transparent"]),ne.fillColor,he),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new rt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new $e("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Se("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new De("Text color",le.defaultColorSet,ne.textColor,ve),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Xe(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ge.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ge.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=ge.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ge.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),ge.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(re){re.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){oe.prototype.setSize.call(this),ge.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ge.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ge.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ge.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ge.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},oe.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.textColor=re.textColor,this.fontFamily=re.fontFamily,this.captionText=re.captionText,this.fontSize=re.fontSize,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',te}(nt),st=function(){function oe(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),oe.prototype.preventDefault=function(){this._defaultPrevented=!0},oe}(),Lt=function(oe){function te(z,re,le){var ne=oe.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=le,ne}return Xe(te,oe),te}(st),Oe=function(oe){function te(z,re,le){le===void 0&&(le=!1);var ne=oe.call(this,z,le)||this;return ne.marker=re,ne}return Xe(te,oe),te}(st),ut=function(){function oe(){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 oe.prototype.addEventListener=function(te,z){this[te].push(z)},oe.prototype.removeEventListener=function(te,z){var re=this[te].indexOf(z);re>-1&&this[te].splice(re,1)},oe}(),ft=function(){function oe(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ge,this._isOpen=!1,this.undoRedoManager=new Ke,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 ut,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=oe.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ht,Pe,Ot,We,Be,Gt,Dt,at,mt,pt,ot,qe,Kt]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ht,Pe,Ot,We,Gt,Dt,at]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ht,Pe,Ot,We,Dt]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(re){if(typeof re=="string"){var le=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});le!==void 0&&z._availableMarkerTypes.push(le)}else z._availableMarkerTypes.push(re)})},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Fe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},oe.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&xe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=xe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new st(te))})},oe.prototype.render=function(){return Te(this,void 0,void 0,function(){var te;return He(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new Ne).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},oe.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var re=!1;te||this.eventListeners.beforeclose.forEach(function(le){var ne=new st(z,!0);le(ne),ne.defaultPrevented&&(re=!0)}),re||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(le){return le(new st(z))}),this.detachEvents(),this._isOpen=!1)}},oe.prototype.addMarkersToToolbar=function(){for(var te,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];(te=this._availableMarkerTypes).push.apply(te,z)},oe.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(z){te(z.dataUrl,z.state)})},oe.prototype.removeRenderEventListener=function(te){},oe.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},oe.prototype.removeCloseEventListener=function(te){},oe.prototype.setupResizeObserver=function(){var te=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){te.resize(te.target.clientWidth,te.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return te.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,re=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(z,re)},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.resize=function(te,z){this._isResizing=!0;var re=te/this.imageWidth,le=z/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(z),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(re,le),this._isResizing=!1},oe.prototype.scaleMarkers=function(te,z){var re,le=this;this._currentMarker&&this._currentMarker instanceof We?this._currentMarker.scale(te,z):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==le._currentMarker&&ne.scale(te,z)}),re!==void 0&&this.setCurrentMarker(re)},oe.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"},oe.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=te.left-z.left,this.top=te.top-z.top},oe.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)},oe.prototype.addDefs=function(){for(var te,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];this.defs=ge.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,z)},oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},oe.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)},oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},oe.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)},oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},oe.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)},oe.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var te=document.createElement("a");te.href="https://markerjs.com/",te.target="_blank",te.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',te.title="Powered by marker.js",te.style.display="grid",te.style.alignItems="center",te.style.justifyItems="center",te.style.padding="3px",te.style.width="20px",te.style.height="20px",this.logoUI.appendChild(te),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},oe.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")},oe.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"},oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},oe.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var te=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new 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")},oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},oe.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())},oe.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},oe.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var ne=new Oe(te,te._currentMarker,!0);le(ne),ne.defaultPrevented&&(z=!0)}),!z){var re=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(le){return le(new Oe(te,re))})}}},oe.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(be){var Ze=new Oe(te,void 0,!0);be(Ze),Ze.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(be){var Ze=le.markers[be];le.setCurrentMarker(le.markers[be]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(St){return St(new Oe(te,Ze))})},le=this,ne=this.markers.length-1;ne>=0;ne--)re(ne);this.addUndoStep()}},Object.defineProperty(oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),oe.prototype.showNotesEditor=function(){var te;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},oe.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)},oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},oe.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),re=this.undoRedoManager.getLastUndoStep();if(!re||re.width===z.width&&re.height===z.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new st(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new st(te))})}},oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},oe.prototype.undoStep=function(){var te=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new st(te))}))},oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},oe.prototype.redoStep=function(){var te=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new st(te))}))},oe.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},oe.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},oe.prototype.startRenderAndClose=function(){return Te(this,void 0,void 0,function(){var te,z,re=this;return He(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return te=le.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Lt(re,te,z))}),this.close(!0),[2]}})})},oe.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(re){return z.markers.push(re.getState())}),z},oe.prototype.restoreState=function(te){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(re){var le=z._availableMarkerTypes.find(function(be){return be.typeName===re.typeName});if(le!==void 0){var ne=z.addNewMarker(le);ne.restoreState(re),z.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(re){return re(new st(z))})},oe.prototype.addNewMarker=function(te){var z=ge.createGroup();return this.markerImage.appendChild(z),new te(z,this.overlayContainer,this.settings)},oe.prototype.createNewMarker=function(te){var z,re=this;(z=typeof te=="string"?this._availableMarkerTypes.find(function(le){return le.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(le){return le(new Oe(re,re._currentMarker))}))},oe.prototype.markerCreated=function(te){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof Pe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Pe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new Oe(z,z._currentMarker))})},oe.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},oe.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},oe.prototype.markerStateChanged=function(te){var z=this;this.eventListeners.markerchange.forEach(function(re){return re(new Oe(z,te))})},oe.prototype.setCurrentMarker=function(te){var z=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(re){return re(new Oe(z,z._currentMarker))})),this._currentMarker=te,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(re){return re(new Oe(z,z._currentMarker))}))},oe.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(te.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},oe.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(te.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},oe.prototype.onPointerMove=function(te){this.touchPoints!==1&&te.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||te.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(te.clientX,te.clientY)):this.zoomLevel>1&&this.panTo({x:te.clientX,y:te.clientY}))},oe.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},oe.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},oe.prototype.clientToLocalCoordinates=function(te,z){var re=this.markerImage.getBoundingClientRect();return{x:(te-re.left)/this.zoomLevel,y:(z-re.top)/this.zoomLevel}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},oe.prototype.addLicenseKey=function(te){Fe.addKey(te)},oe.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},oe.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},oe.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),oe.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new st(te))}))},oe.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new st(te))}))},oe.instanceCounter=0,oe}()},66042:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return We}});var ue=de(27247),Xe=de(11913),Te=de(43403),He=de(34280),pe=de(59301),ge=pe.createContext(null),Fe=pe.createContext({}),Ne=ge,xe=de(74430),fe=de(32855),je=de(92310),me=de.n(je),Ue=de(77900),Le=de(10228),Ce=de(26112),De=de(43079),ke=de(8654),Ye=["prefixCls","className","containerRef"],tt=function(Je){var Ot=Je.prefixCls,pt=Je.className,en=Je.containerRef,Dt=(0,De.Z)(Je,Ye),ve=pe.useContext(Fe),he=ve.panel,at=(0,ke.x1)(he,en);return pe.createElement("div",(0,fe.Z)({className:me()("".concat(Ot,"-content"),pt),role:"dialog",ref:at},(0,Ce.Z)(Je,{aria:!0}),{"aria-modal":"true"},Dt))},it=tt,nt=de(48736);function Ve(Pe){return typeof Pe=="string"&&String(Number(Pe))===Pe?((0,nt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Pe)):Pe}function rt(Pe){warning(!("wrapperClassName"in Pe),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Pe.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 Ht(Pe,Je){var Ot,pt,en,Dt=Pe.prefixCls,ve=Pe.open,he=Pe.placement,at=Pe.inline,Gt=Pe.push,mt=Pe.forceRender,Be=Pe.autoFocus,Ke=Pe.keyboard,qe=Pe.classNames,Kt=Pe.rootClassName,st=Pe.rootStyle,Lt=Pe.zIndex,Oe=Pe.className,ut=Pe.id,ft=Pe.style,oe=Pe.motion,te=Pe.width,z=Pe.height,re=Pe.children,le=Pe.mask,ne=Pe.maskClosable,be=Pe.maskMotion,Ze=Pe.maskClassName,St=Pe.maskStyle,gt=Pe.afterOpenChange,dt=Pe.onClose,vt=Pe.onMouseEnter,Wt=Pe.onMouseOver,Rt=Pe.onMouseLeave,qt=Pe.onClick,$t=Pe.onKeyDown,kt=Pe.onKeyUp,hn=Pe.styles,jt=Pe.drawerRender,tn=pe.useRef(),et=pe.useRef(),pn=pe.useRef();pe.useImperativeHandle(Je,function(){return tn.current});var It=function(ii){var Un=ii.keyCode,ki=ii.shiftKey;switch(Un){case Le.Z.TAB:{if(Un===Le.Z.TAB){if(!ki&&document.activeElement===pn.current){var rn;(rn=et.current)===null||rn===void 0||rn.focus({preventScroll:!0})}else if(ki&&document.activeElement===et.current){var dn;(dn=pn.current)===null||dn===void 0||dn.focus({preventScroll:!0})}}break}case Le.Z.ESC:{dt&&Ke&&(ii.stopPropagation(),dt(ii));break}}};pe.useEffect(function(){if(ve&&Be){var In;(In=tn.current)===null||In===void 0||In.focus({preventScroll:!0})}},[ve]);var Vt=pe.useState(!1),an=(0,Xe.Z)(Vt,2),Pn=an[0],sn=an[1],mn=pe.useContext(Ne),ni;typeof Gt=="boolean"?ni=Gt?{}:{distance:0}:ni=Gt||{};var Vn=(Ot=(pt=(en=ni)===null||en===void 0?void 0:en.distance)!==null&&pt!==void 0?pt:mn==null?void 0:mn.pushDistance)!==null&&Ot!==void 0?Ot:180,zi=pe.useMemo(function(){return{pushDistance:Vn,push:function(){sn(!0)},pull:function(){sn(!1)}}},[Vn]);pe.useEffect(function(){if(ve){var In;mn==null||(In=mn.push)===null||In===void 0||In.call(mn)}else{var ii;mn==null||(ii=mn.pull)===null||ii===void 0||ii.call(mn)}},[ve]),pe.useEffect(function(){return function(){var In;mn==null||(In=mn.pull)===null||In===void 0||In.call(mn)}},[]);var Hi=le&&pe.createElement(Ue.default,(0,fe.Z)({key:"mask"},be,{visible:ve}),function(In,ii){var Un=In.className,ki=In.style;return pe.createElement("div",{className:me()("".concat(Dt,"-mask"),Un,qe==null?void 0:qe.mask,Ze),style:(0,ue.Z)((0,ue.Z)((0,ue.Z)({},ki),St),hn==null?void 0:hn.mask),onClick:ne&&ve?dt:void 0,ref:ii})}),xi=typeof oe=="function"?oe(he):oe,gi={};if(Pn&&Vn)switch(he){case"top":gi.transform="translateY(".concat(Vn,"px)");break;case"bottom":gi.transform="translateY(".concat(-Vn,"px)");break;case"left":gi.transform="translateX(".concat(Vn,"px)");break;default:gi.transform="translateX(".concat(-Vn,"px)");break}he==="left"||he==="right"?gi.width=Ve(te):gi.height=Ve(z);var Wn={onMouseEnter:vt,onMouseOver:Wt,onMouseLeave:Rt,onClick:qt,onKeyDown:$t,onKeyUp:kt},ri=pe.createElement(Ue.default,(0,fe.Z)({key:"panel"},xi,{visible:ve,forceRender:mt,onVisibleChanged:function(ii){gt==null||gt(ii)},removeOnLeave:!1,leavedClassName:"".concat(Dt,"-content-wrapper-hidden")}),function(In,ii){var Un=In.className,ki=In.style,rn=pe.createElement(it,(0,fe.Z)({id:ut,containerRef:ii,prefixCls:Dt,className:me()(Oe,qe==null?void 0:qe.content),style:(0,ue.Z)((0,ue.Z)({},ft),hn==null?void 0:hn.content)},(0,Ce.Z)(Pe,{aria:!0}),Wn),re);return pe.createElement("div",(0,fe.Z)({className:me()("".concat(Dt,"-content-wrapper"),qe==null?void 0:qe.wrapper,Un),style:(0,ue.Z)((0,ue.Z)((0,ue.Z)({},gi),ki),hn==null?void 0:hn.wrapper)},(0,Ce.Z)(Pe,{data:!0})),jt?jt(rn):rn)}),Ri=(0,ue.Z)({},st);return Lt&&(Ri.zIndex=Lt),pe.createElement(Ne.Provider,{value:zi},pe.createElement("div",{className:me()(Dt,"".concat(Dt,"-").concat(he),Kt,(0,xe.Z)((0,xe.Z)({},"".concat(Dt,"-open"),ve),"".concat(Dt,"-inline"),at)),style:Ri,tabIndex:-1,ref:tn,onKeyDown:It},Hi,pe.createElement("div",{tabIndex:0,ref:et,style:$e,"aria-hidden":"true","data-sentinel":"start"}),ri,pe.createElement("div",{tabIndex:0,ref:pn,style:$e,"aria-hidden":"true","data-sentinel":"end"})))}var Ge=pe.forwardRef(Ht),_e=Ge,ot=function(Je){var Ot=Je.open,pt=Ot===void 0?!1:Ot,en=Je.prefixCls,Dt=en===void 0?"rc-drawer":en,ve=Je.placement,he=ve===void 0?"right":ve,at=Je.autoFocus,Gt=at===void 0?!0:at,mt=Je.keyboard,Be=mt===void 0?!0:mt,Ke=Je.width,qe=Ke===void 0?378:Ke,Kt=Je.mask,st=Kt===void 0?!0:Kt,Lt=Je.maskClosable,Oe=Lt===void 0?!0:Lt,ut=Je.getContainer,ft=Je.forceRender,oe=Je.afterOpenChange,te=Je.destroyOnClose,z=Je.onMouseEnter,re=Je.onMouseOver,le=Je.onMouseLeave,ne=Je.onClick,be=Je.onKeyDown,Ze=Je.onKeyUp,St=Je.panelRef,gt=pe.useState(!1),dt=(0,Xe.Z)(gt,2),vt=dt[0],Wt=dt[1],Rt=pe.useState(!1),qt=(0,Xe.Z)(Rt,2),$t=qt[0],kt=qt[1];(0,He.Z)(function(){kt(!0)},[]);var hn=$t?pt:!1,jt=pe.useRef(),tn=pe.useRef();(0,He.Z)(function(){hn&&(tn.current=document.activeElement)},[hn]);var et=function(Pn){var sn;if(Wt(Pn),oe==null||oe(Pn),!Pn&&tn.current&&!((sn=jt.current)!==null&&sn!==void 0&&sn.contains(tn.current))){var mn;(mn=tn.current)===null||mn===void 0||mn.focus({preventScroll:!0})}},pn=pe.useMemo(function(){return{panel:St}},[St]);if(!ft&&!vt&&!hn&&te)return null;var It={onMouseEnter:z,onMouseOver:re,onMouseLeave:le,onClick:ne,onKeyDown:be,onKeyUp:Ze},Vt=(0,ue.Z)((0,ue.Z)({},Je),{},{open:hn,prefixCls:Dt,placement:he,autoFocus:Gt,keyboard:Be,width:qe,mask:st,maskClosable:Oe,inline:ut===!1,afterOpenChange:et,ref:jt},It);return pe.createElement(Fe.Provider,{value:pn},pe.createElement(Te.Z,{open:hn||ft||vt,autoDestroy:!1,getContainer:ut,autoLock:st&&(hn||vt)},pe.createElement(_e,Vt)))},Se=ot,We=Se},6551:function(xt,Et,de){"use strict";de.d(Et,{ZP:function(){return Fe}});var ue=de(11913),Xe=de(59301),Te=de(47273),He=0,pe=(0,Te.Z)();function ge(){var Ne;return pe?(Ne=He,He+=1):Ne="TEST_OR_SSR",Ne}function Fe(Ne){var xe=Xe.useState(),fe=(0,ue.Z)(xe,2),je=fe[0],me=fe[1];return Xe.useEffect(function(){me("rc_select_".concat(ge()))},[]),Ne||je}},37463:function(xt,Et,de){"use strict";de.d(Et,{Ac:function(){return et},Xo:function(){return It},Wx:function(){return an},ZP:function(){return jn},lk:function(){return it}});var ue=de(32855),Xe=de(3300),Te=de(74430),He=de(27247),pe=de(11913),ge=de(43079),Fe=de(34666),Ne=de(18929),xe=de(48736),fe=de(59301),je=de(92310),me=de.n(je),Ue=de(34280),Le=de(49658),Ce=de(8654),De=function(Me){var wt=Me.className,lt=Me.customizeIcon,Re=Me.customizeIconProps,ct=Me.children,Nt=Me.onMouseDown,Qt=Me.onClick,nn=typeof lt=="function"?lt(Re):lt;return fe.createElement("span",{className:wt,onMouseDown:function(_t){_t.preventDefault(),Nt==null||Nt(_t)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Qt,"aria-hidden":!0},nn!==void 0?nn:fe.createElement("span",{className:me()(wt.split(/\s+/).map(function(Mt){return"".concat(Mt,"-icon")}))},ct))},ke=De,Ye=function(Me,wt,lt,Re,ct){var Nt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Qt=arguments.length>6?arguments[6]:void 0,nn=arguments.length>7?arguments[7]:void 0,Mt=fe.useMemo(function(){if((0,Fe.Z)(Re)==="object")return Re.clearIcon;if(ct)return ct},[Re,ct]),_t=fe.useMemo(function(){return!!(!Nt&&Re&&(lt.length||Qt)&&!(nn==="combobox"&&Qt===""))},[Re,Nt,lt.length,Qt,nn]);return{allowClear:_t,clearIcon:fe.createElement(ke,{className:"".concat(Me,"-clear"),onMouseDown:wt,customizeIcon:Mt},"\xD7")}},tt=fe.createContext(null);function it(){return fe.useContext(tt)}function nt(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Me=fe.useState(!1),wt=(0,pe.Z)(Me,2),lt=wt[0],Re=wt[1],ct=fe.useRef(null),Nt=function(){window.clearTimeout(ct.current)};fe.useEffect(function(){return Nt},[]);var Qt=function(Mt,_t){Nt(),ct.current=window.setTimeout(function(){Re(Mt),_t&&_t()},Ee)};return[lt,Qt,Nt]}function Ve(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Me=fe.useRef(null),wt=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(wt.current)}},[]);function lt(Re){(Re||Me.current===null)&&(Me.current=Re),window.clearTimeout(wt.current),wt.current=window.setTimeout(function(){Me.current=null},Ee)}return[function(){return Me.current},lt]}function rt(Ee,Me,wt,lt){var Re=fe.useRef(null);Re.current={open:Me,triggerOpen:wt,customizedTrigger:lt},fe.useEffect(function(){function ct(Nt){var Qt;if(!((Qt=Re.current)!==null&&Qt!==void 0&&Qt.customizedTrigger)){var nn=Nt.target;nn.shadowRoot&&Nt.composed&&(nn=Nt.composedPath()[0]||nn),Re.current.open&&Ee().filter(function(Mt){return Mt}).every(function(Mt){return!Mt.contains(nn)&&Mt!==nn})&&Re.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ct),function(){return window.removeEventListener("mousedown",ct)}},[])}var $e=de(10228);function Ht(Ee){return Ee&&![$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(Ee)}var Ge=de(26112),_e=de(11780);function ot(Ee,Me,wt){var lt=(0,He.Z)((0,He.Z)({},Ee),wt?Me:{});return Object.keys(Me).forEach(function(Re){var ct=Me[Re];typeof ct=="function"&&(lt[Re]=function(){for(var Nt,Qt=arguments.length,nn=new Array(Qt),Mt=0;Mt<Qt;Mt++)nn[Mt]=arguments[Mt];return ct.apply(void 0,nn),(Nt=Ee[Re])===null||Nt===void 0?void 0:Nt.call.apply(Nt,[Ee].concat(nn))})}),lt}var Se=ot,We=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Pe=function(Me,wt){var lt=Me.prefixCls,Re=Me.id,ct=Me.inputElement,Nt=Me.autoFocus,Qt=Me.autoComplete,nn=Me.editable,Mt=Me.activeDescendantId,_t=Me.value,Ae=Me.open,yn=Me.attrs,Zt=(0,ge.Z)(Me,We),fn=ct||fe.createElement("input",null),ln=fn,bn=ln.ref,Mn=ln.props;return(0,xe.Kp)(!("maxLength"in fn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),fn=fe.cloneElement(fn,(0,He.Z)((0,He.Z)((0,He.Z)({type:"search"},Se(Zt,Mn,!0)),{},{id:Re,ref:(0,Ce.sQ)(wt,bn),autoComplete:Qt||"off",autoFocus:Nt,className:me()("".concat(lt,"-selection-search-input"),Mn==null?void 0:Mn.className),role:"combobox","aria-expanded":Ae||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Re,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Re,"_list"),"aria-activedescendant":Ae?Mt:void 0},yn),{},{value:nn?_t:"",readOnly:!nn,unselectable:nn?null:"on",style:(0,He.Z)((0,He.Z)({},Mn.style),{},{opacity:nn?null:0})})),fn},Je=fe.forwardRef(Pe),Ot=Je;function pt(Ee){return Array.isArray(Ee)?Ee:Ee!==void 0?[Ee]:[]}var en=typeof window!="undefined"&&window.document&&window.document.documentElement,Dt=en;function ve(Ee){return Ee!=null}function he(Ee){return!Ee&&Ee!==0}function at(Ee){return["string","number"].includes((0,Fe.Z)(Ee))}function Gt(Ee){var Me=void 0;return Ee&&(at(Ee.title)?Me=Ee.title.toString():at(Ee.label)&&(Me=Ee.label.toString())),Me}function mt(Ee,Me){Dt?fe.useLayoutEffect(Ee,Me):fe.useEffect(Ee,Me)}function Be(Ee){var Me;return(Me=Ee.key)!==null&&Me!==void 0?Me:Ee.value}var Ke=function(Me){Me.preventDefault(),Me.stopPropagation()},qe=function(Me){var wt=Me.id,lt=Me.prefixCls,Re=Me.values,ct=Me.open,Nt=Me.searchValue,Qt=Me.autoClearSearchValue,nn=Me.inputRef,Mt=Me.placeholder,_t=Me.disabled,Ae=Me.mode,yn=Me.showSearch,Zt=Me.autoFocus,fn=Me.autoComplete,ln=Me.activeDescendantId,bn=Me.tabIndex,Mn=Me.removeIcon,ci=Me.maxTagCount,Bn=Me.maxTagTextLength,Ln=Me.maxTagPlaceholder,ei=Ln===void 0?function(un){return"+ ".concat(un.length," ...")}:Ln,Tn=Me.tagRender,hi=Me.onToggleOpen,Oi=Me.onRemove,ai=Me.onInputChange,di=Me.onInputPaste,Li=Me.onInputKeyDown,fi=Me.onInputMouseDown,Xn=Me.onInputCompositionStart,Mi=Me.onInputCompositionEnd,Jn=Me.onInputBlur,si=fe.useRef(null),pi=(0,fe.useState)(0),wi=(0,pe.Z)(pi,2),li=wi[0],Kn=wi[1],zn=(0,fe.useState)(!1),Ti=(0,pe.Z)(zn,2),Zi=Ti[0],Gi=Ti[1],Yn="".concat(lt,"-selection"),ar=ct||Ae==="multiple"&&Qt===!1||Ae==="tags"?Nt:"",ti=Ae==="tags"||Ae==="multiple"&&Qt===!1||yn&&(ct||Zi);mt(function(){Kn(si.current.scrollWidth)},[ar]);var sr=function(Yt,xn,Tt,bt,Ft){return fe.createElement("span",{title:Gt(Yt),className:me()("".concat(Yn,"-item"),(0,Te.Z)({},"".concat(Yn,"-item-disabled"),Tt))},fe.createElement("span",{className:"".concat(Yn,"-item-content")},xn),bt&&fe.createElement(ke,{className:"".concat(Yn,"-item-remove"),onMouseDown:Ke,onClick:Ft,customizeIcon:Mn},"\xD7"))},tr=function(Yt,xn,Tt,bt,Ft,zt){var Dn=function(bi){Ke(bi),hi(!ct)};return fe.createElement("span",{onMouseDown:Dn},Tn({label:xn,value:Yt,disabled:Tt,closable:bt,onClose:Ft,isMaxTag:!!zt}))},Fi=function(Yt){var xn=Yt.disabled,Tt=Yt.label,bt=Yt.value,Ft=!_t&&!xn,zt=Tt;if(typeof Bn=="number"&&(typeof Tt=="string"||typeof Tt=="number")){var Dn=String(zt);Dn.length>Bn&&(zt="".concat(Dn.slice(0,Bn),"..."))}var Fn=function(_n){_n&&_n.stopPropagation(),Oi(Yt)};return typeof Tn=="function"?tr(bt,zt,xn,Ft,Fn):sr(Yt,zt,xn,Ft,Fn)},Rn=function(Yt){if(!Re.length)return null;var xn=typeof ei=="function"?ei(Yt):ei;return typeof Tn=="function"?tr(void 0,xn,!1,!1,void 0,!0):sr({title:xn},xn,!1)},Ct=fe.createElement("div",{className:"".concat(Yn,"-search"),style:{width:li},onFocus:function(){Gi(!0)},onBlur:function(){Gi(!1)}},fe.createElement(Ot,{ref:nn,open:ct,prefixCls:lt,id:wt,inputElement:null,disabled:_t,autoFocus:Zt,autoComplete:fn,editable:ti,activeDescendantId:ln,value:ar,onKeyDown:Li,onMouseDown:fi,onChange:ai,onPaste:di,onCompositionStart:Xn,onCompositionEnd:Mi,onBlur:Jn,tabIndex:bn,attrs:(0,Ge.Z)(Me,!0)}),fe.createElement("span",{ref:si,className:"".concat(Yn,"-search-mirror"),"aria-hidden":!0},ar,"\xA0")),Pt=fe.createElement(_e.Z,{prefixCls:"".concat(Yn,"-overflow"),data:Re,renderItem:Fi,renderRest:Rn,suffix:Ct,itemKey:Be,maxCount:ci});return fe.createElement("span",{className:"".concat(Yn,"-wrap")},Pt,!Re.length&&!ar&&fe.createElement("span",{className:"".concat(Yn,"-placeholder")},Mt))},Kt=qe,st=function(Me){var wt=Me.inputElement,lt=Me.prefixCls,Re=Me.id,ct=Me.inputRef,Nt=Me.disabled,Qt=Me.autoFocus,nn=Me.autoComplete,Mt=Me.activeDescendantId,_t=Me.mode,Ae=Me.open,yn=Me.values,Zt=Me.placeholder,fn=Me.tabIndex,ln=Me.showSearch,bn=Me.searchValue,Mn=Me.activeValue,ci=Me.maxLength,Bn=Me.onInputKeyDown,Ln=Me.onInputMouseDown,ei=Me.onInputChange,Tn=Me.onInputPaste,hi=Me.onInputCompositionStart,Oi=Me.onInputCompositionEnd,ai=Me.onInputBlur,di=Me.title,Li=fe.useState(!1),fi=(0,pe.Z)(Li,2),Xn=fi[0],Mi=fi[1],Jn=_t==="combobox",si=Jn||ln,pi=yn[0],wi=bn||"";Jn&&Mn&&!Xn&&(wi=Mn),fe.useEffect(function(){Jn&&Mi(!1)},[Jn,Mn]);var li=_t!=="combobox"&&!Ae&&!ln?!1:!!wi,Kn=di===void 0?Gt(pi):di,zn=fe.useMemo(function(){return pi?null:fe.createElement("span",{className:"".concat(lt,"-selection-placeholder"),style:li?{visibility:"hidden"}:void 0},Zt)},[pi,li,Zt,lt]);return fe.createElement("span",{className:"".concat(lt,"-selection-wrap")},fe.createElement("span",{className:"".concat(lt,"-selection-search")},fe.createElement(Ot,{ref:ct,prefixCls:lt,id:Re,open:Ae,inputElement:wt,disabled:Nt,autoFocus:Qt,autoComplete:nn,editable:si,activeDescendantId:Mt,value:wi,onKeyDown:Bn,onMouseDown:Ln,onChange:function(Zi){Mi(!0),ei(Zi)},onPaste:Tn,onCompositionStart:hi,onCompositionEnd:Oi,onBlur:ai,tabIndex:fn,attrs:(0,Ge.Z)(Me,!0),maxLength:Jn?ci:void 0})),!Jn&&pi?fe.createElement("span",{className:"".concat(lt,"-selection-item"),title:Kn,style:li?{visibility:"hidden"}:void 0},pi.label):null,zn)},Lt=st,Oe=function(Me,wt){var lt=(0,fe.useRef)(null),Re=(0,fe.useRef)(!1),ct=Me.prefixCls,Nt=Me.open,Qt=Me.mode,nn=Me.showSearch,Mt=Me.tokenWithEnter,_t=Me.disabled,Ae=Me.prefix,yn=Me.autoClearSearchValue,Zt=Me.onSearch,fn=Me.onSearchSubmit,ln=Me.onToggleOpen,bn=Me.onInputKeyDown,Mn=Me.onInputBlur,ci=Me.domRef;fe.useImperativeHandle(wt,function(){return{focus:function(Kn){lt.current.focus(Kn)},blur:function(){lt.current.blur()}}});var Bn=Ve(0),Ln=(0,pe.Z)(Bn,2),ei=Ln[0],Tn=Ln[1],hi=function(Kn){var zn=Kn.which,Ti=lt.current instanceof HTMLTextAreaElement;!Ti&&Nt&&(zn===$e.Z.UP||zn===$e.Z.DOWN)&&Kn.preventDefault(),bn&&bn(Kn),zn===$e.Z.ENTER&&Qt==="tags"&&!Re.current&&!Nt&&(fn==null||fn(Kn.target.value)),!(Ti&&!Nt&&~[$e.Z.UP,$e.Z.DOWN,$e.Z.LEFT,$e.Z.RIGHT].indexOf(zn))&&Ht(zn)&&ln(!0)},Oi=function(){Tn(!0)},ai=(0,fe.useRef)(null),di=function(Kn){Zt(Kn,!0,Re.current)!==!1&&ln(!0)},Li=function(){Re.current=!0},fi=function(Kn){Re.current=!1,Qt!=="combobox"&&di(Kn.target.value)},Xn=function(Kn){var zn=Kn.target.value;if(Mt&&ai.current&&/[\r\n]/.test(ai.current)){var Ti=ai.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zn=zn.replace(Ti,ai.current)}ai.current=null,di(zn)},Mi=function(Kn){var zn=Kn.clipboardData,Ti=zn==null?void 0:zn.getData("text");ai.current=Ti||""},Jn=function(Kn){var zn=Kn.target;if(zn!==lt.current){var Ti=document.body.style.msTouchAction!==void 0;Ti?setTimeout(function(){lt.current.focus()}):lt.current.focus()}},si=function(Kn){var zn=ei();Kn.target!==lt.current&&!zn&&!(Qt==="combobox"&&_t)&&Kn.preventDefault(),(Qt!=="combobox"&&(!nn||!zn)||!Nt)&&(Nt&&yn!==!1&&Zt("",!0,!1),ln())},pi={inputRef:lt,onInputKeyDown:hi,onInputMouseDown:Oi,onInputChange:Xn,onInputPaste:Mi,onInputCompositionStart:Li,onInputCompositionEnd:fi,onInputBlur:Mn},wi=Qt==="multiple"||Qt==="tags"?fe.createElement(Kt,(0,ue.Z)({},Me,pi)):fe.createElement(Lt,(0,ue.Z)({},Me,pi));return fe.createElement("div",{ref:ci,className:"".concat(ct,"-selector"),onClick:Jn,onMouseDown:si},Ae&&fe.createElement("div",{className:"".concat(ct,"-prefix")},Ae),wi)},ut=fe.forwardRef(Oe),ft=ut,oe=de(65030),te=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Me){var wt=Me===!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"}}},re=function(Me,wt){var lt=Me.prefixCls,Re=Me.disabled,ct=Me.visible,Nt=Me.children,Qt=Me.popupElement,nn=Me.animation,Mt=Me.transitionName,_t=Me.dropdownStyle,Ae=Me.dropdownClassName,yn=Me.direction,Zt=yn===void 0?"ltr":yn,fn=Me.placement,ln=Me.builtinPlacements,bn=Me.dropdownMatchSelectWidth,Mn=Me.dropdownRender,ci=Me.dropdownAlign,Bn=Me.getPopupContainer,Ln=Me.empty,ei=Me.getTriggerDOMNode,Tn=Me.onPopupVisibleChange,hi=Me.onPopupMouseEnter,Oi=(0,ge.Z)(Me,te),ai="".concat(lt,"-dropdown"),di=Qt;Mn&&(di=Mn(Qt));var Li=fe.useMemo(function(){return ln||z(bn)},[ln,bn]),fi=nn?"".concat(ai,"-").concat(nn):Mt,Xn=typeof bn=="number",Mi=fe.useMemo(function(){return Xn?null:bn===!1?"minWidth":"width"},[bn,Xn]),Jn=_t;Xn&&(Jn=(0,He.Z)((0,He.Z)({},Jn),{},{width:bn}));var si=fe.useRef(null);return fe.useImperativeHandle(wt,function(){return{getPopupElement:function(){var wi;return(wi=si.current)===null||wi===void 0?void 0:wi.popupElement}}}),fe.createElement(oe.Z,(0,ue.Z)({},Oi,{showAction:Tn?["click"]:[],hideAction:Tn?["click"]:[],popupPlacement:fn||(Zt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Li,prefixCls:ai,popupTransitionName:fi,popup:fe.createElement("div",{onMouseEnter:hi},di),ref:si,stretch:Mi,popupAlign:ci,popupVisible:ct,getPopupContainer:Bn,popupClassName:me()(Ae,(0,Te.Z)({},"".concat(ai,"-empty"),Ln)),popupStyle:Jn,getTriggerDOMNode:ei,onPopupVisibleChange:Tn}),Nt)},le=fe.forwardRef(re),ne=le,be=de(40954);function Ze(Ee,Me){var wt=Ee.key,lt;return"value"in Ee&&(lt=Ee.value),wt!=null?wt:lt!==void 0?lt:"rc-index-key-".concat(Me)}function St(Ee){return typeof Ee!="undefined"&&!Number.isNaN(Ee)}function gt(Ee,Me){var wt=Ee||{},lt=wt.label,Re=wt.value,ct=wt.options,Nt=wt.groupLabel,Qt=lt||(Me?"children":"label");return{label:Qt,value:Re||"value",options:ct||"options",groupLabel:Nt||Qt}}function dt(Ee){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},wt=Me.fieldNames,lt=Me.childrenAsData,Re=[],ct=gt(wt,!1),Nt=ct.label,Qt=ct.value,nn=ct.options,Mt=ct.groupLabel;function _t(Ae,yn){Array.isArray(Ae)&&Ae.forEach(function(Zt){if(yn||!(nn in Zt)){var fn=Zt[Qt];Re.push({key:Ze(Zt,Re.length),groupOption:yn,data:Zt,label:Zt[Nt],value:fn})}else{var ln=Zt[Mt];ln===void 0&<&&(ln=Zt.label),Re.push({key:Ze(Zt,Re.length),group:!0,data:Zt,label:ln}),_t(Zt[nn],!0)}})}return _t(Ee,!1),Re}function vt(Ee){var Me=(0,He.Z)({},Ee);return"props"in Me||Object.defineProperty(Me,"props",{get:function(){return(0,xe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Me}}),Me}var Wt=function(Me,wt,lt){if(!wt||!wt.length)return null;var Re=!1,ct=function Qt(nn,Mt){var _t=(0,be.Z)(Mt),Ae=_t[0],yn=_t.slice(1);if(!Ae)return[nn];var Zt=nn.split(Ae);return Re=Re||Zt.length>1,Zt.reduce(function(fn,ln){return[].concat((0,Xe.Z)(fn),(0,Xe.Z)(Qt(ln,yn)))},[]).filter(Boolean)},Nt=ct(Me,wt);return Re?typeof lt!="undefined"?Nt.slice(0,lt):Nt:null},Rt=fe.createContext(null),qt=Rt;function $t(Ee){var Me=Ee.visible,wt=Ee.values;if(!Me)return null;var lt=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(wt.slice(0,lt).map(function(Re){var ct=Re.label,Nt=Re.value;return["number","string"].includes((0,Fe.Z)(ct))?ct:Nt}).join(", ")),wt.length>lt?", ...":null)}var kt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],hn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],jt=function(Me){return Me==="tags"||Me==="multiple"},tn=fe.forwardRef(function(Ee,Me){var wt,lt=Ee.id,Re=Ee.prefixCls,ct=Ee.className,Nt=Ee.showSearch,Qt=Ee.tagRender,nn=Ee.direction,Mt=Ee.omitDomProps,_t=Ee.displayValues,Ae=Ee.onDisplayValuesChange,yn=Ee.emptyOptions,Zt=Ee.notFoundContent,fn=Zt===void 0?"Not Found":Zt,ln=Ee.onClear,bn=Ee.mode,Mn=Ee.disabled,ci=Ee.loading,Bn=Ee.getInputElement,Ln=Ee.getRawInputElement,ei=Ee.open,Tn=Ee.defaultOpen,hi=Ee.onDropdownVisibleChange,Oi=Ee.activeValue,ai=Ee.onActiveValueChange,di=Ee.activeDescendantId,Li=Ee.searchValue,fi=Ee.autoClearSearchValue,Xn=Ee.onSearch,Mi=Ee.onSearchSplit,Jn=Ee.tokenSeparators,si=Ee.allowClear,pi=Ee.prefix,wi=Ee.suffixIcon,li=Ee.clearIcon,Kn=Ee.OptionList,zn=Ee.animation,Ti=Ee.transitionName,Zi=Ee.dropdownStyle,Gi=Ee.dropdownClassName,Yn=Ee.dropdownMatchSelectWidth,ar=Ee.dropdownRender,ti=Ee.dropdownAlign,sr=Ee.placement,tr=Ee.builtinPlacements,Fi=Ee.getPopupContainer,Rn=Ee.showAction,Ct=Rn===void 0?[]:Rn,Pt=Ee.onFocus,un=Ee.onBlur,Yt=Ee.onKeyUp,xn=Ee.onKeyDown,Tt=Ee.onMouseDown,bt=(0,ge.Z)(Ee,kt),Ft=jt(bn),zt=(Nt!==void 0?Nt:Ft)||bn==="combobox",Dn=(0,He.Z)({},bt);hn.forEach(function(qn){delete Dn[qn]}),Mt==null||Mt.forEach(function(qn){delete Dn[qn]});var Fn=fe.useState(!1),bi=(0,pe.Z)(Fn,2),_n=bi[0],Qn=bi[1];fe.useEffect(function(){Qn((0,Le.Z)())},[]);var Ai=fe.useRef(null),ji=fe.useRef(null),vi=fe.useRef(null),Yi=fe.useRef(null),Di=fe.useRef(null),hr=fe.useRef(!1),zr=nt(),Ir=(0,pe.Z)(zr,3),xr=Ir[0],mr=Ir[1],Ci=Ir[2];fe.useImperativeHandle(Me,function(){var qn,Hn;return{focus:(qn=Yi.current)===null||qn===void 0?void 0:qn.focus,blur:(Hn=Yi.current)===null||Hn===void 0?void 0:Hn.blur,scrollTo:function(fr){var Ui;return(Ui=Di.current)===null||Ui===void 0?void 0:Ui.scrollTo(fr)},nativeElement:Ai.current||ji.current}});var wr=fe.useMemo(function(){var qn;if(bn!=="combobox")return Li;var Hn=(qn=_t[0])===null||qn===void 0?void 0:qn.value;return typeof Hn=="string"||typeof Hn=="number"?String(Hn):""},[Li,bn,_t]),eo=bn==="combobox"&&typeof Bn=="function"&&Bn()||null,Xi=typeof Ln=="function"&&Ln(),Nr=(0,Ce.x1)(ji,Xi==null||(wt=Xi.props)===null||wt===void 0?void 0:wt.ref),Xr=fe.useState(!1),dr=(0,pe.Z)(Xr,2),ao=dr[0],Rr=dr[1];(0,Ue.Z)(function(){Rr(!0)},[]);var Ii=(0,Ne.Z)(!1,{defaultValue:Tn,value:ei}),to=(0,pe.Z)(Ii,2),so=to[0],Zr=to[1],Ji=ao?so:!1,xo=!fn&&yn;(Mn||xo&&Ji&&bn==="combobox")&&(Ji=!1);var lo=xo?!1:Ji,wn=fe.useCallback(function(qn){var Hn=qn!==void 0?qn:!Ji;Mn||(Zr(Hn),Ji!==Hn&&(hi==null||hi(Hn)))},[Mn,Ji,Zr,hi]),On=fe.useMemo(function(){return(Jn||[]).some(function(qn){return[`
|
|
`,`\r
|
|
`].includes(qn)})},[Jn]),kn=fe.useContext(qt)||{},An=kn.maxCount,ui=kn.rawValues,Pi=function(Hn,ur,fr){if(!(Ft&&St(An)&&(ui==null?void 0:ui.size)>=An)){var Ui=!0,$i=Hn;ai==null||ai(null);var Vr=Wt(Hn,Jn,St(An)?An-ui.size:void 0),Wr=fr?null:Vr;return bn!=="combobox"&&Wr&&($i="",Mi==null||Mi(Wr),wn(!1),Ui=!1),Xn&&wr!==$i&&Xn($i,{source:ur?"typing":"effect"}),Ui}},Gr=function(Hn){!Hn||!Hn.trim()||Xn(Hn,{source:"submit"})};fe.useEffect(function(){!Ji&&!Ft&&bn!=="combobox"&&Pi("",!1,!1)},[Ji]),fe.useEffect(function(){so&&Mn&&Zr(!1),Mn&&!hr.current&&mr(!1)},[Mn]);var gr=Ve(),lr=(0,pe.Z)(gr,2),Vi=lr[0],_r=lr[1],Jr=fe.useRef(!1),Mr=function(Hn){var ur=Vi(),fr=Hn.key,Ui=fr==="Enter";if(Ui&&(bn!=="combobox"&&Hn.preventDefault(),Ji||wn(!0)),_r(!!wr),fr==="Backspace"&&!ur&&Ft&&!wr&&_t.length){for(var $i=(0,Xe.Z)(_t),Vr=null,Wr=$i.length-1;Wr>=0;Wr-=1){var io=$i[Wr];if(!io.disabled){$i.splice(Wr,1),Vr=io;break}}Vr&&Ae($i,{type:"remove",values:[Vr]})}for(var Tr=arguments.length,Ar=new Array(Tr>1?Tr-1:0),Ur=1;Ur<Tr;Ur++)Ar[Ur-1]=arguments[Ur];if(Ji&&(!Ui||!Jr.current)){var co;Ui&&(Jr.current=!0),(co=Di.current)===null||co===void 0||co.onKeyDown.apply(co,[Hn].concat(Ar))}xn==null||xn.apply(void 0,[Hn].concat(Ar))},Qr=function(Hn){for(var ur=arguments.length,fr=new Array(ur>1?ur-1:0),Ui=1;Ui<ur;Ui++)fr[Ui-1]=arguments[Ui];if(Ji){var $i;($i=Di.current)===null||$i===void 0||$i.onKeyUp.apply($i,[Hn].concat(fr))}Hn.key==="Enter"&&(Jr.current=!1),Yt==null||Yt.apply(void 0,[Hn].concat(fr))},no=function(Hn){var ur=_t.filter(function(fr){return fr!==Hn});Ae(ur,{type:"remove",values:[Hn]})},jr=function(){Jr.current=!1},Ao=fe.useRef(!1),ja=function(){mr(!0),Mn||(Pt&&!Ao.current&&Pt.apply(void 0,arguments),Ct.includes("focus")&&wn(!0)),Ao.current=!0},ya=function(){hr.current=!0,mr(!1,function(){Ao.current=!1,hr.current=!1,wn(!1)}),!Mn&&(wr&&(bn==="tags"?Xn(wr,{source:"submit"}):bn==="multiple"&&Xn("",{source:"blur"})),un&&un.apply(void 0,arguments))},qr=[];fe.useEffect(function(){return function(){qr.forEach(function(qn){return clearTimeout(qn)}),qr.splice(0,qr.length)}},[]);var uo=function(Hn){var ur,fr=Hn.target,Ui=(ur=vi.current)===null||ur===void 0?void 0:ur.getPopupElement();if(Ui&&Ui.contains(fr)){var $i=setTimeout(function(){var Tr=qr.indexOf($i);if(Tr!==-1&&qr.splice(Tr,1),Ci(),!_n&&!Ui.contains(document.activeElement)){var Ar;(Ar=Yi.current)===null||Ar===void 0||Ar.focus()}});qr.push($i)}for(var Vr=arguments.length,Wr=new Array(Vr>1?Vr-1:0),io=1;io<Vr;io++)Wr[io-1]=arguments[io];Tt==null||Tt.apply(void 0,[Hn].concat(Wr))},Hr=fe.useState({}),ba=(0,pe.Z)(Hr,2),xa=ba[1];function Va(){xa({})}var wa;Xi&&(wa=function(Hn){wn(Hn)}),rt(function(){var qn;return[Ai.current,(qn=vi.current)===null||qn===void 0?void 0:qn.getPopupElement()]},lo,wn,!!Xi);var Ua=fe.useMemo(function(){return(0,He.Z)((0,He.Z)({},Ee),{},{notFoundContent:fn,open:Ji,triggerOpen:lo,id:lt,showSearch:zt,multiple:Ft,toggleOpen:wn})},[Ee,fn,lo,Ji,lt,zt,Ft,wn]),Ko=!!wi||ci,Yo;Ko&&(Yo=fe.createElement(ke,{className:me()("".concat(Re,"-arrow"),(0,Te.Z)({},"".concat(Re,"-arrow-loading"),ci)),customizeIcon:wi,customizeIconProps:{loading:ci,searchValue:wr,open:Ji,focused:xr,showSearch:zt}}));var wo=function(){var Hn;ln==null||ln(),(Hn=Yi.current)===null||Hn===void 0||Hn.focus(),Ae([],{type:"clear",values:_t}),Pi("",!1,!1)},Xo=Ye(Re,wo,_t,si,li,Mn,wr,bn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Po=fe.createElement(Kn,{ref:Di}),Sa=me()(Re,ct,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(Re,"-focused"),xr),"".concat(Re,"-multiple"),Ft),"".concat(Re,"-single"),!Ft),"".concat(Re,"-allow-clear"),si),"".concat(Re,"-show-arrow"),Ko),"".concat(Re,"-disabled"),Mn),"".concat(Re,"-loading"),ci),"".concat(Re,"-open"),Ji),"".concat(Re,"-customize-input"),eo),"".concat(Re,"-show-search"),zt)),Bo=fe.createElement(ne,{ref:vi,disabled:Mn,prefixCls:Re,visible:lo,popupElement:Po,animation:zn,transitionName:Ti,dropdownStyle:Zi,dropdownClassName:Gi,direction:nn,dropdownMatchSelectWidth:Yn,dropdownRender:ar,dropdownAlign:ti,placement:sr,builtinPlacements:tr,getPopupContainer:Fi,empty:yn,getTriggerDOMNode:function(Hn){return ji.current||Hn},onPopupVisibleChange:wa,onPopupMouseEnter:Va},Xi?fe.cloneElement(Xi,{ref:Nr}):fe.createElement(ft,(0,ue.Z)({},Ee,{domRef:ji,prefixCls:Re,inputElement:eo,ref:Yi,id:lt,prefix:pi,showSearch:zt,autoClearSearchValue:fi,mode:bn,activeDescendantId:di,tagRender:Qt,values:_t,open:Ji,onToggleOpen:wn,activeValue:Oi,searchValue:wr,onSearch:Pi,onSearchSubmit:Gr,onRemove:no,tokenWithEnter:On,onInputBlur:jr}))),Cr;return Xi?Cr=Bo:Cr=fe.createElement("div",(0,ue.Z)({className:Sa},Dn,{ref:Ai,onMouseDown:uo,onKeyDown:Mr,onKeyUp:Qr,onFocus:ja,onBlur:ya}),fe.createElement($t,{visible:xr&&!Ji,values:_t}),Bo,Yo,Ca&&Jo),fe.createElement(tt.Provider,{value:Ua},Cr)}),et=tn,pn=function(){return null};pn.isSelectOptGroup=!0;var It=pn,Vt=function(){return null};Vt.isSelectOption=!0;var an=Vt,Pn=de(80547),sn=de(2738),mn=de(6790);function ni(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Vn=["disabled","title","children","style","className"];function zi(Ee){return typeof Ee=="string"||typeof Ee=="number"}var Hi=function(Me,wt){var lt=it(),Re=lt.prefixCls,ct=lt.id,Nt=lt.open,Qt=lt.multiple,nn=lt.mode,Mt=lt.searchValue,_t=lt.toggleOpen,Ae=lt.notFoundContent,yn=lt.onPopupScroll,Zt=fe.useContext(qt),fn=Zt.maxCount,ln=Zt.flattenOptions,bn=Zt.onActiveValue,Mn=Zt.defaultActiveFirstOption,ci=Zt.onSelect,Bn=Zt.menuItemSelectedIcon,Ln=Zt.rawValues,ei=Zt.fieldNames,Tn=Zt.virtual,hi=Zt.direction,Oi=Zt.listHeight,ai=Zt.listItemHeight,di=Zt.optionRender,Li="".concat(Re,"-item"),fi=(0,Pn.Z)(function(){return ln},[Nt,ln],function(Rn,Ct){return Ct[0]&&Rn[1]!==Ct[1]}),Xn=fe.useRef(null),Mi=fe.useMemo(function(){return Qt&&St(fn)&&(Ln==null?void 0:Ln.size)>=fn},[Qt,fn,Ln==null?void 0:Ln.size]),Jn=function(Ct){Ct.preventDefault()},si=function(Ct){var Pt;(Pt=Xn.current)===null||Pt===void 0||Pt.scrollTo(typeof Ct=="number"?{index:Ct}:Ct)},pi=fe.useCallback(function(Rn){return nn==="combobox"?!1:Ln.has(Rn)},[nn,(0,Xe.Z)(Ln).toString(),Ln.size]),wi=function(Ct){for(var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,un=fi.length,Yt=0;Yt<un;Yt+=1){var xn=(Ct+Yt*Pt+un)%un,Tt=fi[xn]||{},bt=Tt.group,Ft=Tt.data;if(!bt&&!(Ft!=null&&Ft.disabled)&&(pi(Ft.value)||!Mi))return xn}return-1},li=fe.useState(function(){return wi(0)}),Kn=(0,pe.Z)(li,2),zn=Kn[0],Ti=Kn[1],Zi=function(Ct){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ti(Ct);var un={source:Pt?"keyboard":"mouse"},Yt=fi[Ct];if(!Yt){bn(null,-1,un);return}bn(Yt.value,Ct,un)};(0,fe.useEffect)(function(){Zi(Mn!==!1?wi(0):-1)},[fi.length,Mt]);var Gi=fe.useCallback(function(Rn){return nn==="combobox"?String(Rn).toLowerCase()===Mt.toLowerCase():Ln.has(Rn)},[nn,Mt,(0,Xe.Z)(Ln).toString(),Ln.size]);(0,fe.useEffect)(function(){var Rn=setTimeout(function(){if(!Qt&&Nt&&Ln.size===1){var Pt=Array.from(Ln)[0],un=fi.findIndex(function(Yt){var xn=Yt.data;return Mt?String(xn.value).startsWith(Mt):xn.value===Pt});un!==-1&&(Zi(un),si(un))}});if(Nt){var Ct;(Ct=Xn.current)===null||Ct===void 0||Ct.scrollTo(void 0)}return function(){return clearTimeout(Rn)}},[Nt,Mt]);var Yn=function(Ct){Ct!==void 0&&ci(Ct,{selected:!Ln.has(Ct)}),Qt||_t(!1)};if(fe.useImperativeHandle(wt,function(){return{onKeyDown:function(Ct){var Pt=Ct.which,un=Ct.ctrlKey;switch(Pt){case $e.Z.N:case $e.Z.P:case $e.Z.UP:case $e.Z.DOWN:{var Yt=0;if(Pt===$e.Z.UP?Yt=-1:Pt===$e.Z.DOWN?Yt=1:ni()&&un&&(Pt===$e.Z.N?Yt=1:Pt===$e.Z.P&&(Yt=-1)),Yt!==0){var xn=wi(zn+Yt,Yt);si(xn),Zi(xn,!0)}break}case $e.Z.TAB:case $e.Z.ENTER:{var Tt,bt=fi[zn];bt&&!(bt!=null&&(Tt=bt.data)!==null&&Tt!==void 0&&Tt.disabled)&&!Mi?Yn(bt.value):Yn(void 0),Nt&&Ct.preventDefault();break}case $e.Z.ESC:_t(!1),Nt&&Ct.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ct){si(Ct)}}}),fi.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(ct,"_list"),className:"".concat(Li,"-empty"),onMouseDown:Jn},Ae);var ar=Object.keys(ei).map(function(Rn){return ei[Rn]}),ti=function(Ct){return Ct.label};function sr(Rn,Ct){var Pt=Rn.group;return{role:Pt?"presentation":"option",id:"".concat(ct,"_list_").concat(Ct)}}var tr=function(Ct){var Pt=fi[Ct];if(!Pt)return null;var un=Pt.data||{},Yt=un.value,xn=Pt.group,Tt=(0,Ge.Z)(un,!0),bt=ti(Pt);return Pt?fe.createElement("div",(0,ue.Z)({"aria-label":typeof bt=="string"&&!xn?bt:null},Tt,{key:Ct},sr(Pt,Ct),{"aria-selected":Gi(Yt)}),Yt):null},Fi={role:"listbox",id:"".concat(ct,"_list")};return fe.createElement(fe.Fragment,null,Tn&&fe.createElement("div",(0,ue.Z)({},Fi,{style:{height:0,width:0,overflow:"hidden"}}),tr(zn-1),tr(zn),tr(zn+1)),fe.createElement(mn.Z,{itemKey:"key",ref:Xn,data:fi,height:Oi,itemHeight:ai,fullHeight:!1,onMouseDown:Jn,onScroll:yn,virtual:Tn,direction:hi,innerProps:Tn?null:Fi},function(Rn,Ct){var Pt=Rn.group,un=Rn.groupOption,Yt=Rn.data,xn=Rn.label,Tt=Rn.value,bt=Yt.key;if(Pt){var Ft,zt=(Ft=Yt.title)!==null&&Ft!==void 0?Ft:zi(xn)?xn.toString():void 0;return fe.createElement("div",{className:me()(Li,"".concat(Li,"-group"),Yt.className),title:zt},xn!==void 0?xn:bt)}var Dn=Yt.disabled,Fn=Yt.title,bi=Yt.children,_n=Yt.style,Qn=Yt.className,Ai=(0,ge.Z)(Yt,Vn),ji=(0,sn.Z)(Ai,ar),vi=pi(Tt),Yi=Dn||!vi&&Mi,Di="".concat(Li,"-option"),hr=me()(Li,Di,Qn,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(Di,"-grouped"),un),"".concat(Di,"-active"),zn===Ct&&!Yi),"".concat(Di,"-disabled"),Yi),"".concat(Di,"-selected"),vi)),zr=ti(Rn),Ir=!Bn||typeof Bn=="function"||vi,xr=typeof zr=="number"?zr:zr||Tt,mr=zi(xr)?xr.toString():void 0;return Fn!==void 0&&(mr=Fn),fe.createElement("div",(0,ue.Z)({},(0,Ge.Z)(ji),Tn?{}:sr(Rn,Ct),{"aria-selected":Gi(Tt),className:hr,title:mr,onMouseMove:function(){zn===Ct||Yi||Zi(Ct)},onClick:function(){Yi||Yn(Tt)},style:_n}),fe.createElement("div",{className:"".concat(Di,"-content")},typeof di=="function"?di(Rn,{index:Ct}):xr),fe.isValidElement(Bn)||vi,Ir&&fe.createElement(ke,{className:"".concat(Li,"-option-state"),customizeIcon:Bn,customizeIconProps:{value:Tt,disabled:Yi,isSelected:vi}},vi?"\u2713":null))}))},xi=fe.forwardRef(Hi),gi=xi,Wn=function(Ee,Me){var wt=fe.useRef({values:new Map,options:new Map}),lt=fe.useMemo(function(){var ct=wt.current,Nt=ct.values,Qt=ct.options,nn=Ee.map(function(Ae){if(Ae.label===void 0){var yn;return(0,He.Z)((0,He.Z)({},Ae),{},{label:(yn=Nt.get(Ae.value))===null||yn===void 0?void 0:yn.label})}return Ae}),Mt=new Map,_t=new Map;return nn.forEach(function(Ae){Mt.set(Ae.value,Ae),_t.set(Ae.value,Me.get(Ae.value)||Qt.get(Ae.value))}),wt.current.values=Mt,wt.current.options=_t,nn},[Ee,Me]),Re=fe.useCallback(function(ct){return Me.get(ct)||wt.current.options.get(ct)},[Me]);return[lt,Re]};function ri(Ee,Me){return pt(Ee).join("").toUpperCase().includes(Me)}var Ri=function(Ee,Me,wt,lt,Re){return fe.useMemo(function(){if(!wt||lt===!1)return Ee;var ct=Me.options,Nt=Me.label,Qt=Me.value,nn=[],Mt=typeof lt=="function",_t=wt.toUpperCase(),Ae=Mt?lt:function(Zt,fn){return Re?ri(fn[Re],_t):fn[ct]?ri(fn[Nt!=="children"?Nt:"label"],_t):ri(fn[Qt],_t)},yn=Mt?function(Zt){return vt(Zt)}:function(Zt){return Zt};return Ee.forEach(function(Zt){if(Zt[ct]){var fn=Ae(wt,yn(Zt));if(fn)nn.push(Zt);else{var ln=Zt[ct].filter(function(bn){return Ae(wt,yn(bn))});ln.length&&nn.push((0,He.Z)((0,He.Z)({},Zt),{},(0,Te.Z)({},ct,ln)))}return}Ae(wt,yn(Zt))&&nn.push(Zt)}),nn},[Ee,lt,Re,wt,Me])},In=de(6551),ii=de(11592),Un=["children","value"],ki=["children"];function rn(Ee){var Me=Ee,wt=Me.key,lt=Me.props,Re=lt.children,ct=lt.value,Nt=(0,ge.Z)(lt,Un);return(0,He.Z)({key:wt,value:ct!==void 0?ct:wt,children:Re},Nt)}function dn(Ee){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ii.Z)(Ee).map(function(wt,lt){if(!fe.isValidElement(wt)||!wt.type)return null;var Re=wt,ct=Re.type.isSelectOptGroup,Nt=Re.key,Qt=Re.props,nn=Qt.children,Mt=(0,ge.Z)(Qt,ki);return Me||!ct?rn(wt):(0,He.Z)((0,He.Z)({key:"__RC_SELECT_GRP__".concat(Nt===null?lt:Nt,"__"),label:Nt},Mt),{},{options:dn(nn)})}).filter(function(wt){return wt})}var gn=function(Me,wt,lt,Re,ct){return fe.useMemo(function(){var Nt=Me,Qt=!Me;Qt&&(Nt=dn(wt));var nn=new Map,Mt=new Map,_t=function(Zt,fn,ln){ln&&typeof ln=="string"&&Zt.set(fn[ln],fn)},Ae=function yn(Zt){for(var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ln=0;ln<Zt.length;ln+=1){var bn=Zt[ln];!bn[lt.options]||fn?(nn.set(bn[lt.value],bn),_t(Mt,bn,lt.label),_t(Mt,bn,Re),_t(Mt,bn,ct)):yn(bn[lt.options],!0)}};return Ae(Nt),{options:Nt,valueOptions:nn,labelOptions:Mt}},[Me,wt,lt,Re,ct])},En=gn;function $n(Ee){var Me=fe.useRef();Me.current=Ee;var wt=fe.useCallback(function(){return Me.current.apply(Me,arguments)},[]);return wt}function oi(Ee){var Me=Ee.mode,wt=Ee.options,lt=Ee.children,Re=Ee.backfill,ct=Ee.allowClear,Nt=Ee.placeholder,Qt=Ee.getInputElement,nn=Ee.showSearch,Mt=Ee.onSearch,_t=Ee.defaultOpen,Ae=Ee.autoFocus,yn=Ee.labelInValue,Zt=Ee.value,fn=Ee.inputValue,ln=Ee.optionLabelProp,bn=isMultiple(Me),Mn=nn!==void 0?nn:bn||Me==="combobox",ci=wt||convertChildrenToData(lt);if(warning(Me!=="tags"||ci.every(function(Tn){return!Tn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Me==="tags"||Me==="combobox"){var Bn=ci.some(function(Tn){return Tn.options?Tn.options.some(function(hi){return typeof("value"in hi?hi.value:hi.key)=="number"}):typeof("value"in Tn?Tn.value:Tn.key)=="number"});warning(!Bn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Me!=="combobox"||!ln,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Me==="combobox"||!Re,"`backfill` only works with `combobox` mode."),warning(Me==="combobox"||!Qt,"`getInputElement` only work with `combobox` mode."),noteOnce(Me!=="combobox"||!Qt||!ct||!Nt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Mt&&!Mn&&Me!=="combobox"&&Me!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!_t||Ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Zt!=null){var Ln=toArray(Zt);warning(!yn||Ln.every(function(Tn){return _typeof(Tn)==="object"&&("key"in Tn||"value"in Tn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!bn||Array.isArray(Zt),"`value` should be array when `mode` is `multiple` or `tags`")}if(lt){var ei=null;toNodeArray(lt).some(function(Tn){if(!React.isValidElement(Tn)||!Tn.type)return!1;var hi=Tn,Oi=hi.type;if(Oi.isSelectOption)return!1;if(Oi.isSelectOptGroup){var ai=toNodeArray(Tn.props.children).every(function(di){return!React.isValidElement(di)||!Tn.type||di.type.isSelectOption?!0:(ei=di.type,!1)});return!ai}return ei=Oi,!0}),ei&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ei.displayName||ei.name||ei,"`.")),warning(fn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yi(Ee,Me){if(Ee){var wt=function lt(Re){for(var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=0;Nt<Re.length;Nt++){var Qt=Re[Nt];if(Qt[Me==null?void 0:Me.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!ct&&Array.isArray(Qt[Me==null?void 0:Me.options])&<(Qt[Me==null?void 0:Me.options],!0))break}};wt(Ee)}}var Zn=null,Nn=["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"],Ei=["inputValue"];function At(Ee){return!Ee||(0,Fe.Z)(Ee)!=="object"}var Qe=fe.forwardRef(function(Ee,Me){var wt=Ee.id,lt=Ee.mode,Re=Ee.prefixCls,ct=Re===void 0?"rc-select":Re,Nt=Ee.backfill,Qt=Ee.fieldNames,nn=Ee.inputValue,Mt=Ee.searchValue,_t=Ee.onSearch,Ae=Ee.autoClearSearchValue,yn=Ae===void 0?!0:Ae,Zt=Ee.onSelect,fn=Ee.onDeselect,ln=Ee.dropdownMatchSelectWidth,bn=ln===void 0?!0:ln,Mn=Ee.filterOption,ci=Ee.filterSort,Bn=Ee.optionFilterProp,Ln=Ee.optionLabelProp,ei=Ee.options,Tn=Ee.optionRender,hi=Ee.children,Oi=Ee.defaultActiveFirstOption,ai=Ee.menuItemSelectedIcon,di=Ee.virtual,Li=Ee.direction,fi=Ee.listHeight,Xn=fi===void 0?200:fi,Mi=Ee.listItemHeight,Jn=Mi===void 0?20:Mi,si=Ee.labelRender,pi=Ee.value,wi=Ee.defaultValue,li=Ee.labelInValue,Kn=Ee.onChange,zn=Ee.maxCount,Ti=(0,ge.Z)(Ee,Nn),Zi=(0,In.ZP)(wt),Gi=jt(lt),Yn=!!(!ei&&hi),ar=fe.useMemo(function(){return Mn===void 0&<==="combobox"?!1:Mn},[Mn,lt]),ti=fe.useMemo(function(){return gt(Qt,Yn)},[JSON.stringify(Qt),Yn]),sr=(0,Ne.Z)("",{value:Mt!==void 0?Mt:nn,postState:function(On){return On||""}}),tr=(0,pe.Z)(sr,2),Fi=tr[0],Rn=tr[1],Ct=En(ei,hi,ti,Bn,Ln),Pt=Ct.valueOptions,un=Ct.labelOptions,Yt=Ct.options,xn=fe.useCallback(function(wn){var On=pt(wn);return On.map(function(kn){var An,ui,Pi,Gr,gr;if(At(kn))An=kn;else{var lr;Pi=kn.key,ui=kn.label,An=(lr=kn.value)!==null&&lr!==void 0?lr:Pi}var Vi=Pt.get(An);if(Vi){var _r;if(ui===void 0&&(ui=Vi==null?void 0:Vi[Ln||ti.label]),Pi===void 0&&(Pi=(_r=Vi==null?void 0:Vi.key)!==null&&_r!==void 0?_r:An),Gr=Vi==null?void 0:Vi.disabled,gr=Vi==null?void 0:Vi.title,0)var Jr}return{label:ui,value:An,key:Pi,disabled:Gr,title:gr}})},[ti,Ln,Pt]),Tt=(0,Ne.Z)(wi,{value:pi}),bt=(0,pe.Z)(Tt,2),Ft=bt[0],zt=bt[1],Dn=fe.useMemo(function(){var wn,On=Gi&&Ft===null?[]:Ft,kn=xn(On);return lt==="combobox"&&he((wn=kn[0])===null||wn===void 0?void 0:wn.value)?[]:kn},[Ft,xn,lt,Gi]),Fn=Wn(Dn,Pt),bi=(0,pe.Z)(Fn,2),_n=bi[0],Qn=bi[1],Ai=fe.useMemo(function(){if(!lt&&_n.length===1){var wn=_n[0];if(wn.value===null&&(wn.label===null||wn.label===void 0))return[]}return _n.map(function(On){var kn;return(0,He.Z)((0,He.Z)({},On),{},{label:(kn=typeof si=="function"?si(On):On.label)!==null&&kn!==void 0?kn:On.value})})},[lt,_n,si]),ji=fe.useMemo(function(){return new Set(_n.map(function(wn){return wn.value}))},[_n]);fe.useEffect(function(){if(lt==="combobox"){var wn,On=(wn=_n[0])===null||wn===void 0?void 0:wn.value;Rn(ve(On)?String(On):"")}},[_n]);var vi=$n(function(wn,On){var kn=On!=null?On:wn;return(0,Te.Z)((0,Te.Z)({},ti.value,wn),ti.label,kn)}),Yi=fe.useMemo(function(){if(lt!=="tags")return Yt;var wn=(0,Xe.Z)(Yt),On=function(An){return Pt.has(An)};return(0,Xe.Z)(_n).sort(function(kn,An){return kn.value<An.value?-1:1}).forEach(function(kn){var An=kn.value;On(An)||wn.push(vi(An,kn.label))}),wn},[vi,Yt,Pt,_n,lt]),Di=Ri(Yi,ti,Fi,ar,Bn),hr=fe.useMemo(function(){return lt!=="tags"||!Fi||Di.some(function(wn){return wn[Bn||"value"]===Fi})||Di.some(function(wn){return wn[ti.value]===Fi})?Di:[vi(Fi)].concat((0,Xe.Z)(Di))},[vi,Bn,lt,Di,Fi,ti]),zr=function wn(On){var kn=(0,Xe.Z)(On).sort(function(An,ui){return ci(An,ui,{searchValue:Fi})});return kn.map(function(An){return Array.isArray(An.options)?(0,He.Z)((0,He.Z)({},An),{},{options:An.options.length>0?wn(An.options):An.options}):An})},Ir=fe.useMemo(function(){return ci?zr(hr):hr},[hr,ci,Fi]),xr=fe.useMemo(function(){return dt(Ir,{fieldNames:ti,childrenAsData:Yn})},[Ir,ti,Yn]),mr=function(On){var kn=xn(On);if(zt(kn),Kn&&(kn.length!==_n.length||kn.some(function(Pi,Gr){var gr;return((gr=_n[Gr])===null||gr===void 0?void 0:gr.value)!==(Pi==null?void 0:Pi.value)}))){var An=li?kn:kn.map(function(Pi){return Pi.value}),ui=kn.map(function(Pi){return vt(Qn(Pi.value))});Kn(Gi?An:An[0],Gi?ui:ui[0])}},Ci=fe.useState(null),wr=(0,pe.Z)(Ci,2),eo=wr[0],Xi=wr[1],Nr=fe.useState(0),Xr=(0,pe.Z)(Nr,2),dr=Xr[0],ao=Xr[1],Rr=Oi!==void 0?Oi:lt!=="combobox",Ii=fe.useCallback(function(wn,On){var kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},An=kn.source,ui=An===void 0?"keyboard":An;ao(On),Nt&<==="combobox"&&wn!==null&&ui==="keyboard"&&Xi(String(wn))},[Nt,lt]),to=function(On,kn,An){var ui=function(){var no,jr=Qn(On);return[li?{label:jr==null?void 0:jr[ti.label],value:On,key:(no=jr==null?void 0:jr.key)!==null&&no!==void 0?no:On}:On,vt(jr)]};if(kn&&Zt){var Pi=ui(),Gr=(0,pe.Z)(Pi,2),gr=Gr[0],lr=Gr[1];Zt(gr,lr)}else if(!kn&&fn&&An!=="clear"){var Vi=ui(),_r=(0,pe.Z)(Vi,2),Jr=_r[0],Mr=_r[1];fn(Jr,Mr)}},so=$n(function(wn,On){var kn,An=Gi?On.selected:!0;An?kn=Gi?[].concat((0,Xe.Z)(_n),[wn]):[wn]:kn=_n.filter(function(ui){return ui.value!==wn}),mr(kn),to(wn,An),lt==="combobox"?Xi(""):(!jt||yn)&&(Rn(""),Xi(""))}),Zr=function(On,kn){mr(On);var An=kn.type,ui=kn.values;(An==="remove"||An==="clear")&&ui.forEach(function(Pi){to(Pi.value,!1,An)})},Ji=function(On,kn){if(Rn(On),Xi(null),kn.source==="submit"){var An=(On||"").trim();if(An){var ui=Array.from(new Set([].concat((0,Xe.Z)(ji),[An])));mr(ui),to(An,!0),Rn("")}return}kn.source!=="blur"&&(lt==="combobox"&&mr(On),_t==null||_t(On))},xo=function(On){var kn=On;lt!=="tags"&&(kn=On.map(function(ui){var Pi=un.get(ui);return Pi==null?void 0:Pi.value}).filter(function(ui){return ui!==void 0}));var An=Array.from(new Set([].concat((0,Xe.Z)(ji),(0,Xe.Z)(kn))));mr(An),An.forEach(function(ui){to(ui,!0)})},lo=fe.useMemo(function(){var wn=di!==!1&&bn!==!1;return(0,He.Z)((0,He.Z)({},Ct),{},{flattenOptions:xr,onActiveValue:Ii,defaultActiveFirstOption:Rr,onSelect:so,menuItemSelectedIcon:ai,rawValues:ji,fieldNames:ti,virtual:wn,direction:Li,listHeight:Xn,listItemHeight:Jn,childrenAsData:Yn,maxCount:zn,optionRender:Tn})},[zn,Ct,xr,Ii,Rr,so,ai,ji,ti,di,bn,Li,Xn,Jn,Yn,Tn]);return fe.createElement(qt.Provider,{value:lo},fe.createElement(et,(0,ue.Z)({},Ti,{id:Zi,prefixCls:ct,ref:Me,omitDomProps:Ei,mode:lt,displayValues:Ai,onDisplayValuesChange:Zr,direction:Li,searchValue:Fi,onSearch:Ji,autoClearSearchValue:yn,onSearchSplit:xo,dropdownMatchSelectWidth:bn,OptionList:gi,emptyOptions:!xr.length,activeValue:eo,activeDescendantId:"".concat(Zi,"_list_").concat(dr)})))}),Ut=Qe;Ut.Option=an,Ut.OptGroup=It;var Sn=Ut,jn=Sn},63158:function(xt,Et,de){"use strict";var ue=de(32855),Xe=de(74430),Te=de(11913),He=de(43079),pe=de(59301),ge=de(92310),Fe=de.n(ge),Ne=de(18929),xe=de(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],je=pe.forwardRef(function(me,Ue){var Le,Ce=me.prefixCls,De=Ce===void 0?"rc-switch":Ce,ke=me.className,Ye=me.checked,tt=me.defaultChecked,it=me.disabled,nt=me.loadingIcon,Ve=me.checkedChildren,rt=me.unCheckedChildren,$e=me.onClick,Ht=me.onChange,Ge=me.onKeyDown,_e=(0,He.Z)(me,fe),ot=(0,Ne.Z)(!1,{value:Ye,defaultValue:tt}),Se=(0,Te.Z)(ot,2),We=Se[0],Pe=Se[1];function Je(Dt,ve){var he=We;return it||(he=Dt,Pe(he),Ht==null||Ht(he,ve)),he}function Ot(Dt){Dt.which===xe.Z.LEFT?Je(!1,Dt):Dt.which===xe.Z.RIGHT&&Je(!0,Dt),Ge==null||Ge(Dt)}function pt(Dt){var ve=Je(!We,Dt);$e==null||$e(ve,Dt)}var en=Fe()(De,ke,(Le={},(0,Xe.Z)(Le,"".concat(De,"-checked"),We),(0,Xe.Z)(Le,"".concat(De,"-disabled"),it),Le));return pe.createElement("button",(0,ue.Z)({},_e,{type:"button",role:"switch","aria-checked":We,disabled:it,className:en,ref:Ue,onKeyDown:Ot,onClick:pt}),nt,pe.createElement("span",{className:"".concat(De,"-inner")},pe.createElement("span",{className:"".concat(De,"-inner-checked")},Ve),pe.createElement("span",{className:"".concat(De,"-inner-unchecked")},rt)))});je.displayName="Switch",Et.Z=je},22711:function(xt,Et,de){"use strict";de.r(Et),de.d(Et,{ResizableTextArea:function(){return Se},default:function(){return Ot}});var ue=de(32855),Xe=de(74430),Te=de(27247),He=de(3300),pe=de(11913),ge=de(43079),Fe=de(92310),Ne=de.n(Fe),xe=de(36901),fe=de(66003),je=de(30292),me=de(18929),Ue=de(59301),Le=de(34666),Ce=de(29301),De=de(34280),ke=de(16089),Ye=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,tt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],it={},nt;function Ve(pt){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dt=pt.getAttribute("id")||pt.getAttribute("data-reactid")||pt.getAttribute("name");if(en&&it[Dt])return it[Dt];var ve=window.getComputedStyle(pt),he=ve.getPropertyValue("box-sizing")||ve.getPropertyValue("-moz-box-sizing")||ve.getPropertyValue("-webkit-box-sizing"),at=parseFloat(ve.getPropertyValue("padding-bottom"))+parseFloat(ve.getPropertyValue("padding-top")),Gt=parseFloat(ve.getPropertyValue("border-bottom-width"))+parseFloat(ve.getPropertyValue("border-top-width")),mt=tt.map(function(Ke){return"".concat(Ke,":").concat(ve.getPropertyValue(Ke))}).join(";"),Be={sizingStyle:mt,paddingSize:at,borderSize:Gt,boxSizing:he};return en&&Dt&&(it[Dt]=Be),Be}function rt(pt){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;nt||(nt=document.createElement("textarea"),nt.setAttribute("tab-index","-1"),nt.setAttribute("aria-hidden","true"),nt.setAttribute("name","hiddenTextarea"),document.body.appendChild(nt)),pt.getAttribute("wrap")?nt.setAttribute("wrap",pt.getAttribute("wrap")):nt.removeAttribute("wrap");var he=Ve(pt,en),at=he.paddingSize,Gt=he.borderSize,mt=he.boxSizing,Be=he.sizingStyle;nt.setAttribute("style","".concat(Be,";").concat(Ye)),nt.value=pt.value||pt.placeholder||"";var Ke=void 0,qe=void 0,Kt,st=nt.scrollHeight;if(mt==="border-box"?st+=Gt:mt==="content-box"&&(st-=at),Dt!==null||ve!==null){nt.value=" ";var Lt=nt.scrollHeight-at;Dt!==null&&(Ke=Lt*Dt,mt==="border-box"&&(Ke=Ke+at+Gt),st=Math.max(Ke,st)),ve!==null&&(qe=Lt*ve,mt==="border-box"&&(qe=qe+at+Gt),Kt=st>qe?"":"hidden",st=Math.min(qe,st))}var Oe={height:st,overflowY:Kt,resize:"none"};return Ke&&(Oe.minHeight=Ke),qe&&(Oe.maxHeight=qe),Oe}var $e=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ht=0,Ge=1,_e=2,ot=Ue.forwardRef(function(pt,en){var Dt=pt,ve=Dt.prefixCls,he=Dt.defaultValue,at=Dt.value,Gt=Dt.autoSize,mt=Dt.onResize,Be=Dt.className,Ke=Dt.style,qe=Dt.disabled,Kt=Dt.onChange,st=Dt.onInternalAutoSize,Lt=(0,ge.Z)(Dt,$e),Oe=(0,me.Z)(he,{value:at,postState:function(an){return an!=null?an:""}}),ut=(0,pe.Z)(Oe,2),ft=ut[0],oe=ut[1],te=function(an){oe(an.target.value),Kt==null||Kt(an)},z=Ue.useRef();Ue.useImperativeHandle(en,function(){return{textArea:z.current}});var re=Ue.useMemo(function(){return Gt&&(0,Le.Z)(Gt)==="object"?[Gt.minRows,Gt.maxRows]:[]},[Gt]),le=(0,pe.Z)(re,2),ne=le[0],be=le[1],Ze=!!Gt,St=function(){try{if(document.activeElement===z.current){var an=z.current,Pn=an.selectionStart,sn=an.selectionEnd,mn=an.scrollTop;z.current.setSelectionRange(Pn,sn),z.current.scrollTop=mn}}catch(ni){}},gt=Ue.useState(_e),dt=(0,pe.Z)(gt,2),vt=dt[0],Wt=dt[1],Rt=Ue.useState(),qt=(0,pe.Z)(Rt,2),$t=qt[0],kt=qt[1],hn=function(){Wt(Ht)};(0,De.Z)(function(){Ze&&hn()},[at,ne,be,Ze]),(0,De.Z)(function(){if(vt===Ht)Wt(Ge);else if(vt===Ge){var Vt=rt(z.current,!1,ne,be);Wt(_e),kt(Vt)}else St()},[vt]);var jt=Ue.useRef(),tn=function(){ke.Z.cancel(jt.current)},et=function(an){vt===_e&&(mt==null||mt(an),Gt&&(tn(),jt.current=(0,ke.Z)(function(){hn()})))};Ue.useEffect(function(){return tn},[]);var pn=Ze?$t:null,It=(0,Te.Z)((0,Te.Z)({},Ke),pn);return(vt===Ht||vt===Ge)&&(It.overflowY="hidden",It.overflowX="hidden"),Ue.createElement(Ce.Z,{onResize:et,disabled:!(Gt||mt)},Ue.createElement("textarea",(0,ue.Z)({},Lt,{ref:z,style:It,className:Ne()(ve,Be,(0,Xe.Z)({},"".concat(ve,"-disabled"),qe)),disabled:qe,value:ft,onChange:te})))}),Se=ot,We=["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"],Pe=Ue.forwardRef(function(pt,en){var Dt,ve=pt.defaultValue,he=pt.value,at=pt.onFocus,Gt=pt.onBlur,mt=pt.onChange,Be=pt.allowClear,Ke=pt.maxLength,qe=pt.onCompositionStart,Kt=pt.onCompositionEnd,st=pt.suffix,Lt=pt.prefixCls,Oe=Lt===void 0?"rc-textarea":Lt,ut=pt.showCount,ft=pt.count,oe=pt.className,te=pt.style,z=pt.disabled,re=pt.hidden,le=pt.classNames,ne=pt.styles,be=pt.onResize,Ze=pt.onClear,St=pt.onPressEnter,gt=pt.readOnly,dt=pt.autoSize,vt=pt.onKeyDown,Wt=(0,ge.Z)(pt,We),Rt=(0,me.Z)(ve,{value:he,defaultValue:ve}),qt=(0,pe.Z)(Rt,2),$t=qt[0],kt=qt[1],hn=$t==null?"":String($t),jt=Ue.useState(!1),tn=(0,pe.Z)(jt,2),et=tn[0],pn=tn[1],It=Ue.useRef(!1),Vt=Ue.useState(null),an=(0,pe.Z)(Vt,2),Pn=an[0],sn=an[1],mn=(0,Ue.useRef)(null),ni=(0,Ue.useRef)(null),Vn=function(){var Ut;return(Ut=ni.current)===null||Ut===void 0?void 0:Ut.textArea},zi=function(){Vn().focus()};(0,Ue.useImperativeHandle)(en,function(){var Qe;return{resizableTextArea:ni.current,focus:zi,blur:function(){Vn().blur()},nativeElement:((Qe=mn.current)===null||Qe===void 0?void 0:Qe.nativeElement)||Vn()}}),(0,Ue.useEffect)(function(){pn(function(Qe){return!z&&Qe})},[z]);var Hi=Ue.useState(null),xi=(0,pe.Z)(Hi,2),gi=xi[0],Wn=xi[1];Ue.useEffect(function(){if(gi){var Qe;(Qe=Vn()).setSelectionRange.apply(Qe,(0,He.Z)(gi))}},[gi]);var ri=(0,fe.Z)(ft,ut),Ri=(Dt=ri.max)!==null&&Dt!==void 0?Dt:Ke,In=Number(Ri)>0,ii=ri.strategy(hn),Un=!!Ri&&ii>Ri,ki=function(Ut,Sn){var jn=Sn;!It.current&&ri.exceedFormatter&&ri.max&&ri.strategy(Sn)>ri.max&&(jn=ri.exceedFormatter(Sn,{max:ri.max}),Sn!==jn&&Wn([Vn().selectionStart||0,Vn().selectionEnd||0])),kt(jn),(0,je.rJ)(Ut.currentTarget,Ut,mt,jn)},rn=function(Ut){It.current=!0,qe==null||qe(Ut)},dn=function(Ut){It.current=!1,ki(Ut,Ut.currentTarget.value),Kt==null||Kt(Ut)},gn=function(Ut){ki(Ut,Ut.target.value)},En=function(Ut){Ut.key==="Enter"&&St&&St(Ut),vt==null||vt(Ut)},$n=function(Ut){pn(!0),at==null||at(Ut)},oi=function(Ut){pn(!1),Gt==null||Gt(Ut)},yi=function(Ut){kt(""),zi(),(0,je.rJ)(Vn(),Ut,mt)},Zn=st,Nn;ri.show&&(ri.showFormatter?Nn=ri.showFormatter({value:hn,count:ii,maxLength:Ri}):Nn="".concat(ii).concat(In?" / ".concat(Ri):""),Zn=Ue.createElement(Ue.Fragment,null,Zn,Ue.createElement("span",{className:Ne()("".concat(Oe,"-data-count"),le==null?void 0:le.count),style:ne==null?void 0:ne.count},Nn)));var Ei=function(Ut){var Sn;be==null||be(Ut),(Sn=Vn())!==null&&Sn!==void 0&&Sn.style.height&&sn(!0)},At=!dt&&!ut&&!Be;return Ue.createElement(xe.BaseInput,{ref:mn,value:hn,allowClear:Be,handleReset:yi,suffix:Zn,prefixCls:Oe,classNames:(0,Te.Z)((0,Te.Z)({},le),{},{affixWrapper:Ne()(le==null?void 0:le.affixWrapper,(0,Xe.Z)((0,Xe.Z)({},"".concat(Oe,"-show-count"),ut),"".concat(Oe,"-textarea-allow-clear"),Be))}),disabled:z,focused:et,className:Ne()(oe,Un&&"".concat(Oe,"-out-of-range")),style:(0,Te.Z)((0,Te.Z)({},te),Pn&&!At?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nn=="string"?Nn:void 0}},hidden:re,readOnly:gt,onClear:Ze},Ue.createElement(Se,(0,ue.Z)({},Wt,{autoSize:dt,maxLength:Ke,onKeyDown:En,onChange:gn,onFocus:$n,onBlur:oi,onCompositionStart:rn,onCompositionEnd:dn,className:Ne()(le==null?void 0:le.textarea),style:(0,Te.Z)((0,Te.Z)({},ne==null?void 0:ne.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:Oe,onResize:Ei,ref:ni,readOnly:gt})))}),Je=Pe,Ot=Je},6790:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return ft}});var ue=de(32855),Xe=de(34666),Te=de(27247),He=de(74430),pe=de(11913),ge=de(43079),Fe=de(92310),Ne=de.n(Fe),xe=de(29301),fe=de(70425),je=de(34280),me=de(59301),Ue=de(4676),Le=me.forwardRef(function(oe,te){var z=oe.height,re=oe.offsetY,le=oe.offsetX,ne=oe.children,be=oe.prefixCls,Ze=oe.onInnerResize,St=oe.innerProps,gt=oe.rtl,dt=oe.extra,vt={},Wt={display:"flex",flexDirection:"column"};return re!==void 0&&(vt={height:z,position:"relative",overflow:"hidden"},Wt=(0,Te.Z)((0,Te.Z)({},Wt),{},(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({transform:"translateY(".concat(re,"px)")},gt?"marginRight":"marginLeft",-le),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:vt},me.createElement(xe.Z,{onResize:function(qt){var $t=qt.offsetHeight;$t&&Ze&&Ze()}},me.createElement("div",(0,ue.Z)({style:Wt,className:Ne()((0,He.Z)({},"".concat(be,"-holder-inner"),be)),ref:te},St),ne,dt)))});Le.displayName="Filler";var Ce=Le;function De(oe){var te=oe.children,z=oe.setRef,re=me.useCallback(function(le){z(le)},[]);return me.cloneElement(te,{ref:re})}function ke(oe,te,z,re,le,ne,be,Ze){var St=Ze.getKey;return oe.slice(te,z+1).map(function(gt,dt){var vt=te+dt,Wt=be(gt,vt,{style:{width:re},offsetX:le}),Rt=St(gt);return me.createElement(De,{key:Rt,setRef:function($t){return ne(gt,$t)}},Wt)})}function Ye(oe,te,z,re){var le=z-oe,ne=te-z,be=Math.min(le,ne)*2;if(re<=be){var Ze=Math.floor(re/2);return re%2?z+Ze+1:z-Ze}return le>ne?z-(re-ne):z+(re-le)}function tt(oe,te,z){var re=oe.length,le=te.length,ne,be;if(re===0&&le===0)return null;re<le?(ne=oe,be=te):(ne=te,be=oe);var Ze={__EMPTY_ITEM__:!0};function St(qt){return qt!==void 0?z(qt):Ze}for(var gt=null,dt=Math.abs(re-le)!==1,vt=0;vt<be.length;vt+=1){var Wt=St(ne[vt]),Rt=St(be[vt]);if(Wt!==Rt){gt=vt,dt=dt||Wt!==St(be[vt+1]);break}}return gt===null?null:{index:gt,multiple:dt}}function it(oe,te,z){var re=me.useState(oe),le=(0,pe.Z)(re,2),ne=le[0],be=le[1],Ze=me.useState(null),St=(0,pe.Z)(Ze,2),gt=St[0],dt=St[1];return me.useEffect(function(){var vt=tt(ne||[],oe||[],te);(vt==null?void 0:vt.index)!==void 0&&(z==null||z(vt.index),dt(oe[vt.index])),be(oe)},[oe]),[gt]}var nt=de(16089),Ve=(typeof navigator=="undefined"?"undefined":(0,Xe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),rt=Ve,$e=function(oe,te,z,re){var le=(0,me.useRef)(!1),ne=(0,me.useRef)(null);function be(){clearTimeout(ne.current),le.current=!0,ne.current=setTimeout(function(){le.current=!1},50)}var Ze=(0,me.useRef)({top:oe,bottom:te,left:z,right:re});return Ze.current.top=oe,Ze.current.bottom=te,Ze.current.left=z,Ze.current.right=re,function(St,gt){var dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,vt=St?gt<0&&Ze.current.left||gt>0&&Ze.current.right:gt<0&&Ze.current.top||gt>0&&Ze.current.bottom;return dt&&vt?(clearTimeout(ne.current),le.current=!1):(!vt||le.current)&&be(),!le.current&&vt}};function Ht(oe,te,z,re,le,ne,be){var Ze=(0,me.useRef)(0),St=(0,me.useRef)(null),gt=(0,me.useRef)(null),dt=(0,me.useRef)(!1),vt=$e(te,z,re,le);function Wt(jt,tn){if(nt.Z.cancel(St.current),!vt(!1,tn)){var et=jt;if(!et._virtualHandled)et._virtualHandled=!0;else return;Ze.current+=tn,gt.current=tn,rt||et.preventDefault(),St.current=(0,nt.Z)(function(){var pn=dt.current?10:1;be(Ze.current*pn,!1),Ze.current=0})}}function Rt(jt,tn){be(tn,!0),rt||jt.preventDefault()}var qt=(0,me.useRef)(null),$t=(0,me.useRef)(null);function kt(jt){if(oe){nt.Z.cancel($t.current),$t.current=(0,nt.Z)(function(){qt.current=null},2);var tn=jt.deltaX,et=jt.deltaY,pn=jt.shiftKey,It=tn,Vt=et;(qt.current==="sx"||!qt.current&&pn&&et&&!tn)&&(It=et,Vt=0,qt.current="sx");var an=Math.abs(It),Pn=Math.abs(Vt);qt.current===null&&(qt.current=ne&&an>Pn?"x":"y"),qt.current==="y"?Wt(jt,Vt):Rt(jt,It)}}function hn(jt){oe&&(dt.current=jt.detail===gt.current)}return[kt,hn]}function Ge(oe,te,z,re){var le=me.useMemo(function(){return[new Map,[]]},[oe,z.id,re]),ne=(0,pe.Z)(le,2),be=ne[0],Ze=ne[1],St=function(dt){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dt,Wt=be.get(dt),Rt=be.get(vt);if(Wt===void 0||Rt===void 0)for(var qt=oe.length,$t=Ze.length;$t<qt;$t+=1){var kt,hn=oe[$t],jt=te(hn);be.set(jt,$t);var tn=(kt=z.get(jt))!==null&&kt!==void 0?kt:re;if(Ze[$t]=(Ze[$t-1]||0)+tn,jt===dt&&(Wt=$t),jt===vt&&(Rt=$t),Wt!==void 0&&Rt!==void 0)break}return{top:Ze[Wt-1]||0,bottom:Ze[Rt]}};return St}var _e=de(33377),ot=de(93912),Se=function(){function oe(){(0,_e.Z)(this,oe),(0,He.Z)(this,"maps",void 0),(0,He.Z)(this,"id",0),(0,He.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ot.Z)(oe,[{key:"set",value:function(z,re){this.diffRecords.set(z,this.maps[z]),this.maps[z]=re,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),oe}(),We=Se;function Pe(oe){var te=parseFloat(oe);return isNaN(te)?0:te}function Je(oe,te,z){var re=me.useState(0),le=(0,pe.Z)(re,2),ne=le[0],be=le[1],Ze=(0,me.useRef)(new Map),St=(0,me.useRef)(new We),gt=(0,me.useRef)(0);function dt(){gt.current+=1}function vt(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;dt();var qt=function(){var hn=!1;Ze.current.forEach(function(jt,tn){if(jt&&jt.offsetParent){var et=jt.offsetHeight,pn=getComputedStyle(jt),It=pn.marginTop,Vt=pn.marginBottom,an=Pe(It),Pn=Pe(Vt),sn=et+an+Pn;St.current.get(tn)!==sn&&(St.current.set(tn,sn),hn=!0)}}),hn&&be(function(jt){return jt+1})};if(Rt)qt();else{gt.current+=1;var $t=gt.current;Promise.resolve().then(function(){$t===gt.current&&qt()})}}function Wt(Rt,qt){var $t=oe(Rt),kt=Ze.current.get($t);qt?(Ze.current.set($t,qt),vt()):Ze.current.delete($t),!kt!=!qt&&(qt?te==null||te(Rt):z==null||z(Rt))}return(0,me.useEffect)(function(){return dt},[]),[Wt,vt,St.current,ne]}var Ot=14/15;function pt(oe,te,z){var re=(0,me.useRef)(!1),le=(0,me.useRef)(0),ne=(0,me.useRef)(0),be=(0,me.useRef)(null),Ze=(0,me.useRef)(null),St,gt=function(Rt){if(re.current){var qt=Math.ceil(Rt.touches[0].pageX),$t=Math.ceil(Rt.touches[0].pageY),kt=le.current-qt,hn=ne.current-$t,jt=Math.abs(kt)>Math.abs(hn);jt?le.current=qt:ne.current=$t;var tn=z(jt,jt?kt:hn,!1,Rt);tn&&Rt.preventDefault(),clearInterval(Ze.current),tn&&(Ze.current=setInterval(function(){jt?kt*=Ot:hn*=Ot;var et=Math.floor(jt?kt:hn);(!z(jt,et,!0)||Math.abs(et)<=.1)&&clearInterval(Ze.current)},16))}},dt=function(){re.current=!1,St()},vt=function(Rt){St(),Rt.touches.length===1&&!re.current&&(re.current=!0,le.current=Math.ceil(Rt.touches[0].pageX),ne.current=Math.ceil(Rt.touches[0].pageY),be.current=Rt.target,be.current.addEventListener("touchmove",gt,{passive:!1}),be.current.addEventListener("touchend",dt,{passive:!0}))};St=function(){be.current&&(be.current.removeEventListener("touchmove",gt),be.current.removeEventListener("touchend",dt))},(0,je.Z)(function(){return oe&&te.current.addEventListener("touchstart",vt,{passive:!0}),function(){var Wt;(Wt=te.current)===null||Wt===void 0||Wt.removeEventListener("touchstart",vt),St(),clearInterval(Ze.current)}},[oe])}function en(oe){return Math.floor(Math.pow(oe,.5))}function Dt(oe,te){var z="touches"in oe?oe.touches[0]:oe;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function ve(oe,te,z){me.useEffect(function(){var re=te.current;if(oe&&re){var le=!1,ne,be,Ze=function(){nt.Z.cancel(ne)},St=function Wt(){Ze(),ne=(0,nt.Z)(function(){z(be),Wt()})},gt=function(Rt){if(!(Rt.target.draggable||Rt.button!==0)){var qt=Rt;qt._virtualHandled||(qt._virtualHandled=!0,le=!0)}},dt=function(){le=!1,Ze()},vt=function(Rt){if(le){var qt=Dt(Rt,!1),$t=re.getBoundingClientRect(),kt=$t.top,hn=$t.bottom;if(qt<=kt){var jt=kt-qt;be=-en(jt),St()}else if(qt>=hn){var tn=qt-hn;be=en(tn),St()}else Ze()}};return re.addEventListener("mousedown",gt),re.ownerDocument.addEventListener("mouseup",dt),re.ownerDocument.addEventListener("mousemove",vt),function(){re.removeEventListener("mousedown",gt),re.ownerDocument.removeEventListener("mouseup",dt),re.ownerDocument.removeEventListener("mousemove",vt),Ze()}}},[oe])}var he=10;function at(oe,te,z,re,le,ne,be,Ze){var St=me.useRef(),gt=me.useState(null),dt=(0,pe.Z)(gt,2),vt=dt[0],Wt=dt[1];return(0,je.Z)(function(){if(vt&&vt.times<he){if(!oe.current){Wt(function(ri){return(0,Te.Z)({},ri)});return}ne();var Rt=vt.targetAlign,qt=vt.originAlign,$t=vt.index,kt=vt.offset,hn=oe.current.clientHeight,jt=!1,tn=Rt,et=null;if(hn){for(var pn=Rt||qt,It=0,Vt=0,an=0,Pn=Math.min(te.length-1,$t),sn=0;sn<=Pn;sn+=1){var mn=le(te[sn]);Vt=It;var ni=z.get(mn);an=Vt+(ni===void 0?re:ni),It=an}for(var Vn=pn==="top"?kt:hn-kt,zi=Pn;zi>=0;zi-=1){var Hi=le(te[zi]),xi=z.get(Hi);if(xi===void 0){jt=!0;break}if(Vn-=xi,Vn<=0)break}switch(pn){case"top":et=Vt-kt;break;case"bottom":et=an-hn+kt;break;default:{var gi=oe.current.scrollTop,Wn=gi+hn;Vt<gi?tn="top":an>Wn&&(tn="bottom")}}et!==null&&be(et),et!==vt.lastTop&&(jt=!0)}jt&&Wt((0,Te.Z)((0,Te.Z)({},vt),{},{times:vt.times+1,targetAlign:tn,lastTop:et}))}},[vt,oe.current]),function(Rt){if(Rt==null){Ze();return}if(nt.Z.cancel(St.current),typeof Rt=="number")be(Rt);else if(Rt&&(0,Xe.Z)(Rt)==="object"){var qt,$t=Rt.align;"index"in Rt?qt=Rt.index:qt=te.findIndex(function(jt){return le(jt)===Rt.key});var kt=Rt.offset,hn=kt===void 0?0:kt;Wt({times:0,index:qt,offset:hn,originAlign:$t})}}}var Gt=me.forwardRef(function(oe,te){var z=oe.prefixCls,re=oe.rtl,le=oe.scrollOffset,ne=oe.scrollRange,be=oe.onStartMove,Ze=oe.onStopMove,St=oe.onScroll,gt=oe.horizontal,dt=oe.spinSize,vt=oe.containerSize,Wt=oe.style,Rt=oe.thumbStyle,qt=oe.showScrollBar,$t=me.useState(!1),kt=(0,pe.Z)($t,2),hn=kt[0],jt=kt[1],tn=me.useState(null),et=(0,pe.Z)(tn,2),pn=et[0],It=et[1],Vt=me.useState(null),an=(0,pe.Z)(Vt,2),Pn=an[0],sn=an[1],mn=!re,ni=me.useRef(),Vn=me.useRef(),zi=me.useState(qt),Hi=(0,pe.Z)(zi,2),xi=Hi[0],gi=Hi[1],Wn=me.useRef(),ri=function(){qt===!0||qt===!1||(clearTimeout(Wn.current),gi(!0),Wn.current=setTimeout(function(){gi(!1)},3e3))},Ri=ne-vt||0,In=vt-dt||0,ii=me.useMemo(function(){if(le===0||Ri===0)return 0;var yi=le/Ri;return yi*In},[le,Ri,In]),Un=function(Zn){Zn.stopPropagation(),Zn.preventDefault()},ki=me.useRef({top:ii,dragging:hn,pageY:pn,startTop:Pn});ki.current={top:ii,dragging:hn,pageY:pn,startTop:Pn};var rn=function(Zn){jt(!0),It(Dt(Zn,gt)),sn(ki.current.top),be(),Zn.stopPropagation(),Zn.preventDefault()};me.useEffect(function(){var yi=function(At){At.preventDefault()},Zn=ni.current,Nn=Vn.current;return Zn.addEventListener("touchstart",yi,{passive:!1}),Nn.addEventListener("touchstart",rn,{passive:!1}),function(){Zn.removeEventListener("touchstart",yi),Nn.removeEventListener("touchstart",rn)}},[]);var dn=me.useRef();dn.current=Ri;var gn=me.useRef();gn.current=In,me.useEffect(function(){if(hn){var yi,Zn=function(At){var Qe=ki.current,Ut=Qe.dragging,Sn=Qe.pageY,jn=Qe.startTop;nt.Z.cancel(yi);var Ee=ni.current.getBoundingClientRect(),Me=vt/(gt?Ee.width:Ee.height);if(Ut){var wt=(Dt(At,gt)-Sn)*Me,lt=jn;!mn&>?lt-=wt:lt+=wt;var Re=dn.current,ct=gn.current,Nt=ct?lt/ct:0,Qt=Math.ceil(Nt*Re);Qt=Math.max(Qt,0),Qt=Math.min(Qt,Re),yi=(0,nt.Z)(function(){St(Qt,gt)})}},Nn=function(){jt(!1),Ze()};return window.addEventListener("mousemove",Zn,{passive:!0}),window.addEventListener("touchmove",Zn,{passive:!0}),window.addEventListener("mouseup",Nn,{passive:!0}),window.addEventListener("touchend",Nn,{passive:!0}),function(){window.removeEventListener("mousemove",Zn),window.removeEventListener("touchmove",Zn),window.removeEventListener("mouseup",Nn),window.removeEventListener("touchend",Nn),nt.Z.cancel(yi)}}},[hn]),me.useEffect(function(){return ri(),function(){clearTimeout(Wn.current)}},[le]),me.useImperativeHandle(te,function(){return{delayHidden:ri}});var En="".concat(z,"-scrollbar"),$n={position:"absolute",visibility:xi?null:"hidden"},oi={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return gt?(Object.assign($n,{height:8,left:0,right:0,bottom:0}),Object.assign(oi,(0,He.Z)({height:"100%",width:dt},mn?"left":"right",ii))):(Object.assign($n,(0,He.Z)({width:8,top:0,bottom:0},mn?"right":"left",0)),Object.assign(oi,{width:"100%",height:dt,top:ii})),me.createElement("div",{ref:ni,className:Ne()(En,(0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(En,"-horizontal"),gt),"".concat(En,"-vertical"),!gt),"".concat(En,"-visible"),xi)),style:(0,Te.Z)((0,Te.Z)({},$n),Wt),onMouseDown:Un,onMouseMove:ri},me.createElement("div",{ref:Vn,className:Ne()("".concat(En,"-thumb"),(0,He.Z)({},"".concat(En,"-thumb-moving"),hn)),style:(0,Te.Z)((0,Te.Z)({},oi),Rt),onMouseDown:rn}))}),mt=Gt,Be=20;function Ke(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=oe/te*oe;return isNaN(z)&&(z=0),z=Math.max(z,Be),Math.floor(z)}var qe=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Kt=[],st={overflowY:"auto",overflowAnchor:"none"};function Lt(oe,te){var z=oe.prefixCls,re=z===void 0?"rc-virtual-list":z,le=oe.className,ne=oe.height,be=oe.itemHeight,Ze=oe.fullHeight,St=Ze===void 0?!0:Ze,gt=oe.style,dt=oe.data,vt=oe.children,Wt=oe.itemKey,Rt=oe.virtual,qt=oe.direction,$t=oe.scrollWidth,kt=oe.component,hn=kt===void 0?"div":kt,jt=oe.onScroll,tn=oe.onVirtualScroll,et=oe.onVisibleChange,pn=oe.innerProps,It=oe.extraRender,Vt=oe.styles,an=oe.showScrollBar,Pn=an===void 0?"optional":an,sn=(0,ge.Z)(oe,qe),mn=me.useCallback(function(Ct){return typeof Wt=="function"?Wt(Ct):Ct==null?void 0:Ct[Wt]},[Wt]),ni=Je(mn,null,null),Vn=(0,pe.Z)(ni,4),zi=Vn[0],Hi=Vn[1],xi=Vn[2],gi=Vn[3],Wn=!!(Rt!==!1&&ne&&be),ri=me.useMemo(function(){return Object.values(xi.maps).reduce(function(Ct,Pt){return Ct+Pt},0)},[xi.id,xi.maps]),Ri=Wn&&dt&&(Math.max(be*dt.length,ri)>ne||!!$t),In=qt==="rtl",ii=Ne()(re,(0,He.Z)({},"".concat(re,"-rtl"),In),le),Un=dt||Kt,ki=(0,me.useRef)(),rn=(0,me.useRef)(),dn=(0,me.useRef)(),gn=(0,me.useState)(0),En=(0,pe.Z)(gn,2),$n=En[0],oi=En[1],yi=(0,me.useState)(0),Zn=(0,pe.Z)(yi,2),Nn=Zn[0],Ei=Zn[1],At=(0,me.useState)(!1),Qe=(0,pe.Z)(At,2),Ut=Qe[0],Sn=Qe[1],jn=function(){Sn(!0)},Ee=function(){Sn(!1)},Me={getKey:mn};function wt(Ct){oi(function(Pt){var un;typeof Ct=="function"?un=Ct(Pt):un=Ct;var Yt=Oi(un);return ki.current.scrollTop=Yt,Yt})}var lt=(0,me.useRef)({start:0,end:Un.length}),Re=(0,me.useRef)(),ct=it(Un,mn),Nt=(0,pe.Z)(ct,1),Qt=Nt[0];Re.current=Qt;var nn=me.useMemo(function(){if(!Wn)return{scrollHeight:void 0,start:0,end:Un.length-1,offset:void 0};if(!Ri){var Ct;return{scrollHeight:((Ct=rn.current)===null||Ct===void 0?void 0:Ct.offsetHeight)||0,start:0,end:Un.length-1,offset:void 0}}for(var Pt=0,un,Yt,xn,Tt=Un.length,bt=0;bt<Tt;bt+=1){var Ft=Un[bt],zt=mn(Ft),Dn=xi.get(zt),Fn=Pt+(Dn===void 0?be:Dn);Fn>=$n&&un===void 0&&(un=bt,Yt=Pt),Fn>$n+ne&&xn===void 0&&(xn=bt),Pt=Fn}return un===void 0&&(un=0,Yt=0,xn=Math.ceil(ne/be)),xn===void 0&&(xn=Un.length-1),xn=Math.min(xn+1,Un.length-1),{scrollHeight:Pt,start:un,end:xn,offset:Yt}},[Ri,Wn,$n,Un,gi,ne]),Mt=nn.scrollHeight,_t=nn.start,Ae=nn.end,yn=nn.offset;lt.current.start=_t,lt.current.end=Ae,me.useLayoutEffect(function(){var Ct=xi.getRecord();if(Ct.size===1){var Pt=Array.from(Ct.keys())[0],un=Ct.get(Pt),Yt=Un[_t];if(Yt&&un===void 0){var xn=mn(Yt);if(xn===Pt){var Tt=xi.get(Pt),bt=Tt-be;wt(function(Ft){return Ft+bt})}}}xi.resetRecord()},[Mt]);var Zt=me.useState({width:0,height:ne}),fn=(0,pe.Z)(Zt,2),ln=fn[0],bn=fn[1],Mn=function(Pt){bn({width:Pt.offsetWidth,height:Pt.offsetHeight})},ci=(0,me.useRef)(),Bn=(0,me.useRef)(),Ln=me.useMemo(function(){return Ke(ln.width,$t)},[ln.width,$t]),ei=me.useMemo(function(){return Ke(ln.height,Mt)},[ln.height,Mt]),Tn=Mt-ne,hi=(0,me.useRef)(Tn);hi.current=Tn;function Oi(Ct){var Pt=Ct;return Number.isNaN(hi.current)||(Pt=Math.min(Pt,hi.current)),Pt=Math.max(Pt,0),Pt}var ai=$n<=0,di=$n>=Tn,Li=Nn<=0,fi=Nn>=$t,Xn=$e(ai,di,Li,fi),Mi=function(){return{x:In?-Nn:Nn,y:$n}},Jn=(0,me.useRef)(Mi()),si=(0,fe.zX)(function(Ct){if(tn){var Pt=(0,Te.Z)((0,Te.Z)({},Mi()),Ct);(Jn.current.x!==Pt.x||Jn.current.y!==Pt.y)&&(tn(Pt),Jn.current=Pt)}});function pi(Ct,Pt){var un=Ct;Pt?((0,Ue.flushSync)(function(){Ei(un)}),si()):wt(un)}function wi(Ct){var Pt=Ct.currentTarget.scrollTop;Pt!==$n&&wt(Pt),jt==null||jt(Ct),si()}var li=function(Pt){var un=Pt,Yt=$t?$t-ln.width:0;return un=Math.max(un,0),un=Math.min(un,Yt),un},Kn=(0,fe.zX)(function(Ct,Pt){Pt?((0,Ue.flushSync)(function(){Ei(function(un){var Yt=un+(In?-Ct:Ct);return li(Yt)})}),si()):wt(function(un){var Yt=un+Ct;return Yt})}),zn=Ht(Wn,ai,di,Li,fi,!!$t,Kn),Ti=(0,pe.Z)(zn,2),Zi=Ti[0],Gi=Ti[1];pt(Wn,ki,function(Ct,Pt,un,Yt){var xn=Yt;return Xn(Ct,Pt,un)?!1:!xn||!xn._virtualHandled?(xn&&(xn._virtualHandled=!0),Zi({preventDefault:function(){},deltaX:Ct?Pt:0,deltaY:Ct?0:Pt}),!0):!1}),ve(Ri,ki,function(Ct){wt(function(Pt){return Pt+Ct})}),(0,je.Z)(function(){function Ct(un){var Yt=ai&&un.detail<0,xn=di&&un.detail>0;Wn&&!Yt&&!xn&&un.preventDefault()}var Pt=ki.current;return Pt.addEventListener("wheel",Zi,{passive:!1}),Pt.addEventListener("DOMMouseScroll",Gi,{passive:!0}),Pt.addEventListener("MozMousePixelScroll",Ct,{passive:!1}),function(){Pt.removeEventListener("wheel",Zi),Pt.removeEventListener("DOMMouseScroll",Gi),Pt.removeEventListener("MozMousePixelScroll",Ct)}},[Wn,ai,di]),(0,je.Z)(function(){if($t){var Ct=li(Nn);Ei(Ct),si({x:Ct})}},[ln.width,$t]);var Yn=function(){var Pt,un;(Pt=ci.current)===null||Pt===void 0||Pt.delayHidden(),(un=Bn.current)===null||un===void 0||un.delayHidden()},ar=at(ki,Un,xi,be,mn,function(){return Hi(!0)},wt,Yn);me.useImperativeHandle(te,function(){return{nativeElement:dn.current,getScrollInfo:Mi,scrollTo:function(Pt){function un(Yt){return Yt&&(0,Xe.Z)(Yt)==="object"&&("left"in Yt||"top"in Yt)}un(Pt)?(Pt.left!==void 0&&Ei(li(Pt.left)),ar(Pt.top)):ar(Pt)}}}),(0,je.Z)(function(){if(et){var Ct=Un.slice(_t,Ae+1);et(Ct,Un)}},[_t,Ae,Un]);var ti=Ge(Un,mn,xi,be),sr=It==null?void 0:It({start:_t,end:Ae,virtual:Ri,offsetX:Nn,offsetY:yn,rtl:In,getSize:ti}),tr=ke(Un,_t,Ae,$t,Nn,zi,vt,Me),Fi=null;ne&&(Fi=(0,Te.Z)((0,He.Z)({},St?"height":"maxHeight",ne),st),Wn&&(Fi.overflowY="hidden",$t&&(Fi.overflowX="hidden"),Ut&&(Fi.pointerEvents="none")));var Rn={};return In&&(Rn.dir="rtl"),me.createElement("div",(0,ue.Z)({ref:dn,style:(0,Te.Z)((0,Te.Z)({},gt),{},{position:"relative"}),className:ii},Rn,sn),me.createElement(xe.Z,{onResize:Mn},me.createElement(hn,{className:"".concat(re,"-holder"),style:Fi,ref:ki,onScroll:wi,onMouseEnter:Yn},me.createElement(Ce,{prefixCls:re,height:Mt,offsetX:Nn,offsetY:yn,scrollWidth:$t,onInnerResize:Hi,ref:rn,innerProps:pn,rtl:In,extra:sr},tr))),Ri&&Mt>ne&&me.createElement(mt,{ref:ci,prefixCls:re,scrollOffset:$n,scrollRange:Mt,rtl:In,onScroll:pi,onStartMove:jn,onStopMove:Ee,spinSize:ei,containerSize:ln.height,style:Vt==null?void 0:Vt.verticalScrollBar,thumbStyle:Vt==null?void 0:Vt.verticalScrollBarThumb,showScrollBar:Pn}),Ri&&$t>ln.width&&me.createElement(mt,{ref:Bn,prefixCls:re,scrollOffset:Nn,scrollRange:$t,rtl:In,onScroll:pi,onStartMove:jn,onStopMove:Ee,spinSize:Ln,containerSize:ln.width,horizontal:!0,style:Vt==null?void 0:Vt.horizontalScrollBar,thumbStyle:Vt==null?void 0:Vt.horizontalScrollBarThumb,showScrollBar:Pn}))}var Oe=me.forwardRef(Lt);Oe.displayName="List";var ut=Oe,ft=ut},93314:function(xt){"use strict";xt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(xt,Et,de){"use strict";de.d(Et,{Z:function(){return Ne}});const ue=xe=>typeof xe=="object"&&xe!=null&&xe.nodeType===1,Xe=(xe,fe)=>(!fe||xe!=="hidden")&&xe!=="visible"&&xe!=="clip",Te=(xe,fe)=>{if(xe.clientHeight<xe.scrollHeight||xe.clientWidth<xe.scrollWidth){const je=getComputedStyle(xe,null);return Xe(je.overflowY,fe)||Xe(je.overflowX,fe)||(me=>{const Ue=(Le=>{if(!Le.ownerDocument||!Le.ownerDocument.defaultView)return null;try{return Le.ownerDocument.defaultView.frameElement}catch(Ce){return null}})(me);return!!Ue&&(Ue.clientHeight<me.scrollHeight||Ue.clientWidth<me.scrollWidth)})(xe)}return!1},He=(xe,fe,je,me,Ue,Le,Ce,De)=>Le<xe&&Ce>fe||Le>xe&&Ce<fe?0:Le<=xe&&De<=je||Ce>=fe&&De>=je?Le-xe-me:Ce>fe&&De<je||Le<xe&&De>je?Ce-fe+Ue:0,pe=xe=>{const fe=xe.parentElement;return fe==null?xe.getRootNode().host||null:fe},ge=(xe,fe)=>{var je,me,Ue,Le;if(typeof document=="undefined")return[];const{scrollMode:Ce,block:De,inline:ke,boundary:Ye,skipOverflowHiddenElements:tt}=fe,it=typeof Ye=="function"?Ye:mt=>mt!==Ye;if(!ue(xe))throw new TypeError("Invalid target");const nt=document.scrollingElement||document.documentElement,Ve=[];let rt=xe;for(;ue(rt)&&it(rt);){if(rt=pe(rt),rt===nt){Ve.push(rt);break}rt!=null&&rt===document.body&&Te(rt)&&!Te(document.documentElement)||rt!=null&&Te(rt,tt)&&Ve.push(rt)}const $e=(me=(je=window.visualViewport)==null?void 0:je.width)!=null?me:innerWidth,Ht=(Le=(Ue=window.visualViewport)==null?void 0:Ue.height)!=null?Le:innerHeight,{scrollX:Ge,scrollY:_e}=window,{height:ot,width:Se,top:We,right:Pe,bottom:Je,left:Ot}=xe.getBoundingClientRect(),{top:pt,right:en,bottom:Dt,left:ve}=(mt=>{const Be=window.getComputedStyle(mt);return{top:parseFloat(Be.scrollMarginTop)||0,right:parseFloat(Be.scrollMarginRight)||0,bottom:parseFloat(Be.scrollMarginBottom)||0,left:parseFloat(Be.scrollMarginLeft)||0}})(xe);let he=De==="start"||De==="nearest"?We-pt:De==="end"?Je+Dt:We+ot/2-pt+Dt,at=ke==="center"?Ot+Se/2-ve+en:ke==="end"?Pe+en:Ot-ve;const Gt=[];for(let mt=0;mt<Ve.length;mt++){const Be=Ve[mt],{height:Ke,width:qe,top:Kt,right:st,bottom:Lt,left:Oe}=Be.getBoundingClientRect();if(Ce==="if-needed"&&We>=0&&Ot>=0&&Je<=Ht&&Pe<=$e&&(Be===nt&&!Te(Be)||We>=Kt&&Je<=Lt&&Ot>=Oe&&Pe<=st))return Gt;const ut=getComputedStyle(Be),ft=parseInt(ut.borderLeftWidth,10),oe=parseInt(ut.borderTopWidth,10),te=parseInt(ut.borderRightWidth,10),z=parseInt(ut.borderBottomWidth,10);let re=0,le=0;const ne="offsetWidth"in Be?Be.offsetWidth-Be.clientWidth-ft-te:0,be="offsetHeight"in Be?Be.offsetHeight-Be.clientHeight-oe-z:0,Ze="offsetWidth"in Be?Be.offsetWidth===0?0:qe/Be.offsetWidth:0,St="offsetHeight"in Be?Be.offsetHeight===0?0:Ke/Be.offsetHeight:0;if(nt===Be)re=De==="start"?he:De==="end"?he-Ht:De==="nearest"?He(_e,_e+Ht,Ht,oe,z,_e+he,_e+he+ot,ot):he-Ht/2,le=ke==="start"?at:ke==="center"?at-$e/2:ke==="end"?at-$e:He(Ge,Ge+$e,$e,ft,te,Ge+at,Ge+at+Se,Se),re=Math.max(0,re+_e),le=Math.max(0,le+Ge);else{re=De==="start"?he-Kt-oe:De==="end"?he-Lt+z+be:De==="nearest"?He(Kt,Lt,Ke,oe,z+be,he,he+ot,ot):he-(Kt+Ke/2)+be/2,le=ke==="start"?at-Oe-ft:ke==="center"?at-(Oe+qe/2)+ne/2:ke==="end"?at-st+te+ne:He(Oe,st,qe,ft,te+ne,at,at+Se,Se);const{scrollLeft:gt,scrollTop:dt}=Be;re=St===0?0:Math.max(0,Math.min(dt+re/St,Be.scrollHeight-Ke/St+be)),le=Ze===0?0:Math.max(0,Math.min(gt+le/Ze,Be.scrollWidth-qe/Ze+ne)),he+=dt-re,at+=gt-le}Gt.push({el:Be,top:re,left:le})}return Gt},Fe=xe=>xe===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(xe)?xe:{block:"start",inline:"nearest"};function Ne(xe,fe){if(!xe.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})(xe))return;const je=(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}})(xe);if((Ue=>typeof Ue=="object"&&typeof Ue.behavior=="function")(fe))return fe.behavior(ge(xe,fe));const me=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:Ue,top:Le,left:Ce}of ge(xe,Fe(fe))){const De=Le-je.top+je.bottom,ke=Ce-je.left+je.right;Ue.scroll({top:De,left:ke,behavior:me})}}}}]);
|