You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1106 lines
647 KiB
1106 lines
647 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[5888],{78318:function(){"use strict"},44084:function(){"use strict"},32313:function(At,Ft){"use strict";Ft.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},93127: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 At={},Ft="5.0",he={},ae=null,$e=!1,Te=!1,Re=null,me=!1,ye=null,Fe=null,Ze=0;Ze<arguments.length;Ze++){var Ce=arguments[Ze];if(Ce!==null)switch(typeof Ce){case"number":Ft=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ft=Ce:Re=Ce;break;case"object":typeof Ce.is3D!="undefined"?ae=Ce:he=Ce;break;case"boolean":$e=Ce,Te=!0;break}}ae===null&&(ae={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},he.material_id!==void 0&&!Te&&($e=!0)),Re!==null&&he.id===void 0&&(he.id=Re);var fe="",tt="",ve=!1,st=null,_e=null,Le=null,Me=!1,De=null,rt=null,ct=null,ft=null,lt=null;he.height!==void 0&&(he.height=Math.round(he.height)),he.width!==void 0&&(he.width=Math.round(he.width));var nt=function(be){return parseFloat(be)>4?parseFloat(be):5};At.setHTML5Codebase=function(be,ze){Fe=be,xe(be,ze)},At.setJavaCodebase=At.setJavaCodebaseVersion=At.isCompiledInstalled=At.setPreCompiledScriptPath=At.setPreCompiledResourcePath=function(){},At.setHTML5CodebaseVersion=function(be,ze){var Ie=parseFloat(be);if(Ie!==NaN&&Ie<5){console.log("The GeoGebra HTML5 codebase version "+Ie+" is deprecated. Using version latest instead.");return}ye=be,le(be,ze)},At.getHTML5CodebaseVersion=function(){return _e},At.getParameters=function(){return he},At.setFontsCSSURL=function(be){ft=be},At.setGiacJSURL=function(be){},At.setJNLPFile=function(be){fe=be},At.setJNLPBaseDir=function(be){},At.inject=function(){function be(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ze="auto",Ie=he.id,dt,Ue=!1,qe=0;qe<arguments.length;qe++){var ke=arguments[qe];typeof ke=="string"?(ke=ke.toLowerCase(),ke.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ze=ke:Ie=arguments[qe]):typeof ke=="boolean"?Ue=ke:ke instanceof HTMLElement&&(dt=ke)}et();function et(){if(!me){setTimeout(et,200);return}ze=ut(ze);var it=dt||document.getElementById(Ie);if(!it){console.log("possibly bug on ajax loading? ");return}if(At.removeExistingApplet(it,!1),he.width===void 0&&it.clientWidth&&(he.width=it.clientWidth),he.height===void 0&&it.clientHeight&&(he.height=it.clientHeight),!(he.width&&he.height)&&ze==="html5"&&(delete he.width,delete he.height),st=ze,ze==="screenshot")Ee(it,he);else{var oe=!1;he.hasOwnProperty("playButton")&&he.playButton||he.hasOwnProperty("clickToLoad")&&he.clickToLoad?oe=!0:he.hasOwnProperty("playButtonAutoDecide")&&he.playButtonAutoDecide&&(oe=(!at()||be())&&ot()),oe?(st="screenshot",mt(it,he,Ue,ze)):Ge(it,he,Ue)}}};function at(){try{return window.self!==window.top}catch(be){return!0}}function ot(){return he.hasOwnProperty("screenshotGenerator")&&he.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}At.getViews=function(){return ae},At.isJavaInstalled=function(){return!1};var Wt=function(be){var ze=function(qe){var ke=JSON.parse(qe),et=function(ee){return ee.type=="G"||ee.type=="E"},it=ke.elements?ke.elements.filter(et)[0]:ke;if(!it||!it.url){Ie();return}he.fileName=it.url,Ke(it.settings||{}),ae.is3D=!0;var oe="https://www.geogebra.org/images/";At.setPreviewImage(De||it.previewUrl,oe+"GeoGebra_loading.png",oe+"applet_play.png"),be()},Ie=function(){he.onError&&he.onError(),Ne("Error: Fetching material (id "+he.material_id+") failed.",he)},dt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ue="/materials/"+he.material_id+"?scope=basic";We("https://"+dt+"/api/proxy.php?path="+encodeURIComponent(Ue),ze,Ie)};function Ke(be){var ze=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ie){be[Ie]=!!be[Ie]}),ze.forEach(function(Ie){he[Ie]===void 0&&be[Ie]!==void 0&&(he[Ie]=be[Ie])}),he.showToolBarHelp===void 0&&(he.showToolBarHelp=he.showToolBar)}function We(be,ze,Ie){var dt=new XMLHttpRequest;dt.open("GET",be),dt.onload=function(){ze(dt.responseText)},dt.onerror=Ie,dt.send()}At.isHTML5Installed=function(){return!0},At.getLoadedAppletType=function(){return st},At.setPreviewImage=function(be,ze,Ie){De=be,rt=ze,ct=Ie},At.removeExistingApplet=function(be,ze){var Ie;typeof be=="string"&&(be=document.getElementById(be)),st=null;var dt=null;for(Ie=0;Ie<be.childNodes.length;Ie++){var Ue=be.childNodes[Ie],qe=Ue.className;qe==="applet_screenshot"?ze?(Ue.style.display="block",st="screenshot"):Ue.style.display="none":qe!=="applet_scaler prerender"&&(be.removeChild(Ue),dt=qe&&qe.indexOf("appletParameters")!=-1?Ue.id:null,Ie--)}var ke=he.id!==void 0?he.id:dt,et=window[ke];et&&typeof et.getBase64=="function"&&(et.remove(),window[ke]=null)},At.refreshHitPoints=function(){if(nt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var be=At.getAppletObject();return be&&typeof be.recalculateEnvironments=="function"?(be.recalculateEnvironments(),!0):!1},At.startAnimation=function(){var be=At.getAppletObject();return be&&typeof be.startAnimation=="function"?(be.startAnimation(),!0):!1},At.stopAnimation=function(){var be=At.getAppletObject();return be&&typeof be.stopAnimation=="function"?(be.stopAnimation(),!0):!1},At.getAppletObject=function(){var be=he.id!==void 0?he.id:"ggbApplet";return window[be]},At.resize=function(){};var vt=function(be,ze,Ie){var dt=document.createElement("param");dt.setAttribute("name",ze),dt.setAttribute("value",Ie),be.appendChild(dt)},Ae=function(be){return be&&be!=="false"},Ge=function(be,ze,Ie){nt(_e)<=4.2&&(Ie=!0);var dt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==_e||ggbHTML5LoadedCodebaseIsWebSimple&&!Me)&&(dt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ue=document.createElement("div");Ue.classList.add("appletParameters","notranslate");var qe=ze.width,ke=ze.height;if(ze.disableAutoScale=ze.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ze.disableAutoScale,ze.width!==void 0)if(nt(_e)<=4.4)Ae(ze.showToolBar)&&(ze.height-=7),Ae(ze.showAlgebraInput)&&(ze.height-=37),ze.width<605&&Ae(ze.showToolBar)&&(ze.width=605,qe=605);else{var et=100;(Ae(ze.showToolBar)||Ae(ze.showMenuBar))&&(ze.hasOwnProperty("customToolBar")&&(ze.customToolbar=ze.customToolBar),et=Ae(ze.showMenuBar)?245:155),qe<et&&(ze.width=et,qe=et)}Ue.style.border="none",Ue.style.display="inline-block";for(var it in ze)ze.hasOwnProperty(it)&&it!=="appletOnLoad"&&Ue.setAttribute("data-param-"+it,ze[it]);ft&&Ue.setAttribute("data-param-fontscssurl",ft),At.resize=function(){GGBAppletUtils.responsiveResize(be,ze)},window.addEventListener("resize",function(Nt){At.resize()});var oe=typeof ze.appletOnLoad=="function"?ze.appletOnLoad:function(){};if(!Ie&&ze.width!==void 0){ze.hasOwnProperty("showSplash")||Ue.setAttribute("data-param-showSplash","false");var ee=be.querySelector(".applet_scaler.prerender"),z=ee!==null;if(z)var re=ee.querySelector(".ggb_preview");else{var re=Qe(qe,ke,ze.borderColor,!1);ee=document.createElement("div"),ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.style.width=qe+"px",ee.style.height=ke+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ee,"66%"),nt(_e)>=5?(ze.appletOnLoad=function(Nt){var Lt=be.querySelector(".ggb_preview");Lt&&Lt.parentNode.removeChild(Lt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ee),window.GGBT_wsf_view&&$(window).trigger("resize"),oe(Nt)},z||ee.appendChild(re)):Ue.appendChild(re),ee.appendChild(Ue),z||be.appendChild(ee),setTimeout(function(){At.resize()},1)}else{var ue=document.createElement("div");ue.className="applet_scaler",ue.style.position="relative",ue.style.display="block",ue.appendChild(Ue),be.appendChild(ue),ze.appletOnLoad=function(Nt){At.resize(),oe(Nt)}}function ne(Nt,Lt){Lt&&typeof Lt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Nt,Lt.appletOnLoad):renderGGBElement(Nt),Ne("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Lt)}function ge(Nt,Lt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Nt,params:Lt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(kt){ne(kt.article,kt.params)}),html5AppletsToProcess=null)},nt(_e)<5&&(Nt.className+=" geogebraweb")):ne(Nt,Lt)}if(dt){scriptLoadStarted=!0;for(var je=0;je<Ue.childNodes.length;je++){var Dt=Ue.childNodes[je].tagName;Dt==="TABLE"&&(Ue.removeChild(Ue.childNodes[je]),je--)}if(ggbHTML5LoadedScript!==null){var St=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');St!=null&&St.parentNode.removeChild(St)}var yt=document.createElement("script"),xt=function(){ge(Ue,ze)};yt.src=tt+Le,ggbHTML5LoadedCodebaseIsWebSimple=Me,ggbHTML5LoadedCodebaseVersion=_e,ggbHTML5LoadedScript=yt.src,Ne("GeoGebra HTML5 codebase loaded: '"+tt+"'.",ze),!Fe&&(!ye||ye=="5.0")?(Me?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),xt()):tt.requirejs?__webpack_require__.e(5455).then(function(){var Nt=[__webpack_require__(75455)];xt.apply(null,Nt)}.bind(this)).catch(__webpack_require__.oe):(yt.onload=xt,be.appendChild(yt))}else ge(Ue,ze);ze.height=ke,ze.width=qe},Ee=function(be,ze,Ie){var dt=Qe(ze.width,ze.height,ze.borderColor,Ie),Ue=document.createElement("div");Ue.style.position="relative",Ue.style.display="block",Ue.style.width=ze.width+"px",Ue.style.height=ze.height+"px",Ue.className="applet_screenshot applet_scaler"+(Ie?" applet_screenshot_play":""),Ue.appendChild(dt);var qe=GGBAppletUtils.getScale(ze,be,Ie);Ie?(be.appendChild(Ye()),window.GGBT_wsf_view||(be.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ue,"66%"),be.appendChild(Ue),qe!==1&&!isNaN(qe)&&(GGBAppletUtils.scaleElement(Ue,qe),Ue.style.width=ze.width+"px",Ue.style.height=ze.height+"px",Ue.parentNode.style.width=ze.width*qe+"px",Ue.parentNode.style.height=ze.height*qe+"px"),At.resize=function(){Oe(be,dt,Ue,Ie)},window.addEventListener("resize",function(ke){At.resize()}),At.resize()};function Oe(be,ze,Ie,dt){if(be.contains(ze)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(be.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(be)}var Ue=GGBAppletUtils.getScale(he,be,dt);Ie.parentNode!==null&&(!isNaN(Ue)&&Ue!==1?(GGBAppletUtils.scaleElement(Ie,Ue),Ie.parentNode.style.width=he.width*Ue+"px",Ie.parentNode.style.height=he.height*Ue+"px"):(GGBAppletUtils.scaleElement(Ie,1),Ie.parentNode.style.width=he.width+"px",Ie.parentNode.style.height=he.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()}}At.onExitFullscreen=function(be,ze){ze.appendChild(be)};var mt=function(be,ze,Ie,dt){Ee(be,ze,!0);for(var Ue=function(){var et=[];for(ke=0;ke<be.childNodes.length;ke++)et.push(be.childNodes[ke]);if(window.GGBT_wsf_view){var it=window.GGBT_wsf_view.renderFullScreen(be,ze.id),oe=document.getElementById("fullscreencontainer"),ee=jQuery(be).find(".fullscreencontent");ee.length>0?(it.remove(),ee.attr("id","fullscreencontent").show(),jQuery(oe).append(ee),window.dispatchEvent(new Event("resize"))):Ge(it,ze,!1),window.GGBT_wsf_view.launchFullScreen(oe)}else st=dt,Ge(be,ze,!1);if(!window.GGBT_wsf_view)for(ke=0;ke<et.length;ke++)be.removeChild(et[ke])},qe=be.getElementsByClassName("ggb_preview_play"),ke=0;ke<qe.length;ke++)qe[ke].addEventListener("click",Ue,!1),qe[ke].addEventListener("ontouchstart",Ue,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(be),ot()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ye=function(){var be=document.createElement("div");if(be.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ze='.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");}',Ie=document.createElement("style");Ie.styleSheet?Ie.styleSheet.cssText=ze:Ie.appendChild(document.createTextNode(ze)),document.getElementsByTagName("head")[0].appendChild(Ie)}return be},Qe=function(be,ze,Ie,dt){var Ue=document.createElement("div");Ue.className="ggb_preview",Ue.style.position="absolute",Ue.style.zIndex="90",Ue.style.width=be-2+"px",Ue.style.height=ze-2+"px",Ue.style.top="0px",Ue.style.left="0px",Ue.style.overflow="hidden",Ue.style.backgroundColor="white";var qe="lightgrey";Ie!==void 0&&(Ie==="none"?qe="transparent":qe=Ie),Ue.style.border="1px solid "+qe;var ke=document.createElement("img");if(ke.style.position="relative",ke.style.zIndex="1000",ke.style.top="-1px",ke.style.left="-1px",De!==null&&ke.setAttribute("src",De),ke.style.opacity=.7,rt!==null){var et,it,oe;if(!dt){et=document.createElement("img"),et.style.position="absolute",et.style.zIndex="1001",et.style.opacity=1,ke.style.opacity=.3,it=360,it>be/4*3&&(it=be/4*3),oe=it/5.8,et.setAttribute("src",rt),et.setAttribute("width",it),et.setAttribute("height",oe);var ee=(be-it)/2,z=(ze-oe)/2;et.style.left=ee+"px",et.style.top=z+"px",Ue.appendChild(et)}}return Ue.appendChild(ke),Ue},ut=function(be){return be=be.toLowerCase(),be==="html5"||be==="screenshot"?be:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],le=function(be,ze){if(_e=be,ze){xe(_e,!0);return}var Ie=!$e;if(Ie){var dt=nt(_e);!isNaN(dt)&&dt<4.4&&(Ie=!1)}var Ue,qe;window.location.protocol.substr(0,4)==="http"?Ue=window.location.protocol:Ue="http:";var ke=_e.indexOf("//");ke>0?qe=_e:ke===0?qe=Ue+_e:qe="https://www.geogebra.org/apps/5.2.814.0/";for(var et in pe)if(_e.slice(pe[et].length*-1)===pe[et]||_e.slice((pe[et].length+1)*-1)===pe[et]+"/"){xe(qe,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ie&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Ae(he.showToolBar)&&!Ae(he.showMenuBar)&&!Ae(he.showAlgebraInput)&&!Ae(he.enableRightClick)&&(!he.appName||he.appName=="classic")?qe+="webSimple/":qe+="web3d/",xe(qe,!1)},xe=function(be,ze){if(be.requirejs){tt=be;return}be.slice(-1)!=="/"&&(be+="/"),tt=be,ze===null&&(ze=be.indexOf("http")===-1),ve=ze,Le="web.nocache.js",Me=!1;var Ie=tt.split("/");Ie.length>1&&(!ze&&Ie[Ie.length-2]==="webSimple"?(Le="webSimple.nocache.js",Me=!0):pe.indexOf(Ie[Ie.length-2])>=0&&(Le=Ie[Ie.length-2]+".nocache.js")),Ie=be.split("/"),_e=Ie[Ie.length-3],_e.substr(0,4)==="test"?_e=_e.substr(4,1)+"."+_e.substr(5,1):(_e.substr(0,3)==="war"||_e.substr(0,4)==="beta")&&(_e="5.0");var dt=parseFloat(_e);dt!==NaN&&dt<5&&be.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+dt+" is deprecated. Using version latest instead."),le("5.0",ze))},Ne=function(be,ze){window.console&&window.console.log&&(!ze||typeof ze.showLogging=="undefined"||ze.showLogging&&ze.showLogging!=="false")&&console.log(be)};he.material_id!==void 0?Wt(Xe):Xe();function Xe(){var be=Ft;ye!==null?be=ye:parseFloat(be)<5&&(be="5.0"),le(be,!1),Fe!==null&&xe(Fe,ve),me=!0}return At},GGBAppletUtils=function(){"use strict";function At(){return window.GGBT_wsf_edit!==void 0}function Ft(me,ye){ye!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+ye+","+ye+")",me.style.webkitTransform="scale("+ye+","+ye+")",me.style.maxWidth="initial",me.querySelector(".ggb_preview")!==null&&(me.querySelector(".ggb_preview").style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[0]!==void 0&&(me.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[1]!==void 0&&(me.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(me.style.transform="none",me.style.webkitTransform="none")}function he(me,ye,Fe,Ze,Ce,fe){var tt=null;if(fe!=null&&fe!="")for(var ve=me.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+fe+" ")>-1){tt=ve;break}else ve=ve.parentNode;var st=0,_e=0,Le=0,Me=0,De=0,rt=0,ct=0;if(tt)st=tt.offsetWidth,_e=Math.max(Ze?tt.offsetWidth:0,tt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(st=Math.min(window.innerWidth,document.documentElement.clientWidth),_e=Math.min(window.innerHeight,document.documentElement.clientHeight),Le=st):(st=window.innerWidth,_e=window.innerHeight,Le=window.innerWidth),me){var ft=me.getBoundingClientRect();ft.left>0&&ft.left<=st&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(De=st-ft.width-ft.left,rt=Le<=480?10:30):(rt=ft.left,De=Le<=480?10:30),Me=rt+De)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var lt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Me=40,ct=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Me=0,ct=40)}}return me&&((Fe===void 0||!Fe)&&ye>0&&ye+Me<st?st=ye:st-=Me,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Fe===void 0||!Fe)&&(_e-=ct)),{width:st,height:_e}}function ae(me,ye,Fe,Ze,Ce){if(me.isScreenshoGenerator)return 1;var fe=Ze!==void 0&&Ze,tt=me.noScaleMargin!=null&&me.noScaleMargin,ve=function(lt){return lt&<!=="false"},st=ve(me.autoHeight),_e=he(ye,me.width,Fe,st,fe&&window.GGBT_wsf_view||tt,Ce),Le=parseInt(_e.width),Me=me.width,De=me.height;if(Me===void 0){var rt=ye.querySelector(".appletParameters");rt&&(Me=rt.offsetWidth,De=rt.offsetHeight)}var ct=Le/Me,ft=fe?1:_e.height/De;return Fe!==void 0&&!Fe&&(ct=Math.min(1,ct),ft=Math.min(1,ft)),Math.min(ct,ft)}function $e(me,ye,Fe){var Ze=1,Ce,fe=!1;if(me.hasOwnProperty("allowUpscale")&&(fe=me.allowUpscale),me.hasOwnProperty("scale")&&(Ze=parseFloat(me.scale),(isNaN(Ze)||Ze===null||Ze===0)&&(Ze=1),Ze>1&&(fe=!0)),ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))Ce=ae(me,ye,fe,Fe,me.scaleContainerClass);else return Ze;return fe&&(!me.hasOwnProperty("scale")||Ze===1)?Ce:Math.min(Ze,Ce)}function Te(me){var ye=Math.min(window.innerWidth,document.documentElement.clientWidth),Fe=Math.min(window.innerHeight,document.documentElement.clientHeight),Ze=me.getBoundingClientRect(),Ce=(ye-Ze.width)/2,fe=(Fe-Ze.height)/2;fe<0&&(fe=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?me.style.left="40px":me.style.left=Ce+"px",me.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?me.style.top="40px":me.style.top=fe+"px",me.style.left=Ce+"px")}function Re(me,ye){var Fe=me.querySelector(".appletParameters");if(Fe){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ye.id!==Fe.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Fe.parentElement&&/fullscreen/.test(Fe.parentElement.className))return;var Ze=$e(ye,me);At()&&Fe.setAttribute("data-param-scale",Ze);for(var Ce=null,fe=0;fe<me.childNodes.length;fe++)if(me.childNodes[fe].className!==void 0&&me.childNodes[fe].className.match(/^applet_scaler/)){Ce=me.childNodes[fe];break}if(Ce!==null&&Ce.querySelector(".noscale")!==null)return;var tt=ye.id!==void 0?ye.id:"ggbApplet",ve=window[tt];(ve==null||!ve.recalculateEnvironments)&&Ce!==null&&!Ce.className.match(/fullscreen/)&&(Ce.parentNode.style.transform="",!isNaN(Ze)&&Ze!==1?(Ce.parentNode.style.width=ye.width*Ze+"px",Ce.parentNode.style.height=ye.height*Ze+"px",Ft(Ce,Ze)):(Ft(Ce,1),Ce.parentNode.style.width=ye.width+"px",Ce.parentNode.style.height=ye.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Te(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Fe).parents(".content-added-content"))}}return{responsiveResize:Re,isFlexibleWorksheetEditor:At,positionCenter:Te,getScale:$e,scaleElement:Ft}}();__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 At=n.location.search;return At.indexOf(J)!=-1||At.indexOf(K)!=-1}function q(At,Ft){}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(At){var Ft=s[L].bindings;s[L].bindings=function(){for(var he=Ft?Ft():{},ae=At[webModule.__softPermutationId],$e=O;$e<ae.length;$e++){var Te=ae[$e];he[Te[O]]=Te[P]}return he}};var t;function u(){return v(),t}function v(){if(!t){var At=o.createElement(Q);if(At.id=L,At.style.cssText=R+S,At.tabIndex=-1,o.body.appendChild(At),t=At.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ft=document.compatMode==U?V:W;t.write(Ft+X),t.close()}}}function w(At){function Ft(ae){function $e(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Te=$e();if(Te){ae();return}function Re(){if(!Te){if(!$e())return;Te=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,Re,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,Re,!1);var me=setInterval(function(){Re()},$)}function he(ae){var $e=u(),Te=$e.body,Re=$e.createElement(_);Re.language=ab,Re.crossOrigin=W,Re.src=ae,webModule.__errFn&&(Re.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),Te.appendChild(Re)}Ft(function(){he(At)})}webModule.__startLoadingFragment=function(At){return C(At)},webModule.__installRunAsyncCode=function(At){var Ft=u(),he=Ft.body,ae=Ft.createElement(_);ae.language=ab,ae.text=At,he.appendChild(ae),he.removeChild(ae)};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(At){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(At){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(At){var Ft=c[At];return Ft==null?null:Ft},r=d,webModule.__errFn=e}function B(){function At(me){var ye=me.lastIndexOf(rb);ye==-1&&(ye=me.length);var Fe=me.indexOf(sb);Fe==-1&&(Fe=me.length);var Ze=me.lastIndexOf(tb,Math.min(Fe,ye));return Ze>=O?me.substring(O,Ze+P):W}function Ft(me){if(!me.match(/^\w+:\/\//)){var ye=o.createElement(ub);ye.src=me+vb,me=At(ye.src)}return me}function he(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function ae(){for(var me=o.getElementsByTagName(_),ye=O;ye<me.length;++ye)if(me[ye].src.indexOf(xb)!=-1)return At(me[ye].src);return W}function $e(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Te(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var Re=he();return Re==W&&(Re=ae()),Re==W&&(Re=$e()),Re==W&&Te()&&(Re=At(o.location.href)),Re=Ft(Re),Re}function C(At){return At.match(/^\//)||At.match(/^[a-zA-Z]+:\/\//)?At:webModule.__moduleBase+At}function D(){var At=[],Ft=O,he=[],ae=[];function $e(me){var ye=ae[me](),Fe=he[me];if(ye in Fe)return ye;var Ze=[];for(var Ce in Fe)Ze[Fe[Ce]]=Ce;throw r&&r(me,Ze,ye),null}if(__gwt_isKnownPropertyValue=function(me,ye){return ye in he[me]},webModule.__getPropMap=function(){var me={};for(var ye in he)he.hasOwnProperty(ye)&&(me[ye]=$e(ye));return me},webModule.__computePropValue=$e,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Te;try{Te=Cb;var Re=Te.indexOf(Db);Re!=-1&&(Ft=parseInt(Te.substring(Re+P),$),Te=Te.substring(O,Re))}catch(me){}return webModule.__softPermutationId=Ft,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})()},8396:function(At,Ft,he){"use strict";he.d(Ft,{Ax:function(){return Re},Ds:function(){return me},KI:function(){return Fe},SI:function(){return Te},f1:function(){return $e}});var ae=he(85386);function $e(Ze){let Ce=!0;if(Ze.length>0){for(let fe=0;fe<Ze.length;fe++)if(Ze[fe].compile_success==0||!Ze[fe].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function Te(Ze,Ce=""){let fe=[];for(let tt=0;tt<Ze.length;tt++){let ve=Ze[tt],st=Ce?`${Ce}/${ve.name}`:`${ve.name}`;fe.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:st})}return fe}function Re(Ze,Ce,fe){for(let tt=0;tt<Ze.length;tt++){let ve=Ze[tt];if(ve.key===Ce){ve.children=fe;break}ve.children&&Re(ve.children,Ce,fe)}return Ze}function me(Ze,Ce,fe){let tt;return function(){let ve=this,st=arguments,_e=function(){tt=null,fe||Ze.apply(ve,st)},Le=fe&&!tt;clearTimeout(tt),tt=setTimeout(_e,Ce),Le&&Ze.apply(ve,st)}}const ye=!0,Fe=ae.Z.API_SERVER},7384:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return Oe}});var ae=he(59301),$e=he(92123),Te=he(62673),Re=he(12893),me=he(32134),ye=he(43597),Fe=he(28284),Ze=he(82326),Ce={},fe=Object.defineProperty,tt=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,_e=(mt,Ye,Qe)=>Ye in mt?fe(mt,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):mt[Ye]=Qe,Le=(mt,Ye)=>{for(var Qe in Ye||(Ye={}))ve.call(Ye,Qe)&&_e(mt,Qe,Ye[Qe]);if(tt)for(var Qe of tt(Ye))st.call(Ye,Qe)&&_e(mt,Qe,Ye[Qe]);return mt},Me=(mt,Ye,Qe)=>new Promise((ut,pe)=>{var le=Xe=>{try{Ne(Qe.next(Xe))}catch(be){pe(be)}},xe=Xe=>{try{Ne(Qe.throw(Xe))}catch(be){pe(be)}},Ne=Xe=>Xe.done?ut(Xe.value):Promise.resolve(Xe.value).then(le,xe);Ne((Qe=Qe.apply(mt,Ye)).next())});const De=Te.default.Group,rt=({classroomList:mt,loading:Ye,user:Qe,exercise_id:ut=null,homework_common_id:pe=null,setitem:le,item:xe,type:Ne,rz:Xe,dispatch:be})=>{var ze,Ie,dt,Ue,qe,ke,et,it;const[oe,ee]=(0,ae.useState)([]);let[z,re]=(0,ae.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20});const ue=(0,$e.useParams)(),[ne,ge]=(0,ae.useState)(!1),[je,Dt]=(0,ae.useState)(!1),[St]=Fe.default.useForm();(0,ae.useEffect)(()=>{Xe&&(z.zydatas=Xe,re(Le({},z)),xe!=null&&xe.ec_course_id&&yt())},[xe,Xe]);function yt(){return Me(this,null,function*(){console.log("----",xe),yield xt(xe==null?void 0:xe.ec_major_school_id),yield Nt(xe==null?void 0:xe.ec_year_id),yield Lt(xe==null?void 0:xe.ec_course_id),St.setFieldsValue({ec_course_id:xe==null?void 0:xe.ec_course_id,ec_major_school_id:xe==null?void 0:xe.ec_major_school_id,ec_point_ids:xe==null?void 0:xe.ec_point_ids,ec_year_id:xe==null?void 0:xe.ec_year_id})})}function xt(kt){return Me(this,null,function*(){const Rt=yield(0,ye.ZP)(`/api/ec_major_schools/${kt}/ec_years/get_year_list.json`,{method:"get"});z.jbdatas=Rt==null?void 0:Rt.data,re(Le({},z)),St.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]})})}function Nt(kt){return Me(this,null,function*(){const Rt=yield(0,ye.ZP)(`/api/ec_years/${kt}/ec_courses/get_courses.json`,{method:"get"});z.kcdatas=Rt==null?void 0:Rt.data,re(Le({},z)),St.setFieldsValue({ec_course_id:"",ec_point_ids:[]})})}const Lt=kt=>Me(void 0,null,function*(){const Rt=yield(0,ye.ZP)(`/api/ec_courses/${kt}/ec_points.json`,{method:"get",params:{ec_course_id:kt}});z.zsdatas=Rt==null?void 0:Rt.data,re(Le({},z))});return ae.createElement("div",{className:Ce.from},ae.createElement(Fe.default,{form:St,layout:"inline",onValuesChange:kt=>{console.log("----",kt),kt.ec_major_school_id&&(z.jbdatas=[],z.kcdatas=[],z.zsdatas=[],re(Le({},z)),xt(kt.ec_major_school_id)),kt.ec_year_id&&(z.kcdatas=[],z.zsdatas=[],re(Le({},z)),Nt(kt.ec_year_id)),kt.ec_course_id&&(z.zsdatas=[],re(Le({},z)),Lt(kt.ec_course_id))},onFinish:kt=>Me(void 0,null,function*(){le(kt)})},ae.createElement(Fe.default.Item,{label:"\u8BA4\u8BC1\u4E13\u4E1A",name:"ec_major_school_id"},ae.createElement(Ze.default,{style:{width:150},disabled:((ze=z.zydatas)==null?void 0:ze.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A"},(Ie=z==null?void 0:z.zydatas)==null?void 0:Ie.map((kt,Rt)=>ae.createElement(Ze.default.Option,{key:Rt,value:kt==null?void 0:kt.ec_major_school_id},kt==null?void 0:kt.name)))),ae.createElement(Fe.default.Item,{label:"\u8BA4\u8BC1\u5C4A\u522B",name:"ec_year_id"},ae.createElement(Ze.default,{style:{width:150},disabled:((dt=z.jbdatas)==null?void 0:dt.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u5C4A\u522B"},(Ue=z==null?void 0:z.jbdatas)==null?void 0:Ue.map((kt,Rt)=>ae.createElement(Ze.default.Option,{key:Rt,value:kt==null?void 0:kt.ec_year_id},kt==null?void 0:kt.year)))),ae.createElement(Fe.default.Item,{label:"\u8BFE\u7A0B",name:"ec_course_id"},ae.createElement(Ze.default,{style:{width:150},disabled:((qe=z.kcdatas)==null?void 0:qe.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"},(ke=z==null?void 0:z.kcdatas)==null?void 0:ke.map((kt,Rt)=>ae.createElement(Ze.default.Option,{key:Rt,value:kt==null?void 0:kt.id},kt==null?void 0:kt.name)))),ae.createElement(Fe.default.Item,{label:"\u77E5\u8BC6\u70B9",name:"ec_point_ids"},ae.createElement(Ze.default,{onChange:()=>{St.submit()},style:{width:150},mode:"multiple",disabled:((et=z.zsdatas)==null?void 0:et.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"},(it=z==null?void 0:z.zsdatas)==null?void 0:it.map((kt,Rt)=>ae.createElement(Ze.default.Option,{key:Rt,value:kt==null?void 0:kt.id},kt==null?void 0:kt.name))))))};var ct=(0,$e.connect)(({classroomList:mt,loading:Ye,globalSetting:Qe,user:ut})=>({classroomList:mt,globalSetting:Qe,loading:Ye.effects,user:ut}))(rt),ft=Object.defineProperty,lt=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Ke=(mt,Ye,Qe)=>Ye in mt?ft(mt,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):mt[Ye]=Qe,We=(mt,Ye)=>{for(var Qe in Ye||(Ye={}))ot.call(Ye,Qe)&&Ke(mt,Qe,Ye[Qe]);if(at)for(var Qe of at(Ye))Wt.call(Ye,Qe)&&Ke(mt,Qe,Ye[Qe]);return mt},vt=(mt,Ye)=>lt(mt,nt(Ye)),Ae=(mt,Ye,Qe)=>new Promise((ut,pe)=>{var le=Xe=>{try{Ne(Qe.next(Xe))}catch(be){pe(be)}},xe=Xe=>{try{Ne(Qe.throw(Xe))}catch(be){pe(be)}},Ne=Xe=>Xe.done?ut(Xe.value):Promise.resolve(Xe.value).then(le,xe);Ne((Qe=Qe.apply(mt,Ye)).next())});const Ge=Te.default.Group,Ee=({classroomList:mt,loading:Ye,user:Qe,exercise_id:ut=null,homework_common_id:pe=null,setitem:le,type:xe,dispatch:Ne})=>{var Xe,be,ze;let[Ie,dt]=(0,ae.useState)([{}]),[Ue,qe]=(0,ae.useState)([]);function ke(){return Ae(this,null,function*(){var it,oe,ee;let z=yield(0,ye.ZP)("/api/ec_courses/0/ec_points/get_work_points.json",{method:"get",params:{exercise_id:ut,homework_common_id:pe}});if(((it=z==null?void 0:z.data)==null?void 0:it.length)>0){let re=[];(oe=z==null?void 0:z.data)==null||oe.map(ue=>{var ne;(ne=ue==null?void 0:ue.ec_point_ids)==null||ne.map(ge=>{re.push(ge)})}),le(vt(We({},(ee=z==null?void 0:z.data)==null?void 0:ee[0]),{ec_point_ids:re})),dt(z==null?void 0:z.data)}})}(0,ae.useEffect)(()=>{var it,oe;(oe=(it=Qe==null?void 0:Qe.userInfo)==null?void 0:it.course)!=null&&oe.course_school_id&&et()},[(be=(Xe=Qe==null?void 0:Qe.userInfo)==null?void 0:Xe.course)==null?void 0:be.course_school_id]);function et(){return Ae(this,null,function*(){var it,oe;const ee=yield(0,ye.ZP)(`/api/schools/${(oe=(it=Qe==null?void 0:Qe.userInfo)==null?void 0:it.course)==null?void 0:oe.course_school_id}/ec_majors/get_major_list.json`,{method:"get"});qe(ee==null?void 0:ee.data),(pe||ut)&&ke()})}return ae.createElement("div",{style:{display:(ze=Qe.userInfo.course)!=null&&ze.is_openengineering?"":"none"}},ae.createElement("p",{style:{fontSize:"16px",fontWeight:400}},"\u5DE5\u7A0B\u8BA4\u8BC1\u8003\u6838\u77E5\u8BC6\u70B9"),Ie==null?void 0:Ie.map((it,oe)=>ae.createElement("div",{key:oe,style:{display:"flex",alignItems:"center",marginBottom:"10px"}},ae.createElement(ct,{rz:Ue,item:it,type:oe,setitem:ee=>{Ie.splice(oe,1,ee),dt([...Ie]);let z=[];Ie==null||Ie.map(re=>{var ue;(ue=re==null?void 0:re.ec_point_ids)==null||ue.map(ne=>{z.push(ne)})}),le(vt(We({},ee),{ec_point_ids:z}))}}),oe!=0&&ae.createElement(Re.Z,{onClick:()=>{Ie.splice(oe,1),dt([...Ie])},style:{marginLeft:10,fontSize:"20px"}}),ae.createElement(me.Z,{onClick:()=>{Ie.push({}),dt([...Ie])},style:{marginLeft:10,fontSize:"20px"}}))))};var Oe=(0,$e.connect)(({classroomList:mt,loading:Ye,globalSetting:Qe,user:ut})=>({classroomList:mt,globalSetting:Qe,loading:Ye.effects,user:ut}))(Ee)},40783:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return tt}});var ae=he(59301),$e={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Te=he(92310),Re=he.n(Te),me=he(29787),ye=he(2859),Fe=he(43597),Ze=he(94601),Ce=(ve,st,_e)=>new Promise((Le,Me)=>{var De=ft=>{try{ct(_e.next(ft))}catch(lt){Me(lt)}},rt=ft=>{try{ct(_e.throw(ft))}catch(lt){Me(lt)}},ct=ft=>ft.done?Le(ft.value):Promise.resolve(ft.value).then(De,rt);ct((_e=_e.apply(ve,st)).next())}),tt=({data:ve,className:st,fullWidth:_e,style:Le={},onClose:Me,onOk:De,showFullTools:rt,noAssociationId:ct})=>{const ft=(0,ae.useRef)(null),lt=(0,ae.useRef)(null),nt=(0,ae.useRef)(null),at=(0,ae.useRef)(null),[ot,Wt]=(0,ae.useState)(!1),[Ke,We]=(0,ae.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ae.useEffect)(()=>(nt.current||(nt.current=document.createElement("style"),document.head.appendChild(nt.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),nt.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&vt()):(document.body.removeAttribute("data-custom"),nt.current&&(document.head.removeChild(nt.current),nt.current=null)),()=>{document.body.removeAttribute("data-custom"),nt.current&&(document.head.removeChild(nt.current),nt.current=null)}),[ve==null?void 0:ve.visible]);const vt=()=>Ce(void 0,null,function*(){Wt(!0),We("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Oe=yield(0,Ze.ZJ)(ve==null?void 0:ve.src);ft.current.src="",ft.current.src=Oe,ft.current.onload=function(){Ee()},Wt(!1),We("")}),Ae=Oe=>Ce(void 0,null,function*(){Wt(!0),We("\u6B63\u5728\u4FDD\u5B58\u4E2D");const mt=yield(0,Fe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:Oe.dataUrl}});mt!=null&&mt.id&&!ct?(yield(0,Fe.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:mt==null?void 0:mt.id,settings:JSON.stringify(Oe.state)}})).status===0&&De():mt!=null&&mt.id&&De(mt),Wt(!1),We("")}),Ge=()=>{const Oe=document.querySelector('a[href="https://markerjs.com/"]');Oe&&Oe.parentNode&&(Oe.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(Ye=>{const Qe=document.querySelector(Ye.name);Qe&&Qe.setAttribute("title",Ye.title)})},Ee=()=>{lt.current=new ye.hP(ft.current),lt.current.targetRoot=at.current,lt.current.addEventListener("render",Ae),lt.current.addEventListener("beforeclose",Me),rt&&(lt.current.availableMarkerTypes=lt.current.ALL_MARKER_TYPES,lt.current.uiStyleSettings.redoButtonVisible=!0,lt.current.uiStyleSettings.notesButtonVisible=!0,lt.current.uiStyleSettings.zoomButtonVisible=!0,lt.current.uiStyleSettings.zoomOutButtonVisible=!0,lt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=lt.current.uiStyleSettings,lt.current.show(),ve!=null&&ve.snapshotData&<.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ge()},300)};return ae.createElement(ae.Fragment,null,(ve==null?void 0:ve.visible)&&ae.createElement(me.Z,{spinning:ot,tip:Ke,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:at,className:Re()($e.imageDimensions,st,_e?$e.fullWidth:""),style:Le},ae.createElement("img",{className:$e.img,ref:ft}))))}},57765:function(At,Ft,he){"use strict";var ae=he(59301),$e=he(77019),Te=he(5269),Re=he(20554),me=he(99571),ye=he(74776),Fe=he(32313),Ze=he(48136),Ce=he(59301);const fe=(0,ae.forwardRef)(({callback:tt,showSaveButton:ve,value:st=""},_e)=>{const Le=(0,ae.useRef)(),Me=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],De=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
y=b + r\\text{sin}\\theta \r
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\left\\{\\begin{matrix} \r
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
\\end{matrix}\\right. \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
a \\perp \\alpha \\ \r
|
|
b \\perp \\alpha \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
a \\perp m,a \\perp n \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
a^{2}+b^{2}=c^{2} \r
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
a,b \\in R^{+} \\ \r
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
a,b \\in R \\ \r
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
P \\left( S \\right) =1 \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
\\forall A \\in S \\\\ \r
|
|
P \\left( A \\right) \\ge 0 \r
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
P_{n}=n! \\\\ \r
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
\\end{array}`}]}]}],rt=lt=>{Le.current.setValue(Le.current.getValue()+" "+lt.value+" ")},ct=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement($e.Z,{className:Fe.Z.lists,gutter:[10,10]},Me.map((lt,nt)=>Ce.createElement(Te.Z,{flex:"110px",className:Fe.Z.item},Ce.createElement("div",null,Ce.createElement(ye.Z,{value:`$$${lt.value}$$`}),lt.name),Ce.createElement("div",{className:Fe.Z.children},lt.children.map((at,ot)=>Ce.createElement("div",{key:ot},Ce.createElement("h1",null,at.name),Ce.createElement($e.Z,{gutter:[10,10]},at.data.map((Wt,Ke)=>Ce.createElement(Te.Z,{key:Ke,onClick:()=>rt(Wt),className:Fe.Z.diamond},Ce.createElement(ye.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement($e.Z,{className:Fe.Z.lists,gutter:[10,10]},De.map((lt,nt)=>Ce.createElement(Te.Z,{flex:"110px",className:Fe.Z.item},Ce.createElement("div",null,Ce.createElement(ye.Z,{value:"`$$"+lt.value+"$$`"}),lt.name),Ce.createElement("div",{className:Fe.Z.children},lt.children.map((at,ot)=>Ce.createElement("div",{key:ot},at.name&&Ce.createElement("h1",null,at.name),Ce.createElement($e.Z,{gutter:[10,10]},at.data.map((Wt,Ke)=>Ce.createElement(Te.Z,{key:Ke,onClick:()=>rt(Wt),className:Fe.Z.diamond},Ce.createElement(ye.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))}],ft=()=>{var lt=document.createElement("div");lt.innerHTML=Le.current.getValue();var nt=lt.innerText;return tt&&tt(nt),nt};return(0,ae.useImperativeHandle)(_e,()=>({getData:ft})),Ce.createElement("div",{className:Fe.Z.mathWrap},Ce.createElement(Re.default,{defaultActiveKey:"1",items:ct}),Ce.createElement("math-field",{locale:"zh_cn",className:Fe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Le,style:{width:800,marginTop:30,fontSize:18}},st||""),ve&&Ce.createElement("div",{className:Fe.Z.button},Ce.createElement(me.ZP,{size:"large",onClick:ft,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ft.Z=fe},49494:function(At,Ft,he){"use strict";he.d(Ft,{z:function(){return ut},Z:function(){return pe}});var ae=he(59301),$e=he(14566),Te=he(6767),Re=he(62957),me=he(99571),ye=he(85386),Fe=he(5930),Ze=Object.defineProperty,Ce=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,ve=(le,xe,Ne)=>xe in le?Ze(le,xe,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):le[xe]=Ne,st=(le,xe)=>{for(var Ne in xe||(xe={}))fe.call(xe,Ne)&&ve(le,Ne,xe[Ne]);if(Ce)for(var Ne of Ce(xe))tt.call(xe,Ne)&&ve(le,Ne,xe[Ne]);return le},_e=(le,xe,Ne)=>new Promise((Xe,be)=>{var ze=Ue=>{try{dt(Ne.next(Ue))}catch(qe){be(qe)}},Ie=Ue=>{try{dt(Ne.throw(Ue))}catch(qe){be(qe)}},dt=Ue=>Ue.done?Xe(Ue.value):Promise.resolve(Ue.value).then(ze,Ie);dt((Ne=Ne.apply(le,xe)).next())});const Le="\u3000\u3000";function Me(le){var xe=["Bytes","KB","MB","GB","TB"];if(le==0)return"0 Byte";var Ne=parseInt(""+Math.floor(Math.log(le)/Math.log(1024)),10);return(le/Math.pow(1024,Ne)).toFixed(1)+" "+xe[Ne]}var De=({value:le=[],action:xe,onChange:Ne,className:Xe,maxSize:be=150,title:ze="\u6587\u4EF6\u4E0A\u4F20",accept:Ie=null})=>{const dt={multiple:!1,fileList:le,accept:Ie,withCredentials:!0,beforeUpload:qe=>qe.size/1024/1024<be?!0:(message.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${be}MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20`),Promise.reject()),action:`${ENV.API_SERVER}/api/attachments.json`,onChange(qe){var ke,et,it,oe;let ee=[...qe.fileList];if(ee=ee.map(z=>(z.name.indexOf(Le)===-1&&(z.name=`${z.name}${Le}${Me(z.size)}`),st({},z))),qe.file.status==="done"&&((et=(ke=qe.file)==null?void 0:ke.response)==null?void 0:et.status)===-1){message.error((oe=(it=qe.file)==null?void 0:it.response)==null?void 0:oe.message),Ne([]);return}Ne(ee)},onRemove:qe=>_e(void 0,null,function*(){const ke=qe.size/1024/1024;return qe.status==="uploading"?!0:ke<be&&(qe.response?qe.response.id:qe.uid)?yield removeAttachment(qe.response?qe.response.id:qe.id):!0})};function Ue(qe){qe.preventDefault(),qe.stopPropagation()}return React.createElement("div",{className:`single-upload ${Xe||""}`},React.createElement(Upload,st({},dt),React.createElement(Button,{type:"primary",title:le.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:le.length>0,ghost:!0},ze),React.createElement("span",{onClick:Ue,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",be,"M)"," ")))},rt=he(61481),ct=he(89392),ft=Object.defineProperty,lt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,ot=(le,xe,Ne)=>xe in le?ft(le,xe,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):le[xe]=Ne,Wt=(le,xe)=>{for(var Ne in xe||(xe={}))nt.call(xe,Ne)&&ot(le,Ne,xe[Ne]);if(lt)for(var Ne of lt(xe))at.call(xe,Ne)&&ot(le,Ne,xe[Ne]);return le};const Ke=le=>React.createElement("svg",Wt({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},le),React.createElement("title",null,"\u5F62\u72B6"),React.createElement("path",{d:"M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z",fill:"#3061D0",fillRule:"nonzero"}));var We="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",vt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Oe=(le,xe,Ne)=>xe in le?vt(le,xe,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):le[xe]=Ne,mt=(le,xe)=>{for(var Ne in xe||(xe={}))Ge.call(xe,Ne)&&Oe(le,Ne,xe[Ne]);if(Ae)for(var Ne of Ae(xe))Ee.call(xe,Ne)&&Oe(le,Ne,xe[Ne]);return le},Ye=(le,xe,Ne)=>new Promise((Xe,be)=>{var ze=Ue=>{try{dt(Ne.next(Ue))}catch(qe){be(qe)}},Ie=Ue=>{try{dt(Ne.throw(Ue))}catch(qe){be(qe)}},dt=Ue=>Ue.done?Xe(Ue.value):Promise.resolve(Ue.value).then(ze,Ie);dt((Ne=Ne.apply(le,xe)).next())});const{Dragger:Qe}=$e.default;function ut(le){let xe=[];return le&&le.length>0&&(xe=le.map(Ne=>({uid:Ne.id,id:Ne.id,name:Ne.title+Le+Ne.filesize,url:Ne.url,filesize:Ne.filesize,status:"done",response:{id:Ne.id}}))),xe}var pe=({value:le,onChange:xe,action:Ne,data:Xe,className:be,maxSize:ze=150,title:Ie="\u4E0A\u4F20\u9644\u4EF6",showRemoveModal:dt=!1,accept:Ue="",additionalText:qe,isDragger:ke,number:et=1e3,aloneClear:it=!1,realTimeRemove:oe=!0,uploadText:ee,setFileProgress:z,showFileProgress:re})=>{const[ue,ne]=(0,ae.useState)(!1);let[ge,je]=(0,ae.useState)(le||[]),[Dt,St]=(0,ae.useState)(1);(0,ae.useEffect)(()=>{le&&(Dt===1&&je([...le]),St(2),et===(le==null?void 0:le.length)&&ne(!0))},[le]);const yt=()=>{setTimeout(()=>{ge.pop(),je([...ge])},500)};re&&z(ge.some(Lt=>Lt.status==="uploading"));const xt={multiple:!0,disabled:ue,accept:Ue,withCredentials:!0,fileList:ge,beforeUpload:(Lt,kt)=>{const Rt=Lt.size/1024/1024;return ge.concat(kt).length>et?(ge.pop(),je([...ge]),Te.ZP.error(`\u6700\u591A\u53EA\u80FD\u4E0A\u4F20${et}\u4E2A\u6587\u4EF6`),it?Promise.reject():(yt(),!1)):Rt<ze?!0:(Te.ZP.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${ze}MB).`),it?Promise.reject():(yt(),!1))},data:Xe,action:Ne||`${ye.Z.API_SERVER}/api/attachments.json`,onChange(Lt){var kt,Rt,Mt,rn;if(Lt.file.status==="removed"?ge=Lt.fileList:ge=(0,ct.uniqBy)([...Lt.fileList,...ge],"uid"),Lt.file.status==="done"&&((Rt=(kt=Lt.file)==null?void 0:kt.response)==null?void 0:Rt.status)===-1){Te.ZP.error((rn=(Mt=Lt.file)==null?void 0:Mt.response)==null?void 0:rn.message);return}ge.length>=et?ne(!0):ne(!1),je([...ge]),ge=ge.map(Ot=>{var Jt,ht;return(Jt=Ot==null?void 0:Ot.response)!=null&&Jt.id&&(Ot.url=(ht=Ot==null?void 0:Ot.response)==null?void 0:ht.url),Ot.name.indexOf(Le)===-1&&(Ot.name=`${Ot.name}${Le}${Me(Ot.size)}`),mt({},Ot)}),console.log("info:",Lt,ge),xe(ge)},onRemove:Lt=>Ye(void 0,null,function*(){if(!oe)return!0;const kt=()=>Ye(void 0,null,function*(){if(Lt.response?Lt.response.id:Lt.id){let Mt=yield(0,Fe.JZ)(Lt.response?Lt.response.id:Lt.uid);return Promise.resolve(Mt)}else return!0});return dt?new Promise((Rt,Mt)=>{Re.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ae.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:()=>Ye(void 0,null,function*(){const rn=yield kt();Te.ZP.success("\u5220\u9664\u6210\u529F"),Rt(!0)}),onCancel:()=>Rt(!1)})}):yield kt()})};function Nt(Lt){Lt.preventDefault(),Lt.stopPropagation()}return ae.createElement("div",{className:`multi-upload ${be||""}`},ke&&ae.createElement(Qe,mt({},xt),ae.createElement("p",{className:"ant-upload-drag-icon"},ae.createElement(rt.Z,null)),ae.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",ae.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",ze,"MB)"," "),qe),!ke&&ae.createElement($e.default,mt({},xt),ae.createElement(me.ZP,{disabled:ue,className:"upload_button"},ae.createElement("img",{className:"aBtn_img",src:We}),Ie),ae.createElement("span",{onClick:Nt,className:"upload_text"},ee||`(\u5355\u4E2A\u6587\u4EF6\u6700\u5927${ze}MB)`)))}},62556:function(At,Ft,he){"use strict";var ae=he(59301),$e=he(93314),Te=he(99571),Re=Object.defineProperty,me=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,fe=(_e,Le,Me)=>Le in _e?Re(_e,Le,{enumerable:!0,configurable:!0,writable:!0,value:Me}):_e[Le]=Me,tt=(_e,Le)=>{for(var Me in Le||(Le={}))Ze.call(Le,Me)&&fe(_e,Me,Le[Me]);if(Fe)for(var Me of Fe(Le))Ce.call(Le,Me)&&fe(_e,Me,Le[Me]);return _e},ve=(_e,Le)=>me(_e,ye(Le));const st=({img:_e,buttonProps:Le={},styles:Me={},customText:De,ButtonText:rt,ButtonClick:ct,Buttonclass:ft,ButtonTwo:lt,imgStyles:nt,loading:at=!1,className:ot=""})=>ae.createElement("section",{className:`tc animated fadeIn ${ot}`,style:tt({color:"#999",margin:"100px auto",visibility:at?"hidden":"visible"},Me)},ae.createElement("img",{src:_e||$e,style:ve(tt({},nt),{pointerEvents:"none",userSelect:"none"})}),ae.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),rt&&ae.createElement(Te.ZP,tt({className:ft,onClick:ct},Le),rt),lt&<);Ft.Z=st},33859:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return ft}});var ae=he(59301),$e={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Te=he(99571),Re=he(70557),me=he(71775),ye=he(25399),Fe=he(94601),Ze=he(39598),Ce=he(62556),fe=he(85386),tt=he(40976),ve=he(59301),st=Object.defineProperty,_e=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,De=(lt,nt,at)=>nt in lt?st(lt,nt,{enumerable:!0,configurable:!0,writable:!0,value:at}):lt[nt]=at,rt=(lt,nt)=>{for(var at in nt||(nt={}))Le.call(nt,at)&&De(lt,at,nt[at]);if(_e)for(var at of _e(nt))Me.call(nt,at)&&De(lt,at,nt[at]);return lt},ct=(lt,nt,at)=>new Promise((ot,Wt)=>{var Ke=Ae=>{try{vt(at.next(Ae))}catch(Ge){Wt(Ge)}},We=Ae=>{try{vt(at.throw(Ae))}catch(Ge){Wt(Ge)}},vt=Ae=>Ae.done?ot(Ae.value):Promise.resolve(Ae.value).then(Ke,We);vt((at=at.apply(lt,nt)).next())}),ft=({editOffice:lt="view",data:nt,issaver:at,onSaver:ot,theme:Wt,type:Ke,filename:We,monacoEditor:vt,className:Ae,style:Ge,close:Ee,onClose:Oe,hasMask:mt,disabledDownload:Ye,onImgDimensions:Qe,showNodata:ut,recordInfo:pe})=>{const[le,xe]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ne,Xe]=(0,ae.useState)(""),[be,ze]=(0,ae.useState)(),Ie=window.ENV==="build"?"/react/build":"",dt=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,qe=10*(1024*1024),ke=(0,ae.useRef)();nt!=null&&nt.startsWith("/api")&&Ke!=="txt"&&(nt=fe.Z.API_SERVER+nt);const et=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();We&&vt&&(vt.filename=We),(0,ae.useEffect)(()=>{var re,ue;const ne=(ue=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:ue.split(";");ne==null||ne.map(ge=>{let je=ge.split("=");je[0]==="_educoder_session"&&Xe(je[1])})},[]),(0,ae.useEffect)(()=>{Ke==="office"&&(nt.indexOf("bigfilescdn.")>-1||nt.indexOf("bigfiles1")>-1?ze({url:nt,fileType:et(nt),model:nt.indexOf("model=edit")?"edit":"view"}):oe())},[Ke,nt]);function it(re){return ct(this,null,function*(){re.data.type==="pdfdata"&&(ot(re.data.data),window.removeEventListener("message",it,!1)),console.log("mess---:",re.data)})}const oe=()=>ct(void 0,null,function*(){console.log("data:",nt);let re=nt;nt.startsWith("http")||(re=location.origin+re);let ue=new URL(re).pathname.split("/").pop();const ne=yield(0,Ze.gJ)({attachment_id:ue});ne.url=dt+ne.url,ze(ne)}),ee=()=>{if(nt.startsWith("http")||nt.startsWith("blob:")){z();return}(0,Fe.Sv)(We||"educoder",nt,We)},z=()=>{pe&&(0,tt.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Fe.Nd)(We||"educoder",decodeURIComponent(nt))};return ve.createElement("div",{style:rt({},Ge||{}),className:`${mt&&$e.bgBlack} ${Ke?$e.wrp:"hide"}`},Ee&&ve.createElement("div",{className:$e.close,ref:ke},!!Qe&&ve.createElement(ye.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ke.current},ve.createElement("span",{onClick:()=>{Oe(),Qe()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Ye&&ve.createElement(ye.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ke.current},ve.createElement("span",{onClick:z},ve.createElement("i",{className:"icon-quxiaozhiding"}))),at&&ve.createElement(ye.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ke.current},ve.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",it,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(ye.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ke.current},ve.createElement("span",{className:"",onClick:()=>{Oe()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${$e[Ae]} ${Ae} ${$e.monaco} ${Ke==="txt"?"show":"hide"}`},Ke==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(me.ZP,rt({},vt)))),Ke==="audio"&&ve.createElement("audio",{src:`${(nt==null?void 0:nt.indexOf("http://"))>-1||(nt==null?void 0:nt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${nt}`,autoPlay:!0}),Ke==="video"&&ve.createElement(ve.Fragment,null,(nt==null?void 0:nt.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${nt}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${nt}`,autoPlay:!0})),Ke==="office"&&be&&ve.createElement("iframe",{src:`${Ie}/office.html?key=${be.key}&url=${btoa(be.url)}&callbackUrl=${dt+(be.callbackUrl||"")}&fileType=${be.fileType}&title=${be.title||""}&model=${lt}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!Ye}`}),Ke==="html"&&ve.createElement("iframe",{src:nt+"&disposition=inline"}),Ke==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${Ie}/js/pdfview/index.html?filename=${We||"educoder.pdf"}&url=${encodeURIComponent(nt)}&disabledDownload=${!!Ye}&model=${lt}`}),Ke==="image"&&ve.createElement("img",{src:`${(nt==null?void 0:nt.indexOf("http://"))>-1||(nt==null?void 0:nt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${nt}`}),(Ke==="other"||Ke==="download")&&ve.createElement(ve.Fragment,null,ut?ve.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(Te.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ee,disabled:Ye},"\u4E0B\u8F7D")}):ve.createElement(Te.ZP,{type:"primary",size:"middle",onClick:ee,disabled:Ye},ve.createElement(Re.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ke==="flowChart"&&ve.createElement("div",{className:"embed"},ve.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${nt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},74776:function(At,Ft,he){"use strict";he.d(Ft,{z:function(){return vt},Z:function(){return Ae}});var ae=he(59301),$e=he(73958),Te=he(42684),Re=he(64018),me=he(44523),ye=he(85386),Fe=he(94601),Ze=he(15342),Ce=he(77736),fe=he(99571),tt=he(1012),ve=he(33859),st=he(59301),Le=({html:Ge})=>{const Ee=(0,ae.useRef)(null),Oe=(0,ae.useRef)(null),mt=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,ae.useEffect)(()=>{const Ye=Ee.current.attachShadow({mode:"open"});Oe.current=document.createElement("div"),Oe.current.className="markdown-body",Oe.current.innerHTML=Ge,Ye.appendChild(Oe.current);const Qe=document.createElement("style");return Qe.textContent=mt,Ye.appendChild(Qe),()=>{Ye.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Oe.current&&(Oe.current.innerHTML=Ge)},[Ge]),st.createElement("div",{ref:Ee})};function Me(Ge){const Ee=["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"],Oe=new RegExp(`\\b(${Ee.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ge.replace(Oe,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},rt=Object.defineProperty,ct=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,nt=(Ge,Ee,Oe)=>Ee in Ge?rt(Ge,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Ge[Ee]=Oe,at=(Ge,Ee)=>{for(var Oe in Ee||(Ee={}))ft.call(Ee,Oe)&&nt(Ge,Oe,Ee[Oe]);if(ct)for(var Oe of ct(Ee))lt.call(Ee,Oe)&&nt(Ge,Oe,Ee[Oe]);return Ge};const ot="@\u2581\u2581@",Wt="@\u2581@",Ke=/<pre[^>]*>/g;function We(Ge){let Ee=document.createElement("div");return Ee.innerHTML=Ge,Ee.childNodes.length===0?"":Ee.childNodes[0].nodeValue}const vt=(Ge,Ee)=>{Ge=Ge||"";const Oe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,mt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Qe=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ee?Ge.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Oe,(ut,pe,le,xe,Ne,Xe,be)=>{const ze=pe||xe||Xe,Ie=le||Ne||be||"?";return ye.Z.API_SERVER+"/api/attachments/"+ze+Ie+"&t="+(0,Fe.Jn)(ze,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ge=Ge.replace(Qe,(ut,pe,le,xe,Ne,Xe,be)=>{const ze=pe||xe||Xe,Ie=le||Ne||be||"?";return ye.Z.API_SERVER+"/attachments/download/"+ze+Ie+"&t="+(0,Fe.Jn)(ze,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replace(Oe,(ut,pe,le,xe,Ne,Xe,be)=>{const ze=pe||xe||Xe,Ie=le||Ne||be||"?";return ye.Z.API_SERVER+"/api/attachments/"+ze+Ie+"&t="+(0,Fe.Jn)(ze,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replace(mt,(ut,pe,le,xe,Ne)=>{const Xe=pe||xe,be=le||Ne||"";return'"'+ye.Z.API_SERVER+"/api/attachments/"+Xe+be+Xe+be+"&t="+(0,Fe.Jn)(Xe,Date.now())}).replace(Ye,(ut,pe,le,xe,Ne)=>{const Xe=pe||xe,be=le||Ne||"";return"("+ye.Z.API_SERVER+"/files/uploads/"+Xe+be+Xe+be+"&t="+(0,Fe.Jn)(Xe,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),Ge)};var Ae=({value:Ge="",edit:Ee=!1,className:Oe,showTextOnly:mt,showLines:Ye,style:Qe={},stylesPrev:ut={},highlightKeywords:pe,showProgramFill:le,isProgramFill:xe,disabledFill:Ne=!1,programFillValue:Xe,openEditor:be=()=>{},onFillChange:ze=Ue=>{},onFillBlur:Ie=()=>{},onFillFocus:dt=()=>{}})=>{let Ue=Me(String(Ge||""));const qe=(0,ae.useRef)(),ke=(0,ae.useRef)(),[et,it]=(0,ae.useState)(""),[oe,ee]=(0,ae.useState)("office"),[z,re]=(0,ae.useState)([]),ue=(0,ae.useRef)("a"+(0,tt.Z)()),ne={},ge=ht=>/<style[\s\S]*?>/i.test(ht||""),je=(ht,cn,Ht)=>{const Ut=document.createElement(ht===Wt?"input":"textarea");Ut.style.width="100%",Ut.style.height=ht===Wt?"40px":"151px",Ut.rows=5,Ut.spellcheck=!1,Ut.name="edu-program-fill",Ut.placeholder="\u8BF7\u8F93\u5165",Ut.dataset.id=cn;const sn=Object.keys(ne).length;return ne[sn]=Ut,`<span class="edu-program-fill-wrap ${ht===Wt?"":"show"}" style="width:${ht===Wt?"600px":"100%"}" title=${Ht||""}><span>${Ut.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Dt(ht){return ht=ht.replace(/!\[.*?\]\(.*?\)/g,""),ht=ht.replace(/\[.*?\]\(.*?\)/g,""),ht=ht.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ht=ht.replace(/<embed.*?>/g,""),ht=ht.replace(/<img.*?>/g,""),ht=ht.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ht=ht.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ht=ht.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ht=ht.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ht}const St=ht=>!mt&&ge(Ue)?ht:ht.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(cn,Ht){let Ut=Ht.replace(/(\n|\r)/g,"").split("}"),sn=[];return Ut.map(Pn=>{Pn!=""&&sn.push(`.${ue.current} ${Pn}`)}),`<style>${sn.join("}")}</style>`}),yt=(0,ae.useMemo)(()=>{try{const Ut=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,sn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Pn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,un=/\(\/attachments\/download\//g;Ue=Ue.replace(un,"("+ye.Z.API_SERVER+"/attachments/download/").replace(Ut,"("+ye.Z.API_SERVER+"/api/attachments/").replace(sn,'"'+ye.Z.API_SERVER+"/api/attachments/").replace(Pn,'"'+ye.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,`
|
|
`),qe.current.style.display="none"}catch(Ut){}if(le){let Ut=-1;return Ue=Ue.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(sn,Pn,un){var yn;return++Ut,je(sn,Ut,(yn=Xe==null?void 0:Xe[Ut])==null?void 0:yn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${St(Ue||"")}</pre>`}let ht=St(Ue);ht=(0,Te.ZP)(ht);const cn=(0,Te.ez)();Ue.match(/\[TOC\]/)&&(ht=ht.replace("<p>[TOC]</p>",(0,Te.Qv)()),(0,Te.Iy)()),ht=ht.replace(/(__special_katext_id_\d+__)/g,(Ut,sn)=>{const{type:Pn,expression:un}=cn[sn];return(0,Ze.renderToString)(We(un)||"",{displayMode:Pn==="block",throwOnError:!1,output:"html"})}),ht=ht.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Te.AL)();const Ht=document.createElement("div");if(Ht.innerHTML=ht,mt)return Ht.innerText;if(pe){const Ut=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return kt(Ht,Ut),Ht.innerHTML}return setTimeout(()=>rn(),500),Ht.innerHTML},[Ue,pe]);(0,ae.useEffect)(()=>{Rt.current&&Rt.current.querySelectorAll(["input","textarea"]).forEach(cn=>{cn.oninput=xt,cn.onblur=Nt,cn.onfocus=Lt})},[z]),(0,ae.useEffect)(()=>{var ht,cn,Ht,Ut,sn;if(Xe!=null&&Xe.length)try{const Pn=Rt.current.querySelectorAll(".edu-program-fill-score"),un=Rt.current.querySelectorAll('[name="edu-program-fill"]');for(const[yn,tr]of un.entries())tr.value=((ht=Xe==null?void 0:Xe[yn])==null?void 0:ht.value)||"",((cn=Xe==null?void 0:Xe[yn])==null?void 0:cn.type)==="warning"?tr.className="program-fill-warning":((Ht=Xe==null?void 0:Xe[yn])==null?void 0:Ht.type)==="success"?tr.className="program-fill-success":tr.className="";for(const[yn,tr]of Pn.entries())tr.innerHTML=(Ut=Xe==null?void 0:Xe[yn])!=null&&Ut.score?`${(sn=Xe==null?void 0:Xe[yn])==null?void 0:sn.score}\u5206`:"";re(Xe)}catch(Pn){console.log(Pn,"error")}},[Xe]);const xt=ht=>{z[ht.target.dataset.id]=z[ht.target.dataset.id]||{},z[ht.target.dataset.id].value=ht.target.value,re([...z]),ze(z,ht.target.dataset.id)},Nt=ht=>{z[ht.target.dataset.id]=z[ht.target.dataset.id]||{},z[ht.target.dataset.id].value=ht.target.value,re([...z]),Ie(z,ht.target.dataset.id)},Lt=ht=>{z[ht.target.dataset.id]=z[ht.target.dataset.id]||{},z[ht.target.dataset.id].value=ht.target.value,re([...z]),dt(z,ht.target.dataset.id)};function kt(ht,cn){return ht.childNodes.forEach(Ht=>{var Ut;if(Ht.childNodes.length>0)kt(Ht,cn);else if(Ht.nodeName!=="IMG")if(Ht.innerHTML)Ht.innerHTML=(Ut=Ht.innerHTML)==null?void 0:Ut.replace(new RegExp(cn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const sn=document.createElement("span");sn.innerHTML=Ht.textContent.replace(new RegExp(cn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ht.replaceWith(sn)}})}const Rt=(0,ae.useRef)();Te.jb.WebkitLineClamp=Ye,Ye&&(Qe=at(at({},Qe),Te.jb));function Mt(ht){let cn=ht.target;if(cn.tagName.toUpperCase()==="A"){let Ht=cn.getAttribute("href");if(Ht.indexOf("office")>-1)ht.preventDefault(),it(Ht),ee("office");else if(Ht.indexOf("application/pdf")>-1)ht.preventDefault(),it(Ht),ee("pdf");else if(Ht.indexOf("text/html")>-1)ht.preventDefault(),it(Ht),ee("html");else if(Ht.startsWith("#")){ht.preventDefault();let Ut=document.getElementById(Ht.replace("#",""));Ut&&Ut.scrollIntoView(!0)}}}const rn=()=>{var ht;const cn=(ht=Rt.current)==null?void 0:ht.querySelectorAll("video");cn==null||cn.forEach(Ht=>{if(Ht.oncontextmenu=()=>!1,Ht.src.indexOf(".m3u8")>-1&&!Ht.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var Ut=new me.ZP;Ut.loadSource(Ht.src),Ut.attachMedia(Ht)}}})};(0,ae.useEffect)(()=>{if(Rt.current&&yt&&yt.match(Ke)&&window.PR.prettyPrint(),Rt.current)return Rt.current.addEventListener("click",Mt),()=>{var ht;(ht=Rt.current)==null||ht.removeEventListener("click",Mt),(0,Te.AL)(),(0,Te.Iy)()}},[yt,Rt.current,Mt]);const Ot=ht=>{ht.target.nodeName==="IMG"&&ht.target.className.indexOf("draw-flowchart")>-1?(qe.current.style.zIndex=1,qe.current.style.display="flex",qe.current.style.width=ht.target.clientWidth+"px",qe.current.style.height=ht.target.clientHeight+"px",qe.current.style.top=ht.target.offsetTop+"px",qe.current.style.left=ht.target.offsetLeft+"px",ht.target.id&&(ke.current=ht.target.id)):qe.current.style.display="none"},Jt=()=>{qe.current.style.display="none"};return(0,ae.useEffect)(()=>{var ht;const cn=Ht=>{Ht.preventDefault(),Ht.clipboardData.setData("text",window.getSelection().toString())};return(ht=Rt.current)==null||ht.addEventListener("copy",cn),()=>{var Ht;(Ht=Rt.current)==null||Ht.removeEventListener("copy",cn)}},[Rt.current]),ae.createElement("div",{style:{position:"relative"},onMouseLeave:Jt},mt&&ae.createElement("div",{ref:Rt,className:`${De.mdBody} `},yt),!mt&&!ge(yt)&&ae.createElement("div",{ref:Rt,style:at({},Qe),onMouseOver:Ot,className:`${Oe||""} ${Ne?"disabled-fill":""} markdown-body ${De.mdBody} ${ue.current}`,dangerouslySetInnerHTML:{__html:yt}}),!mt&&ge(yt)&&ae.createElement(Le,{html:yt}),ae.createElement("div",{ref:qe,className:`${De.button} ${Ee?"":De.previewFlowChart}`},ae.createElement(Ce.Z,null,ae.createElement(fe.ZP,{onClick:()=>{Ee?be(ke.current):(it(ke.current),ee("flowChart"))}},Ee?"\u7F16\u8F91":"\u9884\u89C8"))),ae.createElement(ve.Z,{close:!0,data:et,type:et!=null&&et.length?oe:"",style:at({},ut),onClose:()=>it("")}))}},57560:function(At,Ft,he){"use strict";he.d(Ft,{h:function(){return lt}});var ae=he(59301),$e=he(82326),Te=he(28284),Re=he(99571),me=he(89780),ye=he.n(me),Fe=he(78318),Ze=he(44084),Ce=Object.defineProperty,fe=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Le=(nt,at,ot)=>at in nt?Ce(nt,at,{enumerable:!0,configurable:!0,writable:!0,value:ot}):nt[at]=ot,Me=(nt,at)=>{for(var ot in at||(at={}))st.call(at,ot)&&Le(nt,ot,at[ot]);if(ve)for(var ot of ve(at))_e.call(at,ot)&&Le(nt,ot,at[ot]);return nt},De=(nt,at)=>fe(nt,tt(at));const rt=$e.default.Option,ct={labelCol:{span:4},wrapperCol:{span:20}},ft={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"]};Ft.Z=({callback:nt,onCancel:at})=>{const[ot,Wt]=(0,ae.useState)("python");function Ke(vt){Wt(ft[vt][1])}function We(vt){nt(vt)}return ae.createElement(Te.default,De(Me({},ct),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:We,style:{width:500}}),ae.createElement(Te.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ae.createElement($e.default,{getPopupContainer:vt=>vt.parentNode,onChange:Ke},Object.keys(ft).map(vt=>ae.createElement(rt,{key:vt,value:vt},ft[vt][0])))),ae.createElement(Te.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ae.createElement(lt,{mode:ot})),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Re.ZP,{type:"ghost",onClick:at},"\u53D6\u6D88")))};function lt({value:nt,onChange:at,mode:ot,options:Wt={}}){const Ke=(0,ae.useRef)(),[We,vt]=(0,ae.useState)();return(0,ae.useEffect)(()=>{if(We){let Ae=function(Ge){const Ee=Ge.getValue();at&&at(Ee)};return We.on("change",Ae),()=>{We.off("change",Ae)}}},[We,at]),(0,ae.useEffect)(()=>{We&&We.setOption("mode",ot)},[We,ot]),(0,ae.useEffect)(()=>{We&&(nt!==We.getValue()||nt==="")&&setTimeout(()=>{We.setValue(nt||"")},300)},[We,nt]),(0,ae.useEffect)(()=>{if(Ke.current&&!We){const Ae=ye().fromTextArea(Ke.current,Me({mode:ot,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Wt));vt(Ae)}},[Ke.current,We]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:Ke}))}},16984:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return Lr}});var ae=he(59301),$e=he(92123),Te=he(89780),Re=he.n(Te),me=he(76374),ye=he(78318),Fe=he(6313),Ze=he(25717),Ce=he(99498),fe=he(25419),tt=he(67549),ve=he(74776),st=({value:an="",className:fn,showTextOnly:bn,showLines:Mn,style:$n={}})=>{const or=(0,ae.useMemo)(()=>"",[an]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:or}}))},_e=Object.defineProperty,Le=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,ft=(an,fn,bn)=>fn in an?_e(an,fn,{enumerable:!0,configurable:!0,writable:!0,value:bn}):an[fn]=bn,lt=(an,fn)=>{for(var bn in fn||(fn={}))rt.call(fn,bn)&&ft(an,bn,fn[bn]);if(De)for(var bn of De(fn))ct.call(fn,bn)&&ft(an,bn,fn[bn]);return an},nt=(an,fn)=>Le(an,Me(fn));let at=[{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 ot({onActionCallback:an,title:fn,icon:bn,actionName:Mn,className:$n="",children:or}){function gr(){an(Mn)}return ae.createElement("a",{title:fn,className:$n,onClick:gr},ae.createElement("i",{className:`${bn}`}),or)}var Wt=({watch:an,showNullButton:fn,showNullProgramButton:bn,onActionCallback:Mn,fullScreen:$n,insertTemp:or,hidetoolBar:gr,extraUse:_n})=>{const In=[...at,{title:`${an?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${an?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ae.createElement("ul",{className:"markdown-toolbar-container"},!gr&&In.map((Dr,Zt)=>ae.createElement("li",{key:Zt},Dr.actionName?ae.createElement(ot,nt(lt({},Dr),{onActionCallback:Mn})):ae.createElement("span",{className:"v-line"}))),fn?ae.createElement("li",null,ae.createElement(ot,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Mn},ae.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,bn?ae.createElement(ae.Fragment,null,ae.createElement("li",null,ae.createElement(ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Mn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ae.createElement("li",null,ae.createElement(ot,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Mn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,or&&ae.createElement("li",null,ae.createElement(ot,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${or}`,onActionCallback:Mn},ae.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_n&&ae.createElement("li",null,_n),ae.createElement("li",{className:"btn-full-screen"},ae.createElement(ot,{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:Mn})))},Ke=he(74254),We=he(28284),vt=he(37568),Ae=he(99571),Ge=Object.defineProperty,Ee=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,ut=(an,fn,bn)=>fn in an?Ge(an,fn,{enumerable:!0,configurable:!0,writable:!0,value:bn}):an[fn]=bn,pe=(an,fn)=>{for(var bn in fn||(fn={}))Ye.call(fn,bn)&&ut(an,bn,fn[bn]);if(mt)for(var bn of mt(fn))Qe.call(fn,bn)&&ut(an,bn,fn[bn]);return an},le=(an,fn)=>Ee(an,Oe(fn));const xe={labelCol:{span:4},wrapperCol:{span:20}};var Ne=({callback:an,onCancel:fn})=>{function bn(Mn){an(Mn)}return ae.createElement(We.default,le(pe({},xe),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:bn,style:{width:500}}),ae.createElement(We.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ae.createElement(vt.default,null)),ae.createElement(We.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ae.createElement(vt.default,null)),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Ae.ZP,{type:"ghost",onClick:fn},"\u53D6\u6D88")))},Xe=he(57560),be=he(42307),ze=he(62957),Ie=he(77019),dt=he(40783),Ue=he(59301),qe=({callback:an,onCancel:fn})=>{const bn=document.createElement("canvas"),Mn=bn.getContext("2d");bn.width=1e3,bn.height=800,Mn.fillStyle="#ffffff",Mn.fillRect(0,0,bn.width,bn.height);const $n=bn.toDataURL("image/png");return Ue.createElement(ze.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ue.createElement(Ie.Z,{style:{height:"100vh"}},Ue.createElement(dt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:$n,visible:!0,title:String(Date.now())},onOk:or=>{an({src:or.url})},onClose:fn})))},ke=he(30641),et=he(5269),it=he(6767),oe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ee=he(59301),re=(0,ae.forwardRef)(({onCancel:an,editImgId:fn,callback:bn},Mn)=>{let $n=(0,ae.useRef)(),or=(0,ae.useRef)(),gr=(0,ae.useRef)(),_n=(0,ae.useRef)(!1);const In=(0,ae.useRef)(!1);console.log("ref:",Mn);const[Dr,Zt]=(0,ae.useState)(0),[pt,Yt]=(0,ae.useState)("100vh");return(0,ae.useEffect)(()=>{Zt(1)},[]),(0,ae.useImperativeHandle)(Mn,()=>({setHeight:Yt})),ee.createElement("div",{ref:In,className:"body-overflow-initial"},ee.createElement(ke.Z,{width:"100vw",height:pt,footer:null,closable:!0,placement:"bottom",open:!!Dr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${oe.drawerWrap}`,onClose:()=>{window.saveDrawData(En=>{bn({src:`/api/attachments/${En}`,id:En})})},title:ee.createElement(Ie.Z,{align:"middle"},ee.createElement(et.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(et.Z,{onClick:()=>{Yt(pt==="60px"?"100vh":"60px")}},ee.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ee.createElement(et.Z,{onClick:()=>{window.saveDrawData(En=>{if(En===null){it.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}it.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),bn({src:`/api/attachments/${En}`,id:En,disabledClose:!0})})}},ee.createElement(Ae.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ee.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${fn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:or})))}),ue=he(85386),ne=he(47889),ge=he(71051);const je=ne.ZP.Group,Dt={margin:"0 8px"};var St=({callback:an,onCancel:fn})=>{function bn(Mn){an(Mn)}return ae.createElement(We.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:bn},ae.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ae.createElement("span",{style:Dt},"\u5355\u5143\u683C\u6570\uFF1A"),ae.createElement("span",{style:Dt},"\u884C\u6570"),ae.createElement(We.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(ge.Z,null)),ae.createElement("span",{style:Dt},"\u5217\u6570"),ae.createElement(We.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(ge.Z,null))),ae.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ae.createElement("span",{style:Dt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ae.createElement(We.default.Item,{name:"align"},ae.createElement(je,null,ae.createElement(ne.ZP,{value:"default"},ae.createElement("i",{className:"fa fa-align-justify"})),ae.createElement(ne.ZP,{value:"left"},ae.createElement("i",{className:"fa fa-align-left"})),ae.createElement(ne.ZP,{value:"center"},ae.createElement("i",{className:"fa fa-align-center"})),ae.createElement(ne.ZP,{value:"right"},ae.createElement("i",{className:"fa fa-align-right"}))))),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Ae.ZP,{type:"ghost",onClick:fn},"\u53D6\u6D88")))},yt=he(71411),xt=he(93127),Nt=he.n(xt),kt=(0,ae.forwardRef)(({use3d:an,width:fn,height:bn,callback:Mn,showSaveButton:$n},or)=>{const gr=(0,ae.useRef)(),_n=(0,ae.useRef)(),[In,Dr]=(0,ae.useState)(!1),Zt=(0,ae.useRef)({id:gr,appName:"graphing",width:fn||1e3,height:bn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ae.useEffect)(()=>{_n.current=new(Nt())(Zt.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const pt=()=>{var Yt=window.ggbApplet.getPNGBase64(1,!0,72);return Mn&&Mn(Yt),Yt};return(0,ae.useEffect)(()=>{Zt.current.appName=In?"3D":"graphing",_n.current.inject("applet_container")},[In]),(0,ae.useEffect)(()=>{Dr(an)},[an]),(0,ae.useImperativeHandle)(or,()=>({getImgData:pt})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:gr}),ae.createElement(Ie.Z,{align:"middle"},ae.createElement(et.Z,{flex:1},ae.createElement(yt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:In,onChange:Yt=>Dr(Yt)})),ae.createElement(et.Z,null,ae.createElement(Ae.ZP,{size:"large",onClick:pt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Rt=he(57765);const Mt="link",rn="upload-image",Ot="add-flowchart",Jt="draw-image",ht="add-flowchart",cn="code-block",Ht="add-table",Ut="------------",sn={default:Ut,left:`:${Ut}`,center:`:${Ut}:`,right:`${Ut}:`};var Pn=he(61346),un=he(94601);function yn(){}let tr=0;const Gn=1e4,Xr="\u2581",jr="@\u2581\u2581@",xr="@\u2581@",mr=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,On=["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 ir(an){return/^\d+$/.test(an)?`${an}px`:an}const Fn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",nr={[Fn+"-B"]:"bold",[Fn+"-I"]:"italic"},Vn={[Mt]:"\u6DFB\u52A0\u94FE\u63A5",[cn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[rn]:"\u6DFB\u52A0\u56FE\u7247",[Jt]:"\u6DFB\u52A0\u753B\u56FE",[Ot]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ht]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Lr=({defaultValue:an="",onChange:fn,width:bn="100%",height:Mn=400,miniToolbar:$n=!1,isFocus:or=!1,watch:gr,insertTemp:_n,mode:In="markdown",id:Dr="markdown-editor-id",showResizeBar:Zt=!1,noStorage:pt=!1,showNullButton:Yt=!1,showNullProgramButton:En=!1,hidetoolBar:jn=!1,fullScreen:Pe=!1,onBlur:Be,onCMBeforeChange:Tt,onFullScreen:bt,className:He="",disablePaste:wt=!1,disabled:Vt=!1,disabledFill:tn=!1,placeholder:on="",values:_t="",extraUse:Kt,onAddBlank:Et})=>{const[gt,Xt]=(0,ae.useState)(null),[pn,vn]=(0,ae.useState)(an),[mn,Nn]=(0,ae.useState)(gr),[Kn,ar]=(0,ae.useState)(Pe),[Cn,Wn]=(0,ae.useState)(""),[Ln,sr]=(0,ae.useState)(0),[Or,er]=(0,ae.useState)(Mn),[wr,Cr]=(0,ae.useState)(!1),[fr,Yn]=(0,ae.useState)(0),[Ar,cr]=(0,ae.useState)(0),Xn=(0,ae.useRef)(),yr=(0,ae.useRef)(),Sr=(0,ae.useRef)(),lr=(0,ae.useRef)(),Un=(0,ae.useRef)(),zn=(0,ae.useRef)(),Mr=(0,$e.useDispatch)();(0,ae.useEffect)(()=>{const zt=window.scrollY||window.pageYOffset;vn(_t),gt==null||gt.setValue(_t),window.scrollTo(0,zt)},[_t]),(0,ae.useEffect)(()=>{bt==null||bt(Kn)},[Kn]),(0,ae.useEffect)(()=>{if(Xn.current){let zt=function(Qt,nn){var Sn;if(wt){nn.preventDefault();return}const Qn=nn.clipboardData;if(Qn){const Hn=Qn.types.toString(),dr=Qn.items;if(Hn==="Files"||Qn.types.indexOf("Files")>-1){if(nn.preventDefault(),In=="stex")return;try{let hr=dr[1];((Sn=dr[0])==null?void 0:Sn.kind)==="file"&&(hr=dr[0]);const pr=hr.getAsFile(),_r=pr.name.split(".").pop();(0,be.I)(pr,kr=>{var Rr,ei,Di;kr.id?((Rr=pr==null?void 0:pr.type)==null?void 0:Rr.indexOf("image"))>-1?Bt.replaceSelection(`<img width="100%" src="/api/attachments/${kr.id}?type=${kr.content_type})" alt="" />`):((ei=pr==null?void 0:pr.type)==null?void 0:ei.indexOf("video"))>-1?Bt.replaceSelection(`<video width="100%" controls src="/api/attachments/${kr.id}"></video>`):((Di=pr==null?void 0:pr.type)==null?void 0:Di.indexOf("pdf"))>-1?Bt.replaceSelection(`<a href="/api/attachments/${kr.id}?type=${pr.type}&disposition=inline" target="_blank">${pr.name}</a>`):On.includes(_r)?Bt.replaceSelection(`<a href="/api/attachments/${kr.id}?type=office&disposition=inline" target="_blank">${pr.name}</a>`):Bt.replaceSelection(`[${pr.name}](/api/attachments/${kr.id}?type=${kr.content_type})`):(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")})}catch(hr){it.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Bt=Re().fromTextArea(Xn.current,{mode:In,lineNumbers:!$n,lineWrapping:!0,value:an,autoCloseTags:!0,autoCloseBrackets:!0});return Bt.on("keyup",function(Qt,nn){nn.keyCode===8&&(Qt.getValue()==""?Bt.setOption("placeholder",on):Bt.setOption("placeholder",null))}),Bt.on("keydown",function(Qt,nn){if(nn.keyCode===8){var Sn=Jr(Qt);Sn&&nn.preventDefault()}}),or&&Bt.focus(),Bt.on("paste",zt),Vt&&Bt.on("beforeChange",function(Qt,nn){(nn.origin==="paste"||nn.origin==="+input")&&nn.cancel()}),Xt(Bt),()=>{Bt.off("paste",zt)}}},[]);const Gr=(0,ae.useCallback)(()=>{if(yr.current)try{}catch(zt){console.log(zt,"---- to set md editor body height")}},[Or,yr,Kn]);(0,ae.useEffect)(()=>{function zt(){let Bt=new me.Z(Qt=>{for(let nn of Qt)(nn.target.offsetHeight>0||nn.target.offsetWidth>0)&&(Gr(),gt.setSize("100%","100%"),gt.refresh())});return Bt.observe(Xn.current.parentElement),Bt}if(gt){const Bt=zt();return()=>{var Qt,nn;(Qt=Xn.current)!=null&&Qt.parentElement&&Bt.unobserve((nn=Xn.current)==null?void 0:nn.parentElement)}}},[gt,Gr]),(0,ae.useEffect)(()=>{if(gt){let zt=[];for(const[Bt,Qt]of Object.entries(nr)){let nn={[Bt]:()=>{br(Qt)}};zt.push(nn),gt.addKeyMap(nn)}return()=>{for(let Bt of zt)gt.removeKeyMap(Bt)}}},[gt]),(0,ae.useEffect)(()=>{Pe!==Kn&&ar(Pe)},[Pe]),(0,Pn.Z)(()=>{if(!pt&&Ln>0){let zt=new Date().getTime(),Bt=window.sessionStorage.getItem(Dr);zt>=Ln+Gn&&(!Bt||Bt!==pn)&&(window.sessionStorage.setItem(Dr,pn),Cr(!0))}},Gn),(0,ae.useEffect)(()=>{Nn(gr)},[gt,gr]),(0,ae.useEffect)(()=>{gt&&or&>.focus()},[gt,or]),(0,ae.useEffect)(()=>{if(mn&>){let zt=function(Qt){let nn=Qt.target;if(lr.current){let Sn=nn.scrollTop/nn.scrollHeight;lr.current.scrollTop=lr.current.scrollHeight*Sn}};const Bt=gt.getScrollerElement();return Bt.addEventListener("scroll",zt),()=>{Bt.removeEventListener("scroll",zt)}}},[gt,mn]),(0,ae.useEffect)(()=>{if(gt&&Tt){let zt=function(Bt,Qt){Tt(Bt,Qt)};return gt.on("beforeChange",zt),()=>{gt.off("beforeChange",zt)}}},[gt,Tt]),(0,ae.useEffect)(()=>{if(gt&&Be){let zt=function(){Be(gt.getValue())};return gt.on("blur",zt),()=>{gt.off("blur",zt)}}},[gt,Be]);function Jr(zt,Bt){var Qt=zt.getDoc(),nn=Qt.getCursor(),Sn=Qt.getLine(nn.line),Qn=Sn.charAt(nn.ch-1),Hn=Sn.lastIndexOf("@\u2581@",nn.ch),dr=Sn.lastIndexOf("@\u2581\u2581@",nn.ch),hr=Hn>dr?Hn:dr,pr=Hn>dr?3:4;if(jr.indexOf(Qn)===-1)return null;if(console.log("change1:",Bt,zt,Sn,nn,hr,Hn,dr,Qn),hr>=0&&nn.ch-hr<5){var _r=hr+pr;return Qt.replaceRange("",{line:nn.line,ch:hr},{line:nn.line,ch:_r}),{line:nn.line,ch:_r}}return null}(0,ae.useEffect)(()=>{if(gt){let zt=function(Bt,Qt){const nn=Bt.getValue();vn(nn),sr(new Date().getTime()),Bt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),fn&&(En?fn(nn,jt(nn)):fn(nn))};return gt.on("change",zt),()=>{gt.off("change",zt)}}},[gt,fn]),(0,ae.useEffect)(()=>{if(gt)if(an==null)gt.setValue(""),vn("");else{const zt=window.scrollY||window.pageYOffset;an!==gt.getValue()&&(gt.setValue(an),vn(an),gt.setCursor(Vt?1:gt.lineCount(),0),window.scrollTo(0,zt))}},[gt,an]);const br=(0,ae.useCallback)(zt=>{const Bt=gt.getCursor(),Qt=gt.getSelection();let nn=Qt.split(`
|
|
`);switch(zt){case"bold":return gt.replaceSelection("**"+Qt+"**"),Qt===""&>.setCursor(Bt.line,Bt.ch+2),gt.focus();case"italic":return gt.replaceSelection("*"+Qt+"*"),Qt===""&>.setCursor(Bt.line,Bt.ch+1),gt.focus();case"code":return gt.replaceSelection("`"+Qt+"`"),Qt===""&>.setCursor(Bt.line,Bt.ch+1),gt.focus();case"inline-latex":return(0,un.Ye)(Mr)?void 0:(Wn("inline-latex"),gt.focus());case"latex":return gt.replaceSelection("```latex\n"+Qt+"\n```"),gt.setCursor(Bt.line+1,Qt.length+1),gt.focus();case"line-break":return gt.replaceSelection(`<br/>
|
|
`),gt.focus();case"list-ul":return Qt===""?gt.replaceSelection("- "+Qt):gt.replaceSelection(nn.map(Sn=>Sn===""?"":`- ${Sn}`).join(`
|
|
`)),gt.focus();case"list-ol":return Qt===""?gt.replaceSelection("1. "+Qt):gt.replaceSelection(nn.map((Sn,Qn)=>Sn===""?"":`${Qn+1}. ${Sn}`).join(`
|
|
`)),gt.focus();case"add-null-ch":Et==null||Et();return;case"add-signal":return Qt===""&>.setCursor(Bt.line,Bt.ch),gt.replaceSelection(xr),gt.focus();case"add-multiple":return Qt===""&>.setCursor(Bt.line,Bt.ch),gt.replaceSelection(jr),gt.focus();case"inster-template-1":return Qt===""&>.setCursor(Bt.line,Bt.ch),gt.replaceSelection(mr),gt.focus();case"eraser":return gt.setValue(""),gt.focus();case"trigger-watch":return Nn(!mn),gt.focus();case"trigger-full-screen":return ar(!Kn),gt.focus();case Mt:Wn(Mt);return;case cn:Wn(cn);return;case rn:Wn(rn);return;case Jt:Wn(Jt);return;case"maths-latex":if((0,un.Ye)(Mr))return;Wn("maths-latex");return;case Ot:Un.current="",sessionStorage.removeItem("file_id"),Wn(Ot);return;case Ht:Wn(Ht);return;default:throw new Error}},[gt,mn,Kn]),Nr=(0,ae.useCallback)((zt,Bt)=>{var Qt,nn,Sn,Qn,Hn,dr;zt!=null&&zt.disabledClose||Wn("");const{src:hr,alt:pr,id:_r}=zt||{};switch(Cn){case Mt:const{title:Ni,link:xi}=zt;return gt.replaceSelection(`[${Ni}](${xi})`),gt.focus();case cn:const{language:vi,content:Xi}=zt;return gt.replaceSelection(["```"+vi,Xi,"```"].join(`
|
|
`)),gt.focus();case"maths-latex":for(var kr=atob(zt),Rr=new Uint8Array(kr.length),ei=0;ei<kr.length;ei++)Rr[ei]=kr.charCodeAt(ei);var Di=new Blob([Rr],{type:"image/png"});(0,be.I)(Di,mi=>{mi.id?gt.replaceSelection(``):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,un.Ye)(Mr))return;gt.replaceSelection("`$$"+zt+"$$`");break;case ht:if(!_r)return;gt.getValue().indexOf(hr)===-1?gt.replaceSelection(`<center><img id="${_r}" width="80%" src="${hr}" class="draw-flowchart" alt="${pr||""}" /></center>`):document.getElementById(_r).src=ue.Z.API_SERVER+hr+"?t="+Date.now();break;case rn:case Jt:const rr=Bt,to=(Sn=(nn=(Qt=rr==null?void 0:rr.name)==null?void 0:Qt.split("."))==null?void 0:nn.pop)==null?void 0:Sn.call(nn);return((Qn=rr==null?void 0:rr.type)==null?void 0:Qn.indexOf("image"))>-1||!(rr!=null&&rr.type)?rr!=null&&rr.align||rr!=null&&rr.width?gt.replaceSelection(`<p style="text-align:${rr.align||"initial"}"><img width="${rr.width?rr.width+"%":"initial"}" src="${hr}" alt="${pr||""}" /></p>`):gt.replaceSelection(`<img width="100%" src="${hr}" alt="${pr||""}" />`):((Hn=rr==null?void 0:rr.type)==null?void 0:Hn.indexOf("video"))>-1?gt.replaceSelection(`<video width="100%" controls src="${hr}"></video>`):((dr=rr==null?void 0:rr.type)==null?void 0:dr.indexOf("pdf"))>-1?gt.replaceSelection(`<a href="${hr}?type=${rr.type}&disposition=inline" target="_blank">${rr.name}</a>`):On.includes(to)?gt.replaceSelection(`<a href="${hr}?type=office&disposition=inline" target="_blank">${rr.name}</a>`):gt.replaceSelection(`[${rr.name}](${hr})`),gt.focus();case Ht:const{row:ti,col:Fi,align:ao}=zt;let Ji=`
|
|
`;for(let mi=0;mi<ti;mi++){let Ii=[],Wr=[];for(let _i=0;_i<Fi;_i++)mi===1&&Wr.push(sn[ao]),Ii.push(" ");mi===1&&(Ji+=`| ${Wr.join(" | ")} |
|
|
`),Ji+=`| ${Ii.join(Fi===1?"":" | ")} |
|
|
`}return gt.replaceSelection(Ji+`
|
|
`),gt.focus();default:throw new Error}},[gt,Cn]),Pr=(0,ae.useMemo)(()=>{switch(Cn){case Mt:return ae.createElement(Ne,{callback:Nr,onCancel:zr});case cn:return ae.createElement(Xe.Z,{callback:Nr,onCancel:zr});case rn:return ae.createElement(be.Z,{callback:Nr,onCancel:zr});case Ot:return ae.createElement(re,{editImgId:Un.current,callback:Nr,onCancel:zr});case Ht:return ae.createElement(St,{callback:Nr,onCancel:zr});case"maths-latex":return ae.createElement(kt,{showSaveButton:!0,callback:Nr});case"inline-latex":return ae.createElement(Rt.Z,{showSaveButton:!0,callback:Nr});default:return null}},[Cn]);function zr(){Wn("")}(0,ae.useEffect)(()=>{if(Sr.current){let zt=function(Hn){Sn=!0,Qn=Hn.pageY},Bt=function(){Sn=!1},Qt=function(Hn){if(Sn){let dr=Hn.pageY-Qn;dr<0&&(dr=0),dr>300&&(dr=300);let hr=Mn+dr+"px";er(hr)}},nn=Sr.current,Sn=!1,Qn=0;return nn.addEventListener("mousedown",zt),document.addEventListener("mousemove",Qt),document.addEventListener("mouseup",Bt),()=>{nn.removeEventListener("mousedown",zt),document.removeEventListener("mousemove",Qt),document.removeEventListener("mouseup",Bt)}}},[gt,Sr]),(0,ae.useEffect)(()=>{er(Mn)},[Mn]);const ii=ir(bn),Ir=ir(Or),Tn={width:ii,height:Ir},It=(0,ae.useMemo)(()=>{if(Ln){let zt=new Date(Ln),Bt=zt.getHours(),Qt=zt.getMinutes(),nn=zt.getSeconds();return Bt=Bt<10?"0"+Bt:Bt,Qt=Qt<10?"0"+Qt:Qt,nn=nn<10?"0"+nn:nn,`${Bt}:${Qt}:${nn}`}return 0},[Ln]),jt=zt=>{const Bt=[];if(En){let Qt=-1;zt=zt.replace(/(@▁▁@|@▁@)/g,function(nn,Sn,Qn){Bt.push({multiLine:nn!==xr})})}return Bt};function dn(){window.sessionStorage.removeItem(Dr),Cr(!1),sr(0)}function qt(){Cr(!1),sr(0),gt.setValue(window.sessionStorage.getItem(Dr))}(0,ae.useEffect)(()=>{Vn[Cn]&&Cn!==Jt&&Cn!==Ot&&setTimeout(()=>{const zt=document.getElementsByClassName("markdown-popup-form")[0],Bt=window.innerWidth/2-zt.offsetWidth/2,Qt=window.innerHeight/2-zt.offsetHeight/2;Yn(Bt),cr(Qt)},0)},[Cn]);const xn=zt=>{zt.preventDefault();const Bt=zt.clientX-fr,Qt=zt.clientY-Ar;document.body.onmousemove=nn=>{let Sn=nn.clientX-Bt,Qn=nn.clientY-Qt;const Hn=document.getElementsByClassName("markdown-popup-form")[0],dr=window.innerWidth-Hn.offsetWidth,hr=window.innerHeight-Hn.offsetHeight;Sn=Math.max(0,Math.min(Sn,dr)),Qn=Math.max(0,Math.min(Qn,hr)),Jn(nn.clientX,nn.clientY,Bt,Qt)&&(Yn(Sn),cr(Qn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Jn=(zt,Bt,Qt,nn)=>{const Sn=document.body.clientHeight,Qn=document.body.clientWidth;return zt<20&&Qt>zt||zt>Qn-20&&Qt<zt||Bt<20&&nn>Bt||Bt>Sn-20&&nn<Bt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ae.createElement(ae.Fragment,null,ae.createElement("div",{className:"markdown-editor-wrapper",ref:yr},ae.createElement("div",{className:`markdown-editor-container ${He} ${mn?"on-preview":""} ${$n?"mini":""} ${Kn?"full-screen":""}`,style:Tn},ae.createElement(Wt,{insertTemp:_n,watch:mn,fullScreen:Kn,showNullButton:Yt,showNullProgramButton:En,onActionCallback:br,hidetoolBar:jn,extraUse:Kt}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:Xn,placeholder:on})),mn?ae.createElement("div",{ref:lr,className:"preview-container"},In==="stex"&&ae.createElement(st,{value:pn}),In!=="stex"&&ae.createElement(ve.Z,{edit:!0,disabledFill:tn,showProgramFill:En,value:pn,openEditor:zt=>{var Bt;Un.current=zt,(Bt=zn.current)==null||Bt.setHeight("100vh"),setTimeout(()=>{Wn("add-flowchart")},150)}})):null))),Zt?ae.createElement("a",{ref:Sr,className:"editor-resize"}):null,Cn===Jt&&ae.createElement(qe,{callback:Nr,onCancel:zr}),Cn===Ot&&ae.createElement(re,{ref:zn,editImgId:Un.current,callback:Nr,onCancel:zr}),ae.createElement(Ke.Z,null,Vn[Cn]&&Cn!==Jt&&Cn!==Ot?ae.createElement(ze.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:fr,top:Ar},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:xn},Vn[Cn]),open:!0,onCancel:zr,footer:null,destroyOnClose:!0,width:Cn===Ot?"1200px":null,height:Cn===Ot?"80vh":null,className:"markdown-popup-form"},Pr):null))}},42307:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return at},I:function(){return Wt}});var ae=he(28284),$e=he(6767),Te=he(37568),Re=he(77736),me=he(71051),ye=he(47889),Fe=he(99571),Ze=he(8396),Ce=he(59301),fe=he(59301),tt=Object.defineProperty,ve=Object.defineProperties,st=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,De=(Ke,We,vt)=>We in Ke?tt(Ke,We,{enumerable:!0,configurable:!0,writable:!0,value:vt}):Ke[We]=vt,rt=(Ke,We)=>{for(var vt in We||(We={}))Le.call(We,vt)&&De(Ke,vt,We[vt]);if(_e)for(var vt of _e(We))Me.call(We,vt)&&De(Ke,vt,We[vt]);return Ke},ct=(Ke,We)=>ve(Ke,st(We));const{useForm:ft}=ae.default,lt={width:280,marginRight:10},nt={labelCol:{span:5},wrapperCol:{span:19}};var at=({callback:Ke,onCancel:We})=>{const[vt]=ft();let Ae=(0,Ce.useRef)();function Ge(mt){Ae.current.width=vt.getFieldValue("width"),Ae.current.align=vt.getFieldValue("align"),Ke(mt,Ae.current)}function Ee(mt,Ye){if(mt.status===-1){$e.ZP.error(mt.message);return}vt.setFieldsValue({src:`/api/attachments/${mt.id}`,type:Ye.type})}function Oe(mt){let Ye=mt.target.files[0];Ae.current=Ye,Wt(Ye,Ee)}return fe.createElement(ae.default,ct(rt({form:vt},nt),{className:"upload-image-panel",onFinish:Ge,style:{width:470,overflow:"hidden"}}),fe.createElement(ae.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(ae.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(Te.default,{style:lt})),fe.createElement(ot,{onFileChange:Oe}))),fe.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(Te.default,{style:{width:264}})),fe.createElement(ae.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(Re.Z,null,fe.createElement(ae.default.Item,{name:"width",style:{margin:0}},fe.createElement(me.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(ae.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(ye.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(ae.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:We},"\u53D6\u6D88"))))};function ot({onFileChange:Ke}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Ke}))}function Wt(Ke,We){if(!Ke)throw new String("\u6CA1\u6709\u6587\u4EF6");let vt=new FormData;vt.append("editormd-image-file",Ke),vt.append("file_param_name","editormd-image-file"),vt.append("byxhr","true");var Ae=new window.XMLHttpRequest;Ae.withCredentials=!0,Ae.addEventListener("load",function(Ge){We(JSON.parse(Ge.target.responseText),Ke)},!1),Ae.addEventListener("error",function(Ge){console.error(Ge)},!1),Ae.open("POST",`${Ze.KI}/api/attachments.json`),Ae.send(vt)}},74254:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return Te}});var ae=he(59301),$e=he(4676);class Te extends ae.Component{constructor(me){super(me);const ye=window.document;this.node=ye.createElement("div"),ye.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,$e.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},71775:function(At,Ft,he){"use strict";he.d(Ft,{SV:function(){return qe},ZP:function(){return Ue}});var ae=he(59301),$e=he(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"]},Re={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},me={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std",content:["using namespace std"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},ye={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 Ze=he(53184),Ce=he.n(Ze),fe=(ke,et,it)=>new Promise((oe,ee)=>{var z=ne=>{try{ue(it.next(ne))}catch(ge){ee(ge)}},re=ne=>{try{ue(it.throw(ne))}catch(ge){ee(ge)}},ue=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);ue((it=it.apply(ke,et)).next())});const tt={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"]}},ve=(ke,et,it,oe)=>{const ee=et.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:it.lineNumber,endColumn:it.column});return Array.from(new Set(ee.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:ke.languages.CompletionItemKind.Text,insertText:re,range:oe}))},st=(ke,et,it,oe)=>{ke.languages.registerCompletionItemProvider(et,{provideCompletionItems(ee,z){const re=ee.getWordUntilPosition(z),ue={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=ee.getLineContent(z.lineNumber).substring(re.startColumn-2,re.endColumn);return{suggestions:[...ve(ke,ee,z,ue),...it.map(je=>({label:je,kind:ke.languages.CompletionItemKind.Keyword,documentation:je,insertText:je,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ue})),...oe.map(je=>({label:je.label,kind:ke.languages.CompletionItemKind.Snippet,documentation:je.content,insertText:ne.startsWith("#")?je.content.replace(/#/,""):je.content,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ue}))]}}})};var _e=ke=>{tt.languages.forEach(et=>{ke.languages.registerDocumentFormattingEditProvider(et,{provideDocumentFormattingEdits(it){return fe(this,null,function*(){const oe=Ce()(it.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:it.getFullModelRange(),text:oe}]})}})}),st(ke,"java",Re.keywords,Re.quickKey),st(ke,"cpp",me.keywords,me.quickKey),st(ke,"c",Te.keywords,[]),st(ke,"python",ye.keywords,ye.quickKey),st(ke,"scala",Fe.keywords,Fe.quickKey)};const Le="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Me=Object.defineProperty,De=(ke,et,it)=>et in ke?Me(ke,et,{enumerable:!0,configurable:!0,writable:!0,value:it}):ke[et]=it,rt=(ke,et,it)=>De(ke,typeof et!="symbol"?et+"":et,it);const ct=class _l{constructor(et,it,oe){this.placeholder=et,this.editor=it,this.monaco=oe,it.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)}};rt(ct,"ID","editor.widget.placeholderHint");var lt=ct,nt=he(96236),at=he(6767),ot=he(25399),Wt=he(89392),Ke=he(29724),We=he(56102),vt=Object.defineProperty,Ae=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Ye=(ke,et,it)=>et in ke?vt(ke,et,{enumerable:!0,configurable:!0,writable:!0,value:it}):ke[et]=it,Qe=(ke,et)=>{for(var it in et||(et={}))Oe.call(et,it)&&Ye(ke,it,et[it]);if(Ee)for(var it of Ee(et))mt.call(et,it)&&Ye(ke,it,et[it]);return ke},ut=(ke,et)=>Ae(ke,Ge(et)),pe=(ke,et)=>{var it={};for(var oe in ke)Oe.call(ke,oe)&&et.indexOf(oe)<0&&(it[oe]=ke[oe]);if(ke!=null&&Ee)for(var oe of Ee(ke))et.indexOf(oe)<0&&mt.call(ke,oe)&&(it[oe]=ke[oe]);return it},le=(ke,et,it)=>new Promise((oe,ee)=>{var z=ne=>{try{ue(it.next(ne))}catch(ge){ee(ge)}},re=ne=>{try{ue(it.throw(ne))}catch(ge){ee(ge)}},ue=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);ue((it=it.apply(ke,et)).next())});function xe(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}function Ne(){}let Xe=!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 ze(ke=[]){let et=ke;if(Array.isArray(ke)){for(let it=0;it<ke.length;it++){let oe=be[ke[it]];if(oe)return oe}return et[0]}return be[et]||et}let Ie=null;const dt=()=>le(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ke){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ke)}});var Ue=ke=>{var et=ke,{width:it="100%",height:oe="100%",value:ee,language:z="javascript",style:re={},options:ue={},overrideServices:ne={},theme:ge="vs-dark",onEditBlur:je,isCopy:Dt=!1,onSave:St,autoHeight:yt=!1,forbidCopy:xt=!1,onChange:Nt=Ne,editorDidMount:Lt=Ne,onFocus:kt=Ne,onBreakPoint:Rt=Ne,breakPointValue:Mt=[],filename:rn="educoder.txt",errorLine:Ot,errorContent:Jt="",highlightLine:ht,openBreakPoint:cn=!1,placeholder:Ht="",showMiniMap:Ut=!0}=et,sn=pe(et,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Pn=(0,ae.useRef)(),un=(0,ae.useRef)({}),yn=(0,ae.useRef)(),tr=(0,ae.useRef)(),Gn=(0,ae.useRef)([]),Xr=(0,ae.useRef)(!1),jr=(0,ae.useRef)(),xr=(0,ae.useRef)(),mr=(0,ae.useRef)(!1),[On,ir]=(0,ae.useState)(!1);function Fr(){let Zt;return Pn.current&&(Zt=new $e.Z(pt=>{for(let Yt of pt)(Yt.target.offsetHeight>0||Yt.target.offsetWidth>0)&&un.current.instance.layout()}),Zt.observe(Pn.current)),Zt}function Fn(){at.ZP.warning({content:decodeURIComponent(Le),key:"monaco-editor-tip"})}const nr=()=>{let Zt=un.current.instance;if(ee!=null&&Zt&&On){const pt=Zt.getModel();pt&&ee!==pt.getValue()&&(Xe=!0,pt.setValue(ee),Zt.layout(),Xe=!1)}};(0,ae.useEffect)(()=>{const Zt=Ke.Z.subscribe("formatDocument",pt=>{var Yt;let En=un.current.instance;(Yt=En==null?void 0:En.getAction)==null||Yt.call(En,"editor.action.formatDocument").run()});return window.updateMonacoValue=pt=>{Nt(pt)},Zt},[]),(0,ae.useEffect)(()=>{var Zt;let pt=un.current.instance;tr.current&&clearTimeout(tr.current),tr.current=setTimeout(()=>{nr()},500),ee&&(ee!=null&&ee.length)&&((Zt=pt==null?void 0:pt.updateOptions)==null||Zt.call(pt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ee.split(/\r\n|\r|\n/g).length))+3,5)}))},[ee,On,un.current]),(0,ae.useEffect)(()=>{if(Ot&&un.current&&un.current.instance){let pt=un.current.instance;pt.changeViewZones(function(Yt){var En=document.createElement("div");En.style.padding="10px 20px",En.style.width="calc(100% - 20px)",En.className="my-error-line-wrp",En.innerHTML=Jt,Yt.addZone({afterLineNumber:Ot||11,heightInLines:3,domNode:En})});var Zt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};pt.addOverlayWidget(Zt),pt.revealPositionInCenter({lineNumber:20,column:1})}},[Ot,un.current,On]);const Vn=(Zt="",pt)=>{if(!Zt||Zt.trim()==="")return!0;const En=un.current.instance.getModel().getLineTokens(pt);let jn=!1;for(let Pe=0;Pe<2;Pe++)En.getStandardTokenType(Pe)===1&&(jn=!0);return jn};(0,ae.useEffect)(()=>{var Zt;const pt=(Zt=un.current)==null?void 0:Zt.instance;if(pt&&On&&xt){const Yt=pt.onDidBlurEditorWidget(()=>{mr.current=!1}),En=pt.onDidFocusEditorText(()=>{mr.current=!0});return()=>{Yt.dispose(),En.dispose()}}},[un.current,On,xt]),(0,ae.useEffect)(()=>{var Zt;if((Zt=un.current)!=null&&Zt.instance&&On&&cn){let pt=un.current.instance,Yt=pt.getModel();if(!Yt)return;(()=>{var _t;let Kt=[],Et=[];const gt=Yt.getAllDecorations();for(let pn of gt)pn.options.className==="highlighted-line"&&(Kt.push((_t=pn==null?void 0:pn.range)==null?void 0:_t.startLineNumber),Et.push(pn==null?void 0:pn.id));if(ht===Kt[0])return;Yt.deltaDecorations(Et,[]);const Xt=Yt.getLineCount();ht&&ht<=Xt&&(pt.deltaDecorations([],[{range:new Ie.Range(ht,1,ht,Yt.getLineMaxColumn(ht)),options:{isWholeLine:!0,className:"highlighted-line"}}]),pt.revealLineInCenter(ht))})();const jn=(_t=!1)=>{var Kt;let Et=[],gt=[];const Xt=Yt.getAllDecorations();for(let pn of Xt)pn.options.linesDecorationsClassName==="breakpoints-select"&&(Et.push((Kt=pn==null?void 0:pn.range)==null?void 0:Kt.startLineNumber),gt.push(pn==null?void 0:pn.id));if(_t)return{lines:Et,ids:gt};Rt(Et)},Pe=_t=>le(void 0,null,function*(){let Kt={range:new Ie.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Yt.deltaDecorations([],[Kt]),jn()}),Be=_t=>le(void 0,null,function*(){let Kt=[];const Et=pt.getLineDecorations(_t);for(let gt of Et)gt.options.linesDecorationsClassName==="breakpoints-select"&&Kt.push(gt.id);yield Yt.deltaDecorations(Kt,[]),jn()}),Tt=_t=>{let Kt=pt.getLineDecorations(_t);for(let Et of Kt)if(Et.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Wt.isEqual)(Mt,jn(!0).lines)){Yt.deltaDecorations(jn(!0).ids,[]);const _t=Mt.map(Kt=>({range:new Ie.Range(Kt,1,Kt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Yt.deltaDecorations([],_t)}const bt=pt.onDidChangeModelContent(_t=>{let Kt=pt.getPosition();if(Kt){let Et=Kt.lineNumber;clearTimeout(xr.current),xr.current=setTimeout(()=>{Vn(Yt.getLineContent(Et),Et)?Be(Et):Tt(Et)?(Be(Et),Pe(Et)):jn()},100)}}),He=pt.onMouseDown(_t=>{var Kt,Et,gt;if(_t.target.detail&&((gt=(Et=(Kt=_t.target)==null?void 0:Kt.element)==null?void 0:Et.className)!=null&>.includes("line-numbers"))){let Xt=_t.target.position.lineNumber;if(Vn(Yt.getLineContent(Xt),Xt))return;Tt(Xt)?Be(Xt):Pe(Xt)}}),wt=_t=>{let Kt={range:new Ie.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Gn.current=pt.deltaDecorations(Gn.current,[Kt])},Vt=()=>{Gn.current=pt.deltaDecorations(Gn.current,[])},tn=pt.onMouseMove(_t=>{var Kt,Et,gt;if(Vt(),_t.target.detail&&((gt=(Et=(Kt=_t.target)==null?void 0:Kt.element)==null?void 0:Et.className)!=null&>.includes("line-numbers"))){let Xt=_t.target.position.lineNumber;if(Vn(Yt.getLineContent(Xt),Xt))return;wt(Xt)}}),on=pt.onMouseLeave(()=>{Vt()});return()=>{bt.dispose(),He.dispose(),tn.dispose(),on.dispose()}}},[un.current,On,Mt,ht,cn,z]),(0,ae.useEffect)(()=>{var Zt;(Zt=un.current)!=null&&Zt.instance&&cn&&un.current.instance.setPosition({lineNumber:0,column:0})},[ht]);function Lr(){let Zt=un.current.instance;if(Zt){const pt=Zt.getSelection(),Yt=un.current.pastePos||{},En=new Ie.Range(Yt.startLineNumber||pt.endLineNumber,Yt.startColumn||pt.endColumn,Yt.endLineNumber||pt.endLineNumber,Yt.endColumn||pt.endColumn);setTimeout(()=>{Zt.executeEdits("",[{range:En,text:""}])},300)}}function an(Zt){(window.navigator.platform.match("Mac")?Zt.metaKey:Zt.ctrlKey)&&Zt.keyCode==83&&(Zt.preventDefault(),St())}const fn=()=>{if(yt&&un.current.instance){const Zt=un.current.instance.getContentHeight();In(Zt<oe?oe:Zt)}else In(oe)};function bn(Zt){var pt=document.createEvent("MouseEvents");pt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Zt.dispatchEvent(pt)}const Mn=Zt=>{if(!mr.current)return;const{keyCode:pt,ctrlKey:Yt,metaKey:En,target:jn,type:Pe}=Zt;return(Pe==="paste"||(pt===67||pt===86)&&(En||Yt))&&jn.nodeName==="TEXTAREA"&&(Fn(),Zt.preventDefault()),!1};function $n(Zt,pt){var Yt=window.URL||window.webkitURL||window,En=new Blob([pt]),jn=document.createElementNS("http://www.w3.org/1999/xhtml","a");jn.href=Yt.createObjectURL(En),jn.download=Zt,bn(jn)}(0,ae.useEffect)(()=>{fn()},[fn]),(0,ae.useEffect)(()=>{Pn.current&&!On&&Promise.all([he.e(8909),he.e(1196)]).then(he.bind(he,71448)).then(Zt=>{try{Ie=Zt,un.current.instance=Ie.editor.create(Pn.current,{value:ee,language:ze(z),theme:ge,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ut||!1}},ne);const pt=un.current.instance;let jn=[...nt.BH._menuItems].find(bt=>bt[0]._debugName=="EditorContext")[1],Pe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Be=(bt,He)=>{var wt,Vt;let tn=bt._first;do He.includes((Vt=(wt=tn.element)==null?void 0:wt.command)==null?void 0:Vt.id)&&bt._remove(tn);while(tn=tn.next)};if(Lt(pt,Ie),setTimeout(()=>{fn(),un.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{$n(rn||"educoder.txt",pt.getValue())}})},500),un.current.subscription=pt.onDidChangeModelContent(bt=>{Xr.current?clearTimeout(jr.current):(fn(),Nt(pt.getValue(),bt)),jr.current=setTimeout(()=>{Xr.current=!1},500)}),window.Monaco||_e(Ie,ze(z)),xt&&(Be(jn,Pe),Pn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Mn),window.removeEventListener("paste",Mn),window.addEventListener("keydown",Mn),window.addEventListener("paste",Mn)),window.Monaco=Ie,je&&pt.onDidBlurEditorWidget(()=>{je(pt.getValue())}),kt&&pt.onDidFocusEditorText(()=>{xt&&dt(),kt(pt.getValue())}),xt){dt();try{pt.onDidPaste(bt=>{const He=pt.getSelection(),wt=un.current.pastePos||{},Vt=new Ie.Range(wt.startLineNumber||He.endLineNumber,wt.startColumn||He.endColumn,wt.endLineNumber||He.endLineNumber,wt.endColumn||He.endColumn);pt.executeEdits("",[{range:bt.range,text:""}])})}catch(bt){}}let Tt=Fr();return Ht&&typeof Ht=="string"&&new lt(Ht,pt,Ie),ir(!0),()=>{const bt=un.current.instance;bt.dispose();const He=bt.getModel();He&&He.dispose(),un.current.subscription&&un.current.subscription.dispose(),Tt.unobserve(Pn.current)}}catch(pt){}})},[]),(0,ae.useEffect)(()=>{if(un.current.instance&&On)return document.addEventListener("keydown",an,!1),()=>{document.removeEventListener("keydown",an)}},[St,On]),(0,ae.useEffect)(()=>{let Zt=un.current.instance;if(Zt&&On){let pt=ze(z);Ie.editor.setModelLanguage(Zt.getModel(),pt)}},[z,On]),(0,ae.useEffect)(()=>{un.current.instance&&On&&Ie.editor.setTheme(ge)},[ge,On]),(0,ae.useEffect)(()=>{let Zt=un.current.instance;yn.current=ue,Zt&&On&&(Zt.updateOptions(Qe({},ue)),setTimeout(()=>{Zt.getModel().updateOptions(Qe({},ue))},200))},[JSON.stringify(ue),On]),(0,ae.useEffect)(()=>{let Zt=un.current.instance;Zt&&On&&Zt.layout()},[it,oe,On]);const[or,gr]=(0,ae.useState)(xe(it)),[_n,In]=(0,ae.useState)(xe(oe)),Dr=ut(Qe({},re),{width:or,height:_n,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:Pn,style:Dr},Dt&&ae.createElement(We.CopyToClipboard,{text:ee,onCopy:()=>at.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(ot.Z,{title:"\u590D\u5236\u4EE3\u7801"},ae.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ae.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function qe({width:ke="100%",height:et="100%",original:it,modified:oe,language:ee,options:z={}}){const re=(0,ae.useRef)(),[ue,ne]=(0,ae.useState)(null);function ge(yt){let xt;return re.current&&(xt=new $e.Z(Nt=>{for(let Lt of Nt)(Lt.target.offsetHeight>0||Lt.target.offsetWidth>0)&&yt.layout()}),xt.observe(re.current)),xt}(0,ae.useEffect)(()=>(re.current&&Promise.all([he.e(8909),he.e(9404)]).then(he.bind(he,2550)).then(yt=>{Ie=yt;const xt=Ie.editor.createDiffEditor(re.current,ut(Qe({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(xt);let Nt=ge(xt);return()=>{xt.dispose();const Lt=xt.getModel();Lt&&Lt.dispose(),Nt.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{ue&&ue.setModel({original:Ie.editor.createModel(it,ee),modified:Ie.editor.createModel(oe,ee)})},[it,oe,ee,ue]);const je=xe(ke),Dt=xe(et),St={width:je,height:Dt};return ae.createElement("div",{className:"my-diff-editor",ref:re,style:St})}},61346:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return $e}});var ae=he(59301);function $e(Te,Re){const me=(0,ae.useRef)();(0,ae.useEffect)(()=>{me.current=Te}),(0,ae.useEffect)(()=>{function ye(){me.current()}if(Re!==null){let Fe=setInterval(ye,Re);return()=>clearInterval(Fe)}},[Re])}},96457:function(At,Ft,he){"use strict";he.r(Ft),he.d(Ft,{default:function(){return Wt}});var ae=he(59301),$e=he(92123),Te=he(28284),Re=he(91882),me=he(37568),ye=he(99571),Fe=he(16984),Ze=he(4604),Ce={bg:"bg___mk00l",flexRow:"flexRow___cF86d",flexJustifyCenter:"flexJustifyCenter___xffJH",flexAlignEnd:"flexAlignEnd___XZNbd",flexAlignCenter:"flexAlignCenter___rBycD",flexColumn:"flexColumn___bvZmC",formWrap:"formWrap___IeMB8",titleWrap:"titleWrap___jBULn",fieldWrap:"fieldWrap___mRoj3",mdWrap:"mdWrap___XC6AD",backgroundFa:"backgroundFa___dCgV1",button:"button___ga1Ue"},fe=he(49494),tt=he(94601),ve=he(7384),st=he(43597),_e=Object.defineProperty,Le=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,ft=(Ke,We,vt)=>We in Ke?_e(Ke,We,{enumerable:!0,configurable:!0,writable:!0,value:vt}):Ke[We]=vt,lt=(Ke,We)=>{for(var vt in We||(We={}))rt.call(We,vt)&&ft(Ke,vt,We[vt]);if(De)for(var vt of De(We))ct.call(We,vt)&&ft(Ke,vt,We[vt]);return Ke},nt=(Ke,We)=>Le(Ke,Me(We)),at=(Ke,We,vt)=>new Promise((Ae,Ge)=>{var Ee=Ye=>{try{mt(vt.next(Ye))}catch(Qe){Ge(Qe)}},Oe=Ye=>{try{mt(vt.throw(Ye))}catch(Qe){Ge(Qe)}},mt=Ye=>Ye.done?Ae(Ye.value):Promise.resolve(Ye.value).then(Ee,Oe);mt((vt=vt.apply(Ke,We)).next())});const ot=({shixunHomeworks:Ke,newCourse:We,globalSetting:vt,loading:Ae,dispatch:Ge})=>{var Ee;const Oe=(0,$e.useParams)(),[mt]=Te.default.useForm(),[Ye,Qe]=(0,ae.useState)({}),[ut,pe]=(0,ae.useState)(),le=(0,ae.useRef)(),{commonHomeWorkAddDefaultData:xe}=Ke;let[Ne,Xe]=(0,ae.useState)({});(0,ae.useEffect)(()=>{setTimeout(()=>{document.body.scrollIntoView()},300);const{coursesId:dt,categoryId:Ue}=Oe;le.current=Oe==null?void 0:Oe.courseId,pe(!!le.current),le.current&&be(),Ge({type:"shixunHomeworks/addCommonHomeWorkDefaultData",payload:{category:Ue,coursesId:dt,type:1}})},[]);const be=()=>at(void 0,null,function*(){const dt=yield Ge({type:"newCourse/getEditCourseData",payload:{id:le.current}});dt&&(mt.setFieldsValue({name:dt.name}),mt.setFieldsValue({intro:dt.description}),mt.setFieldsValue({notice:dt.learning_notes}),Qe({name:dt.name,intro:dt.description,notice:dt.learning_notes}))}),ze=dt=>at(void 0,null,function*(){var Ue,qe;const ke=lt({},Ye);ke.attachment_ids&&(ke.attachment_ids=(Ue=ke==null?void 0:ke.attachment_ids)==null?void 0:Ue.map(ee=>ee.response.id)),ke.reference_attachment_ids&&(ke.reference_attachment_ids=(qe=ke==null?void 0:ke.reference_attachment_ids)==null?void 0:qe.map(ee=>ee.response.id));const{coursesId:et,categoryId:it}=Oe,oe=yield(0,Ze.H1)(nt(lt({coursesId:et,category:it},ke),{base_on_project:!0,type:1}));(oe==null?void 0:oe.status)===0&&(Ie(oe.homework_id),(0,tt.L9)(["\u6559\u5B66\u8BFE\u5802","\u56FE\u6587\u4F5C\u4E1A","\u65B0\u5EFA\u56FE\u6587\u4F5C\u4E1A"]),$e.history.push(`/classrooms/${Oe.coursesId}/common_homework/${oe.homework_id}/detail`))});function Ie(dt){return at(this,null,function*(){if(!(Ne!=null&&Ne.ec_point_ids))return;let Ue=yield(0,st.ZP)(`/api/ec_courses/${Ne==null?void 0:Ne.ec_course_id}/ec_points/set_work_points.json`,{method:"post",body:lt({homework_common_id:dt},Ne)})})}return ae.createElement("section",{className:Ce.bg},xe.course_name&&ae.createElement("section",{className:"animated fadeIn"},ae.createElement("aside",{className:"mt10"},xe.category&&ae.createElement(Re.Z,{separator:">"},ae.createElement(Re.Z.Item,null,ae.createElement($e.Link,{to:`/classrooms/${xe.course_id}/common_homework`},xe.course_name)),ae.createElement(Re.Z.Item,null,ae.createElement($e.Link,{to:`/classrooms/${xe.course_id}/common_homework`},xe.category.category_name)),ae.createElement(Re.Z.Item,null,"\u65B0\u5EFA\u8BE6\u60C5")))),ae.createElement("aside",{className:"font24 bold mt20 mb20"},"\u65B0\u5EFA\u56FE\u6587\u4F5C\u4E1A"),ae.createElement(Te.default,{form:mt,className:Ce.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:()=>{console.log("onchange: ",mt.getFieldsValue()),Qe(lt({},mt.getFieldsValue()))},onFinish:ze},ae.createElement("div",{className:Ce.fieldWrap},ae.createElement(Te.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},ae.createElement(me.default,{maxLength:60,suffix:`${((Ee=Ye.name)==null?void 0:Ee.length)||0}/60`,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),ae.createElement("div",{className:Ce.mdWrap},ae.createElement(Te.default.Item,{name:"description",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:5e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},ae.createElement(Fe.Z,{watch:!0,defaultValue:Ye.intro})),ae.createElement("div",null,ae.createElement(Te.default.Item,{name:"attachment_ids"},ae.createElement(fe.Z,null)))),ae.createElement("div",{className:Ce.mdWrap},ae.createElement(Te.default.Item,{name:"reference_answer",label:"\u53C2\u8003\u7B54\u6848:"},ae.createElement(Fe.Z,{watch:!0,defaultValue:Ye.notice})),ae.createElement("div",null,ae.createElement(Te.default.Item,{name:"reference_attachment_ids"},ae.createElement(fe.Z,null))))),ae.createElement("div",{className:Ce.mdWrap},ae.createElement(ve.Z,{setitem:dt=>Xe(lt({},dt))})),ae.createElement("div",{className:Ce.backgroundFa},ae.createElement("div",{className:"pt40 mb30"},ae.createElement(Te.default.Item,null,ae.createElement(ye.ZP,{size:"middle",type:"primary",className:`${Ce.button} mr20`,htmlType:"submit",onClick:()=>{mt.submit()},loading:Ae["newCourse/editCourse"]||Ae["newCourse/submitCourse"]},"\u63D0\u4EA4"),ae.createElement(ye.ZP,{size:"middle",type:"primary",ghost:!0,className:Ce.button,onClick:()=>$e.history.push(`/classrooms/${Oe.coursesId}/common_homework`)},"\u53D6\u6D88")))))};var Wt=(0,$e.connect)(({shixunHomeworks:Ke,newCourse:We,loading:vt,globalSetting:Ae})=>({shixunHomeworks:Ke,newCourse:We,globalSetting:Ae,loading:vt.effects}))(ot)},5930:function(At,Ft,he){"use strict";he.d(Ft,{$J:function(){return Te},JZ:function(){return me},bN:function(){return Fe},jP:function(){return ye},rO:function(){return Re}});var ae=he(43597),$e=(Ze,Ce,fe)=>new Promise((tt,ve)=>{var st=Me=>{try{Le(fe.next(Me))}catch(De){ve(De)}},_e=Me=>{try{Le(fe.throw(Me))}catch(De){ve(De)}},Le=Me=>Me.done?tt(Me.value):Promise.resolve(Me.value).then(st,_e);Le((fe=fe.apply(Ze,Ce)).next())});function Te(Ze){return(0,ae.U2)(`libraries/${Ze}.json`)}function Re(){return(0,ae.U2)("library_tags.json")}function me(Ze){return $e(this,null,function*(){return(yield(0,ae.IV)(`attachments/${Ze}.json`)).status===0})}function ye(Ze){return(0,ae.v_)("libraries.json",Ze)}function Fe(Ze,Ce){return(0,ae.gz)(`libraries/${Ze}.json`,Ce)}},42684:function(At,Ft,he){"use strict";he.d(Ft,{AL:function(){return lt},Iy:function(){return tt},Qv:function(){return _e},ez:function(){return ft},jb:function(){return ve}});var ae=he(32834),$e=he.n(ae),Te=he(11690),Re=he.n(Te);let me=1;function ye(Ke,We){const vt=Ke.match(/^(\s+)(?:```)/);if(vt===null)return We;const Ae=vt[1];return We.split(`
|
|
`).map(Ge=>{const Ee=Ge.match(/^\s+/);if(Ee===null)return Ge;const[Oe]=Ee;return Oe.length>=Ae.length?Ge.slice(Ae.length):Ge}).join(`
|
|
`)}let Fe=[],Ze=["<ul>"];const Ce=new($e()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function tt(){Fe.length=0,Ze=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function st(Ke,We,vt,Ae){if(We>=Ke.length||Ke[We].level<=vt)return We;var Ge=Ke[We];Ae.push("<li><a href='#"+me+Ge.anchor+"'>"+Ge.text+"</a>"),We++;var Ee=[];return We=st(Ke,We,Ge.level,Ee),Ee.length>0&&(Ae.push("<ul>"),Ee.forEach(function(Oe){Ae.push(Oe)}),Ae.push("</ul>")),Ae.push("</li>"),We=st(Ke,We,vt,Ae),We}function _e(){return st(Fe,0,0,Ze),Ze.push("</ul>"),Ze.join("")}const Le={heading(Ke){const We=fe.exec(Ke);if(me+=1,We)return{type:"heading",raw:We[0],depth:We[1].length,text:We[2]}},fences(Ke){const We=this.rules.block.fences.exec(Ke);if(We){const vt=We[0];let Ae=ye(vt,We[3]||"");const Ge=We[2]?We[2].trim():We[2];if(["latex","katex","math"].indexOf(Ge)>=0){const Ee=rt(),Oe=Ae;Ae=Ee,ct[Ee]={type:"block",expression:Oe}}return{type:"code",raw:vt,lang:Ge,text:Ae}}}},Me=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const rt=()=>`__special_katext_id_${De++}__`;let ct={};function ft(){return ct}function lt(){De=0,ct={}}function nt(Ke){return Ke=Ke.replace(Me,(We,vt)=>{const Ae=rt();return ct[Ae]={type:"inline",expression:vt},Ae}),Ke}const at=Ce.listitem;Ce.listitem=function(Ke){return at(nt(Ke))};const ot=Ce.paragraph;Ce.paragraph=function(Ke){return ot(nt(Ke))};const Wt=Ce.tablecell;Ce.tablecell=function(Ke,We){return Wt(nt(Ke),We)},Ce.code=function(Ke,We,vt){const Ae=(We||"").match(/\S*/)[0];return Ae?["latex","katex","math"].indexOf(Ae)>=0?`<p class='editormd-tex'>${Ke}</p>`:`<pre class="prettyprint linenums"><code class="language-${We}">${vt?Ke:(0,Te.escape)(Ke,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(vt?Ke:(0,Te.escape)(Ke,!0))+"</code></pre>"},Ce.heading=function(Ke,We,vt){let Ae=this.options.headerPrefix+vt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Fe.push({anchor:Ae,level:We,text:Ke}),"<h"+We+' id="'+me+Ae+'">'+Ke+"</h"+We+">"},$e().setOptions({silent:!0,gfm:!0,pedantic:!1}),$e().use({tokenizer:Le,renderer:Ce}),Ft.ZP=$e()},99498:function(At,Ft,he){(function(ae){ae(he(89780))})(function(ae){ae.defineOption("placeholder","",function(Ze,Ce,fe){var tt=fe&&fe!=ae.Init;if(Ce&&!tt)Ze.on("blur",me),Ze.on("change",ye),Ze.on("swapDoc",ye),ae.on(Ze.getInputField(),"compositionupdate",Ze.state.placeholderCompose=function(){Re(Ze)}),ye(Ze);else if(!Ce&&tt){Ze.off("blur",me),Ze.off("change",ye),Ze.off("swapDoc",ye),ae.off(Ze.getInputField(),"compositionupdate",Ze.state.placeholderCompose),$e(Ze);var ve=Ze.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}Ce&&!Ze.hasFocus()&&me(Ze)});function $e(Ze){Ze.state.placeholder&&(Ze.state.placeholder.parentNode.removeChild(Ze.state.placeholder),Ze.state.placeholder=null)}function Te(Ze){$e(Ze);var Ce=Ze.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=Ze.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var fe=Ze.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),Ce.appendChild(fe),Ze.display.lineSpace.insertBefore(Ce,Ze.display.lineSpace.firstChild)}function Re(Ze){setTimeout(function(){var Ce=!1,fe=Ze.getInputField();fe.nodeName=="TEXTAREA"?Ce=!fe.value:Ze.lineCount()==1&&(Ce=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),Ce?Te(Ze):$e(Ze)},20)}function me(Ze){Fe(Ze)&&Te(Ze)}function ye(Ze){var Ce=Ze.getWrapperElement(),fe=Fe(Ze);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?Te(Ze):$e(Ze)}function Fe(Ze){return Ze.lineCount()===1&&Ze.getLine(0)===""}})},25717:function(At,Ft,he){(function(ae){ae(he(89780))})(function(ae){var $e={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Te=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(Le,Me,De){De&&De!=ae.Init&&(Le.removeKeyMap(me),Le.state.closeBrackets=null),Me&&(ye(Re(Me,"pairs")),Le.state.closeBrackets=Me,Le.addKeyMap(me))});function Re(Le,Me){return Me=="pairs"&&typeof Le=="string"?Le:typeof Le=="object"&&Le[Me]!=null?Le[Me]:$e[Me]}var me={Backspace:Ce,Enter:fe};function ye(Le){for(var Me=0;Me<Le.length;Me++){var De=Le.charAt(Me),rt="'"+De+"'";me[rt]||(me[rt]=Fe(De))}}ye($e.pairs+"`");function Fe(Le){return function(Me){return ve(Me,Le)}}function Ze(Le){var Me=Le.state.closeBrackets;if(!Me||Me.override)return Me;var De=Le.getModeAt(Le.getCursor());return De.closeBrackets||Me}function Ce(Le){var Me=Ze(Le);if(!Me||Le.getOption("disableInput"))return ae.Pass;for(var De=Re(Me,"pairs"),rt=Le.listSelections(),ct=0;ct<rt.length;ct++){if(!rt[ct].empty())return ae.Pass;var ft=st(Le,rt[ct].head);if(!ft||De.indexOf(ft)%2!=0)return ae.Pass}for(var ct=rt.length-1;ct>=0;ct--){var lt=rt[ct].head;Le.replaceRange("",Te(lt.line,lt.ch-1),Te(lt.line,lt.ch+1),"+delete")}}function fe(Le){var Me=Ze(Le),De=Me&&Re(Me,"explode");if(!De||Le.getOption("disableInput"))return ae.Pass;for(var rt=Le.listSelections(),ct=0;ct<rt.length;ct++){if(!rt[ct].empty())return ae.Pass;var ft=st(Le,rt[ct].head);if(!ft||De.indexOf(ft)%2!=0)return ae.Pass}Le.operation(function(){var lt=Le.lineSeparator()||`
|
|
`;Le.replaceSelection(lt+lt,null),Le.execCommand("goCharLeft"),rt=Le.listSelections();for(var nt=0;nt<rt.length;nt++){var at=rt[nt].head.line;Le.indentLine(at,null,!0),Le.indentLine(at+1,null,!0)}})}function tt(Le){var Me=ae.cmpPos(Le.anchor,Le.head)>0;return{anchor:new Te(Le.anchor.line,Le.anchor.ch+(Me?-1:1)),head:new Te(Le.head.line,Le.head.ch+(Me?1:-1))}}function ve(Le,Me){var De=Ze(Le);if(!De||Le.getOption("disableInput"))return ae.Pass;var rt=Re(De,"pairs"),ct=rt.indexOf(Me);if(ct==-1)return ae.Pass;for(var ft=Re(De,"closeBefore"),lt=Re(De,"triples"),nt=rt.charAt(ct+1)==Me,at=Le.listSelections(),ot=ct%2==0,Wt,Ke=0;Ke<at.length;Ke++){var We=at[Ke],vt=We.head,Ae,Ge=Le.getRange(vt,Te(vt.line,vt.ch+1));if(ot&&!We.empty())Ae="surround";else if((nt||!ot)&&Ge==Me)nt&&_e(Le,vt)?Ae="both":lt.indexOf(Me)>=0&&Le.getRange(vt,Te(vt.line,vt.ch+3))==Me+Me+Me?Ae="skipThree":Ae="skip";else if(nt&&vt.ch>1&<.indexOf(Me)>=0&&Le.getRange(Te(vt.line,vt.ch-2),vt)==Me+Me){if(vt.ch>2&&/\bstring/.test(Le.getTokenTypeAt(Te(vt.line,vt.ch-2))))return ae.Pass;Ae="addFour"}else if(nt){var Ee=vt.ch==0?" ":Le.getRange(Te(vt.line,vt.ch-1),vt);if(!ae.isWordChar(Ge)&&Ee!=Me&&!ae.isWordChar(Ee))Ae="both";else return ae.Pass}else if(ot&&(Ge.length===0||/\s/.test(Ge)||ft.indexOf(Ge)>-1))Ae="both";else return ae.Pass;if(!Wt)Wt=Ae;else if(Wt!=Ae)return ae.Pass}var Oe=ct%2?rt.charAt(ct-1):Me,mt=ct%2?Me:rt.charAt(ct+1);Le.operation(function(){if(Wt=="skip")Le.execCommand("goCharRight");else if(Wt=="skipThree")for(var Ye=0;Ye<3;Ye++)Le.execCommand("goCharRight");else if(Wt=="surround"){for(var Qe=Le.getSelections(),Ye=0;Ye<Qe.length;Ye++)Qe[Ye]=Oe+Qe[Ye]+mt;Le.replaceSelections(Qe,"around"),Qe=Le.listSelections().slice();for(var Ye=0;Ye<Qe.length;Ye++)Qe[Ye]=tt(Qe[Ye]);Le.setSelections(Qe)}else Wt=="both"?(Le.replaceSelection(Oe+mt,null),Le.triggerElectric(Oe+mt),Le.execCommand("goCharLeft")):Wt=="addFour"&&(Le.replaceSelection(Oe+Oe+Oe+Oe,"before"),Le.execCommand("goCharRight"))})}function st(Le,Me){var De=Le.getRange(Te(Me.line,Me.ch-1),Te(Me.line,Me.ch+1));return De.length==2?De:null}function _e(Le,Me){var De=Le.getTokenAt(Te(Me.line,Me.ch+1));return/\bstring/.test(De.type)&&De.start==Me.ch&&(Me.ch==0||!/\bstring/.test(Le.getTokenTypeAt(Me)))}})},6313:function(At,Ft,he){(function(ae){ae(he(89780),he(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(Ce,fe,tt){if(tt!=ae.Init&&tt&&Ce.removeKeyMap("autoCloseTags"),!!fe){var ve={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(ve["'/'"]=function(st){return ye(st)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(ve["'>'"]=function(st){return Re(st)}),Ce.addKeyMap(ve)}});var $e=["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 Re(Ce){if(Ce.getOption("disableInput"))return ae.Pass;for(var fe=Ce.listSelections(),tt=[],ve=Ce.getOption("autoCloseTags"),st=0;st<fe.length;st++){if(!fe[st].empty())return ae.Pass;var _e=fe[st].head,Le=Ce.getTokenAt(_e),Me=ae.innerMode(Ce.getMode(),Le.state),De=Me.state,rt=Me.mode.xmlCurrentTag&&Me.mode.xmlCurrentTag(De),ct=rt&&rt.name;if(!ct)return ae.Pass;var ft=Me.mode.configuration=="html",lt=typeof ve=="object"&&ve.dontCloseTags||ft&&$e,nt=typeof ve=="object"&&ve.indentTags||ft&&Te;Le.end>_e.ch&&(ct=ct.slice(0,ct.length-Le.end+_e.ch));var at=ct.toLowerCase();if(!ct||Le.type=="string"&&(Le.end!=_e.ch||!/[\"\']/.test(Le.string.charAt(Le.string.length-1))||Le.string.length==1)||Le.type=="tag"&&rt.close||Le.string.indexOf("/")==_e.ch-Le.start-1||lt&&Fe(lt,at)>-1||Ze(Ce,Me.mode.xmlCurrentContext&&Me.mode.xmlCurrentContext(De)||[],ct,_e,!0))return ae.Pass;var ot=typeof ve=="object"&&ve.emptyTags;if(ot&&Fe(ot,ct)>-1){tt[st]={text:"/>",newPos:ae.Pos(_e.line,_e.ch+2)};continue}var Wt=nt&&Fe(nt,at)>-1;tt[st]={indent:Wt,text:">"+(Wt?`
|
|
|
|
`:"")+"</"+ct+">",newPos:Wt?ae.Pos(_e.line+1,0):ae.Pos(_e.line,_e.ch+1)}}for(var Ke=typeof ve=="object"&&ve.dontIndentOnAutoClose,st=fe.length-1;st>=0;st--){var We=tt[st];Ce.replaceRange(We.text,fe[st].head,fe[st].anchor,"+insert");var vt=Ce.listSelections().slice(0);vt[st]={head:We.newPos,anchor:We.newPos},Ce.setSelections(vt),!Ke&&We.indent&&(Ce.indentLine(We.newPos.line,null,!0),Ce.indentLine(We.newPos.line+1,null,!0))}}function me(Ce,fe){for(var tt=Ce.listSelections(),ve=[],st=fe?"/":"</",_e=Ce.getOption("autoCloseTags"),Le=typeof _e=="object"&&_e.dontIndentOnSlash,Me=0;Me<tt.length;Me++){if(!tt[Me].empty())return ae.Pass;var De=tt[Me].head,rt=Ce.getTokenAt(De),ct=ae.innerMode(Ce.getMode(),rt.state),ft=ct.state;if(fe&&(rt.type=="string"||rt.string.charAt(0)!="<"||rt.start!=De.ch-1))return ae.Pass;var lt,nt=ct.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(nt&&ct.mode.name=="javascript")lt=st+"script";else if(nt&&ct.mode.name=="css")lt=st+"style";else{var at=ct.mode.xmlCurrentContext&&ct.mode.xmlCurrentContext(ft);if(!at||at.length&&Ze(Ce,at,at[at.length-1],De))return ae.Pass;lt=st+at[at.length-1]}Ce.getLine(De.line).charAt(rt.end)!=">"&&(lt+=">"),ve[Me]=lt}if(Ce.replaceSelections(ve),tt=Ce.listSelections(),!Le)for(var Me=0;Me<tt.length;Me++)(Me==tt.length-1||tt[Me].head.line<tt[Me+1].head.line)&&Ce.indentLine(tt[Me].head.line)}function ye(Ce){return Ce.getOption("disableInput")?ae.Pass:me(Ce,!0)}ae.commands.closeTag=function(Ce){return me(Ce)};function Fe(Ce,fe){if(Ce.indexOf)return Ce.indexOf(fe);for(var tt=0,ve=Ce.length;tt<ve;++tt)if(Ce[tt]==fe)return tt;return-1}function Ze(Ce,fe,tt,ve,st){if(!ae.scanForClosingTag)return!1;var _e=Math.min(Ce.lastLine()+1,ve.line+500),Le=ae.scanForClosingTag(Ce,ve,null,_e);if(!Le||Le.tag!=tt)return!1;for(var Me=st?1:0,De=fe.length-1;De>=0&&fe[De]==tt;De--)++Me;ve=Le.to;for(var De=1;De<Me;De++){var rt=ae.scanForClosingTag(Ce,ve,null,_e);if(!rt||rt.tag!=tt)return!1;ve=rt.to}return!0}})},32855:function(At,Ft,he){(function(ae){ae(he(89780))})(function(ae){"use strict";var $e=ae.Pos;function Te(De,rt){return De.line-rt.line||De.ch-rt.ch}var Re="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",me=Re+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ye=new RegExp("<(/?)(["+Re+"]["+me+"]*)","g");function Fe(De,rt,ct,ft){this.line=rt,this.ch=ct,this.cm=De,this.text=De.getLine(rt),this.min=ft?Math.max(ft.from,De.firstLine()):De.firstLine(),this.max=ft?Math.min(ft.to-1,De.lastLine()):De.lastLine()}function Ze(De,rt){var ct=De.cm.getTokenTypeAt($e(De.line,rt));return ct&&/\btag\b/.test(ct)}function Ce(De){if(!(De.line>=De.max))return De.ch=0,De.text=De.cm.getLine(++De.line),!0}function fe(De){if(!(De.line<=De.min))return De.text=De.cm.getLine(--De.line),De.ch=De.text.length,!0}function tt(De){for(;;){var rt=De.text.indexOf(">",De.ch);if(rt==-1){if(Ce(De))continue;return}if(!Ze(De,rt+1)){De.ch=rt+1;continue}var ct=De.text.lastIndexOf("/",rt),ft=ct>-1&&!/\S/.test(De.text.slice(ct+1,rt));return De.ch=rt+1,ft?"selfClose":"regular"}}function ve(De){for(;;){var rt=De.ch?De.text.lastIndexOf("<",De.ch-1):-1;if(rt==-1){if(fe(De))continue;return}if(!Ze(De,rt+1)){De.ch=rt;continue}ye.lastIndex=rt,De.ch=rt;var ct=ye.exec(De.text);if(ct&&ct.index==rt)return ct}}function st(De){for(;;){ye.lastIndex=De.ch;var rt=ye.exec(De.text);if(!rt){if(Ce(De))continue;return}if(!Ze(De,rt.index+1)){De.ch=rt.index+1;continue}return De.ch=rt.index+rt[0].length,rt}}function _e(De){for(;;){var rt=De.ch?De.text.lastIndexOf(">",De.ch-1):-1;if(rt==-1){if(fe(De))continue;return}if(!Ze(De,rt+1)){De.ch=rt;continue}var ct=De.text.lastIndexOf("/",rt),ft=ct>-1&&!/\S/.test(De.text.slice(ct+1,rt));return De.ch=rt+1,ft?"selfClose":"regular"}}function Le(De,rt){for(var ct=[];;){var ft=st(De),lt,nt=De.line,at=De.ch-(ft?ft[0].length:0);if(!ft||!(lt=tt(De)))return;if(lt!="selfClose")if(ft[1]){for(var ot=ct.length-1;ot>=0;--ot)if(ct[ot]==ft[2]){ct.length=ot;break}if(ot<0&&(!rt||rt==ft[2]))return{tag:ft[2],from:$e(nt,at),to:$e(De.line,De.ch)}}else ct.push(ft[2])}}function Me(De,rt){for(var ct=[];;){var ft=_e(De);if(!ft)return;if(ft=="selfClose"){ve(De);continue}var lt=De.line,nt=De.ch,at=ve(De);if(!at)return;if(at[1])ct.push(at[2]);else{for(var ot=ct.length-1;ot>=0;--ot)if(ct[ot]==at[2]){ct.length=ot;break}if(ot<0&&(!rt||rt==at[2]))return{tag:at[2],from:$e(De.line,De.ch),to:$e(lt,nt)}}}}ae.registerHelper("fold","xml",function(De,rt){for(var ct=new Fe(De,rt.line,0);;){var ft=st(ct);if(!ft||ct.line!=rt.line)return;var lt=tt(ct);if(!lt)return;if(!ft[1]&<!="selfClose"){var nt=$e(ct.line,ct.ch),at=Le(ct,ft[2]);return at&&Te(at.from,nt)>0?{from:nt,to:at.from}:null}}}),ae.findMatchingTag=function(De,rt,ct){var ft=new Fe(De,rt.line,rt.ch,ct);if(!(ft.text.indexOf(">")==-1&&ft.text.indexOf("<")==-1)){var lt=tt(ft),nt=lt&&$e(ft.line,ft.ch),at=lt&&ve(ft);if(!(!lt||!at||Te(ft,rt)>0)){var ot={from:$e(ft.line,ft.ch),to:nt,tag:at[2]};return lt=="selfClose"?{open:ot,close:null,at:"open"}:at[1]?{open:Me(ft,at[2]),close:ot,at:"close"}:(ft=new Fe(De,nt.line,nt.ch,ct),{open:ot,close:Le(ft,at[2]),at:"open"})}}},ae.findEnclosingTag=function(De,rt,ct,ft){for(var lt=new Fe(De,rt.line,rt.ch,ct);;){var nt=Me(lt,ft);if(!nt)break;var at=new Fe(De,rt.line,rt.ch,ct),ot=Le(at,nt.tag);if(ot)return{open:nt,close:ot}}},ae.scanForClosingTag=function(De,rt,ct,ft){var lt=new Fe(De,rt.line,rt.ch,ft?{from:0,to:ft}:null);return Le(lt,ct)}})},89780:function(At){(function(Ft,he){At.exports=he()})(this,function(){"use strict";var Ft=navigator.userAgent,he=navigator.platform,ae=/gecko\/\d/i.test(Ft),$e=/MSIE \d/.test(Ft),Te=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ft),Re=/Edge\/(\d+)/.exec(Ft),me=$e||Te||Re,ye=me&&($e?document.documentMode||6:+(Re||Te)[1]),Fe=!Re&&/WebKit\//.test(Ft),Ze=Fe&&/Qt\/\d+\.\d+/.test(Ft),Ce=!Re&&/Chrome\//.test(Ft),fe=/Opera\//.test(Ft),tt=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ft),st=/PhantomJS/.test(Ft),_e=!Re&&/AppleWebKit/.test(Ft)&&/Mobile\/\w+/.test(Ft),Le=/Android/.test(Ft),Me=_e||Le||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ft),De=_e||/Mac/.test(he),rt=/\bCrOS\b/.test(Ft),ct=/win/i.test(he),ft=fe&&Ft.match(/Version\/(\d*\.\d*)/);ft&&(ft=Number(ft[1])),ft&&ft>=15&&(fe=!1,Fe=!0);var lt=De&&(Ze||fe&&(ft==null||ft<12.11)),nt=ae||me&&ye>=9;function at(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ot=function(a,y){var x=a.className,b=at(y).exec(x);if(b){var E=x.slice(b.index+b[0].length);a.className=x.slice(0,b.index)+(E?b[1]+E:"")}};function Wt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ke(a,y){return Wt(a).appendChild(y)}function We(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var te=0;te<y.length;++te)E.appendChild(y[te]);return E}function vt(a,y,x,b){var E=We(a,y,x,b);return E.setAttribute("role","presentation"),E}var Ae;document.createRange?Ae=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Ae=function(a,y,x){var b=document.body.createTextRange();try{b.moveToElementText(a.parentNode)}catch(E){return b}return b.collapse(!0),b.moveEnd("character",x),b.moveStart("character",y),b};function Ge(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function Ee(){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 Oe(a,y){var x=a.className;at(y).test(x)||(a.className+=(x?" ":"")+y)}function mt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!at(x[b]).test(y)&&(y+=" "+x[b]);return y}var Ye=function(a){a.select()};_e?Ye=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(Ye=function(a){try{a.select()}catch(y){}});function Qe(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function ut(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 pe(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var te=b||0,ie=E||0;;){var se=a.indexOf(" ",te);if(se<0||se>=y)return ie+(y-te);ie+=se-te,ie+=x-ie%x,te=se+1}}var le=function(){this.id=null,this.f=null,this.time=0,this.handler=Qe(this.onTimeout,this)};le.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},le.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 xe(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var Ne=50,Xe={toString:function(){return"CodeMirror.Pass"}},be={scroll:!1},ze={origin:"*mouse"},Ie={origin:"+move"};function dt(a,y,x){for(var b=0,E=0;;){var te=a.indexOf(" ",b);te==-1&&(te=a.length);var ie=te-b;if(te==a.length||E+ie>=y)return b+Math.min(ie,y-E);if(E+=te-b,E+=x-E%x,b=te+1,E>=y)return b}}var Ue=[""];function qe(a){for(;Ue.length<=a;)Ue.push(ke(Ue)+" ");return Ue[a]}function ke(a){return a[a.length-1]}function et(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function it(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 ee(a,y){var x;return Object.create?x=Object.create(a):(oe.prototype=a,x=new oe),y&&ut(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 ue(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 ge=/[\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 je(a){return a.charCodeAt(0)>=768&&ge.test(a)}function Dt(a,y,x){for(;(x<0?y>0:y<a.length)&&je(a.charAt(y));)y+=x;return y}function St(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,te=b<0?Math.ceil(E):Math.floor(E);if(te==y)return a(te)?y:x;a(te)?x=te:y=te+b}}function yt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,te=0;te<a.length;++te){var ie=a[te];(ie.from<x&&ie.to>y||y==x&&ie.to==y)&&(b(Math.max(ie.from,y),Math.min(ie.to,x),ie.level==1?"rtl":"ltr",te),E=!0)}E||b(y,x,"ltr")}var xt=null;function Nt(a,y,x){var b;xt=null;for(var E=0;E<a.length;++E){var te=a[E];if(te.from<y&&te.to>y)return E;te.to==y&&(te.from!=te.to&&x=="before"?b=E:xt=E),te.from==y&&(te.from!=te.to&&x!="before"?b=E:xt=E)}return b!=null?b:xt}var Lt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(de){return de<=247?a.charAt(de):1424<=de&&de<=1524?"R":1536<=de&&de<=1785?y.charAt(de-1536):1774<=de&&de<=2220?"r":8192<=de&&de<=8203?"w":de==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,te=/[LRr]/,ie=/[Lb1n]/,se=/[1n]/;function ce(de,we,Se){this.level=de,this.from=we,this.to=Se}return function(de,we){var Se=we=="ltr"?"L":"R";if(de.length==0||we=="ltr"&&!b.test(de))return!1;for(var Je=de.length,Ve=[],Ct=0;Ct<Je;++Ct)Ve.push(x(de.charCodeAt(Ct)));for(var Pt=0,Gt=Se;Pt<Je;++Pt){var $t=Ve[Pt];$t=="m"?Ve[Pt]=Gt:Gt=$t}for(var ln=0,en=Se;ln<Je;++ln){var hn=Ve[ln];hn=="1"&&en=="r"?Ve[ln]="n":te.test(hn)&&(en=hn,hn=="r"&&(Ve[ln]="R"))}for(var kn=1,gn=Ve[0];kn<Je-1;++kn){var Zn=Ve[kn];Zn=="+"&&gn=="1"&&Ve[kn+1]=="1"?Ve[kn]="1":Zn==","&&gn==Ve[kn+1]&&(gn=="1"||gn=="n")&&(Ve[kn]=gn),gn=Zn}for(var Br=0;Br<Je;++Br){var si=Ve[Br];if(si==",")Ve[Br]="N";else if(si=="%"){var Zr=void 0;for(Zr=Br+1;Zr<Je&&Ve[Zr]=="%";++Zr);for(var Bi=Br&&Ve[Br-1]=="!"||Zr<Je&&Ve[Zr]=="1"?"1":"N",ki=Br;ki<Zr;++ki)Ve[ki]=Bi;Br=Zr-1}}for(var qr=0,Ei=Se;qr<Je;++qr){var di=Ve[qr];Ei=="L"&&di=="1"?Ve[qr]="L":te.test(di)&&(Ei=di)}for(var ri=0;ri<Je;++ri)if(E.test(Ve[ri])){var $r=void 0;for($r=ri+1;$r<Je&&E.test(Ve[$r]);++$r);for(var Ur=(ri?Ve[ri-1]:Se)=="L",Li=($r<Je?Ve[$r]:Se)=="L",Uo=Ur==Li?Ur?"L":"R":Se,bo=ri;bo<$r;++bo)Ve[bo]=Uo;ri=$r-1}for(var pi=[],eo,li=0;li<Je;)if(ie.test(Ve[li])){var bs=li;for(++li;li<Je&&ie.test(Ve[li]);++li);pi.push(new ce(0,bs,li))}else{var oo=li,Mo=pi.length,Po=we=="rtl"?1:0;for(++li;li<Je&&Ve[li]!="L";++li);for(var bi=oo;bi<li;)if(se.test(Ve[bi])){oo<bi&&(pi.splice(Mo,0,new ce(1,oo,bi)),Mo+=Po);var Vo=bi;for(++bi;bi<li&&se.test(Ve[bi]);++bi);pi.splice(Mo,0,new ce(2,Vo,bi)),Mo+=Po,oo=bi}else++bi;oo<li&&pi.splice(Mo,0,new ce(1,oo,li))}return we=="ltr"&&(pi[0].level==1&&(eo=de.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new ce(0,0,eo[0].length))),ke(pi).level==1&&(eo=de.match(/\s+$/))&&(ke(pi).to-=eo[0].length,pi.push(new ce(0,Je-eo[0].length,Je)))),we=="rtl"?pi.reverse():pi}}();function kt(a,y){var x=a.order;return x==null&&(x=a.order=Lt(a.text,y)),x}var Rt=[],Mt=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]||Rt).concat(x)}};function rn(a,y){return a._handlers&&a._handlers[y]||Rt}function Ot(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var te=xe(E,x);te>-1&&(b[y]=E.slice(0,te).concat(E.slice(te+1)))}}}function Jt(a,y){var x=rn(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 ht(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Jt(a,x||y.type,a,y),un(y)||y.codemirrorIgnore}function cn(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)xe(x,y[b])==-1&&x.push(y[b])}function Ht(a,y){return rn(a,y).length>0}function Ut(a){a.prototype.on=function(y,x){Mt(this,y,x)},a.prototype.off=function(y,x){Ot(this,y,x)}}function sn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Pn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function un(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function yn(a){sn(a),Pn(a)}function tr(a){return a.target||a.srcElement}function Gn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),De&&a.ctrlKey&&y==1&&(y=3),y}var Xr=function(){if(me&&ye<9)return!1;var a=We("div");return"draggable"in a||"dragDrop"in a}(),jr;function xr(a){if(jr==null){var y=We("span","\u200B");Ke(a,We("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(jr=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&ye<8))}var x=jr?We("span","\u200B"):We("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var mr;function On(a){if(mr!=null)return mr;var y=Ke(a,document.createTextNode("A\u062EA")),x=Ae(y,0,1).getBoundingClientRect(),b=Ae(y,1,2).getBoundingClientRect();return Wt(a),!x||x.left==x.right?!1:mr=b.right-x.right<3}var ir=`
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
|
|
`,y);E==-1&&(E=a.length);var te=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ie=te.indexOf("\r");ie!=-1?(x.push(te.slice(0,ie)),y+=ie+1):(x.push(te),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Fr=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},Fn=function(){var a=We("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),nr=null;function Vn(a){if(nr!=null)return nr;var y=Ke(a,We("span","x")),x=y.getBoundingClientRect(),b=Ae(y,0,1).getBoundingClientRect();return nr=Math.abs(x.left-b.left)>1}var Lr={},an={};function fn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Lr[a]=y}function bn(a,y){an[a]=y}function Mn(a){if(typeof a=="string"&&an.hasOwnProperty(a))a=an[a];else if(a&&typeof a.name=="string"&&an.hasOwnProperty(a.name)){var y=an[a.name];typeof y=="string"&&(y={name:y}),a=ee(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Mn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Mn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function $n(a,y){y=Mn(y);var x=Lr[y.name];if(!x)return $n(a,"text/plain");var b=x(a,y);if(or.hasOwnProperty(y.name)){var E=or[y.name];for(var te in E)E.hasOwnProperty(te)&&(b.hasOwnProperty(te)&&(b["_"+te]=b[te]),b[te]=E[te])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var ie in y.modeProps)b[ie]=y.modeProps[ie];return b}var or={};function gr(a,y){var x=or.hasOwnProperty(a)?or[a]:or[a]={};ut(y,x)}function _n(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 In(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 Dr(a,y,x){return a.startState?a.startState(y,x):!0}var Zt=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};Zt.prototype.eol=function(){return this.pos>=this.string.length},Zt.prototype.sol=function(){return this.pos==this.lineStart},Zt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Zt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Zt.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},Zt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Zt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Zt.prototype.skipToEnd=function(){this.pos=this.string.length},Zt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Zt.prototype.backUp=function(a){this.pos-=a},Zt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(ie){return x?ie.toLowerCase():ie},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var te=this.string.slice(this.pos).match(a);return te&&te.index>0?null:(te&&y!==!1&&(this.pos+=te[0].length),te)}},Zt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Zt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Zt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Zt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function pt(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],te=E.chunkSize();if(y<te){x=E;break}y-=te}return x.lines[y]}function Yt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(te){var ie=te.text;E==x.line&&(ie=ie.slice(0,x.ch)),E==y.line&&(ie=ie.slice(y.ch)),b.push(ie),++E}),b}function En(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function jn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Pe(a){if(a.parent==null)return null;for(var y=a.parent,x=xe(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 Be(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],te=E.height;if(y<te){a=E;continue e}y-=te,x+=E.chunkSize()}return x}while(!a.lines);for(var ie=0;ie<a.lines.length;++ie){var se=a.lines[ie],ce=se.height;if(y<ce)break;y-=ce}return x+ie}function Tt(a,y){return y>=a.first&&y<a.first+a.size}function bt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function He(a,y,x){if(x===void 0&&(x=null),!(this instanceof He))return new He(a,y,x);this.line=a,this.ch=y,this.sticky=x}function wt(a,y){return a.line-y.line||a.ch-y.ch}function Vt(a,y){return a.sticky==y.sticky&&wt(a,y)==0}function tn(a){return He(a.line,a.ch)}function on(a,y){return wt(a,y)<0?y:a}function _t(a,y){return wt(a,y)<0?a:y}function Kt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Et(a,y){if(y.line<a.first)return He(a.first,0);var x=a.first+a.size-1;return y.line>x?He(x,pt(a,x).text.length):gt(y,pt(a,y.line).text.length)}function gt(a,y){var x=a.ch;return x==null||x>y?He(a.line,y):x<0?He(a.line,0):a}function Xt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Et(a,y[b]);return x}var pn=function(a,y){this.state=a,this.lookAhead=y},vn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};vn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},vn.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}},vn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vn.fromSaved=function(a,y,x){return y instanceof pn?new vn(a,_n(a.mode,y.state),x,y.lookAhead):new vn(a,_n(a.mode,y),x)},vn.prototype.save=function(a){var y=a!==!1?_n(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pn(y,this.maxLookAhead):y};function mn(a,y,x,b){var E=[a.state.modeGen],te={};er(a,y.text,a.doc.mode,x,function(de,we){return E.push(de,we)},te,b);for(var ie=x.state,se=function(de){x.baseTokens=E;var we=a.state.overlays[de],Se=1,Je=0;x.state=!0,er(a,y.text,we.mode,x,function(Ve,Ct){for(var Pt=Se;Je<Ve;){var Gt=E[Se];Gt>Ve&&E.splice(Se,1,Ve,E[Se+1],Gt),Se+=2,Je=Math.min(Ve,Gt)}if(Ct)if(we.opaque)E.splice(Pt,Se-Pt,Ve,"overlay "+Ct),Se=Pt+2;else for(;Pt<Se;Pt+=2){var $t=E[Pt+1];E[Pt+1]=($t?$t+" ":"")+"overlay "+Ct}},te),x.state=ie,x.baseTokens=null,x.baseTokenPos=1},ce=0;ce<a.state.overlays.length;++ce)se(ce);return{styles:E,classes:te.bgClass||te.textClass?te:null}}function Nn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Kn(a,Pe(y)),E=y.text.length>a.options.maxHighlightLength&&_n(a.doc.mode,b.state),te=mn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=te.styles,te.classes?y.styleClasses=te.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Kn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new vn(b,!0,y);var te=wr(a,y,x),ie=te>b.first&&pt(b,te-1).stateAfter,se=ie?vn.fromSaved(b,ie,te):new vn(b,Dr(b.mode),te);return b.iter(te,y,function(ce){ar(a,ce.text,se);var de=se.line;ce.stateAfter=de==y-1||de%5==0||de>=E.viewFrom&&de<E.viewTo?se.save():null,se.nextLine()}),x&&(b.modeFrontier=se.line),se}function ar(a,y,x,b){var E=a.doc.mode,te=new Zt(y,a.options.tabSize,x);for(te.start=te.pos=b||0,y==""&&Cn(E,x.state);!te.eol();)Wn(E,te,x.state),te.start=te.pos}function Cn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=In(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function Wn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=In(a,x).mode);var te=a.token(y,x);if(y.pos>y.start)return te}throw new Error("Mode "+a.name+" failed to advance stream.")}var Ln=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function sr(a,y,x,b){var E=a.doc,te=E.mode,ie;y=Et(E,y);var se=pt(E,y.line),ce=Kn(a,y.line,x),de=new Zt(se.text,a.options.tabSize,ce),we;for(b&&(we=[]);(b||de.pos<y.ch)&&!de.eol();)de.start=de.pos,ie=Wn(te,de,ce.state),b&&we.push(new Ln(de,ie,_n(E.mode,ce.state)));return b?we:new Ln(de,ie,ce.state)}function Or(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 er(a,y,x,b,E,te,ie){var se=x.flattenSpans;se==null&&(se=a.options.flattenSpans);var ce=0,de=null,we=new Zt(y,a.options.tabSize,b),Se,Je=a.options.addModeClass&&[null];for(y==""&&Or(Cn(x,b.state),te);!we.eol();){if(we.pos>a.options.maxHighlightLength?(se=!1,ie&&ar(a,y,b,we.pos),we.pos=y.length,Se=null):Se=Or(Wn(x,we,b.state,Je),te),Je){var Ve=Je[0].name;Ve&&(Se="m-"+(Se?Ve+" "+Se:Ve))}if(!se||de!=Se){for(;ce<we.start;)ce=Math.min(we.start,ce+5e3),E(ce,de);de=Se}we.start=we.pos}for(;ce<we.pos;){var Ct=Math.min(we.pos,ce+5e3);E(Ct,de),ce=Ct}}function wr(a,y,x){for(var b,E,te=a.doc,ie=x?-1:y-(a.doc.mode.innerMode?1e3:100),se=y;se>ie;--se){if(se<=te.first)return te.first;var ce=pt(te,se-1),de=ce.stateAfter;if(de&&(!x||se+(de instanceof pn?de.lookAhead:0)<=te.modeFrontier))return se;var we=pe(ce.text,null,a.options.tabSize);(E==null||b>we)&&(E=se-1,b=we)}return E}function Cr(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=pt(a,b).stateAfter;if(E&&(!(E instanceof pn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var fr=!1,Yn=!1;function Ar(){fr=!0}function cr(){Yn=!0}function Xn(a,y,x){this.marker=a,this.from=y,this.to=x}function yr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Sr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function lr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function Un(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,se=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);if(se||te.from==y&&ie.type=="bookmark"&&(!x||!te.marker.insertLeft)){var ce=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);(b||(b=[])).push(new Xn(ie,te.from,ce?null:te.to))}}return b}function zn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,se=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);if(se||te.from==y&&ie.type=="bookmark"&&(!x||te.marker.insertLeft)){var ce=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);(b||(b=[])).push(new Xn(ie,ce?null:te.from-y,te.to==null?null:te.to-y))}}return b}function Mr(a,y){if(y.full)return null;var x=Tt(a,y.from.line)&&pt(a,y.from.line).markedSpans,b=Tt(a,y.to.line)&&pt(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,te=y.to.ch,ie=wt(y.from,y.to)==0,se=Un(x,E,ie),ce=zn(b,te,ie),de=y.text.length==1,we=ke(y.text).length+(de?E:0);if(se)for(var Se=0;Se<se.length;++Se){var Je=se[Se];if(Je.to==null){var Ve=yr(ce,Je.marker);Ve?de&&(Je.to=Ve.to==null?null:Ve.to+we):Je.to=E}}if(ce)for(var Ct=0;Ct<ce.length;++Ct){var Pt=ce[Ct];if(Pt.to!=null&&(Pt.to+=we),Pt.from==null){var Gt=yr(se,Pt.marker);Gt||(Pt.from=we,de&&(se||(se=[])).push(Pt))}else Pt.from+=we,de&&(se||(se=[])).push(Pt)}se&&(se=Gr(se)),ce&&ce!=se&&(ce=Gr(ce));var $t=[se];if(!de){var ln=y.text.length-2,en;if(ln>0&&se)for(var hn=0;hn<se.length;++hn)se[hn].to==null&&(en||(en=[])).push(new Xn(se[hn].marker,null,null));for(var kn=0;kn<ln;++kn)$t.push(en);$t.push(ce)}return $t}function Gr(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 Jr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Ve){if(Ve.markedSpans)for(var Ct=0;Ct<Ve.markedSpans.length;++Ct){var Pt=Ve.markedSpans[Ct].marker;Pt.readOnly&&(!b||xe(b,Pt)==-1)&&(b||(b=[])).push(Pt)}}),!b)return null;for(var E=[{from:y,to:x}],te=0;te<b.length;++te)for(var ie=b[te],se=ie.find(0),ce=0;ce<E.length;++ce){var de=E[ce];if(!(wt(de.to,se.from)<0||wt(de.from,se.to)>0)){var we=[ce,1],Se=wt(de.from,se.from),Je=wt(de.to,se.to);(Se<0||!ie.inclusiveLeft&&!Se)&&we.push({from:de.from,to:se.from}),(Je>0||!ie.inclusiveRight&&!Je)&&we.push({from:se.to,to:de.to}),E.splice.apply(E,we),ce+=we.length-3}}return E}function br(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Nr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Pr(a){return a.inclusiveLeft?-1:0}function zr(a){return a.inclusiveRight?1:0}function ii(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),te=wt(b.from,E.from)||Pr(a)-Pr(y);if(te)return-te;var ie=wt(b.to,E.to)||zr(a)-zr(y);return ie||y.id-a.id}function Ir(a,y){var x=Yn&&a.markedSpans,b;if(x)for(var E=void 0,te=0;te<x.length;++te)E=x[te],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ii(b,E.marker)<0)&&(b=E.marker);return b}function Tn(a){return Ir(a,!0)}function It(a){return Ir(a,!1)}function jt(a,y){var x=Yn&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var te=x[E];te.marker.collapsed&&(te.from==null||te.from<y)&&(te.to==null||te.to>y)&&(!b||ii(b,te.marker)<0)&&(b=te.marker)}return b}function dn(a,y,x,b,E){var te=pt(a,y),ie=Yn&&te.markedSpans;if(ie)for(var se=0;se<ie.length;++se){var ce=ie[se];if(ce.marker.collapsed){var de=ce.marker.find(0),we=wt(de.from,x)||Pr(ce.marker)-Pr(E),Se=wt(de.to,b)||zr(ce.marker)-zr(E);if(!(we>=0&&Se<=0||we<=0&&Se>=0)&&(we<=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?wt(de.to,x)>=0:wt(de.to,x)>0)||we>=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?wt(de.from,b)<=0:wt(de.from,b)<0)))return!0}}}function qt(a){for(var y;y=Tn(a);)a=y.find(-1,!0).line;return a}function xn(a){for(var y;y=It(a);)a=y.find(1,!0).line;return a}function Jn(a){for(var y,x;y=It(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function zt(a,y){var x=pt(a,y),b=qt(x);return x==b?y:Pe(b)}function Bt(a,y){if(y>a.lastLine())return y;var x=pt(a,y),b;if(!Qt(a,x))return y;for(;b=It(x);)x=b.find(1,!0).line;return Pe(x)+1}function Qt(a,y){var x=Yn&&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&&nn(a,y,b))return!0}}}function nn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return nn(a,b.line,yr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,te=0;te<y.markedSpans.length;++te)if(E=y.markedSpans[te],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&nn(a,y,E))return!0}function Sn(a){a=qt(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var te=x.parent;te;x=te,te=x.parent)for(var ie=0;ie<te.children.length;++ie){var se=te.children[ie];if(se==x)break;y+=se.height}return y}function Qn(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Tn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=It(b);){var te=x.find(0,!0);y-=b.text.length-te.from.ch,b=te.to.line,y+=b.text.length-te.to.ch}return y}function Hn(a){var y=a.display,x=a.doc;y.maxLine=pt(x,x.first),y.maxLineLength=Qn(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Qn(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var dr=function(a,y,x){this.text=a,Nr(this,y),this.height=x?x(this):1};dr.prototype.lineNo=function(){return Pe(this)},Ut(dr);function hr(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),br(a),Nr(a,x);var E=b?b(a):1;E!=a.height&&jn(a,E)}function pr(a){a.parent=null,br(a)}var _r={},kr={};function Rr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?kr:_r;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=vt("span",null,null,Fe?"padding-right: .1px":null),b={pre:vt("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var te=E?y.rest[E-1]:y.line,ie=void 0;b.pos=0,b.addToken=Ni,On(a.display.measure)&&(ie=kt(te,a.doc.direction))&&(b.addToken=vi(b.addToken,ie)),b.map=[];var se=y!=a.display.externalMeasured&&Pe(te);rr(te,b,Nn(a,te,se)),te.styleClasses&&(te.styleClasses.bgClass&&(b.bgClass=mt(te.styleClasses.bgClass,b.bgClass||"")),te.styleClasses.textClass&&(b.textClass=mt(te.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(xr(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 ce=b.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Jt(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=mt(b.pre.className,b.textClass||"")),b}function Di(a){var y=We("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Ni(a,y,x,b,E,te,ie){if(y){var se=a.splitSpaces?xi(y,a.trailingSpace):y,ce=a.cm.state.specialChars,de=!1,we;if(!ce.test(y))a.col+=y.length,we=document.createTextNode(se),a.map.push(a.pos,a.pos+y.length,we),me&&ye<9&&(de=!0),a.pos+=y.length;else{we=document.createDocumentFragment();for(var Se=0;;){ce.lastIndex=Se;var Je=ce.exec(y),Ve=Je?Je.index-Se:y.length-Se;if(Ve){var Ct=document.createTextNode(se.slice(Se,Se+Ve));me&&ye<9?we.appendChild(We("span",[Ct])):we.appendChild(Ct),a.map.push(a.pos,a.pos+Ve,Ct),a.col+=Ve,a.pos+=Ve}if(!Je)break;Se+=Ve+1;var Pt=void 0;if(Je[0]==" "){var Gt=a.cm.options.tabSize,$t=Gt-a.col%Gt;Pt=we.appendChild(We("span",qe($t),"cm-tab")),Pt.setAttribute("role","presentation"),Pt.setAttribute("cm-text"," "),a.col+=$t}else Je[0]=="\r"||Je[0]==`
|
|
`?(Pt=we.appendChild(We("span",Je[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Pt.setAttribute("cm-text",Je[0]),a.col+=1):(Pt=a.cm.options.specialCharPlaceholder(Je[0]),Pt.setAttribute("cm-text",Je[0]),me&&ye<9?we.appendChild(We("span",[Pt])):we.appendChild(Pt),a.col+=1);a.map.push(a.pos,a.pos+1,Pt),a.pos++}}if(a.trailingSpace=se.charCodeAt(y.length-1)==32,x||b||E||de||te||ie){var ln=x||"";b&&(ln+=b),E&&(ln+=E);var en=We("span",[we],ln,te);if(ie)for(var hn in ie)ie.hasOwnProperty(hn)&&hn!="style"&&hn!="class"&&en.setAttribute(hn,ie[hn]);return a.content.appendChild(en)}a.content.appendChild(we)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var te=a.charAt(E);te==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(te="\xA0"),b+=te,x=te==" "}return b}function vi(a,y){return function(x,b,E,te,ie,se,ce){E=E?E+" cm-force-border":"cm-force-border";for(var de=x.pos,we=de+b.length;;){for(var Se=void 0,Je=0;Je<y.length&&(Se=y[Je],!(Se.to>de&&Se.from<=de));Je++);if(Se.to>=we)return a(x,b,E,te,ie,se,ce);a(x,b.slice(0,Se.to-de),E,te,null,se,ce),te=null,b=b.slice(Se.to-de),de=Se.to}}}function Xi(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 rr(a,y,x){var b=a.markedSpans,E=a.text,te=0;if(!b){for(var ie=1;ie<x.length;ie+=2)y.addToken(y,E.slice(te,te=x[ie]),Rr(x[ie+1],y.cm.options));return}for(var se=E.length,ce=0,de=1,we="",Se,Je,Ve=0,Ct,Pt,Gt,$t,ln;;){if(Ve==ce){Ct=Pt=Gt=Je="",ln=null,$t=null,Ve=1/0;for(var en=[],hn=void 0,kn=0;kn<b.length;++kn){var gn=b[kn],Zn=gn.marker;if(Zn.type=="bookmark"&&gn.from==ce&&Zn.widgetNode)en.push(Zn);else if(gn.from<=ce&&(gn.to==null||gn.to>ce||Zn.collapsed&&gn.to==ce&&gn.from==ce)){if(gn.to!=null&&gn.to!=ce&&Ve>gn.to&&(Ve=gn.to,Pt=""),Zn.className&&(Ct+=" "+Zn.className),Zn.css&&(Je=(Je?Je+";":"")+Zn.css),Zn.startStyle&&gn.from==ce&&(Gt+=" "+Zn.startStyle),Zn.endStyle&&gn.to==Ve&&(hn||(hn=[])).push(Zn.endStyle,gn.to),Zn.title&&((ln||(ln={})).title=Zn.title),Zn.attributes)for(var Br in Zn.attributes)(ln||(ln={}))[Br]=Zn.attributes[Br];Zn.collapsed&&(!$t||ii($t.marker,Zn)<0)&&($t=gn)}else gn.from>ce&&Ve>gn.from&&(Ve=gn.from)}if(hn)for(var si=0;si<hn.length;si+=2)hn[si+1]==Ve&&(Pt+=" "+hn[si]);if(!$t||$t.from==ce)for(var Zr=0;Zr<en.length;++Zr)Xi(y,0,en[Zr]);if($t&&($t.from||0)==ce){if(Xi(y,($t.to==null?se+1:$t.to)-ce,$t.marker,$t.from==null),$t.to==null)return;$t.to==ce&&($t=!1)}}if(ce>=se)break;for(var Bi=Math.min(se,Ve);;){if(we){var ki=ce+we.length;if(!$t){var qr=ki>Bi?we.slice(0,Bi-ce):we;y.addToken(y,qr,Se?Se+Ct:Ct,Gt,ce+qr.length==Ve?Pt:"",Je,ln)}if(ki>=Bi){we=we.slice(Bi-ce),ce=Bi;break}ce=ki,Gt=""}we=E.slice(te,te=x[de++]),Se=Rr(x[de++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=Jn(y),this.size=this.rest?Pe(ke(this.rest))-x+1:1,this.node=this.text=null,this.hidden=Qt(a,y)}function ti(a,y,x){for(var b=[],E,te=y;te<x;te=E){var ie=new to(a.doc,pt(a.doc,te),te);E=te+ie.size,b.push(ie)}return b}var Fi=null;function ao(a){Fi?Fi.ops.push(a):a.ownsGroup=Fi={ops:[a],delayedCallbacks:[]}}function Ji(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 mi(a,y){var x=a.ownsGroup;if(x)try{Ji(x)}finally{Fi=null,y(x)}}var Ii=null;function Wr(a,y){var x=rn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Fi?E=Fi.delayedCallbacks:Ii?E=Ii:(E=Ii=[],setTimeout(_i,0));for(var te=function(se){E.push(function(){return x[se].apply(null,b)})},ie=0;ie<x.length;++ie)te(ie)}}function _i(){var a=Ii;Ii=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 te=y.changes[E];te=="text"?lo(a,y):te=="gutter"?Bn(a,y,x,b):te=="class"?wn(a,y):te=="widget"&&Dn(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=We("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&ye<8&&(a.node.style.zIndex=2)),a.node}function Qr(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=Zi(y);y.background=b.insertBefore(We("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):ei(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){Qr(a,y),y.line.wrapClass?Zi(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function Bn(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=Zi(y);y.gutterBackground=We("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var te=y.line.gutterMarkers;if(a.options.lineNumbers||te){var ie=Zi(y),se=y.gutter=We("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(se),ie.insertBefore(se,y.text),y.line.gutterClass&&(se.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(y.lineNumber=se.appendChild(We("div",bt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),te)for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var de=a.display.gutterSpecs[ce].className,we=te.hasOwnProperty(de)&&te[de];we&&se.appendChild(We("div",[we],"CodeMirror-gutter-elt","left: "+b.gutterLeft[de]+"px; width: "+b.gutterWidth[de]+"px"))}}}function Dn(a,y,x){y.alignable&&(y.alignable=null);for(var b=at("CodeMirror-linewidget"),E=y.node.firstChild,te=void 0;E;E=te)te=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);ur(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),Bn(a,y,x,b),ur(a,y,b),y.node}function ur(a,y,x){if(Tr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Tr(a,y.rest[b],y,x,!1)}function Tr(a,y,x,b,E){if(y.widgets)for(var te=Zi(x),ie=0,se=y.widgets;ie<se.length;++ie){var ce=se[ie],de=We("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||de.setAttribute("cm-ignore-events","true"),ji(ce,de,x,b),a.display.input.setUneditable(de),E&&ce.above?te.insertBefore(de,x.gutter||x.text):te.appendChild(de),Wr(ce,"redraw")}}function ji(a,y,x,b){if(a.noHScroll){(x.alignable||(x.alignable=[])).push(y);var E=b.wrapperWidth;y.style.left=b.fixedPos+"px",a.coverGutter||(E-=b.gutterTotalWidth,y.style.paddingLeft=b.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-b.gutterTotalWidth+"px"))}function gi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Ge(document.body,a.node)){var x="position: relative;";a.coverGutter&&(x+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(x+="width: "+y.display.wrapper.clientWidth+"px;"),Ke(y.display.measure,We("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=tr(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 Vr(a){return a.lineSpace.offsetTop}function Wi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ke(a.measure,We("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 Mi(a){return Ne-a.display.nativeBarWidth}function qi(a){return a.display.scroller.clientWidth-Mi(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Mi(a)-a.display.barHeight}function Gi(a,y,x){var b=a.options.lineWrapping,E=b&&qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var te=y.measure.heights=[];if(b){y.measure.width=E;for(var ie=y.text.firstChild.getClientRects(),se=0;se<ie.length-1;se++){var ce=ie[se],de=ie[se+1];Math.abs(ce.bottom-de.bottom)>2&&te.push((ce.bottom+de.top)/2-x.top)}}te.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(Pe(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=qt(y);var x=Pe(y),b=a.display.externalMeasured=new to(a.doc,y,x);b.lineN=x;var E=b.built=ei(a,b);return b.text=E.pre,Ke(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return zi(a,uo(a,y),x,b)}function $i(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=Pe(y),b=$i(a,x);b&&!b.text?b=null:b&&b.changes&&(so(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=Ga(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 zi(a,y,x,b,E){y.before&&(x=-1);var te=x+(b||""),ie;return y.cache.hasOwnProperty(te)?ie=y.cache[te]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Gi(a,y.view,y.rect),y.hasHeights=!0),ie=wa(a,y,x,b),ie.bogus||(y.cache[te]=ie)),{left:ie.left,right:ie.right,top:E?ie.rtop:ie.top,bottom:E?ie.rbottom:ie.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,te,ie,se,ce,de=0;de<a.length;de+=3)if(se=a[de],ce=a[de+1],y<se?(E=0,te=1,ie="left"):y<ce?(E=y-se,te=E+1):(de==a.length-3||y==ce&&a[de+3]>y)&&(te=ce-se,E=te-1,y>=ce&&(ie="right")),E!=null){if(b=a[de+2],se==ce&&x==(b.insertLeft?"left":"right")&&(ie=x),x=="left"&&E==0)for(;de&&a[de-2]==a[de-3]&&a[de-1].insertLeft;)b=a[(de-=3)+2],ie="left";if(x=="right"&&E==ce-se)for(;de<a.length-3&&a[de+3]==a[de+4]&&!a[de+5].insertLeft;)b=a[(de+=3)+2],ie="right";break}return{node:b,start:E,end:te,collapse:ie,coverStart:se,coverEnd:ce}}function Ua(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),te=E.node,ie=E.start,se=E.end,ce=E.collapse,de;if(te.nodeType==3){for(var we=0;we<4;we++){for(;ie&&je(y.line.text.charAt(E.coverStart+ie));)--ie;for(;E.coverStart+se<E.coverEnd&&je(y.line.text.charAt(E.coverStart+se));)++se;if(me&&ye<9&&ie==0&&se==E.coverEnd-E.coverStart?de=te.parentNode.getBoundingClientRect():de=Ua(Ae(te,ie,se).getClientRects(),b),de.left||de.right||ie==0)break;se=ie,ie=ie-1,ce="right"}me&&ye<11&&(de=Va(a.display.measure,de))}else{ie>0&&(ce=b="right");var Se;a.options.lineWrapping&&(Se=te.getClientRects()).length>1?de=Se[b=="right"?Se.length-1:0]:de=te.getBoundingClientRect()}if(me&&ye<9&&!ie&&(!de||!de.left&&!de.right)){var Je=te.parentNode.getClientRects()[0];Je?de={left:Je.left,right:Je.left+Vi(a.display),top:Je.top,bottom:Je.bottom}:de=ba}for(var Ve=de.top-y.rect.top,Ct=de.bottom-y.rect.top,Pt=(Ve+Ct)/2,Gt=y.view.measure.heights,$t=0;$t<Gt.length-1&&!(Pt<Gt[$t]);$t++);var ln=$t?Gt[$t-1]:0,en=Gt[$t],hn={left:(ce=="right"?de.right:de.left)-y.rect.left,right:(ce=="left"?de.left:de.right)-y.rect.left,top:ln,bottom:en};return!de.left&&!de.right&&(hn.bogus=!0),a.options.singleCursorHeightPerLine||(hn.rtop=Ve,hn.rbottom=Ct),hn}function Va(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vn(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,Wt(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 Ce&&Le?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return Ce&&Le?-(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+=gi(a.widgets[x]));return y}function To(a,y,x,b,E){if(!E){var te=Jo(y);x.top+=te,x.bottom+=te}if(b=="line")return x;b||(b="local");var ie=Sn(y);if(b=="local"?ie+=Vr(a.display):ie-=a.display.viewOffset,b=="page"||b=="window"){var se=a.display.lineSpace.getBoundingClientRect();ie+=se.top+(b=="window"?0:Ca());var ce=se.left+(b=="window"?0:Xo());x.left+=ce,x.right+=ce}return x.top+=ie,x.bottom+=ie,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();else if(x=="local"||!x){var te=a.display.sizer.getBoundingClientRect();b+=te.left,E+=te.top}var ie=a.display.lineSpace.getBoundingClientRect();return{left:b-ie.left,top:E-ie.top}}function Bo(a,y,x,b,E){return b||(b=pt(a.doc,y.line)),To(a,b,ya(a,b,y.ch,E),x)}function wi(a,y,x,b,E,te){b=b||pt(a.doc,y.line),E||(E=uo(a,b));function ie(Ct,Pt){var Gt=zi(a,E,Ct,Pt?"right":"left",te);return Pt?Gt.left=Gt.right:Gt.right=Gt.left,To(a,b,Gt,x)}var se=kt(b,a.doc.direction),ce=y.ch,de=y.sticky;if(ce>=b.text.length?(ce=b.text.length,de="before"):ce<=0&&(ce=0,de="after"),!se)return ie(de=="before"?ce-1:ce,de=="before");function we(Ct,Pt,Gt){var $t=se[Pt],ln=$t.level==1;return ie(Gt?Ct-1:Ct,ln!=Gt)}var Se=Nt(se,ce,de),Je=xt,Ve=we(ce,Se,de=="before");return Je!=null&&(Ve.other=we(ce,Je,de!="before")),Ve}function qn(a,y){var x=0;y=Et(a.doc,y),a.options.lineWrapping||(x=Vi(a.display)*y.ch);var b=pt(a.doc,y.line),E=Sn(b)+Vr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Rn(a,y,x,b,E){var te=He(a,y,x);return te.xRel=E,b&&(te.outside=b),te}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Rn(b.first,0,null,-1,-1);var E=Be(b,x),te=b.first+b.size-1;if(E>te)return Rn(b.first+b.size-1,pt(b,te).text.length,null,1,1);y<0&&(y=0);for(var ie=pt(b,E);;){var se=Ui(a,ie,E,y,x),ce=jt(ie,se.ch+(se.xRel>0||se.outside>0?1:0));if(!ce)return se;var de=ce.find(1);if(de.line==E)return de;ie=pt(b,E=de.line)}}function hi(a,y,x,b){b-=Jo(y);var E=y.text.length,te=St(function(ie){return zi(a,x,ie-1).bottom<=b},E,0);return E=St(function(ie){return zi(a,x,ie).top>b},te,E),{begin:te,end:E}}function Kr(a,y,x,b){x||(x=uo(a,y));var E=To(a,y,zi(a,x,b),"line").top;return hi(a,y,x,E)}function ni(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Ui(a,y,x,b,E){E-=Sn(y);var te=uo(a,y),ie=Jo(y),se=0,ce=y.text.length,de=!0,we=kt(y,a.doc.direction);if(we){var Se=(a.options.lineWrapping?ro:Hi)(a,y,x,te,we,b,E);de=Se.level!=1,se=de?Se.from:Se.to-1,ce=de?Se.to:Se.from-1}var Je=null,Ve=null,Ct=St(function(kn){var gn=zi(a,te,kn);return gn.top+=ie,gn.bottom+=ie,ni(gn,b,E,!1)?(gn.top<=E&&gn.left<=b&&(Je=kn,Ve=gn),!0):!1},se,ce),Pt,Gt,$t=!1;if(Ve){var ln=b-Ve.left<Ve.right-b,en=ln==de;Ct=Je+(en?0:1),Gt=en?"after":"before",Pt=ln?Ve.left:Ve.right}else{!de&&(Ct==ce||Ct==se)&&Ct++,Gt=Ct==0?"after":Ct==y.text.length?"before":zi(a,te,Ct-(de?1:0)).bottom+ie<=E==de?"after":"before";var hn=wi(a,He(x,Ct,Gt),"line",y,te);Pt=hn.left,$t=E<hn.top?-1:E>=hn.bottom?1:0}return Ct=Dt(y.text,Ct,1),Rn(x,Ct,Gt,$t,b-Pt)}function Hi(a,y,x,b,E,te,ie){var se=St(function(Se){var Je=E[Se],Ve=Je.level!=1;return ni(wi(a,He(x,Ve?Je.to:Je.from,Ve?"before":"after"),"line",y,b),te,ie,!0)},0,E.length-1),ce=E[se];if(se>0){var de=ce.level!=1,we=wi(a,He(x,de?ce.from:ce.to,de?"after":"before"),"line",y,b);ni(we,te,ie,!0)&&we.top>ie&&(ce=E[se-1])}return ce}function ro(a,y,x,b,E,te,ie){var se=hi(a,y,b,ie),ce=se.begin,de=se.end;/\s/.test(y.text.charAt(de-1))&&de--;for(var we=null,Se=null,Je=0;Je<E.length;Je++){var Ve=E[Je];if(!(Ve.from>=de||Ve.to<=ce)){var Ct=Ve.level!=1,Pt=zi(a,b,Ct?Math.min(de,Ve.to)-1:Math.max(ce,Ve.from)).right,Gt=Pt<te?te-Pt+1e9:Pt-te;(!we||Se>Gt)&&(we=Ve,Se=Gt)}}return we||(we=E[E.length-1]),we.from<ce&&(we={from:ce,to:we.to,level:we.level}),we.to>de&&(we={from:we.from,to:de,level:we.level}),we}var Pi;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Pi==null){Pi=We("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Pi.appendChild(document.createTextNode("x")),Pi.appendChild(We("br"));Pi.appendChild(document.createTextNode("x"))}Ke(a.measure,Pi);var x=Pi.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Wt(a.measure),x||1}function Vi(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=We("span","xxxxxxxxxx"),x=We("pre",[y],"CodeMirror-line-like");Ke(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,te=y.gutters.firstChild,ie=0;te;te=te.nextSibling,++ie){var se=a.display.gutterSpecs[ie].className;x[se]=te.offsetLeft+te.clientLeft+E,b[se]=te.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Ai(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Vi(a.display)-3);return function(E){if(Qt(a.doc,E))return 0;var te=0;if(E.widgets)for(var ie=0;ie<E.widgets.length;ie++)E.widgets[ie].height&&(te+=E.widgets[ie].height);return x?te+(Math.ceil(E.text.length/b)||1)*y:te+y}}function Ya(a){var y=a.doc,x=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&&tr(y).getAttribute("cm-not-content")=="true")return null;var te,ie,se=E.lineSpace.getBoundingClientRect();try{te=y.clientX-se.left,ie=y.clientY-se.top}catch(Se){return null}var ce=ci(a,te,ie),de;if(b&&ce.xRel>0&&(de=pt(a.doc,ce.line).text).length==ce.ch){var we=pe(de,de.length,a.options.tabSize)-de.length;ce=He(ce.line,Math.max(0,Math.round((te-Qi(a.display).left)/Vi(a.display))-we))}return ce}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 Ci(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)Yn&&zt(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)Yn&&Bt(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 te=ka(a,x,x+b,1);te?(E.view=E.view.slice(te.index),E.viewFrom=te.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 se=ka(a,y,y,-1),ce=ka(a,x,x+b,1);se&&ce?(E.view=E.view.slice(0,se.index).concat(ti(a,se.lineN,ce.lineN)).concat(E.view.slice(ce.index)),E.viewTo+=b):fo(a)}var de=E.externalMeasured;de&&(x<de.lineN?de.lineN+=b:y<de.lineN+de.size&&(E.externalMeasured=null))}function ho(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var te=b.view[So(a,y)];if(te.node!=null){var ie=te.changes||(te.changes=[]);xe(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),te,ie=a.display.view;if(!Yn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var se=a.display.viewFrom,ce=0;ce<E;ce++)se+=ie[ce].size;if(se!=y){if(b>0){if(E==ie.length-1)return null;te=se+ie[E].size-y,E++}else te=se-y;y+=te,x+=te}for(;zt(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 Wl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=ti(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=ti(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(ti(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(),te=b.selection=document.createDocumentFragment(),ie=0;ie<x.sel.ranges.length;ie++)if(!(!y&&ie==x.sel.primIndex)){var se=x.sel.ranges[ie];if(!(se.from().line>=a.display.viewTo||se.to().line<a.display.viewFrom)){var ce=se.empty();(ce||a.options.showCursorWhenSelecting)&&ks(a,se.head,E),ce||zl(a,se,te)}}return b}function ks(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(We("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var te=x.appendChild(We("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=b.other.left+"px",te.style.top=b.other.top+"px",te.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function zl(a,y,x){var b=a.display,E=a.doc,te=document.createDocumentFragment(),ie=Qi(a.display),se=ie.left,ce=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-ie.right,de=E.direction=="ltr";function we(en,hn,kn,gn){hn<0&&(hn=0),hn=Math.round(hn),gn=Math.round(gn),te.appendChild(We("div",null,"CodeMirror-selected","position: absolute; left: "+en+`px;
|
|
top: `+hn+"px; width: "+(kn==null?ce-en:kn)+`px;
|
|
height: `+(gn-hn)+"px"))}function Se(en,hn,kn){var gn=pt(E,en),Zn=gn.text.length,Br,si;function Zr(qr,Ei){return Bo(a,He(en,qr),"div",gn,Ei)}function Bi(qr,Ei,di){var ri=Kr(a,gn,null,qr),$r=Ei=="ltr"==(di=="after")?"left":"right",Ur=di=="after"?ri.begin:ri.end-(/\s/.test(gn.text.charAt(ri.end-1))?2:1);return Zr(Ur,$r)[$r]}var ki=kt(gn,E.direction);return yt(ki,hn||0,kn==null?Zn:kn,function(qr,Ei,di,ri){var $r=di=="ltr",Ur=Zr(qr,$r?"left":"right"),Li=Zr(Ei-1,$r?"right":"left"),Uo=hn==null&&qr==0,bo=kn==null&&Ei==Zn,pi=ri==0,eo=!ki||ri==ki.length-1;if(Li.top-Ur.top<=3){var li=(de?Uo:bo)&&pi,bs=(de?bo:Uo)&&eo,oo=li?se:($r?Ur:Li).left,Mo=bs?ce:($r?Li:Ur).right;we(oo,Ur.top,Mo-oo,Ur.bottom)}else{var Po,bi,Vo,xs;$r?(Po=de&&Uo&&pi?se:Ur.left,bi=de?ce:Bi(qr,di,"before"),Vo=de?se:Bi(Ei,di,"after"),xs=de&&bo&&eo?ce:Li.right):(Po=de?Bi(qr,di,"before"):se,bi=!de&&Uo&&pi?ce:Ur.right,Vo=!de&&bo&&eo?se:Li.left,xs=de?Bi(Ei,di,"after"):ce),we(Po,Ur.top,bi-Po,Ur.bottom),Ur.bottom<Li.top&&we(se,Ur.bottom,null,Li.top),we(Vo,Li.top,xs-Vo,Li.bottom)}(!Br||Ea(Ur,Br)<0)&&(Br=Ur),Ea(Li,Br)<0&&(Br=Li),(!si||Ea(Ur,si)<0)&&(si=Ur),Ea(Li,si)<0&&(si=Li)}),{start:Br,end:si}}var Je=y.from(),Ve=y.to();if(Je.line==Ve.line)Se(Je.line,Je.ch,Ve.ch);else{var Ct=pt(E,Je.line),Pt=pt(E,Ve.line),Gt=qt(Ct)==qt(Pt),$t=Se(Je.line,Je.ch,Gt?Ct.text.length+1:null).end,ln=Se(Ve.line,Gt?0:null,Ve.ch).start;Gt&&($t.top<ln.top-2?(we($t.right,$t.top,null,$t.bottom),we(se,ln.top,ln.left,ln.bottom)):we($t.right,$t.top,ln.left-$t.right,$t.bottom)),$t.bottom<ln.top&&we(se,$t.bottom,null,ln.top)}x.appendChild(te)}function Xa(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Fo(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,Fo(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Jt(a,"focus",a,y),a.state.focused=!0,Oe(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 Fo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Jt(a,"blur",a,y),a.state.focused=!1,ot(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],te=a.options.lineWrapping,ie=void 0,se=0;if(!E.hidden){if(me&&ye<8){var ce=E.node.offsetTop+E.node.offsetHeight;ie=ce-x,x=ce}else{var de=E.node.getBoundingClientRect();ie=de.bottom-de.top,!te&&E.text.firstChild&&(se=E.text.firstChild.getBoundingClientRect().right-de.left-1)}var we=E.line.height-ie;if((we>.005||we<-.005)&&(jn(E.line,ie),Ds(E.line),E.rest))for(var Se=0;Se<E.rest.length;Se++)Ds(E.rest[Se]);if(se>a.display.sizerWidth){var Je=Math.ceil(se/Vi(a.display));Je>a.display.maxLineLength&&(a.display.maxLineLength=Je,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-Vr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,te=Be(y,b),ie=Be(y,E);if(x&&x.ensure){var se=x.ensure.from.line,ce=x.ensure.to.line;se<te?(te=se,ie=Be(y,Sn(pt(y,se))+a.wrapper.clientHeight)):Math.min(ce,y.lastLine())>=ie&&(te=Be(y,Sn(pt(y,ce))-a.wrapper.clientHeight),ie=ce)}return{from:te,to:Math.max(ie,te+1)}}function Hl(a,y){if(!ht(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&&!st){var te=We("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-x.viewOffset-Vr(a.display))+`px;
|
|
height: `+(y.bottom-y.top+Mi(a)+x.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(te),te.scrollIntoView(E),a.display.lineSpace.removeChild(te)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?He(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?He(y.line,y.ch+1,"before"):y);for(var te=0;te<5;te++){var ie=!1,se=wi(a,y),ce=!x||x==y?se:wi(a,x);E={left:Math.min(se.left,ce.left),top:Math.min(se.top,ce.top)-b,right:Math.max(se.left,ce.left),bottom:Math.max(se.bottom,ce.bottom)+b};var de=Qa(a,E),we=a.doc.scrollTop,Se=a.doc.scrollLeft;if(de.scrollTop!=null&&($o(a,de.scrollTop),Math.abs(a.doc.scrollTop-we)>1&&(ie=!0)),de.scrollLeft!=null&&(ko(a,de.scrollLeft),Math.abs(a.doc.scrollLeft-Se)>1&&(ie=!0)),!ie)break}return E}function jl(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=Ai(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,te=no(a),ie={};y.bottom-y.top>te&&(y.bottom=y.top+te);var se=a.doc.height+Wi(x),ce=y.top<b,de=y.bottom>se-b;if(y.top<E)ie.scrollTop=ce?0:y.top;else if(y.bottom>E+te){var we=Math.min(y.top,(de?se:y.bottom)-te);we!=E&&(ie.scrollTop=we)}var Se=a.options.fixedGutter?0:x.gutters.offsetWidth,Je=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Se,Ve=qi(a)-x.gutters.offsetWidth,Ct=y.right-y.left>Ve;return Ct&&(y.right=y.left+Ve),y.left<10?ie.scrollLeft=0:y.left<Je?ie.scrollLeft=Math.max(0,y.left+Se-(Ct?0:10)):y.right>Ve+Je-3&&(ie.scrollLeft=y.right+(Ct?0:10)-Ve),ie}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Io(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 Gl(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||(ae||es(a,{top:y}),Ps(a,y,!0),ae&&es(a),na(a,100))}function Ps(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,Is(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+Wi(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+Mi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=We("div",[We("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=We("div",[We("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Mt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Mt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&ye<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 te=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},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=De&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new le,this.disableVert=new le},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),te=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);te!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},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 Ro(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 Ts={native:Eo,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ot(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ts[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Mt(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&&Oe(a.display.wrapper,a.display.scrollbars.addClass)}var Ul=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:++Ul},ao(a.curOp)}function Do(a){var y=a.curOp;y&&mi(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Vl(x)})}function Vl(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 te=0;te<y.length;te++)Jl(y[te]);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&&Hn(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<x.viewFrom||a.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Pa(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function 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+Mi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-qi(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function 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==Ee();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Ro(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&&Fs(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ps(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ko(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zl(y,Et(b,a.scrollToPos.from),Et(b,a.scrollToPos.to),a.scrollToPos.margin);Hl(y,E)}var te=a.maybeHiddenMarkers,ie=a.maybeUnhiddenMarkers;if(te)for(var se=0;se<te.length;++se)te[se].lines.length||Jt(te[se],"hide");if(ie)for(var ce=0;ce<ie.length;++ce)ie[ce].lines.length&&Jt(ie[ce],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Jt(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Ti(a,y){if(a.curOp)return y();Lo(a);try{return y()}finally{Do(a)}}function oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Lo(a);try{return y.apply(a,arguments)}finally{Do(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Lo(this);try{return a.apply(this,arguments)}finally{Do(this)}}}function ai(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,Qe(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Kn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(te){if(b.line>=a.display.viewFrom){var ie=te.styles,se=te.text.length>a.options.maxHighlightLength?_n(y.mode,b.state):null,ce=mn(a,te,b,!0);se&&(b.state=se),te.styles=ce.styles;var de=te.styleClasses,we=ce.classes;we?te.styleClasses=we:de&&(te.styleClasses=null);for(var Se=!ie||ie.length!=te.styles.length||de!=we&&(!de||!we||de.bgClass!=we.bgClass||de.textClass!=we.textClass),Je=0;!Se&&Je<ie.length;++Je)Se=ie[Je]!=te.styles[Je];Se&&E.push(b.line),te.stateAfter=b.save(),b.nextLine()}else te.text.length<=a.options.maxHighlightLength&&ar(a,te.text,b),te.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Ti(a,function(){for(var te=0;te<E.length;te++)ho(a,E[te],"text")})}}var Pa=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=qi(a),this.force=x,this.dims=co(a),this.events=[]};Pa.prototype.signal=function(a,y){Ht(a,y)&&this.events.push(arguments)},Pa.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Jt.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=Mi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Mi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ee();if(!y||!Ge(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Ge(a.display.lineDiv,b.anchorNode)&&(x.anchorNode=b.anchorNode,x.anchorOffset=b.anchorOffset,x.focusNode=b.focusNode,x.focusOffset=b.focusOffset)}return x}function tu(a){if(!(!a||!a.activeElt||a.activeElt==Ee())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ge(document.body,a.anchorNode)&&Ge(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return 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;Rs(a)&&(fo(a),y.dims=co(a));var E=b.first+b.size,te=Math.max(y.visible.from-a.options.viewportMargin,b.first),ie=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<te&&te-x.viewFrom<20&&(te=Math.max(b.first,x.viewFrom)),x.viewTo>ie&&x.viewTo-ie<20&&(ie=Math.min(E,x.viewTo)),Yn&&(te=zt(a.doc,te),ie=Bt(a.doc,ie));var se=te!=x.viewFrom||ie!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Wl(a,te,ie),x.viewOffset=Sn(pt(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ce=Cs(a);if(!se&&ce==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var de=eu(a);return ce>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ce>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(de),Wt(x.cursorDiv),Wt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,se&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Fs(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==qi(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Wi(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),Ro(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 Pa(a,y);if($a(a,x)){La(a),Fs(a,x);var b=ea(a);Qo(a),Ro(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,te=b.lineDiv,ie=te.firstChild;function se(Ct){var Pt=Ct.nextSibling;return Fe&&De&&a.display.currentWheelTarget==Ct?Ct.style.display="none":Ct.parentNode.removeChild(Ct),Pt}for(var ce=b.view,de=b.viewFrom,we=0;we<ce.length;we++){var Se=ce[we];if(!Se.hidden)if(!Se.node||Se.node.parentNode!=te){var Je=An(a,Se,de,x);te.insertBefore(Je,ie)}else{for(;ie!=Se.node;)ie=se(ie);var Ve=E&&y!=null&&y<=de&&Se.lineNumber;Se.changes&&(xe(Se.changes,"gutter")>-1&&(Ve=!1),so(a,Se,de,x)),Ve&&(Wt(Se.lineNumber),Se.lineNumber.appendChild(document.createTextNode(bt(a.options,de)))),ie=Se.node.nextSibling}de+=Se.size}for(;ie;)ie=se(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+Mi(a)+"px"}function Is(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,te=b+"px",ie=0;ie<x.length;ie++)if(!x[ie].hidden){a.options.fixedGutter&&(x[ie].gutter&&(x[ie].gutter.style.left=te),x[ie].gutterBackground&&(x[ie].gutterBackground.style.left=te));var se=x[ie].alignable;if(se)for(var ce=0;ce<se.length;ce++)se[ce].style.left=te}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Rs(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=bt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(We("div",[We("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=E.firstChild.offsetWidth,ie=E.offsetWidth-te;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(te,b.lineGutter.offsetWidth-ie)+1,b.lineNumWidth=b.lineNumInnerWidth+ie,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",ts(a.display),!0}return!1}function rs(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var te=a[E],ie=null;if(typeof te!="string"&&(ie=te.style,te=te.className),te=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:te,style:ie})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Os(a){var y=a.gutters,x=a.gutterSpecs;Wt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],te=E.className,ie=E.style,se=y.appendChild(We("div",null,"CodeMirror-gutter "+te));ie&&(se.style.cssText=ie),te=="CodeMirror-linenumbers"&&(a.lineGutter=se,se.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Os(a.display),Ci(a),Is(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=We("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=We("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=vt("div",null,"CodeMirror-code"),E.selectionDiv=We("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=We("div",null,"CodeMirror-cursors"),E.measure=We("div",null,"CodeMirror-measure"),E.lineMeasure=We("div",null,"CodeMirror-measure"),E.lineSpace=vt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var te=vt("div",[E.lineSpace],"CodeMirror-lines");E.mover=We("div",[te],null,"position: relative"),E.sizer=We("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=We("div",null,null,"position: absolute; height: "+Ne+"px; width: 1px;"),E.gutters=We("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=We("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=We("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&ye<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Fe&&!(ae&&Me)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rs(b.gutters,b.lineNumbers),Os(E),x.init(E)}var Aa=0,Ri=null;me?Ri=-.53:ae?Ri=15:Ce?Ri=-.7:tt&&(Ri=-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 iu(a){var y=Ns(a);return y.x*=Ri,y.y*=Ri,y}function _s(a,y){var x=Ns(y),b=x.x,E=x.y,te=a.display,ie=te.scroller,se=ie.scrollWidth>ie.clientWidth,ce=ie.scrollHeight>ie.clientHeight;if(b&&se||E&&ce){if(E&&De&&Fe){e:for(var de=y.target,we=te.view;de!=ie;de=de.parentNode)for(var Se=0;Se<we.length;Se++)if(we[Se].node==de){a.display.currentWheelTarget=de;break e}}if(b&&!ae&&!fe&&Ri!=null){E&&ce&&$o(a,Math.max(0,ie.scrollTop+E*Ri)),ko(a,Math.max(0,ie.scrollLeft+b*Ri)),(!E||E&&ce)&&sn(y),te.wheelStartX=null;return}if(E&&Ri!=null){var Je=E*Ri,Ve=a.doc.scrollTop,Ct=Ve+te.wrapper.clientHeight;Je<0?Ve=Math.max(0,Ve+Je-50):Ct=Math.min(a.doc.height,Ct+Je+50),es(a,{top:Ve,bottom:Ct})}Aa<20&&(te.wheelStartX==null?(te.wheelStartX=ie.scrollLeft,te.wheelStartY=ie.scrollTop,te.wheelDX=b,te.wheelDY=E,setTimeout(function(){if(te.wheelStartX!=null){var Pt=ie.scrollLeft-te.wheelStartX,Gt=ie.scrollTop-te.wheelStartY,$t=Gt&&te.wheelDY&&Gt/te.wheelDY||Pt&&te.wheelDX&&Pt/te.wheelDX;te.wheelStartX=te.wheelStartY=null,$t&&(Ri=(Ri*Aa+$t)/(Aa+1),++Aa)}},200)):(te.wheelDX+=b,te.wheelDY+=E))}}var Oi=function(a,y){this.ranges=a,this.primIndex=y};Oi.prototype.primary=function(){return this.ranges[this.primIndex]},Oi.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(!Vt(x.anchor,b.anchor)||!Vt(x.head,b.head))return!1}return!0},Oi.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new vr(tn(this.ranges[y].anchor),tn(this.ranges[y].head));return new Oi(a,this.primIndex)},Oi.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Oi.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(wt(y,b.from())>=0&&wt(a,b.to())<=0)return x}return-1};var vr=function(a,y){this.anchor=a,this.head=y};vr.prototype.from=function(){return _t(this.anchor,this.head)},vr.prototype.to=function(){return on(this.anchor,this.head)},vr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Je,Ve){return wt(Je.from(),Ve.from())}),x=xe(y,E);for(var te=1;te<y.length;te++){var ie=y[te],se=y[te-1],ce=wt(se.to(),ie.from());if(b&&!ie.empty()?ce>0:ce>=0){var de=_t(se.from(),ie.from()),we=on(se.to(),ie.to()),Se=se.empty()?ie.from()==ie.head:se.from()==se.head;te<=x&&--x,y.splice(--te,2,new vr(Se?we:de,Se?de:we))}}return new Oi(y,x)}function po(a,y){return new Oi([new vr(a,y||a)],0)}function vo(a){return a.text?He(a.from.line+a.text.length-1,ke(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Ws(a,y){if(wt(a,y.from)<0)return a;if(wt(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),He(x,b)}function is(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new vr(Ws(E.anchor,y),Ws(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function zs(a,y,x){return a.line==y.line?He(x.line,a.ch-y.ch+x.ch):He(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=He(a.first,0),te=E,ie=0;ie<y.length;ie++){var se=y[ie],ce=zs(se.from,E,te),de=zs(vo(se),E,te);if(E=se.to,te=de,x=="around"){var we=a.sel.ranges[ie],Se=wt(we.head,we.anchor)<0;b[ie]=new vr(Se?de:ce,Se?ce:de)}else b[ie]=new vr(ce,ce)}return new Oi(b,a.sel.primIndex)}function os(a){a.doc.mode=$n(a.options,a.doc.modeOption),ia(a)}function ia(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,na(a,100),a.state.modeGen++,a.curOp&&Ci(a)}function Hs(a,y){return y.from.ch==0&&y.to.ch==0&&ke(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(ln){return x?x[ln]:null}function te(ln,en,hn){hr(ln,en,hn,b),Wr(ln,"change",ln,y)}function ie(ln,en){for(var hn=[],kn=ln;kn<en;++kn)hn.push(new dr(de[kn],E(kn),b));return hn}var se=y.from,ce=y.to,de=y.text,we=pt(a,se.line),Se=pt(a,ce.line),Je=ke(de),Ve=E(de.length-1),Ct=ce.line-se.line;if(y.full)a.insert(0,ie(0,de.length)),a.remove(de.length,a.size-de.length);else if(Hs(a,y)){var Pt=ie(0,de.length-1);te(Se,Se.text,Ve),Ct&&a.remove(se.line,Ct),Pt.length&&a.insert(se.line,Pt)}else if(we==Se)if(de.length==1)te(we,we.text.slice(0,se.ch)+Je+we.text.slice(ce.ch),Ve);else{var Gt=ie(1,de.length-1);Gt.push(new dr(Je+we.text.slice(ce.ch),Ve,b)),te(we,we.text.slice(0,se.ch)+de[0],E(0)),a.insert(se.line+1,Gt)}else if(de.length==1)te(we,we.text.slice(0,se.ch)+de[0]+Se.text.slice(ce.ch),E(0)),a.remove(se.line+1,Ct);else{te(we,we.text.slice(0,se.ch)+de[0],E(0)),te(Se,Je+Se.text.slice(ce.ch),Ve);var $t=ie(1,de.length-1);Ct>1&&a.remove(se.line+1,Ct-1),a.insert(se.line+1,$t)}Wr(a,"change",a,y)}function mo(a,y,x){function b(E,te,ie){if(E.linked)for(var se=0;se<E.linked.length;++se){var ce=E.linked[se];if(ce.doc!=te){var de=ie&&ce.sharedHist;x&&!de||(y(ce.doc,de),b(ce.doc,E,de))}}}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),js(a),a.options.lineWrapping||Hn(a),a.options.mode=y.modeOption,Ci(a)}function js(a){(a.doc.direction=="rtl"?Oe:ot)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Ti(a,function(){js(a),Ci(a)})}function Ta(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ss(a,y){var x={from:tn(y.from),to:vo(y),text:Yt(a,y.from,y.to)};return Vs(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Vs(b,x,y.from.line,y.to.line+1)},!0),x}function Gs(a){for(;a.length;){var y=ke(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return Gs(a.done),ke(a.done);if(a.done.length&&!ke(a.done).ranges)return ke(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ke(a.done)}function Us(a,y,x,b){var E=a.history;E.undone.length=0;var te=+new Date,ie,se;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>te-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ie=su(E,E.lastOp==b)))se=ke(ie.changes),wt(y.from,y.to)==0&&wt(y.from,se.to)==0?se.to=vo(y):ie.changes.push(ss(a,y));else{var ce=ke(E.done);for((!ce||!ce.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=te,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,se||Jt(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,te=b&&b.origin;x==E.lastSelOp||te&&E.lastSelOrigin==te&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==te||lu(a,te,ke(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=te,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gs(E.undone)}function Ba(a,y){var x=ke(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Vs(a,y,x,b){var E=y["spans_"+a.id],te=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(ie){ie.markedSpans&&((E||(E=y["spans_"+a.id]={}))[te]=ie.markedSpans),++te})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function du(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Ks(a,y){var x=du(a,y),b=Mr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var te=x[E],ie=b[E];if(te&&ie)e:for(var se=0;se<ie.length;++se){for(var ce=ie[se],de=0;de<te.length;++de)if(te[de].marker==ce.marker)continue e;te.push(ce)}else ie&&(x[E]=ie)}return x}function Oo(a,y,x){for(var b=[],E=0;E<a.length;++E){var te=a[E];if(te.ranges){b.push(x?Oi.prototype.deepCopy.call(te):te);continue}var ie=te.changes,se=[];b.push({changes:se});for(var ce=0;ce<ie.length;++ce){var de=ie[ce],we=void 0;if(se.push({from:de.from,to:de.to,text:de.text}),y)for(var Se in de)(we=Se.match(/^spans_(\d+)$/))&&xe(y,Number(we[1]))>-1&&(ke(se)[Se]=de[Se],delete de[Se])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var te=wt(y,E)<0;te!=wt(x,E)<0?(E=y,y=x):te!=wt(y,x)<0&&(y=x)}return new vr(E,y)}else return new vr(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),fi(a,new Oi([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),te=0;te<a.sel.ranges.length;te++)b[te]=ls(a.sel.ranges[te],y[te],null,E);var ie=Ki(a.cm,b,a.sel.primIndex);fi(a,ie,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,fi(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){fi(a,po(y,x),b)}function hu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var te=0;te<E.length;te++)this.ranges[te]=new vr(Et(a,E[te].anchor),Et(a,E[te].head))},origin:x&&x.origin};return Jt(a,"beforeSelectionChange",a,b),a.cm&&Jt(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ki(a.cm,b.ranges,b.ranges.length-1):y}function Js(a,y,x){var b=a.history.done,E=ke(b);E&&E.ranges?(b[b.length-1]=y,Ia(a,y,x)):fi(a,y,x)}function fi(a,y,x){Ia(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ia(a,y,x){(Ht(a,"beforeSelectionChange")||a.cm&&Ht(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,x));var b=x&&x.bias||(wt(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Io(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,cn(a.cm)),Wr(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,te=0;te<y.ranges.length;te++){var ie=y.ranges[te],se=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[te],ce=Ra(a,ie.anchor,se&&se.anchor,x,b),de=Ra(a,ie.head,se&&se.head,x,b);(E||ce!=ie.anchor||de!=ie.head)&&(E||(E=y.ranges.slice(0,te)),E[te]=new vr(ce,de))}return E?Ki(a.cm,E,y.primIndex):y}function No(a,y,x,b,E){var te=pt(a,y.line);if(te.markedSpans)for(var ie=0;ie<te.markedSpans.length;++ie){var se=te.markedSpans[ie],ce=se.marker,de="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,we="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((se.from==null||(de?se.from<=y.ch:se.from<y.ch))&&(se.to==null||(we?se.to>=y.ch:se.to>y.ch))){if(E&&(Jt(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(te.markedSpans){--ie;continue}else break;if(!ce.atomic)continue;if(x){var Se=ce.find(b<0?1:-1),Je=void 0;if((b<0?we:de)&&(Se=el(a,Se,-b,Se&&Se.line==y.line?te:null)),Se&&Se.line==y.line&&(Je=wt(Se,x))&&(b<0?Je<0:Je>0))return No(a,Se,y,b,E)}var Ve=ce.find(b<0?-1:1);return(b<0?de:we)&&(Ve=el(a,Ve,b,Ve.line==y.line?te:null)),Ve?No(a,Ve,y,b,E):null}}return y}function Ra(a,y,x,b,E){var te=b||1,ie=No(a,y,x,te,E)||!E&&No(a,y,x,te,!0)||No(a,y,x,-te,E)||!E&&No(a,y,x,-te,!0);return ie||(a.cantEdit=!0,He(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Et(a,He(y.line-1)):null:x>0&&y.ch==(b||pt(a,y.line)).text.length?y.line<a.first+a.size-1?He(y.line+1,0):null:new He(y.line,y.ch+x)}function tl(a){a.setSelection(He(a.firstLine(),0),He(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,te,ie,se){E&&(b.from=Et(a,E)),te&&(b.to=Et(a,te)),ie&&(b.text=ie),se!==void 0&&(b.origin=se)}),Jt(a,"beforeChange",a,b),a.cm&&Jt(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 oi(a.cm,_o)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Ht(a,"beforeChange")||a.cm&&Ht(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=fr&&!x&&Jr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&wt(y.from,y.to)==0)){var x=is(a,y);Us(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Mr(a,y));var b=[];mo(a,function(E,te){!te&&xe(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Mr(E,y))})}}function Oa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,te,ie=a.sel,se=y=="undo"?E.done:E.undone,ce=y=="undo"?E.undone:E.done,de=0;de<se.length&&(te=se[de],!(x?te.ranges&&!te.equals(a.sel):!te.ranges));de++);if(de!=se.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(te=se.pop(),te.ranges){if(Ba(te,ce),x&&!te.equals(a.sel)){fi(a,te,{clearRedo:!1});return}ie=te}else if(b){se.push(te);return}else break;var we=[];Ba(ie,ce),ce.push({changes:we,generation:E.generation}),E.generation=te.generation||++E.maxGeneration;for(var Se=Ht(a,"beforeChange")||a.cm&&Ht(a.cm,"beforeChange"),Je=function(Pt){var Gt=te.changes[Pt];if(Gt.origin=y,Se&&!nl(a,Gt,!1))return se.length=0,{};we.push(ss(a,Gt));var $t=Pt?is(a,Gt):ke(se);oa(a,Gt,$t,Ks(a,Gt)),!Pt&&a.cm&&a.cm.scrollIntoView({from:Gt.from,to:vo(Gt)});var ln=[];mo(a,function(en,hn){!hn&&xe(ln,en.history)==-1&&(sl(en.history,Gt),ln.push(en.history)),oa(en,Gt,null,Ks(en,Gt))})},Ve=te.changes.length-1;Ve>=0;--Ve){var Ct=Je(Ve);if(Ct)return Ct.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Oi(et(a.sel.ranges,function(E){return new vr(He(E.anchor.line+y,E.anchor.ch),He(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Ci(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 oi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){il(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);il(a,E),y={from:He(a.first,0),to:He(y.to.line+E,y.to.ch),text:[ke(y.text)],origin:y.origin}}var te=a.lastLine();y.to.line>te&&(y={from:y.from,to:He(te,pt(a,te).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Yt(a,y.from,y.to),x||(x=is(a,y)),a.cm?fu(a.cm,y,b):as(a,y,b),Ia(a,x,be),a.cantEdit&&Ra(a,He(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,te=y.from,ie=y.to,se=!1,ce=te.line;a.options.lineWrapping||(ce=Pe(qt(pt(b,te.line))),b.iter(ce,ie.line+1,function(Ve){if(Ve==E.maxLine)return se=!0,!0})),b.sel.contains(y.from,y.to)>-1&&cn(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(ce,te.line+y.text.length,function(Ve){var Ct=Qn(Ve);Ct>E.maxLineLength&&(E.maxLine=Ve,E.maxLineLength=Ct,E.maxLineChanged=!0,se=!1)}),se&&(a.curOp.updateMaxLine=!0)),Cr(b,te.line),na(a,400);var de=y.text.length-(ie.line-te.line)-1;y.full?Ci(a):te.line==ie.line&&y.text.length==1&&!Hs(a.doc,y)?ho(a,te.line,"text"):Ci(a,te.line,ie.line+1,de);var we=Ht(a,"changes"),Se=Ht(a,"change");if(Se||we){var Je={from:te,to:ie,text:y.text,removed:y.removed,origin:y.origin};Se&&Wr(a,"change",a,Je),we&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Je)}a.display.selForContextMenu=null}function Wo(a,y,x,b,E){var te;b||(b=x),wt(b,x)<0&&(te=[b,x],x=te[0],b=te[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 te=a[E],ie=!0;if(te.ranges){te.copied||(te=a[E]=te.deepCopy(),te.copied=!0);for(var se=0;se<te.ranges.length;se++)ol(te.ranges[se].anchor,y,x,b),ol(te.ranges[se].head,y,x,b);continue}for(var ce=0;ce<te.changes.length;++ce){var de=te.changes[ce];if(x<de.from.line)de.from=He(de.from.line+b,de.from.ch),de.to=He(de.to.line+b,de.to.ch);else if(y<=de.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,te=y;return typeof y=="number"?te=pt(a,Kt(a,y)):E=Pe(y),E==null?null:(b(te,E)&&a.cm&&ho(a.cm,E,x),te)}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,pr(E),Wr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function 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 te=Math.min(y,E-a),ie=b.height;if(b.removeInner(a,te),this.height-=ie-b.height,E==te&&(this.children.splice(x--,1),b.parent=null),(y-=te)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var se=[];this.collapse(se),this.children=[new sa(se)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],te=E.chunkSize();if(a<=te){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var ie=E.lines.length%25+25,se=ie;se<E.lines.length;){var ce=new sa(E.lines.slice(se,se+=25));E.height-=ce.height,this.children.splice(++b,0,ce),ce.parent=this}E.lines=E.lines.slice(0,ie),this.maybeSpill()}break}a-=te}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=xe(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],te=E.chunkSize();if(a<te){var ie=Math.min(y,te-a);if(E.iterN(a,ie,x))return!0;if((y-=ie)==0)break;a=0}else a-=te}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Pe(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var te=gi(this);jn(x,Math.max(0,x.height-te)),a&&(Ti(a,function(){ll(a,x,-te),ho(a,b,"widget")}),Wr(a,"lineWidgetCleared",a,this,b))}},ua.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=gi(this)-y;E&&(Qt(this.doc,b)||jn(b,b.height+E),x&&Ti(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Wr(x,"lineWidgetChanged",x,a,Pe(b))}))},Ut(ua);function ll(a,y,x){Sn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),te=a.cm;return te&&E.noHScroll&&(te.display.alignWidgets=!0),aa(a,y,"widget",function(ie){var se=ie.widgets||(ie.widgets=[]);if(E.insertAt==null?se.push(E):se.splice(Math.min(se.length-1,Math.max(0,E.insertAt)),0,E),E.line=ie,te&&!Qt(a,ie)){var ce=Sn(ie)<a.scrollTop;jn(ie,ie.height+gi(E)),ce&&qa(te,E.height),te.curOp.forceUpdate=!0}return!0}),te&&Wr(te,"lineWidgetAdded",te,E,typeof y=="number"?y:Pe(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),Ht(this,"clear")){var x=this.find();x&&Wr(this,"clear",x.from,x.to)}for(var b=null,E=null,te=0;te<this.lines.length;++te){var ie=this.lines[te],se=yr(ie.markedSpans,this);a&&!this.collapsed?ho(a,Pe(ie),"text"):a&&(se.to!=null&&(E=Pe(ie)),se.from!=null&&(b=Pe(ie))),ie.markedSpans=Sr(ie.markedSpans,se),se.from==null&&this.collapsed&&!Qt(this.doc,ie)&&a&&jn(ie,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var de=qt(this.lines[ce]),we=Qn(de);we>a.display.maxLineLength&&(a.display.maxLine=de,a.display.maxLineLength=we,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Ci(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&&Wr(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 te=this.lines[E],ie=yr(te.markedSpans,this);if(ie.from!=null&&(x=He(y?te:Pe(te),ie.from),a==-1))return x;if(ie.to!=null&&(b=He(y?te:Pe(te),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||Ti(b,function(){var E=y.line,te=Pe(y.line),ie=$i(b,te);if(ie&&(Ko(ie),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!Qt(x.doc,E)&&x.height!=null){var se=x.height;x.height=null;var ce=gi(x)-se;ce&&jn(E,E.height+ce)}Wr(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||xe(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(xe(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Ut(go);function zo(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return oi(a.cm,zo)(a,y,x,b,E);var te=new go(a,E),ie=wt(y,x);if(b&&ut(b,te,!1),ie>0||ie==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=vt("span",[te.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(dn(a,y.line,y,x,te)||y.line!=x.line&&dn(a,x.line,y,x,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");cr()}te.addToHistory&&Us(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var se=y.line,ce=a.cm,de;if(a.iter(se,x.line+1,function(Se){ce&&te.collapsed&&!ce.options.lineWrapping&&qt(Se)==ce.display.maxLine&&(de=!0),te.collapsed&&se!=y.line&&jn(Se,0),lr(Se,new Xn(te,se==y.line?y.ch:null,se==x.line?x.ch:null)),++se}),te.collapsed&&a.iter(y.line,x.line+1,function(Se){Qt(a,Se)&&jn(Se,0)}),te.clearOnEnter&&Mt(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(Ar(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),te.collapsed&&(te.id=++ul,te.atomic=!0),ce){if(de&&(ce.curOp.updateMaxLine=!0),te.collapsed)Ci(ce,y.line,x.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var we=y.line;we<=x.line;we++)ho(ce,we,"text");te.atomic&&qs(ce.doc),Wr(ce,"markerAdded",ce,te)}return te}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Wr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Ut(ca);function vu(a,y,x,b,E){b=ut(b),b.shared=!1;var te=[zo(a,y,x,b,E)],ie=te[0],se=b.widgetNode;return mo(a,function(ce){se&&(b.widgetNode=se.cloneNode(!0)),te.push(zo(ce,Et(ce,y),Et(ce,x),b,E));for(var de=0;de<ce.linked.length;++de)if(ce.linked[de].isParent)return;ie=ke(te)}),new ca(te,ie)}function cl(a){return a.findMarks(He(a.first,0),a.clipPos(He(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),te=a.clipPos(E.from),ie=a.clipPos(E.to);if(wt(te,ie)){var se=zo(a,te,ie,b.primary,b.primary.type);b.markers.push(se),se.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],te=[E.primary.doc];mo(E.primary.doc,function(ce){return te.push(ce)});for(var ie=0;ie<E.markers.length;ie++){var se=E.markers[ie];xe(te,se.doc)==-1&&(se.parent=null,E.markers.splice(ie--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Si=function(a,y,x,b,E){if(!(this instanceof Si))return new Si(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new dr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var te=He(x,0);this.sel=po(te),this.history=new Ta(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),as(this,{from:te,to:te,text:a}),fi(this,po(te),be)};Si.prototype=ee(la.prototype,{constructor:Si,iter:function(a,y,x){x?this.iterN(a-this.first,y-a,x):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var x=0,b=0;b<y.length;++b)x+=y[b].height;this.insertInner(a-this.first,y,x)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=En(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=He(this.first,0),x=this.first+this.size-1;_o(this,{from:y,to:He(x,pt(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),fi(this,po(y),be)}),replaceRange:function(a,y,x,b){y=Et(this,y),x=x?Et(this,x):y,Wo(this,a,y,x,b)},getRange:function(a,y,x){var b=Yt(this,Et(this,a),Et(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(Tt(this,a))return pt(this,a)},getLineNumber:function(a){return Pe(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=pt(this,a)),qt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Et(this,a)},getCursor:function(a){var y=this.sel.primary(),x;return a==null||a=="head"?x=y.head:a=="anchor"?x=y.anchor:a=="end"||a=="to"||a===!1?x=y.to():x=y.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ai(function(a,y,x){Xs(this,Et(this,typeof a=="number"?He(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xs(this,Et(this,a),Et(this,y||a),x)}),extendSelection:ai(function(a,y,x){Fa(this,Et(this,a),y&&Et(this,y),x)}),extendSelections:ai(function(a,y){Ys(this,Xt(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=et(this.sel.ranges,a);Ys(this,Xt(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new vr(Et(this,a[E].anchor),Et(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),fi(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new vr(Et(this,a),Et(this,y||a))),fi(this,Ki(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Yt(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=Yt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:ai(function(a,y,x){for(var b=[],E=this.sel,te=0;te<E.ranges.length;te++){var ie=E.ranges[te];b[te]={from:ie.from(),to:ie.to(),text:this.splitLines(a[te]),origin:x}}for(var se=y&&y!="end"&&ou(this,b,y),ce=b.length-1;ce>=0;ce--)_o(this,b[ce]);se?Js(this,se):this.cm&&Io(this.cm)}),undo:ai(function(){Oa(this,"undo")}),redo:ai(function(){Oa(this,"redo")}),undoSelection:ai(function(){Oa(this,"undo",!0)}),redoSelection:ai(function(){Oa(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Ta(this.history.maxGeneration),mo(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Oo(this.history.done),undone:Oo(this.history.undone)}},setHistory:function(a){var y=this.history=new Ta(this.history.maxGeneration);y.done=Oo(a.done.slice(0),null,!0),y.undone=Oo(a.undone.slice(0),null,!0)},setGutterMarker:ai(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:ai(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(!Tt(this,a)||(y=a,a=pt(this,a),!a))return null}else if(y=Pe(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:ai(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(at(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ai(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",te=b[E];if(te)if(x==null)b[E]=null;else{var ie=te.match(at(x));if(!ie)return!1;var se=ie.index+ie[0].length;b[E]=te.slice(0,ie.index)+(!ie.index||se==te.length?"":" ")+te.slice(se)||null}else return!1;return!0})}),addLineWidget:ai(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return zo(this,Et(this,a),Et(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=Et(this,a),zo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Et(this,a);var y=[],x=pt(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=Et(this,a),y=Et(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(te){var ie=te.markedSpans;if(ie)for(var se=0;se<ie.length;se++){var ce=ie[se];!(ce.to!=null&&E==a.line&&a.ch>=ce.to||ce.from==null&&E!=a.line||ce.from!=null&&E==y.line&&ce.from>=y.ch)&&(!x||x(ce.marker))&&b.push(ce.marker.parent||ce.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var te=E.text.length+b;if(te>a)return y=a,!0;a-=te,++x}),Et(this,He(x,y))},indexFromPos:function(a){a=Et(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 Si(En(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,x=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<x&&(x=a.to);var b=new Si(En(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(b,cl(this)),b},unlinkDoc:function(a){if(a instanceof Hr&&(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 Ta(null),a.history.done=Oo(this.history.done,b),a.history.undone=Oo(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):ir(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:ai(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&au(this.cm))})}),Si.prototype.eachLine=Si.prototype.iter;var dl=0;function bu(a){var y=this;if(hl(y),!(ht(y,a)||ui(y.display,a))){sn(a),me&&(dl=+new Date);var x=Co(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,te=Array(E),ie=0,se=function(){++ie==E&&oi(y,function(){x=Et(y.doc,x);var Ve={from:x,to:x,text:y.doc.splitLines(te.filter(function(Ct){return Ct!=null}).join(y.doc.lineSeparator())),origin:"paste"};_o(y.doc,Ve),Js(y.doc,po(Et(y.doc,x),Et(y.doc,vo(Ve))))})()},ce=function(Ve,Ct){if(y.options.allowDropFileTypes&&xe(y.options.allowDropFileTypes,Ve.type)==-1){se();return}var Pt=new FileReader;Pt.onerror=function(){return se()},Pt.onload=function(){var Gt=Pt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Gt)){se();return}te[Ct]=Gt,se()},Pt.readAsText(Ve)},de=0;de<b.length;de++)ce(b[de],de);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 we=a.dataTransfer.getData("Text");if(we){var Se;if(y.state.draggingText&&!y.state.draggingText.copy&&(Se=y.listSelections()),Ia(y.doc,po(x,x)),Se)for(var Je=0;Je<Se.length;++Je)Wo(y.doc,"",Se[Je].anchor,Se[Je].head,"drag");y.replaceSelection(we,"around","paste"),y.display.input.focus()}}catch(Ve){}}}}function xu(a,y){if(me&&(!a.state.draggingText||+new Date-dl<100)){yn(y);return}if(!(ht(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!tt)){var x=We("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=We("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ke(a.display.dragCursor,b)}}function hl(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 te=0;te<x.length;te++)a(x[te])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;Mt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fl(ku)},100))}),Mt(window,"blur",function(){return fl(Fo)})}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"},da=0;da<10;da++)yo[da+48]=yo[da+96]=String(da);for(var Na=65;Na<=90;Na++)yo[Na]=String.fromCharCode(Na);for(var ha=1;ha<=12;ha++)yo[ha+111]=yo[ha+63235]="F"+ha;var io={};io.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"},io.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"},io.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"},io.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"]},io.default=De?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,te,ie=0;ie<y.length-1;ie++){var se=y[ie];if(/^(cmd|meta|m)$/i.test(se))te=!0;else if(/^a(lt)?$/i.test(se))x=!0;else if(/^(c|ctrl|control)$/i.test(se))b=!0;else if(/^s(hift)?$/i.test(se))E=!0;else throw new Error("Unrecognized modifier name: "+se)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),te&&(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=et(x.split(" "),Eu),te=0;te<E.length;te++){var ie=void 0,se=void 0;te==E.length-1?(se=E.join(" "),ie=b):(se=E.slice(0,te+1).join(" "),ie="...");var ce=y[se];if(!ce)y[se]=ie;else if(ce!=ie)throw new Error("Inconsistent bindings for "+se)}delete a[x]}for(var de in y)a[de]=y[de];return a}function Ho(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 Ho(a,y.fallthrough,x,b);for(var te=0;te<y.fallthrough.length;te++){var ie=Ho(a,y.fallthrough[te],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),(lt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(lt?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"?io[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var te=y(x[E]);b.length&&wt(te.from,ke(b).to)<=0;){var ie=b.pop();if(wt(ie.from,te.from)<0){te.from=ie.from;break}}b.push(te)}Ti(a,function(){for(var se=b.length-1;se>=0;se--)Wo(a.doc,"",b[se].from,b[se].to,"+delete");Io(a)})}function cs(a,y,x){var b=Dt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function ds(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new He(y.line,b,x<0?"after":"before")}function hs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var te=kt(x,y.doc.direction);if(te){var ie=E<0?ke(te):te[0],se=E<0==(ie.level==1),ce=se?"after":"before",de;if(ie.level>0||y.doc.direction=="rtl"){var we=uo(y,x);de=E<0?x.text.length-1:0;var Se=zi(y,we,de).top;de=St(function(Je){return zi(y,we,Je).top==Se},E<0==(ie.level==1)?ie.from:ie.to-1,de),ce=="before"&&(de=cs(x,de,1))}else de=E<0?ie.to:ie.from;return new He(b,de,ce)}}return new He(b,E<0?x.text.length:0,E<0?"before":"after")}function Du(a,y,x,b){var E=kt(y,a.doc.direction);if(!E)return ds(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var te=Nt(E,x.ch,x.sticky),ie=E[te];if(a.doc.direction=="ltr"&&ie.level%2==0&&(b>0?ie.to>x.ch:ie.from<x.ch))return ds(y,x,b);var se=function($t,ln){return cs(y,$t instanceof He?$t.ch:$t,ln)},ce,de=function($t){return a.options.lineWrapping?(ce=ce||uo(a,y),Kr(a,y,ce,$t)):{begin:0,end:y.text.length}},we=de(x.sticky=="before"?se(x,-1):x.ch);if(a.doc.direction=="rtl"||ie.level==1){var Se=ie.level==1==b<0,Je=se(x,Se?1:-1);if(Je!=null&&(Se?Je<=ie.to&&Je<=we.end:Je>=ie.from&&Je>=we.begin)){var Ve=Se?"before":"after";return new He(x.line,Je,Ve)}}var Ct=function($t,ln,en){for(var hn=function(Br,si){return si?new He(x.line,se(Br,1),"before"):new He(x.line,Br,"after")};$t>=0&&$t<E.length;$t+=ln){var kn=E[$t],gn=ln>0==(kn.level!=1),Zn=gn?en.begin:se(en.end,-1);if(kn.from<=Zn&&Zn<kn.to||(Zn=gn?kn.from:se(kn.to,-1),en.begin<=Zn&&Zn<en.end))return hn(Zn,gn)}},Pt=Ct(te+b,b,we);if(Pt)return Pt;var Gt=b>0?we.end:se(we.begin,-1);return Gt!=null&&!(b>0&&Gt==y.text.length)&&(Pt=Ct(b>0?0:E.length-1,b,de(Gt)),Pt)?Pt: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=pt(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:He(y.head.line+1,0)}:{from:y.head,to:He(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:He(y.from().line,0),to:Et(a.doc,He(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:He(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(He(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(He(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")},Ie)},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")},Ie)},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},Ie)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var te=x[E].from(),ie=pe(a.getLine(te.line),te.ch,b);y.push(qe(b-ie%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Ti(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,te=pt(a.doc,E.line).text;if(te){if(E.ch==te.length&&(E=new He(E.line,E.ch-1)),E.ch>0)E=new He(E.line,E.ch+1),a.replaceRange(te.charAt(E.ch-1)+te.charAt(E.ch-2),He(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ie=pt(a.doc,E.line-1).text;ie&&(E=new He(E.line,1),a.replaceRange(te.charAt(0)+a.doc.lineSeparator()+ie.charAt(ie.length-1),He(E.line-1,ie.length-1),E,"+transpose"))}}x.push(new vr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Ti(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);Io(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=pt(a.doc,y),b=qt(x);return b!=x&&(y=Pe(b)),hs(!0,a,b,y,1)}function Mu(a,y){var x=pt(a.doc,y),b=xn(x);return b!=x&&(y=Pe(b)),hs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=pt(a.doc,x.line),E=kt(b,a.doc.direction);if(!E||E[0].level==0){var te=Math.max(x.ch,b.text.search(/\S/)),ie=y.line==x.line&&y.ch<=te&&y.ch;return He(x.line,ie?0:te,x.sticky)}return x}function Wa(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)!=Xe}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Pu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Ho(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Ho(y,a.options.extraKeys,x,a)||Ho(y,a.options.keyMap,x,a)}var Au=new le;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=Pu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Wr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(sn(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 Wa(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Wa(a,b)}):pa(a,x,y,function(b){return Wa(a,b)}):!1}function Tu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Wa(a,b,!0)})}var fs=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ee(),!ht(y,a))){me&&ye<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&&!Fn&&(De?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ae&&!De&&!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;Oe(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(ot(y,"CodeMirror-crosshair"),Ot(document,"keyup",x),Ot(document,"mouseover",x))}Mt(document,"keyup",x),Mt(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),ht(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||ht(y,a)||a.ctrlKey&&!a.altKey||De&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==fs){fs=null,sn(a);return}if(!(fe&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Tu(y,a,E)||y.display.input.onKeyPress(a))}}}var Fu=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+Fu>a&&wt(y,this.pos)==0&&x==this.button};var va,ma;function Iu(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(!(ht(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(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=Gn(a),te=b?Iu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Ru(y,E,b,te,a))&&(E==1?b?Nu(y,b,te,a):tr(a)==x.scroller&&sn(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(nt?y.display.input.onContextMenu(a):Ls(y)))}}}function Ru(a,y,x,b,E){var te="Click";return b=="double"?te="Double"+te:b=="triple"&&(te="Triple"+te),te=(y==1?"Left":y==2?"Middle":"Right")+te,pa(a,ml(te,E),E,function(ie){if(typeof ie=="string"&&(ie=fa[ie]),!ie)return!1;var se=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),se=ie(a,x)!=Xe}finally{a.state.suppressEdits=!1}return se})}function Ou(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var te=rt?x.shiftKey&&x.metaKey:x.altKey;E.unit=te?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=De?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(De?x.altKey:x.ctrlKey)),E}function Nu(a,y,x,b){me?setTimeout(Qe(Es,a),0):a.curOp.focus=Ee();var E=Ou(a,x,b),te=a.doc.sel,ie;a.options.dragDrop&&Xr&&!a.isReadOnly()&&x=="single"&&(ie=te.contains(y))>-1&&(wt((ie=te.ranges[ie]).from(),y)<0||y.xRel>0)&&(wt(ie.to(),y)>0||y.xRel<0)?_u(a,b,y,E):Wu(a,b,y,E)}function _u(a,y,x,b){var E=a.display,te=!1,ie=oi(a,function(de){Fe&&(E.scroller.draggable=!1),a.state.draggingText=!1,Ot(E.wrapper.ownerDocument,"mouseup",ie),Ot(E.wrapper.ownerDocument,"mousemove",se),Ot(E.scroller,"dragstart",ce),Ot(E.scroller,"drop",ie),te||(sn(de),b.addNew||Fa(a.doc,x,null,null,b.extend),Fe&&!tt||me&&ye==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),se=function(de){te=te||Math.abs(y.clientX-de.clientX)+Math.abs(y.clientY-de.clientY)>=10},ce=function(){return te=!0};Fe&&(E.scroller.draggable=!0),a.state.draggingText=ie,ie.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Mt(E.wrapper.ownerDocument,"mouseup",ie),Mt(E.wrapper.ownerDocument,"mousemove",se),Mt(E.scroller,"dragstart",ce),Mt(E.scroller,"drop",ie),Ls(a),setTimeout(function(){return E.input.focus()},20)}function Ll(a,y,x){if(x=="char")return new vr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new vr(He(y.line,0),Et(a.doc,He(y.line+1,0)));var b=x(a,y);return new vr(b.from,b.to)}function Wu(a,y,x,b){var E=a.display,te=a.doc;sn(y);var ie,se,ce=te.sel,de=ce.ranges;if(b.addNew&&!b.extend?(se=te.sel.contains(x),se>-1?ie=de[se]:ie=new vr(x,x)):(ie=te.sel.primary(),se=te.sel.primIndex),b.unit=="rectangle")b.addNew||(ie=new vr(x,x)),x=Co(a,y,!0,!0),se=-1;else{var we=Ll(a,x,b.unit);b.extend?ie=ls(ie,we.anchor,we.head,b.extend):ie=we}b.addNew?se==-1?(se=de.length,fi(te,Ki(a,de.concat([ie]),se),{scroll:!1,origin:"*mouse"})):de.length>1&&de[se].empty()&&b.unit=="char"&&!b.extend?(fi(te,Ki(a,de.slice(0,se).concat(de.slice(se+1)),0),{scroll:!1,origin:"*mouse"}),ce=te.sel):us(te,se,ie,ze):(se=0,fi(te,new Oi([ie],0),ze),ce=te.sel);var Se=x;function Je(en){if(wt(Se,en)!=0)if(Se=en,b.unit=="rectangle"){for(var hn=[],kn=a.options.tabSize,gn=pe(pt(te,x.line).text,x.ch,kn),Zn=pe(pt(te,en.line).text,en.ch,kn),Br=Math.min(gn,Zn),si=Math.max(gn,Zn),Zr=Math.min(x.line,en.line),Bi=Math.min(a.lastLine(),Math.max(x.line,en.line));Zr<=Bi;Zr++){var ki=pt(te,Zr).text,qr=dt(ki,Br,kn);Br==si?hn.push(new vr(He(Zr,qr),He(Zr,qr))):ki.length>qr&&hn.push(new vr(He(Zr,qr),He(Zr,dt(ki,si,kn))))}hn.length||hn.push(new vr(x,x)),fi(te,Ki(a,ce.ranges.slice(0,se).concat(hn),se),{origin:"*mouse",scroll:!1}),a.scrollIntoView(en)}else{var Ei=ie,di=Ll(a,en,b.unit),ri=Ei.anchor,$r;wt(di.anchor,ri)>0?($r=di.head,ri=_t(Ei.from(),di.anchor)):($r=di.anchor,ri=on(Ei.to(),di.head));var Ur=ce.ranges.slice(0);Ur[se]=zu(a,new vr(Et(te,ri),$r)),fi(te,Ki(a,Ur,se),ze)}}var Ve=E.wrapper.getBoundingClientRect(),Ct=0;function Pt(en){var hn=++Ct,kn=Co(a,en,!0,b.unit=="rectangle");if(kn)if(wt(kn,Se)!=0){a.curOp.focus=Ee(),Je(kn);var gn=Da(E,te);(kn.line>=gn.to||kn.line<gn.from)&&setTimeout(oi(a,function(){Ct==hn&&Pt(en)}),150)}else{var Zn=en.clientY<Ve.top?-20:en.clientY>Ve.bottom?20:0;Zn&&setTimeout(oi(a,function(){Ct==hn&&(E.scroller.scrollTop+=Zn,Pt(en))}),50)}}function Gt(en){a.state.selectingText=!1,Ct=1/0,en&&(sn(en),E.input.focus()),Ot(E.wrapper.ownerDocument,"mousemove",$t),Ot(E.wrapper.ownerDocument,"mouseup",ln),te.history.lastSelOrigin=null}var $t=oi(a,function(en){en.buttons===0||!Gn(en)?Gt(en):Pt(en)}),ln=oi(a,Gt);a.state.selectingText=ln,Mt(E.wrapper.ownerDocument,"mousemove",$t),Mt(E.wrapper.ownerDocument,"mouseup",ln)}function zu(a,y){var x=y.anchor,b=y.head,E=pt(a.doc,x.line);if(wt(x,b)==0&&x.sticky==b.sticky)return y;var te=kt(E);if(!te)return y;var ie=Nt(te,x.ch,x.sticky),se=te[ie];if(se.from!=x.ch&&se.to!=x.ch)return y;var ce=ie+(se.from==x.ch==(se.level!=1)?0:1);if(ce==0||ce==te.length)return y;var de;if(b.line!=x.line)de=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var we=Nt(te,b.ch,b.sticky),Se=we-ie||(b.ch-x.ch)*(se.level==1?-1:1);we==ce-1||we==ce?de=Se<0:de=Se>0}var Je=te[ce+(de?-1:0)],Ve=de==(Je.level==1),Ct=Ve?Je.from:Je.to,Pt=Ve?"after":"before";return x.ch==Ct&&x.sticky==Pt?y:new vr(new He(x.line,Ct,Pt),b)}function Dl(a,y,x,b){var E,te;if(y.touches)E=y.touches[0].clientX,te=y.touches[0].clientY;else try{E=y.clientX,te=y.clientY}catch(Je){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&sn(y);var ie=a.display,se=ie.lineDiv.getBoundingClientRect();if(te>se.bottom||!Ht(a,x))return un(y);te-=se.top-ie.viewOffset;for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var de=ie.gutters.childNodes[ce];if(de&&de.getBoundingClientRect().right>=E){var we=Be(a.doc,te),Se=a.display.gutterSpecs[ce];return Jt(a,x,a,we,Se.className,y),un(y)}}}function vs(a,y){return Dl(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||Hu(a,y)||ht(a,y,"contextmenu")||nt||a.display.input.onContextMenu(y)}function Hu(a,y){return Ht(a,"gutterContextMenu")?Dl(a,y,"gutterContextMenu",!1):!1}function Pl(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wo(a)}var jo={toString:function(){return"CodeMirror.Init"}},Al={},za={};function Zu(a){var y=a.optionHandlers;function x(b,E,te,ie){a.defaults[b]=E,te&&(y[b]=ie?function(se,ce,de){de!=jo&&te(se,ce,de)}:te)}a.defineOption=x,a.Init=jo,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),wo(b),Ci(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var te=[],ie=b.doc.first;b.doc.iter(function(ce){for(var de=0;;){var we=ce.text.indexOf(E,de);if(we==-1)break;de=we+E.length,te.push(He(ie,we))}ie++});for(var se=te.length-1;se>=0;se--)Wo(b.doc,E,te[se],He(te[se].line,te[se].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,te){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),te!=jo&&b.refresh()}),x("specialCharPlaceholder",Di,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Me?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!ct),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Pl(b),ra(b)},!0),x("keyMap","default",function(b,E,te){var ie=_a(E),se=te!=jo&&_a(te);se&&se.detach&&se.detach(b,ie),ie.attach&&ie.attach(b,se||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Ro(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Ro(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=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Fo(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,ju),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function ju(a,y,x){var b=x&&x!=jo;if(!y!=!b){var E=a.display.dragFunctions,te=y?Mt:Ot;te(a.display.scroller,"dragstart",E.start),te(a.display.scroller,"dragenter",E.enter),te(a.display.scroller,"dragover",E.over),te(a.display.scroller,"dragleave",E.leave),te(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(Oe(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ot(a.display.wrapper,"CodeMirror-wrap"),Hn(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return Ro(a)},100)}function Hr(a,y){var x=this;if(!(this instanceof Hr))return new Hr(a,y);this.options=y=y?ut(y):{},ut(Al,y,!1);var b=y.value;typeof b=="string"?b=new Si(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Hr.inputStyles[y.inputStyle](this),te=this.display=new ru(a,b,E,y);te.wrapper.CodeMirror=this,Pl(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 le,keySeq:null,specialChars:null},y.autofocus&&!Me&&te.input.focus(),me&&ye<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Uu(this),Cu(),Lo(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Me||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Fo(this);for(var ie in za)za.hasOwnProperty(ie)&&za[ie](this,y[ie],jo);Rs(this),y.finishInit&&y.finishInit(this);for(var se=0;se<ms.length;++se)ms[se](this);Do(this),Fe&&y.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Hr.defaults=Al,Hr.optionHandlers=za;function Uu(a){var y=a.display;Mt(y.scroller,"mousedown",oi(a,El)),me&&ye<11?Mt(y.scroller,"dblclick",oi(a,function(ce){if(!ht(a,ce)){var de=Co(a,ce);if(!(!de||vs(a,ce)||ui(a.display,ce))){sn(ce);var we=a.findWordAt(de);Fa(a.doc,we.anchor,we.head)}}})):Mt(y.scroller,"dblclick",function(ce){return ht(a,ce)||sn(ce)}),Mt(y.scroller,"contextmenu",function(ce){return Ml(a,ce)}),Mt(y.input.getField(),"contextmenu",function(ce){y.scroller.contains(ce.target)||Ml(a,ce)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function te(ce){if(ce.touches.length!=1)return!1;var de=ce.touches[0];return de.radiusX<=1&&de.radiusY<=1}function ie(ce,de){if(de.left==null)return!0;var we=de.left-ce.left,Se=de.top-ce.top;return we*we+Se*Se>20*20}Mt(y.scroller,"touchstart",function(ce){if(!ht(a,ce)&&!te(ce)&&!vs(a,ce)){y.input.ensurePolled(),clearTimeout(x);var de=+new Date;y.activeTouch={start:de,moved:!1,prev:de-b.end<=300?b:null},ce.touches.length==1&&(y.activeTouch.left=ce.touches[0].pageX,y.activeTouch.top=ce.touches[0].pageY)}}),Mt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Mt(y.scroller,"touchend",function(ce){var de=y.activeTouch;if(de&&!ui(y,ce)&&de.left!=null&&!de.moved&&new Date-de.start<300){var we=a.coordsChar(y.activeTouch,"page"),Se;!de.prev||ie(de,de.prev)?Se=new vr(we,we):!de.prev.prev||ie(de,de.prev.prev)?Se=a.findWordAt(we):Se=new vr(He(we.line,0),Et(a.doc,He(we.line+1,0))),a.setSelection(Se.anchor,Se.head),a.focus(),sn(ce)}E()}),Mt(y.scroller,"touchcancel",E),Mt(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Jt(a,"scroll",a))}),Mt(y.scroller,"mousewheel",function(ce){return _s(a,ce)}),Mt(y.scroller,"DOMMouseScroll",function(ce){return _s(a,ce)}),Mt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ce){ht(a,ce)||yn(ce)},over:function(ce){ht(a,ce)||(wu(a,ce),yn(ce))},start:function(ce){return xu(a,ce)},drop:oi(a,bu),leave:function(ce){ht(a,ce)||hl(a)}};var se=y.input.getField();Mt(se,"keyup",function(ce){return Sl.call(a,ce)}),Mt(se,"keydown",oi(a,Cl)),Mt(se,"keypress",oi(a,kl)),Mt(se,"focus",function(ce){return Ja(a,ce)}),Mt(se,"blur",function(ce){return Fo(a,ce)})}var ms=[];Hr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,te;x==null&&(x="add"),x=="smart"&&(E.mode.indent?te=Kn(a,y).state:x="prev");var ie=a.options.tabSize,se=pt(E,y),ce=pe(se.text,null,ie);se.stateAfter&&(se.stateAfter=null);var de=se.text.match(/^\s*/)[0],we;if(!b&&!/\S/.test(se.text))we=0,x="not";else if(x=="smart"&&(we=E.mode.indent(te,se.text.slice(de.length),se.text),we==Xe||we>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?we=pe(pt(E,y-1).text,null,ie):we=0:x=="add"?we=ce+a.options.indentUnit:x=="subtract"?we=ce-a.options.indentUnit:typeof x=="number"&&(we=ce+x),we=Math.max(0,we);var Se="",Je=0;if(a.options.indentWithTabs)for(var Ve=Math.floor(we/ie);Ve;--Ve)Je+=ie,Se+=" ";if(Je<we&&(Se+=qe(we-Je)),Se!=de)return Wo(E,Se,He(y,0),He(y,de.length),"+input"),se.stateAfter=null,!0;for(var Ct=0;Ct<E.sel.ranges.length;Ct++){var Pt=E.sel.ranges[Ct];if(Pt.head.line==y&&Pt.head.ch<de.length){var Gt=He(y,de.length);us(E,Ct,new vr(Gt,Gt));break}}}var Yi=null;function Ha(a){Yi=a}function gs(a,y,x,b,E){var te=a.doc;a.display.shift=!1,b||(b=te.sel);var ie=+new Date-200,se=E=="paste"||a.state.pasteIncoming>ie,ce=ir(y),de=null;if(se&&b.ranges.length>1)if(Yi&&Yi.text.join(`
|
|
`)==y){if(b.ranges.length%Yi.text.length==0){de=[];for(var we=0;we<Yi.text.length;we++)de.push(te.splitLines(Yi.text[we]))}}else ce.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(de=et(ce,function($t){return[$t]}));for(var Se=a.curOp.updateInput,Je=b.ranges.length-1;Je>=0;Je--){var Ve=b.ranges[Je],Ct=Ve.from(),Pt=Ve.to();Ve.empty()&&(x&&x>0?Ct=He(Ct.line,Ct.ch-x):a.state.overwrite&&!se?Pt=He(Pt.line,Math.min(pt(te,Pt.line).text.length,Pt.ch+ke(ce).length)):se&&Yi&&Yi.lineWise&&Yi.text.join(`
|
|
`)==ce.join(`
|
|
`)&&(Ct=Pt=He(Ct.line,0)));var Gt={from:Ct,to:Pt,text:de?de[Je%de.length]:ce,origin:E||(se?"paste":a.state.cutIncoming>ie?"cut":"+input")};_o(a.doc,Gt),Wr(a,"inputRead",a,Gt)}y&&!se&&Bl(a,y),Io(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Se),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Tl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Ti(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 te=a.getModeAt(E.head),ie=!1;if(te.electricChars){for(var se=0;se<te.electricChars.length;se++)if(y.indexOf(te.electricChars.charAt(se))>-1){ie=ga(a,E.head.line,"smart");break}}else te.electricInput&&te.electricInput.test(pt(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ie=ga(a,E.head.line,"smart"));ie&&Wr(a,"electricInput",a,E.head.line)}}}function Fl(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,te={anchor:He(E,0),head:He(E+1,0)};x.push(te),y.push(a.getRange(te.anchor,te.head))}return{text:y,ranges:x}}function Il(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Rl(){var a=We("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=We("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Fe?a.style.width="1000px":a.setAttribute("wrap","off"),_e&&(a.style.border="1px solid black"),Il(a),y}function Vu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var te=this.options,ie=te[b];te[b]==E&&b!="mode"||(te[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,ie),Jt(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,te=0;te<E.length;++te)if(E[te]==b||E[te].name==b)return E.splice(te,1),!0},addOverlay:yi(function(b,E){var te=b.token?b:a.getMode(this.options,b);if(te.startState)throw new Error("Overlays may not be stateful.");it(this.state.overlays,{mode:te,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ie){return ie.priority}),this.state.modeGen++,Ci(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,te=0;te<E.length;++te){var ie=E[te].modeSpec;if(ie==b||typeof b=="string"&&ie.name==b){E.splice(te,1),this.state.modeGen++,Ci(this);return}}}),indentLine:yi(function(b,E,te){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Tt(this.doc,b)&&ga(this,b,E,te)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,te=-1,ie=0;ie<E.length;ie++){var se=E[ie];if(se.empty())se.head.line>te&&(ga(this,se.head.line,b,!0),te=se.head.line,ie==this.doc.sel.primIndex&&Io(this));else{var ce=se.from(),de=se.to(),we=Math.max(te,ce.line);te=Math.min(this.lastLine(),de.line-(de.ch?0:1))+1;for(var Se=we;Se<te;++Se)ga(this,Se,b);var Je=this.doc.sel.ranges;ce.ch==0&&E.length==Je.length&&Je[ie].from().ch>0&&us(this.doc,ie,new vr(ce,Je[ie].to()),be)}}}),getTokenAt:function(b,E){return sr(this,b,E)},getLineTokens:function(b,E){return sr(this,He(b),E,!0)},getTokenTypeAt:function(b){b=Et(this.doc,b);var E=Nn(this,pt(this.doc,b.line)),te=0,ie=(E.length-1)/2,se=b.ch,ce;if(se==0)ce=E[2];else for(;;){var de=te+ie>>1;if((de?E[de*2-1]:0)>=se)ie=de;else if(E[de*2+1]<se)te=de+1;else{ce=E[de*2+2];break}}var we=ce?ce.indexOf("overlay "):-1;return we<0?ce:we==0?null:ce.slice(0,we-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var te=[];if(!x.hasOwnProperty(E))return te;var ie=x[E],se=this.getModeAt(b);if(typeof se[E]=="string")ie[se[E]]&&te.push(ie[se[E]]);else if(se[E])for(var ce=0;ce<se[E].length;ce++){var de=ie[se[E][ce]];de&&te.push(de)}else se.helperType&&ie[se.helperType]?te.push(ie[se.helperType]):ie[se.name]&&te.push(ie[se.name]);for(var we=0;we<ie._global.length;we++){var Se=ie._global[we];Se.pred(se,this)&&xe(te,Se.val)==-1&&te.push(Se.val)}return te},getStateAfter:function(b,E){var te=this.doc;return b=Kt(te,b==null?te.first+te.size-1:b),Kn(this,b+1,E).state},cursorCoords:function(b,E){var te,ie=this.doc.sel.primary();return b==null?te=ie.head:typeof b=="object"?te=Et(this.doc,b):te=b?ie.from():ie.to(),wi(this,te,E||"page")},charCoords:function(b,E){return Bo(this,Et(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ci(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Be(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,te){var ie=!1,se;if(typeof b=="number"){var ce=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ce&&(b=ce,ie=!0),se=pt(this.doc,b)}else se=b;return To(this,se,{top:0,left:0},E||"page",te||ie).top+(ie?this.doc.height-Sn(se):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Vi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,te,ie,se){var ce=this.display;b=wi(this,Et(this.doc,b));var de=b.bottom,we=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ce.sizer.appendChild(E),ie=="over")de=b.top;else if(ie=="above"||ie=="near"){var Se=Math.max(ce.wrapper.clientHeight,this.doc.height),Je=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(ie=="above"||b.bottom+E.offsetHeight>Se)&&b.top>E.offsetHeight?de=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Se&&(de=b.bottom),we+E.offsetWidth>Je&&(we=Je-E.offsetWidth)}E.style.top=de+"px",E.style.left=E.style.right="",se=="right"?(we=ce.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(se=="left"?we=0:se=="middle"&&(we=(ce.sizer.clientWidth-E.offsetWidth)/2),E.style.left=we+"px"),te&&jl(this,{left:we,top:de,right:we+E.offsetWidth,bottom:de+E.offsetHeight})},triggerOnKeyDown:yi(Cl),triggerOnKeyPress:yi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yi(El),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:yi(function(b){Bl(this,b)}),findPosH:function(b,E,te,ie){var se=1;E<0&&(se=-1,E=-E);for(var ce=Et(this.doc,b),de=0;de<E&&(ce=ys(this.doc,ce,se,te,ie),!ce.hitSide);++de);return ce},moveH:yi(function(b,E){var te=this;this.extendSelectionsBy(function(ie){return te.display.shift||te.doc.extend||ie.empty()?ys(te.doc,ie.head,b,E,te.options.rtlMoveVisually):b<0?ie.from():ie.to()},Ie)}),deleteH:yi(function(b,E){var te=this.doc.sel,ie=this.doc;te.somethingSelected()?ie.replaceSelection("",null,"+delete"):Zo(this,function(se){var ce=ys(ie,se.head,b,E,!1);return b<0?{from:ce,to:se.head}:{from:se.head,to:ce}})}),findPosV:function(b,E,te,ie){var se=1,ce=ie;E<0&&(se=-1,E=-E);for(var de=Et(this.doc,b),we=0;we<E;++we){var Se=wi(this,de,"div");if(ce==null?ce=Se.left:Se.left=ce,de=Ol(this,Se,se,te),de.hitSide)break}return de},moveV:yi(function(b,E){var te=this,ie=this.doc,se=[],ce=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(we){if(ce)return b<0?we.from():we.to();var Se=wi(te,we.head,"div");we.goalColumn!=null&&(Se.left=we.goalColumn),se.push(Se.left);var Je=Ol(te,Se,b,E);return E=="page"&&we==ie.sel.primary()&&qa(te,Bo(te,Je,"div").top-Se.top),Je},Ie),se.length)for(var de=0;de<ie.sel.ranges.length;de++)ie.sel.ranges[de].goalColumn=se[de]}),findWordAt:function(b){var E=this.doc,te=pt(E,b.line).text,ie=b.ch,se=b.ch;if(te){var ce=this.getHelper(b,"wordChars");(b.sticky=="before"||se==te.length)&&ie?--ie:++se;for(var de=te.charAt(ie),we=ue(de,ce)?function(Se){return ue(Se,ce)}:/\s/.test(de)?function(Se){return/\s/.test(Se)}:function(Se){return!/\s/.test(Se)&&!ue(Se)};ie>0&&we(te.charAt(ie-1));)--ie;for(;se<te.length&&we(te.charAt(se));)++se}return new vr(He(b.line,ie),He(b.line,se))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Oe(this.display.cursorDiv,"CodeMirror-overwrite"):ot(this.display.cursorDiv,"CodeMirror-overwrite"),Jt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yi(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Mi(this)-this.display.barHeight,width:b.scrollWidth-Mi(this)-this.display.barWidth,clientHeight:no(this),clientWidth:qi(this)}},scrollIntoView:yi(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:He(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?Gl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var te=this,ie=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};b!=null&&(this.display.wrapper.style.width=ie(b)),E!=null&&(this.display.wrapper.style.height=ie(E)),this.options.lineWrapping&&Yo(this);var se=this.display.viewFrom;this.doc.iter(se,this.display.viewTo,function(ce){if(ce.widgets){for(var de=0;de<ce.widgets.length;de++)if(ce.widgets[de].noHScroll){ho(te,se,"widget");break}}++se}),this.curOp.forceUpdate=!0,Jt(this,"refresh",this)}),operation:function(b){return Ti(this,b)},startOperation:function(){return Lo(this)},endOperation:function(){return Do(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;Ci(this),this.curOp.forceUpdate=!0,wo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Ai(this.display))>.5||this.options.lineWrapping)&&Ya(this),Jt(this,"refresh",this)}),swapDoc:yi(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,Wr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ut(a),a.registerHelper=function(b,E,te){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=te},a.registerGlobalHelper=function(b,E,te,ie){a.registerHelper(b,E,ie),x[b]._global.push({pred:te,val:ie})}}function ys(a,y,x,b,E){var te=y,ie=x,se=pt(a,y.line),ce=E&&a.direction=="rtl"?-x:x;function de(){var ln=y.line+ce;return ln<a.first||ln>=a.first+a.size?!1:(y=new He(ln,y.ch,y.sticky),se=pt(a,ln))}function we(ln){var en;if(b=="codepoint"){var hn=se.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(hn)?en=null:en=new He(y.line,Math.max(0,Math.min(se.text.length,y.ch+x*(hn>=55296&&hn<56320?2:1))),-x)}else E?en=Du(a.cm,se,y,x):en=ds(se,y,x);if(en==null)if(!ln&&de())y=hs(E,a.cm,se,y.line,ce);else return!1;else y=en;return!0}if(b=="char"||b=="codepoint")we();else if(b=="column")we(!0);else if(b=="word"||b=="group")for(var Se=null,Je=b=="group",Ve=a.cm&&a.cm.getHelper(y,"wordChars"),Ct=!0;!(x<0&&!we(!Ct));Ct=!1){var Pt=se.text.charAt(y.ch)||`
|
|
`,Gt=ue(Pt,Ve)?"w":Je&&Pt==`
|
|
`?"n":!Je||/\s/.test(Pt)?null:"p";if(Je&&!Ct&&!Gt&&(Gt="s"),Se&&Se!=Gt){x<0&&(x=1,we(),y.sticky="after");break}if(Gt&&(Se=Gt),x>0&&!we(!Ct))break}var $t=Ra(a,y,te,ie,!0);return Vt(te,$t)&&($t.hitSide=!0),$t}function Ol(a,y,x,b){var E=a.doc,te=y.left,ie;if(b=="page"){var se=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(se-.5*Ai(a.display),3);ie=(x>0?y.bottom:y.top)+x*ce}else b=="line"&&(ie=x>0?y.bottom+3:y.top-3);for(var de;de=ci(a,te,ie),!!de.outside;){if(x<0?ie<=0:ie>=E.height){de.hitSide=!0;break}ie+=x*5}return de}var Er=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new le,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Er.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Il(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function te(se){for(var ce=se.target;ce;ce=ce.parentNode){if(ce==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Mt(E,"paste",function(se){!te(se)||ht(b,se)||Tl(se,b)||ye<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),Mt(E,"compositionstart",function(se){y.composing={data:se.data,done:!1}}),Mt(E,"compositionupdate",function(se){y.composing||(y.composing={data:se.data,done:!1})}),Mt(E,"compositionend",function(se){y.composing&&(se.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Mt(E,"touchstart",function(){return x.forceCompositionEnd()}),Mt(E,"input",function(){y.composing||y.readFromDOMSoon()});function ie(se){if(!(!te(se)||ht(b,se))){if(b.somethingSelected())Ha({lineWise:!1,text:b.getSelections()}),se.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ce=Fl(b);Ha({lineWise:!0,text:ce.text}),se.type=="cut"&&b.operation(function(){b.setSelections(ce.ranges,0,be),b.replaceSelection("",null,"cut")})}else return;if(se.clipboardData){se.clipboardData.clearData();var de=Yi.text.join(`
|
|
`);if(se.clipboardData.setData("Text",de),se.clipboardData.getData("Text")==de){se.preventDefault();return}}var we=Rl(),Se=we.firstChild;b.display.lineSpace.insertBefore(we,b.display.lineSpace.firstChild),Se.value=Yi.text.join(`
|
|
`);var Je=document.activeElement;Ye(Se),setTimeout(function(){b.display.lineSpace.removeChild(we),Je.focus(),Je==E&&x.showPrimarySelection()},50)}}Mt(E,"copy",ie),Mt(E,"cut",ie)},Er.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Er.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Er.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Er.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Er.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var te=Za(y,a.anchorNode,a.anchorOffset),ie=Za(y,a.focusNode,a.focusOffset);if(!(te&&!te.bad&&ie&&!ie.bad&&wt(_t(te,ie),b)==0&&wt(on(te,ie),E)==0)){var se=y.display.view,ce=b.line>=y.display.viewFrom&&Nl(y,b)||{node:se[0].measure.map[2],offset:0},de=E.line<y.display.viewTo&&Nl(y,E);if(!de){var we=se[se.length-1].measure,Se=we.maps?we.maps[we.maps.length-1]:we.map;de={node:Se[Se.length-1],offset:Se[Se.length-2]-Se[Se.length-3]}}if(!ce||!de){a.removeAllRanges();return}var Je=a.rangeCount&&a.getRangeAt(0),Ve;try{Ve=Ae(ce.node,ce.offset,de.offset,de.node)}catch(Ct){}Ve&&(!ae&&y.state.focused?(a.collapse(ce.node,ce.offset),Ve.collapsed||(a.removeAllRanges(),a.addRange(Ve))):(a.removeAllRanges(),a.addRange(Ve)),Je&&a.anchorNode==null?a.addRange(Je):ae&&this.startGracePeriod()),this.rememberSelection()}},Er.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)},Er.prototype.showMultipleSelections=function(a){Ke(this.cm.display.cursorDiv,a.cursors),Ke(this.cm.display.selectionDiv,a.selection)},Er.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Er.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ge(this.div,y)},Er.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Er.prototype.blur=function(){this.div.blur()},Er.prototype.getField=function(){return this.div},Er.prototype.supportsTouch=function(){return!0},Er.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Ti(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)},Er.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Er.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Le&&Ce&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&Ti(y,function(){fi(y.doc,po(x,b),be),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Er.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=He(b.line-1,pt(a.doc,b.line-1).length)),E.ch==pt(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=He(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var te,ie,se;b.line==y.viewFrom||(te=So(a,b.line))==0?(ie=Pe(y.view[0].line),se=y.view[0].node):(ie=Pe(y.view[te].line),se=y.view[te-1].node.nextSibling);var ce=So(a,E.line),de,we;if(ce==y.view.length-1?(de=y.viewTo-1,we=y.lineDiv.lastChild):(de=Pe(y.view[ce+1].line)-1,we=y.view[ce+1].node.previousSibling),!se)return!1;for(var Se=a.doc.splitLines(Yu(a,se,we,ie,de)),Je=Yt(a.doc,He(ie,0),He(de,pt(a.doc,de).text.length));Se.length>1&&Je.length>1;)if(ke(Se)==ke(Je))Se.pop(),Je.pop(),de--;else if(Se[0]==Je[0])Se.shift(),Je.shift(),ie++;else break;for(var Ve=0,Ct=0,Pt=Se[0],Gt=Je[0],$t=Math.min(Pt.length,Gt.length);Ve<$t&&Pt.charCodeAt(Ve)==Gt.charCodeAt(Ve);)++Ve;for(var ln=ke(Se),en=ke(Je),hn=Math.min(ln.length-(Se.length==1?Ve:0),en.length-(Je.length==1?Ve:0));Ct<hn&&ln.charCodeAt(ln.length-Ct-1)==en.charCodeAt(en.length-Ct-1);)++Ct;if(Se.length==1&&Je.length==1&&ie==b.line)for(;Ve&&Ve>b.ch&&ln.charCodeAt(ln.length-Ct-1)==en.charCodeAt(en.length-Ct-1);)Ve--,Ct++;Se[Se.length-1]=ln.slice(0,ln.length-Ct).replace(/^\u200b+/,""),Se[0]=Se[0].slice(Ve).replace(/\u200b+$/,"");var kn=He(ie,Ve),gn=He(de,Je.length?ke(Je).length-Ct:0);if(Se.length>1||Se[0]||wt(kn,gn))return Wo(a.doc,Se,kn,gn,"+input"),!0},Er.prototype.ensurePolled=function(){this.forceCompositionEnd()},Er.prototype.reset=function(){this.forceCompositionEnd()},Er.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Er.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))},Er.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Ti(this.cm,function(){return Ci(a.cm)})},Er.prototype.setUneditable=function(a){a.contentEditable="false"},Er.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||oi(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Er.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Er.prototype.onContextMenu=function(){},Er.prototype.resetPosition=function(){},Er.prototype.needsContentAttribute=!0;function Nl(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=pt(a.doc,y.line),E=Ao(x,b,y.line),te=kt(b,a.doc.direction),ie="left";if(te){var se=Nt(te,y.ch);ie=se%2?"right":"left"}var ce=xa(E.map,y.ch,ie);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Go(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var te="",ie=!1,se=a.doc.lineSeparator(),ce=!1;function de(Ve){return function(Ct){return Ct.id==Ve}}function we(){ie&&(te+=se,ce&&(te+=se),ie=ce=!1)}function Se(Ve){Ve&&(we(),te+=Ve)}function Je(Ve){if(Ve.nodeType==1){var Ct=Ve.getAttribute("cm-text");if(Ct){Se(Ct);return}var Pt=Ve.getAttribute("cm-marker"),Gt;if(Pt){var $t=a.findMarks(He(b,0),He(E+1,0),de(+Pt));$t.length&&(Gt=$t[0].find(0))&&Se(Yt(a.doc,Gt.from,Gt.to).join(se));return}if(Ve.getAttribute("contenteditable")=="false")return;var ln=/^(pre|div|p|li|table|br)$/i.test(Ve.nodeName);if(!/^br$/i.test(Ve.nodeName)&&Ve.textContent.length==0)return;ln&&we();for(var en=0;en<Ve.childNodes.length;en++)Je(Ve.childNodes[en]);/^(pre|p)$/i.test(Ve.nodeName)&&(ce=!0),ln&&(ie=!0)}else Ve.nodeType==3&&Se(Ve.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Je(y),y!=x;)y=y.nextSibling,ce=!1;return te}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(He(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var te=a.display.view[E];if(te.node==b)return Xu(te,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Ge(b,y))return Go(He(Pe(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var te=a.rest?ke(a.rest):a.line;return Go(He(Pe(te),te.text.length),E)}var ie=y.nodeType==3?y:null,se=y;for(!ie&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ie=y.firstChild,x&&(x=ie.nodeValue.length));se.parentNode!=b;)se=se.parentNode;var ce=a.measure,de=ce.maps;function we(Gt,$t,ln){for(var en=-1;en<(de?de.length:0);en++)for(var hn=en<0?ce.map:de[en],kn=0;kn<hn.length;kn+=3){var gn=hn[kn+2];if(gn==Gt||gn==$t){var Zn=Pe(en<0?a.line:a.rest[en]),Br=hn[kn]+ln;return(ln<0||gn!=Gt)&&(Br=hn[kn+(ln?1:0)]),He(Zn,Br)}}}var Se=we(ie,se,x);if(Se)return Go(Se,E);for(var Je=se.nextSibling,Ve=ie?ie.nodeValue.length-x:0;Je;Je=Je.nextSibling){if(Se=we(Je,Je.firstChild,0),Se)return Go(He(Se.line,Se.ch-Ve),E);Ve+=Je.textContent.length}for(var Ct=se.previousSibling,Pt=x;Ct;Ct=Ct.previousSibling){if(Se=we(Ct,Ct.firstChild,-1),Se)return Go(He(Se.line,Se.ch+Pt),E);Pt+=Ct.textContent.length}}var Yr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new le,this.hasSelection=!1,this.composing=null};Yr.prototype.init=function(a){var y=this,x=this,b=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),_e&&(E.style.width="0px"),Mt(E,"input",function(){me&&ye>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Mt(E,"paste",function(ie){ht(b,ie)||Tl(ie,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function te(ie){if(!ht(b,ie)){if(b.somethingSelected())Ha({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var se=Fl(b);Ha({lineWise:!0,text:se.text}),ie.type=="cut"?b.setSelections(se.ranges,null,be):(x.prevInput="",E.value=se.text.join(`
|
|
`),Ye(E))}else return;ie.type=="cut"&&(b.state.cutIncoming=+new Date)}}Mt(E,"cut",te),Mt(E,"copy",te),Mt(a.scroller,"paste",function(ie){if(!(ui(a,ie)||ht(b,ie))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var se=new Event("paste");se.clipboardData=ie.clipboardData,E.dispatchEvent(se)}}),Mt(a.lineSpace,"selectstart",function(ie){ui(a,ie)||sn(ie)}),Mt(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"})}}),Mt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Yr.prototype.createField=function(a){this.wrapper=Rl(),this.textarea=this.wrapper.firstChild},Yr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Yr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=wi(a,x.sel.primary().head,"div"),te=y.wrapper.getBoundingClientRect(),ie=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ie.top-te.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ie.left-te.left))}return b},Yr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Ke(x.cursorDiv,a.cursors),Ke(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Yr.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&Ye(this.textarea),me&&ye>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&ye>=9&&(this.hasSelection=null))}},Yr.prototype.getField=function(){return this.textarea},Yr.prototype.supportsTouch=function(){return!1},Yr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Me||Ee()!=this.textarea))try{this.textarea.focus()}catch(a){}},Yr.prototype.blur=function(){this.textarea.blur()},Yr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Yr.prototype.receivedFocus=function(){this.slowPoll()},Yr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Yr.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},Yr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Fr(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(me&&ye>=9&&this.hasSelection===E||De&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var te=E.charCodeAt(0);if(te==8203&&!b&&(b="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,se=Math.min(b.length,E.length);ie<se&&b.charCodeAt(ie)==E.charCodeAt(ie);)++ie;return Ti(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},Yr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Yr.prototype.onKeyPress=function(){me&&ye>=9&&(this.hasSelection=null),this.fastPoll()},Yr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var te=Co(x,a),ie=b.scroller.scrollTop;if(!te||fe)return;var se=x.options.resetSelectionOnContextMenu;se&&x.doc.sel.contains(te)==-1&&oi(x,fi)(x.doc,po(te),be);var ce=E.style.cssText,de=y.wrapper.style.cssText,we=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-we.top-5)+"px; left: "+(a.clientX-we.left-5)+`px;
|
|
z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Se;Fe&&(Se=window.scrollY),b.input.focus(),Fe&&window.scrollTo(null,Se),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Ve,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Je(){if(E.selectionStart!=null){var Pt=x.somethingSelected(),Gt="\u200B"+(Pt?E.value:"");E.value="\u21DA",E.value=Gt,y.prevInput=Pt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Gt.length,b.selForContextMenu=x.doc.sel}}function Ve(){if(y.contextMenuPending==Ve&&(y.contextMenuPending=!1,y.wrapper.style.cssText=de,E.style.cssText=ce,me&&ye<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=ie),E.selectionStart!=null)){(!me||me&&ye<9)&&Je();var Pt=0,Gt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):Pt++<10?b.detectingSelectAll=setTimeout(Gt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Gt,200)}}if(me&&ye>=9&&Je(),nt){yn(a);var Ct=function(){Ot(window,"mouseup",Ct),setTimeout(Ve,20)};Mt(window,"mouseup",Ct)}else setTimeout(Ve,50)},Yr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Yr.prototype.setUneditable=function(){},Yr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?ut(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=Ee();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=se.getValue()}var E;if(a.form&&(Mt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var te=a.form;E=te.submit;try{var ie=te.submit=function(){b(),te.submit=E,te.submit(),te.submit=ie}}catch(ce){}}y.finishInit=function(ce){ce.save=b,ce.getTextArea=function(){return a},ce.toTextArea=function(){ce.toTextArea=isNaN,b(),a.parentNode.removeChild(ce.getWrapperElement()),a.style.display="",a.form&&(Ot(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var se=Hr(function(ce){return a.parentNode.insertBefore(ce,a.nextSibling)},y);return se}function Qu(a){a.off=Ot,a.on=Mt,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=ir,a.countColumn=pe,a.findColumn=dt,a.isWordChar=re,a.Pass=Xe,a.signal=Jt,a.Line=dr,a.changeEnd=vo,a.scrollbarModel=Ts,a.Pos=He,a.cmpPos=wt,a.modes=Lr,a.mimeModes=an,a.resolveMode=Mn,a.getMode=$n,a.modeExtensions=or,a.extendMode=gr,a.copyState=_n,a.startState=Dr,a.innerMode=In,a.commands=fa,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=Ho,a.normalizeKeyMap=Lu,a.StringStream=Zt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=sn,a.e_stopPropagation=Pn,a.e_stop=yn,a.addClass=Oe,a.contains=Ge,a.rmClass=ot,a.keyNames=yo}Zu(Hr),Vu(Hr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var ja in Si.prototype)Si.prototype.hasOwnProperty(ja)&&xe(qu,ja)<0&&(Hr.prototype[ja]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[ja]));return Ut(Si),Hr.inputStyles={textarea:Yr,contenteditable:Er},Hr.defineMode=function(a){!Hr.defaults.mode&&a!="null"&&(Hr.defaults.mode=a),fn.apply(this,arguments)},Hr.defineMIME=bn,Hr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Hr.defineMIME("text/plain","null"),Hr.defineExtension=function(a,y){Hr.prototype[a]=y},Hr.defineDocExtension=function(a,y){Si.prototype[a]=y},Hr.fromTextArea=Ju,Qu(Hr),Hr.version="5.58.2",Hr})},25419:function(At,Ft,he){(function(ae){ae(he(89780),he(15525),he(98101))})(function(ae){"use strict";ae.defineMode("markdown",function($e,Te){var Re=ae.getMode($e,"text/html"),me=Re.name=="null";function ye(pe){if(ae.findModeByName){var le=ae.findModeByName(pe);le&&(pe=le.mime||le.mimes[0])}var xe=ae.getMode($e,pe);return xe.name=="null"?null:xe}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 Ze in Fe)Fe.hasOwnProperty(Ze)&&Te.tokenTypeOverrides[Ze]&&(Fe[Ze]=Te.tokenTypeOverrides[Ze]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,tt=/^\[(x| )\](?=\s)/i,ve=Te.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,st=/^ {0,3}(?:\={1,}|-{2,})\s*$/,_e=/^[^#!\[\]*_\\<>` "'(~:]+/,Le=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Me=/^\s*\[[^\]]+?\]:.*$/,De=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,rt=" ";function ct(pe,le,xe){return le.f=le.inline=xe,xe(pe,le)}function ft(pe,le,xe){return le.f=le.block=xe,xe(pe,le)}function lt(pe){return!pe||!/\S/.test(pe.string)}function nt(pe){if(pe.linkTitle=!1,pe.linkHref=!1,pe.linkText=!1,pe.em=!1,pe.strong=!1,pe.strikethrough=!1,pe.quote=0,pe.indentedCode=!1,pe.f==ot){var le=me;if(!le){var xe=ae.innerMode(Re,pe.htmlState);le=xe.mode.name=="xml"&&xe.state.tagStart===null&&!xe.state.context&&xe.state.tokenize.isInText}le&&(pe.f=vt,pe.block=at,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function at(pe,le){var xe=pe.column()===le.indentation,Ne=lt(le.prevLine.stream),Xe=le.indentedCode,be=le.prevLine.hr,ze=le.list!==!1,Ie=(le.listStack[le.listStack.length-1]||0)+3;le.indentedCode=!1;var dt=le.indentation;if(le.indentationDiff===null&&(le.indentationDiff=le.indentation,ze)){for(le.list=null;dt<le.listStack[le.listStack.length-1];)le.listStack.pop(),le.listStack.length?le.indentation=le.listStack[le.listStack.length-1]:le.list=!1;le.list!==!1&&(le.indentationDiff=dt-le.listStack[le.listStack.length-1])}var Ue=!Ne&&!be&&!le.prevLine.header&&(!ze||!Xe)&&!le.prevLine.fencedCodeEnd,qe=(le.list===!1||be||Ne)&&le.indentation<=Ie&&pe.match(Ce),ke=null;if(le.indentationDiff>=4&&(Xe||le.prevLine.fencedCodeEnd||le.prevLine.header||Ne))return pe.skipToEnd(),le.indentedCode=!0,Fe.code;if(pe.eatSpace())return null;if(xe&&le.indentation<=Ie&&(ke=pe.match(ve))&&ke[1].length<=6)return le.quote=0,le.header=ke[1].length,le.thisLine.header=!0,Te.highlightFormatting&&(le.formatting="header"),le.f=le.inline,Ke(le);if(le.indentation<=Ie&&pe.eat(">"))return le.quote=xe?1:le.quote+1,Te.highlightFormatting&&(le.formatting="quote"),pe.eatSpace(),Ke(le);if(!qe&&!le.setext&&xe&&le.indentation<=Ie&&(ke=pe.match(fe))){var et=ke[1]?"ol":"ul";return le.indentation=dt+pe.current().length,le.list=!0,le.quote=0,le.listStack.push(le.indentation),le.em=!1,le.strong=!1,le.code=!1,le.strikethrough=!1,Te.taskLists&&pe.match(tt,!1)&&(le.taskList=!0),le.f=le.inline,Te.highlightFormatting&&(le.formatting=["list","list-"+et]),Ke(le)}else{if(xe&&le.indentation<=Ie&&(ke=pe.match(Le,!0)))return le.quote=0,le.fencedEndRE=new RegExp(ke[1]+"+ *$"),le.localMode=Te.fencedCodeBlockHighlighting&&ye(ke[2]||Te.fencedCodeBlockDefaultMode),le.localMode&&(le.localState=ae.startState(le.localMode)),le.f=le.block=Wt,Te.highlightFormatting&&(le.formatting="code-block"),le.code=-1,Ke(le);if(le.setext||(!Ue||!ze)&&!le.quote&&le.list===!1&&!le.code&&!qe&&!Me.test(pe.string)&&(ke=pe.lookAhead(1))&&(ke=ke.match(st)))return le.setext?(le.header=le.setext,le.setext=0,pe.skipToEnd(),Te.highlightFormatting&&(le.formatting="header")):(le.header=ke[0].charAt(0)=="="?1:2,le.setext=le.header),le.thisLine.header=!0,le.f=le.inline,Ke(le);if(qe)return pe.skipToEnd(),le.hr=!0,le.thisLine.hr=!0,Fe.hr;if(pe.peek()==="[")return ct(pe,le,mt)}return ct(pe,le,le.inline)}function ot(pe,le){var xe=Re.token(pe,le.htmlState);if(!me){var Ne=ae.innerMode(Re,le.htmlState);(Ne.mode.name=="xml"&&Ne.state.tagStart===null&&!Ne.state.context&&Ne.state.tokenize.isInText||le.md_inside&&pe.current().indexOf(">")>-1)&&(le.f=vt,le.block=at,le.htmlState=null)}return xe}function Wt(pe,le){var xe=le.listStack[le.listStack.length-1]||0,Ne=le.indentation<xe,Xe=xe+3;if(le.fencedEndRE&&le.indentation<=Xe&&(Ne||pe.match(le.fencedEndRE))){Te.highlightFormatting&&(le.formatting="code-block");var be;return Ne||(be=Ke(le)),le.localMode=le.localState=null,le.block=at,le.f=vt,le.fencedEndRE=null,le.code=0,le.thisLine.fencedCodeEnd=!0,Ne?ft(pe,le,le.block):be}else return le.localMode?le.localMode.token(pe,le.localState):(pe.skipToEnd(),Fe.code)}function Ke(pe){var le=[];if(pe.formatting){le.push(Fe.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var xe=0;xe<pe.formatting.length;xe++)le.push(Fe.formatting+"-"+pe.formatting[xe]),pe.formatting[xe]==="header"&&le.push(Fe.formatting+"-"+pe.formatting[xe]+"-"+pe.header),pe.formatting[xe]==="quote"&&(!Te.maxBlockquoteDepth||Te.maxBlockquoteDepth>=pe.quote?le.push(Fe.formatting+"-"+pe.formatting[xe]+"-"+pe.quote):le.push("error"))}if(pe.taskOpen)return le.push("meta"),le.length?le.join(" "):null;if(pe.taskClosed)return le.push("property"),le.length?le.join(" "):null;if(pe.linkHref?le.push(Fe.linkHref,"url"):(pe.strong&&le.push(Fe.strong),pe.em&&le.push(Fe.em),pe.strikethrough&&le.push(Fe.strikethrough),pe.emoji&&le.push(Fe.emoji),pe.linkText&&le.push(Fe.linkText),pe.code&&le.push(Fe.code),pe.image&&le.push(Fe.image),pe.imageAltText&&le.push(Fe.imageAltText,"link"),pe.imageMarker&&le.push(Fe.imageMarker)),pe.header&&le.push(Fe.header,Fe.header+"-"+pe.header),pe.quote&&(le.push(Fe.quote),!Te.maxBlockquoteDepth||Te.maxBlockquoteDepth>=pe.quote?le.push(Fe.quote+"-"+pe.quote):le.push(Fe.quote+"-"+Te.maxBlockquoteDepth)),pe.list!==!1){var Ne=(pe.listStack.length-1)%3;Ne?Ne===1?le.push(Fe.list2):le.push(Fe.list3):le.push(Fe.list1)}return pe.trailingSpaceNewLine?le.push("trailing-space-new-line"):pe.trailingSpace&&le.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),le.length?le.join(" "):null}function We(pe,le){if(pe.match(_e,!0))return Ke(le)}function vt(pe,le){var xe=le.text(pe,le);if(typeof xe!="undefined")return xe;if(le.list)return le.list=null,Ke(le);if(le.taskList){var Ne=pe.match(tt,!0)[1]===" ";return Ne?le.taskOpen=!0:le.taskClosed=!0,Te.highlightFormatting&&(le.formatting="task"),le.taskList=!1,Ke(le)}if(le.taskOpen=!1,le.taskClosed=!1,le.header&&pe.match(/^#+$/,!0))return Te.highlightFormatting&&(le.formatting="header"),Ke(le);var Xe=pe.next();if(le.linkTitle){le.linkTitle=!1;var be=Xe;Xe==="("&&(be=")"),be=(be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ze="^\\s*(?:[^"+be+"\\\\]+|\\\\\\\\|\\\\.)"+be;if(pe.match(new RegExp(ze),!0))return Fe.linkHref}if(Xe==="`"){var Ie=le.formatting;Te.highlightFormatting&&(le.formatting="code"),pe.eatWhile("`");var dt=pe.current().length;if(le.code==0&&(!le.quote||dt==1))return le.code=dt,Ke(le);if(dt==le.code){var Ue=Ke(le);return le.code=0,Ue}else return le.formatting=Ie,Ke(le)}else if(le.code)return Ke(le);if(Xe==="\\"&&(pe.next(),Te.highlightFormatting)){var qe=Ke(le),ke=Fe.formatting+"-escape";return qe?qe+" "+ke:ke}if(Xe==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return le.imageMarker=!0,le.image=!0,Te.highlightFormatting&&(le.formatting="image"),Ke(le);if(Xe==="["&&le.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return le.imageMarker=!1,le.imageAltText=!0,Te.highlightFormatting&&(le.formatting="image"),Ke(le);if(Xe==="]"&&le.imageAltText){Te.highlightFormatting&&(le.formatting="image");var qe=Ke(le);return le.imageAltText=!1,le.image=!1,le.inline=le.f=Ge,qe}if(Xe==="["&&!le.image)return le.linkText&&pe.match(/^.*?\]/)||(le.linkText=!0,Te.highlightFormatting&&(le.formatting="link")),Ke(le);if(Xe==="]"&&le.linkText){Te.highlightFormatting&&(le.formatting="link");var qe=Ke(le);return le.linkText=!1,le.inline=le.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ge:vt,qe}if(Xe==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){le.f=le.inline=Ae,Te.highlightFormatting&&(le.formatting="link");var qe=Ke(le);return qe?qe+=" ":qe="",qe+Fe.linkInline}if(Xe==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){le.f=le.inline=Ae,Te.highlightFormatting&&(le.formatting="link");var qe=Ke(le);return qe?qe+=" ":qe="",qe+Fe.linkEmail}if(Te.xml&&Xe==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var et=pe.string.indexOf(">",pe.pos);if(et!=-1){var it=pe.string.substring(pe.start,et);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(it)&&(le.md_inside=!0)}return pe.backUp(1),le.htmlState=ae.startState(Re),ft(pe,le,ot)}if(Te.xml&&Xe==="<"&&pe.match(/^\/\w*?>/))return le.md_inside=!1,"tag";if(Xe==="*"||Xe==="_"){for(var oe=1,ee=pe.pos==1?" ":pe.string.charAt(pe.pos-2);oe<3&&pe.eat(Xe);)oe++;var z=pe.peek()||" ",re=!/\s/.test(z)&&(!De.test(z)||/\s/.test(ee)||De.test(ee)),ue=!/\s/.test(ee)&&(!De.test(ee)||/\s/.test(z)||De.test(z)),ne=null,ge=null;if(oe%2&&(!le.em&&re&&(Xe==="*"||!ue||De.test(ee))?ne=!0:le.em==Xe&&ue&&(Xe==="*"||!re||De.test(z))&&(ne=!1)),oe>1&&(!le.strong&&re&&(Xe==="*"||!ue||De.test(ee))?ge=!0:le.strong==Xe&&ue&&(Xe==="*"||!re||De.test(z))&&(ge=!1)),ge!=null||ne!=null){Te.highlightFormatting&&(le.formatting=ne==null?"strong":ge==null?"em":"strong em"),ne===!0&&(le.em=Xe),ge===!0&&(le.strong=Xe);var Ue=Ke(le);return ne===!1&&(le.em=!1),ge===!1&&(le.strong=!1),Ue}}else if(Xe===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Ke(le);pe.backUp(1)}if(Te.strikethrough){if(Xe==="~"&&pe.eatWhile(Xe)){if(le.strikethrough){Te.highlightFormatting&&(le.formatting="strikethrough");var Ue=Ke(le);return le.strikethrough=!1,Ue}else if(pe.match(/^[^\s]/,!1))return le.strikethrough=!0,Te.highlightFormatting&&(le.formatting="strikethrough"),Ke(le)}else if(Xe===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Ke(le);pe.backUp(2)}}if(Te.emoji&&Xe===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){le.emoji=!0,Te.highlightFormatting&&(le.formatting="emoji");var je=Ke(le);return le.emoji=!1,je}return Xe===" "&&(pe.match(/^ +$/,!1)?le.trailingSpace++:le.trailingSpace&&(le.trailingSpaceNewLine=!0)),Ke(le)}function Ae(pe,le){var xe=pe.next();if(xe===">"){le.f=le.inline=vt,Te.highlightFormatting&&(le.formatting="link");var Ne=Ke(le);return Ne?Ne+=" ":Ne="",Ne+Fe.linkInline}return pe.match(/^[^>]+/,!0),Fe.linkInline}function Ge(pe,le){if(pe.eatSpace())return null;var xe=pe.next();return xe==="("||xe==="["?(le.f=le.inline=Oe(xe==="("?")":"]"),Te.highlightFormatting&&(le.formatting="link-string"),le.linkHref=!0,Ke(le)):"error"}var Ee={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Oe(pe){return function(le,xe){var Ne=le.next();if(Ne===pe){xe.f=xe.inline=vt,Te.highlightFormatting&&(xe.formatting="link-string");var Xe=Ke(xe);return xe.linkHref=!1,Xe}return le.match(Ee[pe]),xe.linkHref=!0,Ke(xe)}}function mt(pe,le){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(le.f=Ye,pe.next(),Te.highlightFormatting&&(le.formatting="link"),le.linkText=!0,Ke(le)):ct(pe,le,vt)}function Ye(pe,le){if(pe.match(/^\]:/,!0)){le.f=le.inline=Qe,Te.highlightFormatting&&(le.formatting="link");var xe=Ke(le);return le.linkText=!1,xe}return pe.match(/^([^\]\\]|\\.)+/,!0),Fe.linkText}function Qe(pe,le){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?le.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),le.f=le.inline=vt,Fe.linkHref+" url")}var ut={startState:function(){return{f:at,prevLine:{stream:null},thisLine:{stream:null},block:at,htmlState:null,indentation:0,inline:vt,text:We,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(pe){return{f:pe.f,prevLine:pe.prevLine,thisLine:pe.thisLine,block:pe.block,htmlState:pe.htmlState&&ae.copyState(Re,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?ae.copyState(pe.localMode,pe.localState):null,inline:pe.inline,text:pe.text,formatting:!1,linkText:pe.linkText,linkTitle:pe.linkTitle,linkHref:pe.linkHref,code:pe.code,em:pe.em,strong:pe.strong,strikethrough:pe.strikethrough,emoji:pe.emoji,header:pe.header,setext:pe.setext,hr:pe.hr,taskList:pe.taskList,list:pe.list,listStack:pe.listStack.slice(0),quote:pe.quote,indentedCode:pe.indentedCode,trailingSpace:pe.trailingSpace,trailingSpaceNewLine:pe.trailingSpaceNewLine,md_inside:pe.md_inside,fencedEndRE:pe.fencedEndRE}},token:function(pe,le){if(le.formatting=!1,pe!=le.thisLine.stream){if(le.header=0,le.hr=!1,pe.match(/^\s*$/,!0))return nt(le),null;if(le.prevLine=le.thisLine,le.thisLine={stream:pe},le.taskList=!1,le.trailingSpace=0,le.trailingSpaceNewLine=!1,!le.localState&&(le.f=le.block,le.f!=ot)){var xe=pe.match(/^\s*/,!0)[0].replace(/\t/g,rt).length;if(le.indentation=xe,le.indentationDiff=null,xe>0)return null}}return le.f(pe,le)},innerMode:function(pe){return pe.block==ot?{state:pe.htmlState,mode:Re}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:ut}},indent:function(pe,le,xe){return pe.block==ot&&Re.indent?Re.indent(pe.htmlState,le,xe):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,le,xe):ae.Pass},blankLine:nt,getType:Ke,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ut},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(At,Ft,he){(function(ae){ae(he(89780))})(function(ae){"use strict";ae.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 $e=0;$e<ae.modeInfo.length;$e++){var Te=ae.modeInfo[$e];Te.mimes&&(Te.mime=Te.mimes[0])}ae.findModeByMIME=function(Re){Re=Re.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var ye=ae.modeInfo[me];if(ye.mime==Re)return ye;if(ye.mimes){for(var Fe=0;Fe<ye.mimes.length;Fe++)if(ye.mimes[Fe]==Re)return ye}}if(/\+xml$/.test(Re))return ae.findModeByMIME("application/xml");if(/\+json$/.test(Re))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(Re){Re=Re.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var ye=ae.modeInfo[me];if(ye.ext){for(var Fe=0;Fe<ye.ext.length;Fe++)if(ye.ext[Fe]==Re)return ye}}},ae.findModeByFileName=function(Re){for(var me=0;me<ae.modeInfo.length;me++){var ye=ae.modeInfo[me];if(ye.file&&ye.file.test(Re))return ye}var Fe=Re.lastIndexOf("."),Ze=Fe>-1&&Re.substring(Fe+1,Re.length);if(Ze)return ae.findModeByExtension(Ze)},ae.findModeByName=function(Re){Re=Re.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var ye=ae.modeInfo[me];if(ye.name.toLowerCase()==Re)return ye;if(ye.alias){for(var Fe=0;Fe<ye.alias.length;Fe++)if(ye.alias[Fe].toLowerCase()==Re)return ye}}}})},67549:function(At,Ft,he){(function(ae){ae(he(89780))})(function(ae){"use strict";ae.defineMode("stex",function($e,Te){"use strict";function Re(_e,Le){_e.cmdState.push(Le)}function me(_e){return _e.cmdState.length>0?_e.cmdState[_e.cmdState.length-1]:null}function ye(_e){var Le=_e.cmdState.pop();Le&&Le.closeBracket()}function Fe(_e){for(var Le=_e.cmdState,Me=Le.length-1;Me>=0;Me--){var De=Le[Me];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function Ze(_e,Le,Me){return function(){this.name=_e,this.bracketNo=0,this.style=Le,this.styles=Me,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ce={};Ce.importmodule=Ze("importmodule","tag",["string","builtin"]),Ce.documentclass=Ze("documentclass","tag",["","atom"]),Ce.usepackage=Ze("usepackage","tag",["atom"]),Ce.begin=Ze("begin","tag",["atom"]),Ce.end=Ze("end","tag",["atom"]),Ce.label=Ze("label","tag",["atom"]),Ce.ref=Ze("ref","tag",["atom"]),Ce.eqref=Ze("eqref","tag",["atom"]),Ce.cite=Ze("cite","tag",["atom"]),Ce.bibitem=Ze("bibitem","tag",["atom"]),Ce.Bibitem=Ze("Bibitem","tag",["atom"]),Ce.RBibitem=Ze("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(_e,Le){_e.f=Le}function tt(_e,Le){var Me;if(_e.match(/^\\[a-zA-Z@]+/)){var De=_e.current().slice(1);return Me=Ce.hasOwnProperty(De)?Ce[De]:Ce.DEFAULT,Me=new Me,Re(Le,Me),fe(Le,st),Me.style}if(_e.match(/^\\[$&%#{}_]/)||_e.match(/^\\[,;!\/\\]/))return"tag";if(_e.match("\\["))return fe(Le,function(ct,ft){return ve(ct,ft,"\\]")}),"keyword";if(_e.match("\\("))return fe(Le,function(ct,ft){return ve(ct,ft,"\\)")}),"keyword";if(_e.match("$$"))return fe(Le,function(ct,ft){return ve(ct,ft,"$$")}),"keyword";if(_e.match("$"))return fe(Le,function(ct,ft){return ve(ct,ft,"$")}),"keyword";var rt=_e.next();if(rt=="%")return _e.skipToEnd(),"comment";if(rt=="}"||rt=="]"){if(Me=me(Le),Me)Me.closeBracket(rt),fe(Le,st);else return"error";return"bracket"}else return rt=="{"||rt=="["?(Me=Ce.DEFAULT,Me=new Me,Re(Le,Me),"bracket"):/\d/.test(rt)?(_e.eatWhile(/[\w.%]/),"atom"):(_e.eatWhile(/[\w\-_]/),Me=Fe(Le),Me.name=="begin"&&(Me.argument=_e.current()),Me.styleIdentifier())}function ve(_e,Le,Me){if(_e.eatSpace())return null;if(Me&&_e.match(Me))return fe(Le,tt),"keyword";if(_e.match(/^\\[a-zA-Z@]+/))return"tag";if(_e.match(/^[a-zA-Z]+/))return"variable-2";if(_e.match(/^\\[$&%#{}_]/)||_e.match(/^\\[,;!\/]/)||_e.match(/^[\^_&]/))return"tag";if(_e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(_e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var De=_e.next();return De=="{"||De=="}"||De=="["||De=="]"||De=="("||De==")"?"bracket":De=="%"?(_e.skipToEnd(),"comment"):"error"}function st(_e,Le){var Me=_e.peek(),De;return Me=="{"||Me=="["?(De=me(Le),De.openBracket(Me),_e.eat(Me),fe(Le,tt),"bracket"):/[ \t\r]/.test(Me)?(_e.eat(Me),null):(fe(Le,tt),ye(Le),tt(_e,Le))}return{startState:function(){var _e=Te.inMathMode?function(Le,Me){return ve(Le,Me)}:tt;return{cmdState:[],f:_e}},copyState:function(_e){return{cmdState:_e.cmdState.slice(),f:_e.f}},token:function(_e,Le){return Le.f(_e,Le)},blankLine:function(_e){_e.f=tt,_e.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},15525:function(At,Ft,he){(function(ae){ae(he(89780))})(function(ae){"use strict";var $e={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};ae.defineMode("xml",function(Re,me){var ye=Re.indentUnit,Fe={},Ze=me.htmlMode?$e:Te;for(var Ce in Ze)Fe[Ce]=Ze[Ce];for(var Ce in me)Fe[Ce]=me[Ce];var fe,tt;function ve(Ae,Ge){function Ee(Ye){return Ge.tokenize=Ye,Ye(Ae,Ge)}var Oe=Ae.next();if(Oe=="<")return Ae.eat("!")?Ae.eat("[")?Ae.match("CDATA[")?Ee(Le("atom","]]>")):null:Ae.match("--")?Ee(Le("comment","-->")):Ae.match("DOCTYPE",!0,!0)?(Ae.eatWhile(/[\w\._\-]/),Ee(Me(1))):null:Ae.eat("?")?(Ae.eatWhile(/[\w\._\-]/),Ge.tokenize=Le("meta","?>"),"meta"):(fe=Ae.eat("/")?"closeTag":"openTag",Ge.tokenize=st,"tag bracket");if(Oe=="&"){var mt;return Ae.eat("#")?Ae.eat("x")?mt=Ae.eatWhile(/[a-fA-F\d]/)&&Ae.eat(";"):mt=Ae.eatWhile(/[\d]/)&&Ae.eat(";"):mt=Ae.eatWhile(/[\w\.\-:]/)&&Ae.eat(";"),mt?"atom":"error"}else return Ae.eatWhile(/[^&<]/),null}ve.isInText=!0;function st(Ae,Ge){var Ee=Ae.next();if(Ee==">"||Ee=="/"&&Ae.eat(">"))return Ge.tokenize=ve,fe=Ee==">"?"endTag":"selfcloseTag","tag bracket";if(Ee=="=")return fe="equals",null;if(Ee=="<"){Ge.tokenize=ve,Ge.state=ft,Ge.tagName=Ge.tagStart=null;var Oe=Ge.tokenize(Ae,Ge);return Oe?Oe+" tag error":"tag error"}else return/[\'\"]/.test(Ee)?(Ge.tokenize=_e(Ee),Ge.stringStartCol=Ae.column(),Ge.tokenize(Ae,Ge)):(Ae.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function _e(Ae){var Ge=function(Ee,Oe){for(;!Ee.eol();)if(Ee.next()==Ae){Oe.tokenize=st;break}return"string"};return Ge.isInAttribute=!0,Ge}function Le(Ae,Ge){return function(Ee,Oe){for(;!Ee.eol();){if(Ee.match(Ge)){Oe.tokenize=ve;break}Ee.next()}return Ae}}function Me(Ae){return function(Ge,Ee){for(var Oe;(Oe=Ge.next())!=null;){if(Oe=="<")return Ee.tokenize=Me(Ae+1),Ee.tokenize(Ge,Ee);if(Oe==">")if(Ae==1){Ee.tokenize=ve;break}else return Ee.tokenize=Me(Ae-1),Ee.tokenize(Ge,Ee)}return"meta"}}function De(Ae,Ge,Ee){this.prev=Ae.context,this.tagName=Ge,this.indent=Ae.indented,this.startOfLine=Ee,(Fe.doNotIndent.hasOwnProperty(Ge)||Ae.context&&Ae.context.noIndent)&&(this.noIndent=!0)}function rt(Ae){Ae.context&&(Ae.context=Ae.context.prev)}function ct(Ae,Ge){for(var Ee;;){if(!Ae.context||(Ee=Ae.context.tagName,!Fe.contextGrabbers.hasOwnProperty(Ee)||!Fe.contextGrabbers[Ee].hasOwnProperty(Ge)))return;rt(Ae)}}function ft(Ae,Ge,Ee){return Ae=="openTag"?(Ee.tagStart=Ge.column(),lt):Ae=="closeTag"?nt:ft}function lt(Ae,Ge,Ee){return Ae=="word"?(Ee.tagName=Ge.current(),tt="tag",Wt):Fe.allowMissingTagName&&Ae=="endTag"?(tt="tag bracket",Wt(Ae,Ge,Ee)):(tt="error",lt)}function nt(Ae,Ge,Ee){if(Ae=="word"){var Oe=Ge.current();return Ee.context&&Ee.context.tagName!=Oe&&Fe.implicitlyClosed.hasOwnProperty(Ee.context.tagName)&&rt(Ee),Ee.context&&Ee.context.tagName==Oe||Fe.matchClosing===!1?(tt="tag",at):(tt="tag error",ot)}else return Fe.allowMissingTagName&&Ae=="endTag"?(tt="tag bracket",at(Ae,Ge,Ee)):(tt="error",ot)}function at(Ae,Ge,Ee){return Ae!="endTag"?(tt="error",at):(rt(Ee),ft)}function ot(Ae,Ge,Ee){return tt="error",at(Ae,Ge,Ee)}function Wt(Ae,Ge,Ee){if(Ae=="word")return tt="attribute",Ke;if(Ae=="endTag"||Ae=="selfcloseTag"){var Oe=Ee.tagName,mt=Ee.tagStart;return Ee.tagName=Ee.tagStart=null,Ae=="selfcloseTag"||Fe.autoSelfClosers.hasOwnProperty(Oe)?ct(Ee,Oe):(ct(Ee,Oe),Ee.context=new De(Ee,Oe,mt==Ee.indented)),ft}return tt="error",Wt}function Ke(Ae,Ge,Ee){return Ae=="equals"?We:(Fe.allowMissing||(tt="error"),Wt(Ae,Ge,Ee))}function We(Ae,Ge,Ee){return Ae=="string"?vt:Ae=="word"&&Fe.allowUnquoted?(tt="string",Wt):(tt="error",Wt(Ae,Ge,Ee))}function vt(Ae,Ge,Ee){return Ae=="string"?vt:Wt(Ae,Ge,Ee)}return{startState:function(Ae){var Ge={tokenize:ve,state:ft,indented:Ae||0,tagName:null,tagStart:null,context:null};return Ae!=null&&(Ge.baseIndent=Ae),Ge},token:function(Ae,Ge){if(!Ge.tagName&&Ae.sol()&&(Ge.indented=Ae.indentation()),Ae.eatSpace())return null;fe=null;var Ee=Ge.tokenize(Ae,Ge);return(Ee||fe)&&Ee!="comment"&&(tt=null,Ge.state=Ge.state(fe||Ee,Ae,Ge),tt&&(Ee=tt=="error"?Ee+" error":tt)),Ee},indent:function(Ae,Ge,Ee){var Oe=Ae.context;if(Ae.tokenize.isInAttribute)return Ae.tagStart==Ae.indented?Ae.stringStartCol+1:Ae.indented+ye;if(Oe&&Oe.noIndent)return ae.Pass;if(Ae.tokenize!=st&&Ae.tokenize!=ve)return Ee?Ee.match(/^(\s*)/)[0].length:0;if(Ae.tagName)return Fe.multilineTagIndentPastTag!==!1?Ae.tagStart+Ae.tagName.length+2:Ae.tagStart+ye*(Fe.multilineTagIndentFactor||1);if(Fe.alignCDATA&&/<!\[CDATA\[/.test(Ge))return 0;var mt=Ge&&/^<(\/)?([\w_:\.-]*)/.exec(Ge);if(mt&&mt[1])for(;Oe;)if(Oe.tagName==mt[2]){Oe=Oe.prev;break}else if(Fe.implicitlyClosed.hasOwnProperty(Oe.tagName))Oe=Oe.prev;else break;else if(mt)for(;Oe;){var Ye=Fe.contextGrabbers[Oe.tagName];if(Ye&&Ye.hasOwnProperty(mt[2]))Oe=Oe.prev;else break}for(;Oe&&Oe.prev&&!Oe.startOfLine;)Oe=Oe.prev;return Oe?Oe.indent+ye:Ae.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Fe.htmlMode?"html":"xml",helperType:Fe.htmlMode?"html":"xml",skipAttribute:function(Ae){Ae.state==We&&(Ae.state=Wt)},xmlCurrentTag:function(Ae){return Ae.tagName?{name:Ae.tagName,close:Ae.type=="closeTag"}:null},xmlCurrentContext:function(Ae){for(var Ge=[],Ee=Ae.context;Ee;Ee=Ee.prev)Ee.tagName&&Ge.push(Ee.tagName);return Ge.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(At,Ft,he){"use strict";he.d(Ft,{hP:function(){return it}});var ae=function(oe,ee){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var ue in re)Object.prototype.hasOwnProperty.call(re,ue)&&(z[ue]=re[ue])})(oe,ee)};function $e(oe,ee){function z(){this.constructor=oe}ae(oe,ee),oe.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function Te(oe,ee,z,re){return new(z||(z=Promise))(function(ue,ne){function ge(St){try{Dt(re.next(St))}catch(yt){ne(yt)}}function je(St){try{Dt(re.throw(St))}catch(yt){ne(yt)}}function Dt(St){var yt;St.done?ue(St.value):(yt=St.value,yt instanceof z?yt:new z(function(xt){xt(yt)})).then(ge,je)}Dt((re=re.apply(oe,ee||[])).next())})}function Re(oe,ee){var z,re,ue,ne,ge={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ne={next:je(0),throw:je(1),return:je(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function je(Dt){return function(St){return function(yt){if(z)throw new TypeError("Generator is already executing.");for(;ge;)try{if(z=1,re&&(ue=2&yt[0]?re.return:yt[0]?re.throw||((ue=re.return)&&ue.call(re),0):re.next)&&!(ue=ue.call(re,yt[1])).done)return ue;switch(re=0,ue&&(yt=[2&yt[0],ue.value]),yt[0]){case 0:case 1:ue=yt;break;case 4:return ge.label++,{value:yt[1],done:!1};case 5:ge.label++,re=yt[1],yt=[0];continue;case 7:yt=ge.ops.pop(),ge.trys.pop();continue;default:if(ue=ge.trys,!((ue=ue.length>0&&ue[ue.length-1])||yt[0]!==6&&yt[0]!==2)){ge=0;continue}if(yt[0]===3&&(!ue||yt[1]>ue[0]&&yt[1]<ue[3])){ge.label=yt[1];break}if(yt[0]===6&&ge.label<ue[1]){ge.label=ue[1],ue=yt;break}if(ue&&ge.label<ue[2]){ge.label=ue[2],ge.ops.push(yt);break}ue[2]&&ge.ops.pop(),ge.trys.pop();continue}yt=ee.call(oe,ge)}catch(xt){yt=[6,xt],re=0}finally{z=ue=0}if(5&yt[0])throw yt[1];return{value:yt[0]?yt[1]:void 0,done:!0}}([Dt,St])}}}function me(){for(var oe=0,ee=0,z=arguments.length;ee<z;ee++)oe+=arguments[ee].length;var re=Array(oe),ue=0;for(ee=0;ee<z;ee++)for(var ne=arguments[ee],ge=0,je=ne.length;ge<je;ge++,ue++)re[ue]=ne[ge];return re}var ye=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(ee,z){for(var re=0,ue=z;re<ue.length;re++){var ne=ue[re],ge=ne[0],je=ne[1];ee.setAttribute(ge,je)}},oe.createRect=function(ee,z,re){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",ee.toString()),ue.setAttribute("height",z.toString()),re&&oe.setAttributes(ue,re),ue},oe.createLine=function(ee,z,re,ue,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",ee.toString()),ge.setAttribute("y1",z.toString()),ge.setAttribute("x2",re.toString()),ge.setAttribute("y2",ue.toString()),ne&&oe.setAttributes(ge,ne),ge},oe.createPolygon=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",ee),z&&oe.setAttributes(re,z),re},oe.createCircle=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(ee/2).toString()),re.setAttribute("cy",(ee/2).toString()),re.setAttribute("r",ee.toString()),z&&oe.setAttributes(re,z),re},oe.createEllipse=function(ee,z,re){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(ee/2).toString()),ue.setAttribute("cy",(z/2).toString()),ue.setAttribute("rx",(ee/2).toString()),ue.setAttribute("ry",(z/2).toString()),re&&oe.setAttributes(ue,re),ue},oe.createGroup=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return ee&&oe.setAttributes(z,ee),z},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(ee,z,re,ue,ne,ge,je){var Dt=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(Dt,[["id",ee],["orient",z],["markerWidth",re.toString()],["markerHeight",ue.toString()],["refX",ne.toString()],["refY",ge.toString()]]),Dt.appendChild(je),Dt},oe.createText=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),ee&&oe.setAttributes(z,ee),z},oe.createTSpan=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=ee,z&&oe.setAttributes(re,z),re},oe.createImage=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return ee&&oe.setAttributes(z,ee),z},oe.createPoint=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=ee,re.y=z,re},oe.createPath=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",ee),z&&oe.setAttributes(re,z),re},oe}(),Fe=function(){function oe(){}return oe.addKey=function(ee){oe.key=ee},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}(),Ze=function(){function oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return oe.prototype.rasterize=function(ee,z,re){var ue=this;return new Promise(function(ne){var ge=re!==void 0?re:document.createElement("canvas");ee===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var je=document.createElementNS("http://www.w3.org/2000/svg","svg");je.setAttribute("xmlns","http://www.w3.org/2000/svg"),je.setAttribute("width",z.width.baseVal.valueAsString),je.setAttribute("height",z.height.baseVal.valueAsString),je.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),je.innerHTML=z.innerHTML,ue.naturalSize===!0?(je.width.baseVal.value=ee.naturalWidth,je.height.baseVal.value=ee.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(je.width.baseVal.value=ue.width,je.height.baseVal.value=ue.height),ge.width=je.width.baseVal.value,ge.height=je.height.baseVal.value;var Dt=je.outerHTML,St=ge.getContext("2d");ue.markersOnly!==!0&&St.drawImage(ee,0,0,ge.width,ge.height);var yt=window.URL,xt=new Image(ge.width,ge.height);xt.setAttribute("crossOrigin","anonymous");var Nt=new Blob([Dt],{type:"image/svg+xml"}),Lt=yt.createObjectURL(Nt);xt.onload=function(){St.drawImage(xt,0,0),yt.revokeObjectURL(Lt);var kt=ge.toDataURL(ue.imageType,ue.imageQuality);ne(kt)},xt.src=Lt})},oe}(),Ce=function(){},fe=function(){function oe(ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ee+"_"}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(ee){return this.styleSheet===void 0&&this.addStyleSheet(),ee.name=""+this.classNamePrefix+ee.localName,this.classes.push(ee),this.styleSheet.sheet.insertRule("."+ee.name+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length),ee},oe.prototype.addRule=function(ee){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ee),this.styleSheet.sheet.insertRule(ee.selector+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var ee;this.styleSheet=document.createElement("style"),((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).appendChild(this.styleSheet),this.addRule(new tt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new tt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new tt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ve("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ve("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},oe.prototype.removeStyleSheet=function(){var ee;this.styleSheet&&(((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),tt=function(oe,ee){this.selector=oe,this.style=ee},ve=function(oe,ee){this.localName=oe,this.style=ee},st=function(){function oe(ee,z,re,ue,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ee,this.displayMode=z,this.markerItems=re,this.uiStyleSettings=ue,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return oe.prototype.show=function(ee){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,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 ge=document.createElement("div");ge.className=""+z.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){z.markerToolbarButtonClicked(ge,ne)}),z.buttons.push(ge),z.markerButtons.push(ge)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ue=document.createElement("div");ue.className=this.toolbarBlockStyleClass.name,ue.style.whiteSpace="nowrap",ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ue),this.addActionButton(ue,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ue,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},oe.prototype.addButtonClickListener=function(ee){this.buttonClickListeners.push(ee)},oe.prototype.removeButtonClickListener=function(ee){this.buttonClickListeners.indexOf(ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ee),1)},oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ee=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<ee||z===ee&&this.markerButtons.length-1===ee?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===ee&&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 ee=this;this.buttons.forEach(function(z){z.className=z.className.replace(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ee.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name)})},oe.prototype.addActionButton=function(ee,z,re){var ue=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",re),ne.addEventListener("click",function(){ue.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}ee.appendChild(ne),this.buttons.push(ne)},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("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 ve("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
padding: `+ee+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new tt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new tt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},oe.prototype.markerToolbarButtonClicked=function(ee,z){this.setActiveButton(ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},oe.prototype.actionToolbarButtonClicked=function(ee,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(ee){this.resetButtonStyles(),ee.className=ee.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},oe.prototype.setActiveMarkerButton=function(ee){var z=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===ee});z&&this.setActiveButton(z)},oe.prototype.setCurrentMarker=function(ee){var z=this;this.currentMarker=ee,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}(),_e=function(){function oe(ee,z,re,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=ee,this.displayMode=z,this.uiStyleSettings=re,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return oe.prototype.addStyles=function(){var ee;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
|
|
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("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 ve("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new tt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new tt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},oe.prototype.show=function(ee){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,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(ee){var z,re,ue=this;this.panels=ee,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 ge;ne.uiStyleSettings=ue.uiStyleSettings;var je=document.createElement("div");je.className=ue.toolboxButtonStyleClass.name+" "+((ge=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:ue.toolboxButtonStyleColorsClass.name),je.innerHTML=ne.icon,je.title=ne.title,je.addEventListener("click",function(){ue.panelButtonClick(ne)}),ue.panelButtons.push(je),ue.buttonRow.appendChild(je)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},oe.prototype.panelButtonClick=function(ee){var z=this,re=-1;if(ee!==this.activePanel){re=this.panels.indexOf(ee),this.panelRow.innerHTML="";var ue=ee.getUi();ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ue),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=ee}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,ge){var je,Dt;ne.className=z.toolboxButtonStyleClass.name+" "+(ge===re?""+((je=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&je!==void 0?je:z.toolboxActiveButtonStyleColorsClass.name):""+((Dt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Dt!==void 0?Dt:z.toolboxButtonStyleColorsClass.name))})},oe}(),Le=function(oe,ee){this.title=oe,this.icon=ee},Me=function(oe){function ee(z,re,ue,ne){var ge=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 ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=re,ge.currentColor=ue,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return $e(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var ne=z.getColorBox(ue);re.appendChild(ne),z.colorBoxes.push(ne)}),re},ee.prototype.getColorBox=function(z){var re=this,ue=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ue,ge=document.createElement("div");ge.style.display="inline-block",ge.style.boxSizing="content-box",ge.style.width=ne-2+"px",ge.style.height=ne-2+"px",ge.style.padding="1px",ge.style.marginRight="2px",ge.style.marginBottom="2px",ge.style.borderWidth="2px",ge.style.borderStyle="solid",ge.style.borderRadius=(ne+2)/2+"px",ge.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){re.setCurrentColor(z,ge)});var je=document.createElement("div");return je.style.display="inline-block",je.style.width=ne-2+"px",je.style.height=ne-2+"px",je.style.backgroundColor=z,je.style.borderRadius=ne/2+"px",z==="transparent"&&(je.style.fill=this.uiStyleSettings.toolboxAccentColor,je.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>`),ge.appendChild(je),ge},ee.prototype.setCurrentColor=function(z,re){var ue=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ee}(Le),De=function(){function oe(ee,z,re){this._state="new",this._isSelected=!1,this._container=ee,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(ee){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(ee,z){},oe.prototype.dblClick=function(ee,z){},oe.prototype.manipulate=function(ee){},oe.prototype.pointerUp=function(ee){this.stateChanged()},oe.prototype.dispose=function(){},oe.prototype.addMarkerVisualToContainer=function(ee){this.container.childNodes.length>0?this.container.insertBefore(ee,this.container.childNodes[0]):this.container.appendChild(ee)},oe.prototype.getState=function(){return{typeName:oe.typeName,state:this.state,notes:this.notes}},oe.prototype.restoreState=function(ee){this._state=ee.state,this.notes=ee.notes},oe.prototype.scale=function(ee,z){},oe.prototype.colorChanged=function(ee){this.onColorChanged&&this.onColorChanged(ee),this.stateChanged()},oe.prototype.fillColorChanged=function(ee){this.onFillColorChanged&&this.onFillColorChanged(ee),this.stateChanged()},oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ee=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ee.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ee)&&this.onStateChanged(this)}},oe.typeName="MarkerBase",oe}(),rt=function(){function oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return oe.prototype.findGripByVisual=function(ee){return this.topLeft.ownsTarget(ee)?this.topLeft:this.topCenter.ownsTarget(ee)?this.topCenter:this.topRight.ownsTarget(ee)?this.topRight:this.centerLeft.ownsTarget(ee)?this.centerLeft:this.centerRight.ownsTarget(ee)?this.centerRight:this.bottomLeft.ownsTarget(ee)?this.bottomLeft:this.bottomCenter.ownsTarget(ee)?this.bottomCenter:this.bottomRight.ownsTarget(ee)?this.bottomRight:void 0},oe}(),ct=function(){function oe(){this.GRIP_SIZE=10,this.visual=ye.createGroup(),this.visual.appendChild(ye.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ye.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(ee){return ee===this.visual||ee===this.visual.childNodes[0]||ee===this.visual.childNodes[1]},oe}(),ft=function(){function oe(){}return oe.toITransformMatrix=function(ee){return{a:ee.a,b:ee.b,c:ee.c,d:ee.d,e:ee.e,f:ee.f}},oe.toSVGMatrix=function(ee,z){return ee.a=z.a,ee.b=z.b,ee.c=z.c,ee.d=z.d,ee.e=z.e,ee.f=z.f,ee},oe}(),lt=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(ye.createTransform()),ne.setupControlBox(),ne}return $e(ee,oe),Object.defineProperty(ee.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var re=ye.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),ee.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))},ee.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 ue=this.unrotatePoint(z);if(this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.offsetX=ue.x-this.left,this.offsetY=ue.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(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 ge=this.container.transform.baseVal.getItem(0);ge.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ge,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ee.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)},ee.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},ee.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)},ee.prototype.resize=function(z){var re=this.manipulationStartLeft,ue=this.manipulationStartWidth,ne=this.manipulationStartTop,ge=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,ge=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+z.y-this.manipulationStartY}ue>=0?(this.left=re,this.width=ue):(this.left=re+ue,this.width=-ue),ge>=0?(this.top=ne,this.height=ge):(this.top=ne+ge,this.height=-ge),this.setSize()},ee.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ee.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()}},ee.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)},ee.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM(),ue=ye.createPoint(z.x,z.y);return{x:(ue=ue.matrixTransform(re)).x,y:ue.y}},ee.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var ue=ye.createPoint(z.x,z.y);return{x:(ue=ue.matrixTransform(re)).x,y:ue.y}},ee.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=ye.createGroup();var z=ye.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ye.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=ye.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 rt,this.addControlGrips(),this.controlBox.style.display="none"},ee.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()},ee.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()},ee.prototype.createGrip=function(){var z=new ct;return z.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,ue=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,ge=(this.height+this.CB_DISTANCE)/2-z/2,je=this.height+this.CB_DISTANCE-z/2,Dt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,ue),this.positionGrip(this.controlGrips.topCenter.visual,ne,ue),this.positionGrip(this.controlGrips.topRight.visual,Dt,ue),this.positionGrip(this.controlGrips.centerLeft.visual,re,ge),this.positionGrip(this.controlGrips.centerRight.visual,Dt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,re,je),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,je),this.positionGrip(this.controlGrips.bottomRight.visual,Dt,je),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ue-3*this.CB_DISTANCE)},ee.prototype.positionGrip=function(z,re,ue){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,ue),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ee.prototype.showControlBox=function(){this.controlBox.style.display=""},ee.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ft.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ft.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},oe.prototype.getState.call(this))},ee.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(ft.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re);var ue=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ue.x*z,y:ue.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},ee}(De),nt=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=ye.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)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.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))},ee.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()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},ee.title="Rectangle marker",ee}(lt),at=function(oe){function ee(z,re,ue,ne){var ge=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=re,ge.currentWidth=ue,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return $e(ee,oe),ee.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(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ue===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(ue,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.innerText=ue.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var je=document.createElement("div");je.style.minHeight="20px",je.style.flexGrow="2",je.style.display="flex",je.style.alignItems="center";var Dt=document.createElement("hr");Dt.style.minWidth="20px",Dt.style.border="0px",Dt.style.borderTop=ue+"px solid "+z.uiStyleSettings.toolboxColor,Dt.style.flexGrow="2",je.appendChild(Dt),ne.appendChild(je),z.widthBoxes.push(ne)}),re},ee.prototype.setCurrentWidth=function(z,re){var ue=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ee}(Le),ot=function(oe){function ee(z,re,ue,ne){var ge=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 ge.styles=[],ge.styleBoxes=[],ge.styles=re,ge.currentStyle=ue,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return $e(ee,oe),ee.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(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.styles.length-5+"%",ne.style.borderColor=ue===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(ue,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var je=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ue!==""?'stroke-dasharray="'+ue+'"':"")+` />
|
|
</svg>`;ge.innerHTML=je,ne.appendChild(ge),z.styleBoxes.push(ne)}),re},ee.prototype.setCurrentStyle=function(z,re){var ue=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ee}(Le),Wt=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Me("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new at("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ot("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return $e(ee,oe),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="FrameMarker",ee.title="Frame marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ee}(nt),Ke=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"},We=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!!oe.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},ee.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")},ee.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)},ee.prototype.adjustVisual=function(){},ee.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)},ee.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()},ee.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=ye.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ee.prototype.adjustControlBox=function(){this.positionGrips()},ee.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ee.prototype.createGrip=function(){var z=new ct;return z.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(z.visual),z},ee.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)},ee.prototype.positionGrip=function(z,re,ue){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,ue),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},oe.prototype.getState.call(this))},ee.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},ee.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()},ee}(De),vt=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Me("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new at("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ot("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorLine=ye.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ye.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)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ee.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()),ye.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.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()},ee.typeName="LineMarker",ee.title="Line marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ee}(We),Ae=function(oe){function ee(z,re,ue,ne){var ge=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 ge.fonts=[],ge.fontBoxes=[],ge.fonts=re,ge.currentFont=ue,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return $e(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.flexGrow="2",this.fonts.forEach(function(ue){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.fonts.length-5+"%",ne.style.borderColor=ue===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(ue,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=ue,ge.style.overflow="hidden";var je=document.createElement("div");je.style.whiteSpace="nowrap",je.style.overflow="hidden",je.style.textOverflow="ellipsis",je.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(je),ne.appendChild(ge),z.fontBoxes.push(ne)}),re},ee.prototype.setCurrentFont=function(z,re){var ue=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ee}(Le),Ge=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=ue.defaultColor,ne.fontFamily=ue.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new Me("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Ae("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return $e(ee,oe),ee.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(ue){ue===z&&(re=!0)}),re},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.bgRectangle=ye.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ye.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ee.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")},ee.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(ye.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ee.prototype.getTextScale=function(){var z=this.textElement.getBBox(),re=1;if(z.width>0&&z.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;re=Math.min(ue,ne)}return re},ee.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),ue=0,ne=0;return re.width>0&&re.height>0&&(ue=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:ue,y:ne}},ee.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),ue=this.getTextPosition(re);ue.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},ee.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)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ee.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},ee.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 ue=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ue)),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")},ee.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}),ue=this.textElement.getBBox(),ne={x:ue.width*z,y:ue.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"}},ee.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()},ee.prototype.select=function(){oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),oe.prototype.deselect.call(this)},ee.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},ee.prototype.setColor=function(z){this.textElement&&ye.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},ee.prototype.setFont=function(z){this.textElement&&ye.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ee.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ee.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.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=ee.typeName,z},ee.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()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize(),this.sizeText(),this.positionTextEditor()},ee.typeName="TextMarker",ee.title="Text marker",ee.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>',ee}(lt),Ee=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ue.defaultColor,ne.lineWidth=ue.defaultStrokeWidth,ne.pixelRatio=ue.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new Me("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new at("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.drawingImage=ye.createImage(),this.visual.appendChild(this.drawingImage);var z=ye.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},ee.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)},ee.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)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ee.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)},ee.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)},ee.prototype.select=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.select.call(this)},ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.deselect.call(this)},ee.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],ue=re[0],ne=re[1],ge=re[2],je=re[3],Dt=!1,St=0;St<this.canvasElement.height;St++)for(var yt=0;yt<this.canvasElement.width;yt++)z.data[St*this.canvasElement.width*4+4*yt+3]>0&&(Dt=!0,St<ne&&(ne=St),yt<ue&&(ue=yt),St>je&&(je=St),yt>ge&&(ge=yt));if(Dt){this.left=ue/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-ue)/this.pixelRatio,this.height=(je-ne)/this.pixelRatio;var xt=document.createElement("canvas");xt.width=ge-ue,xt.height=je-ne,xt.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ne,ge-ue,je-ne),0,0),this.drawingImgUrl=xt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ee.prototype.setDrawingImage=function(){ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ee.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},ee.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){this.createVisual(),oe.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setDrawingImage()},ee.typeName="FreehandMarker",ee.title="Freehand marker",ee.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>',ee}(lt),Oe=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,ue||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=re,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return $e(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var ue=function(je){var Dt="both";switch(je){case 0:Dt="both";break;case 1:Dt="start";break;case 2:Dt="end";break;case 3:Dt="none"}var St=document.createElement("div");if(St.style.display="flex",St.style.flexGrow="2",St.style.alignItems="center",St.style.justifyContent="space-between",St.style.padding="5px",St.style.borderWidth="2px",St.style.borderStyle="solid",St.style.borderColor=Dt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",St.addEventListener("click",function(){z.setCurrentType(Dt,St)}),re.appendChild(St),Dt==="both"||Dt==="start"){var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.minHeight="20px",yt.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>`,yt.style.marginLeft="5px",St.appendChild(yt)}var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.minHeight="20px",xt.style.flexGrow="2";var Nt=document.createElement("hr");if(Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Nt.style.flexGrow="2",xt.appendChild(Nt),St.appendChild(xt),Dt==="both"||Dt==="end"){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.minHeight="20px",Lt.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>`,Lt.style.marginRight="5px",St.appendChild(Lt)}ne.typeBoxes.push(St)},ne=this,ge=0;ge<4;ge++)ue(ge);return re},ee.prototype.setCurrentType=function(z,re){var ue=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ee}(Le),mt=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new Oe("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},ee.prototype.getArrowPoints=function(z,re){var ue=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-ue/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+ue/2)+","+(re+ne/2)},ee.prototype.createTips=function(){this.arrow1=ye.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ye.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow2)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},ee.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",ye.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ye.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 ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,0)}},ee.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},ee.typeName="ArrowMarker",ee.title="Arrow marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ee}(vt),Ye=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.fillColor=ue.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Me("Color",ue.defaultColorSet,ue.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return $e(ee,oe),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="CoverMarker",ee.title="Cover marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ee}(nt),Qe=function(oe){function ee(z,re,ue,ne){var ge=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 ge.opacities=[],ge.opacityBoxes=[],ge.opacities=re,ge.currentOpacity=ue,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return $e(ee,oe),ee.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(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ue===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(ue,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.innerText=100*ue+"%",ne.appendChild(ge),z.opacityBoxes.push(ne)}),re},ee.prototype.setCurrentOpacity=function(z,re){var ue=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ee}(Le),ut=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ue.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ue.defaultHighlightOpacity,ne.fillPanel=new Me("Color",ue.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Qe("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return $e(ee,oe),ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="HighlightMarker",ee.title="Highlight marker",ee.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>',ee}(Ye),pe='<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>',le='<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>',xe=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=ue.defaultStrokeColor,ne.bgColor=ue.defaultFillColor,ne.fontFamily=ue.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new Me("Text color",ue.defaultColorSet,ne.color,pe),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Me("Fill color",ue.defaultColorSet,ne.bgColor,le),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Ae("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new ct,ne.tipGrip.visual.transform.baseVal.appendItem(ye.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return oe.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},ee.prototype.createTip=function(){ye.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ye.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ee.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)},ee.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()}},ee.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)},ee.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ye.setAttributes(this.bgRectangle,[["fill",z]]),ye.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},ee.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},ee.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var re=Math.min(this.height/2,15),ue=this.height/5;z&&(this.tipPosition={x:re+ue/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+ue,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-ue,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-ue,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-ue},this.tipBase2Position={x:this.width,y:this.height-re}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-ue})},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.positionTip()},ee.prototype.positionTip=function(){ye.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(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.positionTip(),oe.prototype.select.call(this)},ee.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.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()},ee.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()},ee.typeName="CalloutMarker",ee.title="Callout marker",ee.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>',ee}(Ge),Ne=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.fillColor=ue.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new Me("Line color",me(ue.defaultColorSet,["transparent"]),ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Me("Fill color",me(ue.defaultColorSet,["transparent"]),ne.fillColor,le),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new at("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ot("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Qe("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=ye.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)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),ye.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ee.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.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=ee.typeName,z},ee.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()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},ee.typeName="EllipseMarker",ee.title="Ellipse marker",ee.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>',ee}(lt),Xe=function(oe){function ee(z,re,ue){return oe.call(this,z,re,ue)||this}return $e(ee,oe),Object.defineProperty(ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},ee.prototype.createTips=function(){this.tip1=ye.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(ye.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ye.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(ye.createTransform()),this.visual.appendChild(this.tip2)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ye.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()]]),ye.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 ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,0)}},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},ee.typeName="MeasurementMarker",ee.title="Measurement marker",ee.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>',ee}(vt),be=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.strokePanel.colors=ue.defaultColorSet,ne.fillColor="transparent",ne}return $e(ee,oe),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="EllipseFrameMarker",ee.title="Ellipse frame marker",ee.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>',ee}(Ne),ze=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(ee){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ee)||(this.undoStack.push(ee),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ee)&&this.redoStack.splice(0,this.redoStack.length))},oe.prototype.replaceLastUndoStep=function(ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ee)},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 ee=this.undoStack.pop();return ee!==void 0&&this.redoStack.push(ee),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}(),Ie=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Me("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new at("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ot("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},ee.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorCurve=ye.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ye.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)},ee.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")},ee.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ye.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=ye.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ye.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)},ee.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,oe.prototype.addControlGrips.call(this)},ee.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()))},ee.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)},ee.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)},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},ee.prototype.scale=function(z,re){this.curveX=this.curveX*z,this.curveY=this.curveY*re,oe.prototype.scale.call(this,z,re)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.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=ee.typeName,z},ee.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()},ee.typeName="CurveMarker",ee.title="Curve marker",ee.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>',ee}(We),dt=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,re,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.textColor="transparent",ne.fontSize="1rem",ne.isMoved=!1,ne.captionText="Caption",ne.PADDING=5,ne.captionBoxWidth=0,ne.captionBoxHeight=0,ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.fillColor=ue.defaultFillColor,ne.textColor=ue.defaultStrokeColor,ne.fontFamily=ue.defaultFontFamily,ne.fontSize=ue.defaultCaptionFontSize,ne.captionText=ue.defaultCaptionText,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.sizeCaption=ne.sizeCaption.bind(ne),ne.setCaptionText=ne.setCaptionText.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.finishTextEditing=ne.finishTextEditing.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.setTextColor=ne.setTextColor.bind(ne),ne.strokePanel=new Me("Line color",me(ue.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Me("Fill color",me(ue.defaultColorSet,["transparent"]),ne.fillColor,le),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new at("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ot("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Ae("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Me("Text color",ue.defaultColorSet,ne.textColor,pe),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return $e(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ye.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ye.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=ye.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()},ee.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},ee.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")},ee.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)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},ee.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),ye.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')"]]),ye.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')"]])},ee.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()},ee.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"))},ee.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ee.prototype.setFont=function(z){this.captionElement&&ye.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ee.prototype.setTextColor=function(z){this.captionElement&&ye.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),ye.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ee.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},ee.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ye.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ye.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ye.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ye.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ee.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},ee.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()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},ee.typeName="CaptionFrameMarker",ee.title="Caption frame marker",ee.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>',ee}(lt),Ue=function(){function oe(ee,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ee,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}(),qe=function(oe){function ee(z,re,ue){var ne=oe.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=ue,ne}return $e(ee,oe),ee}(Ue),ke=function(oe){function ee(z,re,ue){ue===void 0&&(ue=!1);var ne=oe.call(this,z,ue)||this;return ne.marker=re,ne}return $e(ee,oe),ee}(Ue),et=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(ee,z){this[ee].push(z)},oe.prototype.removeEventListener=function(ee,z){var re=this[ee].indexOf(z);re>-1&&this[ee].splice(re,1)},oe}(),it=function(){function oe(ee){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ke,this._isOpen=!1,this.undoRedoManager=new ze,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=oe.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ee,this.targetRoot=document.body,this.width=ee.clientWidth,this.height=ee.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[Wt,Ee,mt,Ge,be,Ne,ut,xe,Xe,Ye,vt,Ie,dt]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Wt,Ee,mt,Ge,Ne,ut,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Wt,Ee,mt,Ge,ut]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ee){var z=this;this._availableMarkerTypes.splice(0),ee.forEach(function(re){if(typeof re=="string"){var ue=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});ue!==void 0&&z._availableMarkerTypes.push(ue)}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(ee){this._zoomLevel=ee,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 ee=this;this.styles.styleSheetRoot===void 0&&Ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Ue(ee))})},oe.prototype.render=function(){return Te(this,void 0,void 0,function(){var ee;return Re(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new Ze).naturalSize=this.renderAtNaturalSize,ee.imageType=this.renderImageType,ee.imageQuality=this.renderImageQuality,ee.markersOnly=this.renderMarkersOnly,ee.width=this.renderWidth,ee.height=this.renderHeight,[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},oe.prototype.close=function(ee){var z=this;if(ee===void 0&&(ee=!1),this.isOpen){var re=!1;ee||this.eventListeners.beforeclose.forEach(function(ue){var ne=new Ue(z,!0);ue(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(ue){return ue(new Ue(z))}),this.detachEvents(),this._isOpen=!1)}},oe.prototype.addMarkersToToolbar=function(){for(var ee,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];(ee=this._availableMarkerTypes).push.apply(ee,z)},oe.prototype.addRenderEventListener=function(ee){this.addEventListener("render",function(z){ee(z.dataUrl,z.state)})},oe.prototype.removeRenderEventListener=function(ee){},oe.prototype.addCloseEventListener=function(ee){this.addEventListener("close",function(){ee()})},oe.prototype.removeCloseEventListener=function(ee){},oe.prototype.setupResizeObserver=function(){var ee=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ee.resize(ee.target.clientWidth,ee.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ee.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupTargetResize=function(){var ee=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/ee>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ee:this.editorCanvas.clientWidth,re=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ee;this.resize(z,re)},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.resize=function(ee,z){this._isResizing=!0;var re=ee/this.imageWidth,ue=z/this.imageHeight;this.imageWidth=Math.round(ee),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,ue),this._isResizing=!1},oe.prototype.scaleMarkers=function(ee,z){var re,ue=this;this._currentMarker&&this._currentMarker instanceof Ge?this._currentMarker.scale(ee,z):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ue._currentMarker&&ne.scale(ee,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 ee=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=ee.left-z.left,this.top=ee.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 ee,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];this.defs=ye.createDefs(),this.addDefsToImage(),(ee=this.defs).append.apply(ee,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 ee=document.createElement("a");ee.href="https://markerjs.com/",ee.target="_blank",ee.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>',ee.title="Powered by marker.js",ee.style.display="grid",ee.style.alignItems="center",ee.style.justifyItems="center",ee.style.padding="3px",ee.style.width="20px",ee.style.height="20px",this.logoUI.appendChild(ee),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 ee=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=ee+"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 st(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 _e(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(ee){this.markerImage.removeChild(ee.container),this.markers.indexOf(ee)>-1&&this.markers.splice(this.markers.indexOf(ee),1),ee.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(ee,z){if(ee==="marker"&&z!==void 0)this.createNewMarker(z);else if(ee==="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 ee=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var ne=new ke(ee,ee._currentMarker,!0);ue(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(ue){return ue(new ke(ee,re))})}}},oe.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var je=new ke(ee,void 0,!0);ge(je),je.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(ge){var je=ue.markers[ge];ue.setCurrentMarker(ue.markers[ge]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(Dt){return Dt(new ke(ee,je))})},ue=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 ee;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=(ee=this._currentMarker.notes)!==null&&ee!==void 0?ee:"",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 ee=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 ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new Ue(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new Ue(ee))})}},oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},oe.prototype.undoStep=function(){var ee=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new Ue(ee))}))},oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},oe.prototype.redoStep=function(){var ee=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new Ue(ee))}))},oe.prototype.stepZoom=function(){var ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ee<this.zoomSteps.length-1?this.zoomSteps[ee+1]:this.zoomSteps[0]},oe.prototype.panTo=function(ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ee.x,top:this.prevPanPoint.y-ee.y}),this.prevPanPoint=ee},oe.prototype.startRenderAndClose=function(){return Te(this,void 0,void 0,function(){var ee,z,re=this;return Re(this,function(ue){switch(ue.label){case 0:return[4,this.render()];case 1:return ee=ue.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new qe(re,ee,z))}),this.close(!0),[2]}})})},oe.prototype.getState=function(ee){ee===!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(ee){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ee.markers.forEach(function(re){var ue=z._availableMarkerTypes.find(function(ge){return ge.typeName===re.typeName});if(ue!==void 0){var ne=z.addNewMarker(ue);ne.restoreState(re),z.markers.push(ne)}}),ee.width&&ee.height&&(ee.width!==this.imageWidth||ee.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ee.width,this.imageHeight/ee.height),this.eventListeners.restorestate.forEach(function(re){return re(new Ue(z))})},oe.prototype.addNewMarker=function(ee){var z=ye.createGroup();return this.markerImage.appendChild(z),new ee(z,this.overlayContainer,this.settings)},oe.prototype.createNewMarker=function(ee){var z,re=this;(z=typeof ee=="string"?this._availableMarkerTypes.find(function(ue){return ue.typeName===ee}):ee)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ue){return ue(new ke(re,re._currentMarker))}))},oe.prototype.markerCreated=function(ee){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ee),this.setCurrentMarker(ee),ee instanceof Ee&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ee):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new ke(z,z._currentMarker))})},oe.prototype.colorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ee,this.settings.defaultStrokeColor=ee)},oe.prototype.fillColorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ee)},oe.prototype.markerStateChanged=function(ee){var z=this;this.eventListeners.markerchange.forEach(function(re){return re(new ke(z,ee))})},oe.prototype.setCurrentMarker=function(ee){var z=this;this._currentMarker!==ee&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(re){return re(new ke(z,z._currentMarker))})),this._currentMarker=ee,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 ke(z,z._currentMarker))}))},oe.prototype.onPointerDown=function(ee){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ee.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(ee.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ee.clientX,y:ee.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY))},oe.prototype.onDblClick=function(ee){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(ee.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target):this.setCurrentMarker()}},oe.prototype.onPointerMove=function(ee){this.touchPoints!==1&&ee.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ee.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ee.clientX,ee.clientY)):this.zoomLevel>1&&this.panTo({x:ee.clientX,y:ee.clientY}))},oe.prototype.onPointerUp=function(ee){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ee.clientX,ee.clientY)),this.isDragging=!1,this.addUndoStep()},oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},oe.prototype.onKeyUp=function(ee){this._currentMarker===void 0||this.notesArea!==void 0||ee.key!=="Delete"&&ee.key!=="Backspace"||this.deleteSelectedMarker()},oe.prototype.clientToLocalCoordinates=function(ee,z){var re=this.markerImage.getBoundingClientRect();return{x:(ee-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 ee=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ee+"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(ee){Fe.addKey(ee)},oe.prototype.addEventListener=function(ee,z){this.eventListeners.addEventListener(ee,z)},oe.prototype.removeEventListener=function(ee,z){this.eventListeners.removeEventListener(ee,z)},oe.prototype.renderState=function(ee){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ee),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),oe.prototype.focus=function(){var ee=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 Ue(ee))}))},oe.prototype.blur=function(){var ee=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new Ue(ee))}))},oe.instanceCounter=0,oe}()},66042:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return Ge}});var ae=he(33885),$e=he(42978),Te=he(43403),Re=he(34280),me=he(59301),ye=me.createContext(null),Fe=me.createContext({}),Ze=ye,Ce=he(20068),fe=he(54476),tt=he(92310),ve=he.n(tt),st=he(77900),_e=he(10228),Le=he(26112),Me=he(75931),De=he(8654),rt=["prefixCls","className","containerRef"],ct=function(Oe){var mt=Oe.prefixCls,Ye=Oe.className,Qe=Oe.containerRef,ut=(0,Me.Z)(Oe,rt),pe=me.useContext(Fe),le=pe.panel,xe=(0,De.x1)(le,Qe);return me.createElement("div",(0,fe.Z)({className:ve()("".concat(mt,"-content"),Ye),role:"dialog",ref:xe},(0,Le.Z)(Oe,{aria:!0}),{"aria-modal":"true"},ut))},ft=ct,lt=he(48736);function nt(Ee){return typeof Ee=="string"&&String(Number(Ee))===Ee?((0,lt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ee)):Ee}function at(Ee){warning(!("wrapperClassName"in Ee),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ee.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ot={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Wt(Ee,Oe){var mt,Ye,Qe,ut=Ee.prefixCls,pe=Ee.open,le=Ee.placement,xe=Ee.inline,Ne=Ee.push,Xe=Ee.forceRender,be=Ee.autoFocus,ze=Ee.keyboard,Ie=Ee.classNames,dt=Ee.rootClassName,Ue=Ee.rootStyle,qe=Ee.zIndex,ke=Ee.className,et=Ee.id,it=Ee.style,oe=Ee.motion,ee=Ee.width,z=Ee.height,re=Ee.children,ue=Ee.mask,ne=Ee.maskClosable,ge=Ee.maskMotion,je=Ee.maskClassName,Dt=Ee.maskStyle,St=Ee.afterOpenChange,yt=Ee.onClose,xt=Ee.onMouseEnter,Nt=Ee.onMouseOver,Lt=Ee.onMouseLeave,kt=Ee.onClick,Rt=Ee.onKeyDown,Mt=Ee.onKeyUp,rn=Ee.styles,Ot=Ee.drawerRender,Jt=me.useRef(),ht=me.useRef(),cn=me.useRef();me.useImperativeHandle(Oe,function(){return Jt.current});var Ht=function(nr){var Vn=nr.keyCode,Lr=nr.shiftKey;switch(Vn){case _e.Z.TAB:{if(Vn===_e.Z.TAB){if(!Lr&&document.activeElement===cn.current){var an;(an=ht.current)===null||an===void 0||an.focus({preventScroll:!0})}else if(Lr&&document.activeElement===ht.current){var fn;(fn=cn.current)===null||fn===void 0||fn.focus({preventScroll:!0})}}break}case _e.Z.ESC:{yt&&ze&&(nr.stopPropagation(),yt(nr));break}}};me.useEffect(function(){if(pe&&be){var Fn;(Fn=Jt.current)===null||Fn===void 0||Fn.focus({preventScroll:!0})}},[pe]);var Ut=me.useState(!1),sn=(0,$e.Z)(Ut,2),Pn=sn[0],un=sn[1],yn=me.useContext(Ze),tr;typeof Ne=="boolean"?tr=Ne?{}:{distance:0}:tr=Ne||{};var Gn=(mt=(Ye=(Qe=tr)===null||Qe===void 0?void 0:Qe.distance)!==null&&Ye!==void 0?Ye:yn==null?void 0:yn.pushDistance)!==null&&mt!==void 0?mt:180,Xr=me.useMemo(function(){return{pushDistance:Gn,push:function(){un(!0)},pull:function(){un(!1)}}},[Gn]);me.useEffect(function(){if(pe){var Fn;yn==null||(Fn=yn.push)===null||Fn===void 0||Fn.call(yn)}else{var nr;yn==null||(nr=yn.pull)===null||nr===void 0||nr.call(yn)}},[pe]),me.useEffect(function(){return function(){var Fn;yn==null||(Fn=yn.pull)===null||Fn===void 0||Fn.call(yn)}},[]);var jr=ue&&me.createElement(st.default,(0,fe.Z)({key:"mask"},ge,{visible:pe}),function(Fn,nr){var Vn=Fn.className,Lr=Fn.style;return me.createElement("div",{className:ve()("".concat(ut,"-mask"),Vn,Ie==null?void 0:Ie.mask,je),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Lr),Dt),rn==null?void 0:rn.mask),onClick:ne&&pe?yt:void 0,ref:nr})}),xr=typeof oe=="function"?oe(le):oe,mr={};if(Pn&&Gn)switch(le){case"top":mr.transform="translateY(".concat(Gn,"px)");break;case"bottom":mr.transform="translateY(".concat(-Gn,"px)");break;case"left":mr.transform="translateX(".concat(Gn,"px)");break;default:mr.transform="translateX(".concat(-Gn,"px)");break}le==="left"||le==="right"?mr.width=nt(ee):mr.height=nt(z);var On={onMouseEnter:xt,onMouseOver:Nt,onMouseLeave:Lt,onClick:kt,onKeyDown:Rt,onKeyUp:Mt},ir=me.createElement(st.default,(0,fe.Z)({key:"panel"},xr,{visible:pe,forceRender:Xe,onVisibleChanged:function(nr){St==null||St(nr)},removeOnLeave:!1,leavedClassName:"".concat(ut,"-content-wrapper-hidden")}),function(Fn,nr){var Vn=Fn.className,Lr=Fn.style,an=me.createElement(ft,(0,fe.Z)({id:et,containerRef:nr,prefixCls:ut,className:ve()(ke,Ie==null?void 0:Ie.content),style:(0,ae.Z)((0,ae.Z)({},it),rn==null?void 0:rn.content)},(0,Le.Z)(Ee,{aria:!0}),On),re);return me.createElement("div",(0,fe.Z)({className:ve()("".concat(ut,"-content-wrapper"),Ie==null?void 0:Ie.wrapper,Vn),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},mr),Lr),rn==null?void 0:rn.wrapper)},(0,Le.Z)(Ee,{data:!0})),Ot?Ot(an):an)}),Fr=(0,ae.Z)({},Ue);return qe&&(Fr.zIndex=qe),me.createElement(Ze.Provider,{value:Xr},me.createElement("div",{className:ve()(ut,"".concat(ut,"-").concat(le),dt,(0,Ce.Z)((0,Ce.Z)({},"".concat(ut,"-open"),pe),"".concat(ut,"-inline"),xe)),style:Fr,tabIndex:-1,ref:Jt,onKeyDown:Ht},jr,me.createElement("div",{tabIndex:0,ref:ht,style:ot,"aria-hidden":"true","data-sentinel":"start"}),ir,me.createElement("div",{tabIndex:0,ref:cn,style:ot,"aria-hidden":"true","data-sentinel":"end"})))}var Ke=me.forwardRef(Wt),We=Ke,vt=function(Oe){var mt=Oe.open,Ye=mt===void 0?!1:mt,Qe=Oe.prefixCls,ut=Qe===void 0?"rc-drawer":Qe,pe=Oe.placement,le=pe===void 0?"right":pe,xe=Oe.autoFocus,Ne=xe===void 0?!0:xe,Xe=Oe.keyboard,be=Xe===void 0?!0:Xe,ze=Oe.width,Ie=ze===void 0?378:ze,dt=Oe.mask,Ue=dt===void 0?!0:dt,qe=Oe.maskClosable,ke=qe===void 0?!0:qe,et=Oe.getContainer,it=Oe.forceRender,oe=Oe.afterOpenChange,ee=Oe.destroyOnClose,z=Oe.onMouseEnter,re=Oe.onMouseOver,ue=Oe.onMouseLeave,ne=Oe.onClick,ge=Oe.onKeyDown,je=Oe.onKeyUp,Dt=Oe.panelRef,St=me.useState(!1),yt=(0,$e.Z)(St,2),xt=yt[0],Nt=yt[1],Lt=me.useState(!1),kt=(0,$e.Z)(Lt,2),Rt=kt[0],Mt=kt[1];(0,Re.Z)(function(){Mt(!0)},[]);var rn=Rt?Ye:!1,Ot=me.useRef(),Jt=me.useRef();(0,Re.Z)(function(){rn&&(Jt.current=document.activeElement)},[rn]);var ht=function(Pn){var un;if(Nt(Pn),oe==null||oe(Pn),!Pn&&Jt.current&&!((un=Ot.current)!==null&&un!==void 0&&un.contains(Jt.current))){var yn;(yn=Jt.current)===null||yn===void 0||yn.focus({preventScroll:!0})}},cn=me.useMemo(function(){return{panel:Dt}},[Dt]);if(!it&&!xt&&!rn&&ee)return null;var Ht={onMouseEnter:z,onMouseOver:re,onMouseLeave:ue,onClick:ne,onKeyDown:ge,onKeyUp:je},Ut=(0,ae.Z)((0,ae.Z)({},Oe),{},{open:rn,prefixCls:ut,placement:le,autoFocus:Ne,keyboard:be,width:Ie,mask:Ue,maskClosable:ke,inline:et===!1,afterOpenChange:ht,ref:Ot},Ht);return me.createElement(Fe.Provider,{value:cn},me.createElement(Te.Z,{open:rn||it||xt,autoDestroy:!1,getContainer:et,autoLock:Ue&&(rn||xt)},me.createElement(We,Ut)))},Ae=vt,Ge=Ae},25930:function(At,Ft,he){"use strict";he.d(Ft,{Cd:function(){return vt}});var ae=he(54476),$e=he(33885),Te=he(75931),Re=he(59301),me=he(92310),ye=he.n(me),Fe={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ze=function(){var Ee=(0,Re.useRef)([]),Oe=(0,Re.useRef)(null);return(0,Re.useEffect)(function(){var mt=Date.now(),Ye=!1;Ee.current.forEach(function(Qe){if(Qe){Ye=!0;var ut=Qe.style;ut.transitionDuration=".3s, .3s, .3s, .06s",Oe.current&&mt-Oe.current<100&&(ut.transitionDuration="0s, 0s")}}),Ye&&(Oe.current=Date.now())}),Ee.current},Ce=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],fe=function(Ee){var Oe=(0,$e.Z)((0,$e.Z)({},Fe),Ee),mt=Oe.className,Ye=Oe.percent,Qe=Oe.prefixCls,ut=Oe.strokeColor,pe=Oe.strokeLinecap,le=Oe.strokeWidth,xe=Oe.style,Ne=Oe.trailColor,Xe=Oe.trailWidth,be=Oe.transition,ze=(0,Te.Z)(Oe,Ce);delete ze.gapPosition;var Ie=Array.isArray(Ye)?Ye:[Ye],dt=Array.isArray(ut)?ut:[ut],Ue=Ze(),qe=le/2,ke=100-le/2,et="M ".concat(pe==="round"?qe:0,",").concat(qe,`
|
|
L `).concat(pe==="round"?ke:100,",").concat(qe),it="0 0 100 ".concat(le),oe=0;return Re.createElement("svg",(0,ae.Z)({className:ye()("".concat(Qe,"-line"),mt),viewBox:it,preserveAspectRatio:"none",style:xe},ze),Re.createElement("path",{className:"".concat(Qe,"-line-trail"),d:et,strokeLinecap:pe,stroke:Ne,strokeWidth:Xe||le,fillOpacity:"0"}),Ie.map(function(ee,z){var re=1;switch(pe){case"round":re=1-le/100;break;case"square":re=1-le/2/100;break;default:re=1;break}var ue={strokeDasharray:"".concat(ee*re,"px, 100px"),strokeDashoffset:"-".concat(oe,"px"),transition:be||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ne=dt[z]||dt[dt.length-1];return oe+=ee,Re.createElement("path",{key:z,className:"".concat(Qe,"-line-path"),d:et,strokeLinecap:pe,stroke:ne,strokeWidth:le,fillOpacity:"0",ref:function(je){Ue[z]=je},style:ue})}))},tt=fe,ve=he(76190),st=he(42978),_e=he(47273),Le=0,Me=(0,_e.Z)();function De(){var Ge;return Me?(Ge=Le,Le+=1):Ge="TEST_OR_SSR",Ge}var rt=function(Ge){var Ee=Re.useState(),Oe=(0,st.Z)(Ee,2),mt=Oe[0],Ye=Oe[1];return Re.useEffect(function(){Ye("rc_progress_".concat(De()))},[]),Ge||mt},ct=function(Ee){var Oe=Ee.bg,mt=Ee.children;return Re.createElement("div",{style:{width:"100%",height:"100%",background:Oe}},mt)};function ft(Ge,Ee){return Object.keys(Ge).map(function(Oe){var mt=parseFloat(Oe),Ye="".concat(Math.floor(mt*Ee),"%");return"".concat(Ge[Oe]," ").concat(Ye)})}var lt=Re.forwardRef(function(Ge,Ee){var Oe=Ge.prefixCls,mt=Ge.color,Ye=Ge.gradientId,Qe=Ge.radius,ut=Ge.style,pe=Ge.ptg,le=Ge.strokeLinecap,xe=Ge.strokeWidth,Ne=Ge.size,Xe=Ge.gapDegree,be=mt&&(0,ve.Z)(mt)==="object",ze=be?"#FFF":void 0,Ie=Ne/2,dt=Re.createElement("circle",{className:"".concat(Oe,"-circle-path"),r:Qe,cx:Ie,cy:Ie,stroke:ze,strokeLinecap:le,strokeWidth:xe,opacity:pe===0?0:1,style:ut,ref:Ee});if(!be)return dt;var Ue="".concat(Ye,"-conic"),qe=Xe?"".concat(180+Xe/2,"deg"):"0deg",ke=ft(mt,(360-Xe)/360),et=ft(mt,1),it="conic-gradient(from ".concat(qe,", ").concat(ke.join(", "),")"),oe="linear-gradient(to ".concat(Xe?"bottom":"top",", ").concat(et.join(", "),")");return Re.createElement(Re.Fragment,null,Re.createElement("mask",{id:Ue},dt),Re.createElement("foreignObject",{x:0,y:0,width:Ne,height:Ne,mask:"url(#".concat(Ue,")")},Re.createElement(ct,{bg:oe},Re.createElement(ct,{bg:it}))))}),nt=lt,at=100,ot=function(Ee,Oe,mt,Ye,Qe,ut,pe,le,xe,Ne){var Xe=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,be=mt/100*360*((360-ut)/360),ze=ut===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Ie=(100-Ye)/100*Oe;xe==="round"&&Ye!==100&&(Ie+=Ne/2,Ie>=Oe&&(Ie=Oe-.01));var dt=at/2;return{stroke:typeof le=="string"?le:void 0,strokeDasharray:"".concat(Oe,"px ").concat(Ee),strokeDashoffset:Ie+Xe,transform:"rotate(".concat(Qe+be+ze,"deg)"),transformOrigin:"".concat(dt,"px ").concat(dt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Wt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ke(Ge){var Ee=Ge!=null?Ge:[];return Array.isArray(Ee)?Ee:[Ee]}var We=function(Ee){var Oe=(0,$e.Z)((0,$e.Z)({},Fe),Ee),mt=Oe.id,Ye=Oe.prefixCls,Qe=Oe.steps,ut=Oe.strokeWidth,pe=Oe.trailWidth,le=Oe.gapDegree,xe=le===void 0?0:le,Ne=Oe.gapPosition,Xe=Oe.trailColor,be=Oe.strokeLinecap,ze=Oe.style,Ie=Oe.className,dt=Oe.strokeColor,Ue=Oe.percent,qe=(0,Te.Z)(Oe,Wt),ke=at/2,et=rt(mt),it="".concat(et,"-gradient"),oe=ke-ut/2,ee=Math.PI*2*oe,z=xe>0?90+xe/2:-90,re=ee*((360-xe)/360),ue=(0,ve.Z)(Qe)==="object"?Qe:{count:Qe,gap:2},ne=ue.count,ge=ue.gap,je=Ke(Ue),Dt=Ke(dt),St=Dt.find(function(Mt){return Mt&&(0,ve.Z)(Mt)==="object"}),yt=St&&(0,ve.Z)(St)==="object",xt=yt?"butt":be,Nt=ot(ee,re,0,100,z,xe,Ne,Xe,xt,ut),Lt=Ze(),kt=function(){var rn=0;return je.map(function(Ot,Jt){var ht=Dt[Jt]||Dt[Dt.length-1],cn=ot(ee,re,rn,Ot,z,xe,Ne,ht,xt,ut);return rn+=Ot,Re.createElement(nt,{key:Jt,color:ht,ptg:Ot,radius:oe,prefixCls:Ye,gradientId:it,style:cn,strokeLinecap:xt,strokeWidth:ut,gapDegree:xe,ref:function(Ut){Lt[Jt]=Ut},size:at})}).reverse()},Rt=function(){var rn=Math.round(ne*(je[0]/100)),Ot=100/ne,Jt=0;return new Array(ne).fill(null).map(function(ht,cn){var Ht=cn<=rn-1?Dt[0]:Xe,Ut=Ht&&(0,ve.Z)(Ht)==="object"?"url(#".concat(it,")"):void 0,sn=ot(ee,re,Jt,Ot,z,xe,Ne,Ht,"butt",ut,ge);return Jt+=(re-sn.strokeDashoffset+ge)*100/re,Re.createElement("circle",{key:cn,className:"".concat(Ye,"-circle-path"),r:oe,cx:ke,cy:ke,stroke:Ut,strokeWidth:ut,opacity:1,style:sn,ref:function(un){Lt[cn]=un}})})};return Re.createElement("svg",(0,ae.Z)({className:ye()("".concat(Ye,"-circle"),Ie),viewBox:"0 0 ".concat(at," ").concat(at),style:ze,id:mt,role:"presentation"},qe),!ne&&Re.createElement("circle",{className:"".concat(Ye,"-circle-trail"),r:oe,cx:ke,cy:ke,stroke:Xe,strokeLinecap:xt,strokeWidth:pe||ut,style:Nt}),ne?Rt():kt())},vt=We,Ae={Line:tt,Circle:vt}},6551:function(At,Ft,he){"use strict";he.d(Ft,{ZP:function(){return Fe}});var ae=he(42978),$e=he(59301),Te=he(47273),Re=0,me=(0,Te.Z)();function ye(){var Ze;return me?(Ze=Re,Re+=1):Ze="TEST_OR_SSR",Ze}function Fe(Ze){var Ce=$e.useState(),fe=(0,ae.Z)(Ce,2),tt=fe[0],ve=fe[1];return $e.useEffect(function(){ve("rc_select_".concat(ye()))},[]),Ze||tt}},37463:function(At,Ft,he){"use strict";he.d(Ft,{Ac:function(){return ht},Xo:function(){return Ht},Wx:function(){return sn},ZP:function(){return jn},lk:function(){return ft}});var ae=he(54476),$e=he(94480),Te=he(20068),Re=he(33885),me=he(42978),ye=he(75931),Fe=he(76190),Ze=he(18929),Ce=he(48736),fe=he(59301),tt=he(92310),ve=he.n(tt),st=he(34280),_e=he(49658),Le=he(8654),Me=function(Be){var Tt=Be.className,bt=Be.customizeIcon,He=Be.customizeIconProps,wt=Be.children,Vt=Be.onMouseDown,tn=Be.onClick,on=typeof bt=="function"?bt(He):bt;return fe.createElement("span",{className:Tt,onMouseDown:function(Kt){Kt.preventDefault(),Vt==null||Vt(Kt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:tn,"aria-hidden":!0},on!==void 0?on:fe.createElement("span",{className:ve()(Tt.split(/\s+/).map(function(_t){return"".concat(_t,"-icon")}))},wt))},De=Me,rt=function(Be,Tt,bt,He,wt){var Vt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,tn=arguments.length>6?arguments[6]:void 0,on=arguments.length>7?arguments[7]:void 0,_t=fe.useMemo(function(){if((0,Fe.Z)(He)==="object")return He.clearIcon;if(wt)return wt},[He,wt]),Kt=fe.useMemo(function(){return!!(!Vt&&He&&(bt.length||tn)&&!(on==="combobox"&&tn===""))},[He,Vt,bt.length,tn,on]);return{allowClear:Kt,clearIcon:fe.createElement(De,{className:"".concat(Be,"-clear"),onMouseDown:Tt,customizeIcon:_t},"\xD7")}},ct=fe.createContext(null);function ft(){return fe.useContext(ct)}function lt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Be=fe.useState(!1),Tt=(0,me.Z)(Be,2),bt=Tt[0],He=Tt[1],wt=fe.useRef(null),Vt=function(){window.clearTimeout(wt.current)};fe.useEffect(function(){return Vt},[]);var tn=function(_t,Kt){Vt(),wt.current=window.setTimeout(function(){He(_t),Kt&&Kt()},Pe)};return[bt,tn,Vt]}function nt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Be=fe.useRef(null),Tt=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(Tt.current)}},[]);function bt(He){(He||Be.current===null)&&(Be.current=He),window.clearTimeout(Tt.current),Tt.current=window.setTimeout(function(){Be.current=null},Pe)}return[function(){return Be.current},bt]}function at(Pe,Be,Tt,bt){var He=fe.useRef(null);He.current={open:Be,triggerOpen:Tt,customizedTrigger:bt},fe.useEffect(function(){function wt(Vt){var tn;if(!((tn=He.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var on=Vt.target;on.shadowRoot&&Vt.composed&&(on=Vt.composedPath()[0]||on),He.current.open&&Pe().filter(function(_t){return _t}).every(function(_t){return!_t.contains(on)&&_t!==on})&&He.current.triggerOpen(!1)}}return window.addEventListener("mousedown",wt),function(){return window.removeEventListener("mousedown",wt)}},[])}var ot=he(10228);function Wt(Pe){return Pe&&![ot.Z.ESC,ot.Z.SHIFT,ot.Z.BACKSPACE,ot.Z.TAB,ot.Z.WIN_KEY,ot.Z.ALT,ot.Z.META,ot.Z.WIN_KEY_RIGHT,ot.Z.CTRL,ot.Z.SEMICOLON,ot.Z.EQUALS,ot.Z.CAPS_LOCK,ot.Z.CONTEXT_MENU,ot.Z.F1,ot.Z.F2,ot.Z.F3,ot.Z.F4,ot.Z.F5,ot.Z.F6,ot.Z.F7,ot.Z.F8,ot.Z.F9,ot.Z.F10,ot.Z.F11,ot.Z.F12].includes(Pe)}var Ke=he(26112),We=he(11780);function vt(Pe,Be,Tt){var bt=(0,Re.Z)((0,Re.Z)({},Pe),Tt?Be:{});return Object.keys(Be).forEach(function(He){var wt=Be[He];typeof wt=="function"&&(bt[He]=function(){for(var Vt,tn=arguments.length,on=new Array(tn),_t=0;_t<tn;_t++)on[_t]=arguments[_t];return wt.apply(void 0,on),(Vt=Pe[He])===null||Vt===void 0?void 0:Vt.call.apply(Vt,[Pe].concat(on))})}),bt}var Ae=vt,Ge=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ee=function(Be,Tt){var bt=Be.prefixCls,He=Be.id,wt=Be.inputElement,Vt=Be.autoFocus,tn=Be.autoComplete,on=Be.editable,_t=Be.activeDescendantId,Kt=Be.value,Et=Be.open,gt=Be.attrs,Xt=(0,ye.Z)(Be,Ge),pn=wt||fe.createElement("input",null),vn=pn,mn=vn.ref,Nn=vn.props;return(0,Ce.Kp)(!("maxLength"in pn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),pn=fe.cloneElement(pn,(0,Re.Z)((0,Re.Z)((0,Re.Z)({type:"search"},Ae(Xt,Nn,!0)),{},{id:He,ref:(0,Le.sQ)(Tt,mn),autoComplete:tn||"off",autoFocus:Vt,className:ve()("".concat(bt,"-selection-search-input"),Nn==null?void 0:Nn.className),role:"combobox","aria-expanded":Et||!1,"aria-haspopup":"listbox","aria-owns":"".concat(He,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(He,"_list"),"aria-activedescendant":Et?_t:void 0},gt),{},{value:on?Kt:"",readOnly:!on,unselectable:on?null:"on",style:(0,Re.Z)((0,Re.Z)({},Nn.style),{},{opacity:on?null:0})})),pn},Oe=fe.forwardRef(Ee),mt=Oe;function Ye(Pe){return Array.isArray(Pe)?Pe:Pe!==void 0?[Pe]:[]}var Qe=typeof window!="undefined"&&window.document&&window.document.documentElement,ut=Qe;function pe(Pe){return Pe!=null}function le(Pe){return!Pe&&Pe!==0}function xe(Pe){return["string","number"].includes((0,Fe.Z)(Pe))}function Ne(Pe){var Be=void 0;return Pe&&(xe(Pe.title)?Be=Pe.title.toString():xe(Pe.label)&&(Be=Pe.label.toString())),Be}function Xe(Pe,Be){ut?fe.useLayoutEffect(Pe,Be):fe.useEffect(Pe,Be)}function be(Pe){var Be;return(Be=Pe.key)!==null&&Be!==void 0?Be:Pe.value}var ze=function(Be){Be.preventDefault(),Be.stopPropagation()},Ie=function(Be){var Tt=Be.id,bt=Be.prefixCls,He=Be.values,wt=Be.open,Vt=Be.searchValue,tn=Be.autoClearSearchValue,on=Be.inputRef,_t=Be.placeholder,Kt=Be.disabled,Et=Be.mode,gt=Be.showSearch,Xt=Be.autoFocus,pn=Be.autoComplete,vn=Be.activeDescendantId,mn=Be.tabIndex,Nn=Be.removeIcon,Kn=Be.maxTagCount,ar=Be.maxTagTextLength,Cn=Be.maxTagPlaceholder,Wn=Cn===void 0?function(dn){return"+ ".concat(dn.length," ...")}:Cn,Ln=Be.tagRender,sr=Be.onToggleOpen,Or=Be.onRemove,er=Be.onInputChange,wr=Be.onInputPaste,Cr=Be.onInputKeyDown,fr=Be.onInputMouseDown,Yn=Be.onInputCompositionStart,Ar=Be.onInputCompositionEnd,cr=Be.onInputBlur,Xn=fe.useRef(null),yr=(0,fe.useState)(0),Sr=(0,me.Z)(yr,2),lr=Sr[0],Un=Sr[1],zn=(0,fe.useState)(!1),Mr=(0,me.Z)(zn,2),Gr=Mr[0],Jr=Mr[1],br="".concat(bt,"-selection"),Nr=wt||Et==="multiple"&&tn===!1||Et==="tags"?Vt:"",Pr=Et==="tags"||Et==="multiple"&&tn===!1||gt&&(wt||Gr);Xe(function(){Un(Xn.current.scrollWidth)},[Nr]);var zr=function(qt,xn,Jn,zt,Bt){return fe.createElement("span",{title:Ne(qt),className:ve()("".concat(br,"-item"),(0,Te.Z)({},"".concat(br,"-item-disabled"),Jn))},fe.createElement("span",{className:"".concat(br,"-item-content")},xn),zt&&fe.createElement(De,{className:"".concat(br,"-item-remove"),onMouseDown:ze,onClick:Bt,customizeIcon:Nn},"\xD7"))},ii=function(qt,xn,Jn,zt,Bt,Qt){var nn=function(Qn){ze(Qn),sr(!wt)};return fe.createElement("span",{onMouseDown:nn},Ln({label:xn,value:qt,disabled:Jn,closable:zt,onClose:Bt,isMaxTag:!!Qt}))},Ir=function(qt){var xn=qt.disabled,Jn=qt.label,zt=qt.value,Bt=!Kt&&!xn,Qt=Jn;if(typeof ar=="number"&&(typeof Jn=="string"||typeof Jn=="number")){var nn=String(Qt);nn.length>ar&&(Qt="".concat(nn.slice(0,ar),"..."))}var Sn=function(Hn){Hn&&Hn.stopPropagation(),Or(qt)};return typeof Ln=="function"?ii(zt,Qt,xn,Bt,Sn):zr(qt,Qt,xn,Bt,Sn)},Tn=function(qt){if(!He.length)return null;var xn=typeof Wn=="function"?Wn(qt):Wn;return typeof Ln=="function"?ii(void 0,xn,!1,!1,void 0,!0):zr({title:xn},xn,!1)},It=fe.createElement("div",{className:"".concat(br,"-search"),style:{width:lr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},fe.createElement(mt,{ref:on,open:wt,prefixCls:bt,id:Tt,inputElement:null,disabled:Kt,autoFocus:Xt,autoComplete:pn,editable:Pr,activeDescendantId:vn,value:Nr,onKeyDown:Cr,onMouseDown:fr,onChange:er,onPaste:wr,onCompositionStart:Yn,onCompositionEnd:Ar,onBlur:cr,tabIndex:mn,attrs:(0,Ke.Z)(Be,!0)}),fe.createElement("span",{ref:Xn,className:"".concat(br,"-search-mirror"),"aria-hidden":!0},Nr,"\xA0")),jt=fe.createElement(We.Z,{prefixCls:"".concat(br,"-overflow"),data:He,renderItem:Ir,renderRest:Tn,suffix:It,itemKey:be,maxCount:Kn});return fe.createElement("span",{className:"".concat(br,"-wrap")},jt,!He.length&&!Nr&&fe.createElement("span",{className:"".concat(br,"-placeholder")},_t))},dt=Ie,Ue=function(Be){var Tt=Be.inputElement,bt=Be.prefixCls,He=Be.id,wt=Be.inputRef,Vt=Be.disabled,tn=Be.autoFocus,on=Be.autoComplete,_t=Be.activeDescendantId,Kt=Be.mode,Et=Be.open,gt=Be.values,Xt=Be.placeholder,pn=Be.tabIndex,vn=Be.showSearch,mn=Be.searchValue,Nn=Be.activeValue,Kn=Be.maxLength,ar=Be.onInputKeyDown,Cn=Be.onInputMouseDown,Wn=Be.onInputChange,Ln=Be.onInputPaste,sr=Be.onInputCompositionStart,Or=Be.onInputCompositionEnd,er=Be.onInputBlur,wr=Be.title,Cr=fe.useState(!1),fr=(0,me.Z)(Cr,2),Yn=fr[0],Ar=fr[1],cr=Kt==="combobox",Xn=cr||vn,yr=gt[0],Sr=mn||"";cr&&Nn&&!Yn&&(Sr=Nn),fe.useEffect(function(){cr&&Ar(!1)},[cr,Nn]);var lr=Kt!=="combobox"&&!Et&&!vn?!1:!!Sr,Un=wr===void 0?Ne(yr):wr,zn=fe.useMemo(function(){return yr?null:fe.createElement("span",{className:"".concat(bt,"-selection-placeholder"),style:lr?{visibility:"hidden"}:void 0},Xt)},[yr,lr,Xt,bt]);return fe.createElement("span",{className:"".concat(bt,"-selection-wrap")},fe.createElement("span",{className:"".concat(bt,"-selection-search")},fe.createElement(mt,{ref:wt,prefixCls:bt,id:He,open:Et,inputElement:Tt,disabled:Vt,autoFocus:tn,autoComplete:on,editable:Xn,activeDescendantId:_t,value:Sr,onKeyDown:ar,onMouseDown:Cn,onChange:function(Gr){Ar(!0),Wn(Gr)},onPaste:Ln,onCompositionStart:sr,onCompositionEnd:Or,onBlur:er,tabIndex:pn,attrs:(0,Ke.Z)(Be,!0),maxLength:cr?Kn:void 0})),!cr&&yr?fe.createElement("span",{className:"".concat(bt,"-selection-item"),title:Un,style:lr?{visibility:"hidden"}:void 0},yr.label):null,zn)},qe=Ue,ke=function(Be,Tt){var bt=(0,fe.useRef)(null),He=(0,fe.useRef)(!1),wt=Be.prefixCls,Vt=Be.open,tn=Be.mode,on=Be.showSearch,_t=Be.tokenWithEnter,Kt=Be.disabled,Et=Be.prefix,gt=Be.autoClearSearchValue,Xt=Be.onSearch,pn=Be.onSearchSubmit,vn=Be.onToggleOpen,mn=Be.onInputKeyDown,Nn=Be.onInputBlur,Kn=Be.domRef;fe.useImperativeHandle(Tt,function(){return{focus:function(Un){bt.current.focus(Un)},blur:function(){bt.current.blur()}}});var ar=nt(0),Cn=(0,me.Z)(ar,2),Wn=Cn[0],Ln=Cn[1],sr=function(Un){var zn=Un.which,Mr=bt.current instanceof HTMLTextAreaElement;!Mr&&Vt&&(zn===ot.Z.UP||zn===ot.Z.DOWN)&&Un.preventDefault(),mn&&mn(Un),zn===ot.Z.ENTER&&tn==="tags"&&!He.current&&!Vt&&(pn==null||pn(Un.target.value)),!(Mr&&!Vt&&~[ot.Z.UP,ot.Z.DOWN,ot.Z.LEFT,ot.Z.RIGHT].indexOf(zn))&&Wt(zn)&&vn(!0)},Or=function(){Ln(!0)},er=(0,fe.useRef)(null),wr=function(Un){Xt(Un,!0,He.current)!==!1&&vn(!0)},Cr=function(){He.current=!0},fr=function(Un){He.current=!1,tn!=="combobox"&&wr(Un.target.value)},Yn=function(Un){var zn=Un.target.value;if(_t&&er.current&&/[\r\n]/.test(er.current)){var Mr=er.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zn=zn.replace(Mr,er.current)}er.current=null,wr(zn)},Ar=function(Un){var zn=Un.clipboardData,Mr=zn==null?void 0:zn.getData("text");er.current=Mr||""},cr=function(Un){var zn=Un.target;if(zn!==bt.current){var Mr=document.body.style.msTouchAction!==void 0;Mr?setTimeout(function(){bt.current.focus()}):bt.current.focus()}},Xn=function(Un){var zn=Wn();Un.target!==bt.current&&!zn&&!(tn==="combobox"&&Kt)&&Un.preventDefault(),(tn!=="combobox"&&(!on||!zn)||!Vt)&&(Vt&>!==!1&&Xt("",!0,!1),vn())},yr={inputRef:bt,onInputKeyDown:sr,onInputMouseDown:Or,onInputChange:Yn,onInputPaste:Ar,onInputCompositionStart:Cr,onInputCompositionEnd:fr,onInputBlur:Nn},Sr=tn==="multiple"||tn==="tags"?fe.createElement(dt,(0,ae.Z)({},Be,yr)):fe.createElement(qe,(0,ae.Z)({},Be,yr));return fe.createElement("div",{ref:Kn,className:"".concat(wt,"-selector"),onClick:cr,onMouseDown:Xn},Et&&fe.createElement("div",{className:"".concat(wt,"-prefix")},Et),Sr)},et=fe.forwardRef(ke),it=et,oe=he(65030),ee=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Be){var Tt=Be===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Tt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Tt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Tt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Tt,adjustY:1},htmlRegion:"scroll"}}},re=function(Be,Tt){var bt=Be.prefixCls,He=Be.disabled,wt=Be.visible,Vt=Be.children,tn=Be.popupElement,on=Be.animation,_t=Be.transitionName,Kt=Be.dropdownStyle,Et=Be.dropdownClassName,gt=Be.direction,Xt=gt===void 0?"ltr":gt,pn=Be.placement,vn=Be.builtinPlacements,mn=Be.dropdownMatchSelectWidth,Nn=Be.dropdownRender,Kn=Be.dropdownAlign,ar=Be.getPopupContainer,Cn=Be.empty,Wn=Be.getTriggerDOMNode,Ln=Be.onPopupVisibleChange,sr=Be.onPopupMouseEnter,Or=(0,ye.Z)(Be,ee),er="".concat(bt,"-dropdown"),wr=tn;Nn&&(wr=Nn(tn));var Cr=fe.useMemo(function(){return vn||z(mn)},[vn,mn]),fr=on?"".concat(er,"-").concat(on):_t,Yn=typeof mn=="number",Ar=fe.useMemo(function(){return Yn?null:mn===!1?"minWidth":"width"},[mn,Yn]),cr=Kt;Yn&&(cr=(0,Re.Z)((0,Re.Z)({},cr),{},{width:mn}));var Xn=fe.useRef(null);return fe.useImperativeHandle(Tt,function(){return{getPopupElement:function(){var Sr;return(Sr=Xn.current)===null||Sr===void 0?void 0:Sr.popupElement}}}),fe.createElement(oe.Z,(0,ae.Z)({},Or,{showAction:Ln?["click"]:[],hideAction:Ln?["click"]:[],popupPlacement:pn||(Xt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Cr,prefixCls:er,popupTransitionName:fr,popup:fe.createElement("div",{onMouseEnter:sr},wr),ref:Xn,stretch:Ar,popupAlign:Kn,popupVisible:wt,getPopupContainer:ar,popupClassName:ve()(Et,(0,Te.Z)({},"".concat(er,"-empty"),Cn)),popupStyle:cr,getTriggerDOMNode:Wn,onPopupVisibleChange:Ln}),Vt)},ue=fe.forwardRef(re),ne=ue,ge=he(66712);function je(Pe,Be){var Tt=Pe.key,bt;return"value"in Pe&&(bt=Pe.value),Tt!=null?Tt:bt!==void 0?bt:"rc-index-key-".concat(Be)}function Dt(Pe){return typeof Pe!="undefined"&&!Number.isNaN(Pe)}function St(Pe,Be){var Tt=Pe||{},bt=Tt.label,He=Tt.value,wt=Tt.options,Vt=Tt.groupLabel,tn=bt||(Be?"children":"label");return{label:tn,value:He||"value",options:wt||"options",groupLabel:Vt||tn}}function yt(Pe){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Tt=Be.fieldNames,bt=Be.childrenAsData,He=[],wt=St(Tt,!1),Vt=wt.label,tn=wt.value,on=wt.options,_t=wt.groupLabel;function Kt(Et,gt){Array.isArray(Et)&&Et.forEach(function(Xt){if(gt||!(on in Xt)){var pn=Xt[tn];He.push({key:je(Xt,He.length),groupOption:gt,data:Xt,label:Xt[Vt],value:pn})}else{var vn=Xt[_t];vn===void 0&&bt&&(vn=Xt.label),He.push({key:je(Xt,He.length),group:!0,data:Xt,label:vn}),Kt(Xt[on],!0)}})}return Kt(Pe,!1),He}function xt(Pe){var Be=(0,Re.Z)({},Pe);return"props"in Be||Object.defineProperty(Be,"props",{get:function(){return(0,Ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Be}}),Be}var Nt=function(Be,Tt,bt){if(!Tt||!Tt.length)return null;var He=!1,wt=function tn(on,_t){var Kt=(0,ge.Z)(_t),Et=Kt[0],gt=Kt.slice(1);if(!Et)return[on];var Xt=on.split(Et);return He=He||Xt.length>1,Xt.reduce(function(pn,vn){return[].concat((0,$e.Z)(pn),(0,$e.Z)(tn(vn,gt)))},[]).filter(Boolean)},Vt=wt(Be,Tt);return He?typeof bt!="undefined"?Vt.slice(0,bt):Vt:null},Lt=fe.createContext(null),kt=Lt;function Rt(Pe){var Be=Pe.visible,Tt=Pe.values;if(!Be)return null;var bt=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Tt.slice(0,bt).map(function(He){var wt=He.label,Vt=He.value;return["number","string"].includes((0,Fe.Z)(wt))?wt:Vt}).join(", ")),Tt.length>bt?", ...":null)}var Mt=["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"],rn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ot=function(Be){return Be==="tags"||Be==="multiple"},Jt=fe.forwardRef(function(Pe,Be){var Tt,bt=Pe.id,He=Pe.prefixCls,wt=Pe.className,Vt=Pe.showSearch,tn=Pe.tagRender,on=Pe.direction,_t=Pe.omitDomProps,Kt=Pe.displayValues,Et=Pe.onDisplayValuesChange,gt=Pe.emptyOptions,Xt=Pe.notFoundContent,pn=Xt===void 0?"Not Found":Xt,vn=Pe.onClear,mn=Pe.mode,Nn=Pe.disabled,Kn=Pe.loading,ar=Pe.getInputElement,Cn=Pe.getRawInputElement,Wn=Pe.open,Ln=Pe.defaultOpen,sr=Pe.onDropdownVisibleChange,Or=Pe.activeValue,er=Pe.onActiveValueChange,wr=Pe.activeDescendantId,Cr=Pe.searchValue,fr=Pe.autoClearSearchValue,Yn=Pe.onSearch,Ar=Pe.onSearchSplit,cr=Pe.tokenSeparators,Xn=Pe.allowClear,yr=Pe.prefix,Sr=Pe.suffixIcon,lr=Pe.clearIcon,Un=Pe.OptionList,zn=Pe.animation,Mr=Pe.transitionName,Gr=Pe.dropdownStyle,Jr=Pe.dropdownClassName,br=Pe.dropdownMatchSelectWidth,Nr=Pe.dropdownRender,Pr=Pe.dropdownAlign,zr=Pe.placement,ii=Pe.builtinPlacements,Ir=Pe.getPopupContainer,Tn=Pe.showAction,It=Tn===void 0?[]:Tn,jt=Pe.onFocus,dn=Pe.onBlur,qt=Pe.onKeyUp,xn=Pe.onKeyDown,Jn=Pe.onMouseDown,zt=(0,ye.Z)(Pe,Mt),Bt=Ot(mn),Qt=(Vt!==void 0?Vt:Bt)||mn==="combobox",nn=(0,Re.Z)({},zt);rn.forEach(function(qn){delete nn[qn]}),_t==null||_t.forEach(function(qn){delete nn[qn]});var Sn=fe.useState(!1),Qn=(0,me.Z)(Sn,2),Hn=Qn[0],dr=Qn[1];fe.useEffect(function(){dr((0,_e.Z)())},[]);var hr=fe.useRef(null),pr=fe.useRef(null),_r=fe.useRef(null),kr=fe.useRef(null),Rr=fe.useRef(null),ei=fe.useRef(!1),Di=lt(),Ni=(0,me.Z)(Di,3),xi=Ni[0],vi=Ni[1],Xi=Ni[2];fe.useImperativeHandle(Be,function(){var qn,Rn;return{focus:(qn=kr.current)===null||qn===void 0?void 0:qn.focus,blur:(Rn=kr.current)===null||Rn===void 0?void 0:Rn.blur,scrollTo:function(hi){var Kr;return(Kr=Rr.current)===null||Kr===void 0?void 0:Kr.scrollTo(hi)},nativeElement:hr.current||pr.current}});var rr=fe.useMemo(function(){var qn;if(mn!=="combobox")return Cr;var Rn=(qn=Kt[0])===null||qn===void 0?void 0:qn.value;return typeof Rn=="string"||typeof Rn=="number"?String(Rn):""},[Cr,mn,Kt]),to=mn==="combobox"&&typeof ar=="function"&&ar()||null,ti=typeof Cn=="function"&&Cn(),Fi=(0,Le.x1)(pr,ti==null||(Tt=ti.props)===null||Tt===void 0?void 0:Tt.ref),ao=fe.useState(!1),Ji=(0,me.Z)(ao,2),mi=Ji[0],Ii=Ji[1];(0,st.Z)(function(){Ii(!0)},[]);var Wr=(0,Ze.Z)(!1,{defaultValue:Ln,value:Wn}),_i=(0,me.Z)(Wr,2),so=_i[0],Zi=_i[1],Qr=mi?so:!1,xo=!pn&>(Nn||xo&&Qr&&mn==="combobox")&&(Qr=!1);var lo=xo?!1:Qr,wn=fe.useCallback(function(qn){var Rn=qn!==void 0?qn:!Qr;Nn||(Zi(Rn),Qr!==Rn&&(sr==null||sr(Rn)))},[Nn,Qr,Zi,sr]),Bn=fe.useMemo(function(){return(cr||[]).some(function(qn){return[`
|
|
`,`\r
|
|
`].includes(qn)})},[cr]),Dn=fe.useContext(kt)||{},An=Dn.maxCount,ur=Dn.rawValues,Tr=function(Rn,ci,hi){if(!(Bt&&Dt(An)&&(ur==null?void 0:ur.size)>=An)){var Kr=!0,ni=Rn;er==null||er(null);var Ui=Nt(Rn,cr,Dt(An)?An-ur.size:void 0),Hi=hi?null:Ui;return mn!=="combobox"&&Hi&&(ni="",Ar==null||Ar(Hi),wn(!1),Kr=!1),Yn&&rr!==ni&&Yn(ni,{source:ci?"typing":"effect"}),Kr}},ji=function(Rn){!Rn||!Rn.trim()||Yn(Rn,{source:"submit"})};fe.useEffect(function(){!Qr&&!Bt&&mn!=="combobox"&&Tr("",!1,!1)},[Qr]),fe.useEffect(function(){so&&Nn&&Zi(!1),Nn&&!ei.current&&vi(!1)},[Nn]);var gi=nt(),ui=(0,me.Z)(gi,2),Vr=ui[0],Wi=ui[1],Qi=fe.useRef(!1),Mi=function(Rn){var ci=Vr(),hi=Rn.key,Kr=hi==="Enter";if(Kr&&(mn!=="combobox"&&Rn.preventDefault(),Qr||wn(!0)),Wi(!!rr),hi==="Backspace"&&!ci&&Bt&&!rr&&Kt.length){for(var ni=(0,$e.Z)(Kt),Ui=null,Hi=ni.length-1;Hi>=0;Hi-=1){var ro=ni[Hi];if(!ro.disabled){ni.splice(Hi,1),Ui=ro;break}}Ui&&Et(ni,{type:"remove",values:[Ui]})}for(var Pi=arguments.length,Ai=new Array(Pi>1?Pi-1:0),Vi=1;Vi<Pi;Vi++)Ai[Vi-1]=arguments[Vi];if(Qr&&(!Kr||!Qi.current)){var co;Kr&&(Qi.current=!0),(co=Rr.current)===null||co===void 0||co.onKeyDown.apply(co,[Rn].concat(Ai))}xn==null||xn.apply(void 0,[Rn].concat(Ai))},qi=function(Rn){for(var ci=arguments.length,hi=new Array(ci>1?ci-1:0),Kr=1;Kr<ci;Kr++)hi[Kr-1]=arguments[Kr];if(Qr){var ni;(ni=Rr.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[Rn].concat(hi))}Rn.key==="Enter"&&(Qi.current=!1),qt==null||qt.apply(void 0,[Rn].concat(hi))},no=function(Rn){var ci=Kt.filter(function(hi){return hi!==Rn});Et(ci,{type:"remove",values:[Rn]})},Gi=function(){Qi.current=!1},Ao=fe.useRef(!1),Ga=function(){vi(!0),Nn||(jt&&!Ao.current&&jt.apply(void 0,arguments),It.includes("focus")&&wn(!0)),Ao.current=!0},ya=function(){ei.current=!0,vi(!1,function(){Ao.current=!1,ei.current=!1,wn(!1)}),!Nn&&(rr&&(mn==="tags"?Yn(rr,{source:"submit"}):mn==="multiple"&&Yn("",{source:"blur"})),dn&&dn.apply(void 0,arguments))},$i=[];fe.useEffect(function(){return function(){$i.forEach(function(qn){return clearTimeout(qn)}),$i.splice(0,$i.length)}},[]);var uo=function(Rn){var ci,hi=Rn.target,Kr=(ci=_r.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Kr&&Kr.contains(hi)){var ni=setTimeout(function(){var Pi=$i.indexOf(ni);if(Pi!==-1&&$i.splice(Pi,1),Xi(),!Hn&&!Kr.contains(document.activeElement)){var Ai;(Ai=kr.current)===null||Ai===void 0||Ai.focus()}});$i.push(ni)}for(var Ui=arguments.length,Hi=new Array(Ui>1?Ui-1:0),ro=1;ro<Ui;ro++)Hi[ro-1]=arguments[ro];Jn==null||Jn.apply(void 0,[Rn].concat(Hi))},zi=fe.useState({}),ba=(0,me.Z)(zi,2),xa=ba[1];function Ua(){xa({})}var wa;ti&&(wa=function(Rn){wn(Rn)}),at(function(){var qn;return[hr.current,(qn=_r.current)===null||qn===void 0?void 0:qn.getPopupElement()]},lo,wn,!!ti);var Va=fe.useMemo(function(){return(0,Re.Z)((0,Re.Z)({},Pe),{},{notFoundContent:pn,open:Qr,triggerOpen:lo,id:bt,showSearch:Qt,multiple:Bt,toggleOpen:wn})},[Pe,pn,lo,Qr,bt,Qt,Bt,wn]),Ko=!!Sr||Kn,Yo;Ko&&(Yo=fe.createElement(De,{className:ve()("".concat(He,"-arrow"),(0,Te.Z)({},"".concat(He,"-arrow-loading"),Kn)),customizeIcon:Sr,customizeIconProps:{loading:Kn,searchValue:rr,open:Qr,focused:xi,showSearch:Qt}}));var wo=function(){var Rn;vn==null||vn(),(Rn=kr.current)===null||Rn===void 0||Rn.focus(),Et([],{type:"clear",values:Kt}),Tr("",!1,!1)},Xo=rt(He,wo,Kt,Xn,lr,Nn,rr,mn),Ca=Xo.allowClear,Jo=Xo.clearIcon,To=fe.createElement(Un,{ref:Rr}),Sa=ve()(He,wt,(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(He,"-focused"),xi),"".concat(He,"-multiple"),Bt),"".concat(He,"-single"),!Bt),"".concat(He,"-allow-clear"),Xn),"".concat(He,"-show-arrow"),Ko),"".concat(He,"-disabled"),Nn),"".concat(He,"-loading"),Kn),"".concat(He,"-open"),Qr),"".concat(He,"-customize-input"),to),"".concat(He,"-show-search"),Qt)),Bo=fe.createElement(ne,{ref:_r,disabled:Nn,prefixCls:He,visible:lo,popupElement:To,animation:zn,transitionName:Mr,dropdownStyle:Gr,dropdownClassName:Jr,direction:on,dropdownMatchSelectWidth:br,dropdownRender:Nr,dropdownAlign:Pr,placement:zr,builtinPlacements:ii,getPopupContainer:Ir,empty:gt,getTriggerDOMNode:function(Rn){return pr.current||Rn},onPopupVisibleChange:wa,onPopupMouseEnter:Ua},ti?fe.cloneElement(ti,{ref:Fi}):fe.createElement(it,(0,ae.Z)({},Pe,{domRef:pr,prefixCls:He,inputElement:to,ref:kr,id:bt,prefix:yr,showSearch:Qt,autoClearSearchValue:fr,mode:mn,activeDescendantId:wr,tagRender:tn,values:Kt,open:Qr,onToggleOpen:wn,activeValue:Or,searchValue:rr,onSearch:Tr,onSearchSubmit:ji,onRemove:no,tokenWithEnter:Bn,onInputBlur:Gi}))),wi;return ti?wi=Bo:wi=fe.createElement("div",(0,ae.Z)({className:Sa},nn,{ref:hr,onMouseDown:uo,onKeyDown:Mi,onKeyUp:qi,onFocus:Ga,onBlur:ya}),fe.createElement(Rt,{visible:xi&&!Qr,values:Kt}),Bo,Yo,Ca&&Jo),fe.createElement(ct.Provider,{value:Va},wi)}),ht=Jt,cn=function(){return null};cn.isSelectOptGroup=!0;var Ht=cn,Ut=function(){return null};Ut.isSelectOption=!0;var sn=Ut,Pn=he(80547),un=he(2738),yn=he(48911);function tr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Gn=["disabled","title","children","style","className"];function Xr(Pe){return typeof Pe=="string"||typeof Pe=="number"}var jr=function(Be,Tt){var bt=ft(),He=bt.prefixCls,wt=bt.id,Vt=bt.open,tn=bt.multiple,on=bt.mode,_t=bt.searchValue,Kt=bt.toggleOpen,Et=bt.notFoundContent,gt=bt.onPopupScroll,Xt=fe.useContext(kt),pn=Xt.maxCount,vn=Xt.flattenOptions,mn=Xt.onActiveValue,Nn=Xt.defaultActiveFirstOption,Kn=Xt.onSelect,ar=Xt.menuItemSelectedIcon,Cn=Xt.rawValues,Wn=Xt.fieldNames,Ln=Xt.virtual,sr=Xt.direction,Or=Xt.listHeight,er=Xt.listItemHeight,wr=Xt.optionRender,Cr="".concat(He,"-item"),fr=(0,Pn.Z)(function(){return vn},[Vt,vn],function(Tn,It){return It[0]&&Tn[1]!==It[1]}),Yn=fe.useRef(null),Ar=fe.useMemo(function(){return tn&&Dt(pn)&&(Cn==null?void 0:Cn.size)>=pn},[tn,pn,Cn==null?void 0:Cn.size]),cr=function(It){It.preventDefault()},Xn=function(It){var jt;(jt=Yn.current)===null||jt===void 0||jt.scrollTo(typeof It=="number"?{index:It}:It)},yr=fe.useCallback(function(Tn){return on==="combobox"?!1:Cn.has(Tn)},[on,(0,$e.Z)(Cn).toString(),Cn.size]),Sr=function(It){for(var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,dn=fr.length,qt=0;qt<dn;qt+=1){var xn=(It+qt*jt+dn)%dn,Jn=fr[xn]||{},zt=Jn.group,Bt=Jn.data;if(!zt&&!(Bt!=null&&Bt.disabled)&&(yr(Bt.value)||!Ar))return xn}return-1},lr=fe.useState(function(){return Sr(0)}),Un=(0,me.Z)(lr,2),zn=Un[0],Mr=Un[1],Gr=function(It){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Mr(It);var dn={source:jt?"keyboard":"mouse"},qt=fr[It];if(!qt){mn(null,-1,dn);return}mn(qt.value,It,dn)};(0,fe.useEffect)(function(){Gr(Nn!==!1?Sr(0):-1)},[fr.length,_t]);var Jr=fe.useCallback(function(Tn){return on==="combobox"?String(Tn).toLowerCase()===_t.toLowerCase():Cn.has(Tn)},[on,_t,(0,$e.Z)(Cn).toString(),Cn.size]);(0,fe.useEffect)(function(){var Tn=setTimeout(function(){if(!tn&&Vt&&Cn.size===1){var jt=Array.from(Cn)[0],dn=fr.findIndex(function(qt){var xn=qt.data;return _t?String(xn.value).startsWith(_t):xn.value===jt});dn!==-1&&(Gr(dn),Xn(dn))}});if(Vt){var It;(It=Yn.current)===null||It===void 0||It.scrollTo(void 0)}return function(){return clearTimeout(Tn)}},[Vt,_t]);var br=function(It){It!==void 0&&Kn(It,{selected:!Cn.has(It)}),tn||Kt(!1)};if(fe.useImperativeHandle(Tt,function(){return{onKeyDown:function(It){var jt=It.which,dn=It.ctrlKey;switch(jt){case ot.Z.N:case ot.Z.P:case ot.Z.UP:case ot.Z.DOWN:{var qt=0;if(jt===ot.Z.UP?qt=-1:jt===ot.Z.DOWN?qt=1:tr()&&dn&&(jt===ot.Z.N?qt=1:jt===ot.Z.P&&(qt=-1)),qt!==0){var xn=Sr(zn+qt,qt);Xn(xn),Gr(xn,!0)}break}case ot.Z.TAB:case ot.Z.ENTER:{var Jn,zt=fr[zn];zt&&!(zt!=null&&(Jn=zt.data)!==null&&Jn!==void 0&&Jn.disabled)&&!Ar?br(zt.value):br(void 0),Vt&&It.preventDefault();break}case ot.Z.ESC:Kt(!1),Vt&&It.stopPropagation()}},onKeyUp:function(){},scrollTo:function(It){Xn(It)}}}),fr.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(wt,"_list"),className:"".concat(Cr,"-empty"),onMouseDown:cr},Et);var Nr=Object.keys(Wn).map(function(Tn){return Wn[Tn]}),Pr=function(It){return It.label};function zr(Tn,It){var jt=Tn.group;return{role:jt?"presentation":"option",id:"".concat(wt,"_list_").concat(It)}}var ii=function(It){var jt=fr[It];if(!jt)return null;var dn=jt.data||{},qt=dn.value,xn=jt.group,Jn=(0,Ke.Z)(dn,!0),zt=Pr(jt);return jt?fe.createElement("div",(0,ae.Z)({"aria-label":typeof zt=="string"&&!xn?zt:null},Jn,{key:It},zr(jt,It),{"aria-selected":Jr(qt)}),qt):null},Ir={role:"listbox",id:"".concat(wt,"_list")};return fe.createElement(fe.Fragment,null,Ln&&fe.createElement("div",(0,ae.Z)({},Ir,{style:{height:0,width:0,overflow:"hidden"}}),ii(zn-1),ii(zn),ii(zn+1)),fe.createElement(yn.Z,{itemKey:"key",ref:Yn,data:fr,height:Or,itemHeight:er,fullHeight:!1,onMouseDown:cr,onScroll:gt,virtual:Ln,direction:sr,innerProps:Ln?null:Ir},function(Tn,It){var jt=Tn.group,dn=Tn.groupOption,qt=Tn.data,xn=Tn.label,Jn=Tn.value,zt=qt.key;if(jt){var Bt,Qt=(Bt=qt.title)!==null&&Bt!==void 0?Bt:Xr(xn)?xn.toString():void 0;return fe.createElement("div",{className:ve()(Cr,"".concat(Cr,"-group"),qt.className),title:Qt},xn!==void 0?xn:zt)}var nn=qt.disabled,Sn=qt.title,Qn=qt.children,Hn=qt.style,dr=qt.className,hr=(0,ye.Z)(qt,Gn),pr=(0,un.Z)(hr,Nr),_r=yr(Jn),kr=nn||!_r&&Ar,Rr="".concat(Cr,"-option"),ei=ve()(Cr,Rr,dr,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(Rr,"-grouped"),dn),"".concat(Rr,"-active"),zn===It&&!kr),"".concat(Rr,"-disabled"),kr),"".concat(Rr,"-selected"),_r)),Di=Pr(Tn),Ni=!ar||typeof ar=="function"||_r,xi=typeof Di=="number"?Di:Di||Jn,vi=Xr(xi)?xi.toString():void 0;return Sn!==void 0&&(vi=Sn),fe.createElement("div",(0,ae.Z)({},(0,Ke.Z)(pr),Ln?{}:zr(Tn,It),{"aria-selected":Jr(Jn),className:ei,title:vi,onMouseMove:function(){zn===It||kr||Gr(It)},onClick:function(){kr||br(Jn)},style:Hn}),fe.createElement("div",{className:"".concat(Rr,"-content")},typeof wr=="function"?wr(Tn,{index:It}):xi),fe.isValidElement(ar)||_r,Ni&&fe.createElement(De,{className:"".concat(Cr,"-option-state"),customizeIcon:ar,customizeIconProps:{value:Jn,disabled:kr,isSelected:_r}},_r?"\u2713":null))}))},xr=fe.forwardRef(jr),mr=xr,On=function(Pe,Be){var Tt=fe.useRef({values:new Map,options:new Map}),bt=fe.useMemo(function(){var wt=Tt.current,Vt=wt.values,tn=wt.options,on=Pe.map(function(Et){if(Et.label===void 0){var gt;return(0,Re.Z)((0,Re.Z)({},Et),{},{label:(gt=Vt.get(Et.value))===null||gt===void 0?void 0:gt.label})}return Et}),_t=new Map,Kt=new Map;return on.forEach(function(Et){_t.set(Et.value,Et),Kt.set(Et.value,Be.get(Et.value)||tn.get(Et.value))}),Tt.current.values=_t,Tt.current.options=Kt,on},[Pe,Be]),He=fe.useCallback(function(wt){return Be.get(wt)||Tt.current.options.get(wt)},[Be]);return[bt,He]};function ir(Pe,Be){return Ye(Pe).join("").toUpperCase().includes(Be)}var Fr=function(Pe,Be,Tt,bt,He){return fe.useMemo(function(){if(!Tt||bt===!1)return Pe;var wt=Be.options,Vt=Be.label,tn=Be.value,on=[],_t=typeof bt=="function",Kt=Tt.toUpperCase(),Et=_t?bt:function(Xt,pn){return He?ir(pn[He],Kt):pn[wt]?ir(pn[Vt!=="children"?Vt:"label"],Kt):ir(pn[tn],Kt)},gt=_t?function(Xt){return xt(Xt)}:function(Xt){return Xt};return Pe.forEach(function(Xt){if(Xt[wt]){var pn=Et(Tt,gt(Xt));if(pn)on.push(Xt);else{var vn=Xt[wt].filter(function(mn){return Et(Tt,gt(mn))});vn.length&&on.push((0,Re.Z)((0,Re.Z)({},Xt),{},(0,Te.Z)({},wt,vn)))}return}Et(Tt,gt(Xt))&&on.push(Xt)}),on},[Pe,bt,He,Tt,Be])},Fn=he(6551),nr=he(11592),Vn=["children","value"],Lr=["children"];function an(Pe){var Be=Pe,Tt=Be.key,bt=Be.props,He=bt.children,wt=bt.value,Vt=(0,ye.Z)(bt,Vn);return(0,Re.Z)({key:Tt,value:wt!==void 0?wt:Tt,children:He},Vt)}function fn(Pe){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,nr.Z)(Pe).map(function(Tt,bt){if(!fe.isValidElement(Tt)||!Tt.type)return null;var He=Tt,wt=He.type.isSelectOptGroup,Vt=He.key,tn=He.props,on=tn.children,_t=(0,ye.Z)(tn,Lr);return Be||!wt?an(Tt):(0,Re.Z)((0,Re.Z)({key:"__RC_SELECT_GRP__".concat(Vt===null?bt:Vt,"__"),label:Vt},_t),{},{options:fn(on)})}).filter(function(Tt){return Tt})}var bn=function(Be,Tt,bt,He,wt){return fe.useMemo(function(){var Vt=Be,tn=!Be;tn&&(Vt=fn(Tt));var on=new Map,_t=new Map,Kt=function(Xt,pn,vn){vn&&typeof vn=="string"&&Xt.set(pn[vn],pn)},Et=function gt(Xt){for(var pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vn=0;vn<Xt.length;vn+=1){var mn=Xt[vn];!mn[bt.options]||pn?(on.set(mn[bt.value],mn),Kt(_t,mn,bt.label),Kt(_t,mn,He),Kt(_t,mn,wt)):gt(mn[bt.options],!0)}};return Et(Vt),{options:Vt,valueOptions:on,labelOptions:_t}},[Be,Tt,bt,He,wt])},Mn=bn;function $n(Pe){var Be=fe.useRef();Be.current=Pe;var Tt=fe.useCallback(function(){return Be.current.apply(Be,arguments)},[]);return Tt}function or(Pe){var Be=Pe.mode,Tt=Pe.options,bt=Pe.children,He=Pe.backfill,wt=Pe.allowClear,Vt=Pe.placeholder,tn=Pe.getInputElement,on=Pe.showSearch,_t=Pe.onSearch,Kt=Pe.defaultOpen,Et=Pe.autoFocus,gt=Pe.labelInValue,Xt=Pe.value,pn=Pe.inputValue,vn=Pe.optionLabelProp,mn=isMultiple(Be),Nn=on!==void 0?on:mn||Be==="combobox",Kn=Tt||convertChildrenToData(bt);if(warning(Be!=="tags"||Kn.every(function(Ln){return!Ln.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Be==="tags"||Be==="combobox"){var ar=Kn.some(function(Ln){return Ln.options?Ln.options.some(function(sr){return typeof("value"in sr?sr.value:sr.key)=="number"}):typeof("value"in Ln?Ln.value:Ln.key)=="number"});warning(!ar,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Be!=="combobox"||!vn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Be==="combobox"||!He,"`backfill` only works with `combobox` mode."),warning(Be==="combobox"||!tn,"`getInputElement` only work with `combobox` mode."),noteOnce(Be!=="combobox"||!tn||!wt||!Vt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_t&&!Nn&&Be!=="combobox"&&Be!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Kt||Et,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Xt!=null){var Cn=toArray(Xt);warning(!gt||Cn.every(function(Ln){return _typeof(Ln)==="object"&&("key"in Ln||"value"in Ln)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!mn||Array.isArray(Xt),"`value` should be array when `mode` is `multiple` or `tags`")}if(bt){var Wn=null;toNodeArray(bt).some(function(Ln){if(!React.isValidElement(Ln)||!Ln.type)return!1;var sr=Ln,Or=sr.type;if(Or.isSelectOption)return!1;if(Or.isSelectOptGroup){var er=toNodeArray(Ln.props.children).every(function(wr){return!React.isValidElement(wr)||!Ln.type||wr.type.isSelectOption?!0:(Wn=wr.type,!1)});return!er}return Wn=Or,!0}),Wn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Wn.displayName||Wn.name||Wn,"`.")),warning(pn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function gr(Pe,Be){if(Pe){var Tt=function bt(He){for(var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Vt=0;Vt<He.length;Vt++){var tn=He[Vt];if(tn[Be==null?void 0:Be.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!wt&&Array.isArray(tn[Be==null?void 0:Be.options])&&bt(tn[Be==null?void 0:Be.options],!0))break}};Tt(Pe)}}var _n=null,In=["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"],Dr=["inputValue"];function Zt(Pe){return!Pe||(0,Fe.Z)(Pe)!=="object"}var pt=fe.forwardRef(function(Pe,Be){var Tt=Pe.id,bt=Pe.mode,He=Pe.prefixCls,wt=He===void 0?"rc-select":He,Vt=Pe.backfill,tn=Pe.fieldNames,on=Pe.inputValue,_t=Pe.searchValue,Kt=Pe.onSearch,Et=Pe.autoClearSearchValue,gt=Et===void 0?!0:Et,Xt=Pe.onSelect,pn=Pe.onDeselect,vn=Pe.dropdownMatchSelectWidth,mn=vn===void 0?!0:vn,Nn=Pe.filterOption,Kn=Pe.filterSort,ar=Pe.optionFilterProp,Cn=Pe.optionLabelProp,Wn=Pe.options,Ln=Pe.optionRender,sr=Pe.children,Or=Pe.defaultActiveFirstOption,er=Pe.menuItemSelectedIcon,wr=Pe.virtual,Cr=Pe.direction,fr=Pe.listHeight,Yn=fr===void 0?200:fr,Ar=Pe.listItemHeight,cr=Ar===void 0?20:Ar,Xn=Pe.labelRender,yr=Pe.value,Sr=Pe.defaultValue,lr=Pe.labelInValue,Un=Pe.onChange,zn=Pe.maxCount,Mr=(0,ye.Z)(Pe,In),Gr=(0,Fn.ZP)(Tt),Jr=Ot(bt),br=!!(!Wn&&sr),Nr=fe.useMemo(function(){return Nn===void 0&&bt==="combobox"?!1:Nn},[Nn,bt]),Pr=fe.useMemo(function(){return St(tn,br)},[JSON.stringify(tn),br]),zr=(0,Ze.Z)("",{value:_t!==void 0?_t:on,postState:function(Bn){return Bn||""}}),ii=(0,me.Z)(zr,2),Ir=ii[0],Tn=ii[1],It=Mn(Wn,sr,Pr,ar,Cn),jt=It.valueOptions,dn=It.labelOptions,qt=It.options,xn=fe.useCallback(function(wn){var Bn=Ye(wn);return Bn.map(function(Dn){var An,ur,Tr,ji,gi;if(Zt(Dn))An=Dn;else{var ui;Tr=Dn.key,ur=Dn.label,An=(ui=Dn.value)!==null&&ui!==void 0?ui:Tr}var Vr=jt.get(An);if(Vr){var Wi;if(ur===void 0&&(ur=Vr==null?void 0:Vr[Cn||Pr.label]),Tr===void 0&&(Tr=(Wi=Vr==null?void 0:Vr.key)!==null&&Wi!==void 0?Wi:An),ji=Vr==null?void 0:Vr.disabled,gi=Vr==null?void 0:Vr.title,0)var Qi}return{label:ur,value:An,key:Tr,disabled:ji,title:gi}})},[Pr,Cn,jt]),Jn=(0,Ze.Z)(Sr,{value:yr}),zt=(0,me.Z)(Jn,2),Bt=zt[0],Qt=zt[1],nn=fe.useMemo(function(){var wn,Bn=Jr&&Bt===null?[]:Bt,Dn=xn(Bn);return bt==="combobox"&&le((wn=Dn[0])===null||wn===void 0?void 0:wn.value)?[]:Dn},[Bt,xn,bt,Jr]),Sn=On(nn,jt),Qn=(0,me.Z)(Sn,2),Hn=Qn[0],dr=Qn[1],hr=fe.useMemo(function(){if(!bt&&Hn.length===1){var wn=Hn[0];if(wn.value===null&&(wn.label===null||wn.label===void 0))return[]}return Hn.map(function(Bn){var Dn;return(0,Re.Z)((0,Re.Z)({},Bn),{},{label:(Dn=typeof Xn=="function"?Xn(Bn):Bn.label)!==null&&Dn!==void 0?Dn:Bn.value})})},[bt,Hn,Xn]),pr=fe.useMemo(function(){return new Set(Hn.map(function(wn){return wn.value}))},[Hn]);fe.useEffect(function(){if(bt==="combobox"){var wn,Bn=(wn=Hn[0])===null||wn===void 0?void 0:wn.value;Tn(pe(Bn)?String(Bn):"")}},[Hn]);var _r=$n(function(wn,Bn){var Dn=Bn!=null?Bn:wn;return(0,Te.Z)((0,Te.Z)({},Pr.value,wn),Pr.label,Dn)}),kr=fe.useMemo(function(){if(bt!=="tags")return qt;var wn=(0,$e.Z)(qt),Bn=function(An){return jt.has(An)};return(0,$e.Z)(Hn).sort(function(Dn,An){return Dn.value<An.value?-1:1}).forEach(function(Dn){var An=Dn.value;Bn(An)||wn.push(_r(An,Dn.label))}),wn},[_r,qt,jt,Hn,bt]),Rr=Fr(kr,Pr,Ir,Nr,ar),ei=fe.useMemo(function(){return bt!=="tags"||!Ir||Rr.some(function(wn){return wn[ar||"value"]===Ir})||Rr.some(function(wn){return wn[Pr.value]===Ir})?Rr:[_r(Ir)].concat((0,$e.Z)(Rr))},[_r,ar,bt,Rr,Ir,Pr]),Di=function wn(Bn){var Dn=(0,$e.Z)(Bn).sort(function(An,ur){return Kn(An,ur,{searchValue:Ir})});return Dn.map(function(An){return Array.isArray(An.options)?(0,Re.Z)((0,Re.Z)({},An),{},{options:An.options.length>0?wn(An.options):An.options}):An})},Ni=fe.useMemo(function(){return Kn?Di(ei):ei},[ei,Kn,Ir]),xi=fe.useMemo(function(){return yt(Ni,{fieldNames:Pr,childrenAsData:br})},[Ni,Pr,br]),vi=function(Bn){var Dn=xn(Bn);if(Qt(Dn),Un&&(Dn.length!==Hn.length||Dn.some(function(Tr,ji){var gi;return((gi=Hn[ji])===null||gi===void 0?void 0:gi.value)!==(Tr==null?void 0:Tr.value)}))){var An=lr?Dn:Dn.map(function(Tr){return Tr.value}),ur=Dn.map(function(Tr){return xt(dr(Tr.value))});Un(Jr?An:An[0],Jr?ur:ur[0])}},Xi=fe.useState(null),rr=(0,me.Z)(Xi,2),to=rr[0],ti=rr[1],Fi=fe.useState(0),ao=(0,me.Z)(Fi,2),Ji=ao[0],mi=ao[1],Ii=Or!==void 0?Or:bt!=="combobox",Wr=fe.useCallback(function(wn,Bn){var Dn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},An=Dn.source,ur=An===void 0?"keyboard":An;mi(Bn),Vt&&bt==="combobox"&&wn!==null&&ur==="keyboard"&&ti(String(wn))},[Vt,bt]),_i=function(Bn,Dn,An){var ur=function(){var no,Gi=dr(Bn);return[lr?{label:Gi==null?void 0:Gi[Pr.label],value:Bn,key:(no=Gi==null?void 0:Gi.key)!==null&&no!==void 0?no:Bn}:Bn,xt(Gi)]};if(Dn&&Xt){var Tr=ur(),ji=(0,me.Z)(Tr,2),gi=ji[0],ui=ji[1];Xt(gi,ui)}else if(!Dn&&pn&&An!=="clear"){var Vr=ur(),Wi=(0,me.Z)(Vr,2),Qi=Wi[0],Mi=Wi[1];pn(Qi,Mi)}},so=$n(function(wn,Bn){var Dn,An=Jr?Bn.selected:!0;An?Dn=Jr?[].concat((0,$e.Z)(Hn),[wn]):[wn]:Dn=Hn.filter(function(ur){return ur.value!==wn}),vi(Dn),_i(wn,An),bt==="combobox"?ti(""):(!Ot||gt)&&(Tn(""),ti(""))}),Zi=function(Bn,Dn){vi(Bn);var An=Dn.type,ur=Dn.values;(An==="remove"||An==="clear")&&ur.forEach(function(Tr){_i(Tr.value,!1,An)})},Qr=function(Bn,Dn){if(Tn(Bn),ti(null),Dn.source==="submit"){var An=(Bn||"").trim();if(An){var ur=Array.from(new Set([].concat((0,$e.Z)(pr),[An])));vi(ur),_i(An,!0),Tn("")}return}Dn.source!=="blur"&&(bt==="combobox"&&vi(Bn),Kt==null||Kt(Bn))},xo=function(Bn){var Dn=Bn;bt!=="tags"&&(Dn=Bn.map(function(ur){var Tr=dn.get(ur);return Tr==null?void 0:Tr.value}).filter(function(ur){return ur!==void 0}));var An=Array.from(new Set([].concat((0,$e.Z)(pr),(0,$e.Z)(Dn))));vi(An),An.forEach(function(ur){_i(ur,!0)})},lo=fe.useMemo(function(){var wn=wr!==!1&&mn!==!1;return(0,Re.Z)((0,Re.Z)({},It),{},{flattenOptions:xi,onActiveValue:Wr,defaultActiveFirstOption:Ii,onSelect:so,menuItemSelectedIcon:er,rawValues:pr,fieldNames:Pr,virtual:wn,direction:Cr,listHeight:Yn,listItemHeight:cr,childrenAsData:br,maxCount:zn,optionRender:Ln})},[zn,It,xi,Wr,Ii,so,er,pr,Pr,wr,mn,Cr,Yn,cr,br,Ln]);return fe.createElement(kt.Provider,{value:lo},fe.createElement(ht,(0,ae.Z)({},Mr,{id:Gr,prefixCls:wt,ref:Be,omitDomProps:Dr,mode:bt,displayValues:hr,onDisplayValuesChange:Zi,direction:Cr,searchValue:Ir,onSearch:Qr,autoClearSearchValue:gt,onSearchSplit:xo,dropdownMatchSelectWidth:mn,OptionList:mr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Gr,"_list_").concat(Ji)})))}),Yt=pt;Yt.Option=sn,Yt.OptGroup=Ht;var En=Yt,jn=En},63158:function(At,Ft,he){"use strict";var ae=he(54476),$e=he(20068),Te=he(42978),Re=he(75931),me=he(59301),ye=he(92310),Fe=he.n(ye),Ze=he(18929),Ce=he(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],tt=me.forwardRef(function(ve,st){var _e,Le=ve.prefixCls,Me=Le===void 0?"rc-switch":Le,De=ve.className,rt=ve.checked,ct=ve.defaultChecked,ft=ve.disabled,lt=ve.loadingIcon,nt=ve.checkedChildren,at=ve.unCheckedChildren,ot=ve.onClick,Wt=ve.onChange,Ke=ve.onKeyDown,We=(0,Re.Z)(ve,fe),vt=(0,Ze.Z)(!1,{value:rt,defaultValue:ct}),Ae=(0,Te.Z)(vt,2),Ge=Ae[0],Ee=Ae[1];function Oe(ut,pe){var le=Ge;return ft||(le=ut,Ee(le),Wt==null||Wt(le,pe)),le}function mt(ut){ut.which===Ce.Z.LEFT?Oe(!1,ut):ut.which===Ce.Z.RIGHT&&Oe(!0,ut),Ke==null||Ke(ut)}function Ye(ut){var pe=Oe(!Ge,ut);ot==null||ot(pe,ut)}var Qe=Fe()(Me,De,(_e={},(0,$e.Z)(_e,"".concat(Me,"-checked"),Ge),(0,$e.Z)(_e,"".concat(Me,"-disabled"),ft),_e));return me.createElement("button",(0,ae.Z)({},We,{type:"button",role:"switch","aria-checked":Ge,disabled:ft,className:Qe,ref:st,onKeyDown:mt,onClick:Ye}),lt,me.createElement("span",{className:"".concat(Me,"-inner")},me.createElement("span",{className:"".concat(Me,"-inner-checked")},nt),me.createElement("span",{className:"".concat(Me,"-inner-unchecked")},at)))});tt.displayName="Switch",Ft.Z=tt},22711:function(At,Ft,he){"use strict";he.r(Ft),he.d(Ft,{ResizableTextArea:function(){return Ae},default:function(){return mt}});var ae=he(54476),$e=he(20068),Te=he(33885),Re=he(94480),me=he(42978),ye=he(75931),Fe=he(92310),Ze=he.n(Fe),Ce=he(36901),fe=he(66003),tt=he(30292),ve=he(18929),st=he(59301),_e=he(76190),Le=he(29301),Me=he(34280),De=he(16089),rt=`
|
|
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;
|
|
`,ct=["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"],ft={},lt;function nt(Ye){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=Ye.getAttribute("id")||Ye.getAttribute("data-reactid")||Ye.getAttribute("name");if(Qe&&ft[ut])return ft[ut];var pe=window.getComputedStyle(Ye),le=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),xe=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),Ne=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),Xe=ct.map(function(ze){return"".concat(ze,":").concat(pe.getPropertyValue(ze))}).join(";"),be={sizingStyle:Xe,paddingSize:xe,borderSize:Ne,boxSizing:le};return Qe&&ut&&(ft[ut]=be),be}function at(Ye){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;lt||(lt=document.createElement("textarea"),lt.setAttribute("tab-index","-1"),lt.setAttribute("aria-hidden","true"),lt.setAttribute("name","hiddenTextarea"),document.body.appendChild(lt)),Ye.getAttribute("wrap")?lt.setAttribute("wrap",Ye.getAttribute("wrap")):lt.removeAttribute("wrap");var le=nt(Ye,Qe),xe=le.paddingSize,Ne=le.borderSize,Xe=le.boxSizing,be=le.sizingStyle;lt.setAttribute("style","".concat(be,";").concat(rt)),lt.value=Ye.value||Ye.placeholder||"";var ze=void 0,Ie=void 0,dt,Ue=lt.scrollHeight;if(Xe==="border-box"?Ue+=Ne:Xe==="content-box"&&(Ue-=xe),ut!==null||pe!==null){lt.value=" ";var qe=lt.scrollHeight-xe;ut!==null&&(ze=qe*ut,Xe==="border-box"&&(ze=ze+xe+Ne),Ue=Math.max(ze,Ue)),pe!==null&&(Ie=qe*pe,Xe==="border-box"&&(Ie=Ie+xe+Ne),dt=Ue>Ie?"":"hidden",Ue=Math.min(Ie,Ue))}var ke={height:Ue,overflowY:dt,resize:"none"};return ze&&(ke.minHeight=ze),Ie&&(ke.maxHeight=Ie),ke}var ot=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Wt=0,Ke=1,We=2,vt=st.forwardRef(function(Ye,Qe){var ut=Ye,pe=ut.prefixCls,le=ut.defaultValue,xe=ut.value,Ne=ut.autoSize,Xe=ut.onResize,be=ut.className,ze=ut.style,Ie=ut.disabled,dt=ut.onChange,Ue=ut.onInternalAutoSize,qe=(0,ye.Z)(ut,ot),ke=(0,ve.Z)(le,{value:xe,postState:function(sn){return sn!=null?sn:""}}),et=(0,me.Z)(ke,2),it=et[0],oe=et[1],ee=function(sn){oe(sn.target.value),dt==null||dt(sn)},z=st.useRef();st.useImperativeHandle(Qe,function(){return{textArea:z.current}});var re=st.useMemo(function(){return Ne&&(0,_e.Z)(Ne)==="object"?[Ne.minRows,Ne.maxRows]:[]},[Ne]),ue=(0,me.Z)(re,2),ne=ue[0],ge=ue[1],je=!!Ne,Dt=function(){try{if(document.activeElement===z.current){var sn=z.current,Pn=sn.selectionStart,un=sn.selectionEnd,yn=sn.scrollTop;z.current.setSelectionRange(Pn,un),z.current.scrollTop=yn}}catch(tr){}},St=st.useState(We),yt=(0,me.Z)(St,2),xt=yt[0],Nt=yt[1],Lt=st.useState(),kt=(0,me.Z)(Lt,2),Rt=kt[0],Mt=kt[1],rn=function(){Nt(Wt)};(0,Me.Z)(function(){je&&rn()},[xe,ne,ge,je]),(0,Me.Z)(function(){if(xt===Wt)Nt(Ke);else if(xt===Ke){var Ut=at(z.current,!1,ne,ge);Nt(We),Mt(Ut)}else Dt()},[xt]);var Ot=st.useRef(),Jt=function(){De.Z.cancel(Ot.current)},ht=function(sn){xt===We&&(Xe==null||Xe(sn),Ne&&(Jt(),Ot.current=(0,De.Z)(function(){rn()})))};st.useEffect(function(){return Jt},[]);var cn=je?Rt:null,Ht=(0,Te.Z)((0,Te.Z)({},ze),cn);return(xt===Wt||xt===Ke)&&(Ht.overflowY="hidden",Ht.overflowX="hidden"),st.createElement(Le.Z,{onResize:ht,disabled:!(Ne||Xe)},st.createElement("textarea",(0,ae.Z)({},qe,{ref:z,style:Ht,className:Ze()(pe,be,(0,$e.Z)({},"".concat(pe,"-disabled"),Ie)),disabled:Ie,value:it,onChange:ee})))}),Ae=vt,Ge=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ee=st.forwardRef(function(Ye,Qe){var ut,pe=Ye.defaultValue,le=Ye.value,xe=Ye.onFocus,Ne=Ye.onBlur,Xe=Ye.onChange,be=Ye.allowClear,ze=Ye.maxLength,Ie=Ye.onCompositionStart,dt=Ye.onCompositionEnd,Ue=Ye.suffix,qe=Ye.prefixCls,ke=qe===void 0?"rc-textarea":qe,et=Ye.showCount,it=Ye.count,oe=Ye.className,ee=Ye.style,z=Ye.disabled,re=Ye.hidden,ue=Ye.classNames,ne=Ye.styles,ge=Ye.onResize,je=Ye.onClear,Dt=Ye.onPressEnter,St=Ye.readOnly,yt=Ye.autoSize,xt=Ye.onKeyDown,Nt=(0,ye.Z)(Ye,Ge),Lt=(0,ve.Z)(pe,{value:le,defaultValue:pe}),kt=(0,me.Z)(Lt,2),Rt=kt[0],Mt=kt[1],rn=Rt==null?"":String(Rt),Ot=st.useState(!1),Jt=(0,me.Z)(Ot,2),ht=Jt[0],cn=Jt[1],Ht=st.useRef(!1),Ut=st.useState(null),sn=(0,me.Z)(Ut,2),Pn=sn[0],un=sn[1],yn=(0,st.useRef)(null),tr=(0,st.useRef)(null),Gn=function(){var Yt;return(Yt=tr.current)===null||Yt===void 0?void 0:Yt.textArea},Xr=function(){Gn().focus()};(0,st.useImperativeHandle)(Qe,function(){var pt;return{resizableTextArea:tr.current,focus:Xr,blur:function(){Gn().blur()},nativeElement:((pt=yn.current)===null||pt===void 0?void 0:pt.nativeElement)||Gn()}}),(0,st.useEffect)(function(){cn(function(pt){return!z&&pt})},[z]);var jr=st.useState(null),xr=(0,me.Z)(jr,2),mr=xr[0],On=xr[1];st.useEffect(function(){if(mr){var pt;(pt=Gn()).setSelectionRange.apply(pt,(0,Re.Z)(mr))}},[mr]);var ir=(0,fe.Z)(it,et),Fr=(ut=ir.max)!==null&&ut!==void 0?ut:ze,Fn=Number(Fr)>0,nr=ir.strategy(rn),Vn=!!Fr&&nr>Fr,Lr=function(Yt,En){var jn=En;!Ht.current&&ir.exceedFormatter&&ir.max&&ir.strategy(En)>ir.max&&(jn=ir.exceedFormatter(En,{max:ir.max}),En!==jn&&On([Gn().selectionStart||0,Gn().selectionEnd||0])),Mt(jn),(0,tt.rJ)(Yt.currentTarget,Yt,Xe,jn)},an=function(Yt){Ht.current=!0,Ie==null||Ie(Yt)},fn=function(Yt){Ht.current=!1,Lr(Yt,Yt.currentTarget.value),dt==null||dt(Yt)},bn=function(Yt){Lr(Yt,Yt.target.value)},Mn=function(Yt){Yt.key==="Enter"&&Dt&&Dt(Yt),xt==null||xt(Yt)},$n=function(Yt){cn(!0),xe==null||xe(Yt)},or=function(Yt){cn(!1),Ne==null||Ne(Yt)},gr=function(Yt){Mt(""),Xr(),(0,tt.rJ)(Gn(),Yt,Xe)},_n=Ue,In;ir.show&&(ir.showFormatter?In=ir.showFormatter({value:rn,count:nr,maxLength:Fr}):In="".concat(nr).concat(Fn?" / ".concat(Fr):""),_n=st.createElement(st.Fragment,null,_n,st.createElement("span",{className:Ze()("".concat(ke,"-data-count"),ue==null?void 0:ue.count),style:ne==null?void 0:ne.count},In)));var Dr=function(Yt){var En;ge==null||ge(Yt),(En=Gn())!==null&&En!==void 0&&En.style.height&&un(!0)},Zt=!yt&&!et&&!be;return st.createElement(Ce.BaseInput,{ref:yn,value:rn,allowClear:be,handleReset:gr,suffix:_n,prefixCls:ke,classNames:(0,Te.Z)((0,Te.Z)({},ue),{},{affixWrapper:Ze()(ue==null?void 0:ue.affixWrapper,(0,$e.Z)((0,$e.Z)({},"".concat(ke,"-show-count"),et),"".concat(ke,"-textarea-allow-clear"),be))}),disabled:z,focused:ht,className:Ze()(oe,Vn&&"".concat(ke,"-out-of-range")),style:(0,Te.Z)((0,Te.Z)({},ee),Pn&&!Zt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof In=="string"?In:void 0}},hidden:re,readOnly:St,onClear:je},st.createElement(Ae,(0,ae.Z)({},Nt,{autoSize:yt,maxLength:ze,onKeyDown:Mn,onChange:bn,onFocus:$n,onBlur:or,onCompositionStart:an,onCompositionEnd:fn,className:Ze()(ue==null?void 0:ue.textarea),style:(0,Te.Z)((0,Te.Z)({},ne==null?void 0:ne.textarea),{},{resize:ee==null?void 0:ee.resize}),disabled:z,prefixCls:ke,onResize:Dr,ref:tr,readOnly:St})))}),Oe=Ee,mt=Oe},90472:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return Ye}});var ae=he(54476),$e=he(67732),Te=he(83652),Re=he(31226),me=he(42403),ye=he(158),Fe=he(20068),Ze=he(59301),Ce=he(33885),fe=he(75931),tt=he(76190),ve=he(75044),st=he(3202),_e=he(94480),Le=he(92310),Me=he.n(Le),De=he(26112),rt=he(48736),ct=function(Qe,ut){if(Qe&&ut){var pe=Array.isArray(ut)?ut:ut.split(","),le=Qe.name||"",xe=Qe.type||"",Ne=xe.replace(/\/.*$/,"");return pe.some(function(Xe){var be=Xe.trim();if(/^\*(\/\*)?$/.test(Xe))return!0;if(be.charAt(0)==="."){var ze=le.toLowerCase(),Ie=be.toLowerCase(),dt=[Ie];return(Ie===".jpg"||Ie===".jpeg")&&(dt=[".jpg",".jpeg"]),dt.some(function(Ue){return ze.endsWith(Ue)})}return/\/\*$/.test(be)?Ne===be.replace(/\/.*$/,""):xe===be?!0:/^\w+$/.test(be)?((0,rt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(be,"'.Skip for check.")),!0):!1})}return!0};function ft(Qe,ut){var pe="cannot ".concat(Qe.method," ").concat(Qe.action," ").concat(ut.status,"'"),le=new Error(pe);return le.status=ut.status,le.method=Qe.method,le.url=Qe.action,le}function lt(Qe){var ut=Qe.responseText||Qe.response;if(!ut)return ut;try{return JSON.parse(ut)}catch(pe){return ut}}function nt(Qe){var ut=new XMLHttpRequest;Qe.onProgress&&ut.upload&&(ut.upload.onprogress=function(Ne){Ne.total>0&&(Ne.percent=Ne.loaded/Ne.total*100),Qe.onProgress(Ne)});var pe=new FormData;Qe.data&&Object.keys(Qe.data).forEach(function(xe){var Ne=Qe.data[xe];if(Array.isArray(Ne)){Ne.forEach(function(Xe){pe.append("".concat(xe,"[]"),Xe)});return}pe.append(xe,Ne)}),Qe.file instanceof Blob?pe.append(Qe.filename,Qe.file,Qe.file.name):pe.append(Qe.filename,Qe.file),ut.onerror=function(Ne){Qe.onError(Ne)},ut.onload=function(){return ut.status<200||ut.status>=300?Qe.onError(ft(Qe,ut),lt(ut)):Qe.onSuccess(lt(ut),ut)},ut.open(Qe.method,Qe.action,!0),Qe.withCredentials&&"withCredentials"in ut&&(ut.withCredentials=!0);var le=Qe.headers||{};return le["X-Requested-With"]!==null&&ut.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(le).forEach(function(xe){le[xe]!==null&&ut.setRequestHeader(xe,le[xe])}),ut.send(pe),{abort:function(){ut.abort()}}}var at=function(){var Qe=(0,st.Z)((0,ve.Z)().mark(function ut(pe,le){var xe,Ne,Xe,be,ze,Ie,dt,Ue;return(0,ve.Z)().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:Ie=function(){return Ie=(0,st.Z)((0,ve.Z)().mark(function it(oe){return(0,ve.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.abrupt("return",new Promise(function(re){oe.file(function(ue){le(ue)?(oe.fullPath&&!ue.webkitRelativePath&&(Object.defineProperties(ue,{webkitRelativePath:{writable:!0}}),ue.webkitRelativePath=oe.fullPath.replace(/^\//,""),Object.defineProperties(ue,{webkitRelativePath:{writable:!1}})),re(ue)):re(null)})}));case 1:case"end":return z.stop()}},it)})),Ie.apply(this,arguments)},ze=function(it){return Ie.apply(this,arguments)},be=function(){return be=(0,st.Z)((0,ve.Z)().mark(function it(oe){var ee,z,re,ue,ne;return(0,ve.Z)().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:ee=oe.createReader(),z=[];case 2:return je.next=5,new Promise(function(Dt){ee.readEntries(Dt,function(){return Dt([])})});case 5:if(re=je.sent,ue=re.length,ue){je.next=9;break}return je.abrupt("break",12);case 9:for(ne=0;ne<ue;ne++)z.push(re[ne]);je.next=2;break;case 12:return je.abrupt("return",z);case 13:case"end":return je.stop()}},it)})),be.apply(this,arguments)},Xe=function(it){return be.apply(this,arguments)},xe=[],Ne=[],pe.forEach(function(et){return Ne.push(et.webkitGetAsEntry())}),dt=function(){var et=(0,st.Z)((0,ve.Z)().mark(function it(oe,ee){var z,re;return(0,ve.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(oe){ne.next=2;break}return ne.abrupt("return");case 2:if(oe.path=ee||"",!oe.isFile){ne.next=10;break}return ne.next=6,ze(oe);case 6:z=ne.sent,z&&xe.push(z),ne.next=15;break;case 10:if(!oe.isDirectory){ne.next=15;break}return ne.next=13,Xe(oe);case 13:re=ne.sent,Ne.push.apply(Ne,(0,_e.Z)(re));case 15:case"end":return ne.stop()}},it)}));return function(oe,ee){return et.apply(this,arguments)}}(),Ue=0;case 9:if(!(Ue<Ne.length)){ke.next=15;break}return ke.next=12,dt(Ne[Ue]);case 12:Ue++,ke.next=9;break;case 15:return ke.abrupt("return",xe);case 16:case"end":return ke.stop()}},ut)}));return function(pe,le){return Qe.apply(this,arguments)}}(),ot=at,Wt=+new Date,Ke=0;function We(){return"rc-upload-".concat(Wt,"-").concat(++Ke)}var vt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Ae=function(Qe){(0,me.Z)(pe,Qe);var ut=(0,ye.Z)(pe);function pe(){var le;(0,$e.Z)(this,pe);for(var xe=arguments.length,Ne=new Array(xe),Xe=0;Xe<xe;Xe++)Ne[Xe]=arguments[Xe];return le=ut.call.apply(ut,[this].concat(Ne)),(0,Fe.Z)((0,Re.Z)(le),"state",{uid:We()}),(0,Fe.Z)((0,Re.Z)(le),"reqs",{}),(0,Fe.Z)((0,Re.Z)(le),"fileInput",void 0),(0,Fe.Z)((0,Re.Z)(le),"_isMounted",void 0),(0,Fe.Z)((0,Re.Z)(le),"onChange",function(be){var ze=le.props,Ie=ze.accept,dt=ze.directory,Ue=be.target.files,qe=(0,_e.Z)(Ue).filter(function(ke){return!dt||ct(ke,Ie)});le.uploadFiles(qe),le.reset()}),(0,Fe.Z)((0,Re.Z)(le),"onClick",function(be){var ze=le.fileInput;if(ze){var Ie=be.target,dt=le.props.onClick;if(Ie&&Ie.tagName==="BUTTON"){var Ue=ze.parentNode;Ue.focus(),Ie.blur()}ze.click(),dt&&dt(be)}}),(0,Fe.Z)((0,Re.Z)(le),"onKeyDown",function(be){be.key==="Enter"&&le.onClick(be)}),(0,Fe.Z)((0,Re.Z)(le),"onFileDrop",function(){var be=(0,st.Z)((0,ve.Z)().mark(function ze(Ie){var dt,Ue,qe;return(0,ve.Z)().wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(dt=le.props.multiple,Ie.preventDefault(),Ie.type!=="dragover"){et.next=4;break}return et.abrupt("return");case 4:if(!le.props.directory){et.next=11;break}return et.next=7,ot(Array.prototype.slice.call(Ie.dataTransfer.items),function(it){return ct(it,le.props.accept)});case 7:Ue=et.sent,le.uploadFiles(Ue),et.next=14;break;case 11:qe=(0,_e.Z)(Ie.dataTransfer.files).filter(function(it){return ct(it,le.props.accept)}),dt===!1&&(qe=qe.slice(0,1)),le.uploadFiles(qe);case 14:case"end":return et.stop()}},ze)}));return function(ze){return be.apply(this,arguments)}}()),(0,Fe.Z)((0,Re.Z)(le),"uploadFiles",function(be){var ze=(0,_e.Z)(be),Ie=ze.map(function(dt){return dt.uid=We(),le.processFile(dt,ze)});Promise.all(Ie).then(function(dt){var Ue=le.props.onBatchStart;Ue==null||Ue(dt.map(function(qe){var ke=qe.origin,et=qe.parsedFile;return{file:ke,parsedFile:et}})),dt.filter(function(qe){return qe.parsedFile!==null}).forEach(function(qe){le.post(qe)})})}),(0,Fe.Z)((0,Re.Z)(le),"processFile",function(){var be=(0,st.Z)((0,ve.Z)().mark(function ze(Ie,dt){var Ue,qe,ke,et,it,oe,ee,z,re;return(0,ve.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(Ue=le.props.beforeUpload,qe=Ie,!Ue){ne.next=14;break}return ne.prev=3,ne.next=6,Ue(Ie,dt);case 6:qe=ne.sent,ne.next=12;break;case 9:ne.prev=9,ne.t0=ne.catch(3),qe=!1;case 12:if(qe!==!1){ne.next=14;break}return ne.abrupt("return",{origin:Ie,parsedFile:null,action:null,data:null});case 14:if(ke=le.props.action,typeof ke!="function"){ne.next=21;break}return ne.next=18,ke(Ie);case 18:et=ne.sent,ne.next=22;break;case 21:et=ke;case 22:if(it=le.props.data,typeof it!="function"){ne.next=29;break}return ne.next=26,it(Ie);case 26:oe=ne.sent,ne.next=30;break;case 29:oe=it;case 30:return ee=((0,tt.Z)(qe)==="object"||typeof qe=="string")&&qe?qe:Ie,ee instanceof File?z=ee:z=new File([ee],Ie.name,{type:Ie.type}),re=z,re.uid=Ie.uid,ne.abrupt("return",{origin:Ie,data:oe,parsedFile:re,action:et});case 35:case"end":return ne.stop()}},ze,null,[[3,9]])}));return function(ze,Ie){return be.apply(this,arguments)}}()),(0,Fe.Z)((0,Re.Z)(le),"saveFileInput",function(be){le.fileInput=be}),le}return(0,Te.Z)(pe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(xe){var Ne=this,Xe=xe.data,be=xe.origin,ze=xe.action,Ie=xe.parsedFile;if(this._isMounted){var dt=this.props,Ue=dt.onStart,qe=dt.customRequest,ke=dt.name,et=dt.headers,it=dt.withCredentials,oe=dt.method,ee=be.uid,z=qe||nt,re={action:ze,filename:ke,data:Xe,file:Ie,headers:et,withCredentials:it,method:oe||"post",onProgress:function(ne){var ge=Ne.props.onProgress;ge==null||ge(ne,Ie)},onSuccess:function(ne,ge){var je=Ne.props.onSuccess;je==null||je(ne,Ie,ge),delete Ne.reqs[ee]},onError:function(ne,ge){var je=Ne.props.onError;je==null||je(ne,ge,Ie),delete Ne.reqs[ee]}};Ue(be),this.reqs[ee]=z(re)}}},{key:"reset",value:function(){this.setState({uid:We()})}},{key:"abort",value:function(xe){var Ne=this.reqs;if(xe){var Xe=xe.uid?xe.uid:xe;Ne[Xe]&&Ne[Xe].abort&&Ne[Xe].abort(),delete Ne[Xe]}else Object.keys(Ne).forEach(function(be){Ne[be]&&Ne[be].abort&&Ne[be].abort(),delete Ne[be]})}},{key:"render",value:function(){var xe=this.props,Ne=xe.component,Xe=xe.prefixCls,be=xe.className,ze=xe.classNames,Ie=ze===void 0?{}:ze,dt=xe.disabled,Ue=xe.id,qe=xe.name,ke=xe.style,et=xe.styles,it=et===void 0?{}:et,oe=xe.multiple,ee=xe.accept,z=xe.capture,re=xe.children,ue=xe.directory,ne=xe.openFileDialogOnClick,ge=xe.onMouseEnter,je=xe.onMouseLeave,Dt=xe.hasControlInside,St=(0,fe.Z)(xe,vt),yt=Me()((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Xe,!0),"".concat(Xe,"-disabled"),dt),be,be)),xt=ue?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Nt=dt?{}:{onClick:ne?this.onClick:function(){},onKeyDown:ne?this.onKeyDown:function(){},onMouseEnter:ge,onMouseLeave:je,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Dt?void 0:"0"};return Ze.createElement(Ne,(0,ae.Z)({},Nt,{className:yt,role:Dt?void 0:"button",style:ke}),Ze.createElement("input",(0,ae.Z)({},(0,De.Z)(St,{aria:!0,data:!0}),{id:Ue,name:qe,disabled:dt,type:"file",ref:this.saveFileInput,onClick:function(kt){return kt.stopPropagation()},key:this.state.uid,style:(0,Ce.Z)({display:"none"},it.input),className:Ie.input,accept:ee},xt,{multiple:oe,onChange:this.onChange},z!=null?{capture:z}:{})),re)}}]),pe}(Ze.Component),Ge=Ae;function Ee(){}var Oe=function(Qe){(0,me.Z)(pe,Qe);var ut=(0,ye.Z)(pe);function pe(){var le;(0,$e.Z)(this,pe);for(var xe=arguments.length,Ne=new Array(xe),Xe=0;Xe<xe;Xe++)Ne[Xe]=arguments[Xe];return le=ut.call.apply(ut,[this].concat(Ne)),(0,Fe.Z)((0,Re.Z)(le),"uploader",void 0),(0,Fe.Z)((0,Re.Z)(le),"saveUploader",function(be){le.uploader=be}),le}return(0,Te.Z)(pe,[{key:"abort",value:function(xe){this.uploader.abort(xe)}},{key:"render",value:function(){return Ze.createElement(Ge,(0,ae.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(Ze.Component);(0,Fe.Z)(Oe,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ee,onError:Ee,onSuccess:Ee,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var mt=Oe,Ye=mt},48911:function(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return it}});var ae=he(54476),$e=he(76190),Te=he(33885),Re=he(20068),me=he(42978),ye=he(75931),Fe=he(92310),Ze=he.n(Fe),Ce=he(29301),fe=he(70425),tt=he(34280),ve=he(59301),st=he(4676),_e=ve.forwardRef(function(oe,ee){var z=oe.height,re=oe.offsetY,ue=oe.offsetX,ne=oe.children,ge=oe.prefixCls,je=oe.onInnerResize,Dt=oe.innerProps,St=oe.rtl,yt=oe.extra,xt={},Nt={display:"flex",flexDirection:"column"};return re!==void 0&&(xt={height:z,position:"relative",overflow:"hidden"},Nt=(0,Te.Z)((0,Te.Z)({},Nt),{},(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)({transform:"translateY(".concat(re,"px)")},St?"marginRight":"marginLeft",-ue),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:xt},ve.createElement(Ce.Z,{onResize:function(kt){var Rt=kt.offsetHeight;Rt&&je&&je()}},ve.createElement("div",(0,ae.Z)({style:Nt,className:Ze()((0,Re.Z)({},"".concat(ge,"-holder-inner"),ge)),ref:ee},Dt),ne,yt)))});_e.displayName="Filler";var Le=_e;function Me(oe){var ee=oe.children,z=oe.setRef,re=ve.useCallback(function(ue){z(ue)},[]);return ve.cloneElement(ee,{ref:re})}function De(oe,ee,z,re,ue,ne,ge,je){var Dt=je.getKey;return oe.slice(ee,z+1).map(function(St,yt){var xt=ee+yt,Nt=ge(St,xt,{style:{width:re},offsetX:ue}),Lt=Dt(St);return ve.createElement(Me,{key:Lt,setRef:function(Rt){return ne(St,Rt)}},Nt)})}function rt(oe,ee,z,re){var ue=z-oe,ne=ee-z,ge=Math.min(ue,ne)*2;if(re<=ge){var je=Math.floor(re/2);return re%2?z+je+1:z-je}return ue>ne?z-(re-ne):z+(re-ue)}function ct(oe,ee,z){var re=oe.length,ue=ee.length,ne,ge;if(re===0&&ue===0)return null;re<ue?(ne=oe,ge=ee):(ne=ee,ge=oe);var je={__EMPTY_ITEM__:!0};function Dt(kt){return kt!==void 0?z(kt):je}for(var St=null,yt=Math.abs(re-ue)!==1,xt=0;xt<ge.length;xt+=1){var Nt=Dt(ne[xt]),Lt=Dt(ge[xt]);if(Nt!==Lt){St=xt,yt=yt||Nt!==Dt(ge[xt+1]);break}}return St===null?null:{index:St,multiple:yt}}function ft(oe,ee,z){var re=ve.useState(oe),ue=(0,me.Z)(re,2),ne=ue[0],ge=ue[1],je=ve.useState(null),Dt=(0,me.Z)(je,2),St=Dt[0],yt=Dt[1];return ve.useEffect(function(){var xt=ct(ne||[],oe||[],ee);(xt==null?void 0:xt.index)!==void 0&&(z==null||z(xt.index),yt(oe[xt.index])),ge(oe)},[oe]),[St]}var lt=he(16089),nt=(typeof navigator=="undefined"?"undefined":(0,$e.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),at=nt,ot=function(oe,ee,z,re){var ue=(0,ve.useRef)(!1),ne=(0,ve.useRef)(null);function ge(){clearTimeout(ne.current),ue.current=!0,ne.current=setTimeout(function(){ue.current=!1},50)}var je=(0,ve.useRef)({top:oe,bottom:ee,left:z,right:re});return je.current.top=oe,je.current.bottom=ee,je.current.left=z,je.current.right=re,function(Dt,St){var yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,xt=Dt?St<0&&je.current.left||St>0&&je.current.right:St<0&&je.current.top||St>0&&je.current.bottom;return yt&&xt?(clearTimeout(ne.current),ue.current=!1):(!xt||ue.current)&&ge(),!ue.current&&xt}};function Wt(oe,ee,z,re,ue,ne,ge){var je=(0,ve.useRef)(0),Dt=(0,ve.useRef)(null),St=(0,ve.useRef)(null),yt=(0,ve.useRef)(!1),xt=ot(ee,z,re,ue);function Nt(Ot,Jt){if(lt.Z.cancel(Dt.current),!xt(!1,Jt)){var ht=Ot;if(!ht._virtualHandled)ht._virtualHandled=!0;else return;je.current+=Jt,St.current=Jt,at||ht.preventDefault(),Dt.current=(0,lt.Z)(function(){var cn=yt.current?10:1;ge(je.current*cn,!1),je.current=0})}}function Lt(Ot,Jt){ge(Jt,!0),at||Ot.preventDefault()}var kt=(0,ve.useRef)(null),Rt=(0,ve.useRef)(null);function Mt(Ot){if(oe){lt.Z.cancel(Rt.current),Rt.current=(0,lt.Z)(function(){kt.current=null},2);var Jt=Ot.deltaX,ht=Ot.deltaY,cn=Ot.shiftKey,Ht=Jt,Ut=ht;(kt.current==="sx"||!kt.current&&cn&&ht&&!Jt)&&(Ht=ht,Ut=0,kt.current="sx");var sn=Math.abs(Ht),Pn=Math.abs(Ut);kt.current===null&&(kt.current=ne&&sn>Pn?"x":"y"),kt.current==="y"?Nt(Ot,Ut):Lt(Ot,Ht)}}function rn(Ot){oe&&(yt.current=Ot.detail===St.current)}return[Mt,rn]}function Ke(oe,ee,z,re){var ue=ve.useMemo(function(){return[new Map,[]]},[oe,z.id,re]),ne=(0,me.Z)(ue,2),ge=ne[0],je=ne[1],Dt=function(yt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yt,Nt=ge.get(yt),Lt=ge.get(xt);if(Nt===void 0||Lt===void 0)for(var kt=oe.length,Rt=je.length;Rt<kt;Rt+=1){var Mt,rn=oe[Rt],Ot=ee(rn);ge.set(Ot,Rt);var Jt=(Mt=z.get(Ot))!==null&&Mt!==void 0?Mt:re;if(je[Rt]=(je[Rt-1]||0)+Jt,Ot===yt&&(Nt=Rt),Ot===xt&&(Lt=Rt),Nt!==void 0&&Lt!==void 0)break}return{top:je[Nt-1]||0,bottom:je[Lt]}};return Dt}var We=he(67732),vt=he(83652),Ae=function(){function oe(){(0,We.Z)(this,oe),(0,Re.Z)(this,"maps",void 0),(0,Re.Z)(this,"id",0),(0,Re.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,vt.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}(),Ge=Ae;function Ee(oe){var ee=parseFloat(oe);return isNaN(ee)?0:ee}function Oe(oe,ee,z){var re=ve.useState(0),ue=(0,me.Z)(re,2),ne=ue[0],ge=ue[1],je=(0,ve.useRef)(new Map),Dt=(0,ve.useRef)(new Ge),St=(0,ve.useRef)(0);function yt(){St.current+=1}function xt(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;yt();var kt=function(){var rn=!1;je.current.forEach(function(Ot,Jt){if(Ot&&Ot.offsetParent){var ht=Ot.offsetHeight,cn=getComputedStyle(Ot),Ht=cn.marginTop,Ut=cn.marginBottom,sn=Ee(Ht),Pn=Ee(Ut),un=ht+sn+Pn;Dt.current.get(Jt)!==un&&(Dt.current.set(Jt,un),rn=!0)}}),rn&&ge(function(Ot){return Ot+1})};if(Lt)kt();else{St.current+=1;var Rt=St.current;Promise.resolve().then(function(){Rt===St.current&&kt()})}}function Nt(Lt,kt){var Rt=oe(Lt),Mt=je.current.get(Rt);kt?(je.current.set(Rt,kt),xt()):je.current.delete(Rt),!Mt!=!kt&&(kt?ee==null||ee(Lt):z==null||z(Lt))}return(0,ve.useEffect)(function(){return yt},[]),[Nt,xt,Dt.current,ne]}var mt=14/15;function Ye(oe,ee,z){var re=(0,ve.useRef)(!1),ue=(0,ve.useRef)(0),ne=(0,ve.useRef)(0),ge=(0,ve.useRef)(null),je=(0,ve.useRef)(null),Dt,St=function(Lt){if(re.current){var kt=Math.ceil(Lt.touches[0].pageX),Rt=Math.ceil(Lt.touches[0].pageY),Mt=ue.current-kt,rn=ne.current-Rt,Ot=Math.abs(Mt)>Math.abs(rn);Ot?ue.current=kt:ne.current=Rt;var Jt=z(Ot,Ot?Mt:rn,!1,Lt);Jt&&Lt.preventDefault(),clearInterval(je.current),Jt&&(je.current=setInterval(function(){Ot?Mt*=mt:rn*=mt;var ht=Math.floor(Ot?Mt:rn);(!z(Ot,ht,!0)||Math.abs(ht)<=.1)&&clearInterval(je.current)},16))}},yt=function(){re.current=!1,Dt()},xt=function(Lt){Dt(),Lt.touches.length===1&&!re.current&&(re.current=!0,ue.current=Math.ceil(Lt.touches[0].pageX),ne.current=Math.ceil(Lt.touches[0].pageY),ge.current=Lt.target,ge.current.addEventListener("touchmove",St,{passive:!1}),ge.current.addEventListener("touchend",yt,{passive:!0}))};Dt=function(){ge.current&&(ge.current.removeEventListener("touchmove",St),ge.current.removeEventListener("touchend",yt))},(0,tt.Z)(function(){return oe&&ee.current.addEventListener("touchstart",xt,{passive:!0}),function(){var Nt;(Nt=ee.current)===null||Nt===void 0||Nt.removeEventListener("touchstart",xt),Dt(),clearInterval(je.current)}},[oe])}function Qe(oe){return Math.floor(Math.pow(oe,.5))}function ut(oe,ee){var z="touches"in oe?oe.touches[0]:oe;return z[ee?"pageX":"pageY"]-window[ee?"scrollX":"scrollY"]}function pe(oe,ee,z){ve.useEffect(function(){var re=ee.current;if(oe&&re){var ue=!1,ne,ge,je=function(){lt.Z.cancel(ne)},Dt=function Nt(){je(),ne=(0,lt.Z)(function(){z(ge),Nt()})},St=function(){ue=!1,je()},yt=function(Lt){if(!(Lt.target.draggable||Lt.button!==0)){var kt=Lt;kt._virtualHandled||(kt._virtualHandled=!0,ue=!0)}},xt=function(Lt){if(ue){var kt=ut(Lt,!1),Rt=re.getBoundingClientRect(),Mt=Rt.top,rn=Rt.bottom;if(kt<=Mt){var Ot=Mt-kt;ge=-Qe(Ot),Dt()}else if(kt>=rn){var Jt=kt-rn;ge=Qe(Jt),Dt()}else je()}};return re.addEventListener("mousedown",yt),re.ownerDocument.addEventListener("mouseup",St),re.ownerDocument.addEventListener("mousemove",xt),re.ownerDocument.addEventListener("dragend",St),function(){re.removeEventListener("mousedown",yt),re.ownerDocument.removeEventListener("mouseup",St),re.ownerDocument.removeEventListener("mousemove",xt),re.ownerDocument.removeEventListener("dragend",St),je()}}},[oe])}var le=10;function xe(oe,ee,z,re,ue,ne,ge,je){var Dt=ve.useRef(),St=ve.useState(null),yt=(0,me.Z)(St,2),xt=yt[0],Nt=yt[1];return(0,tt.Z)(function(){if(xt&&xt.times<le){if(!oe.current){Nt(function(ir){return(0,Te.Z)({},ir)});return}ne();var Lt=xt.targetAlign,kt=xt.originAlign,Rt=xt.index,Mt=xt.offset,rn=oe.current.clientHeight,Ot=!1,Jt=Lt,ht=null;if(rn){for(var cn=Lt||kt,Ht=0,Ut=0,sn=0,Pn=Math.min(ee.length-1,Rt),un=0;un<=Pn;un+=1){var yn=ue(ee[un]);Ut=Ht;var tr=z.get(yn);sn=Ut+(tr===void 0?re:tr),Ht=sn}for(var Gn=cn==="top"?Mt:rn-Mt,Xr=Pn;Xr>=0;Xr-=1){var jr=ue(ee[Xr]),xr=z.get(jr);if(xr===void 0){Ot=!0;break}if(Gn-=xr,Gn<=0)break}switch(cn){case"top":ht=Ut-Mt;break;case"bottom":ht=sn-rn+Mt;break;default:{var mr=oe.current.scrollTop,On=mr+rn;Ut<mr?Jt="top":sn>On&&(Jt="bottom")}}ht!==null&&ge(ht),ht!==xt.lastTop&&(Ot=!0)}Ot&&Nt((0,Te.Z)((0,Te.Z)({},xt),{},{times:xt.times+1,targetAlign:Jt,lastTop:ht}))}},[xt,oe.current]),function(Lt){if(Lt==null){je();return}if(lt.Z.cancel(Dt.current),typeof Lt=="number")ge(Lt);else if(Lt&&(0,$e.Z)(Lt)==="object"){var kt,Rt=Lt.align;"index"in Lt?kt=Lt.index:kt=ee.findIndex(function(Ot){return ue(Ot)===Lt.key});var Mt=Lt.offset,rn=Mt===void 0?0:Mt;Nt({times:0,index:kt,offset:rn,originAlign:Rt})}}}var Ne=ve.forwardRef(function(oe,ee){var z=oe.prefixCls,re=oe.rtl,ue=oe.scrollOffset,ne=oe.scrollRange,ge=oe.onStartMove,je=oe.onStopMove,Dt=oe.onScroll,St=oe.horizontal,yt=oe.spinSize,xt=oe.containerSize,Nt=oe.style,Lt=oe.thumbStyle,kt=oe.showScrollBar,Rt=ve.useState(!1),Mt=(0,me.Z)(Rt,2),rn=Mt[0],Ot=Mt[1],Jt=ve.useState(null),ht=(0,me.Z)(Jt,2),cn=ht[0],Ht=ht[1],Ut=ve.useState(null),sn=(0,me.Z)(Ut,2),Pn=sn[0],un=sn[1],yn=!re,tr=ve.useRef(),Gn=ve.useRef(),Xr=ve.useState(kt),jr=(0,me.Z)(Xr,2),xr=jr[0],mr=jr[1],On=ve.useRef(),ir=function(){kt===!0||kt===!1||(clearTimeout(On.current),mr(!0),On.current=setTimeout(function(){mr(!1)},3e3))},Fr=ne-xt||0,Fn=xt-yt||0,nr=ve.useMemo(function(){if(ue===0||Fr===0)return 0;var gr=ue/Fr;return gr*Fn},[ue,Fr,Fn]),Vn=function(_n){_n.stopPropagation(),_n.preventDefault()},Lr=ve.useRef({top:nr,dragging:rn,pageY:cn,startTop:Pn});Lr.current={top:nr,dragging:rn,pageY:cn,startTop:Pn};var an=function(_n){Ot(!0),Ht(ut(_n,St)),un(Lr.current.top),ge(),_n.stopPropagation(),_n.preventDefault()};ve.useEffect(function(){var gr=function(Zt){Zt.preventDefault()},_n=tr.current,In=Gn.current;return _n.addEventListener("touchstart",gr,{passive:!1}),In.addEventListener("touchstart",an,{passive:!1}),function(){_n.removeEventListener("touchstart",gr),In.removeEventListener("touchstart",an)}},[]);var fn=ve.useRef();fn.current=Fr;var bn=ve.useRef();bn.current=Fn,ve.useEffect(function(){if(rn){var gr,_n=function(Zt){var pt=Lr.current,Yt=pt.dragging,En=pt.pageY,jn=pt.startTop;lt.Z.cancel(gr);var Pe=tr.current.getBoundingClientRect(),Be=xt/(St?Pe.width:Pe.height);if(Yt){var Tt=(ut(Zt,St)-En)*Be,bt=jn;!yn&&St?bt-=Tt:bt+=Tt;var He=fn.current,wt=bn.current,Vt=wt?bt/wt:0,tn=Math.ceil(Vt*He);tn=Math.max(tn,0),tn=Math.min(tn,He),gr=(0,lt.Z)(function(){Dt(tn,St)})}},In=function(){Ot(!1),je()};return window.addEventListener("mousemove",_n,{passive:!0}),window.addEventListener("touchmove",_n,{passive:!0}),window.addEventListener("mouseup",In,{passive:!0}),window.addEventListener("touchend",In,{passive:!0}),function(){window.removeEventListener("mousemove",_n),window.removeEventListener("touchmove",_n),window.removeEventListener("mouseup",In),window.removeEventListener("touchend",In),lt.Z.cancel(gr)}}},[rn]),ve.useEffect(function(){return ir(),function(){clearTimeout(On.current)}},[ue]),ve.useImperativeHandle(ee,function(){return{delayHidden:ir}});var Mn="".concat(z,"-scrollbar"),$n={position:"absolute",visibility:xr?null:"hidden"},or={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return St?(Object.assign($n,{height:8,left:0,right:0,bottom:0}),Object.assign(or,(0,Re.Z)({height:"100%",width:yt},yn?"left":"right",nr))):(Object.assign($n,(0,Re.Z)({width:8,top:0,bottom:0},yn?"right":"left",0)),Object.assign(or,{width:"100%",height:yt,top:nr})),ve.createElement("div",{ref:tr,className:Ze()(Mn,(0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(Mn,"-horizontal"),St),"".concat(Mn,"-vertical"),!St),"".concat(Mn,"-visible"),xr)),style:(0,Te.Z)((0,Te.Z)({},$n),Nt),onMouseDown:Vn,onMouseMove:ir},ve.createElement("div",{ref:Gn,className:Ze()("".concat(Mn,"-thumb"),(0,Re.Z)({},"".concat(Mn,"-thumb-moving"),rn)),style:(0,Te.Z)((0,Te.Z)({},or),Lt),onMouseDown:an}))}),Xe=Ne,be=20;function ze(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=oe/ee*oe;return isNaN(z)&&(z=0),z=Math.max(z,be),Math.floor(z)}var Ie=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],dt=[],Ue={overflowY:"auto",overflowAnchor:"none"};function qe(oe,ee){var z=oe.prefixCls,re=z===void 0?"rc-virtual-list":z,ue=oe.className,ne=oe.height,ge=oe.itemHeight,je=oe.fullHeight,Dt=je===void 0?!0:je,St=oe.style,yt=oe.data,xt=oe.children,Nt=oe.itemKey,Lt=oe.virtual,kt=oe.direction,Rt=oe.scrollWidth,Mt=oe.component,rn=Mt===void 0?"div":Mt,Ot=oe.onScroll,Jt=oe.onVirtualScroll,ht=oe.onVisibleChange,cn=oe.innerProps,Ht=oe.extraRender,Ut=oe.styles,sn=oe.showScrollBar,Pn=sn===void 0?"optional":sn,un=(0,ye.Z)(oe,Ie),yn=ve.useCallback(function(It){return typeof Nt=="function"?Nt(It):It==null?void 0:It[Nt]},[Nt]),tr=Oe(yn,null,null),Gn=(0,me.Z)(tr,4),Xr=Gn[0],jr=Gn[1],xr=Gn[2],mr=Gn[3],On=!!(Lt!==!1&&ne&&ge),ir=ve.useMemo(function(){return Object.values(xr.maps).reduce(function(It,jt){return It+jt},0)},[xr.id,xr.maps]),Fr=On&&yt&&(Math.max(ge*yt.length,ir)>ne||!!Rt),Fn=kt==="rtl",nr=Ze()(re,(0,Re.Z)({},"".concat(re,"-rtl"),Fn),ue),Vn=yt||dt,Lr=(0,ve.useRef)(),an=(0,ve.useRef)(),fn=(0,ve.useRef)(),bn=(0,ve.useState)(0),Mn=(0,me.Z)(bn,2),$n=Mn[0],or=Mn[1],gr=(0,ve.useState)(0),_n=(0,me.Z)(gr,2),In=_n[0],Dr=_n[1],Zt=(0,ve.useState)(!1),pt=(0,me.Z)(Zt,2),Yt=pt[0],En=pt[1],jn=function(){En(!0)},Pe=function(){En(!1)},Be={getKey:yn};function Tt(It){or(function(jt){var dn;typeof It=="function"?dn=It(jt):dn=It;var qt=Or(dn);return Lr.current.scrollTop=qt,qt})}var bt=(0,ve.useRef)({start:0,end:Vn.length}),He=(0,ve.useRef)(),wt=ft(Vn,yn),Vt=(0,me.Z)(wt,1),tn=Vt[0];He.current=tn;var on=ve.useMemo(function(){if(!On)return{scrollHeight:void 0,start:0,end:Vn.length-1,offset:void 0};if(!Fr){var It;return{scrollHeight:((It=an.current)===null||It===void 0?void 0:It.offsetHeight)||0,start:0,end:Vn.length-1,offset:void 0}}for(var jt=0,dn,qt,xn,Jn=Vn.length,zt=0;zt<Jn;zt+=1){var Bt=Vn[zt],Qt=yn(Bt),nn=xr.get(Qt),Sn=jt+(nn===void 0?ge:nn);Sn>=$n&&dn===void 0&&(dn=zt,qt=jt),Sn>$n+ne&&xn===void 0&&(xn=zt),jt=Sn}return dn===void 0&&(dn=0,qt=0,xn=Math.ceil(ne/ge)),xn===void 0&&(xn=Vn.length-1),xn=Math.min(xn+1,Vn.length-1),{scrollHeight:jt,start:dn,end:xn,offset:qt}},[Fr,On,$n,Vn,mr,ne]),_t=on.scrollHeight,Kt=on.start,Et=on.end,gt=on.offset;bt.current.start=Kt,bt.current.end=Et,ve.useLayoutEffect(function(){var It=xr.getRecord();if(It.size===1){var jt=Array.from(It.keys())[0],dn=It.get(jt),qt=Vn[Kt];if(qt&&dn===void 0){var xn=yn(qt);if(xn===jt){var Jn=xr.get(jt),zt=Jn-ge;Tt(function(Bt){return Bt+zt})}}}xr.resetRecord()},[_t]);var Xt=ve.useState({width:0,height:ne}),pn=(0,me.Z)(Xt,2),vn=pn[0],mn=pn[1],Nn=function(jt){mn({width:jt.offsetWidth,height:jt.offsetHeight})},Kn=(0,ve.useRef)(),ar=(0,ve.useRef)(),Cn=ve.useMemo(function(){return ze(vn.width,Rt)},[vn.width,Rt]),Wn=ve.useMemo(function(){return ze(vn.height,_t)},[vn.height,_t]),Ln=_t-ne,sr=(0,ve.useRef)(Ln);sr.current=Ln;function Or(It){var jt=It;return Number.isNaN(sr.current)||(jt=Math.min(jt,sr.current)),jt=Math.max(jt,0),jt}var er=$n<=0,wr=$n>=Ln,Cr=In<=0,fr=In>=Rt,Yn=ot(er,wr,Cr,fr),Ar=function(){return{x:Fn?-In:In,y:$n}},cr=(0,ve.useRef)(Ar()),Xn=(0,fe.zX)(function(It){if(Jt){var jt=(0,Te.Z)((0,Te.Z)({},Ar()),It);(cr.current.x!==jt.x||cr.current.y!==jt.y)&&(Jt(jt),cr.current=jt)}});function yr(It,jt){var dn=It;jt?((0,st.flushSync)(function(){Dr(dn)}),Xn()):Tt(dn)}function Sr(It){var jt=It.currentTarget.scrollTop;jt!==$n&&Tt(jt),Ot==null||Ot(It),Xn()}var lr=function(jt){var dn=jt,qt=Rt?Rt-vn.width:0;return dn=Math.max(dn,0),dn=Math.min(dn,qt),dn},Un=(0,fe.zX)(function(It,jt){jt?((0,st.flushSync)(function(){Dr(function(dn){var qt=dn+(Fn?-It:It);return lr(qt)})}),Xn()):Tt(function(dn){var qt=dn+It;return qt})}),zn=Wt(On,er,wr,Cr,fr,!!Rt,Un),Mr=(0,me.Z)(zn,2),Gr=Mr[0],Jr=Mr[1];Ye(On,Lr,function(It,jt,dn,qt){var xn=qt;return Yn(It,jt,dn)?!1:!xn||!xn._virtualHandled?(xn&&(xn._virtualHandled=!0),Gr({preventDefault:function(){},deltaX:It?jt:0,deltaY:It?0:jt}),!0):!1}),pe(Fr,Lr,function(It){Tt(function(jt){return jt+It})}),(0,tt.Z)(function(){function It(dn){var qt=er&&dn.detail<0,xn=wr&&dn.detail>0;On&&!qt&&!xn&&dn.preventDefault()}var jt=Lr.current;return jt.addEventListener("wheel",Gr,{passive:!1}),jt.addEventListener("DOMMouseScroll",Jr,{passive:!0}),jt.addEventListener("MozMousePixelScroll",It,{passive:!1}),function(){jt.removeEventListener("wheel",Gr),jt.removeEventListener("DOMMouseScroll",Jr),jt.removeEventListener("MozMousePixelScroll",It)}},[On,er,wr]),(0,tt.Z)(function(){if(Rt){var It=lr(In);Dr(It),Xn({x:It})}},[vn.width,Rt]);var br=function(){var jt,dn;(jt=Kn.current)===null||jt===void 0||jt.delayHidden(),(dn=ar.current)===null||dn===void 0||dn.delayHidden()},Nr=xe(Lr,Vn,xr,ge,yn,function(){return jr(!0)},Tt,br);ve.useImperativeHandle(ee,function(){return{nativeElement:fn.current,getScrollInfo:Ar,scrollTo:function(jt){function dn(qt){return qt&&(0,$e.Z)(qt)==="object"&&("left"in qt||"top"in qt)}dn(jt)?(jt.left!==void 0&&Dr(lr(jt.left)),Nr(jt.top)):Nr(jt)}}}),(0,tt.Z)(function(){if(ht){var It=Vn.slice(Kt,Et+1);ht(It,Vn)}},[Kt,Et,Vn]);var Pr=Ke(Vn,yn,xr,ge),zr=Ht==null?void 0:Ht({start:Kt,end:Et,virtual:Fr,offsetX:In,offsetY:gt,rtl:Fn,getSize:Pr}),ii=De(Vn,Kt,Et,Rt,In,Xr,xt,Be),Ir=null;ne&&(Ir=(0,Te.Z)((0,Re.Z)({},Dt?"height":"maxHeight",ne),Ue),On&&(Ir.overflowY="hidden",Rt&&(Ir.overflowX="hidden"),Yt&&(Ir.pointerEvents="none")));var Tn={};return Fn&&(Tn.dir="rtl"),ve.createElement("div",(0,ae.Z)({ref:fn,style:(0,Te.Z)((0,Te.Z)({},St),{},{position:"relative"}),className:nr},Tn,un),ve.createElement(Ce.Z,{onResize:Nn},ve.createElement(rn,{className:"".concat(re,"-holder"),style:Ir,ref:Lr,onScroll:Sr,onMouseEnter:br},ve.createElement(Le,{prefixCls:re,height:_t,offsetX:In,offsetY:gt,scrollWidth:Rt,onInnerResize:jr,ref:an,innerProps:cn,rtl:Fn,extra:zr},ii))),Fr&&_t>ne&&ve.createElement(Xe,{ref:Kn,prefixCls:re,scrollOffset:$n,scrollRange:_t,rtl:Fn,onScroll:yr,onStartMove:jn,onStopMove:Pe,spinSize:Wn,containerSize:vn.height,style:Ut==null?void 0:Ut.verticalScrollBar,thumbStyle:Ut==null?void 0:Ut.verticalScrollBarThumb,showScrollBar:Pn}),Fr&&Rt>vn.width&&ve.createElement(Xe,{ref:ar,prefixCls:re,scrollOffset:In,scrollRange:Rt,rtl:Fn,onScroll:yr,onStartMove:jn,onStopMove:Pe,spinSize:Cn,containerSize:vn.width,horizontal:!0,style:Ut==null?void 0:Ut.horizontalScrollBar,thumbStyle:Ut==null?void 0:Ut.horizontalScrollBarThumb,showScrollBar:Pn}))}var ke=ve.forwardRef(qe);ke.displayName="List";var et=ke,it=et},93314:function(At){"use strict";At.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(At,Ft,he){"use strict";he.d(Ft,{Z:function(){return Ze}});const ae=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,$e=(Ce,fe)=>(!fe||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",Te=(Ce,fe)=>{if(Ce.clientHeight<Ce.scrollHeight||Ce.clientWidth<Ce.scrollWidth){const tt=getComputedStyle(Ce,null);return $e(tt.overflowY,fe)||$e(tt.overflowX,fe)||(ve=>{const st=(_e=>{if(!_e.ownerDocument||!_e.ownerDocument.defaultView)return null;try{return _e.ownerDocument.defaultView.frameElement}catch(Le){return null}})(ve);return!!st&&(st.clientHeight<ve.scrollHeight||st.clientWidth<ve.scrollWidth)})(Ce)}return!1},Re=(Ce,fe,tt,ve,st,_e,Le,Me)=>_e<Ce&&Le>fe||_e>Ce&&Le<fe?0:_e<=Ce&&Me<=tt||Le>=fe&&Me>=tt?_e-Ce-ve:Le>fe&&Me<tt||_e<Ce&&Me>tt?Le-fe+st:0,me=Ce=>{const fe=Ce.parentElement;return fe==null?Ce.getRootNode().host||null:fe},ye=(Ce,fe)=>{var tt,ve,st,_e;if(typeof document=="undefined")return[];const{scrollMode:Le,block:Me,inline:De,boundary:rt,skipOverflowHiddenElements:ct}=fe,ft=typeof rt=="function"?rt:Xe=>Xe!==rt;if(!ae(Ce))throw new TypeError("Invalid target");const lt=document.scrollingElement||document.documentElement,nt=[];let at=Ce;for(;ae(at)&&ft(at);){if(at=me(at),at===lt){nt.push(at);break}at!=null&&at===document.body&&Te(at)&&!Te(document.documentElement)||at!=null&&Te(at,ct)&&nt.push(at)}const ot=(ve=(tt=window.visualViewport)==null?void 0:tt.width)!=null?ve:innerWidth,Wt=(_e=(st=window.visualViewport)==null?void 0:st.height)!=null?_e:innerHeight,{scrollX:Ke,scrollY:We}=window,{height:vt,width:Ae,top:Ge,right:Ee,bottom:Oe,left:mt}=Ce.getBoundingClientRect(),{top:Ye,right:Qe,bottom:ut,left:pe}=(Xe=>{const be=window.getComputedStyle(Xe);return{top:parseFloat(be.scrollMarginTop)||0,right:parseFloat(be.scrollMarginRight)||0,bottom:parseFloat(be.scrollMarginBottom)||0,left:parseFloat(be.scrollMarginLeft)||0}})(Ce);let le=Me==="start"||Me==="nearest"?Ge-Ye:Me==="end"?Oe+ut:Ge+vt/2-Ye+ut,xe=De==="center"?mt+Ae/2-pe+Qe:De==="end"?Ee+Qe:mt-pe;const Ne=[];for(let Xe=0;Xe<nt.length;Xe++){const be=nt[Xe],{height:ze,width:Ie,top:dt,right:Ue,bottom:qe,left:ke}=be.getBoundingClientRect();if(Le==="if-needed"&&Ge>=0&&mt>=0&&Oe<=Wt&&Ee<=ot&&(be===lt&&!Te(be)||Ge>=dt&&Oe<=qe&&mt>=ke&&Ee<=Ue))return Ne;const et=getComputedStyle(be),it=parseInt(et.borderLeftWidth,10),oe=parseInt(et.borderTopWidth,10),ee=parseInt(et.borderRightWidth,10),z=parseInt(et.borderBottomWidth,10);let re=0,ue=0;const ne="offsetWidth"in be?be.offsetWidth-be.clientWidth-it-ee:0,ge="offsetHeight"in be?be.offsetHeight-be.clientHeight-oe-z:0,je="offsetWidth"in be?be.offsetWidth===0?0:Ie/be.offsetWidth:0,Dt="offsetHeight"in be?be.offsetHeight===0?0:ze/be.offsetHeight:0;if(lt===be)re=Me==="start"?le:Me==="end"?le-Wt:Me==="nearest"?Re(We,We+Wt,Wt,oe,z,We+le,We+le+vt,vt):le-Wt/2,ue=De==="start"?xe:De==="center"?xe-ot/2:De==="end"?xe-ot:Re(Ke,Ke+ot,ot,it,ee,Ke+xe,Ke+xe+Ae,Ae),re=Math.max(0,re+We),ue=Math.max(0,ue+Ke);else{re=Me==="start"?le-dt-oe:Me==="end"?le-qe+z+ge:Me==="nearest"?Re(dt,qe,ze,oe,z+ge,le,le+vt,vt):le-(dt+ze/2)+ge/2,ue=De==="start"?xe-ke-it:De==="center"?xe-(ke+Ie/2)+ne/2:De==="end"?xe-Ue+ee+ne:Re(ke,Ue,Ie,it,ee+ne,xe,xe+Ae,Ae);const{scrollLeft:St,scrollTop:yt}=be;re=Dt===0?0:Math.max(0,Math.min(yt+re/Dt,be.scrollHeight-ze/Dt+ge)),ue=je===0?0:Math.max(0,Math.min(St+ue/je,be.scrollWidth-Ie/je+ne)),le+=yt-re,xe+=St-ue}Ne.push({el:be,top:re,left:ue})}return Ne},Fe=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function Ze(Ce,fe){if(!Ce.isConnected||!(st=>{let _e=st;for(;_e&&_e.parentNode;){if(_e.parentNode===document)return!0;_e=_e.parentNode instanceof ShadowRoot?_e.parentNode.host:_e.parentNode}return!1})(Ce))return;const tt=(st=>{const _e=window.getComputedStyle(st);return{top:parseFloat(_e.scrollMarginTop)||0,right:parseFloat(_e.scrollMarginRight)||0,bottom:parseFloat(_e.scrollMarginBottom)||0,left:parseFloat(_e.scrollMarginLeft)||0}})(Ce);if((st=>typeof st=="object"&&typeof st.behavior=="function")(fe))return fe.behavior(ye(Ce,fe));const ve=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:st,top:_e,left:Le}of ye(Ce,Fe(fe))){const Me=_e-tt.top+tt.bottom,De=Le-tt.left+tt.right;st.scroll({top:Me,left:De,behavior:ve})}}}}]);
|