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

1105 lines
667 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[508],{2018:function(){"use strict"},40862:function(Yt,en){"use strict";en.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},75544: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 Yt={},en="5.0",de={},ie=null,et=!1,Le=!1,We=null,ve=!1,ze=null,Te=null,Ge=0;Ge<arguments.length;Ge++){var Ce=arguments[Ge];if(Ce!==null)switch(typeof Ce){case"number":en=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?en=Ce:We=Ce;break;case"object":typeof Ce.is3D!="undefined"?ie=Ce:de=Ce;break;case"boolean":et=Ce,Le=!0;break}}ie===null&&(ie={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},de.material_id!==void 0&&!Le&&(et=!0)),We!==null&&de.id===void 0&&(de.id=We);var pe="",ke="",xe=!1,wt=null,je=null,Re=null,He=!1,Ee=null,dt=null,ht=null,Lt=null,Et=null;de.height!==void 0&&(de.height=Math.round(de.height)),de.width!==void 0&&(de.width=Math.round(de.width));var pt=function(Fe){return parseFloat(Fe)>4?parseFloat(Fe):5};Yt.setHTML5Codebase=function(Fe,at){Te=Fe,Dt(Fe,at)},Yt.setJavaCodebase=Yt.setJavaCodebaseVersion=Yt.isCompiledInstalled=Yt.setPreCompiledScriptPath=Yt.setPreCompiledResourcePath=function(){},Yt.setHTML5CodebaseVersion=function(Fe,at){var st=parseFloat(Fe);if(st!==NaN&&st<5){console.log("The GeoGebra HTML5 codebase version "+st+" is deprecated. Using version latest instead.");return}ze=Fe,he(Fe,at)},Yt.getHTML5CodebaseVersion=function(){return je},Yt.getParameters=function(){return de},Yt.setFontsCSSURL=function(Fe){Lt=Fe},Yt.setGiacJSURL=function(Fe){},Yt.setJNLPFile=function(Fe){pe=Fe},Yt.setJNLPBaseDir=function(Fe){},Yt.inject=function(){function Fe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var at="auto",st=de.id,cn,Bt=!1,Ne=0;Ne<arguments.length;Ne++){var ye=arguments[Ne];typeof ye=="string"?(ye=ye.toLowerCase(),ye.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?at=ye:st=arguments[Ne]):typeof ye=="boolean"?Bt=ye:ye instanceof HTMLElement&&(cn=ye)}_e();function _e(){if(!ve){setTimeout(_e,200);return}at=nn(at);var lt=cn||document.getElementById(st);if(!lt){console.log("possibly bug on ajax loading? ");return}if(Yt.removeExistingApplet(lt,!1),de.width===void 0&&lt.clientWidth&&(de.width=lt.clientWidth),de.height===void 0&&lt.clientHeight&&(de.height=lt.clientHeight),!(de.width&&de.height)&&at==="html5"&&(delete de.width,delete de.height),wt=at,at==="screenshot")Ze(lt,de);else{var Me=!1;de.hasOwnProperty("playButton")&&de.playButton||de.hasOwnProperty("clickToLoad")&&de.clickToLoad?Me=!0:de.hasOwnProperty("playButtonAutoDecide")&&de.playButtonAutoDecide&&(Me=(!Ie()||Fe())&&mt()),Me?(wt="screenshot",Dn(lt,de,Bt,at)):rt(lt,de,Bt)}}};function Ie(){try{return window.self!==window.top}catch(Fe){return!0}}function mt(){return de.hasOwnProperty("screenshotGenerator")&&de.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Yt.getViews=function(){return ie},Yt.isJavaInstalled=function(){return!1};var qt=function(Fe){var at=function(Ne){var ye=JSON.parse(Ne),_e=function(Ue){return Ue.type=="G"||Ue.type=="E"},lt=ye.elements?ye.elements.filter(_e)[0]:ye;if(!lt||!lt.url){st();return}de.fileName=lt.url,Oe(lt.settings||{}),ie.is3D=!0;var Me="https://www.geogebra.org/images/";Yt.setPreviewImage(Ee||lt.previewUrl,Me+"GeoGebra_loading.png",Me+"applet_play.png"),Fe()},st=function(){de.onError&&de.onError(),un("Error: Fetching material (id "+de.material_id+") failed.",de)},cn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Bt="/materials/"+de.material_id+"?scope=basic";Qe("https://"+cn+"/api/proxy.php?path="+encodeURIComponent(Bt),at,st)};function Oe(Fe){var at=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(st){Fe[st]=!!Fe[st]}),at.forEach(function(st){de[st]===void 0&&Fe[st]!==void 0&&(de[st]=Fe[st])}),de.showToolBarHelp===void 0&&(de.showToolBarHelp=de.showToolBar)}function Qe(Fe,at,st){var cn=new XMLHttpRequest;cn.open("GET",Fe),cn.onload=function(){at(cn.responseText)},cn.onerror=st,cn.send()}Yt.isHTML5Installed=function(){return!0},Yt.getLoadedAppletType=function(){return wt},Yt.setPreviewImage=function(Fe,at,st){Ee=Fe,dt=at,ht=st},Yt.removeExistingApplet=function(Fe,at){var st;typeof Fe=="string"&&(Fe=document.getElementById(Fe)),wt=null;var cn=null;for(st=0;st<Fe.childNodes.length;st++){var Bt=Fe.childNodes[st],Ne=Bt.className;Ne==="applet_screenshot"?at?(Bt.style.display="block",wt="screenshot"):Bt.style.display="none":Ne!=="applet_scaler prerender"&&(Fe.removeChild(Bt),cn=Ne&&Ne.indexOf("appletParameters")!=-1?Bt.id:null,st--)}var ye=de.id!==void 0?de.id:cn,_e=window[ye];_e&&typeof _e.getBase64=="function"&&(_e.remove(),window[ye]=null)},Yt.refreshHitPoints=function(){if(pt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Fe=Yt.getAppletObject();return Fe&&typeof Fe.recalculateEnvironments=="function"?(Fe.recalculateEnvironments(),!0):!1},Yt.startAnimation=function(){var Fe=Yt.getAppletObject();return Fe&&typeof Fe.startAnimation=="function"?(Fe.startAnimation(),!0):!1},Yt.stopAnimation=function(){var Fe=Yt.getAppletObject();return Fe&&typeof Fe.stopAnimation=="function"?(Fe.stopAnimation(),!0):!1},Yt.getAppletObject=function(){var Fe=de.id!==void 0?de.id:"ggbApplet";return window[Fe]},Yt.resize=function(){};var Pt=function(Fe,at,st){var cn=document.createElement("param");cn.setAttribute("name",at),cn.setAttribute("value",st),Fe.appendChild(cn)},Pe=function(Fe){return Fe&&Fe!=="false"},rt=function(Fe,at,st){pt(je)<=4.2&&(st=!0);var cn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==je||ggbHTML5LoadedCodebaseIsWebSimple&&!He)&&(cn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Bt=document.createElement("div");Bt.classList.add("appletParameters","notranslate");var Ne=at.width,ye=at.height;if(at.disableAutoScale=at.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():at.disableAutoScale,at.width!==void 0)if(pt(je)<=4.4)Pe(at.showToolBar)&&(at.height-=7),Pe(at.showAlgebraInput)&&(at.height-=37),at.width<605&&Pe(at.showToolBar)&&(at.width=605,Ne=605);else{var _e=100;(Pe(at.showToolBar)||Pe(at.showMenuBar))&&(at.hasOwnProperty("customToolBar")&&(at.customToolbar=at.customToolBar),_e=Pe(at.showMenuBar)?245:155),Ne<_e&&(at.width=_e,Ne=_e)}Bt.style.border="none",Bt.style.display="inline-block";for(var lt in at)at.hasOwnProperty(lt)&&lt!=="appletOnLoad"&&Bt.setAttribute("data-param-"+lt,at[lt]);Lt&&Bt.setAttribute("data-param-fontscssurl",Lt),Yt.resize=function(){GGBAppletUtils.responsiveResize(Fe,at)},window.addEventListener("resize",function(ee){Yt.resize()});var Me=typeof at.appletOnLoad=="function"?at.appletOnLoad:function(){};if(!st&&at.width!==void 0){at.hasOwnProperty("showSplash")||Bt.setAttribute("data-param-showSplash","false");var Ue=Fe.querySelector(".applet_scaler.prerender"),it=Ue!==null;if(it)var ut=Ue.querySelector(".ggb_preview");else{var ut=Pn(Ne,ye,at.borderColor,!1);Ue=document.createElement("div"),Ue.className="applet_scaler",Ue.style.position="relative",Ue.style.display="block",Ue.style.width=Ne+"px",Ue.style.height=ye+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ue,"66%"),pt(je)>=5?(at.appletOnLoad=function(ee){var oe=Fe.querySelector(".ggb_preview");oe&&oe.parentNode.removeChild(oe),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ue),window.GGBT_wsf_view&&$(window).trigger("resize"),Me(ee)},it||Ue.appendChild(ut)):Bt.appendChild(ut),Ue.appendChild(Bt),it||Fe.appendChild(Ue),setTimeout(function(){Yt.resize()},1)}else{var yt=document.createElement("div");yt.className="applet_scaler",yt.style.position="relative",yt.style.display="block",yt.appendChild(Bt),Fe.appendChild(yt),at.appletOnLoad=function(ee){Yt.resize(),Me(ee)}}function xt(ee,oe){oe&&typeof oe.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ee,oe.appletOnLoad):renderGGBElement(ee),un("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",oe)}function At(ee,oe){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ee,params:oe}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ue){xt(ue.article,ue.params)}),html5AppletsToProcess=null)},pt(je)<5&&(ee.className+=" geogebraweb")):xt(ee,oe)}if(cn){scriptLoadStarted=!0;for(var Wt=0;Wt<Bt.childNodes.length;Wt++){var pn=Bt.childNodes[Wt].tagName;pn==="TABLE"&&(Bt.removeChild(Bt.childNodes[Wt]),Wt--)}if(ggbHTML5LoadedScript!==null){var tn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');tn!=null&&tn.parentNode.removeChild(tn)}var le=document.createElement("script"),te=function(){At(Bt,at)};le.src=ke+Re,ggbHTML5LoadedCodebaseIsWebSimple=He,ggbHTML5LoadedCodebaseVersion=je,ggbHTML5LoadedScript=le.src,un("GeoGebra HTML5 codebase loaded: '"+ke+"'.",at),!Te&&(!ze||ze=="5.0")?(He?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),te()):ke.requirejs?__webpack_require__.e(7989).then(function(){var ee=[__webpack_require__(87989)];te.apply(null,ee)}.bind(this)).catch(__webpack_require__.oe):(le.onload=te,Fe.appendChild(le))}else At(Bt,at);at.height=ye,at.width=Ne},Ze=function(Fe,at,st){var cn=Pn(at.width,at.height,at.borderColor,st),Bt=document.createElement("div");Bt.style.position="relative",Bt.style.display="block",Bt.style.width=at.width+"px",Bt.style.height=at.height+"px",Bt.className="applet_screenshot applet_scaler"+(st?" applet_screenshot_play":""),Bt.appendChild(cn);var Ne=GGBAppletUtils.getScale(at,Fe,st);st?(Fe.appendChild(Ot()),window.GGBT_wsf_view||(Fe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Bt,"66%"),Fe.appendChild(Bt),Ne!==1&&!isNaN(Ne)&&(GGBAppletUtils.scaleElement(Bt,Ne),Bt.style.width=at.width+"px",Bt.style.height=at.height+"px",Bt.parentNode.style.width=at.width*Ne+"px",Bt.parentNode.style.height=at.height*Ne+"px"),Yt.resize=function(){gt(Fe,cn,Bt,st)},window.addEventListener("resize",function(ye){Yt.resize()}),Yt.resize()};function gt(Fe,at,st,cn){if(Fe.contains(at)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Fe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Fe)}var Bt=GGBAppletUtils.getScale(de,Fe,cn);st.parentNode!==null&&(!isNaN(Bt)&&Bt!==1?(GGBAppletUtils.scaleElement(st,Bt),st.parentNode.style.width=de.width*Bt+"px",st.parentNode.style.height=de.height*Bt+"px"):(GGBAppletUtils.scaleElement(st,1),st.parentNode.style.width=de.width+"px",st.parentNode.style.height=de.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Fe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Yt.onExitFullscreen=function(Fe,at){at.appendChild(Fe)};var Dn=function(Fe,at,st,cn){Ze(Fe,at,!0);for(var Bt=function(){var _e=[];for(ye=0;ye<Fe.childNodes.length;ye++)_e.push(Fe.childNodes[ye]);if(window.GGBT_wsf_view){var lt=window.GGBT_wsf_view.renderFullScreen(Fe,at.id),Me=document.getElementById("fullscreencontainer"),Ue=jQuery(Fe).find(".fullscreencontent");Ue.length>0?(lt.remove(),Ue.attr("id","fullscreencontent").show(),jQuery(Me).append(Ue),window.dispatchEvent(new Event("resize"))):rt(lt,at,!1),window.GGBT_wsf_view.launchFullScreen(Me)}else wt=cn,rt(Fe,at,!1);if(!window.GGBT_wsf_view)for(ye=0;ye<_e.length;ye++)Fe.removeChild(_e[ye])},Ne=Fe.getElementsByClassName("ggb_preview_play"),ye=0;ye<Ne.length;ye++)Ne[ye].addEventListener("click",Bt,!1),Ne[ye].addEventListener("ontouchstart",Bt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Fe),mt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ot=function(){var Fe=document.createElement("div");if(Fe.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var at='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',st=document.createElement("style");st.styleSheet?st.styleSheet.cssText=at:st.appendChild(document.createTextNode(at)),document.getElementsByTagName("head")[0].appendChild(st)}return Fe},Pn=function(Fe,at,st,cn){var Bt=document.createElement("div");Bt.className="ggb_preview",Bt.style.position="absolute",Bt.style.zIndex="90",Bt.style.width=Fe-2+"px",Bt.style.height=at-2+"px",Bt.style.top="0px",Bt.style.left="0px",Bt.style.overflow="hidden",Bt.style.backgroundColor="white";var Ne="lightgrey";st!==void 0&&(st==="none"?Ne="transparent":Ne=st),Bt.style.border="1px solid "+Ne;var ye=document.createElement("img");if(ye.style.position="relative",ye.style.zIndex="1000",ye.style.top="-1px",ye.style.left="-1px",Ee!==null&&ye.setAttribute("src",Ee),ye.style.opacity=.7,dt!==null){var _e,lt,Me;if(!cn){_e=document.createElement("img"),_e.style.position="absolute",_e.style.zIndex="1001",_e.style.opacity=1,ye.style.opacity=.3,lt=360,lt>Fe/4*3&&(lt=Fe/4*3),Me=lt/5.8,_e.setAttribute("src",dt),_e.setAttribute("width",lt),_e.setAttribute("height",Me);var Ue=(Fe-lt)/2,it=(at-Me)/2;_e.style.left=Ue+"px",_e.style.top=it+"px",Bt.appendChild(_e)}}return Bt.appendChild(ye),Bt},nn=function(Fe){return Fe=Fe.toLowerCase(),Fe==="html5"||Fe==="screenshot"?Fe:"html5"},me=["web","webSimple","web3d","tablet","tablet3d","phone"],he=function(Fe,at){if(je=Fe,at){Dt(je,!0);return}var st=!et;if(st){var cn=pt(je);!isNaN(cn)&&cn<4.4&&(st=!1)}var Bt,Ne;window.location.protocol.substr(0,4)==="http"?Bt=window.location.protocol:Bt="http:";var ye=je.indexOf("//");ye>0?Ne=je:ye===0?Ne=Bt+je:Ne="https://www.geogebra.org/apps/5.2.814.0/";for(var _e in me)if(je.slice(me[_e].length*-1)===me[_e]||je.slice((me[_e].length+1)*-1)===me[_e]+"/"){Dt(Ne,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&st&&!ie.is3D&&!ie.AV&&!ie.SV&&!ie.CV&&!ie.EV2&&!ie.CP&&!ie.PC&&!ie.DA&&!ie.FI&&!ie.PV&&!Pe(de.showToolBar)&&!Pe(de.showMenuBar)&&!Pe(de.showAlgebraInput)&&!Pe(de.enableRightClick)&&(!de.appName||de.appName=="classic")?Ne+="webSimple/":Ne+="web3d/",Dt(Ne,!1)},Dt=function(Fe,at){if(Fe.requirejs){ke=Fe;return}Fe.slice(-1)!=="/"&&(Fe+="/"),ke=Fe,at===null&&(at=Fe.indexOf("http")===-1),xe=at,Re="web.nocache.js",He=!1;var st=ke.split("/");st.length>1&&(!at&&st[st.length-2]==="webSimple"?(Re="webSimple.nocache.js",He=!0):me.indexOf(st[st.length-2])>=0&&(Re=st[st.length-2]+".nocache.js")),st=Fe.split("/"),je=st[st.length-3],je.substr(0,4)==="test"?je=je.substr(4,1)+"."+je.substr(5,1):(je.substr(0,3)==="war"||je.substr(0,4)==="beta")&&(je="5.0");var cn=parseFloat(je);cn!==NaN&&cn<5&&Fe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+cn+" is deprecated. Using version latest instead."),he("5.0",at))},un=function(Fe,at){window.console&&window.console.log&&(!at||typeof at.showLogging=="undefined"||at.showLogging&&at.showLogging!=="false")&&console.log(Fe)};de.material_id!==void 0?qt(_t):_t();function _t(){var Fe=en;ze!==null?Fe=ze:parseFloat(Fe)<5&&(Fe="5.0"),he(Fe,!1),Te!==null&&Dt(Te,xe),ve=!0}return Yt},GGBAppletUtils=function(){"use strict";function Yt(){return window.GGBT_wsf_edit!==void 0}function en(ve,ze){ze!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+ze+","+ze+")",ve.style.webkitTransform="scale("+ze+","+ze+")",ve.style.maxWidth="initial",ve.querySelector(".ggb_preview")!==null&&(ve.querySelector(".ggb_preview").style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ve.style.transform="none",ve.style.webkitTransform="none")}function de(ve,ze,Te,Ge,Ce,pe){var ke=null;if(pe!=null&&pe!="")for(var xe=ve.parentNode;xe!=null;)if((" "+xe.className+" ").indexOf(" "+pe+" ")>-1){ke=xe;break}else xe=xe.parentNode;var wt=0,je=0,Re=0,He=0,Ee=0,dt=0,ht=0;if(ke)wt=ke.offsetWidth,je=Math.max(Ge?ke.offsetWidth:0,ke.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(wt=Math.min(window.innerWidth,document.documentElement.clientWidth),je=Math.min(window.innerHeight,document.documentElement.clientHeight),Re=wt):(wt=window.innerWidth,je=window.innerHeight,Re=window.innerWidth),ve){var Lt=ve.getBoundingClientRect();Lt.left>0&&Lt.left<=wt&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(Ee=wt-Lt.width-Lt.left,dt=Re<=480?10:30):(dt=Lt.left,Ee=Re<=480?10:30),He=dt+Ee)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Et=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(He=40,ht=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(He=0,ht=40)}}return ve&&((Te===void 0||!Te)&&ze>0&&ze+He<wt?wt=ze:wt-=He,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Te===void 0||!Te)&&(je-=ht)),{width:wt,height:je}}function ie(ve,ze,Te,Ge,Ce){if(ve.isScreenshoGenerator)return 1;var pe=Ge!==void 0&&Ge,ke=ve.noScaleMargin!=null&&ve.noScaleMargin,xe=function(Et){return Et&&Et!=="false"},wt=xe(ve.autoHeight),je=de(ze,ve.width,Te,wt,pe&&window.GGBT_wsf_view||ke,Ce),Re=parseInt(je.width),He=ve.width,Ee=ve.height;if(He===void 0){var dt=ze.querySelector(".appletParameters");dt&&(He=dt.offsetWidth,Ee=dt.offsetHeight)}var ht=Re/He,Lt=pe?1:je.height/Ee;return Te!==void 0&&!Te&&(ht=Math.min(1,ht),Lt=Math.min(1,Lt)),Math.min(ht,Lt)}function et(ve,ze,Te){var Ge=1,Ce,pe=!1;if(ve.hasOwnProperty("allowUpscale")&&(pe=ve.allowUpscale),ve.hasOwnProperty("scale")&&(Ge=parseFloat(ve.scale),(isNaN(Ge)||Ge===null||Ge===0)&&(Ge=1),Ge>1&&(pe=!0)),ze&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pe=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))Ce=ie(ve,ze,pe,Te,ve.scaleContainerClass);else return Ge;return pe&&(!ve.hasOwnProperty("scale")||Ge===1)?Ce:Math.min(Ge,Ce)}function Le(ve){var ze=Math.min(window.innerWidth,document.documentElement.clientWidth),Te=Math.min(window.innerHeight,document.documentElement.clientHeight),Ge=ve.getBoundingClientRect(),Ce=(ze-Ge.width)/2,pe=(Te-Ge.height)/2;pe<0&&(pe=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?ve.style.left="40px":ve.style.left=Ce+"px",ve.style.top=pe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(pe<40?ve.style.top="40px":ve.style.top=pe+"px",ve.style.left=Ce+"px")}function We(ve,ze){var Te=ve.querySelector(".appletParameters");if(Te){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ze.id!==Te.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(Te.parentElement&&/fullscreen/.test(Te.parentElement.className))return;var Ge=et(ze,ve);Yt()&&Te.setAttribute("data-param-scale",Ge);for(var Ce=null,pe=0;pe<ve.childNodes.length;pe++)if(ve.childNodes[pe].className!==void 0&&ve.childNodes[pe].className.match(/^applet_scaler/)){Ce=ve.childNodes[pe];break}if(Ce!==null&&Ce.querySelector(".noscale")!==null)return;var ke=ze.id!==void 0?ze.id:"ggbApplet",xe=window[ke];(xe==null||!xe.recalculateEnvironments)&&Ce!==null&&!Ce.className.match(/fullscreen/)&&(Ce.parentNode.style.transform="",!isNaN(Ge)&&Ge!==1?(Ce.parentNode.style.width=ze.width*Ge+"px",Ce.parentNode.style.height=ze.height*Ge+"px",en(Ce,Ge)):(en(Ce,1),Ce.parentNode.style.width=ze.width+"px",Ce.parentNode.style.height=ze.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Le(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Te).parents(".content-added-content"))}}return{responsiveResize:We,isFlexibleWorksheetEditor:Yt,positionCenter:Le,getScale:et,scaleElement:en}}();__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 Yt=n.location.search;return Yt.indexOf(J)!=-1||Yt.indexOf(K)!=-1}function q(Yt,en){}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(Yt){var en=s[L].bindings;s[L].bindings=function(){for(var de=en?en():{},ie=Yt[webModule.__softPermutationId],et=O;et<ie.length;et++){var Le=ie[et];de[Le[O]]=Le[P]}return de}};var t;function u(){return v(),t}function v(){if(!t){var Yt=o.createElement(Q);if(Yt.id=L,Yt.style.cssText=R+S,Yt.tabIndex=-1,o.body.appendChild(Yt),t=Yt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var en=document.compatMode==U?V:W;t.write(en+X),t.close()}}}function w(Yt){function en(ie){function et(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Le=et();if(Le){ie();return}function We(){if(!Le){if(!et())return;Le=!0,ie(),o.removeEventListener&&o.removeEventListener(Z,We,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,We,!1);var ve=setInterval(function(){We()},$)}function de(ie){var et=u(),Le=et.body,We=et.createElement(_);We.language=ab,We.crossOrigin=W,We.src=ie,webModule.__errFn&&(We.onerror=function(){webModule.__errFn(L,new Error(bb+ie))}),Le.appendChild(We)}en(function(){de(Yt)})}webModule.__startLoadingFragment=function(Yt){return C(Yt)},webModule.__installRunAsyncCode=function(Yt){var en=u(),de=en.body,ie=en.createElement(_);ie.language=ab,ie.text=Yt,de.appendChild(ie),de.removeChild(ie)};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(Yt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Yt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Yt){var en=c[Yt];return en==null?null:en},r=d,webModule.__errFn=e}function B(){function Yt(ve){var ze=ve.lastIndexOf(rb);ze==-1&&(ze=ve.length);var Te=ve.indexOf(sb);Te==-1&&(Te=ve.length);var Ge=ve.lastIndexOf(tb,Math.min(Te,ze));return Ge>=O?ve.substring(O,Ge+P):W}function en(ve){if(!ve.match(/^\w+:\/\//)){var ze=o.createElement(ub);ze.src=ve+vb,ve=Yt(ze.src)}return ve}function de(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function ie(){for(var ve=o.getElementsByTagName(_),ze=O;ze<ve.length;++ze)if(ve[ze].src.indexOf(xb)!=-1)return Yt(ve[ze].src);return W}function et(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function Le(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var We=de();return We==W&&(We=ie()),We==W&&(We=et()),We==W&&Le()&&(We=Yt(o.location.href)),We=en(We),We}function C(Yt){return Yt.match(/^\//)||Yt.match(/^[a-zA-Z]+:\/\//)?Yt:webModule.__moduleBase+Yt}function D(){var Yt=[],en=O,de=[],ie=[];function et(ve){var ze=ie[ve](),Te=de[ve];if(ze in Te)return ze;var Ge=[];for(var Ce in Te)Ge[Te[Ce]]=Ce;throw r&&r(ve,Ge,ze),null}if(__gwt_isKnownPropertyValue=function(ve,ze){return ze in de[ve]},webModule.__getPropMap=function(){var ve={};for(var ze in de)de.hasOwnProperty(ze)&&(ve[ze]=et(ze));return ve},webModule.__computePropValue=et,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Le;try{Le=Cb;var We=Le.indexOf(Db);We!=-1&&(en=parseInt(Le.substring(We+P),$),Le=Le.substring(O,We))}catch(ve){}return webModule.__softPermutationId=en,C(Le+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})()},52882:function(Yt,en,de){"use strict";de.d(en,{Ax:function(){return We},Ds:function(){return ve},KI:function(){return Te},SI:function(){return Le},f1:function(){return et}});var ie=de(26869);function et(Ge){let Ce=!0;if(Ge.length>0){for(let pe=0;pe<Ge.length;pe++)if(Ge[pe].compile_success==0||!Ge[pe].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function Le(Ge,Ce=""){let pe=[];for(let ke=0;ke<Ge.length;ke++){let xe=Ge[ke],wt=Ce?`${Ce}/${xe.name}`:`${xe.name}`;pe.push({title:xe.name,type:xe.type,isLeaf:xe.type!=="tree",key:wt})}return pe}function We(Ge,Ce,pe){for(let ke=0;ke<Ge.length;ke++){let xe=Ge[ke];if(xe.key===Ce){xe.children=pe;break}xe.children&&We(xe.children,Ce,pe)}return Ge}function ve(Ge,Ce,pe){let ke;return function(){let xe=this,wt=arguments,je=function(){ke=null,pe||Ge.apply(xe,wt)},Re=pe&&!ke;clearTimeout(ke),ke=setTimeout(je,Ce),Re&&Ge.apply(xe,wt)}}const ze=!0,Te=ie.Z.API_SERVER},1986:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return tn}});var ie=de(59301),et={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Le=de(92310),We=de.n(Le),ve=de(29787);var ze=function(le,te){return(ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,oe){ee.__proto__=oe}||function(ee,oe){for(var ue in oe)Object.prototype.hasOwnProperty.call(oe,ue)&&(ee[ue]=oe[ue])})(le,te)};function Te(le,te){function ee(){this.constructor=le}ze(le,te),le.prototype=te===null?Object.create(te):(ee.prototype=te.prototype,new ee)}function Ge(le,te,ee,oe){return new(ee||(ee=Promise))(function(ue,ne){function ce(Ye){try{Ve(oe.next(Ye))}catch(ge){ne(ge)}}function Be(Ye){try{Ve(oe.throw(Ye))}catch(ge){ne(ge)}}function Ve(Ye){var ge;Ye.done?ue(Ye.value):(ge=Ye.value,ge instanceof ee?ge:new ee(function(Mt){Mt(ge)})).then(ce,Be)}Ve((oe=oe.apply(le,te||[])).next())})}function Ce(le,te){var ee,oe,ue,ne,ce={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ne={next:Be(0),throw:Be(1),return:Be(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Be(Ve){return function(Ye){return function(ge){if(ee)throw new TypeError("Generator is already executing.");for(;ce;)try{if(ee=1,oe&&(ue=2&ge[0]?oe.return:ge[0]?oe.throw||((ue=oe.return)&&ue.call(oe),0):oe.next)&&!(ue=ue.call(oe,ge[1])).done)return ue;switch(oe=0,ue&&(ge=[2&ge[0],ue.value]),ge[0]){case 0:case 1:ue=ge;break;case 4:return ce.label++,{value:ge[1],done:!1};case 5:ce.label++,oe=ge[1],ge=[0];continue;case 7:ge=ce.ops.pop(),ce.trys.pop();continue;default:if(ue=ce.trys,!((ue=ue.length>0&&ue[ue.length-1])||ge[0]!==6&&ge[0]!==2)){ce=0;continue}if(ge[0]===3&&(!ue||ge[1]>ue[0]&&ge[1]<ue[3])){ce.label=ge[1];break}if(ge[0]===6&&ce.label<ue[1]){ce.label=ue[1],ue=ge;break}if(ue&&ce.label<ue[2]){ce.label=ue[2],ce.ops.push(ge);break}ue[2]&&ce.ops.pop(),ce.trys.pop();continue}ge=te.call(le,ce)}catch(Mt){ge=[6,Mt],oe=0}finally{ee=ue=0}if(5&ge[0])throw ge[1];return{value:ge[0]?ge[1]:void 0,done:!0}}([Ve,Ye])}}}function pe(){for(var le=0,te=0,ee=arguments.length;te<ee;te++)le+=arguments[te].length;var oe=Array(le),ue=0;for(te=0;te<ee;te++)for(var ne=arguments[te],ce=0,Be=ne.length;ce<Be;ce++,ue++)oe[ue]=ne[ce];return oe}var ke=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(te,ee){for(var oe=0,ue=ee;oe<ue.length;oe++){var ne=ue[oe],ce=ne[0],Be=ne[1];te.setAttribute(ce,Be)}},le.createRect=function(te,ee,oe){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",te.toString()),ue.setAttribute("height",ee.toString()),oe&&le.setAttributes(ue,oe),ue},le.createLine=function(te,ee,oe,ue,ne){var ce=document.createElementNS("http://www.w3.org/2000/svg","line");return ce.setAttribute("x1",te.toString()),ce.setAttribute("y1",ee.toString()),ce.setAttribute("x2",oe.toString()),ce.setAttribute("y2",ue.toString()),ne&&le.setAttributes(ce,ne),ce},le.createPolygon=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",te),ee&&le.setAttributes(oe,ee),oe},le.createCircle=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(te/2).toString()),oe.setAttribute("cy",(te/2).toString()),oe.setAttribute("r",te.toString()),ee&&le.setAttributes(oe,ee),oe},le.createEllipse=function(te,ee,oe){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(te/2).toString()),ue.setAttribute("cy",(ee/2).toString()),ue.setAttribute("rx",(te/2).toString()),ue.setAttribute("ry",(ee/2).toString()),oe&&le.setAttributes(ue,oe),ue},le.createGroup=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&le.setAttributes(ee,te),ee},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(te,ee,oe,ue,ne,ce,Be){var Ve=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(Ve,[["id",te],["orient",ee],["markerWidth",oe.toString()],["markerHeight",ue.toString()],["refX",ne.toString()],["refY",ce.toString()]]),Ve.appendChild(Be),Ve},le.createText=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),te&&le.setAttributes(ee,te),ee},le.createTSpan=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=te,ee&&le.setAttributes(oe,ee),oe},le.createImage=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&le.setAttributes(ee,te),ee},le.createPoint=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=te,oe.y=ee,oe},le.createPath=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",te),ee&&le.setAttributes(oe,ee),oe},le}(),xe=function(){function le(){}return le.addKey=function(te){le.key=te},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),wt=function(){function le(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return le.prototype.rasterize=function(te,ee,oe){var ue=this;return new Promise(function(ne){var ce=oe!==void 0?oe:document.createElement("canvas");te===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var Be=document.createElementNS("http://www.w3.org/2000/svg","svg");Be.setAttribute("xmlns","http://www.w3.org/2000/svg"),Be.setAttribute("width",ee.width.baseVal.valueAsString),Be.setAttribute("height",ee.height.baseVal.valueAsString),Be.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),Be.innerHTML=ee.innerHTML,ue.naturalSize===!0?(Be.width.baseVal.value=te.naturalWidth,Be.height.baseVal.value=te.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(Be.width.baseVal.value=ue.width,Be.height.baseVal.value=ue.height),ce.width=Be.width.baseVal.value,ce.height=Be.height.baseVal.value;var Ve=Be.outerHTML,Ye=ce.getContext("2d");ue.markersOnly!==!0&&Ye.drawImage(te,0,0,ce.width,ce.height);var ge=window.URL,Mt=new Image(ce.width,ce.height);Mt.setAttribute("crossOrigin","anonymous");var ct=new Blob([Ve],{type:"image/svg+xml"}),Ct=ge.createObjectURL(ct);Mt.onload=function(){Ye.drawImage(Mt,0,0),ge.revokeObjectURL(Ct);var Ht=ce.toDataURL(ue.imageType,ue.imageQuality);ne(Ht)},Mt.src=Ct})},le}(),je=function(){},Re=function(){function le(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.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(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function(te){return this.styleSheet===void 0&&this.addStyleSheet(),te.name=""+this.classNamePrefix+te.localName,this.classes.push(te),this.styleSheet.sheet.insertRule("."+te.name+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length),te},le.prototype.addRule=function(te){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(te),this.styleSheet.sheet.insertRule(te.selector+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var te;this.styleSheet=document.createElement("style"),((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).appendChild(this.styleSheet),this.addRule(new He("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new He("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new He("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Ee("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Ee("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},le.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),He=function(le,te){this.selector=le,this.style=te},Ee=function(le,te){this.localName=le,this.style=te},dt=function(){function le(te,ee,oe,ue,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=ee,this.markerItems=oe,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 le.prototype.show=function(te){var ee=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ne){var ce=document.createElement("div");ce.className=""+ee.toolbarButtonStyleClass.name,ce.setAttribute("data-type-name",ne.typeName),ce.innerHTML=ne.icon,ce.addEventListener("click",function(){ee.markerToolbarButtonClicked(ce,ne)}),ee.buttons.push(ce),ee.markerButtons.push(ce)}),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()},le.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},le.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},le.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},le.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ee=0;ee<this.markerButtons.length;ee++)ee<te||ee===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[ee]):(ee===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ee]))}},le.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")},le.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(ee){ee.className=ee.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),ee.className=ee.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},le.prototype.addActionButton=function(te,ee,oe){var ue=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=ee,ne.setAttribute("data-action",oe),ne.addEventListener("click",function(){ue.actionToolbarButtonClicked(ne,oe)}),oe){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ne),this.buttons.push(ne)},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ee("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 Ee("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ee("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Ee("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 Ee("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ee("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
padding: `+te+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ee("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ee("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new He("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new He("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},le.prototype.markerToolbarButtonClicked=function(te,ee){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(te,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",ee)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},le.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},le.prototype.setActiveMarkerButton=function(te){var ee=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===te});ee&&this.setActiveButton(ee)},le.prototype.setCurrentMarker=function(te){var ee=this;this.currentMarker=te,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){ee.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},le}(),ht=function(){function le(te,ee,oe,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=ee,this.uiStyleSettings=oe,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new Ee("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 Ee("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ee("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ee("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ee("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 Ee("toolbox-panel-row_colors",`
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ee("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
padding: `+ee+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ee("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ee("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},le.prototype.show=function(te){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(te){var ee,oe,ue=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var ce;ne.uiStyleSettings=ue.uiStyleSettings;var Be=document.createElement("div");Be.className=ue.toolboxButtonStyleClass.name+" "+((ce=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ce!==void 0?ce:ue.toolboxButtonStyleColorsClass.name),Be.innerHTML=ne.icon,Be.title=ne.title,Be.addEventListener("click",function(){ue.panelButtonClick(ne)}),ue.panelButtons.push(Be),ue.buttonRow.appendChild(Be)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(te){var ee=this,oe=-1;if(te!==this.activePanel){oe=this.panels.indexOf(te),this.panelRow.innerHTML="";var ue=te.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=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ce){var Be,Ve;ne.className=ee.toolboxButtonStyleClass.name+" "+(ce===oe?""+((Be=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Be!==void 0?Be:ee.toolboxActiveButtonStyleColorsClass.name):""+((Ve=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:ee.toolboxButtonStyleColorsClass.name))})},le}(),Lt=function(le,te){this.title=le,this.icon=te},Et=function(le){function te(ee,oe,ue,ne){var ce=le.call(this,ee,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 ce.colors=[],ce.addTransparent=!1,ce.colorBoxes=[],ce.colors=oe,ce.currentColor=ue,ce.setCurrentColor=ce.setCurrentColor.bind(ce),ce.getColorBox=ce.getColorBox.bind(ce),ce}return Te(te,le),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var ne=ee.getColorBox(ue);oe.appendChild(ne),ee.colorBoxes.push(ne)}),oe},te.prototype.getColorBox=function(ee){var oe=this,ue=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ue,ce=document.createElement("div");ce.style.display="inline-block",ce.style.boxSizing="content-box",ce.style.width=ne-2+"px",ce.style.height=ne-2+"px",ce.style.padding="1px",ce.style.marginRight="2px",ce.style.marginBottom="2px",ce.style.borderWidth="2px",ce.style.borderStyle="solid",ce.style.borderRadius=(ne+2)/2+"px",ce.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ce.addEventListener("click",function(){oe.setCurrentColor(ee,ce)});var Be=document.createElement("div");return Be.style.display="inline-block",Be.style.width=ne-2+"px",Be.style.height=ne-2+"px",Be.style.backgroundColor=ee,Be.style.borderRadius=ne/2+"px",ee==="transparent"&&(Be.style.fill=this.uiStyleSettings.toolboxAccentColor,Be.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>`),ce.appendChild(Be),ce},te.prototype.setCurrentColor=function(ee,oe){var ue=this;this.currentColor=ee,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},te}(Lt),pt=function(){function le(te,ee,oe){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=ee,this.globalSettings=oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(le.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(te){return!1},Object.defineProperty(le.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},le.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},le.prototype.pointerDown=function(te,ee){},le.prototype.dblClick=function(te,ee){},le.prototype.manipulate=function(te){},le.prototype.pointerUp=function(te){this.stateChanged()},le.prototype.dispose=function(){},le.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},le.prototype.getState=function(){return{typeName:le.typeName,state:this.state,notes:this.notes}},le.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},le.prototype.scale=function(te,ee){},le.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},le.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},le.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},le.typeName="MarkerBase",le}(),Ie=function(){function le(){this.findGripByVisual=this.findGripByVisual.bind(this)}return le.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},le}(),mt=function(){function le(){this.GRIP_SIZE=10,this.visual=ke.createGroup(),this.visual.appendChild(ke.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ke.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},le}(),qt=function(){function le(){}return le.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},le.toSVGMatrix=function(te,ee){return te.a=ee.a,te.b=ee.b,te.c=ee.c,te.d=ee.d,te.e=ee.e,te.f=ee.f,te},le}(),Oe=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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(ke.createTransform()),ne.setupControlBox(),ne}return Te(te,le),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(ee){this._visual=ee;var oe=ke.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!!le.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ue=this.unrotatePoint(ee);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(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){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 ce=this.container.transform.baseVal.getItem(0);ce.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ce,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(ee){var oe=this.state;le.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},te.prototype.manipulate=function(ee){var oe=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(ee)},te.prototype.resize=function(ee){var oe=this.manipulationStartLeft,ue=this.manipulationStartWidth,ne=this.manipulationStartTop,ce=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+ee.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=this.manipulationStartWidth+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+ee.y-this.manipulationStartY,ce=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ce=this.manipulationStartHeight+ee.y-this.manipulationStartY}ue>=0?(this.left=oe,this.width=ue):(this.left=oe+ue,this.width=-ue),ce>=0?(this.top=ne,this.height=ce):(this.top=ne+ce,this.height=-ce),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(ee){if(Math.abs(ee.x-this.centerX)>.1){var oe=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},te.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},te.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM(),ue=ke.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(oe)).x,y:ue.y}},te.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM();oe=oe.inverse();var ue=ke.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(oe)).x,y:ue.y}},te.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ke.createGroup();var ee=ke.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=ke.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=ke.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 Ie,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var ee=new mt;return ee.visual.transform.baseVal.appendItem(ke.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,oe=-ee/2,ue=oe,ne=(this.width+this.CB_DISTANCE)/2-ee/2,ce=(this.height+this.CB_DISTANCE)/2-ee/2,Be=this.height+this.CB_DISTANCE-ee/2,Ve=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,ue),this.positionGrip(this.controlGrips.topCenter.visual,ne,ue),this.positionGrip(this.controlGrips.topRight.visual,Ve,ue),this.positionGrip(this.controlGrips.centerLeft.visual,oe,ce),this.positionGrip(this.controlGrips.centerRight.visual,Ve,ce),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,Be),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Be),this.positionGrip(this.controlGrips.bottomRight.visual,Ve,Be),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ue-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(ee,oe,ue){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(oe,ue),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},le.prototype.getState.call(this))},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(qt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe);var ue=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ue.x*ee,y:ue.y*oe});this.left=ne.x,this.top=ne.y,this.width=this.width*ee,this.height=this.height*oe,this.adjustControlBox()},te}(pt),Qe=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Te(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=ke.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){le.prototype.setSize.call(this),ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this))},te.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize()},te.title="Rectangle marker",te}(Oe),Pt=function(le){function te(ee,oe,ue,ne){var ce=le.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ce.widths=[],ce.widthBoxes=[],ce.widths=oe,ce.currentWidth=ue,ce.setCurrentWidth=ce.setCurrentWidth.bind(ce),ce}return Te(te,le),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(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===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentWidth(ue,ne)}),oe.appendChild(ne);var ce=document.createElement("div");ce.innerText=ue.toString(),ce.style.marginRight="5px",ne.appendChild(ce);var Be=document.createElement("div");Be.style.minHeight="20px",Be.style.flexGrow="2",Be.style.display="flex",Be.style.alignItems="center";var Ve=document.createElement("hr");Ve.style.minWidth="20px",Ve.style.border="0px",Ve.style.borderTop=ue+"px solid "+ee.uiStyleSettings.toolboxColor,Ve.style.flexGrow="2",Be.appendChild(Ve),ne.appendChild(Be),ee.widthBoxes.push(ne)}),oe},te.prototype.setCurrentWidth=function(ee,oe){var ue=this;this.currentWidth=ee,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Lt),Pe=function(le){function te(ee,oe,ue,ne){var ce=le.call(this,ee,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 ce.styles=[],ce.styleBoxes=[],ce.styles=oe,ce.currentStyle=ue,ce.setCurrentStyle=ce.setCurrentStyle.bind(ce),ce}return Te(te,le),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(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/ee.styles.length-5+"%",ne.style.borderColor=ue===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentStyle(ue,ne)}),oe.appendChild(ne);var ce=document.createElement("div");ce.style.minHeight="20px",ce.style.flexGrow="2",ce.style.overflow="hidden";var Be=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ee.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ue!==""?'stroke-dasharray="'+ue+'"':"")+` />
</svg>`;ce.innerHTML=Be,ne.appendChild(ce),ee.styleBoxes.push(ne)}),oe},te.prototype.setCurrentStyle=function(ee,oe){var ue=this;this.currentStyle=ee,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Lt),rt=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,ue)||this;return ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Et("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Pt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Te(te,le),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(Qe),Ze=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},gt=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Te(te,le),te.prototype.ownsTarget=function(ee){return!!le.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(ee){var oe=this.state;le.prototype.pointerUp.call(this,ee),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},te.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ke.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var ee=new mt;return ee.visual.transform.baseVal.appendItem(ke.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},te.prototype.positionGrip=function(ee,oe,ue){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(oe,ue),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},le.prototype.getState.call(this))},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.x1=this.x1*ee,this.y1=this.y1*oe,this.x2=this.x2*ee,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},te}(pt),Dn=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Et("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Pt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Te(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=ke.createGroup(),this.selectorLine=ke.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ke.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ke.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ke.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ke.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(gt),Ot=function(le){function te(ee,oe,ue,ne){var ce=le.call(this,ee,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 ce.fonts=[],ce.fontBoxes=[],ce.fonts=oe,ce.currentFont=ue,ce.setCurrentFont=ce.setCurrentFont.bind(ce),ce}return Te(te,le),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.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/ee.fonts.length-5+"%",ne.style.borderColor=ue===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentFont(ue,ne)}),oe.appendChild(ne);var ce=document.createElement("div");ce.style.display="flex",ce.style.minHeight="20px",ce.style.flexGrow="2",ce.style.fontFamily=ue,ce.style.overflow="hidden";var Be=document.createElement("div");Be.style.whiteSpace="nowrap",Be.style.overflow="hidden",Be.style.textOverflow="ellipsis",Be.innerHTML="The quick brown fox jumps over the lazy dog",ce.appendChild(Be),ne.appendChild(ce),ee.fontBoxes.push(ne)}),oe},te.prototype.setCurrentFont=function(ee,oe){var ue=this;this.currentFont=ee,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Lt),Pn=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Et("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Te(te,le),te.prototype.ownsTarget=function(ee){if(le.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(ue){ue===ee&&(oe=!0)}),oe},te.prototype.createVisual=function(){this.visual=ke.createGroup(),this.bgRectangle=ke.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ke.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ke.createTransform()),this.textElement.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.renderText=function(){var ee=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(oe){ee.textElement.appendChild(ke.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),oe=1;if(ee.width>0&&ee.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/ee.width,ne=(1*this.height-this.height*this.padding*2/100)/ee.height;oe=Math.min(ue,ne)}return oe},te.prototype.getTextPosition=function(ee){var oe=this.textElement.getBBox(),ue=0,ne=0;return oe.width>0&&oe.height>0&&(ue=(this.width-oe.width*ee)/2,ne=this.height/2-oe.height*ee/2),{x:ue,y:ne}},te.prototype.sizeText=function(){var ee=this.textElement.getBBox(),oe=this.getTextScale(),ue=this.getTextPosition(oe);ue.y-=ee.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ke.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(ee){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,ee),this.setSize(),(oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,ee.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var ue=oe.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ue)),oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ee.textEditDivClicked(ee.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ee=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ue=this.textElement.getBBox(),ne={x:ue.width*ee,y:ue.height*ee};oe.x-=ne.x/2,oe.y-=ne.y/2,this.textEditor.style.top=oe.y+"px",this.textEditor.style.left=oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-oe.x+"px",this.textEditor.style.fontSize=Math.max(16*ee,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(ee){this.text=ee.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){le.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),le.prototype.deselect.call(this)},te.prototype.dblClick=function(ee,oe){le.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},te.prototype.setColor=function(ee){this.textElement&&ke.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},te.prototype.setFont=function(ee){this.textElement&&ke.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',te}(Oe),nn=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Et("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Pt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Te(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=ke.createGroup(),this.drawingImage=ke.createImage(),this.visual.appendChild(this.drawingImage);var ee=ke.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(ee.x,ee.y),this.drawing=!0):le.prototype.pointerDown.call(this,ee,oe)},te.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,ee)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),le.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),le.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var ee=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ue=oe[0],ne=oe[1],ce=oe[2],Be=oe[3],Ve=!1,Ye=0;Ye<this.canvasElement.height;Ye++)for(var ge=0;ge<this.canvasElement.width;ge++)ee.data[Ye*this.canvasElement.width*4+4*ge+3]>0&&(Ve=!0,Ye<ne&&(ne=Ye),ge<ue&&(ue=ge),Ye>Be&&(Be=Ye),ge>ce&&(ce=ge));if(Ve){this.left=ue/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ce-ue)/this.pixelRatio,this.height=(Be-ne)/this.pixelRatio;var Mt=document.createElement("canvas");Mt.width=ce-ue,Mt.height=Be-ne,Mt.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ne,ce-ue,Be-ne),0,0),this.drawingImgUrl=Mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ke.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},te.prototype.setLineWidth=function(ee){this.lineWidth=ee},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){this.createVisual(),le.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',te}(Oe),me=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,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=oe,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Te(te,le),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var ue=function(Be){var Ve="both";switch(Be){case 0:Ve="both";break;case 1:Ve="start";break;case 2:Ve="end";break;case 3:Ve="none"}var Ye=document.createElement("div");if(Ye.style.display="flex",Ye.style.flexGrow="2",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.borderColor=Ve===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){ee.setCurrentType(Ve,Ye)}),oe.appendChild(Ye),Ve==="both"||Ve==="start"){var ge=document.createElement("div");ge.style.display="flex",ge.style.alignItems="center",ge.style.minHeight="20px",ge.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>`,ge.style.marginLeft="5px",Ye.appendChild(ge)}var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.minHeight="20px",Mt.style.flexGrow="2";var ct=document.createElement("hr");if(ct.style.minWidth="20px",ct.style.border="0px",ct.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),ct.style.flexGrow="2",Mt.appendChild(ct),Ye.appendChild(Mt),Ve==="both"||Ve==="end"){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ct.style.marginRight="5px",Ye.appendChild(Ct)}ne.typeBoxes.push(Ye)},ne=this,ce=0;ce<4;ce++)ue(ce);return oe},te.prototype.setCurrentType=function(ee,oe){var ue=this;this.currentType=ee,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Lt),he=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 me("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Te(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},te.prototype.getArrowPoints=function(ee,oe){var ue=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return ee-ue/2+","+(oe+ne/2)+" "+ee+","+(oe-ne/2)+" "+(ee+ue/2)+","+(oe+ne/2)},te.prototype.createTips=function(){this.arrow1=ke.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ke.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(le.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",ke.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ke.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,0)}},te.prototype.setArrowType=function(ee){this.arrowType=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.arrowType=oe.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',te}(Dn),Dt=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,ue)||this;return ne.fillColor=ue.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Et("Color",ue.defaultColorSet,ue.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Te(te,le),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(Qe),un=function(le){function te(ee,oe,ue,ne){var ce=le.call(this,ee,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 ce.opacities=[],ce.opacityBoxes=[],ce.opacities=oe,ce.currentOpacity=ue,ce.setCurrentOpacity=ce.setCurrentOpacity.bind(ce),ce}return Te(te,le),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(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===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentOpacity(ue,ne)}),oe.appendChild(ne);var ce=document.createElement("div");ce.innerText=100*ue+"%",ne.appendChild(ce),ee.opacityBoxes.push(ne)}),oe},te.prototype.setCurrentOpacity=function(ee,oe){var ue=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Lt),_t=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,ue)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ue.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ue.defaultHighlightOpacity,ne.fillPanel=new Et("Color",ue.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new un("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Te(te,le),te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',te}(Dt),Fe='<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>',at='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',st=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Et("Text color",ue.defaultColorSet,ne.color,Fe),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Et("Fill color",ue.defaultColorSet,ne.bgColor,at),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new mt,ne.tipGrip.visual.transform.baseVal.appendItem(ke.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Te(te,le),te.prototype.ownsTarget=function(ee){return le.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},te.prototype.createTip=function(){ke.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ke.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(ee,oe){this.state==="new"&&le.prototype.pointerDown.call(this,ee,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):le.prototype.pointerDown.call(this,ee,oe)},te.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,ee);else{var oe=this.state==="creating";le.prototype.pointerUp.call(this,ee),this.setTipPoints(oe),this.positionTip()}},te.prototype.manipulate=function(ee){if(this.tipMoving){var oe=this.unrotatePoint(ee);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,ee)},te.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(ke.setAttributes(this.bgRectangle,[["fill",ee]]),ke.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(ee){ee===void 0&&(ee=!1);var oe=Math.min(this.height/2,15),ue=this.height/5;ee&&(this.tipPosition={x:oe+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,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+ue,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+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,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-ue,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+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,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-ue,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-ue},this.tipBase2Position={x:this.width,y:this.height-oe}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-ue})},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.positionTip()},te.prototype.positionTip=function(){ke.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ee=this.tipGrip.visual.transform.baseVal.getItem(0);ee.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ee,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),le.prototype.select.call(this)},te.prototype.getState=function(){var ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,le.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.tipPosition={x:this.tipPosition.x*ee,y:this.tipPosition.y*oe},this.positionTip()},te.typeName="CalloutMarker",te.title="Callout marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',te}(Pn),cn=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Et("Line color",pe(ue.defaultColorSet,["transparent"]),ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Et("Fill color",pe(ue.defaultColorSet,["transparent"]),ne.fillColor,at),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Pt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new un("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Te(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=ke.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){le.prototype.setSize.call(this),ke.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize()},te.typeName="EllipseMarker",te.title="Ellipse marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(Oe),Bt=function(le){function te(ee,oe,ue){return le.call(this,ee,oe,ue)||this}return Te(te,le),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},te.prototype.createTips=function(){this.tip1=ke.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(ke.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ke.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(ke.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ke.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()]]),ke.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,0);var ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',te}(Dn),Ne=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,ue)||this;return ne.strokePanel.colors=ue.defaultColorSet,ne.fillColor="transparent",ne}return Te(te,le),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(cn),ye=function(){function le(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),le.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},le.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},le.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},le.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},le.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},le}(),_e=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Et("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Pt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Te(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=ke.createGroup(),this.selectorCurve=ke.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ke.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ke.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ke.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ke.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=ke.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ke.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,le.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){le.prototype.positionGrips.call(this);var ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),le.prototype.resize.call(this,ee),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},te.prototype.scale=function(ee,oe){this.curveX=this.curveX*ee,this.curveY=this.curveY*oe,le.prototype.scale.call(this,ee,oe)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',te}(gt),lt=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,oe,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 Et("Line color",pe(ue.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Et("Fill color",pe(ue.defaultColorSet,["transparent"]),ne.fillColor,at),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Pt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Et("Text color",ue.defaultColorSet,ne.textColor,Fe),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Te(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},te.prototype.createVisual=function(){this.visual=ke.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ke.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ke.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=ke.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},te.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ke.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')"]]),ke.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(ee){this.captionElement&&ke.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(ee){this.captionElement&&ke.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){le.prototype.setSize.call(this),ke.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(ee,oe){le.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&ke.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&ke.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&ke.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&ke.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},le.prototype.getState.call(this));return ee.typeName=this.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',te}(Oe),Me=function(){function le(te,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=ee}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),Ue=function(le){function te(ee,oe,ue){var ne=le.call(this,ee,!1)||this;return ne.dataUrl=oe,ne.state=ue,ne}return Te(te,le),te}(Me),it=function(le){function te(ee,oe,ue){ue===void 0&&(ue=!1);var ne=le.call(this,ee,ue)||this;return ne.marker=oe,ne}return Te(te,le),te}(Me),ut=function(){function le(){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 le.prototype.addEventListener=function(te,ee){this[te].push(ee)},le.prototype.removeEventListener=function(te,ee){var oe=this[te].indexOf(ee);oe>-1&&this[te].splice(oe,1)},le}(),yt=function(){function le(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ze,this._isOpen=!1,this.undoRedoManager=new ye,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new ut,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new Re(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(le.prototype,"ALL_MARKER_TYPES",{get:function(){return[rt,nn,he,Pn,Ne,cn,_t,st,Bt,Dt,Dn,_e,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[rt,nn,he,Pn,cn,_t,st]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[rt,nn,he,Pn,_t]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var ee=this;this._availableMarkerTypes.splice(0),te.forEach(function(oe){if(typeof oe=="string"){var ue=ee.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===oe});ue!==void 0&&ee._availableMarkerTypes.push(ue)}else ee._availableMarkerTypes.push(oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),xe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&je.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=je.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new Me(te))})},le.prototype.render=function(){return Ge(this,void 0,void 0,function(){var te;return Ce(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(te=new wt).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ee.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},le.prototype.close=function(te){var ee=this;if(te===void 0&&(te=!1),this.isOpen){var oe=!1;te||this.eventListeners.beforeclose.forEach(function(ue){var ne=new Me(ee,!0);ue(ne),ne.defaultPrevented&&(oe=!0)}),oe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ue){return ue(new Me(ee))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var te,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];(te=this._availableMarkerTypes).push.apply(te,ee)},le.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(ee){te(ee.dataUrl,ee.state)})},le.prototype.removeRenderEventListener=function(te){},le.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},le.prototype.removeCloseEventListener=function(te){},le.prototype.setupResizeObserver=function(){var te=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){te.resize(te.target.clientWidth,te.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return te.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},le.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,ee=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,oe=ee<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(ee,oe)},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.prototype.resize=function(te,ee){this._isResizing=!0;var oe=te/this.imageWidth,ue=ee/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(ee),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(oe,ue),this._isResizing=!1},le.prototype.scaleMarkers=function(te,ee){var oe,ue=this;this._currentMarker&&this._currentMarker instanceof Pn?this._currentMarker.scale(te,ee):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ue._currentMarker&&ne.scale(te,ee)}),oe!==void 0&&this.setCurrentMarker(oe)},le.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"},le.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=te.left-ee.left,this.top=te.top-ee.top},le.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)},le.prototype.addDefs=function(){for(var te,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];this.defs=ke.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,ee)},le.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},le.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)},le.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},le.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},le.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)},le.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},le.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)},le.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var te=document.createElement("a");te.href="https://markerjs.com/",te.target="_blank",te.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',te.title="Powered by marker.js",te.style.display="grid",te.style.alignItems="center",te.style.justifyItems="center",te.style.padding="3px",te.style.width="20px",te.style.height="20px",this.logoUI.appendChild(te),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},le.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")},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var te=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new dt(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 ht(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},le.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},le.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())},le.prototype.toolbarButtonClicked=function(te,ee){if(te==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(te==="action")switch(ee){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},le.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var ne=new it(te,te._currentMarker,!0);ue(ne),ne.defaultPrevented&&(ee=!0)}),!ee){var oe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ue){return ue(new it(te,oe))})}}},le.prototype.clear=function(){var te=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ce){var Be=new it(te,void 0,!0);ce(Be),Be.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var oe=function(ce){var Be=ue.markers[ce];ue.setCurrentMarker(ue.markers[ce]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(Ve){return Ve(new it(te,Be))})},ue=this,ne=this.markers.length-1;ne>=0;ne--)oe(ne);this.addUndoStep()}},Object.defineProperty(le.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),le.prototype.showNotesEditor=function(){var te;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},le.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)},le.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},le.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ee=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===ee.width&&oe.height===ee.height){var ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new Me(te))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(ne){return ne(new Me(te))})}},le.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},le.prototype.undoStep=function(){var te=this,ee=this.undoRedoManager.undo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new Me(te))}))},le.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},le.prototype.redoStep=function(){var te=this,ee=this.undoRedoManager.redo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new Me(te))}))},le.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},le.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},le.prototype.startRenderAndClose=function(){return Ge(this,void 0,void 0,function(){var te,ee,oe=this;return Ce(this,function(ue){switch(ue.label){case 0:return[4,this.render()];case 1:return te=ue.sent(),ee=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Ue(oe,te,ee))}),this.close(!0),[2]}})})},le.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var ee={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return ee.markers.push(oe.getState())}),ee},le.prototype.restoreState=function(te){var ee=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(oe){var ue=ee._availableMarkerTypes.find(function(ce){return ce.typeName===oe.typeName});if(ue!==void 0){var ne=ee.addNewMarker(ue);ne.restoreState(oe),ee.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(oe){return oe(new Me(ee))})},le.prototype.addNewMarker=function(te){var ee=ke.createGroup();return this.markerImage.appendChild(ee),new te(ee,this.overlayContainer,this.settings)},le.prototype.createNewMarker=function(te){var ee,oe=this;(ee=typeof te=="string"?this._availableMarkerTypes.find(function(ue){return ue.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ee),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(ee.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ue){return ue(new it(oe,oe._currentMarker))}))},le.prototype.markerCreated=function(te){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof nn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(nn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new it(ee,ee._currentMarker))})},le.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},le.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},le.prototype.markerStateChanged=function(te){var ee=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new it(ee,te))})},le.prototype.setCurrentMarker=function(te){var ee=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(oe){return oe(new it(ee,ee._currentMarker))})),this._currentMarker=te,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(oe){return oe(new it(ee,ee._currentMarker))}))},le.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ee=this.markers.find(function(oe){return oe.ownsTarget(te.target)});ee!==void 0?(this.setCurrentMarker(ee),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},le.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var ee=this.markers.find(function(oe){return oe.ownsTarget(te.target)});ee!==void 0&&ee!==this._currentMarker&&this.setCurrentMarker(ee),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},le.prototype.onPointerMove=function(te){this.touchPoints!==1&&te.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||te.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(te.clientX,te.clientY)):this.zoomLevel>1&&this.panTo({x:te.clientX,y:te.clientY}))},le.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},le.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},le.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},le.prototype.clientToLocalCoordinates=function(te,ee){var oe=this.markerImage.getBoundingClientRect();return{x:(te-oe.left)/this.zoomLevel,y:(ee-oe.top)/this.zoomLevel}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},le.prototype.addLicenseKey=function(te){xe.addKey(te)},le.prototype.addEventListener=function(te,ee){this.eventListeners.addEventListener(te,ee)},le.prototype.removeEventListener=function(te,ee){this.eventListeners.removeEventListener(te,ee)},le.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(le.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),le.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ee){return ee(new Me(te))}))},le.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ee){return ee(new Me(te))}))},le.instanceCounter=0,le}(),xt=de(97013),At=de(31735),Wt=(le,te,ee)=>new Promise((oe,ue)=>{var ne=Ve=>{try{Be(ee.next(Ve))}catch(Ye){ue(Ye)}},ce=Ve=>{try{Be(ee.throw(Ve))}catch(Ye){ue(Ye)}},Be=Ve=>Ve.done?oe(Ve.value):Promise.resolve(Ve.value).then(ne,ce);Be((ee=ee.apply(le,te)).next())}),tn=({data:le,className:te,fullWidth:ee,style:oe={},onClose:ue,onOk:ne,showFullTools:ce,noAssociationId:Be})=>{const Ve=(0,ie.useRef)(null),Ye=(0,ie.useRef)(null),ge=(0,ie.useRef)(null),Mt=(0,ie.useRef)(null),[ct,Ct]=(0,ie.useState)(!1),[Ht,dn]=(0,ie.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ie.useEffect)(()=>(ge.current||(ge.current=document.createElement("style"),document.head.appendChild(ge.current)),le!=null&&le.visible?(document.body.setAttribute("data-custom","y-hidden"),ge.current.innerHTML=" html { overflow-y: hidden; }",le!=null&&le.src&&zt()):(document.body.removeAttribute("data-custom"),ge.current&&(document.head.removeChild(ge.current),ge.current=null)),()=>{document.body.removeAttribute("data-custom"),ge.current&&(document.head.removeChild(ge.current),ge.current=null)}),[le==null?void 0:le.visible]);const zt=()=>Wt(void 0,null,function*(){Ct(!0),dn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const jn=yield(0,At.ZJ)(le==null?void 0:le.src);Ve.current.src="",Ve.current.src=jn,Ve.current.onload=function(){Tn()},Ct(!1),dn("")}),bn=jn=>Wt(void 0,null,function*(){Ct(!0),dn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const zn=yield(0,xt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:le.title,file:jn.dataUrl}});zn!=null&&zn.id&&!Be?(yield(0,xt.ZP)(`/api/attachments/${le.id}/add_subitem.json`,{method:"post",body:{subitem_id:zn==null?void 0:zn.id,settings:JSON.stringify(jn.state)}})).status===0&&ne():zn!=null&&zn.id&&ne(zn),Ct(!1),dn("")}),Nn=()=>{const jn=document.querySelector('a[href="https://markerjs.com/"]');jn&&jn.parentNode&&(jn.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(Hn=>{const Un=document.querySelector(Hn.name);Un&&Un.setAttribute("title",Hn.title)})},Tn=()=>{Ye.current=new yt(Ve.current),Ye.current.targetRoot=Mt.current,Ye.current.addEventListener("render",bn),Ye.current.addEventListener("beforeclose",ue),ce&&(Ye.current.availableMarkerTypes=Ye.current.ALL_MARKER_TYPES,Ye.current.uiStyleSettings.redoButtonVisible=!0,Ye.current.uiStyleSettings.notesButtonVisible=!0,Ye.current.uiStyleSettings.zoomButtonVisible=!0,Ye.current.uiStyleSettings.zoomOutButtonVisible=!0,Ye.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ye.current.uiStyleSettings,Ye.current.show(),le!=null&&le.snapshotData&&Ye.current.restoreState(le.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Nn()},300)};return ie.createElement(ie.Fragment,null,(le==null?void 0:le.visible)&&ie.createElement(ve.Z,{spinning:ct,tip:Ht,style:{position:"absolute",width:"100vw"}},ie.createElement("div",{ref:Mt,className:We()(et.imageDimensions,te,ee?et.fullWidth:""),style:oe},ie.createElement("img",{className:et.img,ref:Ve}))))}},50047:function(Yt,en,de){"use strict";var ie=de(59301),et=de(77019),Le=de(5269),We=de(20554),ve=de(7939),ze=de(59944),Te=de(40862),Ge=de(48136),Ce=de(59301);const pe=(0,ie.forwardRef)(({callback:ke,showSaveButton:xe,value:wt=""},je)=>{const Re=(0,ie.useRef)(),He=[{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 "}]}]}],Ee=[{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}`}]}]}],dt=Et=>{Re.current.setValue(Re.current.getValue()+" "+Et.value+" ")},ht=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(et.Z,{className:Te.Z.lists,gutter:[10,10]},He.map((Et,pt)=>Ce.createElement(Le.Z,{flex:"110px",className:Te.Z.item},Ce.createElement("div",null,Ce.createElement(ze.Z,{value:`$$${Et.value}$$`}),Et.name),Ce.createElement("div",{className:Te.Z.children},Et.children.map((Ie,mt)=>Ce.createElement("div",{key:mt},Ce.createElement("h1",null,Ie.name),Ce.createElement(et.Z,{gutter:[10,10]},Ie.data.map((qt,Oe)=>Ce.createElement(Le.Z,{key:Oe,onClick:()=>dt(qt),className:Te.Z.diamond},Ce.createElement(ze.Z,{value:"`$$"+qt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(et.Z,{className:Te.Z.lists,gutter:[10,10]},Ee.map((Et,pt)=>Ce.createElement(Le.Z,{flex:"110px",className:Te.Z.item},Ce.createElement("div",null,Ce.createElement(ze.Z,{value:"`$$"+Et.value+"$$`"}),Et.name),Ce.createElement("div",{className:Te.Z.children},Et.children.map((Ie,mt)=>Ce.createElement("div",{key:mt},Ie.name&&Ce.createElement("h1",null,Ie.name),Ce.createElement(et.Z,{gutter:[10,10]},Ie.data.map((qt,Oe)=>Ce.createElement(Le.Z,{key:Oe,onClick:()=>dt(qt),className:Te.Z.diamond},Ce.createElement(ze.Z,{value:"`$$"+qt.value+"$$`"}))))))))))}],Lt=()=>{var Et=document.createElement("div");Et.innerHTML=Re.current.getValue();var pt=Et.innerText;return ke&&ke(pt),pt};return(0,ie.useImperativeHandle)(je,()=>({getData:Lt})),Ce.createElement("div",{className:Te.Z.mathWrap},Ce.createElement(We.default,{defaultActiveKey:"1",items:ht}),Ce.createElement("math-field",{locale:"zh_cn",className:Te.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Re,style:{width:800,marginTop:30,fontSize:18}},wt||""),xe&&Ce.createElement("div",{className:Te.Z.button},Ce.createElement(ve.ZP,{size:"large",onClick:Lt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});en.Z=pe},59243:function(Yt,en,de){"use strict";var ie=de(59301),et=de(93314),Le=de(7939),We=Object.defineProperty,ve=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,pe=(je,Re,He)=>Re in je?We(je,Re,{enumerable:!0,configurable:!0,writable:!0,value:He}):je[Re]=He,ke=(je,Re)=>{for(var He in Re||(Re={}))Ge.call(Re,He)&&pe(je,He,Re[He]);if(Te)for(var He of Te(Re))Ce.call(Re,He)&&pe(je,He,Re[He]);return je},xe=(je,Re)=>ve(je,ze(Re));const wt=({img:je,buttonProps:Re={},styles:He={},customText:Ee,ButtonText:dt,ButtonClick:ht,Buttonclass:Lt,ButtonTwo:Et,imgStyles:pt,loading:Ie=!1,className:mt=""})=>ie.createElement("section",{className:`tc animated fadeIn ${mt}`,style:ke({color:"#999",margin:"100px auto",visibility:Ie?"hidden":"visible"},He)},ie.createElement("img",{src:je||et,style:xe(ke({},pt),{pointerEvents:"none",userSelect:"none"})}),ie.createElement("p",{className:"mt20 font14"},Ee||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),dt&&ie.createElement(Le.ZP,ke({className:Lt,onClick:ht},Re),dt),Et&&Et);en.Z=wt},47199:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return Lt}});var ie=de(59301),et={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Le=de(7939),We=de(70557),ve=de(58478),ze=de(25399),Te=de(31735),Ge=de(22167),Ce=de(59243),pe=de(26869),ke=de(38609),xe=de(59301),wt=Object.defineProperty,je=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ee=(Et,pt,Ie)=>pt in Et?wt(Et,pt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Et[pt]=Ie,dt=(Et,pt)=>{for(var Ie in pt||(pt={}))Re.call(pt,Ie)&&Ee(Et,Ie,pt[Ie]);if(je)for(var Ie of je(pt))He.call(pt,Ie)&&Ee(Et,Ie,pt[Ie]);return Et},ht=(Et,pt,Ie)=>new Promise((mt,qt)=>{var Oe=Pe=>{try{Pt(Ie.next(Pe))}catch(rt){qt(rt)}},Qe=Pe=>{try{Pt(Ie.throw(Pe))}catch(rt){qt(rt)}},Pt=Pe=>Pe.done?mt(Pe.value):Promise.resolve(Pe.value).then(Oe,Qe);Pt((Ie=Ie.apply(Et,pt)).next())}),Lt=({editOffice:Et="view",data:pt,issaver:Ie,onSaver:mt,theme:qt,type:Oe,filename:Qe,monacoEditor:Pt,className:Pe,style:rt,close:Ze,onClose:gt,hasMask:Dn,disabledDownload:Ot,onImgDimensions:Pn,showNodata:nn,recordInfo:me})=>{const[he,Dt]=(0,ie.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[un,_t]=(0,ie.useState)(""),[Fe,at]=(0,ie.useState)(),st=window.ENV==="build"?"/react/build":"",cn=location.host.startsWith("localhost")?pe.Z.PROXY_SERVER:pe.Z.API_SERVER,Ne=10*(1024*1024),ye=(0,ie.useRef)();pt!=null&&pt.startsWith("/api")&&Oe!=="txt"&&(pt=pe.Z.API_SERVER+pt);const _e=ut=>ut.substring(ut.lastIndexOf("/")+1).split(".").pop();Qe&&Pt&&(Pt.filename=Qe),(0,ie.useEffect)(()=>{var ut,yt;const xt=(yt=(ut=document.cookie)==null?void 0:ut.replace(/\s/g,""))==null?void 0:yt.split(";");xt==null||xt.map(At=>{let Wt=At.split("=");Wt[0]==="_educoder_session"&&_t(Wt[1])})},[]),(0,ie.useEffect)(()=>{Oe==="office"&&(pt.indexOf("bigfilescdn.")>-1||pt.indexOf("bigfiles1")>-1?at({url:pt,fileType:_e(pt),model:pt.indexOf("model=edit")?"edit":"view"}):Me())},[Oe,pt]);function lt(ut){return ht(this,null,function*(){ut.data.type==="pdfdata"&&(mt(ut.data.data),window.removeEventListener("message",lt,!1)),console.log("mess---:",ut.data)})}const Me=()=>ht(void 0,null,function*(){console.log("data:",pt);let ut=pt;pt.startsWith("http")||(ut=location.origin+ut);let yt=new URL(ut).pathname.split("/").pop();const xt=yield(0,Ge.gJ)({attachment_id:yt});xt.url=cn+xt.url,at(xt)}),Ue=()=>{if(pt.startsWith("http")||pt.startsWith("blob:")){it();return}(0,Te.Sv)(Qe||"educoder",pt,Qe)},it=()=>{me&&(0,ke.fc)({id:me==null?void 0:me.id,watch_type:1,course_id:me==null?void 0:me.course_id}),(0,Te.Nd)(Qe||"educoder",decodeURIComponent(pt))};return xe.createElement("div",{style:dt({},rt||{}),className:`${Dn&&et.bgBlack} ${Oe?et.wrp:"hide"}`},Ze&&xe.createElement("div",{className:et.close,ref:ye},!!Pn&&xe.createElement(ze.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ye.current},xe.createElement("span",{onClick:()=>{gt(),Pn()}},xe.createElement("i",{className:"icon-yulanpizhu"}))),!Ot&&xe.createElement(ze.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ye.current},xe.createElement("span",{onClick:it},xe.createElement("i",{className:"icon-quxiaozhiding"}))),Ie&&xe.createElement(ze.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ye.current},xe.createElement("span",{className:"",onClick:()=>{const ut=document.getElementById("pdfiframe");window.addEventListener("message",lt,!1),setTimeout(()=>{ut.contentWindow.postMessage("getData","*")},300)}},xe.createElement("i",{className:"icon-baocun"}))),xe.createElement(ze.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ye.current},xe.createElement("span",{className:"",onClick:()=>{gt()}},xe.createElement("i",{className:"icon-guanbi1"})))),xe.createElement("div",{className:`${et[Pe]} ${Pe} ${et.monaco} ${Oe==="txt"?"show":"hide"}`},Oe==="txt"&&xe.createElement(xe.Fragment,null,xe.createElement(ve.ZP,dt({},Pt)))),Oe==="audio"&&xe.createElement("audio",{src:`${(pt==null?void 0:pt.indexOf("http://"))>-1||(pt==null?void 0:pt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${pt}`,autoPlay:!0}),Oe==="video"&&xe.createElement(xe.Fragment,null,(pt==null?void 0:pt.indexOf("http"))>-1?xe.createElement("video",{controls:!0,src:`${pt}`,autoPlay:!0}):xe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${pt}`,autoPlay:!0})),Oe==="office"&&Fe&&xe.createElement("iframe",{src:`${st}/office.html?key=${Fe.key}&url=${btoa(Fe.url)}&callbackUrl=${cn+(Fe.callbackUrl||"")}&fileType=${Fe.fileType}&title=${Fe.title||""}&model=${Et}&officeServer=${pe.Z.ONLYOFFICE}&disabledDownload=${!!Ot}`}),Oe==="html"&&xe.createElement("iframe",{src:pt+"&disposition=inline"}),Oe==="pdf"&&Ie&&xe.createElement("iframe",{id:"pdfiframe",src:`${st}/js/pdfview/index.html?filename=${Qe||"educoder.pdf"}&url=${encodeURIComponent(pt)}&disabledDownload=${!!Ot}&model=${Et}`}),Oe==="pdf"&&!Ie&&xe.createElement("embed",{className:et.embed,src:pt+"#toolbar=0&statusbar=0&navpanes=0&scrollbars=0"}),Oe==="image"&&xe.createElement("img",{src:`${(pt==null?void 0:pt.indexOf("http://"))>-1||(pt==null?void 0:pt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${pt}`}),(Oe==="other"||Oe==="download")&&xe.createElement(xe.Fragment,null,nn?xe.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:xe.createElement(Le.ZP,{icon:xe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ue,disabled:Ot},"\u4E0B\u8F7D")}):xe.createElement(Le.ZP,{type:"primary",size:"middle",onClick:Ue,disabled:Ot},xe.createElement(We.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Oe==="flowChart"&&xe.createElement("div",{className:"embed"},xe.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${pt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},59944:function(Yt,en,de){"use strict";de.d(en,{z:function(){return Pt},Z:function(){return Pe}});var ie=de(59301),et=de(54196),Le=de(58489),We=de(64018),ve=de(80360),ze=de(26869),Te=de(31735),Ge=de(15342),Ce=de(44104),pe=de(7939),ke=de(1012),xe=de(47199),wt=de(59301),Re=({html:rt})=>{const Ze=(0,ie.useRef)(null),gt=(0,ie.useRef)(null),Dn=`.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,ie.useEffect)(()=>{const Ot=Ze.current.attachShadow({mode:"open"});gt.current=document.createElement("div"),gt.current.className="markdown-body",gt.current.innerHTML=rt,Ot.appendChild(gt.current);const Pn=document.createElement("style");return Pn.textContent=Dn,Ot.appendChild(Pn),()=>{Ot.innerHTML=""}},[]),(0,ie.useEffect)(()=>{gt.current&&(gt.current.innerHTML=rt)},[rt]),wt.createElement("div",{ref:Ze})};function He(rt){const Ze=["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"],gt=new RegExp(`\\b(${Ze.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return rt.replace(gt,"").trim()}var Ee={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},dt=Object.defineProperty,ht=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,pt=(rt,Ze,gt)=>Ze in rt?dt(rt,Ze,{enumerable:!0,configurable:!0,writable:!0,value:gt}):rt[Ze]=gt,Ie=(rt,Ze)=>{for(var gt in Ze||(Ze={}))Lt.call(Ze,gt)&&pt(rt,gt,Ze[gt]);if(ht)for(var gt of ht(Ze))Et.call(Ze,gt)&&pt(rt,gt,Ze[gt]);return rt};const mt="@\u2581\u2581@",qt="@\u2581@",Oe=/<pre[^>]*>/g;function Qe(rt){let Ze=document.createElement("div");return Ze.innerHTML=rt,Ze.childNodes.length===0?"":Ze.childNodes[0].nodeValue}const Pt=(rt,Ze)=>{rt=rt||"";const gt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Dn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ot=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Pn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ze?rt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(gt,(nn,me,he,Dt,un,_t,Fe)=>{const at=me||Dt||_t,st=he||un||Fe||"?";return ze.Z.API_SERVER+"/api/attachments/"+at+st+"&t="+(0,Te.Jn)(at,Date.now())+(nn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(rt=rt.replace(Pn,(nn,me,he,Dt,un,_t,Fe)=>{const at=me||Dt||_t,st=he||un||Fe||"?";return ze.Z.API_SERVER+"/attachments/download/"+at+st+"&t="+(0,Te.Jn)(at,Date.now())+(nn.indexOf(")")>-1?")":"&")}).replace(gt,(nn,me,he,Dt,un,_t,Fe)=>{const at=me||Dt||_t,st=he||un||Fe||"?";return ze.Z.API_SERVER+"/api/attachments/"+at+st+"&t="+(0,Te.Jn)(at,Date.now())+(nn.indexOf(")")>-1?")":"&")}).replace(Dn,(nn,me,he,Dt,un)=>{const _t=me||Dt,Fe=he||un||"";return'"'+ze.Z.API_SERVER+"/api/attachments/"+_t+Fe+_t+Fe+"&t="+(0,Te.Jn)(_t,Date.now())}).replace(Ot,(nn,me,he,Dt,un)=>{const _t=me||Dt,Fe=he||un||"";return"("+ze.Z.API_SERVER+"/files/uploads/"+_t+Fe+_t+Fe+"&t="+(0,Te.Jn)(_t,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,`
`),rt)};var Pe=({value:rt="",edit:Ze=!1,className:gt,showTextOnly:Dn,showLines:Ot,style:Pn={},stylesPrev:nn={},highlightKeywords:me,showProgramFill:he,isProgramFill:Dt,disabledFill:un=!1,programFillValue:_t,openEditor:Fe=()=>{},onFillChange:at=Bt=>{},onFillBlur:st=()=>{},onFillFocus:cn=()=>{}})=>{let Bt=He(String(rt||""));const Ne=(0,ie.useRef)(),ye=(0,ie.useRef)(),[_e,lt]=(0,ie.useState)(""),[Me,Ue]=(0,ie.useState)("office"),[it,ut]=(0,ie.useState)([]),yt=(0,ie.useRef)("a"+(0,ke.Z)()),xt={},At=ge=>/<style[\s\S]*?>/i.test(ge||""),Wt=(ge,Mt,ct)=>{const Ct=document.createElement(ge===qt?"input":"textarea");Ct.style.width="100%",Ct.style.height=ge===qt?"40px":"151px",Ct.rows=5,Ct.spellcheck=!1,Ct.name="edu-program-fill",Ct.placeholder="\u8BF7\u8F93\u5165",Ct.dataset.id=Mt;const Ht=Object.keys(xt).length;return xt[Ht]=Ct,`<span class="edu-program-fill-wrap ${ge===qt?"":"show"}" style="width:${ge===qt?"600px":"100%"}" title=${ct||""}><span>${Ct.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function pn(ge){return ge=ge.replace(/!\[.*?\]\(.*?\)/g,""),ge=ge.replace(/\[.*?\]\(.*?\)/g,""),ge=ge.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ge=ge.replace(/<embed.*?>/g,""),ge=ge.replace(/<img.*?>/g,""),ge=ge.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ge=ge.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ge=ge.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ge=ge.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ge}const tn=ge=>!Dn&&At(Bt)?ge:ge.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Mt,ct){let Ct=ct.replace(/(\n|\r)/g,"").split("}"),Ht=[];return Ct.map(dn=>{dn!=""&&Ht.push(`.${yt.current} ${dn}`)}),`<style>${Ht.join("}")}</style>`}),le=(0,ie.useMemo)(()=>{try{const Ct=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,dn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,zt=/\(\/attachments\/download\//g;Bt=Bt.replace(zt,"("+ze.Z.API_SERVER+"/attachments/download/").replace(Ct,"("+ze.Z.API_SERVER+"/api/attachments/").replace(Ht,'"'+ze.Z.API_SERVER+"/api/attachments/").replace(dn,'"'+ze.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,`
`),Ne.current.style.display="none"}catch(Ct){}if(he){let Ct=-1;return Bt=Bt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Ht,dn,zt){var bn;return++Ct,Wt(Ht,Ct,(bn=_t==null?void 0:_t[Ct])==null?void 0:bn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${tn(Bt||"")}</pre>`}let ge=tn(Bt);ge=(0,Le.ZP)(ge);const Mt=(0,Le.ez)();Bt.match(/\[TOC\]/)&&(ge=ge.replace("<p>[TOC]</p>",(0,Le.Qv)()),(0,Le.Iy)()),ge=ge.replace(/(__special_katext_id_\d+__)/g,(Ct,Ht)=>{const{type:dn,expression:zt}=Mt[Ht];return(0,Ge.renderToString)(Qe(zt)||"",{displayMode:dn==="block",throwOnError:!1,output:"html"})}),ge=ge.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Le.AL)();const ct=document.createElement("div");if(ct.innerHTML=ge,Dn)return ct.innerText;if(me){const Ct=me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ue(ct,Ct),ct.innerHTML}return setTimeout(()=>Be(),500),ct.innerHTML},[Bt,me]);(0,ie.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(Mt=>{Mt.oninput=te,Mt.onblur=ee,Mt.onfocus=oe})},[it]),(0,ie.useEffect)(()=>{var ge,Mt,ct,Ct,Ht;if(_t!=null&&_t.length)try{const dn=ne.current.querySelectorAll(".edu-program-fill-score"),zt=ne.current.querySelectorAll('[name="edu-program-fill"]');for(const[bn,Nn]of zt.entries())Nn.value=((ge=_t==null?void 0:_t[bn])==null?void 0:ge.value)||"",((Mt=_t==null?void 0:_t[bn])==null?void 0:Mt.type)==="warning"?Nn.className="program-fill-warning":((ct=_t==null?void 0:_t[bn])==null?void 0:ct.type)==="success"?Nn.className="program-fill-success":Nn.className="";for(const[bn,Nn]of dn.entries())Nn.innerHTML=(Ct=_t==null?void 0:_t[bn])!=null&&Ct.score?`${(Ht=_t==null?void 0:_t[bn])==null?void 0:Ht.score}\u5206`:"";ut(_t)}catch(dn){console.log(dn,"error")}},[_t]);const te=ge=>{it[ge.target.dataset.id]=it[ge.target.dataset.id]||{},it[ge.target.dataset.id].value=ge.target.value,ut([...it]),at(it,ge.target.dataset.id)},ee=ge=>{it[ge.target.dataset.id]=it[ge.target.dataset.id]||{},it[ge.target.dataset.id].value=ge.target.value,ut([...it]),st(it,ge.target.dataset.id)},oe=ge=>{it[ge.target.dataset.id]=it[ge.target.dataset.id]||{},it[ge.target.dataset.id].value=ge.target.value,ut([...it]),cn(it,ge.target.dataset.id)};function ue(ge,Mt){return ge.childNodes.forEach(ct=>{var Ct;if(ct.childNodes.length>0)ue(ct,Mt);else if(ct.nodeName!=="IMG")if(ct.innerHTML)ct.innerHTML=(Ct=ct.innerHTML)==null?void 0:Ct.replace(new RegExp(Mt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ht=document.createElement("span");Ht.innerHTML=ct.textContent.replace(new RegExp(Mt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ct.replaceWith(Ht)}})}const ne=(0,ie.useRef)();Le.jb.WebkitLineClamp=Ot,Ot&&(Pn=Ie(Ie({},Pn),Le.jb));function ce(ge){let Mt=ge.target;if(Mt.tagName.toUpperCase()==="A"){let ct=Mt.getAttribute("href");if(ct.indexOf("office")>-1)ge.preventDefault(),lt(ct),Ue("office");else if(ct.indexOf("application/pdf")>-1)ge.preventDefault(),lt(ct),Ue("pdf");else if(ct.indexOf("text/html")>-1)ge.preventDefault(),lt(ct),Ue("html");else if(ct.startsWith("#")){ge.preventDefault();let Ct=document.getElementById(ct.replace("#",""));Ct&&Ct.scrollIntoView(!0)}}}const Be=()=>{var ge;const Mt=(ge=ne.current)==null?void 0:ge.querySelectorAll("video");Mt==null||Mt.forEach(ct=>{if(ct.oncontextmenu=()=>!1,ct.src.indexOf(".m3u8")>-1&&!ct.canPlayType("application/vnd.apple.mpegurl")){if(ve.ZP.isSupported()){var Ct=new ve.ZP;Ct.loadSource(ct.src),Ct.attachMedia(ct)}}})};(0,ie.useEffect)(()=>{if(ne.current&&le&&le.match(Oe)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",ce),()=>{var ge;(ge=ne.current)==null||ge.removeEventListener("click",ce),(0,Le.AL)(),(0,Le.Iy)()}},[le,ne.current,ce]);const Ve=ge=>{ge.target.nodeName==="IMG"&&ge.target.className.indexOf("draw-flowchart")>-1?(Ne.current.style.zIndex=1,Ne.current.style.display="flex",Ne.current.style.width=ge.target.clientWidth+"px",Ne.current.style.height=ge.target.clientHeight+"px",Ne.current.style.top=ge.target.offsetTop+"px",Ne.current.style.left=ge.target.offsetLeft+"px",ge.target.id&&(ye.current=ge.target.id)):Ne.current.style.display="none"},Ye=()=>{Ne.current.style.display="none"};return(0,ie.useEffect)(()=>{var ge;const Mt=ct=>{ct.preventDefault(),ct.clipboardData.setData("text",window.getSelection().toString())};return(ge=ne.current)==null||ge.addEventListener("copy",Mt),()=>{var ct;(ct=ne.current)==null||ct.removeEventListener("copy",Mt)}},[ne.current]),ie.createElement("div",{style:{position:"relative"},onMouseLeave:Ye},Dn&&ie.createElement("div",{ref:ne,className:`${Ee.mdBody} `},le),!Dn&&!At(le)&&ie.createElement("div",{ref:ne,style:Ie({},Pn),onMouseOver:Ve,className:`${gt||""} ${un?"disabled-fill":""} markdown-body ${Ee.mdBody} ${yt.current}`,dangerouslySetInnerHTML:{__html:le}}),!Dn&&At(le)&&ie.createElement(Re,{html:le}),ie.createElement("div",{ref:Ne,className:`${Ee.button} ${Ze?"":Ee.previewFlowChart}`},ie.createElement(Ce.Z,null,ie.createElement(pe.ZP,{onClick:()=>{Ze?Fe(ye.current):(lt(ye.current),Ue("flowChart"))}},Ze?"\u7F16\u8F91":"\u9884\u89C8"))),ie.createElement(xe.Z,{close:!0,data:_e,type:_e!=null&&_e.length?Me:"",style:Ie({},nn),onClose:()=>lt("")}))}},421:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return We}});var ie=de(59301),et=de(94276),Le=de(90083),We=()=>{const[ve,ze]=(0,ie.useState)(""),[Te,Ge]=(0,ie.useState)(0);let[Ce,pe]=(0,ie.useState)(),[ke,xe]=(0,ie.useState)();const[wt,je]=(0,ie.useState)(!1),Re=(0,ie.useRef)("");(0,ie.useEffect)(()=>et.Z.subscribe("preview-image",Oe=>{ze(Oe),console.log(Ie.current)}),[]),(0,ie.useEffect)(()=>(document.addEventListener("keydown",He),()=>{document.removeEventListener("keydown",He)}),[]),(0,ie.useEffect)(()=>{Re.current=ve},[ve]);function He(qt){console.log("e====",qt),qt.keyCode==27&&Re.current&&Ee()}function Ee(){document.body.style.overflow="auto",pe(void 0),xe(void 0),Ge(0),ze("")}function dt(){Ge(Te+90)}function ht(){Ce=Ie.current.width*1.1,ke=Ie.current.height*1.1,xe(ke),pe(Ce)}function Lt(){Ce=Ie.current.width/1.1,ke=Ie.current.height/1.1,xe(ke),pe(Ce)}const Et=(0,ie.useRef)(),pt=(0,ie.useRef)(),Ie=(0,ie.useRef)(),mt=qt=>{(qt.nativeEvent.target===Et.current||qt.nativeEvent.target===pt.current)&&Ee()};return ie.createElement(ie.Fragment,null,ve?ie.createElement("div",null,ie.createElement("div",{className:"preview-wrp-group",ref:pt},ie.createElement(Le.Z,{className:"image-preview",src:ve,style:{display:"none"},preview:{visible:!0,src:ve,onVisibleChange:qt=>{ze("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},52504:function(Yt,en,de){"use strict";de.d(en,{h:function(){return Et},Z:function(){return Lt}});var ie=de(59301),et=de(82326),Le=de(28284),We=de(7939),ve=de(89780),ze=de.n(ve),Te=de(2018),Ge=Object.defineProperty,Ce=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,je=(pt,Ie,mt)=>Ie in pt?Ge(pt,Ie,{enumerable:!0,configurable:!0,writable:!0,value:mt}):pt[Ie]=mt,Re=(pt,Ie)=>{for(var mt in Ie||(Ie={}))xe.call(Ie,mt)&&je(pt,mt,Ie[mt]);if(ke)for(var mt of ke(Ie))wt.call(Ie,mt)&&je(pt,mt,Ie[mt]);return pt},He=(pt,Ie)=>Ce(pt,pe(Ie));const Ee=et.default.Option,dt={labelCol:{span:4},wrapperCol:{span:20}},ht={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"]};var Lt=({callback:pt,onCancel:Ie})=>{const[mt,qt]=(0,ie.useState)("python");function Oe(Pt){qt(ht[Pt][1])}function Qe(Pt){pt(Pt)}return ie.createElement(Le.default,He(Re({},dt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Qe,style:{width:500}}),ie.createElement(Le.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ie.createElement(et.default,{getPopupContainer:Pt=>Pt.parentNode,onChange:Oe},Object.keys(ht).map(Pt=>ie.createElement(Ee,{key:Pt,value:Pt},ht[Pt][0])))),ie.createElement(Le.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ie.createElement(Et,{mode:mt})),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(We.ZP,{type:"ghost",onClick:Ie},"\u53D6\u6D88")))};function Et({value:pt,onChange:Ie,mode:mt,options:qt={}}){const Oe=(0,ie.useRef)(),[Qe,Pt]=(0,ie.useState)();return(0,ie.useEffect)(()=>{if(Qe){let Pe=function(rt){const Ze=rt.getValue();Ie&&Ie(Ze)};return Qe.on("change",Pe),()=>{Qe.off("change",Pe)}}},[Qe,Ie]),(0,ie.useEffect)(()=>{Qe&&Qe.setOption("mode",mt)},[Qe,mt]),(0,ie.useEffect)(()=>{Qe&&(pt!==Qe.getValue()||pt==="")&&setTimeout(()=>{Qe.setValue(pt||"")},300)},[Qe,pt]),(0,ie.useEffect)(()=>{if(Oe.current&&!Qe){const Pe=ze().fromTextArea(Oe.current,Re({mode:mt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},qt));Pt(Pe)}},[Oe.current,Qe]),ie.createElement("div",{className:"my-codemirror-container"},ie.createElement("textarea",{ref:Oe}))}},77834:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return Rt}});var ie=de(59301),et=de(58106),Le=de(89780),We=de.n(Le),ve=de(76374),ze=de(2018),Te=de(6313),Ge=de(25717),Ce=de(99498),pe=de(25419),ke=de(67549),xe=de(59944),wt=({value:St="",className:Zt,showTextOnly:on,showLines:Ut,style:Xt={}})=>{const gn=(0,ie.useMemo)(()=>"",[St]);return ie.createElement(ie.Fragment,null,ie.createElement("div",{dangerouslySetInnerHTML:{__html:gn}}))},je=Object.defineProperty,Re=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,Lt=(St,Zt,on)=>Zt in St?je(St,Zt,{enumerable:!0,configurable:!0,writable:!0,value:on}):St[Zt]=on,Et=(St,Zt)=>{for(var on in Zt||(Zt={}))dt.call(Zt,on)&&Lt(St,on,Zt[on]);if(Ee)for(var on of Ee(Zt))ht.call(Zt,on)&&Lt(St,on,Zt[on]);return St},pt=(St,Zt)=>Re(St,He(Zt));let Ie=[{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 mt({onActionCallback:St,title:Zt,icon:on,actionName:Ut,className:Xt="",children:gn}){function _n(){St(Ut)}return ie.createElement("a",{title:Zt,className:Xt,onClick:_n},ie.createElement("i",{className:`${on}`}),gn)}var qt=({watch:St,showNullButton:Zt,showNullProgramButton:on,onActionCallback:Ut,fullScreen:Xt,insertTemp:gn,hidetoolBar:_n,extraUse:Ln})=>{const fn=[...Ie,{title:`${St?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${St?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ie.createElement("ul",{className:"markdown-toolbar-container"},!_n&&fn.map((Zn,ot)=>ie.createElement("li",{key:ot},Zn.actionName?ie.createElement(mt,pt(Et({},Zn),{onActionCallback:Ut})):ie.createElement("span",{className:"v-line"}))),Zt?ie.createElement("li",null,ie.createElement(mt,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ut},ie.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,on?ie.createElement(ie.Fragment,null,ie.createElement("li",null,ie.createElement(mt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ut},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ie.createElement("li",null,ie.createElement(mt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ut},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,gn&&ie.createElement("li",null,ie.createElement(mt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${gn}`,onActionCallback:Ut},ie.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ln&&ie.createElement("li",null,Ln),ie.createElement("li",{className:"btn-full-screen"},ie.createElement(mt,{icon:`${Xt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Xt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ut})))},Oe=de(35990),Qe=de(28284),Pt=de(37568),Pe=de(7939),rt=Object.defineProperty,Ze=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,Dn=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable,nn=(St,Zt,on)=>Zt in St?rt(St,Zt,{enumerable:!0,configurable:!0,writable:!0,value:on}):St[Zt]=on,me=(St,Zt)=>{for(var on in Zt||(Zt={}))Ot.call(Zt,on)&&nn(St,on,Zt[on]);if(Dn)for(var on of Dn(Zt))Pn.call(Zt,on)&&nn(St,on,Zt[on]);return St},he=(St,Zt)=>Ze(St,gt(Zt));const Dt={labelCol:{span:4},wrapperCol:{span:20}};var un=({callback:St,onCancel:Zt})=>{function on(Ut){St(Ut)}return ie.createElement(Qe.default,he(me({},Dt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:on,style:{width:500}}),ie.createElement(Qe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ie.createElement(Pt.default,null)),ie.createElement(Qe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ie.createElement(Pt.default,null)),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Pe.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},_t=de(52504),Fe=de(82441),at=de(62957),st=de(77019),cn=de(1986),Bt=de(59301),Ne=({callback:St,onCancel:Zt})=>{const on=document.createElement("canvas"),Ut=on.getContext("2d");on.width=1e3,on.height=800,Ut.fillStyle="#ffffff",Ut.fillRect(0,0,on.width,on.height);const Xt=on.toDataURL("image/png");return Bt.createElement(at.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Bt.createElement(st.Z,{style:{height:"100vh"}},Bt.createElement(cn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Xt,visible:!0,title:String(Date.now())},onOk:gn=>{St({src:gn.url})},onClose:Zt})))},ye=de(30641),_e=de(5269),lt=de(6767),Me={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},Ue=de(59301),ut=(0,ie.forwardRef)(({onCancel:St,editImgId:Zt,callback:on},Ut)=>{let Xt=(0,ie.useRef)(),gn=(0,ie.useRef)(),_n=(0,ie.useRef)(),Ln=(0,ie.useRef)(!1);const fn=(0,ie.useRef)(!1);console.log("ref:",Ut);const[Zn,ot]=(0,ie.useState)(0),[Je,Ft]=(0,ie.useState)("100vh");return(0,ie.useEffect)(()=>{ot(1)},[]),(0,ie.useImperativeHandle)(Ut,()=>({setHeight:Ft})),Ue.createElement("div",{ref:fn,className:"body-overflow-initial"},Ue.createElement(ye.Z,{width:"100vw",height:Je,footer:null,closable:!0,placement:"bottom",open:!!Zn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Me.drawerWrap}`,onClose:()=>{window.saveDrawData(Mn=>{on({src:`/api/attachments/${Mn}`,id:Mn})})},title:Ue.createElement(st.Z,{align:"middle"},Ue.createElement(_e.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ue.createElement(_e.Z,{onClick:()=>{Ft(Je==="60px"?"100vh":"60px")}},Ue.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),Ue.createElement(_e.Z,{onClick:()=>{window.saveDrawData(Mn=>{if(Mn===null){lt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}lt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),on({src:`/api/attachments/${Mn}`,id:Mn,disabledClose:!0})})}},Ue.createElement(Pe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},Ue.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Zt||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:gn})))}),yt=de(26869),xt=de(47889),At=de(71051);const Wt=xt.ZP.Group,pn={margin:"0 8px"};var tn=({callback:St,onCancel:Zt})=>{function on(Ut){St(Ut)}return ie.createElement(Qe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:on},ie.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ie.createElement("span",{style:pn},"\u5355\u5143\u683C\u6570\uFF1A"),ie.createElement("span",{style:pn},"\u884C\u6570"),ie.createElement(Qe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ie.createElement(At.Z,null)),ie.createElement("span",{style:pn},"\u5217\u6570"),ie.createElement(Qe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ie.createElement(At.Z,null))),ie.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ie.createElement("span",{style:pn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ie.createElement(Qe.default.Item,{name:"align"},ie.createElement(Wt,null,ie.createElement(xt.ZP,{value:"default"},ie.createElement("i",{className:"fa fa-align-justify"})),ie.createElement(xt.ZP,{value:"left"},ie.createElement("i",{className:"fa fa-align-left"})),ie.createElement(xt.ZP,{value:"center"},ie.createElement("i",{className:"fa fa-align-center"})),ie.createElement(xt.ZP,{value:"right"},ie.createElement("i",{className:"fa fa-align-right"}))))),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Pe.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},le=de(71411),te=de(75544),ee=de.n(te),ue=(0,ie.forwardRef)(({use3d:St,width:Zt,height:on,callback:Ut,showSaveButton:Xt},gn)=>{const _n=(0,ie.useRef)(),Ln=(0,ie.useRef)(),[fn,Zn]=(0,ie.useState)(!1),ot=(0,ie.useRef)({id:_n,appName:"graphing",width:Zt||1e3,height:on||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ie.useEffect)(()=>{Ln.current=new(ee())(ot.current,!0),window.onload=function(){Ln.current.inject("applet_container")}},[]);const Je=()=>{var Ft=window.ggbApplet.getPNGBase64(1,!0,72);return Ut&&Ut(Ft),Ft};return(0,ie.useEffect)(()=>{ot.current.appName=fn?"3D":"graphing",Ln.current.inject("applet_container")},[fn]),(0,ie.useEffect)(()=>{Zn(St)},[St]),(0,ie.useImperativeHandle)(gn,()=>({getImgData:Je})),ie.createElement(ie.Fragment,null,ie.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:_n}),ie.createElement(st.Z,{align:"middle"},ie.createElement(_e.Z,{flex:1},ie.createElement(le.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:fn,onChange:Ft=>Zn(Ft)})),ie.createElement(_e.Z,null,ie.createElement(Pe.ZP,{size:"large",onClick:Je,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=de(50047);const ce="link",Be="upload-image",Ve="add-flowchart",Ye="draw-image",ge="add-flowchart",Mt="code-block",ct="add-table",Ct="------------",Ht={default:Ct,left:`:${Ct}`,center:`:${Ct}:`,right:`${Ct}:`};var dn=de(61904),zt=de(31735);function bn(){}let Nn=0;const Tn=1e4,jn="\u2581",zn="@\u2581\u2581@",Hn="@\u2581@",Un=`
**\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`,Rn=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function Wn(St){return/^\d+$/.test(St)?`${St}px`:St}const tt=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",nt={[tt+"-B"]:"bold",[tt+"-I"]:"italic"},Xe={[ce]:"\u6DFB\u52A0\u94FE\u63A5",[Mt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Be]:"\u6DFB\u52A0\u56FE\u7247",[Ye]:"\u6DFB\u52A0\u753B\u56FE",[Ve]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ct]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Rt=({defaultValue:St="",onChange:Zt,width:on="100%",height:Ut=400,miniToolbar:Xt=!1,isFocus:gn=!1,watch:_n,insertTemp:Ln,mode:fn="markdown",id:Zn="markdown-editor-id",showResizeBar:ot=!1,noStorage:Je=!1,showNullButton:Ft=!1,showNullProgramButton:Mn=!1,hidetoolBar:Gn=!1,fullScreen:we=!1,onBlur:Se,onCMBeforeChange:It,onFullScreen:bt,className:Ae="",disablePaste:ft=!1,disabled:Tt=!1,disabledFill:Kt=!1,placeholder:ln="",values:kt="",extraUse:jt,onAddBlank:vt})=>{const[qe,Gt]=(0,ie.useState)(null),[yn,mn]=(0,ie.useState)(St),[In,Qn]=(0,ie.useState)(_n),[er,kn]=(0,ie.useState)(we),[$t,Bn]=(0,ie.useState)(""),[hn,qn]=(0,ie.useState)(0),[dr,ir]=(0,ie.useState)(Ut),[yr,br]=(0,ie.useState)(!1),[Cr,hr]=(0,ie.useState)(0),[Pr,xr]=(0,ie.useState)(0),pr=(0,ie.useRef)(),Sr=(0,ie.useRef)(),lr=(0,ie.useRef)(),sr=(0,ie.useRef)(),or=(0,ie.useRef)(),ur=(0,ie.useRef)(),Br=(0,et.useDispatch)();(0,ie.useEffect)(()=>{const rn=window.scrollY||window.pageYOffset;mn(kt),qe==null||qe.setValue(kt),window.scrollTo(0,rn)},[kt]),(0,ie.useEffect)(()=>{bt==null||bt(er)},[er]),(0,ie.useEffect)(()=>{if(pr.current){let rn=function(xn,En){var Xn;if(ft){En.preventDefault();return}const mr=En.clipboardData;if(mr){const cr=mr.types.toString(),Er=mr.items;if(cr==="Files"||mr.types.indexOf("Files")>-1){if(En.preventDefault(),fn=="stex")return;try{let Dr=Er[1];((Xn=Er[0])==null?void 0:Xn.kind)==="file"&&(Dr=Er[0]);const Mr=Dr.getAsFile(),Zr=Mr.name.split(".").pop();(0,Fe.I)(Mr,Ar=>{var _r,ei,Mi;Ar.id?((_r=Mr==null?void 0:Mr.type)==null?void 0:_r.indexOf("image"))>-1?Jt.replaceSelection(`<img width="100%" src="/api/attachments/${Ar.id}?type=${Ar.content_type})" alt="" />`):((ei=Mr==null?void 0:Mr.type)==null?void 0:ei.indexOf("video"))>-1?Jt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ar.id}"></video>`):((Mi=Mr==null?void 0:Mr.type)==null?void 0:Mi.indexOf("pdf"))>-1?Jt.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=${Mr.type}&disposition=inline" target="_blank">${Mr.name}</a>`):Rn.includes(Zr)?Jt.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=office&disposition=inline" target="_blank">${Mr.name}</a>`):Jt.replaceSelection(`[${Mr.name}](/api/attachments/${Ar.id}?type=${Ar.content_type})`):(Ar==null?void 0:Ar.status)===401&&(document.location.href="/user/login")})}catch(Dr){lt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Jt=We().fromTextArea(pr.current,{mode:fn,lineNumbers:!Xt,lineWrapping:!0,value:St,autoCloseTags:!0,autoCloseBrackets:!0});return Jt.on("keyup",function(xn,En){En.keyCode===8&&(xn.getValue()==""?Jt.setOption("placeholder",ln):Jt.setOption("placeholder",null))}),Jt.on("keydown",function(xn,En){if(En.keyCode===8){var Xn=Jr(xn);Xn&&En.preventDefault()}}),gn&&Jt.focus(),Jt.on("paste",rn),Tt&&Jt.on("beforeChange",function(xn,En){(En.origin==="paste"||En.origin==="+input")&&En.cancel()}),Gt(Jt),()=>{Jt.off("paste",rn)}}},[]);const Vr=(0,ie.useCallback)(()=>{if(Sr.current)try{}catch(rn){console.log(rn,"---- to set md editor body height")}},[dr,Sr,er]);(0,ie.useEffect)(()=>{function rn(){let Jt=new ve.Z(xn=>{for(let En of xn)(En.target.offsetHeight>0||En.target.offsetWidth>0)&&(Vr(),qe.setSize("100%","100%"),qe.refresh())});return Jt.observe(pr.current.parentElement),Jt}if(qe){const Jt=rn();return()=>{var xn,En;(xn=pr.current)!=null&&xn.parentElement&&Jt.unobserve((En=pr.current)==null?void 0:En.parentElement)}}},[qe,Vr]),(0,ie.useEffect)(()=>{if(qe){let rn=[];for(const[Jt,xn]of Object.entries(nt)){let En={[Jt]:()=>{Tr(xn)}};rn.push(En),qe.addKeyMap(En)}return()=>{for(let Jt of rn)qe.removeKeyMap(Jt)}}},[qe]),(0,ie.useEffect)(()=>{we!==er&&kn(we)},[we]),(0,dn.Z)(()=>{if(!Je&&hn>0){let rn=new Date().getTime(),Jt=window.sessionStorage.getItem(Zn);rn>=hn+Tn&&(!Jt||Jt!==yn)&&(window.sessionStorage.setItem(Zn,yn),br(!0))}},Tn),(0,ie.useEffect)(()=>{Qn(_n)},[qe,_n]),(0,ie.useEffect)(()=>{qe&&gn&&qe.focus()},[qe,gn]),(0,ie.useEffect)(()=>{if(In&&qe){let rn=function(xn){let En=xn.target;if(sr.current){let Xn=En.scrollTop/En.scrollHeight;sr.current.scrollTop=sr.current.scrollHeight*Xn}};const Jt=qe.getScrollerElement();return Jt.addEventListener("scroll",rn),()=>{Jt.removeEventListener("scroll",rn)}}},[qe,In]),(0,ie.useEffect)(()=>{if(qe&&It){let rn=function(Jt,xn){It(Jt,xn)};return qe.on("beforeChange",rn),()=>{qe.off("beforeChange",rn)}}},[qe,It]),(0,ie.useEffect)(()=>{if(qe&&Se){let rn=function(){Se(qe.getValue())};return qe.on("blur",rn),()=>{qe.off("blur",rn)}}},[qe,Se]);function Jr(rn,Jt){var xn=rn.getDoc(),En=xn.getCursor(),Xn=xn.getLine(En.line),mr=Xn.charAt(En.ch-1),cr=Xn.lastIndexOf("@\u2581@",En.ch),Er=Xn.lastIndexOf("@\u2581\u2581@",En.ch),Dr=cr>Er?cr:Er,Mr=cr>Er?3:4;if(zn.indexOf(mr)===-1)return null;if(console.log("change1:",Jt,rn,Xn,En,Dr,cr,Er,mr),Dr>=0&&En.ch-Dr<5){var Zr=Dr+Mr;return xn.replaceRange("",{line:En.line,ch:Dr},{line:En.line,ch:Zr}),{line:En.line,ch:Zr}}return null}(0,ie.useEffect)(()=>{if(qe){let rn=function(Jt,xn){const En=Jt.getValue();mn(En),qn(new Date().getTime()),Jt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Zt&&(Mn?Zt(En,an(En)):Zt(En))};return qe.on("change",rn),()=>{qe.off("change",rn)}}},[qe,Zt]),(0,ie.useEffect)(()=>{if(qe)if(St==null)qe.setValue(""),mn("");else{const rn=window.scrollY||window.pageYOffset;St!==qe.getValue()&&(qe.setValue(St),mn(St),qe.setCursor(Tt?1:qe.lineCount(),0),window.scrollTo(0,rn))}},[qe,St]);const Tr=(0,ie.useCallback)(rn=>{const Jt=qe.getCursor(),xn=qe.getSelection();let En=xn.split(`
`);switch(rn){case"bold":return qe.replaceSelection("**"+xn+"**"),xn===""&&qe.setCursor(Jt.line,Jt.ch+2),qe.focus();case"italic":return qe.replaceSelection("*"+xn+"*"),xn===""&&qe.setCursor(Jt.line,Jt.ch+1),qe.focus();case"code":return qe.replaceSelection("`"+xn+"`"),xn===""&&qe.setCursor(Jt.line,Jt.ch+1),qe.focus();case"inline-latex":return(0,zt.Ye)(Br)?void 0:(Bn("inline-latex"),qe.focus());case"latex":return qe.replaceSelection("```latex\n"+xn+"\n```"),qe.setCursor(Jt.line+1,xn.length+1),qe.focus();case"line-break":return qe.replaceSelection(`<br/>
`),qe.focus();case"list-ul":return xn===""?qe.replaceSelection("- "+xn):qe.replaceSelection(En.map(Xn=>Xn===""?"":`- ${Xn}`).join(`
`)),qe.focus();case"list-ol":return xn===""?qe.replaceSelection("1. "+xn):qe.replaceSelection(En.map((Xn,mr)=>Xn===""?"":`${mr+1}. ${Xn}`).join(`
`)),qe.focus();case"add-null-ch":vt==null||vt();return;case"add-signal":return xn===""&&qe.setCursor(Jt.line,Jt.ch),qe.replaceSelection(Hn),qe.focus();case"add-multiple":return xn===""&&qe.setCursor(Jt.line,Jt.ch),qe.replaceSelection(zn),qe.focus();case"inster-template-1":return xn===""&&qe.setCursor(Jt.line,Jt.ch),qe.replaceSelection(Un),qe.focus();case"eraser":return qe.setValue(""),qe.focus();case"trigger-watch":return Qn(!In),qe.focus();case"trigger-full-screen":return kn(!er),qe.focus();case ce:Bn(ce);return;case Mt:Bn(Mt);return;case Be:Bn(Be);return;case Ye:Bn(Ye);return;case"maths-latex":if((0,zt.Ye)(Br))return;Bn("maths-latex");return;case Ve:or.current="",sessionStorage.removeItem("file_id"),Bn(Ve);return;case ct:Bn(ct);return;default:throw new Error}},[qe,In,er]),Hr=(0,ie.useCallback)((rn,Jt)=>{var xn,En,Xn,mr,cr,Er;rn!=null&&rn.disabledClose||Bn("");const{src:Dr,alt:Mr,id:Zr}=rn||{};switch($t){case ce:const{title:Fi,link:xi}=rn;return qe.replaceSelection(`[${Fi}](${xi})`),qe.focus();case Mt:const{language:vi,content:Xi}=rn;return qe.replaceSelection(["```"+vi,Xi,"```"].join(`
`)),qe.focus();case"maths-latex":for(var Ar=atob(rn),_r=new Uint8Array(Ar.length),ei=0;ei<Ar.length;ei++)_r[ei]=Ar.charCodeAt(ei);var Mi=new Blob([_r],{type:"image/png"});(0,Fe.I)(Mi,mi=>{mi.id?qe.replaceSelection(`![,](/api/attachments/${mi.id}?type=${mi.content_type})`):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,zt.Ye)(Br))return;qe.replaceSelection("`$$"+rn+"$$`");break;case ge:if(!Zr)return;qe.getValue().indexOf(Dr)===-1?qe.replaceSelection(`<center><img id="${Zr}" width="80%" src="${Dr}" class="draw-flowchart" alt="${Mr||""}" /></center>`):document.getElementById(Zr).src=yt.Z.API_SERVER+Dr+"?t="+Date.now();break;case Be:case Ye:const wr=Jt,to=(Xn=(En=(xn=wr==null?void 0:wr.name)==null?void 0:xn.split("."))==null?void 0:En.pop)==null?void 0:Xn.call(En);return((mr=wr==null?void 0:wr.type)==null?void 0:mr.indexOf("image"))>-1||!(wr!=null&&wr.type)?wr!=null&&wr.align||wr!=null&&wr.width?qe.replaceSelection(`<p style="text-align:${wr.align||"initial"}"><img width="${wr.width?wr.width+"%":"initial"}" src="${Dr}" alt="${Mr||""}" /></p>`):qe.replaceSelection(`<img width="100%" src="${Dr}" alt="${Mr||""}" />`):((cr=wr==null?void 0:wr.type)==null?void 0:cr.indexOf("video"))>-1?qe.replaceSelection(`<video width="100%" controls src="${Dr}"></video>`):((Er=wr==null?void 0:wr.type)==null?void 0:Er.indexOf("pdf"))>-1?qe.replaceSelection(`<a href="${Dr}?type=${wr.type}&disposition=inline" target="_blank">${wr.name}</a>`):Rn.includes(to)?qe.replaceSelection(`<a href="${Dr}?type=office&disposition=inline" target="_blank">${wr.name}</a>`):qe.replaceSelection(`[${wr.name}](${Dr})`),qe.focus();case ct:const{row:ti,col:Bi,align:ao}=rn;let Ji=`
`;for(let mi=0;mi<ti;mi++){let Ri=[],Wr=[];for(let _i=0;_i<Bi;_i++)mi===1&&Wr.push(Ht[ao]),Ri.push(" ");mi===1&&(Ji+=`| ${Wr.join(" | ")} |
`),Ji+=`| ${Ri.join(Bi===1?"":" | ")} |
`}return qe.replaceSelection(Ji+`
`),qe.focus();default:throw new Error}},[qe,$t]),Rr=(0,ie.useMemo)(()=>{switch($t){case ce:return ie.createElement(un,{callback:Hr,onCancel:zr});case Mt:return ie.createElement(_t.Z,{callback:Hr,onCancel:zr});case Be:return ie.createElement(Fe.Z,{callback:Hr,onCancel:zr});case Ve:return ie.createElement(ut,{editImgId:or.current,callback:Hr,onCancel:zr});case ct:return ie.createElement(tn,{callback:Hr,onCancel:zr});case"maths-latex":return ie.createElement(ue,{showSaveButton:!0,callback:Hr});case"inline-latex":return ie.createElement(ne.Z,{showSaveButton:!0,callback:Hr});default:return null}},[$t]);function zr(){Bn("")}(0,ie.useEffect)(()=>{if(lr.current){let rn=function(cr){Xn=!0,mr=cr.pageY},Jt=function(){Xn=!1},xn=function(cr){if(Xn){let Er=cr.pageY-mr;Er<0&&(Er=0),Er>300&&(Er=300);let Dr=Ut+Er+"px";ir(Dr)}},En=lr.current,Xn=!1,mr=0;return En.addEventListener("mousedown",rn),document.addEventListener("mousemove",xn),document.addEventListener("mouseup",Jt),()=>{En.removeEventListener("mousedown",rn),document.removeEventListener("mousemove",xn),document.removeEventListener("mouseup",Jt)}}},[qe,lr]),(0,ie.useEffect)(()=>{ir(Ut)},[Ut]);const ii=Wn(on),Fr=Wn(dr),nr={width:ii,height:Fr},Qt=(0,ie.useMemo)(()=>{if(hn){let rn=new Date(hn),Jt=rn.getHours(),xn=rn.getMinutes(),En=rn.getSeconds();return Jt=Jt<10?"0"+Jt:Jt,xn=xn<10?"0"+xn:xn,En=En<10?"0"+En:En,`${Jt}:${xn}:${En}`}return 0},[hn]),an=rn=>{const Jt=[];if(Mn){let xn=-1;rn=rn.replace(/(@▁▁@|@▁@)/g,function(En,Xn,mr){Jt.push({multiLine:En!==Hn})})}return Jt};function On(){window.sessionStorage.removeItem(Zn),br(!1),qn(0)}function wn(){br(!1),qn(0),qe.setValue(window.sessionStorage.getItem(Zn))}(0,ie.useEffect)(()=>{Xe[$t]&&$t!==Ye&&$t!==Ve&&setTimeout(()=>{const rn=document.getElementsByClassName("markdown-popup-form")[0],Jt=window.innerWidth/2-rn.offsetWidth/2,xn=window.innerHeight/2-rn.offsetHeight/2;hr(Jt),xr(xn)},0)},[$t]);const Kn=rn=>{rn.preventDefault();const Jt=rn.clientX-Cr,xn=rn.clientY-Pr;document.body.onmousemove=En=>{let Xn=En.clientX-Jt,mr=En.clientY-xn;const cr=document.getElementsByClassName("markdown-popup-form")[0],Er=window.innerWidth-cr.offsetWidth,Dr=window.innerHeight-cr.offsetHeight;Xn=Math.max(0,Math.min(Xn,Er)),mr=Math.max(0,Math.min(mr,Dr)),vr(En.clientX,En.clientY,Jt,xn)&&(hr(Xn),xr(mr))},document.body.onmouseup=function(){document.body.onmousemove=null}},vr=(rn,Jt,xn,En)=>{const Xn=document.body.clientHeight,mr=document.body.clientWidth;return rn<20&&xn>rn||rn>mr-20&&xn<rn||Jt<20&&En>Jt||Jt>Xn-20&&En<Jt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ie.createElement(ie.Fragment,null,ie.createElement("div",{className:"markdown-editor-wrapper",ref:Sr},ie.createElement("div",{className:`markdown-editor-container ${Ae} ${In?"on-preview":""} ${Xt?"mini":""} ${er?"full-screen":""}`,style:nr},ie.createElement(qt,{insertTemp:Ln,watch:In,fullScreen:er,showNullButton:Ft,showNullProgramButton:Mn,onActionCallback:Tr,hidetoolBar:Gn,extraUse:jt}),ie.createElement("div",{className:"markdown-editor-body"},ie.createElement("div",{className:"codemirror-container"},ie.createElement("textarea",{ref:pr,placeholder:ln})),In?ie.createElement("div",{ref:sr,className:"preview-container"},fn==="stex"&&ie.createElement(wt,{value:yn}),fn!=="stex"&&ie.createElement(xe.Z,{edit:!0,disabledFill:Kt,showProgramFill:Mn,value:yn,openEditor:rn=>{var Jt;or.current=rn,(Jt=ur.current)==null||Jt.setHeight("100vh"),setTimeout(()=>{Bn("add-flowchart")},150)}})):null))),ot?ie.createElement("a",{ref:lr,className:"editor-resize"}):null,$t===Ye&&ie.createElement(Ne,{callback:Hr,onCancel:zr}),$t===Ve&&ie.createElement(ut,{ref:ur,editImgId:or.current,callback:Hr,onCancel:zr}),ie.createElement(Oe.Z,null,Xe[$t]&&$t!==Ye&&$t!==Ve?ie.createElement(at.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Pr},title:ie.createElement("div",{style:{cursor:"move"},onMouseDown:Kn},Xe[$t]),open:!0,onCancel:zr,footer:null,destroyOnClose:!0,width:$t===Ve?"1200px":null,height:$t===Ve?"80vh":null,className:"markdown-popup-form"},Rr):null))}},82441:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return Ie},I:function(){return qt}});var ie=de(28284),et=de(6767),Le=de(37568),We=de(44104),ve=de(71051),ze=de(47889),Te=de(7939),Ge=de(52882),Ce=de(59301),pe=de(59301),ke=Object.defineProperty,xe=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ee=(Oe,Qe,Pt)=>Qe in Oe?ke(Oe,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):Oe[Qe]=Pt,dt=(Oe,Qe)=>{for(var Pt in Qe||(Qe={}))Re.call(Qe,Pt)&&Ee(Oe,Pt,Qe[Pt]);if(je)for(var Pt of je(Qe))He.call(Qe,Pt)&&Ee(Oe,Pt,Qe[Pt]);return Oe},ht=(Oe,Qe)=>xe(Oe,wt(Qe));const{useForm:Lt}=ie.default,Et={width:280,marginRight:10},pt={labelCol:{span:5},wrapperCol:{span:19}};var Ie=({callback:Oe,onCancel:Qe})=>{const[Pt]=Lt();let Pe=(0,Ce.useRef)();function rt(Dn){Pe.current.width=Pt.getFieldValue("width"),Pe.current.align=Pt.getFieldValue("align"),Oe(Dn,Pe.current)}function Ze(Dn,Ot){if(Dn.status===-1){et.ZP.error(Dn.message);return}Pt.setFieldsValue({src:`/api/attachments/${Dn.id}`,type:Ot.type})}function gt(Dn){let Ot=Dn.target.files[0];Pe.current=Ot,qt(Ot,Ze)}return pe.createElement(ie.default,ht(dt({form:Pt},pt),{className:"upload-image-panel",onFinish:rt,style:{width:470,overflow:"hidden"}}),pe.createElement(ie.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},pe.createElement("div",{className:"flex-container"},pe.createElement(ie.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},pe.createElement(Le.default,{style:Et})),pe.createElement(mt,{onFileChange:gt}))),pe.createElement(ie.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},pe.createElement(Le.default,{style:{width:264}})),pe.createElement(ie.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},pe.createElement(We.Z,null,pe.createElement(ie.default.Item,{name:"width",style:{margin:0}},pe.createElement(ve.Z,{style:{width:264}})),pe.createElement("span",{className:"ml8"},"%"))),pe.createElement(ie.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},pe.createElement(ze.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"}]})),pe.createElement("aside",null,pe.createElement(ie.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},pe.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(Te.ZP,{type:"default",onClick:Qe},"\u53D6\u6D88"))))};function mt({onFileChange:Oe}){return pe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",pe.createElement("input",{type:"file",onChange:Oe}))}function qt(Oe,Qe){if(!Oe)throw new String("\u6CA1\u6709\u6587\u4EF6");let Pt=new FormData;Pt.append("editormd-image-file",Oe),Pt.append("file_param_name","editormd-image-file"),Pt.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(rt){Qe(JSON.parse(rt.target.responseText),Oe)},!1),Pe.addEventListener("error",function(rt){console.error(rt)},!1),Pe.open("POST",`${Ge.KI}/api/attachments.json`),Pe.send(Pt)}},35990:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return Le}});var ie=de(59301),et=de(4676);class Le extends ie.Component{constructor(ve){super(ve);const ze=window.document;this.node=ze.createElement("div"),ze.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,et.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58478:function(Yt,en,de){"use strict";de.d(en,{SV:function(){return Ne},ZP:function(){return Bt}});var ie=de(59301),et=de(76374);const Le={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"]},We={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},ve={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std",content:["using namespace std"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},ze={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(`
`)}]},Te={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var Ge=de(53184),Ce=de.n(Ge),pe=(ye,_e,lt)=>new Promise((Me,Ue)=>{var it=xt=>{try{yt(lt.next(xt))}catch(At){Ue(At)}},ut=xt=>{try{yt(lt.throw(xt))}catch(At){Ue(At)}},yt=xt=>xt.done?Me(xt.value):Promise.resolve(xt.value).then(it,ut);yt((lt=lt.apply(ye,_e)).next())});const ke={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"]}},xe=(ye,_e,lt,Me)=>{const Ue=_e.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:lt.lineNumber,endColumn:lt.column});return Array.from(new Set(Ue.match(/\b\w{2,}\b/g)||[])).map(ut=>({label:ut,kind:ye.languages.CompletionItemKind.Text,insertText:ut,range:Me}))},wt=(ye,_e,lt,Me)=>{ye.languages.registerCompletionItemProvider(_e,{provideCompletionItems(Ue,it){const ut=Ue.getWordUntilPosition(it),yt={startLineNumber:it.lineNumber,endLineNumber:it.lineNumber,startColumn:ut.startColumn,endColumn:ut.endColumn},xt=Ue.getLineContent(it.lineNumber).substring(ut.startColumn-2,ut.endColumn);return{suggestions:[...xe(ye,Ue,it,yt),...lt.map(Wt=>({label:Wt,kind:ye.languages.CompletionItemKind.Keyword,documentation:Wt,insertText:Wt,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:yt})),...Me.map(Wt=>({label:Wt.label,kind:ye.languages.CompletionItemKind.Snippet,documentation:Wt.content,insertText:xt.startsWith("#")?Wt.content.replace(/#/,""):Wt.content,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:yt}))]}}})};var je=ye=>{ke.languages.forEach(_e=>{ye.languages.registerDocumentFormattingEditProvider(_e,{provideDocumentFormattingEdits(lt){return pe(this,null,function*(){const Me=Ce()(lt.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:lt.getFullModelRange(),text:Me}]})}})}),wt(ye,"java",We.keywords,We.quickKey),wt(ye,"cpp",ve.keywords,ve.quickKey),wt(ye,"c",Le.keywords,[]),wt(ye,"python",ze.keywords,ze.quickKey),wt(ye,"scala",Te.keywords,Te.quickKey)};const Re="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var He=Object.defineProperty,Ee=(ye,_e,lt)=>_e in ye?He(ye,_e,{enumerable:!0,configurable:!0,writable:!0,value:lt}):ye[_e]=lt,dt=(ye,_e,lt)=>Ee(ye,typeof _e!="symbol"?_e+"":_e,lt);const ht=class _s{constructor(_e,lt,Me){this.placeholder=_e,this.editor=lt,this.monaco=Me,lt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return _s.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};dt(ht,"ID","editor.widget.placeholderHint");var Et=ht,pt=de(96236),Ie=de(6767),mt=de(25399),qt=de(89392),Oe=de(94276),Qe=de(56102),Pt=Object.defineProperty,Pe=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable,Ot=(ye,_e,lt)=>_e in ye?Pt(ye,_e,{enumerable:!0,configurable:!0,writable:!0,value:lt}):ye[_e]=lt,Pn=(ye,_e)=>{for(var lt in _e||(_e={}))gt.call(_e,lt)&&Ot(ye,lt,_e[lt]);if(Ze)for(var lt of Ze(_e))Dn.call(_e,lt)&&Ot(ye,lt,_e[lt]);return ye},nn=(ye,_e)=>Pe(ye,rt(_e)),me=(ye,_e)=>{var lt={};for(var Me in ye)gt.call(ye,Me)&&_e.indexOf(Me)<0&&(lt[Me]=ye[Me]);if(ye!=null&&Ze)for(var Me of Ze(ye))_e.indexOf(Me)<0&&Dn.call(ye,Me)&&(lt[Me]=ye[Me]);return lt},he=(ye,_e,lt)=>new Promise((Me,Ue)=>{var it=xt=>{try{yt(lt.next(xt))}catch(At){Ue(At)}},ut=xt=>{try{yt(lt.throw(xt))}catch(At){Ue(At)}},yt=xt=>xt.done?Me(xt.value):Promise.resolve(xt.value).then(it,ut);yt((lt=lt.apply(ye,_e)).next())});function Dt(ye){return/^\d+$/.test(ye)?`${ye}px`:ye}function un(){}let _t=!1;const Fe={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function at(ye=[]){let _e=ye;if(Array.isArray(ye)){for(let lt=0;lt<ye.length;lt++){let Me=Fe[ye[lt]];if(Me)return Me}return _e[0]}return Fe[_e]||_e}let st=null;const cn=()=>he(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ye){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ye)}});var Bt=ye=>{var _e=ye,{width:lt="100%",height:Me="100%",value:Ue,language:it="javascript",style:ut={},options:yt={},overrideServices:xt={},theme:At="vs-dark",onEditBlur:Wt,isCopy:pn=!1,onSave:tn,autoHeight:le=!1,forbidCopy:te=!1,onChange:ee=un,editorDidMount:oe=un,onFocus:ue=un,onBreakPoint:ne=un,breakPointValue:ce=[],filename:Be="educoder.txt",errorLine:Ve,errorContent:Ye="",highlightLine:ge,openBreakPoint:Mt=!1,placeholder:ct="",showMiniMap:Ct=!0}=_e,Ht=me(_e,["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 dn=(0,ie.useRef)(),zt=(0,ie.useRef)({}),bn=(0,ie.useRef)(),Nn=(0,ie.useRef)(),Tn=(0,ie.useRef)([]),jn=(0,ie.useRef)(!1),zn=(0,ie.useRef)(),Hn=(0,ie.useRef)(),Un=(0,ie.useRef)(!1),[Rn,Wn]=(0,ie.useState)(!1);function vn(){let ot;return dn.current&&(ot=new et.Z(Je=>{for(let Ft of Je)(Ft.target.offsetHeight>0||Ft.target.offsetWidth>0)&&zt.current.instance.layout()}),ot.observe(dn.current)),ot}function tt(){Ie.ZP.warning({content:decodeURIComponent(Re),key:"monaco-editor-tip"})}const nt=()=>{let ot=zt.current.instance;if(Ue!=null&&ot&&Rn){const Je=ot.getModel();Je&&Ue!==Je.getValue()&&(_t=!0,Je.setValue(Ue),ot.layout(),_t=!1)}};(0,ie.useEffect)(()=>{const ot=Oe.Z.subscribe("formatDocument",Je=>{var Ft;let Mn=zt.current.instance;(Ft=Mn==null?void 0:Mn.getAction)==null||Ft.call(Mn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Je=>{ee(Je)},ot},[]),(0,ie.useEffect)(()=>{var ot;let Je=zt.current.instance;Nn.current&&clearTimeout(Nn.current),Nn.current=setTimeout(()=>{nt()},500),Ue&&(Ue!=null&&Ue.length)&&((ot=Je==null?void 0:Je.updateOptions)==null||ot.call(Je,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ue.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ue,Rn,zt.current]),(0,ie.useEffect)(()=>{if(Ve&&zt.current&&zt.current.instance){let Je=zt.current.instance;Je.changeViewZones(function(Ft){var Mn=document.createElement("div");Mn.style.padding="10px 20px",Mn.style.width="calc(100% - 20px)",Mn.className="my-error-line-wrp",Mn.innerHTML=Ye,Ft.addZone({afterLineNumber:Ve||11,heightInLines:3,domNode:Mn})});var ot={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}};Je.addOverlayWidget(ot),Je.revealPositionInCenter({lineNumber:20,column:1})}},[Ve,zt.current,Rn]);const Xe=(ot="",Je)=>{if(!ot||ot.trim()==="")return!0;const Mn=zt.current.instance.getModel().getLineTokens(Je);let Gn=!1;for(let we=0;we<2;we++)Mn.getStandardTokenType(we)===1&&(Gn=!0);return Gn};(0,ie.useEffect)(()=>{var ot;const Je=(ot=zt.current)==null?void 0:ot.instance;if(Je&&Rn&&te){const Ft=Je.onDidBlurEditorWidget(()=>{Un.current=!1}),Mn=Je.onDidFocusEditorText(()=>{Un.current=!0});return()=>{Ft.dispose(),Mn.dispose()}}},[zt.current,Rn,te]),(0,ie.useEffect)(()=>{var ot;if((ot=zt.current)!=null&&ot.instance&&Rn&&Mt){let Je=zt.current.instance,Ft=Je.getModel();if(!Ft)return;(()=>{var kt;let jt=[],vt=[];const qe=Ft.getAllDecorations();for(let yn of qe)yn.options.className==="highlighted-line"&&(jt.push((kt=yn==null?void 0:yn.range)==null?void 0:kt.startLineNumber),vt.push(yn==null?void 0:yn.id));if(ge===jt[0])return;Ft.deltaDecorations(vt,[]);const Gt=Ft.getLineCount();ge&&ge<=Gt&&(Je.deltaDecorations([],[{range:new st.Range(ge,1,ge,Ft.getLineMaxColumn(ge)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Je.revealLineInCenter(ge))})();const Gn=(kt=!1)=>{var jt;let vt=[],qe=[];const Gt=Ft.getAllDecorations();for(let yn of Gt)yn.options.linesDecorationsClassName==="breakpoints-select"&&(vt.push((jt=yn==null?void 0:yn.range)==null?void 0:jt.startLineNumber),qe.push(yn==null?void 0:yn.id));if(kt)return{lines:vt,ids:qe};ne(vt)},we=kt=>he(void 0,null,function*(){let jt={range:new st.Range(kt,1,kt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ft.deltaDecorations([],[jt]),Gn()}),Se=kt=>he(void 0,null,function*(){let jt=[];const vt=Je.getLineDecorations(kt);for(let qe of vt)qe.options.linesDecorationsClassName==="breakpoints-select"&&jt.push(qe.id);yield Ft.deltaDecorations(jt,[]),Gn()}),It=kt=>{let jt=Je.getLineDecorations(kt);for(let vt of jt)if(vt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,qt.isEqual)(ce,Gn(!0).lines)){Ft.deltaDecorations(Gn(!0).ids,[]);const kt=ce.map(jt=>({range:new st.Range(jt,1,jt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ft.deltaDecorations([],kt)}const bt=Je.onDidChangeModelContent(kt=>{let jt=Je.getPosition();if(jt){let vt=jt.lineNumber;clearTimeout(Hn.current),Hn.current=setTimeout(()=>{Xe(Ft.getLineContent(vt),vt)?Se(vt):It(vt)?(Se(vt),we(vt)):Gn()},100)}}),Ae=Je.onMouseDown(kt=>{var jt,vt,qe;if(kt.target.detail&&((qe=(vt=(jt=kt.target)==null?void 0:jt.element)==null?void 0:vt.className)!=null&&qe.includes("line-numbers"))){let Gt=kt.target.position.lineNumber;if(Xe(Ft.getLineContent(Gt),Gt))return;It(Gt)?Se(Gt):we(Gt)}}),ft=kt=>{let jt={range:new st.Range(kt,1,kt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Tn.current=Je.deltaDecorations(Tn.current,[jt])},Tt=()=>{Tn.current=Je.deltaDecorations(Tn.current,[])},Kt=Je.onMouseMove(kt=>{var jt,vt,qe;if(Tt(),kt.target.detail&&((qe=(vt=(jt=kt.target)==null?void 0:jt.element)==null?void 0:vt.className)!=null&&qe.includes("line-numbers"))){let Gt=kt.target.position.lineNumber;if(Xe(Ft.getLineContent(Gt),Gt))return;ft(Gt)}}),ln=Je.onMouseLeave(()=>{Tt()});return()=>{bt.dispose(),Ae.dispose(),Kt.dispose(),ln.dispose()}}},[zt.current,Rn,ce,ge,Mt,it]),(0,ie.useEffect)(()=>{var ot;(ot=zt.current)!=null&&ot.instance&&Mt&&zt.current.instance.setPosition({lineNumber:0,column:0})},[ge]);function Rt(){let ot=zt.current.instance;if(ot){const Je=ot.getSelection(),Ft=zt.current.pastePos||{},Mn=new st.Range(Ft.startLineNumber||Je.endLineNumber,Ft.startColumn||Je.endColumn,Ft.endLineNumber||Je.endLineNumber,Ft.endColumn||Je.endColumn);setTimeout(()=>{ot.executeEdits("",[{range:Mn,text:""}])},300)}}function St(ot){(window.navigator.platform.match("Mac")?ot.metaKey:ot.ctrlKey)&&ot.keyCode==83&&(ot.preventDefault(),tn())}const Zt=()=>{if(le&&zt.current.instance){const ot=zt.current.instance.getContentHeight();fn(ot<Me?Me:ot)}else fn(Me)};function on(ot){var Je=document.createEvent("MouseEvents");Je.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ot.dispatchEvent(Je)}const Ut=ot=>{if(!Un.current)return;const{keyCode:Je,ctrlKey:Ft,metaKey:Mn,target:Gn,type:we}=ot;return(we==="paste"||(Je===67||Je===86)&&(Mn||Ft))&&Gn.nodeName==="TEXTAREA"&&(tt(),ot.preventDefault()),!1};function Xt(ot,Je){var Ft=window.URL||window.webkitURL||window,Mn=new Blob([Je]),Gn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Gn.href=Ft.createObjectURL(Mn),Gn.download=ot,on(Gn)}(0,ie.useEffect)(()=>{Zt()},[Zt]),(0,ie.useEffect)(()=>{dn.current&&!Rn&&Promise.all([de.e(8909),de.e(4474)]).then(de.bind(de,71448)).then(ot=>{try{st=ot,zt.current.instance=st.editor.create(dn.current,{value:Ue,language:at(it),theme:At,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ct||!1}},xt);const Je=zt.current.instance;let Gn=[...pt.BH._menuItems].find(bt=>bt[0]._debugName=="EditorContext")[1],we=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Se=(bt,Ae)=>{var ft,Tt;let Kt=bt._first;do Ae.includes((Tt=(ft=Kt.element)==null?void 0:ft.command)==null?void 0:Tt.id)&&bt._remove(Kt);while(Kt=Kt.next)};if(oe(Je,st),setTimeout(()=>{Zt(),zt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Xt(Be||"educoder.txt",Je.getValue())}})},500),zt.current.subscription=Je.onDidChangeModelContent(bt=>{jn.current?clearTimeout(zn.current):(Zt(),ee(Je.getValue(),bt)),zn.current=setTimeout(()=>{jn.current=!1},500)}),window.Monaco||je(st,at(it)),te&&(Se(Gn,we),dn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ut),window.removeEventListener("paste",Ut),window.addEventListener("keydown",Ut),window.addEventListener("paste",Ut)),window.Monaco=st,Wt&&Je.onDidBlurEditorWidget(()=>{Wt(Je.getValue())}),ue&&Je.onDidFocusEditorText(()=>{te&&cn(),ue(Je.getValue())}),te){cn();try{Je.onDidPaste(bt=>{const Ae=Je.getSelection(),ft=zt.current.pastePos||{},Tt=new st.Range(ft.startLineNumber||Ae.endLineNumber,ft.startColumn||Ae.endColumn,ft.endLineNumber||Ae.endLineNumber,ft.endColumn||Ae.endColumn);Je.executeEdits("",[{range:bt.range,text:""}])})}catch(bt){}}let It=vn();return ct&&typeof ct=="string"&&new Et(ct,Je,st),Wn(!0),()=>{const bt=zt.current.instance;bt.dispose();const Ae=bt.getModel();Ae&&Ae.dispose(),zt.current.subscription&&zt.current.subscription.dispose(),It.unobserve(dn.current)}}catch(Je){}})},[]),(0,ie.useEffect)(()=>{if(zt.current.instance&&Rn)return document.addEventListener("keydown",St,!1),()=>{document.removeEventListener("keydown",St)}},[tn,Rn]),(0,ie.useEffect)(()=>{let ot=zt.current.instance;if(ot&&Rn){let Je=at(it);st.editor.setModelLanguage(ot.getModel(),Je)}},[it,Rn]),(0,ie.useEffect)(()=>{zt.current.instance&&Rn&&st.editor.setTheme(At)},[At,Rn]),(0,ie.useEffect)(()=>{let ot=zt.current.instance;bn.current=yt,ot&&Rn&&(ot.updateOptions(Pn({},yt)),setTimeout(()=>{ot.getModel().updateOptions(Pn({},yt))},200))},[JSON.stringify(yt),Rn]),(0,ie.useEffect)(()=>{let ot=zt.current.instance;ot&&Rn&&ot.layout()},[lt,Me,Rn]);const[gn,_n]=(0,ie.useState)(Dt(lt)),[Ln,fn]=(0,ie.useState)(Dt(Me)),Zn=nn(Pn({},ut),{width:gn,height:Ln,position:"relative"});return ie.createElement("div",{className:"my-monaco-editor",ref:dn,style:Zn,onFocus:()=>{te&&cn()}},pn&&ie.createElement(Qe.CopyToClipboard,{text:Ue,onCopy:()=>Ie.ZP.success("\u590D\u5236\u6210\u529F")},ie.createElement(mt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ie.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ie.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ne({width:ye="100%",height:_e="100%",original:lt,modified:Me,language:Ue,options:it={}}){const ut=(0,ie.useRef)(),[yt,xt]=(0,ie.useState)(null);function At(le){let te;return ut.current&&(te=new et.Z(ee=>{for(let oe of ee)(oe.target.offsetHeight>0||oe.target.offsetWidth>0)&&le.layout()}),te.observe(ut.current)),te}(0,ie.useEffect)(()=>(ut.current&&Promise.all([de.e(8909),de.e(9404)]).then(de.bind(de,2550)).then(le=>{st=le;const te=st.editor.createDiffEditor(ut.current,nn(Pn({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},it),{wordWrap:!0}));xt(te);let ee=At(te);return()=>{te.dispose();const oe=te.getModel();oe&&oe.dispose(),ee.unobserve(ut.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ie.useEffect)(()=>{yt&&yt.setModel({original:st.editor.createModel(lt,Ue),modified:st.editor.createModel(Me,Ue)})},[lt,Me,Ue,yt]);const Wt=Dt(ye),pn=Dt(_e),tn={width:Wt,height:pn};return ie.createElement("div",{className:"my-diff-editor",ref:ut,style:tn})}},61904:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return et}});var ie=de(59301);function et(Le,We){const ve=(0,ie.useRef)();(0,ie.useEffect)(()=>{ve.current=Le}),(0,ie.useEffect)(()=>{function ze(){ve.current()}if(We!==null){let Te=setInterval(ze,We);return()=>clearInterval(Te)}},[We])}},1287:function(Yt,en,de){"use strict";de.r(en),de.d(en,{default:function(){return vn}});var ie=de(59301),et=de(58106),Le=de(26869),We=de(77019),ve=de(5269),ze=de(7939),Te={wrap:"wrap___oiJRJ",head:"head___zCLJu",recommendItem:"recommendItem___Z46_0",buttonWrap:"buttonWrap___Gol4S",privateMessage:"privateMessage___UCiuy",flex1:"flex1___FVk7y",mWidth147:"mWidth147___f_pcl"},Ge=de(54694),Ce=Object.defineProperty,pe=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Re=(tt,nt,Xe)=>nt in tt?Ce(tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):tt[nt]=Xe,He=(tt,nt)=>{for(var Xe in nt||(nt={}))wt.call(nt,Xe)&&Re(tt,Xe,nt[Xe]);if(xe)for(var Xe of xe(nt))je.call(nt,Xe)&&Re(tt,Xe,nt[Xe]);return tt},Ee=(tt,nt)=>pe(tt,ke(nt)),dt=(tt,nt)=>{var Xe={};for(var Rt in tt)wt.call(tt,Rt)&&nt.indexOf(Rt)<0&&(Xe[Rt]=tt[Rt]);if(tt!=null&&xe)for(var Rt of xe(tt))nt.indexOf(Rt)<0&&je.call(tt,Rt)&&(Xe[Rt]=tt[Rt]);return Xe},ht=(tt,nt,Xe)=>new Promise((Rt,St)=>{var Zt=Xt=>{try{Ut(Xe.next(Xt))}catch(gn){St(gn)}},on=Xt=>{try{Ut(Xe.throw(Xt))}catch(gn){St(gn)}},Ut=Xt=>Xt.done?Rt(Xt.value):Promise.resolve(Xt.value).then(Zt,on);Ut((Xe=Xe.apply(tt,nt)).next())});const Lt=tt=>{var nt=tt,{user:Xe,forumsDetail:Rt,globalSetting:St,loading:Zt,dispatch:on}=nt,Ut=dt(nt,["user","forumsDetail","globalSetting","loading","dispatch"]),Xt,gn,_n,Ln;const{author_info:fn,memo:Zn,recommend_shixuns:ot}=Rt.forumsDetailData||{},Je=()=>ht(void 0,null,function*(){(fn!=null&&fn.watched?yield(0,Ge.Sr)({user_id:fn.login}):yield(0,Ge.YP)({user_id:fn.login}))&&on({type:"forumsDetail/setForumsDetailData",payload:Ee(He({},Rt.forumsDetailData),{author_info:Ee(He({},fn),{watched:!(fn!=null&&fn.watched)})})})});return ie.createElement("section",{className:Te.wrap},ie.createElement("aside",{className:"ml20"},ie.createElement("div",{className:`bg-white pt40 pb40 pl20 pr20 ${Te.head}`},ie.createElement("a",{href:`/users/${fn==null?void 0:fn.login}`,target:"_blank"},(fn==null?void 0:fn.image_url)&&ie.createElement("img",{src:`${Le.Z.API_SERVER}/images/${fn==null?void 0:fn.image_url}`})),ie.createElement("div",{className:"tc font20"},fn==null?void 0:fn.username),ie.createElement("div",{className:"tc c-grey-999"},fn==null?void 0:fn.identity),((Xt=Xe.userInfo)==null?void 0:Xt.user_id)!==(fn==null?void 0:fn.user_id)&&ie.createElement(We.Z,{justify:"center",className:`mt30 ${Te.buttonWrap}`},ie.createElement(ve.Z,null,ie.createElement(ze.ZP,{type:"primary",className:"mr10",onClick:Je},fn!=null&&fn.watched?"\u53D6\u6D88\u5173\u6CE8":"\u5173\u6CE8")),ie.createElement(ve.Z,null,ie.createElement(ze.ZP,{className:Te.privateMessage,href:`/messages/${(gn=Xe.userInfo)==null?void 0:gn.login}/message_detail?target_ids=${fn==null?void 0:fn.user_id}`,target:"_blank"},"\u79C1\u4FE1")))),!!((_n=Zn==null?void 0:Zn.tag)!=null&&_n.length)&&ie.createElement("div",{className:"bg-white mt10 pt40 pb40 pl20 pr20"},ie.createElement("div",{className:"font16"},"\u8BDD\u9898\u6807\u7B7E"),ie.createElement("div",{className:`mt10 ${Te.tag}`},(Ln=Zn==null?void 0:Zn.tag)==null?void 0:Ln.map((Ft,Mn)=>ie.createElement("span",{key:Mn,className:"c-light-primary mr10"},Ft)))),ie.createElement("div",{className:"pt10 pb10 pl10 pr10"},ie.createElement("div",{className:"font16 mb20"},"\u63A8\u8350\u5B9E\u8BAD"),ie.createElement("div",{className:Te.recommend},ot==null?void 0:ot.map(Ft=>ie.createElement("div",{className:Te.recommendItem},ie.createElement("a",{href:`/shixuns/${Ft.identifier}/challenges`,target:"_blank"},ie.createElement("img",{alt:Ft.id,src:`${Ft.image_url}`})),ie.createElement("div",{className:`${Te.flex1} ml10`},ie.createElement("a",{href:`/shixuns/${Ft.identifier}/challenges`,target:"_blank",title:Ft.name,className:`${Te.mWidth147} multi-llipsis1e c-grey-666 mb10`},Ft.name),ie.createElement("div",{className:"c-grey-999"},Ft.myshixuns_count," \u4EBA\u5B66\u4E60"))))))))};var Et=(0,et.connect)(({user:tt,forumsDetail:nt,loading:Xe,globalSetting:Rt})=>({user:tt,forumsDetail:nt,globalSetting:Rt,loading:Xe.models.forumsDetail}))(Lt),pt=de(56656),Ie=de.n(pt),mt=de(59944),qt=de(6767),Oe=de(62957),Qe=de(37568),Pt=de(93041),Pe=de(91882),rt=de(25399),Ze=de(75727),gt=de(77834),Dn=de(26227),Ot={flex_box_center:"flex_box_center___nMc3G",flex_space_between:"flex_space_between___gTlaF",flex_box_vertical_center:"flex_box_vertical_center___GQv6O",flex_box_center_end:"flex_box_center_end___nrFEP",flex_box_column:"flex_box_column___Ls1oQ",reply:"reply___jb23w",replyList:"replyList___ryiUt",comment:"comment___QJ1eT",content:"content___X2UnY",commentItem:"commentItem___h_wnY"},Pn=Object.defineProperty,nn=Object.defineProperties,me=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,_t=(tt,nt,Xe)=>nt in tt?Pn(tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):tt[nt]=Xe,Fe=(tt,nt)=>{for(var Xe in nt||(nt={}))Dt.call(nt,Xe)&&_t(tt,Xe,nt[Xe]);if(he)for(var Xe of he(nt))un.call(nt,Xe)&&_t(tt,Xe,nt[Xe]);return tt},at=(tt,nt)=>nn(tt,me(nt)),st=(tt,nt,Xe)=>new Promise((Rt,St)=>{var Zt=Xt=>{try{Ut(Xe.next(Xt))}catch(gn){St(gn)}},on=Xt=>{try{Ut(Xe.throw(Xt))}catch(gn){St(gn)}},Ut=Xt=>Xt.done?Rt(Xt.value):Promise.resolve(Xt.value).then(Zt,on);Ut((Xe=Xe.apply(tt,nt)).next())});Ie().locale("ZH-cn");function cn({user:tt,vlist:nt=[],dispatch:Xe,params:Rt,id:St,memo_replies:Zt,forumsDetail:on}){return ie.createElement("aside",{className:Ot.comment},nt.map(function(Ut,Xt){var gn,_n;return ie.createElement(We.Z,{key:Xt,className:Ot.commentItem},ie.createElement(ve.Z,{span:24},ie.createElement(We.Z,null,ie.createElement(ve.Z,{flex:"1"},ie.createElement("a",{href:`/users/${Ut.user_login}`,target:"_blank",className:"c-light-black"},Ut==null?void 0:Ut.username),ie.createElement("span",{className:"c-light-black ml10"},Ut.time)),(Ut.can_delete||Ut.user_id===((gn=tt.userInfo)==null?void 0:gn.user_id)||Ut.user_login===((_n=tt.userInfo)==null?void 0:_n.login))&&ie.createElement(ve.Z,{className:"forums-comment-delete",style:{display:"none"}},ie.createElement(rt.Z,{title:"\u5220\u9664"},ie.createElement(Dn.Z,{className:"current",onClick:()=>{Oe.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ie.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>st(this,null,function*(){const Ln=yield(0,Ge.sW)({id:Ut.id}),fn=Zt.find(Zn=>Zn.id===St).children.filter(Zn=>Zn.id!==Ut.id);Zt.find(Zn=>Zn.id===St).children=fn,Xe({type:"forumsDetail/setForumsDetailData",payload:at(Fe({},on.forumsDetailData),{memo_replies:[...Zt]})})})})}}))))),ie.createElement(ve.Z,null,ie.createElement(mt.Z,{value:Ut.content})))}))}var Bt=cn,Ne=de(31735),ye=Object.defineProperty,_e=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,ut=(tt,nt,Xe)=>nt in tt?ye(tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):tt[nt]=Xe,yt=(tt,nt)=>{for(var Xe in nt||(nt={}))Ue.call(nt,Xe)&&ut(tt,Xe,nt[Xe]);if(Me)for(var Xe of Me(nt))it.call(nt,Xe)&&ut(tt,Xe,nt[Xe]);return tt},xt=(tt,nt)=>_e(tt,lt(nt)),At=(tt,nt)=>{var Xe={};for(var Rt in tt)Ue.call(tt,Rt)&&nt.indexOf(Rt)<0&&(Xe[Rt]=tt[Rt]);if(tt!=null&&Me)for(var Rt of Me(tt))nt.indexOf(Rt)<0&&it.call(tt,Rt)&&(Xe[Rt]=tt[Rt]);return Xe},Wt=(tt,nt,Xe)=>new Promise((Rt,St)=>{var Zt=Xt=>{try{Ut(Xe.next(Xt))}catch(gn){St(gn)}},on=Xt=>{try{Ut(Xe.throw(Xt))}catch(gn){St(gn)}},Ut=Xt=>Xt.done?Rt(Xt.value):Promise.resolve(Xt.value).then(Zt,on);Ut((Xe=Xe.apply(tt,nt)).next())});Ie().locale("ZH-cn");const pn=(tt,nt)=>{var Xe=tt,{user:Rt,forumsDetail:St,globalSetting:Zt,loading:on,dispatch:Ut,handleClick:Xt}=Xe,gn=At(Xe,["user","forumsDetail","globalSetting","loading","dispatch","handleClick"]);const{memo:_n,memo_replies:Ln}=St.forumsDetailData||{},fn=(0,et.useParams)(),[Zn,ot]=(0,ie.useState)(""),[Je,Ft]=(0,ie.useState)(""),[Mn,Gn]=(0,ie.useState)(-1),[we,Se]=(0,ie.useState)(!1),[It,bt]=(0,ie.useState)(1),[Ae,ft]=(0,ie.useState)(!1);(0,ie.useImperativeHandle)(nt,()=>({onMdFouch:ln})),(0,ie.useEffect)(()=>{Se((_n==null?void 0:_n.replies_count)>10)},[_n==null?void 0:_n.replies_count]);const Tt=()=>Wt(void 0,null,function*(){var kt;const jt=It+1;bt(jt);const vt=yield(0,Ge.z5)({id:fn.memoId,page:jt});vt!=null&&vt.memo_replies&&(Ut({type:"forumsDetail/setForumsDetailData",payload:xt(yt({},St.forumsDetailData),{memo_replies:[...Ln,...vt.memo_replies]})}),Se(((kt=vt.memo_replies)==null?void 0:kt.length)===10))}),Kt=kt=>{var jt,vt,qe,Gt;return xt(yt({},kt),{image_url:(jt=Rt.userInfo)==null?void 0:jt.image_url,children:[],user_id:(vt=Rt.userInfo)==null?void 0:vt.user_id,user_login:(qe=Rt.userInfo)==null?void 0:qe.login,username:(Gt=Rt.userInfo)==null?void 0:Gt.username,time:`${(0,Ne.li)((new Date().getTime()-new Date(kt.created_at).getTime())/1e3)}\u524D`})},ln=()=>{ft(!0)};return ie.createElement("section",{className:Ot.wrap},!!(Ln!=null&&Ln.length)&&ie.createElement("aside",{className:Ot.content},ie.createElement("div",{style:{padding:"10px 15px 5px 15px",justifyContent:"space-between",display:"flex"}},ie.createElement("span",null,"\u5168\u90E8\u56DE\u590D\uFF08",_n.replies_count,"\uFF09")),ie.createElement("aside",{className:Ot.replyList},Ln==null?void 0:Ln.map(function(kt,jt){var vt;return ie.createElement(We.Z,{gutter:[12,12],key:jt},ie.createElement(ve.Z,{flex:"40px"},ie.createElement("a",{href:`/users/${kt.user_login}`,target:"_blank"},ie.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"50",height:"50",src:`${Le.Z.IMG_SERVER}/images/${kt==null?void 0:kt.image_url}`}))),ie.createElement(ve.Z,{flex:"1"},ie.createElement(We.Z,{align:"middle"},ie.createElement(ve.Z,{span:24},ie.createElement("a",{href:`/users/${kt.user_login}`,target:"_blank"},ie.createElement("span",{className:"c-light-black"},kt==null?void 0:kt.username)),ie.createElement("span",{className:"c-light-black ml10"},kt.time)),ie.createElement(ve.Z,{span:24},ie.createElement("div",{onClick:Xt},ie.createElement(mt.Z,{value:kt.content}))),!!((vt=kt==null?void 0:kt.children)!=null&&vt.length)&&ie.createElement(Bt,{user:Rt,id:kt==null?void 0:kt.id,vlist:kt==null?void 0:kt.children,dispatch:Ut,params:fn,memo_replies:Ln,forumsDetail:St}),ie.createElement(ve.Z,{span:24,className:"mt5 c-light-black"},Mn===jt?ie.createElement("aside",null,ie.createElement(gt.Z,{onChange:qe=>{Ft(qe)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),ie.createElement(We.Z,null,ie.createElement(ve.Z,{span:24,className:"tr"},ie.createElement(ze.ZP,{type:"primary",size:"middle",onClick:()=>Wt(this,null,function*(){if(Je==="")qt.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const qe=yield(0,Ge.ts)({parent_id:kt.id,content:Je});Ft(null),qe&&(Gn(-1),Ln.find(Gt=>Gt.id===qe.parent_id).children.push(Kt(qe)),Ut({type:"forumsDetail/setForumsDetailData",payload:xt(yt({},St.forumsDetailData),{memo:xt(yt({},_n),{replies_count:_n.replies_count+1}),memo_replies:[...Ln]})}))}})},"\u53D1\u9001")))):ie.createElement("div",{className:"tr"},ie.createElement("span",{className:"iconfont icon-huifu1 mr15 ml30 current",onClick:()=>Gn(jt)}),ie.createElement(rt.Z,{title:kt.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ie.createElement("span",{className:kt.user_praise?"c-orange":"c-gery-888"},ie.createElement("i",{className:"iconfont icon-dianzan mr3 current",onClick:()=>Wt(this,null,function*(){const qe=yield(0,Ge.vL)({id:kt.id,container_type:"Memo",type:kt.user_praise?0:1});(qe==null?void 0:qe.praise_count)>=0&&(Ln.find(Gt=>Gt.id===kt.id).user_praise=!kt.user_praise,Ln.find(Gt=>Gt.id===kt.id).praise_count=qe==null?void 0:qe.praise_count,Ut({type:"forumsDetail/setForumsDetailData",payload:xt(yt({},St.forumsDetailData),{memo_replies:[...Ln]})}))})}),kt.praise_count>0?kt.praise_count:"")))))))}))),we&&ie.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center"}},ie.createElement(We.Z,{justify:"space-between"},ie.createElement(ve.Z,null),ie.createElement(ve.Z,null,we&&ie.createElement("a",{className:"c-black",onClick:Tt},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA")))),ie.createElement("aside",{className:Ot.reply},ie.createElement(gt.Z,{onBlur:()=>ft(!1),isFocus:Ae,defaultValue:Zn,id:"writeForumsReviewId",onChange:kt=>{ot(kt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ie.createElement(We.Z,null,ie.createElement(ve.Z,{flex:"1"}),ie.createElement(ve.Z,null,ie.createElement(ze.ZP,{type:"primary",size:"middle",onClick:()=>Wt(void 0,null,function*(){if(Zn==="")qt.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const kt=yield(0,Ge.ts)({parent_id:_n.id,content:Zn});ot(null),kt&&Ut({type:"forumsDetail/setForumsDetailData",payload:xt(yt({},St.forumsDetailData),{memo:xt(yt({},_n),{replies_count:_n.replies_count+1}),memo_replies:[Kt(kt),...Ln]})})}})},"\u53D1\u9001")))))};var tn=(0,et.connect)(({user:tt,forumsDetail:nt,loading:Xe,globalSetting:Rt})=>({user:tt,forumsDetail:nt,globalSetting:Rt,loading:Xe.models.forumsDetail}),null,null,{forwardRef:!0})((0,ie.forwardRef)(pn)),le={wrap:"wrap___Soi3l",header:"header___vk3EC",title:"title___WJAyR",menu:"menu___yMPKF",top:"top___ZqzEM",line:"line___EQKlG",flexCenter:"flexCenter___Rcnhr",like:"like___uNtmq",canLike:"canLike___Lu04z",attachmentName:"attachmentName___nwdzp"},te=de(87169),ee=de(421),oe=de(94276),ue=Object.defineProperty,ne=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,ge=(tt,nt,Xe)=>nt in tt?ue(tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):tt[nt]=Xe,Mt=(tt,nt)=>{for(var Xe in nt||(nt={}))Ve.call(nt,Xe)&&ge(tt,Xe,nt[Xe]);if(Be)for(var Xe of Be(nt))Ye.call(nt,Xe)&&ge(tt,Xe,nt[Xe]);return tt},ct=(tt,nt)=>ne(tt,ce(nt)),Ct=(tt,nt)=>{var Xe={};for(var Rt in tt)Ve.call(tt,Rt)&&nt.indexOf(Rt)<0&&(Xe[Rt]=tt[Rt]);if(tt!=null&&Be)for(var Rt of Be(tt))nt.indexOf(Rt)<0&&Ye.call(tt,Rt)&&(Xe[Rt]=tt[Rt]);return Xe},Ht=(tt,nt,Xe)=>new Promise((Rt,St)=>{var Zt=Xt=>{try{Ut(Xe.next(Xt))}catch(gn){St(gn)}},on=Xt=>{try{Ut(Xe.throw(Xt))}catch(gn){St(gn)}},Ut=Xt=>Xt.done?Rt(Xt.value):Promise.resolve(Xt.value).then(Zt,on);Ut((Xe=Xe.apply(tt,nt)).next())});const dn={5:"\u6280\u672F\u5206\u4EAB",3:"\u64CD\u4F5C\u6307\u5357",16:"\u901A\u77E5\u516C\u544A"},zt=tt=>{var nt=tt,{user:Xe,forumsDetail:Rt,globalSetting:St,loading:Zt,dispatch:on}=nt,Ut=Ct(nt,["user","forumsDetail","globalSetting","loading","dispatch"]),Xt,gn,_n,Ln,fn;const{author_info:Zn,memo:ot,attachments_list:Je}=Rt.forumsDetailData||{},Ft=(0,ie.useRef)(),Mn=(0,ie.useRef)(),Gn=()=>Ht(void 0,null,function*(){const Tt={id:ot.id,sticky:ot.sticky?0:1},Kt=yield(0,Ge.B0)(Tt);(Kt==null?void 0:Kt.status)===0&&on({type:"forumsDetail/setForumsDetailData",payload:ct(Mt({},Rt.forumsDetailData),{memo:ct(Mt({},ot),{sticky:!(ot!=null&&ot.sticky)})})})}),we=()=>Ht(void 0,null,function*(){const Tt=yield(0,Ge.sW)({id:ot==null?void 0:ot.id});(Tt==null?void 0:Tt.status)===0&&(qt.ZP.success("\u5220\u9664\u6210\u529F"),et.history.push("/forums")),(Tt==null?void 0:Tt.status)===-1&&et.history.push("/forums")}),Se=()=>Ht(void 0,null,function*(){Oe.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5956\u52B1\u8BBE\u7F6E",content:ie.createElement("div",{className:"font14 tc"},ie.createElement(Qe.default,{defaultValue:Ft.current,onChange:Tt=>Ft.current=Tt.target.value})),onOk:()=>Ht(void 0,null,function*(){const Tt=yield(0,Ge.eh)({id:ot==null?void 0:ot.id,container_type:"Memo",score:Ft.current?Number(Ft.current):0,user_id:Zn==null?void 0:Zn.user_id});if(Ft.current=null,(Tt==null?void 0:Tt.code)>0){on({type:"forumsDetail/setForumsDetailData",payload:ct(Mt({},Rt.forumsDetailData),{memo:ct(Mt({},ot),{reward:Tt==null?void 0:Tt.code})})}),qt.ZP.success("\u5956\u52B1\u6210\u529F");return}qt.ZP.success("\u5956\u52B1\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7CFB\u7EDF\u7BA1\u7406\u5458\uFF01")})})}),It=()=>{Mn.current.onMdFouch&&Mn.current.onMdFouch()},bt=()=>Ht(void 0,null,function*(){const Tt=yield(0,Ge.vL)({id:ot.id,container_type:"Memo",type:1});(Tt==null?void 0:Tt.praise_count)>=0&&on({type:"forumsDetail/setForumsDetailData",payload:ct(Mt({},Rt.forumsDetailData),{memo:ct(Mt({},ot),{user_praise:!(ot!=null&&ot.user_praise),memo_praise_count:Tt==null?void 0:Tt.praise_count})})})}),Ae=ie.createElement(Pt.default,{className:le.menu},((Xt=Xe.userInfo)==null?void 0:Xt.admin)&&(ot==null?void 0:ot.sticky)&&ie.createElement(Pt.default.Item,null,ie.createElement("a",{onClick:()=>Gn()},"\u53D6\u6D88\u7F6E\u9876")),((gn=Xe.userInfo)==null?void 0:gn.admin)&&!(ot!=null&&ot.sticky)&&ie.createElement(Pt.default.Item,null,ie.createElement("a",{onClick:()=>Gn()},"\u7F6E\xA0\xA0\u9876")),ie.createElement(Pt.default.Item,null,ie.createElement(et.Link,{to:`/forums/${ot==null?void 0:ot.id}/edit`},"\u7F16\xA0\xA0\u8F91")),ie.createElement(Pt.default.Item,null,ie.createElement("a",{onClick:()=>{Oe.default.confirm({title:"\u63D0\u793A",icon:ie.createElement(te.Z,null),content:"\u5E16\u5B50\u5C06\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u6062\u590D\u3002\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",okText:"\u786E\u8BA4",onOk:()=>{we()},cancelText:"\u53D6\u6D88"})}},"\u5220\xA0\xA0\u9664"))),ft=Tt=>{let{nodeName:Kt,src:ln}=Tt.target;Kt==="IMG"&&(oe.Z.publish("preview-image",ln),console.log("src:",ln))};return(0,ie.useEffect)(()=>{},[]),ie.createElement("section",{className:le.wrap},ie.createElement(Pe.Z,{separator:"/",className:"mb5"},ie.createElement(Pe.Z.Item,null,ie.createElement(et.Link,{to:`/forums/categories/${ot==null?void 0:ot.forum_id}`},dn[ot==null?void 0:ot.forum_id])),ie.createElement(Pe.Z.Item,null,"\u8BE6\u60C5")),ie.createElement("header",{className:`bg-white pt40 pb40 pl30 pr30 ${le.header}`},ie.createElement(We.Z,{align:"middle"},ie.createElement(ve.Z,{flex:1,className:"font24 mb5"},ie.createElement("span",{className:le.title},ot==null?void 0:ot.subject),(ot==null?void 0:ot.sticky)&&ie.createElement("span",{className:le.top},"\u7F6E\u9876"),!!(ot!=null&&ot.reward)&&ie.createElement(rt.Z,{placement:"bottom",title:`\u83B7\u5F97\u5E73\u53F0\u5956\u52B1\u91D1\u5E01\uFF1A${ot==null?void 0:ot.reward}`},ie.createElement("span",{className:"ml10 c-orange-ff7"},ie.createElement("i",{className:"iconfont icon-gift font16 mr5"}),ie.createElement("span",{className:"font14"},ot==null?void 0:ot.reward)))),ie.createElement(ve.Z,null,(((_n=Xe.userInfo)==null?void 0:_n.admin)||((Ln=Xe.userInfo)==null?void 0:Ln.user_id)===(Zn==null?void 0:Zn.user_id))&&ie.createElement(Ze.Z,{dropdownRender:()=>Ae},ie.createElement("i",{className:"fa fa-bars font-16 current c-grey-bcb"})))),ie.createElement(We.Z,{align:"middle",className:"font14"},ie.createElement(ve.Z,{flex:1,className:"c-grey-999"},ie.createElement("span",null,Ie()(ot==null?void 0:ot.time).fromNow()," \u66F4\u65B0")),ie.createElement(ve.Z,{className:"c-grey-999"},((fn=Xe.userInfo)==null?void 0:fn.admin)&&ie.createElement(rt.Z,{placement:"bottom",title:"\u5E16\u5B50\u5956\u52B1"},ie.createElement("span",{className:`current pr10 ${le.line}`,onClick:Se},ie.createElement("i",{className:"iconfont icon-jiangli font18 mr5"}))),ie.createElement("span",{className:`pr10 pl10 ${ot!=null&&ot.replies_count?le.line:""}`},ie.createElement("i",{className:"iconfont icon-liulanyan font18 mr5"}),ot==null?void 0:ot.viewed_count),!!(ot!=null&&ot.replies_count)&&ie.createElement(rt.Z,{placement:"bottom",title:"\u5199\u8BC4\u8BBA"},ie.createElement("span",{className:"current pl10",onClick:It},ie.createElement("i",{className:"iconfont icon-huifu1 font18 mr5"}),ot==null?void 0:ot.replies_count))))),ie.createElement("main",{className:"bg-white pt40 pb40 pl40 pr40"},ie.createElement("div",{onClick:ft},ie.createElement(mt.Z,{value:ot==null?void 0:ot.content})),ie.createElement("div",{className:"bg-white pl40 pr40 mt40"},ie.createElement("div",{className:`mt10 mb20 ${le.flexCenter}`},ie.createElement("div",{className:`${le.like} ${ot!=null&&ot.user_praise?"":le.canLike}`,onClick:bt},ie.createElement("i",{className:"iconfont icon-dianzan font18"}),ie.createElement("br",null),ie.createElement("span",null,ot==null?void 0:ot.memo_praise_count)))),!!(Je!=null&&Je.length)&&ie.createElement("div",{className:"mt40"},Je==null?void 0:Je.map(Tt=>ie.createElement("div",{className:`c-grey-888 ${le.flexCenter}`},ie.createElement("i",{className:"iconfont icon-fujian mr10 font14 c-green-29b"}),ie.createElement("a",{href:Tt==null?void 0:Tt.url,title:Tt==null?void 0:Tt.title,className:`${le.attachmentName} mr10`},Tt==null?void 0:Tt.title),ie.createElement("span",{className:"font12 c-grey-666 mt3"},Tt==null?void 0:Tt.filesize))))),ie.createElement(tn,{ref:Mn,handleClick:ft}),ie.createElement(ee.Z,null))};var bn=(0,et.connect)(({user:tt,forumsDetail:nt,loading:Xe,globalSetting:Rt})=>({user:tt,forumsDetail:nt,globalSetting:Rt,loading:Xe.effects}))(zt),Nn={flex:"flex___fgmSn"},Tn=de(29787),jn=Object.getOwnPropertySymbols,zn=Object.prototype.hasOwnProperty,Hn=Object.prototype.propertyIsEnumerable,Un=(tt,nt)=>{var Xe={};for(var Rt in tt)zn.call(tt,Rt)&&nt.indexOf(Rt)<0&&(Xe[Rt]=tt[Rt]);if(tt!=null&&jn)for(var Rt of jn(tt))nt.indexOf(Rt)<0&&Hn.call(tt,Rt)&&(Xe[Rt]=tt[Rt]);return Xe},Rn=(tt,nt,Xe)=>new Promise((Rt,St)=>{var Zt=Xt=>{try{Ut(Xe.next(Xt))}catch(gn){St(gn)}},on=Xt=>{try{Ut(Xe.throw(Xt))}catch(gn){St(gn)}},Ut=Xt=>Xt.done?Rt(Xt.value):Promise.resolve(Xt.value).then(Zt,on);Ut((Xe=Xe.apply(tt,nt)).next())});const Wn=tt=>{var nt=tt,{forumsDetail:Xe,globalSetting:Rt,loading:St,dispatch:Zt}=nt,on=Un(nt,["forumsDetail","globalSetting","loading","dispatch"]);const Ut=(0,et.useParams)(),[Xt,gn]=(0,ie.useState)(!1);(0,ie.useEffect)(()=>{_n()},[Ut.memoId]);const _n=()=>Rn(void 0,null,function*(){gn(!0);let Ln=yield Zt({type:"forumsDetail/getForumsDetailData",payload:{id:Ut.memoId}});gn(!1)});return ie.createElement(Tn.Z,{spinning:Xt},ie.createElement("section",{className:`edu-container mb20 mt30 ${Nn.flex}`},ie.createElement(bn,null),ie.createElement(Et,null)))};var vn=(0,et.connect)(({forumsDetail:tt,loading:nt,globalSetting:Xe})=>({forumsDetail:tt,globalSetting:Xe,loading:nt.models.forumsDetail}))(Wn)},58489:function(Yt,en,de){"use strict";de.d(en,{AL:function(){return Et},Iy:function(){return ke},Qv:function(){return je},ez:function(){return Lt},jb:function(){return xe}});var ie=de(32834),et=de.n(ie),Le=de(11690),We=de.n(Le);let ve=1;function ze(Oe,Qe){const Pt=Oe.match(/^(\s+)(?:```)/);if(Pt===null)return Qe;const Pe=Pt[1];return Qe.split(`
`).map(rt=>{const Ze=rt.match(/^\s+/);if(Ze===null)return rt;const[gt]=Ze;return gt.length>=Pe.length?rt.slice(Pe.length):rt}).join(`
`)}let Te=[],Ge=["<ul>"];const Ce=new(et()).Renderer,pe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ke(){Te.length=0,Ge=["<ul>"]}const xe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function wt(Oe,Qe,Pt,Pe){if(Qe>=Oe.length||Oe[Qe].level<=Pt)return Qe;var rt=Oe[Qe];Pe.push("<li><a href='#"+ve+rt.anchor+"'>"+rt.text+"</a>"),Qe++;var Ze=[];return Qe=wt(Oe,Qe,rt.level,Ze),Ze.length>0&&(Pe.push("<ul>"),Ze.forEach(function(gt){Pe.push(gt)}),Pe.push("</ul>")),Pe.push("</li>"),Qe=wt(Oe,Qe,Pt,Pe),Qe}function je(){return wt(Te,0,0,Ge),Ge.push("</ul>"),Ge.join("")}const Re={heading(Oe){const Qe=pe.exec(Oe);if(ve+=1,Qe)return{type:"heading",raw:Qe[0],depth:Qe[1].length,text:Qe[2]}},fences(Oe){const Qe=this.rules.block.fences.exec(Oe);if(Qe){const Pt=Qe[0];let Pe=ze(Pt,Qe[3]||"");const rt=Qe[2]?Qe[2].trim():Qe[2];if(["latex","katex","math"].indexOf(rt)>=0){const Ze=dt(),gt=Pe;Pe=Ze,ht[Ze]={type:"block",expression:gt}}return{type:"code",raw:Pt,lang:rt,text:Pe}}}},He=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ee=0;const dt=()=>`__special_katext_id_${Ee++}__`;let ht={};function Lt(){return ht}function Et(){Ee=0,ht={}}function pt(Oe){return Oe=Oe.replace(He,(Qe,Pt)=>{const Pe=dt();return ht[Pe]={type:"inline",expression:Pt},Pe}),Oe}const Ie=Ce.listitem;Ce.listitem=function(Oe){return Ie(pt(Oe))};const mt=Ce.paragraph;Ce.paragraph=function(Oe){return mt(pt(Oe))};const qt=Ce.tablecell;Ce.tablecell=function(Oe,Qe){return qt(pt(Oe),Qe)},Ce.code=function(Oe,Qe,Pt){const Pe=(Qe||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`<p class='editormd-tex'>${Oe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Qe}">${Pt?Oe:(0,Le.escape)(Oe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Pt?Oe:(0,Le.escape)(Oe,!0))+"</code></pre>"},Ce.heading=function(Oe,Qe,Pt){let Pe=this.options.headerPrefix+Pt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Te.push({anchor:Pe,level:Qe,text:Oe}),"<h"+Qe+' id="'+ve+Pe+'">'+Oe+"</h"+Qe+">"},et().setOptions({silent:!0,gfm:!0,pedantic:!1}),et().use({tokenizer:Re,renderer:Ce}),en.ZP=et()},99498:function(Yt,en,de){(function(ie){ie(de(89780))})(function(ie){ie.defineOption("placeholder","",function(Ge,Ce,pe){var ke=pe&&pe!=ie.Init;if(Ce&&!ke)Ge.on("blur",ve),Ge.on("change",ze),Ge.on("swapDoc",ze),ie.on(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose=function(){We(Ge)}),ze(Ge);else if(!Ce&&ke){Ge.off("blur",ve),Ge.off("change",ze),Ge.off("swapDoc",ze),ie.off(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose),et(Ge);var xe=Ge.getWrapperElement();xe.className=xe.className.replace(" CodeMirror-empty","")}Ce&&!Ge.hasFocus()&&ve(Ge)});function et(Ge){Ge.state.placeholder&&(Ge.state.placeholder.parentNode.removeChild(Ge.state.placeholder),Ge.state.placeholder=null)}function Le(Ge){et(Ge);var Ce=Ge.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=Ge.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var pe=Ge.getOption("placeholder");typeof pe=="string"&&(pe=document.createTextNode(pe)),Ce.appendChild(pe),Ge.display.lineSpace.insertBefore(Ce,Ge.display.lineSpace.firstChild)}function We(Ge){setTimeout(function(){var Ce=!1,pe=Ge.getInputField();pe.nodeName=="TEXTAREA"?Ce=!pe.value:Ge.lineCount()==1&&(Ce=!/[^\u200b]/.test(pe.querySelector(".CodeMirror-line").textContent)),Ce?Le(Ge):et(Ge)},20)}function ve(Ge){Te(Ge)&&Le(Ge)}function ze(Ge){var Ce=Ge.getWrapperElement(),pe=Te(Ge);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(pe?" CodeMirror-empty":""),pe?Le(Ge):et(Ge)}function Te(Ge){return Ge.lineCount()===1&&Ge.getLine(0)===""}})},25717:function(Yt,en,de){(function(ie){ie(de(89780))})(function(ie){var et={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Le=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(Re,He,Ee){Ee&&Ee!=ie.Init&&(Re.removeKeyMap(ve),Re.state.closeBrackets=null),He&&(ze(We(He,"pairs")),Re.state.closeBrackets=He,Re.addKeyMap(ve))});function We(Re,He){return He=="pairs"&&typeof Re=="string"?Re:typeof Re=="object"&&Re[He]!=null?Re[He]:et[He]}var ve={Backspace:Ce,Enter:pe};function ze(Re){for(var He=0;He<Re.length;He++){var Ee=Re.charAt(He),dt="'"+Ee+"'";ve[dt]||(ve[dt]=Te(Ee))}}ze(et.pairs+"`");function Te(Re){return function(He){return xe(He,Re)}}function Ge(Re){var He=Re.state.closeBrackets;if(!He||He.override)return He;var Ee=Re.getModeAt(Re.getCursor());return Ee.closeBrackets||He}function Ce(Re){var He=Ge(Re);if(!He||Re.getOption("disableInput"))return ie.Pass;for(var Ee=We(He,"pairs"),dt=Re.listSelections(),ht=0;ht<dt.length;ht++){if(!dt[ht].empty())return ie.Pass;var Lt=wt(Re,dt[ht].head);if(!Lt||Ee.indexOf(Lt)%2!=0)return ie.Pass}for(var ht=dt.length-1;ht>=0;ht--){var Et=dt[ht].head;Re.replaceRange("",Le(Et.line,Et.ch-1),Le(Et.line,Et.ch+1),"+delete")}}function pe(Re){var He=Ge(Re),Ee=He&&We(He,"explode");if(!Ee||Re.getOption("disableInput"))return ie.Pass;for(var dt=Re.listSelections(),ht=0;ht<dt.length;ht++){if(!dt[ht].empty())return ie.Pass;var Lt=wt(Re,dt[ht].head);if(!Lt||Ee.indexOf(Lt)%2!=0)return ie.Pass}Re.operation(function(){var Et=Re.lineSeparator()||`
`;Re.replaceSelection(Et+Et,null),Re.execCommand("goCharLeft"),dt=Re.listSelections();for(var pt=0;pt<dt.length;pt++){var Ie=dt[pt].head.line;Re.indentLine(Ie,null,!0),Re.indentLine(Ie+1,null,!0)}})}function ke(Re){var He=ie.cmpPos(Re.anchor,Re.head)>0;return{anchor:new Le(Re.anchor.line,Re.anchor.ch+(He?-1:1)),head:new Le(Re.head.line,Re.head.ch+(He?1:-1))}}function xe(Re,He){var Ee=Ge(Re);if(!Ee||Re.getOption("disableInput"))return ie.Pass;var dt=We(Ee,"pairs"),ht=dt.indexOf(He);if(ht==-1)return ie.Pass;for(var Lt=We(Ee,"closeBefore"),Et=We(Ee,"triples"),pt=dt.charAt(ht+1)==He,Ie=Re.listSelections(),mt=ht%2==0,qt,Oe=0;Oe<Ie.length;Oe++){var Qe=Ie[Oe],Pt=Qe.head,Pe,rt=Re.getRange(Pt,Le(Pt.line,Pt.ch+1));if(mt&&!Qe.empty())Pe="surround";else if((pt||!mt)&&rt==He)pt&&je(Re,Pt)?Pe="both":Et.indexOf(He)>=0&&Re.getRange(Pt,Le(Pt.line,Pt.ch+3))==He+He+He?Pe="skipThree":Pe="skip";else if(pt&&Pt.ch>1&&Et.indexOf(He)>=0&&Re.getRange(Le(Pt.line,Pt.ch-2),Pt)==He+He){if(Pt.ch>2&&/\bstring/.test(Re.getTokenTypeAt(Le(Pt.line,Pt.ch-2))))return ie.Pass;Pe="addFour"}else if(pt){var Ze=Pt.ch==0?" ":Re.getRange(Le(Pt.line,Pt.ch-1),Pt);if(!ie.isWordChar(rt)&&Ze!=He&&!ie.isWordChar(Ze))Pe="both";else return ie.Pass}else if(mt&&(rt.length===0||/\s/.test(rt)||Lt.indexOf(rt)>-1))Pe="both";else return ie.Pass;if(!qt)qt=Pe;else if(qt!=Pe)return ie.Pass}var gt=ht%2?dt.charAt(ht-1):He,Dn=ht%2?He:dt.charAt(ht+1);Re.operation(function(){if(qt=="skip")Re.execCommand("goCharRight");else if(qt=="skipThree")for(var Ot=0;Ot<3;Ot++)Re.execCommand("goCharRight");else if(qt=="surround"){for(var Pn=Re.getSelections(),Ot=0;Ot<Pn.length;Ot++)Pn[Ot]=gt+Pn[Ot]+Dn;Re.replaceSelections(Pn,"around"),Pn=Re.listSelections().slice();for(var Ot=0;Ot<Pn.length;Ot++)Pn[Ot]=ke(Pn[Ot]);Re.setSelections(Pn)}else qt=="both"?(Re.replaceSelection(gt+Dn,null),Re.triggerElectric(gt+Dn),Re.execCommand("goCharLeft")):qt=="addFour"&&(Re.replaceSelection(gt+gt+gt+gt,"before"),Re.execCommand("goCharRight"))})}function wt(Re,He){var Ee=Re.getRange(Le(He.line,He.ch-1),Le(He.line,He.ch+1));return Ee.length==2?Ee:null}function je(Re,He){var Ee=Re.getTokenAt(Le(He.line,He.ch+1));return/\bstring/.test(Ee.type)&&Ee.start==He.ch&&(He.ch==0||!/\bstring/.test(Re.getTokenTypeAt(He)))}})},6313:function(Yt,en,de){(function(ie){ie(de(89780),de(32855))})(function(ie){ie.defineOption("autoCloseTags",!1,function(Ce,pe,ke){if(ke!=ie.Init&&ke&&Ce.removeKeyMap("autoCloseTags"),!!pe){var xe={name:"autoCloseTags"};(typeof pe!="object"||pe.whenClosing!==!1)&&(xe["'/'"]=function(wt){return ze(wt)}),(typeof pe!="object"||pe.whenOpening!==!1)&&(xe["'>'"]=function(wt){return We(wt)}),Ce.addKeyMap(xe)}});var et=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Le=["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 We(Ce){if(Ce.getOption("disableInput"))return ie.Pass;for(var pe=Ce.listSelections(),ke=[],xe=Ce.getOption("autoCloseTags"),wt=0;wt<pe.length;wt++){if(!pe[wt].empty())return ie.Pass;var je=pe[wt].head,Re=Ce.getTokenAt(je),He=ie.innerMode(Ce.getMode(),Re.state),Ee=He.state,dt=He.mode.xmlCurrentTag&&He.mode.xmlCurrentTag(Ee),ht=dt&&dt.name;if(!ht)return ie.Pass;var Lt=He.mode.configuration=="html",Et=typeof xe=="object"&&xe.dontCloseTags||Lt&&et,pt=typeof xe=="object"&&xe.indentTags||Lt&&Le;Re.end>je.ch&&(ht=ht.slice(0,ht.length-Re.end+je.ch));var Ie=ht.toLowerCase();if(!ht||Re.type=="string"&&(Re.end!=je.ch||!/[\"\']/.test(Re.string.charAt(Re.string.length-1))||Re.string.length==1)||Re.type=="tag"&&dt.close||Re.string.indexOf("/")==je.ch-Re.start-1||Et&&Te(Et,Ie)>-1||Ge(Ce,He.mode.xmlCurrentContext&&He.mode.xmlCurrentContext(Ee)||[],ht,je,!0))return ie.Pass;var mt=typeof xe=="object"&&xe.emptyTags;if(mt&&Te(mt,ht)>-1){ke[wt]={text:"/>",newPos:ie.Pos(je.line,je.ch+2)};continue}var qt=pt&&Te(pt,Ie)>-1;ke[wt]={indent:qt,text:">"+(qt?`
`:"")+"</"+ht+">",newPos:qt?ie.Pos(je.line+1,0):ie.Pos(je.line,je.ch+1)}}for(var Oe=typeof xe=="object"&&xe.dontIndentOnAutoClose,wt=pe.length-1;wt>=0;wt--){var Qe=ke[wt];Ce.replaceRange(Qe.text,pe[wt].head,pe[wt].anchor,"+insert");var Pt=Ce.listSelections().slice(0);Pt[wt]={head:Qe.newPos,anchor:Qe.newPos},Ce.setSelections(Pt),!Oe&&Qe.indent&&(Ce.indentLine(Qe.newPos.line,null,!0),Ce.indentLine(Qe.newPos.line+1,null,!0))}}function ve(Ce,pe){for(var ke=Ce.listSelections(),xe=[],wt=pe?"/":"</",je=Ce.getOption("autoCloseTags"),Re=typeof je=="object"&&je.dontIndentOnSlash,He=0;He<ke.length;He++){if(!ke[He].empty())return ie.Pass;var Ee=ke[He].head,dt=Ce.getTokenAt(Ee),ht=ie.innerMode(Ce.getMode(),dt.state),Lt=ht.state;if(pe&&(dt.type=="string"||dt.string.charAt(0)!="<"||dt.start!=Ee.ch-1))return ie.Pass;var Et,pt=ht.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(pt&&ht.mode.name=="javascript")Et=wt+"script";else if(pt&&ht.mode.name=="css")Et=wt+"style";else{var Ie=ht.mode.xmlCurrentContext&&ht.mode.xmlCurrentContext(Lt);if(!Ie||Ie.length&&Ge(Ce,Ie,Ie[Ie.length-1],Ee))return ie.Pass;Et=wt+Ie[Ie.length-1]}Ce.getLine(Ee.line).charAt(dt.end)!=">"&&(Et+=">"),xe[He]=Et}if(Ce.replaceSelections(xe),ke=Ce.listSelections(),!Re)for(var He=0;He<ke.length;He++)(He==ke.length-1||ke[He].head.line<ke[He+1].head.line)&&Ce.indentLine(ke[He].head.line)}function ze(Ce){return Ce.getOption("disableInput")?ie.Pass:ve(Ce,!0)}ie.commands.closeTag=function(Ce){return ve(Ce)};function Te(Ce,pe){if(Ce.indexOf)return Ce.indexOf(pe);for(var ke=0,xe=Ce.length;ke<xe;++ke)if(Ce[ke]==pe)return ke;return-1}function Ge(Ce,pe,ke,xe,wt){if(!ie.scanForClosingTag)return!1;var je=Math.min(Ce.lastLine()+1,xe.line+500),Re=ie.scanForClosingTag(Ce,xe,null,je);if(!Re||Re.tag!=ke)return!1;for(var He=wt?1:0,Ee=pe.length-1;Ee>=0&&pe[Ee]==ke;Ee--)++He;xe=Re.to;for(var Ee=1;Ee<He;Ee++){var dt=ie.scanForClosingTag(Ce,xe,null,je);if(!dt||dt.tag!=ke)return!1;xe=dt.to}return!0}})},32855:function(Yt,en,de){(function(ie){ie(de(89780))})(function(ie){"use strict";var et=ie.Pos;function Le(Ee,dt){return Ee.line-dt.line||Ee.ch-dt.ch}var We="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ve=We+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ze=new RegExp("<(/?)(["+We+"]["+ve+"]*)","g");function Te(Ee,dt,ht,Lt){this.line=dt,this.ch=ht,this.cm=Ee,this.text=Ee.getLine(dt),this.min=Lt?Math.max(Lt.from,Ee.firstLine()):Ee.firstLine(),this.max=Lt?Math.min(Lt.to-1,Ee.lastLine()):Ee.lastLine()}function Ge(Ee,dt){var ht=Ee.cm.getTokenTypeAt(et(Ee.line,dt));return ht&&/\btag\b/.test(ht)}function Ce(Ee){if(!(Ee.line>=Ee.max))return Ee.ch=0,Ee.text=Ee.cm.getLine(++Ee.line),!0}function pe(Ee){if(!(Ee.line<=Ee.min))return Ee.text=Ee.cm.getLine(--Ee.line),Ee.ch=Ee.text.length,!0}function ke(Ee){for(;;){var dt=Ee.text.indexOf(">",Ee.ch);if(dt==-1){if(Ce(Ee))continue;return}if(!Ge(Ee,dt+1)){Ee.ch=dt+1;continue}var ht=Ee.text.lastIndexOf("/",dt),Lt=ht>-1&&!/\S/.test(Ee.text.slice(ht+1,dt));return Ee.ch=dt+1,Lt?"selfClose":"regular"}}function xe(Ee){for(;;){var dt=Ee.ch?Ee.text.lastIndexOf("<",Ee.ch-1):-1;if(dt==-1){if(pe(Ee))continue;return}if(!Ge(Ee,dt+1)){Ee.ch=dt;continue}ze.lastIndex=dt,Ee.ch=dt;var ht=ze.exec(Ee.text);if(ht&&ht.index==dt)return ht}}function wt(Ee){for(;;){ze.lastIndex=Ee.ch;var dt=ze.exec(Ee.text);if(!dt){if(Ce(Ee))continue;return}if(!Ge(Ee,dt.index+1)){Ee.ch=dt.index+1;continue}return Ee.ch=dt.index+dt[0].length,dt}}function je(Ee){for(;;){var dt=Ee.ch?Ee.text.lastIndexOf(">",Ee.ch-1):-1;if(dt==-1){if(pe(Ee))continue;return}if(!Ge(Ee,dt+1)){Ee.ch=dt;continue}var ht=Ee.text.lastIndexOf("/",dt),Lt=ht>-1&&!/\S/.test(Ee.text.slice(ht+1,dt));return Ee.ch=dt+1,Lt?"selfClose":"regular"}}function Re(Ee,dt){for(var ht=[];;){var Lt=wt(Ee),Et,pt=Ee.line,Ie=Ee.ch-(Lt?Lt[0].length:0);if(!Lt||!(Et=ke(Ee)))return;if(Et!="selfClose")if(Lt[1]){for(var mt=ht.length-1;mt>=0;--mt)if(ht[mt]==Lt[2]){ht.length=mt;break}if(mt<0&&(!dt||dt==Lt[2]))return{tag:Lt[2],from:et(pt,Ie),to:et(Ee.line,Ee.ch)}}else ht.push(Lt[2])}}function He(Ee,dt){for(var ht=[];;){var Lt=je(Ee);if(!Lt)return;if(Lt=="selfClose"){xe(Ee);continue}var Et=Ee.line,pt=Ee.ch,Ie=xe(Ee);if(!Ie)return;if(Ie[1])ht.push(Ie[2]);else{for(var mt=ht.length-1;mt>=0;--mt)if(ht[mt]==Ie[2]){ht.length=mt;break}if(mt<0&&(!dt||dt==Ie[2]))return{tag:Ie[2],from:et(Ee.line,Ee.ch),to:et(Et,pt)}}}}ie.registerHelper("fold","xml",function(Ee,dt){for(var ht=new Te(Ee,dt.line,0);;){var Lt=wt(ht);if(!Lt||ht.line!=dt.line)return;var Et=ke(ht);if(!Et)return;if(!Lt[1]&&Et!="selfClose"){var pt=et(ht.line,ht.ch),Ie=Re(ht,Lt[2]);return Ie&&Le(Ie.from,pt)>0?{from:pt,to:Ie.from}:null}}}),ie.findMatchingTag=function(Ee,dt,ht){var Lt=new Te(Ee,dt.line,dt.ch,ht);if(!(Lt.text.indexOf(">")==-1&&Lt.text.indexOf("<")==-1)){var Et=ke(Lt),pt=Et&&et(Lt.line,Lt.ch),Ie=Et&&xe(Lt);if(!(!Et||!Ie||Le(Lt,dt)>0)){var mt={from:et(Lt.line,Lt.ch),to:pt,tag:Ie[2]};return Et=="selfClose"?{open:mt,close:null,at:"open"}:Ie[1]?{open:He(Lt,Ie[2]),close:mt,at:"close"}:(Lt=new Te(Ee,pt.line,pt.ch,ht),{open:mt,close:Re(Lt,Ie[2]),at:"open"})}}},ie.findEnclosingTag=function(Ee,dt,ht,Lt){for(var Et=new Te(Ee,dt.line,dt.ch,ht);;){var pt=He(Et,Lt);if(!pt)break;var Ie=new Te(Ee,dt.line,dt.ch,ht),mt=Re(Ie,pt.tag);if(mt)return{open:pt,close:mt}}},ie.scanForClosingTag=function(Ee,dt,ht,Lt){var Et=new Te(Ee,dt.line,dt.ch,Lt?{from:0,to:Lt}:null);return Re(Et,ht)}})},89780:function(Yt){(function(en,de){Yt.exports=de()})(this,function(){"use strict";var en=navigator.userAgent,de=navigator.platform,ie=/gecko\/\d/i.test(en),et=/MSIE \d/.test(en),Le=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(en),We=/Edge\/(\d+)/.exec(en),ve=et||Le||We,ze=ve&&(et?document.documentMode||6:+(We||Le)[1]),Te=!We&&/WebKit\//.test(en),Ge=Te&&/Qt\/\d+\.\d+/.test(en),Ce=!We&&/Chrome\//.test(en),pe=/Opera\//.test(en),ke=/Apple Computer/.test(navigator.vendor),xe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(en),wt=/PhantomJS/.test(en),je=!We&&/AppleWebKit/.test(en)&&/Mobile\/\w+/.test(en),Re=/Android/.test(en),He=je||Re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(en),Ee=je||/Mac/.test(de),dt=/\bCrOS\b/.test(en),ht=/win/i.test(de),Lt=pe&&en.match(/Version\/(\d*\.\d*)/);Lt&&(Lt=Number(Lt[1])),Lt&&Lt>=15&&(pe=!1,Te=!0);var Et=Ee&&(Ge||pe&&(Lt==null||Lt<12.11)),pt=ie||ve&&ze>=9;function Ie(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var mt=function(a,y){var x=a.className,b=Ie(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 qt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Oe(a,y){return qt(a).appendChild(y)}function Qe(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 z=0;z<y.length;++z)E.appendChild(y[z]);return E}function Pt(a,y,x,b){var E=Qe(a,y,x,b);return E.setAttribute("role","presentation"),E}var Pe;document.createRange?Pe=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Pe=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 rt(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 Ze(){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 gt(a,y){var x=a.className;Ie(y).test(x)||(a.className+=(x?" ":"")+y)}function Dn(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!Ie(x[b]).test(y)&&(y+=" "+x[b]);return y}var Ot=function(a){a.select()};je?Ot=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:ve&&(Ot=function(a){try{a.select()}catch(y){}});function Pn(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function nn(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 me(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var z=b||0,re=E||0;;){var ae=a.indexOf(" ",z);if(ae<0||ae>=y)return re+(y-z);re+=ae-z,re+=x-re%x,z=ae+1}}var he=function(){this.id=null,this.f=null,this.time=0,this.handler=Pn(this.onTimeout,this)};he.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},he.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function Dt(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var un=50,_t={toString:function(){return"CodeMirror.Pass"}},Fe={scroll:!1},at={origin:"*mouse"},st={origin:"+move"};function cn(a,y,x){for(var b=0,E=0;;){var z=a.indexOf(" ",b);z==-1&&(z=a.length);var re=z-b;if(z==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=z-b,E+=x-E%x,b=z+1,E>=y)return b}}var Bt=[""];function Ne(a){for(;Bt.length<=a;)Bt.push(ye(Bt)+" ");return Bt[a]}function ye(a){return a[a.length-1]}function _e(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function lt(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function Me(){}function Ue(a,y){var x;return Object.create?x=Object.create(a):(Me.prototype=a,x=new Me),y&&nn(y,x),x}var it=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ut(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||it.test(a))}function yt(a,y){return y?y.source.indexOf("\\w")>-1&&ut(a)?!0:y.test(a):ut(a)}function xt(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var At=/[\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 Wt(a){return a.charCodeAt(0)>=768&&At.test(a)}function pn(a,y,x){for(;(x<0?y>0:y<a.length)&&Wt(a.charAt(y));)y+=x;return y}function tn(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,z=b<0?Math.ceil(E):Math.floor(E);if(z==y)return a(z)?y:x;a(z)?x=z:y=z+b}}function le(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,z=0;z<a.length;++z){var re=a[z];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",z),E=!0)}E||b(y,x,"ltr")}var te=null;function ee(a,y,x){var b;te=null;for(var E=0;E<a.length;++E){var z=a[E];if(z.from<y&&z.to>y)return E;z.to==y&&(z.from!=z.to&&x=="before"?b=E:te=E),z.from==y&&(z.from!=z.to&&x!="before"?b=E:te=E)}return b!=null?b:te}var oe=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(fe){return fe<=247?a.charAt(fe):1424<=fe&&fe<=1524?"R":1536<=fe&&fe<=1785?y.charAt(fe-1536):1774<=fe&&fe<=2220?"r":8192<=fe&&fe<=8203?"w":fe==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,ae=/[1n]/;function se(fe,be,De){this.level=fe,this.from=be,this.to=De}return function(fe,be){var De=be=="ltr"?"L":"R";if(fe.length==0||be=="ltr"&&!b.test(fe))return!1;for(var $e=fe.length,Ke=[],Nt=0;Nt<$e;++Nt)Ke.push(x(fe.charCodeAt(Nt)));for(var Vt=0,sn=De;Vt<$e;++Vt){var Cn=Ke[Vt];Cn=="m"?Ke[Vt]=sn:sn=Cn}for(var An=0,Sn=De;An<$e;++An){var Fn=Ke[An];Fn=="1"&&Sn=="r"?Ke[An]="n":z.test(Fn)&&(Sn=Fn,Fn=="r"&&(Ke[An]="R"))}for(var Jn=1,Vn=Ke[0];Jn<$e-1;++Jn){var fr=Ke[Jn];fr=="+"&&Vn=="1"&&Ke[Jn+1]=="1"?Ke[Jn]="1":fr==","&&Vn==Ke[Jn+1]&&(Vn=="1"||Vn=="n")&&(Ke[Jn]=Vn),Vn=fr}for(var Or=0;Or<$e;++Or){var li=Ke[Or];if(li==",")Ke[Or]="N";else if(li=="%"){var jr=void 0;for(jr=Or+1;jr<$e&&Ke[jr]=="%";++jr);for(var Ni=Or&&Ke[Or-1]=="!"||jr<$e&&Ke[jr]=="1"?"1":"N",ki=Or;ki<jr;++ki)Ke[ki]=Ni;Or=jr-1}}for(var qr=0,Ei=De;qr<$e;++qr){var fi=Ke[qr];Ei=="L"&&fi=="1"?Ke[qr]="L":z.test(fi)&&(Ei=fi)}for(var ri=0;ri<$e;++ri)if(E.test(Ke[ri])){var $r=void 0;for($r=ri+1;$r<$e&&E.test(Ke[$r]);++$r);for(var Ur=(ri?Ke[ri-1]:De)=="L",Di=($r<$e?Ke[$r]:De)=="L",Vo=Ur==Di?Ur?"L":"R":De,bo=ri;bo<$r;++bo)Ke[bo]=Vo;ri=$r-1}for(var pi=[],eo,si=0;si<$e;)if(re.test(Ke[si])){var bl=si;for(++si;si<$e&&re.test(Ke[si]);++si);pi.push(new se(0,bl,si))}else{var oo=si,Lo=pi.length,To=be=="rtl"?1:0;for(++si;si<$e&&Ke[si]!="L";++si);for(var bi=oo;bi<si;)if(ae.test(Ke[bi])){oo<bi&&(pi.splice(Lo,0,new se(1,oo,bi)),Lo+=To);var Uo=bi;for(++bi;bi<si&&ae.test(Ke[bi]);++bi);pi.splice(Lo,0,new se(2,Uo,bi)),Lo+=To,oo=bi}else++bi;oo<si&&pi.splice(Lo,0,new se(1,oo,si))}return be=="ltr"&&(pi[0].level==1&&(eo=fe.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new se(0,0,eo[0].length))),ye(pi).level==1&&(eo=fe.match(/\s+$/))&&(ye(pi).to-=eo[0].length,pi.push(new se(0,$e-eo[0].length,$e)))),be=="rtl"?pi.reverse():pi}}();function ue(a,y){var x=a.order;return x==null&&(x=a.order=oe(a.text,y)),x}var ne=[],ce=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]||ne).concat(x)}};function Be(a,y){return a._handlers&&a._handlers[y]||ne}function Ve(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 z=Dt(E,x);z>-1&&(b[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function Ye(a,y){var x=Be(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 ge(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Ye(a,x||y.type,a,y),zt(y)||y.codemirrorIgnore}function Mt(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var x=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),b=0;b<y.length;++b)Dt(x,y[b])==-1&&x.push(y[b])}function ct(a,y){return Be(a,y).length>0}function Ct(a){a.prototype.on=function(y,x){ce(this,y,x)},a.prototype.off=function(y,x){Ve(this,y,x)}}function Ht(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function dn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function zt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function bn(a){Ht(a),dn(a)}function Nn(a){return a.target||a.srcElement}function Tn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ee&&a.ctrlKey&&y==1&&(y=3),y}var jn=function(){if(ve&&ze<9)return!1;var a=Qe("div");return"draggable"in a||"dragDrop"in a}(),zn;function Hn(a){if(zn==null){var y=Qe("span","\u200B");Oe(a,Qe("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(zn=y.offsetWidth<=1&&y.offsetHeight>2&&!(ve&&ze<8))}var x=zn?Qe("span","\u200B"):Qe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Un;function Rn(a){if(Un!=null)return Un;var y=Oe(a,document.createTextNode("A\u062EA")),x=Pe(y,0,1).getBoundingClientRect(),b=Pe(y,1,2).getBoundingClientRect();return qt(a),!x||x.left==x.right?!1:Un=b.right-x.right<3}var Wn=`
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 z=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=z.indexOf("\r");re!=-1?(x.push(z.slice(0,re)),y+=re+1):(x.push(z),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},vn=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},tt=function(){var a=Qe("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),nt=null;function Xe(a){if(nt!=null)return nt;var y=Oe(a,Qe("span","x")),x=y.getBoundingClientRect(),b=Pe(y,0,1).getBoundingClientRect();return nt=Math.abs(x.left-b.left)>1}var Rt={},St={};function Zt(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Rt[a]=y}function on(a,y){St[a]=y}function Ut(a){if(typeof a=="string"&&St.hasOwnProperty(a))a=St[a];else if(a&&typeof a.name=="string"&&St.hasOwnProperty(a.name)){var y=St[a.name];typeof y=="string"&&(y={name:y}),a=Ue(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Ut("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Ut("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Xt(a,y){y=Ut(y);var x=Rt[y.name];if(!x)return Xt(a,"text/plain");var b=x(a,y);if(gn.hasOwnProperty(y.name)){var E=gn[y.name];for(var z in E)E.hasOwnProperty(z)&&(b.hasOwnProperty(z)&&(b["_"+z]=b[z]),b[z]=E[z])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var gn={};function _n(a,y){var x=gn.hasOwnProperty(a)?gn[a]:gn[a]={};nn(y,x)}function Ln(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 fn(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 Zn(a,y,x){return a.startState?a.startState(y,x):!0}var ot=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};ot.prototype.eol=function(){return this.pos>=this.string.length},ot.prototype.sol=function(){return this.pos==this.lineStart},ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ot.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},ot.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},ot.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},ot.prototype.skipToEnd=function(){this.pos=this.string.length},ot.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},ot.prototype.backUp=function(a){this.pos-=a},ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},ot.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},ot.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(re){return x?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var z=this.string.slice(this.pos).match(a);return z&&z.index>0?null:(z&&y!==!1&&(this.pos+=z[0].length),z)}},ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},ot.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},ot.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},ot.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function Je(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],z=E.chunkSize();if(y<z){x=E;break}y-=z}return x.lines[y]}function Ft(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(z){var re=z.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function Mn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Gn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function we(a){if(a.parent==null)return null;for(var y=a.parent,x=Dt(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 Se(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],z=E.height;if(y<z){a=E;continue e}y-=z,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var ae=a.lines[re],se=ae.height;if(y<se)break;y-=se}return x+re}function It(a,y){return y>=a.first&&y<a.first+a.size}function bt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Ae(a,y,x){if(x===void 0&&(x=null),!(this instanceof Ae))return new Ae(a,y,x);this.line=a,this.ch=y,this.sticky=x}function ft(a,y){return a.line-y.line||a.ch-y.ch}function Tt(a,y){return a.sticky==y.sticky&&ft(a,y)==0}function Kt(a){return Ae(a.line,a.ch)}function ln(a,y){return ft(a,y)<0?y:a}function kt(a,y){return ft(a,y)<0?a:y}function jt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function vt(a,y){if(y.line<a.first)return Ae(a.first,0);var x=a.first+a.size-1;return y.line>x?Ae(x,Je(a,x).text.length):qe(y,Je(a,y.line).text.length)}function qe(a,y){var x=a.ch;return x==null||x>y?Ae(a.line,y):x<0?Ae(a.line,0):a}function Gt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=vt(a,y[b]);return x}var yn=function(a,y){this.state=a,this.lookAhead=y},mn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};mn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},mn.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}},mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mn.fromSaved=function(a,y,x){return y instanceof yn?new mn(a,Ln(a.mode,y.state),x,y.lookAhead):new mn(a,Ln(a.mode,y),x)},mn.prototype.save=function(a){var y=a!==!1?Ln(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yn(y,this.maxLookAhead):y};function In(a,y,x,b){var E=[a.state.modeGen],z={};ir(a,y.text,a.doc.mode,x,function(fe,be){return E.push(fe,be)},z,b);for(var re=x.state,ae=function(fe){x.baseTokens=E;var be=a.state.overlays[fe],De=1,$e=0;x.state=!0,ir(a,y.text,be.mode,x,function(Ke,Nt){for(var Vt=De;$e<Ke;){var sn=E[De];sn>Ke&&E.splice(De,1,Ke,E[De+1],sn),De+=2,$e=Math.min(Ke,sn)}if(Nt)if(be.opaque)E.splice(Vt,De-Vt,Ke,"overlay "+Nt),De=Vt+2;else for(;Vt<De;Vt+=2){var Cn=E[Vt+1];E[Vt+1]=(Cn?Cn+" ":"")+"overlay "+Nt}},z),x.state=re,x.baseTokens=null,x.baseTokenPos=1},se=0;se<a.state.overlays.length;++se)ae(se);return{styles:E,classes:z.bgClass||z.textClass?z:null}}function Qn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=er(a,we(y)),E=y.text.length>a.options.maxHighlightLength&&Ln(a.doc.mode,b.state),z=In(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=z.styles,z.classes?y.styleClasses=z.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function er(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new mn(b,!0,y);var z=yr(a,y,x),re=z>b.first&&Je(b,z-1).stateAfter,ae=re?mn.fromSaved(b,re,z):new mn(b,Zn(b.mode),z);return b.iter(z,y,function(se){kn(a,se.text,ae);var fe=ae.line;se.stateAfter=fe==y-1||fe%5==0||fe>=E.viewFrom&&fe<E.viewTo?ae.save():null,ae.nextLine()}),x&&(b.modeFrontier=ae.line),ae}function kn(a,y,x,b){var E=a.doc.mode,z=new ot(y,a.options.tabSize,x);for(z.start=z.pos=b||0,y==""&&$t(E,x.state);!z.eol();)Bn(E,z,x.state),z.start=z.pos}function $t(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=fn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function Bn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=fn(a,x).mode);var z=a.token(y,x);if(y.pos>y.start)return z}throw new Error("Mode "+a.name+" failed to advance stream.")}var hn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function qn(a,y,x,b){var E=a.doc,z=E.mode,re;y=vt(E,y);var ae=Je(E,y.line),se=er(a,y.line,x),fe=new ot(ae.text,a.options.tabSize,se),be;for(b&&(be=[]);(b||fe.pos<y.ch)&&!fe.eol();)fe.start=fe.pos,re=Bn(z,fe,se.state),b&&be.push(new hn(fe,re,Ln(E.mode,se.state)));return b?be:new hn(fe,re,se.state)}function dr(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 ir(a,y,x,b,E,z,re){var ae=x.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var se=0,fe=null,be=new ot(y,a.options.tabSize,b),De,$e=a.options.addModeClass&&[null];for(y==""&&dr($t(x,b.state),z);!be.eol();){if(be.pos>a.options.maxHighlightLength?(ae=!1,re&&kn(a,y,b,be.pos),be.pos=y.length,De=null):De=dr(Bn(x,be,b.state,$e),z),$e){var Ke=$e[0].name;Ke&&(De="m-"+(De?Ke+" "+De:Ke))}if(!ae||fe!=De){for(;se<be.start;)se=Math.min(be.start,se+5e3),E(se,fe);fe=De}be.start=be.pos}for(;se<be.pos;){var Nt=Math.min(be.pos,se+5e3);E(Nt,fe),se=Nt}}function yr(a,y,x){for(var b,E,z=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>re;--ae){if(ae<=z.first)return z.first;var se=Je(z,ae-1),fe=se.stateAfter;if(fe&&(!x||ae+(fe instanceof yn?fe.lookAhead:0)<=z.modeFrontier))return ae;var be=me(se.text,null,a.options.tabSize);(E==null||b>be)&&(E=ae-1,b=be)}return E}function br(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=Je(a,b).stateAfter;if(E&&(!(E instanceof yn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var Cr=!1,hr=!1;function Pr(){Cr=!0}function xr(){hr=!0}function pr(a,y,x){this.marker=a,this.from=y,this.to=x}function Sr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function lr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function sr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function or(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||!z.marker.insertLeft)){var se=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);(b||(b=[])).push(new pr(re,z.from,se?null:z.to))}}return b}function ur(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||z.marker.insertLeft)){var se=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);(b||(b=[])).push(new pr(re,se?null:z.from-y,z.to==null?null:z.to-y))}}return b}function Br(a,y){if(y.full)return null;var x=It(a,y.from.line)&&Je(a,y.from.line).markedSpans,b=It(a,y.to.line)&&Je(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,z=y.to.ch,re=ft(y.from,y.to)==0,ae=or(x,E,re),se=ur(b,z,re),fe=y.text.length==1,be=ye(y.text).length+(fe?E:0);if(ae)for(var De=0;De<ae.length;++De){var $e=ae[De];if($e.to==null){var Ke=Sr(se,$e.marker);Ke?fe&&($e.to=Ke.to==null?null:Ke.to+be):$e.to=E}}if(se)for(var Nt=0;Nt<se.length;++Nt){var Vt=se[Nt];if(Vt.to!=null&&(Vt.to+=be),Vt.from==null){var sn=Sr(ae,Vt.marker);sn||(Vt.from=be,fe&&(ae||(ae=[])).push(Vt))}else Vt.from+=be,fe&&(ae||(ae=[])).push(Vt)}ae&&(ae=Vr(ae)),se&&se!=ae&&(se=Vr(se));var Cn=[ae];if(!fe){var An=y.text.length-2,Sn;if(An>0&&ae)for(var Fn=0;Fn<ae.length;++Fn)ae[Fn].to==null&&(Sn||(Sn=[])).push(new pr(ae[Fn].marker,null,null));for(var Jn=0;Jn<An;++Jn)Cn.push(Sn);Cn.push(se)}return Cn}function Vr(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(Ke){if(Ke.markedSpans)for(var Nt=0;Nt<Ke.markedSpans.length;++Nt){var Vt=Ke.markedSpans[Nt].marker;Vt.readOnly&&(!b||Dt(b,Vt)==-1)&&(b||(b=[])).push(Vt)}}),!b)return null;for(var E=[{from:y,to:x}],z=0;z<b.length;++z)for(var re=b[z],ae=re.find(0),se=0;se<E.length;++se){var fe=E[se];if(!(ft(fe.to,ae.from)<0||ft(fe.from,ae.to)>0)){var be=[se,1],De=ft(fe.from,ae.from),$e=ft(fe.to,ae.to);(De<0||!re.inclusiveLeft&&!De)&&be.push({from:fe.from,to:ae.from}),($e>0||!re.inclusiveRight&&!$e)&&be.push({from:ae.to,to:fe.to}),E.splice.apply(E,be),se+=be.length-3}}return E}function Tr(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Hr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Rr(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(),z=ft(b.from,E.from)||Rr(a)-Rr(y);if(z)return-z;var re=ft(b.to,E.to)||zr(a)-zr(y);return re||y.id-a.id}function Fr(a,y){var x=hr&&a.markedSpans,b;if(x)for(var E=void 0,z=0;z<x.length;++z)E=x[z],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ii(b,E.marker)<0)&&(b=E.marker);return b}function nr(a){return Fr(a,!0)}function Qt(a){return Fr(a,!1)}function an(a,y){var x=hr&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var z=x[E];z.marker.collapsed&&(z.from==null||z.from<y)&&(z.to==null||z.to>y)&&(!b||ii(b,z.marker)<0)&&(b=z.marker)}return b}function On(a,y,x,b,E){var z=Je(a,y),re=hr&&z.markedSpans;if(re)for(var ae=0;ae<re.length;++ae){var se=re[ae];if(se.marker.collapsed){var fe=se.marker.find(0),be=ft(fe.from,x)||Rr(se.marker)-Rr(E),De=ft(fe.to,b)||zr(se.marker)-zr(E);if(!(be>=0&&De<=0||be<=0&&De>=0)&&(be<=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?ft(fe.to,x)>=0:ft(fe.to,x)>0)||be>=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?ft(fe.from,b)<=0:ft(fe.from,b)<0)))return!0}}}function wn(a){for(var y;y=nr(a);)a=y.find(-1,!0).line;return a}function Kn(a){for(var y;y=Qt(a);)a=y.find(1,!0).line;return a}function vr(a){for(var y,x;y=Qt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function rn(a,y){var x=Je(a,y),b=wn(x);return x==b?y:we(b)}function Jt(a,y){if(y>a.lastLine())return y;var x=Je(a,y),b;if(!xn(a,x))return y;for(;b=Qt(x);)x=b.find(1,!0).line;return we(x)+1}function xn(a,y){var x=hr&&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&&En(a,y,b))return!0}}}function En(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return En(a,b.line,Sr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,z=0;z<y.markedSpans.length;++z)if(E=y.markedSpans[z],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&En(a,y,E))return!0}function Xn(a){a=wn(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 z=x.parent;z;x=z,z=x.parent)for(var re=0;re<z.children.length;++re){var ae=z.children[re];if(ae==x)break;y+=ae.height}return y}function mr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=nr(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Qt(b);){var z=x.find(0,!0);y-=b.text.length-z.from.ch,b=z.to.line,y+=b.text.length-z.to.ch}return y}function cr(a){var y=a.display,x=a.doc;y.maxLine=Je(x,x.first),y.maxLineLength=mr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=mr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Er=function(a,y,x){this.text=a,Hr(this,y),this.height=x?x(this):1};Er.prototype.lineNo=function(){return we(this)},Ct(Er);function Dr(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Tr(a),Hr(a,x);var E=b?b(a):1;E!=a.height&&Gn(a,E)}function Mr(a){a.parent=null,Tr(a)}var Zr={},Ar={};function _r(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Ar:Zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=Pt("span",null,null,Te?"padding-right: .1px":null),b={pre:Pt("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 z=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Fi,Rn(a.display.measure)&&(re=ue(z,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var ae=y!=a.display.externalMeasured&&we(z);wr(z,b,Qn(a,z,ae)),z.styleClasses&&(z.styleClasses.bgClass&&(b.bgClass=Dn(z.styleClasses.bgClass,b.bgClass||"")),z.styleClasses.textClass&&(b.textClass=Dn(z.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(Hn(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(Te){var se=b.content.lastChild;(/\bcm-tab\b/.test(se.className)||se.querySelector&&se.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Ye(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Dn(b.pre.className,b.textClass||"")),b}function Mi(a){var y=Qe("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Fi(a,y,x,b,E,z,re){if(y){var ae=a.splitSpaces?xi(y,a.trailingSpace):y,se=a.cm.state.specialChars,fe=!1,be;if(!se.test(y))a.col+=y.length,be=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,be),ve&&ze<9&&(fe=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var De=0;;){se.lastIndex=De;var $e=se.exec(y),Ke=$e?$e.index-De:y.length-De;if(Ke){var Nt=document.createTextNode(ae.slice(De,De+Ke));ve&&ze<9?be.appendChild(Qe("span",[Nt])):be.appendChild(Nt),a.map.push(a.pos,a.pos+Ke,Nt),a.col+=Ke,a.pos+=Ke}if(!$e)break;De+=Ke+1;var Vt=void 0;if($e[0]==" "){var sn=a.cm.options.tabSize,Cn=sn-a.col%sn;Vt=be.appendChild(Qe("span",Ne(Cn),"cm-tab")),Vt.setAttribute("role","presentation"),Vt.setAttribute("cm-text"," "),a.col+=Cn}else $e[0]=="\r"||$e[0]==`
`?(Vt=be.appendChild(Qe("span",$e[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Vt.setAttribute("cm-text",$e[0]),a.col+=1):(Vt=a.cm.options.specialCharPlaceholder($e[0]),Vt.setAttribute("cm-text",$e[0]),ve&&ze<9?be.appendChild(Qe("span",[Vt])):be.appendChild(Vt),a.col+=1);a.map.push(a.pos,a.pos+1,Vt),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||fe||z||re){var An=x||"";b&&(An+=b),E&&(An+=E);var Sn=Qe("span",[be],An,z);if(re)for(var Fn in re)re.hasOwnProperty(Fn)&&Fn!="style"&&Fn!="class"&&Sn.setAttribute(Fn,re[Fn]);return a.content.appendChild(Sn)}a.content.appendChild(be)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var z=a.charAt(E);z==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(z="\xA0"),b+=z,x=z==" "}return b}function vi(a,y){return function(x,b,E,z,re,ae,se){E=E?E+" cm-force-border":"cm-force-border";for(var fe=x.pos,be=fe+b.length;;){for(var De=void 0,$e=0;$e<y.length&&(De=y[$e],!(De.to>fe&&De.from<=fe));$e++);if(De.to>=be)return a(x,b,E,z,re,ae,se);a(x,b.slice(0,De.to-fe),E,z,null,ae,se),z=null,b=b.slice(De.to-fe),fe=De.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 wr(a,y,x){var b=a.markedSpans,E=a.text,z=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(z,z=x[re]),_r(x[re+1],y.cm.options));return}for(var ae=E.length,se=0,fe=1,be="",De,$e,Ke=0,Nt,Vt,sn,Cn,An;;){if(Ke==se){Nt=Vt=sn=$e="",An=null,Cn=null,Ke=1/0;for(var Sn=[],Fn=void 0,Jn=0;Jn<b.length;++Jn){var Vn=b[Jn],fr=Vn.marker;if(fr.type=="bookmark"&&Vn.from==se&&fr.widgetNode)Sn.push(fr);else if(Vn.from<=se&&(Vn.to==null||Vn.to>se||fr.collapsed&&Vn.to==se&&Vn.from==se)){if(Vn.to!=null&&Vn.to!=se&&Ke>Vn.to&&(Ke=Vn.to,Vt=""),fr.className&&(Nt+=" "+fr.className),fr.css&&($e=($e?$e+";":"")+fr.css),fr.startStyle&&Vn.from==se&&(sn+=" "+fr.startStyle),fr.endStyle&&Vn.to==Ke&&(Fn||(Fn=[])).push(fr.endStyle,Vn.to),fr.title&&((An||(An={})).title=fr.title),fr.attributes)for(var Or in fr.attributes)(An||(An={}))[Or]=fr.attributes[Or];fr.collapsed&&(!Cn||ii(Cn.marker,fr)<0)&&(Cn=Vn)}else Vn.from>se&&Ke>Vn.from&&(Ke=Vn.from)}if(Fn)for(var li=0;li<Fn.length;li+=2)Fn[li+1]==Ke&&(Vt+=" "+Fn[li]);if(!Cn||Cn.from==se)for(var jr=0;jr<Sn.length;++jr)Xi(y,0,Sn[jr]);if(Cn&&(Cn.from||0)==se){if(Xi(y,(Cn.to==null?ae+1:Cn.to)-se,Cn.marker,Cn.from==null),Cn.to==null)return;Cn.to==se&&(Cn=!1)}}if(se>=ae)break;for(var Ni=Math.min(ae,Ke);;){if(be){var ki=se+be.length;if(!Cn){var qr=ki>Ni?be.slice(0,Ni-se):be;y.addToken(y,qr,De?De+Nt:Nt,sn,se+qr.length==Ke?Vt:"",$e,An)}if(ki>=Ni){be=be.slice(Ni-se),se=Ni;break}se=ki,sn=""}be=E.slice(z,z=x[fe++]),De=_r(x[fe++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=vr(y),this.size=this.rest?we(ye(this.rest))-x+1:1,this.node=this.text=null,this.hidden=xn(a,y)}function ti(a,y,x){for(var b=[],E,z=y;z<x;z=E){var re=new to(a.doc,Je(a.doc,z),z);E=z+re.size,b.push(re)}return b}var Bi=null;function ao(a){Bi?Bi.ops.push(a):a.ownsGroup=Bi={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{Bi=null,y(x)}}var Ri=null;function Wr(a,y){var x=Be(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Bi?E=Bi.delayedCallbacks:Ri?E=Ri:(E=Ri=[],setTimeout(_i,0));for(var z=function(ae){E.push(function(){return x[ae].apply(null,b)})},re=0;re<x.length;++re)z(re)}}function _i(){var a=Ri;Ri=null;for(var y=0;y<a.length;++y)a[y]()}function lo(a,y,x,b){for(var E=0;E<y.changes.length;E++){var z=y.changes[E];z=="text"?so(a,y):z=="gutter"?rr(a,y,x,b):z=="class"?Yn(a,y):z=="widget"&&$n(a,y,b)}y.changes=null}function zi(a){return a.node==a.text&&(a.node=Qe("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),ve&&ze<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(Qe("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 so(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,Yn(a,y)):x&&(y.text.className=x)}function Yn(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 rr(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=Qe("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 z=y.line.gutterMarkers;if(a.options.lineNumbers||z){var re=zi(y),ae=y.gutter=Qe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),re.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(Qe("div",bt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),z)for(var se=0;se<a.display.gutterSpecs.length;++se){var fe=a.display.gutterSpecs[se].className,be=z.hasOwnProperty(fe)&&z[fe];be&&ae.appendChild(Qe("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[fe]+"px; width: "+b.gutterWidth[fe]+"px"))}}}function $n(a,y,x){y.alignable&&(y.alignable=null);for(var b=Ie("CodeMirror-linewidget"),E=y.node.firstChild,z=void 0;E;E=z)z=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);kr(a,y,x)}function tr(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),Yn(a,y),rr(a,y,x,b),kr(a,y,b),y.node}function kr(a,y,x){if(Ir(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Ir(a,y.rest[b],y,x,!1)}function Ir(a,y,x,b,E){if(y.widgets)for(var z=zi(x),re=0,ae=y.widgets;re<ae.length;++re){var se=ae[re],fe=Qe("div",[se.node],"CodeMirror-linewidget"+(se.className?" "+se.className:""));se.handleMouseEvents||fe.setAttribute("cm-ignore-events","true"),Gi(se,fe,x,b),a.display.input.setUneditable(fe),E&&se.above?z.insertBefore(fe,x.gutter||x.text):z.appendChild(fe),Wr(se,"redraw")}}function Gi(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(!rt(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;"),Oe(y.display.measure,Qe("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=Nn(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 Kr(a){return a.lineSpace.offsetTop}function Hi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Oe(a.measure,Qe("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 Li(a){return un-a.display.nativeBarWidth}function qi(a){return a.display.scroller.clientWidth-Li(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Li(a)-a.display.barHeight}function ji(a,y,x){var b=a.options.lineWrapping,E=b&&qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var z=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),ae=0;ae<re.length-1;ae++){var se=re[ae],fe=re[ae+1];Math.abs(se.bottom-fe.bottom)>2&&z.push((se.bottom+fe.top)/2-x.top)}}z.push(x.bottom-x.top)}}function Po(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(we(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=wn(y);var x=we(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,Oe(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=we(y),b=$i(a,x);b&&!b.text?b=null:b&&b.changes&&(lo(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=ja(a,y));var E=Po(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 z=x+(b||""),re;return y.cache.hasOwnProperty(z)?re=y.cache[z]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(ji(a,y.view,y.rect),y.hasHeights=!0),re=wa(a,y,x,b),re.bogus||(y.cache[z]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,z,re,ae,se,fe=0;fe<a.length;fe+=3)if(ae=a[fe],se=a[fe+1],y<ae?(E=0,z=1,re="left"):y<se?(E=y-ae,z=E+1):(fe==a.length-3||y==se&&a[fe+3]>y)&&(z=se-ae,E=z-1,y>=se&&(re="right")),E!=null){if(b=a[fe+2],ae==se&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;fe&&a[fe-2]==a[fe-3]&&a[fe-1].insertLeft;)b=a[(fe-=3)+2],re="left";if(x=="right"&&E==se-ae)for(;fe<a.length-3&&a[fe+3]==a[fe+4]&&!a[fe+5].insertLeft;)b=a[(fe+=3)+2],re="right";break}return{node:b,start:E,end:z,collapse:re,coverStart:ae,coverEnd:se}}function Va(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),z=E.node,re=E.start,ae=E.end,se=E.collapse,fe;if(z.nodeType==3){for(var be=0;be<4;be++){for(;re&&Wt(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+ae<E.coverEnd&&Wt(y.line.text.charAt(E.coverStart+ae));)++ae;if(ve&&ze<9&&re==0&&ae==E.coverEnd-E.coverStart?fe=z.parentNode.getBoundingClientRect():fe=Va(Pe(z,re,ae).getClientRects(),b),fe.left||fe.right||re==0)break;ae=re,re=re-1,se="right"}ve&&ze<11&&(fe=Ua(a.display.measure,fe))}else{re>0&&(se=b="right");var De;a.options.lineWrapping&&(De=z.getClientRects()).length>1?fe=De[b=="right"?De.length-1:0]:fe=z.getBoundingClientRect()}if(ve&&ze<9&&!re&&(!fe||!fe.left&&!fe.right)){var $e=z.parentNode.getClientRects()[0];$e?fe={left:$e.left,right:$e.left+Ui(a.display),top:$e.top,bottom:$e.bottom}:fe=ba}for(var Ke=fe.top-y.rect.top,Nt=fe.bottom-y.rect.top,Vt=(Ke+Nt)/2,sn=y.view.measure.heights,Cn=0;Cn<sn.length-1&&!(Vt<sn[Cn]);Cn++);var An=Cn?sn[Cn-1]:0,Sn=sn[Cn],Fn={left:(se=="right"?fe.right:fe.left)-y.rect.left,right:(se=="left"?fe.left:fe.right)-y.rect.left,top:An,bottom:Sn};return!fe.left&&!fe.right&&(Fn.bogus=!0),a.options.singleCursorHeightPerLine||(Fn.rtop=Ke,Fn.rbottom=Nt),Fn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Xe(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,qt(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&&Re?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return Ce&&Re?-(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 Ao(a,y,x,b,E){if(!E){var z=Jo(y);x.top+=z,x.bottom+=z}if(b=="line")return x;b||(b="local");var re=Xn(y);if(b=="local"?re+=Kr(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var ae=a.display.lineSpace.getBoundingClientRect();re+=ae.top+(b=="window"?0:Ca());var se=ae.left+(b=="window"?0:Xo());x.left+=se,x.right+=se}return x.top+=re,x.bottom+=re,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();else if(x=="local"||!x){var z=a.display.sizer.getBoundingClientRect();b+=z.left,E+=z.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function No(a,y,x,b,E){return b||(b=Je(a.doc,y.line)),Ao(a,b,ya(a,b,y.ch,E),x)}function wi(a,y,x,b,E,z){b=b||Je(a.doc,y.line),E||(E=uo(a,b));function re(Nt,Vt){var sn=Zi(a,E,Nt,Vt?"right":"left",z);return Vt?sn.left=sn.right:sn.right=sn.left,Ao(a,b,sn,x)}var ae=ue(b,a.doc.direction),se=y.ch,fe=y.sticky;if(se>=b.text.length?(se=b.text.length,fe="before"):se<=0&&(se=0,fe="after"),!ae)return re(fe=="before"?se-1:se,fe=="before");function be(Nt,Vt,sn){var Cn=ae[Vt],An=Cn.level==1;return re(sn?Nt-1:Nt,An!=sn)}var De=ee(ae,se,fe),$e=te,Ke=be(se,De,fe=="before");return $e!=null&&(Ke.other=be(se,$e,fe!="before")),Ke}function gr(a,y){var x=0;y=vt(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=Je(a.doc,y.line),E=Xn(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function ar(a,y,x,b,E){var z=Ae(a,y,x);return z.xRel=E,b&&(z.outside=b),z}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return ar(b.first,0,null,-1,-1);var E=Se(b,x),z=b.first+b.size-1;if(E>z)return ar(b.first+b.size-1,Je(b,z).text.length,null,1,1);y<0&&(y=0);for(var re=Je(b,E);;){var ae=Vi(a,re,E,y,x),se=an(re,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!se)return ae;var fe=se.find(1);if(fe.line==E)return fe;re=Je(b,E=fe.line)}}function di(a,y,x,b){b-=Jo(y);var E=y.text.length,z=tn(function(re){return Zi(a,x,re-1).bottom<=b},E,0);return E=tn(function(re){return Zi(a,x,re).top>b},z,E),{begin:z,end:E}}function Yr(a,y,x,b){x||(x=uo(a,y));var E=Ao(a,y,Zi(a,x,b),"line").top;return di(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 Vi(a,y,x,b,E){E-=Xn(y);var z=uo(a,y),re=Jo(y),ae=0,se=y.text.length,fe=!0,be=ue(y,a.doc.direction);if(be){var De=(a.options.lineWrapping?ro:Wi)(a,y,x,z,be,b,E);fe=De.level!=1,ae=fe?De.from:De.to-1,se=fe?De.to:De.from-1}var $e=null,Ke=null,Nt=tn(function(Jn){var Vn=Zi(a,z,Jn);return Vn.top+=re,Vn.bottom+=re,ni(Vn,b,E,!1)?(Vn.top<=E&&Vn.left<=b&&($e=Jn,Ke=Vn),!0):!1},ae,se),Vt,sn,Cn=!1;if(Ke){var An=b-Ke.left<Ke.right-b,Sn=An==fe;Nt=$e+(Sn?0:1),sn=Sn?"after":"before",Vt=An?Ke.left:Ke.right}else{!fe&&(Nt==se||Nt==ae)&&Nt++,sn=Nt==0?"after":Nt==y.text.length?"before":Zi(a,z,Nt-(fe?1:0)).bottom+re<=E==fe?"after":"before";var Fn=wi(a,Ae(x,Nt,sn),"line",y,z);Vt=Fn.left,Cn=E<Fn.top?-1:E>=Fn.bottom?1:0}return Nt=pn(y.text,Nt,1),ar(x,Nt,sn,Cn,b-Vt)}function Wi(a,y,x,b,E,z,re){var ae=tn(function(De){var $e=E[De],Ke=$e.level!=1;return ni(wi(a,Ae(x,Ke?$e.to:$e.from,Ke?"before":"after"),"line",y,b),z,re,!0)},0,E.length-1),se=E[ae];if(ae>0){var fe=se.level!=1,be=wi(a,Ae(x,fe?se.from:se.to,fe?"after":"before"),"line",y,b);ni(be,z,re,!0)&&be.top>re&&(se=E[ae-1])}return se}function ro(a,y,x,b,E,z,re){var ae=di(a,y,b,re),se=ae.begin,fe=ae.end;/\s/.test(y.text.charAt(fe-1))&&fe--;for(var be=null,De=null,$e=0;$e<E.length;$e++){var Ke=E[$e];if(!(Ke.from>=fe||Ke.to<=se)){var Nt=Ke.level!=1,Vt=Zi(a,b,Nt?Math.min(fe,Ke.to)-1:Math.max(se,Ke.from)).right,sn=Vt<z?z-Vt+1e9:Vt-z;(!be||De>sn)&&(be=Ke,De=sn)}}return be||(be=E[E.length-1]),be.from<se&&(be={from:se,to:be.to,level:be.level}),be.to>fe&&(be={from:be.from,to:fe,level:be.level}),be}var Ti;function Pi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ti==null){Ti=Qe("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ti.appendChild(document.createTextNode("x")),Ti.appendChild(Qe("br"));Ti.appendChild(document.createTextNode("x"))}Oe(a.measure,Ti);var x=Ti.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),qt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Qe("span","xxxxxxxxxx"),x=Qe("pre",[y],"CodeMirror-line-like");Oe(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,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var ae=a.display.gutterSpecs[re].className;x[ae]=z.offsetLeft+z.clientLeft+E,b[ae]=z.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function wl(a){var y=Pi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(xn(a.doc,E))return 0;var z=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(z+=E.widgets[re].height);return x?z+(Math.ceil(E.text.length/b)||1)*y:z+y}}function Ya(a){var y=a.doc,x=wl(a);y.iter(function(b){var E=x(b);E!=b.height&&Gn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&Nn(y).getAttribute("cm-not-content")=="true")return null;var z,re,ae=E.lineSpace.getBoundingClientRect();try{z=y.clientX-ae.left,re=y.clientY-ae.top}catch(De){return null}var se=ci(a,z,re),fe;if(b&&se.xRel>0&&(fe=Je(a.doc,se.line).text).length==se.ch){var be=me(fe,fe.length,a.options.tabSize)-fe.length;se=Ae(se.line,Math.max(0,Math.round((z-Qi(a.display).left)/Ui(a.display))-be))}return se}function So(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function 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)hr&&rn(a.doc,y)<E.viewTo&&ho(a);else if(x<=E.viewFrom)hr&&Jt(a.doc,x+b)>E.viewFrom?ho(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)ho(a);else if(y<=E.viewFrom){var z=ka(a,x,x+b,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=b):ho(a)}else if(x>=E.viewTo){var re=ka(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):ho(a)}else{var ae=ka(a,y,y,-1),se=ka(a,x,x+b,1);ae&&se?(E.view=E.view.slice(0,ae.index).concat(ti(a,ae.lineN,se.lineN)).concat(E.view.slice(se.index)),E.viewTo+=b):ho(a)}var fe=E.externalMeasured;fe&&(x<fe.lineN?fe.lineN+=b:y<fe.lineN+fe.size&&(E.externalMeasured=null))}function fo(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 z=b.view[So(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);Dt(re,x)==-1&&re.push(x)}}}function ho(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),z,re=a.display.view;if(!hr||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,se=0;se<E;se++)ae+=re[se].size;if(ae!=y){if(b>0){if(E==re.length-1)return null;z=ae+re[E].size-y,E++}else z=ae-y;y+=z,x+=z}for(;rn(a.doc,x)!=x;){if(E==(b<0?0:re.length-1))return null;x+=b*re[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hs(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=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 Cl(a){for(var y=a.display.view,x=0,b=0;b<y.length;b++){var E=y[b];!E.hidden&&(!E.node||E.changes)&&++x}return x}function Qo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Sl(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),z=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var ae=x.sel.ranges[re];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var se=ae.empty();(se||a.options.showCursorWhenSelecting)&&kl(a,ae.head,E),se||Zs(a,ae,z)}}return b}function kl(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Qe("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 z=x.appendChild(Qe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));z.style.display="",z.style.left=b.other.left+"px",z.style.top=b.other.top+"px",z.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function Zs(a,y,x){var b=a.display,E=a.doc,z=document.createDocumentFragment(),re=Qi(a.display),ae=re.left,se=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-re.right,fe=E.direction=="ltr";function be(Sn,Fn,Jn,Vn){Fn<0&&(Fn=0),Fn=Math.round(Fn),Vn=Math.round(Vn),z.appendChild(Qe("div",null,"CodeMirror-selected","position: absolute; left: "+Sn+`px;
top: `+Fn+"px; width: "+(Jn==null?se-Sn:Jn)+`px;
height: `+(Vn-Fn)+"px"))}function De(Sn,Fn,Jn){var Vn=Je(E,Sn),fr=Vn.text.length,Or,li;function jr(qr,Ei){return No(a,Ae(Sn,qr),"div",Vn,Ei)}function Ni(qr,Ei,fi){var ri=Yr(a,Vn,null,qr),$r=Ei=="ltr"==(fi=="after")?"left":"right",Ur=fi=="after"?ri.begin:ri.end-(/\s/.test(Vn.text.charAt(ri.end-1))?2:1);return jr(Ur,$r)[$r]}var ki=ue(Vn,E.direction);return le(ki,Fn||0,Jn==null?fr:Jn,function(qr,Ei,fi,ri){var $r=fi=="ltr",Ur=jr(qr,$r?"left":"right"),Di=jr(Ei-1,$r?"right":"left"),Vo=Fn==null&&qr==0,bo=Jn==null&&Ei==fr,pi=ri==0,eo=!ki||ri==ki.length-1;if(Di.top-Ur.top<=3){var si=(fe?Vo:bo)&&pi,bl=(fe?bo:Vo)&&eo,oo=si?ae:($r?Ur:Di).left,Lo=bl?se:($r?Di:Ur).right;be(oo,Ur.top,Lo-oo,Ur.bottom)}else{var To,bi,Uo,xl;$r?(To=fe&&Vo&&pi?ae:Ur.left,bi=fe?se:Ni(qr,fi,"before"),Uo=fe?ae:Ni(Ei,fi,"after"),xl=fe&&bo&&eo?se:Di.right):(To=fe?Ni(qr,fi,"before"):ae,bi=!fe&&Vo&&pi?se:Ur.right,Uo=!fe&&bo&&eo?ae:Di.left,xl=fe?Ni(Ei,fi,"after"):se),be(To,Ur.top,bi-To,Ur.bottom),Ur.bottom<Di.top&&be(ae,Ur.bottom,null,Di.top),be(Uo,Di.top,xl-Uo,Di.bottom)}(!Or||Ea(Ur,Or)<0)&&(Or=Ur),Ea(Di,Or)<0&&(Or=Di),(!li||Ea(Ur,li)<0)&&(li=Ur),Ea(Di,li)<0&&(li=Di)}),{start:Or,end:li}}var $e=y.from(),Ke=y.to();if($e.line==Ke.line)De($e.line,$e.ch,Ke.ch);else{var Nt=Je(E,$e.line),Vt=Je(E,Ke.line),sn=wn(Nt)==wn(Vt),Cn=De($e.line,$e.ch,sn?Nt.text.length+1:null).end,An=De(Ke.line,sn?0:null,Ke.ch).start;sn&&(Cn.top<An.top-2?(be(Cn.right,Cn.top,null,Cn.bottom),be(ae,An.top,An.left,An.bottom)):be(Cn.right,Cn.top,An.left-Cn.right,Cn.bottom)),Cn.bottom<An.top&&be(ae,Cn.bottom,null,An.top)}x.appendChild(z)}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()||Bo(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function El(a){a.state.focused||(a.display.input.focus(),Ja(a))}function Dl(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Bo(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Ye(a,"focus",a,y),a.state.focused=!0,gt(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Te&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Bo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Ye(a,"blur",a,y),a.state.focused=!1,mt(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Da(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],z=a.options.lineWrapping,re=void 0,ae=0;if(!E.hidden){if(ve&&ze<8){var se=E.node.offsetTop+E.node.offsetHeight;re=se-x,x=se}else{var fe=E.node.getBoundingClientRect();re=fe.bottom-fe.top,!z&&E.text.firstChild&&(ae=E.text.firstChild.getBoundingClientRect().right-fe.left-1)}var be=E.line.height-re;if((be>.005||be<-.005)&&(Gn(E.line,re),Ml(E.line),E.rest))for(var De=0;De<E.rest.length;De++)Ml(E.rest[De]);if(ae>a.display.sizerWidth){var $e=Math.ceil(ae/Ui(a.display));$e>a.display.maxLineLength&&(a.display.maxLineLength=$e,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ml(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 Ma(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Kr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,z=Se(y,b),re=Se(y,E);if(x&&x.ensure){var ae=x.ensure.from.line,se=x.ensure.to.line;ae<z?(z=ae,re=Se(y,Xn(Je(y,ae))+a.wrapper.clientHeight)):Math.min(se,y.lastLine())>=re&&(z=Se(y,Xn(Je(y,se))-a.wrapper.clientHeight),re=se)}return{from:z,to:Math.max(re,z+1)}}function Ws(a,y){if(!ge(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&&!wt){var z=Qe("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Kr(a.display))+`px;
height: `+(y.bottom-y.top+Li(a)+x.barHeight)+`px;
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(z),z.scrollIntoView(E),a.display.lineSpace.removeChild(z)}}}function zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Ae(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Ae(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,ae=wi(a,y),se=!x||x==y?ae:wi(a,x);E={left:Math.min(ae.left,se.left),top:Math.min(ae.top,se.top)-b,right:Math.max(ae.left,se.left),bottom:Math.max(ae.bottom,se.bottom)+b};var fe=Qa(a,E),be=a.doc.scrollTop,De=a.doc.scrollLeft;if(fe.scrollTop!=null&&($o(a,fe.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(re=!0)),fe.scrollLeft!=null&&(ko(a,fe.scrollLeft),Math.abs(a.doc.scrollLeft-De)>1&&(re=!0)),!re)break}return E}function Gs(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=Pi(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,z=no(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var ae=a.doc.height+Hi(x),se=y.top<b,fe=y.bottom>ae-b;if(y.top<E)re.scrollTop=se?0:y.top;else if(y.bottom>E+z){var be=Math.min(y.top,(fe?ae:y.bottom)-z);be!=E&&(re.scrollTop=be)}var De=a.options.fixedGutter?0:x.gutters.offsetWidth,$e=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-De,Ke=qi(a)-x.gutters.offsetWidth,Nt=y.right-y.left>Ke;return Nt&&(y.right=y.left+Ke),y.left<10?re.scrollLeft=0:y.left<$e?re.scrollLeft=Math.max(0,y.left+De-(Nt?0:10)):y.right>Ke+$e-3&&(re.scrollLeft=y.right+(Nt?0:10)-Ke),re}function qa(a,y){y!=null&&(La(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Ro(a){La(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)&&La(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function js(a,y){La(a),a.curOp.scrollToPos=y}function La(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=gr(a,y.from),b=gr(a,y.to);Ll(a,x,b,y.margin)}}function Ll(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||(ie||el(a,{top:y}),Tl(a,y,!0),ie&&el(a),na(a,100))}function Tl(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,Rl(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+Hi(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+Li(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=Qe("div",[Qe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Qe("div",[Qe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),ce(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),ce(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&ze<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 z=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+z)+"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=Ee&&!xe?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new he,this.disableVert=new he},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),z=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);z!=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 Io(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Pl(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Da(a),Pl(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Pl(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 Al={native:Eo,null:ta};function Nl(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&mt(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Al[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),ce(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&&gt(a.display.wrapper,a.display.scrollbars.addClass)}var Vs=0;function Do(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vs},ao(a.curOp)}function Mo(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;Us(x)})}function Us(a){for(var y=a.ops,x=0;x<y.length;x++)Ks(y[x]);for(var b=0;b<y.length;b++)Ys(y[b]);for(var E=0;E<y.length;E++)Xs(y[E]);for(var z=0;z<y.length;z++)Js(y[z]);for(var re=0;re<y.length;re++)Qs(y[re])}function Ks(a){var y=a.cm,x=y.display;$s(y),a.updateMaxLine&&cr(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<x.viewFrom||a.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Ta(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xs(a){var y=a.cm,x=y.display;a.updatedDisplay&&Da(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+Li(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 Js(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==Ze();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Io(y,a.barMeasure),a.updatedDisplay&&nl(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&El(a.cm)}function Qs(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Bl(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Tl(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ko(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=zs(y,vt(b,a.scrollToPos.from),vt(b,a.scrollToPos.to),a.scrollToPos.margin);Ws(y,E)}var z=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(z)for(var ae=0;ae<z.length;++ae)z[ae].lines.length||Ye(z[ae],"hide");if(re)for(var se=0;se<re.length;++se)re[se].lines.length&&Ye(re[se],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Ye(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Ai(a,y){if(a.curOp)return y();Do(a);try{return y()}finally{Mo(a)}}function oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Do(a);try{return y.apply(a,arguments)}finally{Mo(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Do(this);try{return a.apply(this,arguments)}finally{Mo(this)}}}function ai(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Do(y);try{return a.apply(this,arguments)}finally{Mo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Pn(qs,a))}function qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=er(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(z){if(b.line>=a.display.viewFrom){var re=z.styles,ae=z.text.length>a.options.maxHighlightLength?Ln(y.mode,b.state):null,se=In(a,z,b,!0);ae&&(b.state=ae),z.styles=se.styles;var fe=z.styleClasses,be=se.classes;be?z.styleClasses=be:fe&&(z.styleClasses=null);for(var De=!re||re.length!=z.styles.length||fe!=be&&(!fe||!be||fe.bgClass!=be.bgClass||fe.textClass!=be.textClass),$e=0;!De&&$e<re.length;++$e)De=re[$e]!=z.styles[$e];De&&E.push(b.line),z.stateAfter=b.save(),b.nextLine()}else z.text.length<=a.options.maxHighlightLength&&kn(a,z.text,b),z.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&&Ai(a,function(){for(var z=0;z<E.length;z++)fo(a,E[z],"text")})}}var Ta=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Ma(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=[]};Ta.prototype.signal=function(a,y){ct(a,y)&&this.events.push(arguments)},Ta.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Ye.apply(null,this.events[a])};function $s(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Li(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Li(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ze();if(!y||!rt(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&rt(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==Ze())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&rt(document.body,a.anchorNode)&&rt(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 ho(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cl(a)==0)return!1;Il(a)&&(ho(a),y.dims=co(a));var E=b.first+b.size,z=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<z&&z-x.viewFrom<20&&(z=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),hr&&(z=rn(a.doc,z),re=Jt(a.doc,re));var ae=z!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hs(a,z,re),x.viewOffset=Xn(Je(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var se=Cl(a);if(!ae&&se==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var fe=eu(a);return se>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),se>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(fe),qt(x.cursorDiv),qt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ae&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Bl(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+Hi(a.display)-no(a),x.top)}),y.visible=Ma(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Ma(a.display,a.doc,x));if(!$a(a,y))break;Da(a);var E=ea(a);Qo(a),Io(a,E),nl(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function el(a,y){var x=new Ta(a,y);if($a(a,x)){Da(a),Bl(a,x);var b=ea(a);Qo(a),Io(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,z=b.lineDiv,re=z.firstChild;function ae(Nt){var Vt=Nt.nextSibling;return Te&&Ee&&a.display.currentWheelTarget==Nt?Nt.style.display="none":Nt.parentNode.removeChild(Nt),Vt}for(var se=b.view,fe=b.viewFrom,be=0;be<se.length;be++){var De=se[be];if(!De.hidden)if(!De.node||De.node.parentNode!=z){var $e=tr(a,De,fe,x);z.insertBefore($e,re)}else{for(;re!=De.node;)re=ae(re);var Ke=E&&y!=null&&y<=fe&&De.lineNumber;De.changes&&(Dt(De.changes,"gutter")>-1&&(Ke=!1),lo(a,De,fe,x)),Ke&&(qt(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(bt(a.options,fe)))),re=De.node.nextSibling}fe+=De.size}for(;re;)re=ae(re)}function tl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function nl(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Li(a)+"px"}function Rl(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,z=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=z),x[re].gutterBackground&&(x[re].gutterBackground.style.left=z));var ae=x[re].alignable;if(ae)for(var se=0;se<ae.length;se++)ae[se].style.left=z}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Il(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(Qe("div",[Qe("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),z=E.firstChild.offsetWidth,re=E.offsetWidth-z;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(z,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function rl(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var z=a[E],re=null;if(typeof z!="string"&&(re=z.style,z=z.className),z=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:z,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Ol(a){var y=a.gutters,x=a.gutterSpecs;qt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],z=E.className,re=E.style,ae=y.appendChild(Qe("div",null,"CodeMirror-gutter "+z));re&&(ae.style.cssText=re),z=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function ra(a){Ol(a.display),Ci(a),Rl(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Qe("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Qe("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Pt("div",null,"CodeMirror-code"),E.selectionDiv=Qe("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Qe("div",null,"CodeMirror-cursors"),E.measure=Qe("div",null,"CodeMirror-measure"),E.lineMeasure=Qe("div",null,"CodeMirror-measure"),E.lineSpace=Pt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var z=Pt("div",[E.lineSpace],"CodeMirror-lines");E.mover=Qe("div",[z],null,"position: relative"),E.sizer=Qe("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Qe("div",null,null,"position: absolute; height: "+un+"px; width: 1px;"),E.gutters=Qe("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Qe("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Qe("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),ve&&ze<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Te&&!(ie&&He)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rl(b.gutters,b.lineNumbers),Ol(E),x.init(E)}var Pa=0,Ii=null;ve?Ii=-.53:ie?Ii=15:Ce?Ii=-.7:ke&&(Ii=-1/3);function Fl(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=Fl(a);return y.x*=Ii,y.y*=Ii,y}function _l(a,y){var x=Fl(y),b=x.x,E=x.y,z=a.display,re=z.scroller,ae=re.scrollWidth>re.clientWidth,se=re.scrollHeight>re.clientHeight;if(b&&ae||E&&se){if(E&&Ee&&Te){e:for(var fe=y.target,be=z.view;fe!=re;fe=fe.parentNode)for(var De=0;De<be.length;De++)if(be[De].node==fe){a.display.currentWheelTarget=fe;break e}}if(b&&!ie&&!pe&&Ii!=null){E&&se&&$o(a,Math.max(0,re.scrollTop+E*Ii)),ko(a,Math.max(0,re.scrollLeft+b*Ii)),(!E||E&&se)&&Ht(y),z.wheelStartX=null;return}if(E&&Ii!=null){var $e=E*Ii,Ke=a.doc.scrollTop,Nt=Ke+z.wrapper.clientHeight;$e<0?Ke=Math.max(0,Ke+$e-50):Nt=Math.min(a.doc.height,Nt+$e+50),el(a,{top:Ke,bottom:Nt})}Pa<20&&(z.wheelStartX==null?(z.wheelStartX=re.scrollLeft,z.wheelStartY=re.scrollTop,z.wheelDX=b,z.wheelDY=E,setTimeout(function(){if(z.wheelStartX!=null){var Vt=re.scrollLeft-z.wheelStartX,sn=re.scrollTop-z.wheelStartY,Cn=sn&&z.wheelDY&&sn/z.wheelDY||Vt&&z.wheelDX&&Vt/z.wheelDX;z.wheelStartX=z.wheelStartY=null,Cn&&(Ii=(Ii*Pa+Cn)/(Pa+1),++Pa)}},200)):(z.wheelDX+=b,z.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(!Tt(x.anchor,b.anchor)||!Tt(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 Lr(Kt(this.ranges[y].anchor),Kt(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(ft(y,b.from())>=0&&ft(a,b.to())<=0)return x}return-1};var Lr=function(a,y){this.anchor=a,this.head=y};Lr.prototype.from=function(){return kt(this.anchor,this.head)},Lr.prototype.to=function(){return ln(this.anchor,this.head)},Lr.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($e,Ke){return ft($e.from(),Ke.from())}),x=Dt(y,E);for(var z=1;z<y.length;z++){var re=y[z],ae=y[z-1],se=ft(ae.to(),re.from());if(b&&!re.empty()?se>0:se>=0){var fe=kt(ae.from(),re.from()),be=ln(ae.to(),re.to()),De=ae.empty()?re.from()==re.head:ae.from()==ae.head;z<=x&&--x,y.splice(--z,2,new Lr(De?be:fe,De?fe:be))}}return new Oi(y,x)}function po(a,y){return new Oi([new Lr(a,y||a)],0)}function vo(a){return a.text?Ae(a.from.line+a.text.length-1,ye(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hl(a,y){if(ft(a,y.from)<0)return a;if(ft(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),Ae(x,b)}function il(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Lr(Hl(E.anchor,y),Hl(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function Zl(a,y,x){return a.line==y.line?Ae(x.line,a.ch-y.ch+x.ch):Ae(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Ae(a.first,0),z=E,re=0;re<y.length;re++){var ae=y[re],se=Zl(ae.from,E,z),fe=Zl(vo(ae),E,z);if(E=ae.to,z=fe,x=="around"){var be=a.sel.ranges[re],De=ft(be.head,be.anchor)<0;b[re]=new Lr(De?fe:se,De?se:fe)}else b[re]=new Lr(se,se)}return new Oi(b,a.sel.primIndex)}function ol(a){a.doc.mode=Xt(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 Wl(a,y){return y.from.ch==0&&y.to.ch==0&&ye(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function al(a,y,x,b){function E(An){return x?x[An]:null}function z(An,Sn,Fn){Dr(An,Sn,Fn,b),Wr(An,"change",An,y)}function re(An,Sn){for(var Fn=[],Jn=An;Jn<Sn;++Jn)Fn.push(new Er(fe[Jn],E(Jn),b));return Fn}var ae=y.from,se=y.to,fe=y.text,be=Je(a,ae.line),De=Je(a,se.line),$e=ye(fe),Ke=E(fe.length-1),Nt=se.line-ae.line;if(y.full)a.insert(0,re(0,fe.length)),a.remove(fe.length,a.size-fe.length);else if(Wl(a,y)){var Vt=re(0,fe.length-1);z(De,De.text,Ke),Nt&&a.remove(ae.line,Nt),Vt.length&&a.insert(ae.line,Vt)}else if(be==De)if(fe.length==1)z(be,be.text.slice(0,ae.ch)+$e+be.text.slice(se.ch),Ke);else{var sn=re(1,fe.length-1);sn.push(new Er($e+be.text.slice(se.ch),Ke,b)),z(be,be.text.slice(0,ae.ch)+fe[0],E(0)),a.insert(ae.line+1,sn)}else if(fe.length==1)z(be,be.text.slice(0,ae.ch)+fe[0]+De.text.slice(se.ch),E(0)),a.remove(ae.line+1,Nt);else{z(be,be.text.slice(0,ae.ch)+fe[0],E(0)),z(De,$e+De.text.slice(se.ch),Ke);var Cn=re(1,fe.length-1);Nt>1&&a.remove(ae.line+1,Nt-1),a.insert(ae.line+1,Cn)}Wr(a,"change",a,y)}function mo(a,y,x){function b(E,z,re){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var se=E.linked[ae];if(se.doc!=z){var fe=re&&se.sharedHist;x&&!fe||(y(se.doc,fe),b(se.doc,E,fe))}}}b(a,null,!0)}function zl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),ol(a),Gl(a),a.options.lineWrapping||cr(a),a.options.mode=y.modeOption,Ci(a)}function Gl(a){(a.doc.direction=="rtl"?gt:mt)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Ai(a,function(){Gl(a),Ci(a)})}function Aa(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ll(a,y){var x={from:Kt(y.from),to:vo(y),text:Ft(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Ul(b,x,y.from.line,y.to.line+1)},!0),x}function jl(a){for(;a.length;){var y=ye(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return jl(a.done),ye(a.done);if(a.done.length&&!ye(a.done).ranges)return ye(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ye(a.done)}function Vl(a,y,x,b){var E=a.history;E.undone.length=0;var z=+new Date,re,ae;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>z-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=lu(E,E.lastOp==b)))ae=ye(re.changes),ft(y.from,y.to)==0&&ft(y.from,ae.to)==0?ae.to=vo(y):re.changes.push(ll(a,y));else{var se=ye(E.done);for((!se||!se.ranges)&&Na(a.sel,E.done),re={changes:[ll(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=z,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ae||Ye(a,"historyAdded")}function su(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,z=b&&b.origin;x==E.lastSelOp||z&&E.lastSelOrigin==z&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==z||su(a,z,ye(E.done),y))?E.done[E.done.length-1]=y:Na(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=x,b&&b.clearRedo!==!1&&jl(E.undone)}function Na(a,y){var x=ye(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Ul(a,y,x,b){var E=y["spans_"+a.id],z=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[z]=re.markedSpans),++z})}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 fu(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Kl(a,y){var x=fu(a,y),b=Br(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var z=x[E],re=b[E];if(z&&re)e:for(var ae=0;ae<re.length;++ae){for(var se=re[ae],fe=0;fe<z.length;++fe)if(z[fe].marker==se.marker)continue e;z.push(se)}else re&&(x[E]=re)}return x}function Oo(a,y,x){for(var b=[],E=0;E<a.length;++E){var z=a[E];if(z.ranges){b.push(x?Oi.prototype.deepCopy.call(z):z);continue}var re=z.changes,ae=[];b.push({changes:ae});for(var se=0;se<re.length;++se){var fe=re[se],be=void 0;if(ae.push({from:fe.from,to:fe.to,text:fe.text}),y)for(var De in fe)(be=De.match(/^spans_(\d+)$/))&&Dt(y,Number(be[1]))>-1&&(ye(ae)[De]=fe[De],delete fe[De])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var z=ft(y,E)<0;z!=ft(x,E)<0?(E=y,y=x):z!=ft(y,x)<0&&(y=x)}return new Lr(E,y)}else return new Lr(x||y,y)}function Ba(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),hi(a,new Oi([sl(a.sel.primary(),y,x,E)],0),b)}function Yl(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),z=0;z<a.sel.ranges.length;z++)b[z]=sl(a.sel.ranges[z],y[z],null,E);var re=Ki(a.cm,b,a.sel.primIndex);hi(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,hi(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xl(a,y,x,b){hi(a,po(y,x),b)}function du(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var z=0;z<E.length;z++)this.ranges[z]=new Lr(vt(a,E[z].anchor),vt(a,E[z].head))},origin:x&&x.origin};return Ye(a,"beforeSelectionChange",a,b),a.cm&&Ye(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ki(a.cm,b.ranges,b.ranges.length-1):y}function Jl(a,y,x){var b=a.history.done,E=ye(b);E&&E.ranges?(b[b.length-1]=y,Ra(a,y,x)):hi(a,y,x)}function hi(a,y,x){Ra(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ra(a,y,x){(ct(a,"beforeSelectionChange")||a.cm&&ct(a.cm,"beforeSelectionChange"))&&(y=du(a,y,x));var b=x&&x.bias||(ft(y.primary().head,a.sel.primary().head)<0?-1:1);Ql(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Ro(a.cm)}function Ql(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Mt(a.cm)),Wr(a,"cursorActivity",a))}function ql(a){Ql(a,$l(a,a.sel,null,!1))}function $l(a,y,x,b){for(var E,z=0;z<y.ranges.length;z++){var re=y.ranges[z],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[z],se=Ia(a,re.anchor,ae&&ae.anchor,x,b),fe=Ia(a,re.head,ae&&ae.head,x,b);(E||se!=re.anchor||fe!=re.head)&&(E||(E=y.ranges.slice(0,z)),E[z]=new Lr(se,fe))}return E?Ki(a.cm,E,y.primIndex):y}function Fo(a,y,x,b,E){var z=Je(a,y.line);if(z.markedSpans)for(var re=0;re<z.markedSpans.length;++re){var ae=z.markedSpans[re],se=ae.marker,fe="selectLeft"in se?!se.selectLeft:se.inclusiveLeft,be="selectRight"in se?!se.selectRight:se.inclusiveRight;if((ae.from==null||(fe?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(be?ae.to>=y.ch:ae.to>y.ch))){if(E&&(Ye(se,"beforeCursorEnter"),se.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!se.atomic)continue;if(x){var De=se.find(b<0?1:-1),$e=void 0;if((b<0?be:fe)&&(De=es(a,De,-b,De&&De.line==y.line?z:null)),De&&De.line==y.line&&($e=ft(De,x))&&(b<0?$e<0:$e>0))return Fo(a,De,y,b,E)}var Ke=se.find(b<0?-1:1);return(b<0?fe:be)&&(Ke=es(a,Ke,b,Ke.line==y.line?z:null)),Ke?Fo(a,Ke,y,b,E):null}}return y}function Ia(a,y,x,b,E){var z=b||1,re=Fo(a,y,x,z,E)||!E&&Fo(a,y,x,z,!0)||Fo(a,y,x,-z,E)||!E&&Fo(a,y,x,-z,!0);return re||(a.cantEdit=!0,Ae(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?vt(a,Ae(y.line-1)):null:x>0&&y.ch==(b||Je(a,y.line)).text.length?y.line<a.first+a.size-1?Ae(y.line+1,0):null:new Ae(y.line,y.ch+x)}function ts(a){a.setSelection(Ae(a.firstLine(),0),Ae(a.lastLine()),Fe)}function ns(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,z,re,ae){E&&(b.from=vt(a,E)),z&&(b.to=vt(a,z)),re&&(b.text=re),ae!==void 0&&(b.origin=ae)}),Ye(a,"beforeChange",a,b),a.cm&&Ye(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(!((ct(a,"beforeChange")||a.cm&&ct(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=Cr&&!x&&Jr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rs(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rs(a,y)}}function rs(a,y){if(!(y.text.length==1&&y.text[0]==""&&ft(y.from,y.to)==0)){var x=il(a,y);Vl(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Br(a,y));var b=[];mo(a,function(E,z){!z&&Dt(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),oa(E,y,null,Br(E,y))})}}function Oa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,z,re=a.sel,ae=y=="undo"?E.done:E.undone,se=y=="undo"?E.undone:E.done,fe=0;fe<ae.length&&(z=ae[fe],!(x?z.ranges&&!z.equals(a.sel):!z.ranges));fe++);if(fe!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(z=ae.pop(),z.ranges){if(Na(z,se),x&&!z.equals(a.sel)){hi(a,z,{clearRedo:!1});return}re=z}else if(b){ae.push(z);return}else break;var be=[];Na(re,se),se.push({changes:be,generation:E.generation}),E.generation=z.generation||++E.maxGeneration;for(var De=ct(a,"beforeChange")||a.cm&&ct(a.cm,"beforeChange"),$e=function(Vt){var sn=z.changes[Vt];if(sn.origin=y,De&&!ns(a,sn,!1))return ae.length=0,{};be.push(ll(a,sn));var Cn=Vt?il(a,sn):ye(ae);oa(a,sn,Cn,Kl(a,sn)),!Vt&&a.cm&&a.cm.scrollIntoView({from:sn.from,to:vo(sn)});var An=[];mo(a,function(Sn,Fn){!Fn&&Dt(An,Sn.history)==-1&&(ls(Sn.history,sn),An.push(Sn.history)),oa(Sn,sn,null,Kl(Sn,sn))})},Ke=z.changes.length-1;Ke>=0;--Ke){var Nt=$e(Ke);if(Nt)return Nt.v}}}}function is(a,y){if(y!=0&&(a.first+=y,a.sel=new Oi(_e(a.sel.ranges,function(E){return new Lr(Ae(E.anchor.line+y,E.anchor.ch),Ae(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++)fo(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){is(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);is(a,E),y={from:Ae(a.first,0),to:Ae(y.to.line+E,y.to.ch),text:[ye(y.text)],origin:y.origin}}var z=a.lastLine();y.to.line>z&&(y={from:y.from,to:Ae(z,Je(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Ft(a,y.from,y.to),x||(x=il(a,y)),a.cm?hu(a.cm,y,b):al(a,y,b),Ra(a,x,Fe),a.cantEdit&&Ia(a,Ae(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,z=y.from,re=y.to,ae=!1,se=z.line;a.options.lineWrapping||(se=we(wn(Je(b,z.line))),b.iter(se,re.line+1,function(Ke){if(Ke==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Mt(a),al(b,y,x,wl(a)),a.options.lineWrapping||(b.iter(se,z.line+y.text.length,function(Ke){var Nt=mr(Ke);Nt>E.maxLineLength&&(E.maxLine=Ke,E.maxLineLength=Nt,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),br(b,z.line),na(a,400);var fe=y.text.length-(re.line-z.line)-1;y.full?Ci(a):z.line==re.line&&y.text.length==1&&!Wl(a.doc,y)?fo(a,z.line,"text"):Ci(a,z.line,re.line+1,fe);var be=ct(a,"changes"),De=ct(a,"change");if(De||be){var $e={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};De&&Wr(a,"change",a,$e),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push($e)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var z;b||(b=x),ft(b,x)<0&&(z=[b,x],x=z[0],b=z[1]),typeof y=="string"&&(y=a.splitLines(y)),_o(a,{from:x,to:b,text:y,origin:E})}function os(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function as(a,y,x,b){for(var E=0;E<a.length;++E){var z=a[E],re=!0;if(z.ranges){z.copied||(z=a[E]=z.deepCopy(),z.copied=!0);for(var ae=0;ae<z.ranges.length;ae++)os(z.ranges[ae].anchor,y,x,b),os(z.ranges[ae].head,y,x,b);continue}for(var se=0;se<z.changes.length;++se){var fe=z.changes[se];if(x<fe.from.line)fe.from=Ae(fe.from.line+b,fe.from.ch),fe.to=Ae(fe.to.line+b,fe.to.ch);else if(y<=fe.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function ls(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;as(a.done,x,b,E),as(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,z=y;return typeof y=="number"?z=Je(a,jt(a,y)):E=we(y),E==null?null:(b(z,E)&&a.cm&&fo(a.cm,E,x),z)}function la(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}la.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Mr(E),Wr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function sa(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}sa.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var z=Math.min(y,E-a),re=b.height;if(b.removeInner(a,z),this.height-=re-b.height,E==z&&(this.children.splice(x--,1),b.parent=null),(y-=z)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof la))){var ae=[];this.collapse(ae),this.children=[new la(ae)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<=z){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,ae=re;ae<E.lines.length;){var se=new la(E.lines.slice(ae,ae+=25));E.height-=se.height,this.children.splice(++b,0,se),se.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=z}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new sa(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=Dt(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new sa(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<z){var re=Math.min(y,z-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=z}}};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=we(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 z=gi(this);Gn(x,Math.max(0,x.height-z)),a&&(Ai(a,function(){ss(a,x,-z),fo(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&&(xn(this.doc,b)||Gn(b,b.height+E),x&&Ai(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Wr(x,"lineWidgetChanged",x,a,we(b))}))},Ct(ua);function ss(a,y,x){Xn(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),z=a.cm;return z&&E.noHScroll&&(z.display.alignWidgets=!0),aa(a,y,"widget",function(re){var ae=re.widgets||(re.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,z&&!xn(a,re)){var se=Xn(re)<a.scrollTop;Gn(re,re.height+gi(E)),se&&qa(z,E.height),z.curOp.forceUpdate=!0}return!0}),z&&Wr(z,"lineWidgetAdded",z,E,typeof y=="number"?y:we(y)),E}var us=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Do(a),ct(this,"clear")){var x=this.find();x&&Wr(this,"clear",x.from,x.to)}for(var b=null,E=null,z=0;z<this.lines.length;++z){var re=this.lines[z],ae=Sr(re.markedSpans,this);a&&!this.collapsed?fo(a,we(re),"text"):a&&(ae.to!=null&&(E=we(re)),ae.from!=null&&(b=we(re))),re.markedSpans=lr(re.markedSpans,ae),ae.from==null&&this.collapsed&&!xn(this.doc,re)&&a&&Gn(re,Pi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var se=0;se<this.lines.length;++se){var fe=wn(this.lines[se]),be=mr(fe);be>a.display.maxLineLength&&(a.display.maxLine=fe,a.display.maxLineLength=be,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&&ql(a.doc)),a&&Wr(a,"markerCleared",a,this,b,E),y&&Mo(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 z=this.lines[E],re=Sr(z.markedSpans,this);if(re.from!=null&&(x=Ae(y?z:we(z),re.from),a==-1))return x;if(re.to!=null&&(b=Ae(y?z:we(z),re.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Ai(b,function(){var E=y.line,z=we(y.line),re=$i(b,z);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!xn(x.doc,E)&&x.height!=null){var ae=x.height;x.height=null;var se=gi(x)-ae;se&&Gn(E,E.height+se)}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||Dt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(Dt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Ct(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 z=new go(a,E),re=ft(y,x);if(b&&nn(b,z,!1),re>0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=Pt("span",[z.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(On(a,y.line,y,x,z)||y.line!=x.line&&On(a,x.line,y,x,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");xr()}z.addToHistory&&Vl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,se=a.cm,fe;if(a.iter(ae,x.line+1,function(De){se&&z.collapsed&&!se.options.lineWrapping&&wn(De)==se.display.maxLine&&(fe=!0),z.collapsed&&ae!=y.line&&Gn(De,0),sr(De,new pr(z,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),z.collapsed&&a.iter(y.line,x.line+1,function(De){xn(a,De)&&Gn(De,0)}),z.clearOnEnter&&ce(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(Pr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++us,z.atomic=!0),se){if(fe&&(se.curOp.updateMaxLine=!0),z.collapsed)Ci(se,y.line,x.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var be=y.line;be<=x.line;be++)fo(se,be,"text");z.atomic&&ql(se.doc),Wr(se,"markerAdded",se,z)}return z}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)},Ct(ca);function vu(a,y,x,b,E){b=nn(b),b.shared=!1;var z=[Zo(a,y,x,b,E)],re=z[0],ae=b.widgetNode;return mo(a,function(se){ae&&(b.widgetNode=ae.cloneNode(!0)),z.push(Zo(se,vt(se,y),vt(se,x),b,E));for(var fe=0;fe<se.linked.length;++fe)if(se.linked[fe].isParent)return;re=ye(z)}),new ca(z,re)}function cs(a){return a.findMarks(Ae(a.first,0),a.clipPos(Ae(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(),z=a.clipPos(E.from),re=a.clipPos(E.to);if(ft(z,re)){var ae=Zo(a,z,re,b.primary,b.primary.type);b.markers.push(ae),ae.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],z=[E.primary.doc];mo(E.primary.doc,function(se){return z.push(se)});for(var re=0;re<E.markers.length;re++){var ae=E.markers[re];Dt(z,ae.doc)==-1&&(ae.parent=null,E.markers.splice(re--,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),sa.call(this,[new la([new Er("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var z=Ae(x,0);this.sel=po(z),this.history=new Aa(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),al(this,{from:z,to:z,text:a}),hi(this,po(z),Fe)};Si.prototype=Ue(sa.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=Mn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=Ae(this.first,0),x=this.first+this.size-1;_o(this,{from:y,to:Ae(x,Je(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),hi(this,po(y),Fe)}),replaceRange:function(a,y,x,b){y=vt(this,y),x=x?vt(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Ft(this,vt(this,a),vt(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(It(this,a))return Je(this,a)},getLineNumber:function(a){return we(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=Je(this,a)),wn(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return vt(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){Xl(this,vt(this,typeof a=="number"?Ae(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xl(this,vt(this,a),vt(this,y||a),x)}),extendSelection:ai(function(a,y,x){Ba(this,vt(this,a),y&&vt(this,y),x)}),extendSelections:ai(function(a,y){Yl(this,Gt(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=_e(this.sel.ranges,a);Yl(this,Gt(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Lr(vt(this,a[E].anchor),vt(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),hi(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Lr(vt(this,a),vt(this,y||a))),hi(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=Ft(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=Ft(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,z=0;z<E.ranges.length;z++){var re=E.ranges[z];b[z]={from:re.from(),to:re.to(),text:this.splitLines(a[z]),origin:x}}for(var ae=y&&y!="end"&&ou(this,b,y),se=b.length-1;se>=0;se--)_o(this,b[se]);ae?Jl(this,ae):this.cm&&Ro(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 Aa(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 Aa(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&&xt(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,xt(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!It(this,a)||(y=a,a=Je(this,a),!a))return null}else if(y=we(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(Ie(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",z=b[E];if(z)if(x==null)b[E]=null;else{var re=z.match(Ie(x));if(!re)return!1;var ae=re.index+re[0].length;b[E]=z.slice(0,re.index)+(!re.index||ae==z.length?"":" ")+z.slice(ae)||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,vt(this,a),vt(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=vt(this,a),Zo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=vt(this,a);var y=[],x=Je(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=vt(this,a),y=vt(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(z){var re=z.markedSpans;if(re)for(var ae=0;ae<re.length;ae++){var se=re[ae];!(se.to!=null&&E==a.line&&a.ch>=se.to||se.from==null&&E!=a.line||se.from!=null&&E==y.line&&se.from>=y.ch)&&(!x||x(se.marker))&&b.push(se.marker.parent||se.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var z=E.text.length+b;if(z>a)return y=a,!0;a-=z,++x}),vt(this,Ae(x,y))},indexFromPos:function(a){a=vt(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(Mn(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(Mn(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(b,cs(this)),b},unlinkDoc:function(a){if(a instanceof Gr&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cs(this));break}}if(a.history==this.history){var b=[a.id];mo(a,function(E){return b.push(E.id)},!0),a.history=new Aa(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):Wn(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 fs=0;function bu(a){var y=this;if(ds(y),!(ge(y,a)||ui(y.display,a))){Ht(a),ve&&(fs=+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,z=Array(E),re=0,ae=function(){++re==E&&oi(y,function(){x=vt(y.doc,x);var Ke={from:x,to:x,text:y.doc.splitLines(z.filter(function(Nt){return Nt!=null}).join(y.doc.lineSeparator())),origin:"paste"};_o(y.doc,Ke),Jl(y.doc,po(vt(y.doc,x),vt(y.doc,vo(Ke))))})()},se=function(Ke,Nt){if(y.options.allowDropFileTypes&&Dt(y.options.allowDropFileTypes,Ke.type)==-1){ae();return}var Vt=new FileReader;Vt.onerror=function(){return ae()},Vt.onload=function(){var sn=Vt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(sn)){ae();return}z[Nt]=sn,ae()},Vt.readAsText(Ke)},fe=0;fe<b.length;fe++)se(b[fe],fe);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var be=a.dataTransfer.getData("Text");if(be){var De;if(y.state.draggingText&&!y.state.draggingText.copy&&(De=y.listSelections()),Ra(y.doc,po(x,x)),De)for(var $e=0;$e<De.length;++$e)Ho(y.doc,"",De[$e].anchor,De[$e].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch(Ke){}}}}function xu(a,y){if(ve&&(!a.state.draggingText||+new Date-fs<100)){bn(y);return}if(!(ge(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!ke)){var x=Qe("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",pe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),pe&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();kl(a,x,b),a.display.dragCursor||(a.display.dragCursor=Qe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Oe(a.display.dragCursor,b)}}function ds(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var z=0;z<x.length;z++)a(x[z])})}}var ps=!1;function Cu(){ps||(Su(),ps=!0)}function Su(){var a;ce(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hs(ku)},100))}),ce(window,"blur",function(){return hs(Bo)})}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"},fa=0;fa<10;fa++)yo[fa+48]=yo[fa+96]=String(fa);for(var Fa=65;Fa<=90;Fa++)yo[Fa]=String.fromCharCode(Fa);for(var da=1;da<=12;da++)yo[da+111]=yo[da+63235]="F"+da;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=Ee?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,z,re=0;re<y.length-1;re++){var ae=y[re];if(/^(cmd|meta|m)$/i.test(ae))z=!0;else if(/^a(lt)?$/i.test(ae))x=!0;else if(/^(c|ctrl|control)$/i.test(ae))b=!0;else if(/^s(hift)?$/i.test(ae))E=!0;else throw new Error("Unrecognized modifier name: "+ae)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),z&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Du(a){var y={};for(var x in a)if(a.hasOwnProperty(x)){var b=a[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete a[x];continue}for(var E=_e(x.split(" "),Eu),z=0;z<E.length;z++){var re=void 0,ae=void 0;z==E.length-1?(ae=E.join(" "),re=b):(ae=E.slice(0,z+1).join(" "),re="...");var se=y[ae];if(!se)y[ae]=re;else if(se!=re)throw new Error("Inconsistent bindings for "+ae)}delete a[x]}for(var fe in y)a[fe]=y[fe];return a}function Wo(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 Wo(a,y.fallthrough,x,b);for(var z=0;z<y.fallthrough.length;z++){var re=Wo(a,y.fallthrough[z],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ms(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(Et?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(Et?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(pe&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function _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 z=y(x[E]);b.length&&ft(z.from,ye(b).to)<=0;){var re=b.pop();if(ft(re.from,z.from)<0){z.from=re.from;break}}b.push(z)}Ai(a,function(){for(var ae=b.length-1;ae>=0;ae--)Ho(a.doc,"",b[ae].from,b[ae].to,"+delete");Ro(a)})}function cl(a,y,x){var b=pn(a.text,y+x,x);return b<0||b>a.text.length?null:b}function fl(a,y,x){var b=cl(a,y.ch,x);return b==null?null:new Ae(y.line,b,x<0?"after":"before")}function dl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var z=ue(x,y.doc.direction);if(z){var re=E<0?ye(z):z[0],ae=E<0==(re.level==1),se=ae?"after":"before",fe;if(re.level>0||y.doc.direction=="rtl"){var be=uo(y,x);fe=E<0?x.text.length-1:0;var De=Zi(y,be,fe).top;fe=tn(function($e){return Zi(y,be,$e).top==De},E<0==(re.level==1)?re.from:re.to-1,fe),se=="before"&&(fe=cl(x,fe,1))}else fe=E<0?re.to:re.from;return new Ae(b,fe,se)}}return new Ae(b,E<0?x.text.length:0,E<0?"before":"after")}function Mu(a,y,x,b){var E=ue(y,a.doc.direction);if(!E)return fl(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 z=ee(E,x.ch,x.sticky),re=E[z];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return fl(y,x,b);var ae=function(Cn,An){return cl(y,Cn instanceof Ae?Cn.ch:Cn,An)},se,fe=function(Cn){return a.options.lineWrapping?(se=se||uo(a,y),Yr(a,y,se,Cn)):{begin:0,end:y.text.length}},be=fe(x.sticky=="before"?ae(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var De=re.level==1==b<0,$e=ae(x,De?1:-1);if($e!=null&&(De?$e<=re.to&&$e<=be.end:$e>=re.from&&$e>=be.begin)){var Ke=De?"before":"after";return new Ae(x.line,$e,Ke)}}var Nt=function(Cn,An,Sn){for(var Fn=function(Or,li){return li?new Ae(x.line,ae(Or,1),"before"):new Ae(x.line,Or,"after")};Cn>=0&&Cn<E.length;Cn+=An){var Jn=E[Cn],Vn=An>0==(Jn.level!=1),fr=Vn?Sn.begin:ae(Sn.end,-1);if(Jn.from<=fr&&fr<Jn.to||(fr=Vn?Jn.from:ae(Jn.to,-1),Sn.begin<=fr&&fr<Sn.end))return Fn(fr,Vn)}},Vt=Nt(z+b,b,be);if(Vt)return Vt;var sn=b>0?be.end:ae(be.begin,-1);return sn!=null&&!(b>0&&sn==y.text.length)&&(Vt=Nt(b>0?0:E.length-1,b,fe(sn)),Vt)?Vt:null}var ha={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Fe)},killLine:function(a){return zo(a,function(y){if(y.empty()){var x=Je(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Ae(y.head.line+1,0)}:{from:y.head,to:Ae(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return zo(a,function(y){return{from:Ae(y.from().line,0),to:vt(a.doc,Ae(y.to().line+1,0))}})},delLineLeft:function(a){return zo(a,function(y){return{from:Ae(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(Ae(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Ae(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return ys(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bs(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Lu(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")},st)},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")},st)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bs(a,y.head):b},st)},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 z=x[E].from(),re=me(a.getLine(z.line),z.ch,b);y.push(Ne(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Ai(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,z=Je(a.doc,E.line).text;if(z){if(E.ch==z.length&&(E=new Ae(E.line,E.ch-1)),E.ch>0)E=new Ae(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),Ae(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=Je(a.doc,E.line-1).text;re&&(E=new Ae(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Ae(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Lr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Ai(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);Ro(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=Je(a.doc,y),b=wn(x);return b!=x&&(y=we(b)),dl(!0,a,b,y,1)}function Lu(a,y){var x=Je(a.doc,y),b=Kn(x);return b!=x&&(y=we(b)),dl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=Je(a.doc,x.line),E=ue(b,a.doc.direction);if(!E||E[0].level==0){var z=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=z&&y.ch;return Ae(x.line,re?0:z,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=ha[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=_t}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Tu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Wo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Wo(y,a.options.extraKeys,x,a)||Wo(y,a.options.keyMap,x,a)}var Pu=new he;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vs(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Pu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xs(a,E+" "+y,x,b))return!0}return xs(a,y,x,b)}function xs(a,y,x,b){var E=Tu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Wr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(Ht(x),Xa(a)),!!E}function ws(a,y){var x=gs(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Au(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var hl=null;function Cs(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ze(),!ge(y,a))){ve&&ze<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=ws(y,a);pe&&(hl=b?x:null,!b&&x==88&&!tt&&(Ee?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ie&&!Ee&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Nu(y)}}function Nu(a){var y=a.display.lineDiv;gt(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(mt(y,"CodeMirror-crosshair"),Ve(document,"keyup",x),Ve(document,"mouseover",x))}ce(document,"keyup",x),ce(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),ge(this,a)}function ks(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||ge(y,a)||a.ctrlKey&&!a.altKey||Ee&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(pe&&x==hl){hl=null,Ht(a);return}if(!(pe&&(!a.which||a.which<10)&&ws(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Au(y,a,E)||y.display.input.onKeyPress(a))}}}var Bu=400,pl=function(a,y,x){this.time=a,this.pos=y,this.button=x};pl.prototype.compare=function(a,y,x){return this.time+Bu>a&&ft(y,this.pos)==0&&x==this.button};var va,ma;function Ru(a,y){var x=+new Date;return ma&&ma.compare(x,a,y)?(va=ma=null,"triple"):va&&va.compare(x,a,y)?(ma=new pl(x,a,y),va=null,"double"):(va=new pl(x,a,y),ma=null,"single")}function Es(a){var y=this,x=y.display;if(!(ge(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Te||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=Co(y,a),E=Tn(a),z=b?Ru(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,z,a))&&(E==1?b?Fu(y,b,z,a):Nn(a)==x.scroller&&Ht(a):E==2?(b&&Ba(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(pt?y.display.input.onContextMenu(a):Dl(y)))}}}function Iu(a,y,x,b,E){var z="Click";return b=="double"?z="Double"+z:b=="triple"&&(z="Triple"+z),z=(y==1?"Left":y==2?"Middle":"Right")+z,pa(a,ms(z,E),E,function(re){if(typeof re=="string"&&(re=ha[re]),!re)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=re(a,x)!=_t}finally{a.state.suppressEdits=!1}return ae})}function Ou(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var z=dt?x.shiftKey&&x.metaKey:x.altKey;E.unit=z?"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=Ee?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ee?x.altKey:x.ctrlKey)),E}function Fu(a,y,x,b){ve?setTimeout(Pn(El,a),0):a.curOp.focus=Ze();var E=Ou(a,x,b),z=a.doc.sel,re;a.options.dragDrop&&jn&&!a.isReadOnly()&&x=="single"&&(re=z.contains(y))>-1&&(ft((re=z.ranges[re]).from(),y)<0||y.xRel>0)&&(ft(re.to(),y)>0||y.xRel<0)?_u(a,b,y,E):Hu(a,b,y,E)}function _u(a,y,x,b){var E=a.display,z=!1,re=oi(a,function(fe){Te&&(E.scroller.draggable=!1),a.state.draggingText=!1,Ve(E.wrapper.ownerDocument,"mouseup",re),Ve(E.wrapper.ownerDocument,"mousemove",ae),Ve(E.scroller,"dragstart",se),Ve(E.scroller,"drop",re),z||(Ht(fe),b.addNew||Ba(a.doc,x,null,null,b.extend),Te&&!ke||ve&&ze==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(fe){z=z||Math.abs(y.clientX-fe.clientX)+Math.abs(y.clientY-fe.clientY)>=10},se=function(){return z=!0};Te&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),ce(E.wrapper.ownerDocument,"mouseup",re),ce(E.wrapper.ownerDocument,"mousemove",ae),ce(E.scroller,"dragstart",se),ce(E.scroller,"drop",re),Dl(a),setTimeout(function(){return E.input.focus()},20)}function Ds(a,y,x){if(x=="char")return new Lr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Lr(Ae(y.line,0),vt(a.doc,Ae(y.line+1,0)));var b=x(a,y);return new Lr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,z=a.doc;Ht(y);var re,ae,se=z.sel,fe=se.ranges;if(b.addNew&&!b.extend?(ae=z.sel.contains(x),ae>-1?re=fe[ae]:re=new Lr(x,x)):(re=z.sel.primary(),ae=z.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Lr(x,x)),x=Co(a,y,!0,!0),ae=-1;else{var be=Ds(a,x,b.unit);b.extend?re=sl(re,be.anchor,be.head,b.extend):re=be}b.addNew?ae==-1?(ae=fe.length,hi(z,Ki(a,fe.concat([re]),ae),{scroll:!1,origin:"*mouse"})):fe.length>1&&fe[ae].empty()&&b.unit=="char"&&!b.extend?(hi(z,Ki(a,fe.slice(0,ae).concat(fe.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),se=z.sel):ul(z,ae,re,at):(ae=0,hi(z,new Oi([re],0),at),se=z.sel);var De=x;function $e(Sn){if(ft(De,Sn)!=0)if(De=Sn,b.unit=="rectangle"){for(var Fn=[],Jn=a.options.tabSize,Vn=me(Je(z,x.line).text,x.ch,Jn),fr=me(Je(z,Sn.line).text,Sn.ch,Jn),Or=Math.min(Vn,fr),li=Math.max(Vn,fr),jr=Math.min(x.line,Sn.line),Ni=Math.min(a.lastLine(),Math.max(x.line,Sn.line));jr<=Ni;jr++){var ki=Je(z,jr).text,qr=cn(ki,Or,Jn);Or==li?Fn.push(new Lr(Ae(jr,qr),Ae(jr,qr))):ki.length>qr&&Fn.push(new Lr(Ae(jr,qr),Ae(jr,cn(ki,li,Jn))))}Fn.length||Fn.push(new Lr(x,x)),hi(z,Ki(a,se.ranges.slice(0,ae).concat(Fn),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(Sn)}else{var Ei=re,fi=Ds(a,Sn,b.unit),ri=Ei.anchor,$r;ft(fi.anchor,ri)>0?($r=fi.head,ri=kt(Ei.from(),fi.anchor)):($r=fi.anchor,ri=ln(Ei.to(),fi.head));var Ur=se.ranges.slice(0);Ur[ae]=Zu(a,new Lr(vt(z,ri),$r)),hi(z,Ki(a,Ur,ae),at)}}var Ke=E.wrapper.getBoundingClientRect(),Nt=0;function Vt(Sn){var Fn=++Nt,Jn=Co(a,Sn,!0,b.unit=="rectangle");if(Jn)if(ft(Jn,De)!=0){a.curOp.focus=Ze(),$e(Jn);var Vn=Ma(E,z);(Jn.line>=Vn.to||Jn.line<Vn.from)&&setTimeout(oi(a,function(){Nt==Fn&&Vt(Sn)}),150)}else{var fr=Sn.clientY<Ke.top?-20:Sn.clientY>Ke.bottom?20:0;fr&&setTimeout(oi(a,function(){Nt==Fn&&(E.scroller.scrollTop+=fr,Vt(Sn))}),50)}}function sn(Sn){a.state.selectingText=!1,Nt=1/0,Sn&&(Ht(Sn),E.input.focus()),Ve(E.wrapper.ownerDocument,"mousemove",Cn),Ve(E.wrapper.ownerDocument,"mouseup",An),z.history.lastSelOrigin=null}var Cn=oi(a,function(Sn){Sn.buttons===0||!Tn(Sn)?sn(Sn):Vt(Sn)}),An=oi(a,sn);a.state.selectingText=An,ce(E.wrapper.ownerDocument,"mousemove",Cn),ce(E.wrapper.ownerDocument,"mouseup",An)}function Zu(a,y){var x=y.anchor,b=y.head,E=Je(a.doc,x.line);if(ft(x,b)==0&&x.sticky==b.sticky)return y;var z=ue(E);if(!z)return y;var re=ee(z,x.ch,x.sticky),ae=z[re];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var se=re+(ae.from==x.ch==(ae.level!=1)?0:1);if(se==0||se==z.length)return y;var fe;if(b.line!=x.line)fe=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=ee(z,b.ch,b.sticky),De=be-re||(b.ch-x.ch)*(ae.level==1?-1:1);be==se-1||be==se?fe=De<0:fe=De>0}var $e=z[se+(fe?-1:0)],Ke=fe==($e.level==1),Nt=Ke?$e.from:$e.to,Vt=Ke?"after":"before";return x.ch==Nt&&x.sticky==Vt?y:new Lr(new Ae(x.line,Nt,Vt),b)}function Ms(a,y,x,b){var E,z;if(y.touches)E=y.touches[0].clientX,z=y.touches[0].clientY;else try{E=y.clientX,z=y.clientY}catch($e){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&Ht(y);var re=a.display,ae=re.lineDiv.getBoundingClientRect();if(z>ae.bottom||!ct(a,x))return zt(y);z-=ae.top-re.viewOffset;for(var se=0;se<a.display.gutterSpecs.length;++se){var fe=re.gutters.childNodes[se];if(fe&&fe.getBoundingClientRect().right>=E){var be=Se(a.doc,z),De=a.display.gutterSpecs[se];return Ye(a,x,a,be,De.className,y),zt(y)}}}function vl(a,y){return Ms(a,y,"gutterClick",!0)}function Ls(a,y){ui(a.display,y)||Wu(a,y)||ge(a,y,"contextmenu")||pt||a.display.input.onContextMenu(y)}function Wu(a,y){return ct(a,"gutterContextMenu")?Ms(a,y,"gutterContextMenu",!1):!1}function Ts(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wo(a)}var Go={toString:function(){return"CodeMirror.Init"}},Ps={},Za={};function zu(a){var y=a.optionHandlers;function x(b,E,z,re){a.defaults[b]=E,z&&(y[b]=re?function(ae,se,fe){fe!=Go&&z(ae,se,fe)}:z)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,ol(b)},!0),x("indentUnit",2,ol,!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 z=[],re=b.doc.first;b.doc.iter(function(se){for(var fe=0;;){var be=se.text.indexOf(E,fe);if(be==-1)break;fe=be+E.length,z.push(Ae(re,be))}re++});for(var ae=z.length-1;ae>=0;ae--)Ho(b.doc,E,z[ae],Ae(z[ae].line,z[ae].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,z){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),z!=Go&&b.refresh()}),x("specialCharPlaceholder",Mi,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",He?"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",!ht),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Ts(b),ra(b)},!0),x("keyMap","default",function(b,E,z){var re=_a(E),ae=z!=Go&&_a(z);ae&&ae.detach&&ae.detach(b,re),re.attach&&re.attach(b,ae||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rl(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Io(b)},!0),x("scrollbarStyle","native",function(b){Nl(b),Io(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rl(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Bo(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,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 Gu(a,y,x){var b=x&&x!=Go;if(!y!=!b){var E=a.display.dragFunctions,z=y?ce:Ve;z(a.display.scroller,"dragstart",E.start),z(a.display.scroller,"dragenter",E.enter),z(a.display.scroller,"dragover",E.over),z(a.display.scroller,"dragleave",E.leave),z(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(gt(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(mt(a.display.wrapper,"CodeMirror-wrap"),cr(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return Io(a)},100)}function Gr(a,y){var x=this;if(!(this instanceof Gr))return new Gr(a,y);this.options=y=y?nn(y):{},nn(Ps,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 Gr.inputStyles[y.inputStyle](this),z=this.display=new ru(a,b,E,y);z.wrapper.CodeMirror=this,Ts(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Nl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new he,keySeq:null,specialChars:null},y.autofocus&&!He&&z.input.focus(),ve&&ze<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,zl(this,b),y.autofocus&&!He||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Bo(this);for(var re in Za)Za.hasOwnProperty(re)&&Za[re](this,y[re],Go);Il(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<ml.length;++ae)ml[ae](this);Mo(this),Te&&y.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}Gr.defaults=Ps,Gr.optionHandlers=Za;function Vu(a){var y=a.display;ce(y.scroller,"mousedown",oi(a,Es)),ve&&ze<11?ce(y.scroller,"dblclick",oi(a,function(se){if(!ge(a,se)){var fe=Co(a,se);if(!(!fe||vl(a,se)||ui(a.display,se))){Ht(se);var be=a.findWordAt(fe);Ba(a.doc,be.anchor,be.head)}}})):ce(y.scroller,"dblclick",function(se){return ge(a,se)||Ht(se)}),ce(y.scroller,"contextmenu",function(se){return Ls(a,se)}),ce(y.input.getField(),"contextmenu",function(se){y.scroller.contains(se.target)||Ls(a,se)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function z(se){if(se.touches.length!=1)return!1;var fe=se.touches[0];return fe.radiusX<=1&&fe.radiusY<=1}function re(se,fe){if(fe.left==null)return!0;var be=fe.left-se.left,De=fe.top-se.top;return be*be+De*De>20*20}ce(y.scroller,"touchstart",function(se){if(!ge(a,se)&&!z(se)&&!vl(a,se)){y.input.ensurePolled(),clearTimeout(x);var fe=+new Date;y.activeTouch={start:fe,moved:!1,prev:fe-b.end<=300?b:null},se.touches.length==1&&(y.activeTouch.left=se.touches[0].pageX,y.activeTouch.top=se.touches[0].pageY)}}),ce(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),ce(y.scroller,"touchend",function(se){var fe=y.activeTouch;if(fe&&!ui(y,se)&&fe.left!=null&&!fe.moved&&new Date-fe.start<300){var be=a.coordsChar(y.activeTouch,"page"),De;!fe.prev||re(fe,fe.prev)?De=new Lr(be,be):!fe.prev.prev||re(fe,fe.prev.prev)?De=a.findWordAt(be):De=new Lr(Ae(be.line,0),vt(a.doc,Ae(be.line+1,0))),a.setSelection(De.anchor,De.head),a.focus(),Ht(se)}E()}),ce(y.scroller,"touchcancel",E),ce(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Ye(a,"scroll",a))}),ce(y.scroller,"mousewheel",function(se){return _l(a,se)}),ce(y.scroller,"DOMMouseScroll",function(se){return _l(a,se)}),ce(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(se){ge(a,se)||bn(se)},over:function(se){ge(a,se)||(wu(a,se),bn(se))},start:function(se){return xu(a,se)},drop:oi(a,bu),leave:function(se){ge(a,se)||ds(a)}};var ae=y.input.getField();ce(ae,"keyup",function(se){return Ss.call(a,se)}),ce(ae,"keydown",oi(a,Cs)),ce(ae,"keypress",oi(a,ks)),ce(ae,"focus",function(se){return Ja(a,se)}),ce(ae,"blur",function(se){return Bo(a,se)})}var ml=[];Gr.defineInitHook=function(a){return ml.push(a)};function ga(a,y,x,b){var E=a.doc,z;x==null&&(x="add"),x=="smart"&&(E.mode.indent?z=er(a,y).state:x="prev");var re=a.options.tabSize,ae=Je(E,y),se=me(ae.text,null,re);ae.stateAfter&&(ae.stateAfter=null);var fe=ae.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(ae.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(z,ae.text.slice(fe.length),ae.text),be==_t||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=me(Je(E,y-1).text,null,re):be=0:x=="add"?be=se+a.options.indentUnit:x=="subtract"?be=se-a.options.indentUnit:typeof x=="number"&&(be=se+x),be=Math.max(0,be);var De="",$e=0;if(a.options.indentWithTabs)for(var Ke=Math.floor(be/re);Ke;--Ke)$e+=re,De+=" ";if($e<be&&(De+=Ne(be-$e)),De!=fe)return Ho(E,De,Ae(y,0),Ae(y,fe.length),"+input"),ae.stateAfter=null,!0;for(var Nt=0;Nt<E.sel.ranges.length;Nt++){var Vt=E.sel.ranges[Nt];if(Vt.head.line==y&&Vt.head.ch<fe.length){var sn=Ae(y,fe.length);ul(E,Nt,new Lr(sn,sn));break}}}var Yi=null;function Wa(a){Yi=a}function gl(a,y,x,b,E){var z=a.doc;a.display.shift=!1,b||(b=z.sel);var re=+new Date-200,ae=E=="paste"||a.state.pasteIncoming>re,se=Wn(y),fe=null;if(ae&&b.ranges.length>1)if(Yi&&Yi.text.join(`
`)==y){if(b.ranges.length%Yi.text.length==0){fe=[];for(var be=0;be<Yi.text.length;be++)fe.push(z.splitLines(Yi.text[be]))}}else se.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(fe=_e(se,function(Cn){return[Cn]}));for(var De=a.curOp.updateInput,$e=b.ranges.length-1;$e>=0;$e--){var Ke=b.ranges[$e],Nt=Ke.from(),Vt=Ke.to();Ke.empty()&&(x&&x>0?Nt=Ae(Nt.line,Nt.ch-x):a.state.overwrite&&!ae?Vt=Ae(Vt.line,Math.min(Je(z,Vt.line).text.length,Vt.ch+ye(se).length)):ae&&Yi&&Yi.lineWise&&Yi.text.join(`
`)==se.join(`
`)&&(Nt=Vt=Ae(Nt.line,0)));var sn={from:Nt,to:Vt,text:fe?fe[$e%fe.length]:se,origin:E||(ae?"paste":a.state.cutIncoming>re?"cut":"+input")};_o(a.doc,sn),Wr(a,"inputRead",a,sn)}y&&!ae&&Ns(a,y),Ro(a),a.curOp.updateInput<2&&(a.curOp.updateInput=De),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function As(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Ai(y,function(){return gl(y,x,0,null,"paste")}),!0}function Ns(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 z=a.getModeAt(E.head),re=!1;if(z.electricChars){for(var ae=0;ae<z.electricChars.length;ae++)if(y.indexOf(z.electricChars.charAt(ae))>-1){re=ga(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(Je(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Wr(a,"electricInput",a,E.head.line)}}}function Bs(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,z={anchor:Ae(E,0),head:Ae(E+1,0)};x.push(z),y.push(a.getRange(z.anchor,z.head))}return{text:y,ranges:x}}function Rs(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Is(){var a=Qe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Qe("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Te?a.style.width="1000px":a.setAttribute("wrap","off"),je&&(a.style.border="1px solid black"),Rs(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var z=this.options,re=z[b];z[b]==E&&b!="mode"||(z[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,re),Ye(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,z=0;z<E.length;++z)if(E[z]==b||E[z].name==b)return E.splice(z,1),!0},addOverlay:yi(function(b,E){var z=b.token?b:a.getMode(this.options,b);if(z.startState)throw new Error("Overlays may not be stateful.");lt(this.state.overlays,{mode:z,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Ci(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,z=0;z<E.length;++z){var re=E[z].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(z,1),this.state.modeGen++,Ci(this);return}}}),indentLine:yi(function(b,E,z){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),It(this.doc,b)&&ga(this,b,E,z)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,z=-1,re=0;re<E.length;re++){var ae=E[re];if(ae.empty())ae.head.line>z&&(ga(this,ae.head.line,b,!0),z=ae.head.line,re==this.doc.sel.primIndex&&Ro(this));else{var se=ae.from(),fe=ae.to(),be=Math.max(z,se.line);z=Math.min(this.lastLine(),fe.line-(fe.ch?0:1))+1;for(var De=be;De<z;++De)ga(this,De,b);var $e=this.doc.sel.ranges;se.ch==0&&E.length==$e.length&&$e[re].from().ch>0&&ul(this.doc,re,new Lr(se,$e[re].to()),Fe)}}}),getTokenAt:function(b,E){return qn(this,b,E)},getLineTokens:function(b,E){return qn(this,Ae(b),E,!0)},getTokenTypeAt:function(b){b=vt(this.doc,b);var E=Qn(this,Je(this.doc,b.line)),z=0,re=(E.length-1)/2,ae=b.ch,se;if(ae==0)se=E[2];else for(;;){var fe=z+re>>1;if((fe?E[fe*2-1]:0)>=ae)re=fe;else if(E[fe*2+1]<ae)z=fe+1;else{se=E[fe*2+2];break}}var be=se?se.indexOf("overlay "):-1;return be<0?se:be==0?null:se.slice(0,be-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var z=[];if(!x.hasOwnProperty(E))return z;var re=x[E],ae=this.getModeAt(b);if(typeof ae[E]=="string")re[ae[E]]&&z.push(re[ae[E]]);else if(ae[E])for(var se=0;se<ae[E].length;se++){var fe=re[ae[E][se]];fe&&z.push(fe)}else ae.helperType&&re[ae.helperType]?z.push(re[ae.helperType]):re[ae.name]&&z.push(re[ae.name]);for(var be=0;be<re._global.length;be++){var De=re._global[be];De.pred(ae,this)&&Dt(z,De.val)==-1&&z.push(De.val)}return z},getStateAfter:function(b,E){var z=this.doc;return b=jt(z,b==null?z.first+z.size-1:b),er(this,b+1,E).state},cursorCoords:function(b,E){var z,re=this.doc.sel.primary();return b==null?z=re.head:typeof b=="object"?z=vt(this.doc,b):z=b?re.from():re.to(),wi(this,z,E||"page")},charCoords:function(b,E){return No(this,vt(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,Se(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,z){var re=!1,ae;if(typeof b=="number"){var se=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>se&&(b=se,re=!0),ae=Je(this.doc,b)}else ae=b;return Ao(this,ae,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-Xn(ae):0)},defaultTextHeight:function(){return Pi(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,z,re,ae){var se=this.display;b=wi(this,vt(this.doc,b));var fe=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),se.sizer.appendChild(E),re=="over")fe=b.top;else if(re=="above"||re=="near"){var De=Math.max(se.wrapper.clientHeight,this.doc.height),$e=Math.max(se.sizer.clientWidth,se.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>De)&&b.top>E.offsetHeight?fe=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=De&&(fe=b.bottom),be+E.offsetWidth>$e&&(be=$e-E.offsetWidth)}E.style.top=fe+"px",E.style.left=E.style.right="",ae=="right"?(be=se.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?be=0:ae=="middle"&&(be=(se.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),z&&Gs(this,{left:be,top:fe,right:be+E.offsetWidth,bottom:fe+E.offsetHeight})},triggerOnKeyDown:yi(Cs),triggerOnKeyPress:yi(ks),triggerOnKeyUp:Ss,triggerOnMouseDown:yi(Es),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:yi(function(b){Ns(this,b)}),findPosH:function(b,E,z,re){var ae=1;E<0&&(ae=-1,E=-E);for(var se=vt(this.doc,b),fe=0;fe<E&&(se=yl(this.doc,se,ae,z,re),!se.hitSide);++fe);return se},moveH:yi(function(b,E){var z=this;this.extendSelectionsBy(function(re){return z.display.shift||z.doc.extend||re.empty()?yl(z.doc,re.head,b,E,z.options.rtlMoveVisually):b<0?re.from():re.to()},st)}),deleteH:yi(function(b,E){var z=this.doc.sel,re=this.doc;z.somethingSelected()?re.replaceSelection("",null,"+delete"):zo(this,function(ae){var se=yl(re,ae.head,b,E,!1);return b<0?{from:se,to:ae.head}:{from:ae.head,to:se}})}),findPosV:function(b,E,z,re){var ae=1,se=re;E<0&&(ae=-1,E=-E);for(var fe=vt(this.doc,b),be=0;be<E;++be){var De=wi(this,fe,"div");if(se==null?se=De.left:De.left=se,fe=Os(this,De,ae,z),fe.hitSide)break}return fe},moveV:yi(function(b,E){var z=this,re=this.doc,ae=[],se=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(be){if(se)return b<0?be.from():be.to();var De=wi(z,be.head,"div");be.goalColumn!=null&&(De.left=be.goalColumn),ae.push(De.left);var $e=Os(z,De,b,E);return E=="page"&&be==re.sel.primary()&&qa(z,No(z,$e,"div").top-De.top),$e},st),ae.length)for(var fe=0;fe<re.sel.ranges.length;fe++)re.sel.ranges[fe].goalColumn=ae[fe]}),findWordAt:function(b){var E=this.doc,z=Je(E,b.line).text,re=b.ch,ae=b.ch;if(z){var se=this.getHelper(b,"wordChars");(b.sticky=="before"||ae==z.length)&&re?--re:++ae;for(var fe=z.charAt(re),be=yt(fe,se)?function(De){return yt(De,se)}:/\s/.test(fe)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!yt(De)};re>0&&be(z.charAt(re-1));)--re;for(;ae<z.length&&be(z.charAt(ae));)++ae}return new Lr(Ae(b.line,re),Ae(b.line,ae))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?gt(this.display.cursorDiv,"CodeMirror-overwrite"):mt(this.display.cursorDiv,"CodeMirror-overwrite"),Ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ze()},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-Li(this)-this.display.barHeight,width:b.scrollWidth-Li(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:Ae(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?js(this,b):Ll(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var z=this,re=function(se){return typeof se=="number"||/^\d+$/.test(String(se))?se+"px":se};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(se){if(se.widgets){for(var fe=0;fe<se.widgets.length;fe++)if(se.widgets[fe].noHScroll){fo(z,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,Ye(this,"refresh",this)}),operation:function(b){return Ai(this,b)},startOperation:function(){return Do(this)},endOperation:function(){return Mo(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),tl(this.display),(b==null||Math.abs(b-Pi(this.display))>.5||this.options.lineWrapping)&&Ya(this),Ye(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),zl(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Wr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ct(a),a.registerHelper=function(b,E,z){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=z},a.registerGlobalHelper=function(b,E,z,re){a.registerHelper(b,E,re),x[b]._global.push({pred:z,val:re})}}function yl(a,y,x,b,E){var z=y,re=x,ae=Je(a,y.line),se=E&&a.direction=="rtl"?-x:x;function fe(){var An=y.line+se;return An<a.first||An>=a.first+a.size?!1:(y=new Ae(An,y.ch,y.sticky),ae=Je(a,An))}function be(An){var Sn;if(b=="codepoint"){var Fn=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Fn)?Sn=null:Sn=new Ae(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(Fn>=55296&&Fn<56320?2:1))),-x)}else E?Sn=Mu(a.cm,ae,y,x):Sn=fl(ae,y,x);if(Sn==null)if(!An&&fe())y=dl(E,a.cm,ae,y.line,se);else return!1;else y=Sn;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var De=null,$e=b=="group",Ke=a.cm&&a.cm.getHelper(y,"wordChars"),Nt=!0;!(x<0&&!be(!Nt));Nt=!1){var Vt=ae.text.charAt(y.ch)||`
`,sn=yt(Vt,Ke)?"w":$e&&Vt==`
`?"n":!$e||/\s/.test(Vt)?null:"p";if($e&&!Nt&&!sn&&(sn="s"),De&&De!=sn){x<0&&(x=1,be(),y.sticky="after");break}if(sn&&(De=sn),x>0&&!be(!Nt))break}var Cn=Ia(a,y,z,re,!0);return Tt(z,Cn)&&(Cn.hitSide=!0),Cn}function Os(a,y,x,b){var E=a.doc,z=y.left,re;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),se=Math.max(ae-.5*Pi(a.display),3);re=(x>0?y.bottom:y.top)+x*se}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var fe;fe=ci(a,z,re),!!fe.outside;){if(x<0?re<=0:re>=E.height){fe.hitSide=!0;break}re+=x*5}return fe}var Nr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Nr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Rs(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function z(ae){for(var se=ae.target;se;se=se.parentNode){if(se==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(se.className))break}return!1}ce(E,"paste",function(ae){!z(ae)||ge(b,ae)||As(ae,b)||ze<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),ce(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),ce(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),ce(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),ce(E,"touchstart",function(){return x.forceCompositionEnd()}),ce(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(ae){if(!(!z(ae)||ge(b,ae))){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var se=Bs(b);Wa({lineWise:!0,text:se.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(se.ranges,0,Fe),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var fe=Yi.text.join(`
`);if(ae.clipboardData.setData("Text",fe),ae.clipboardData.getData("Text")==fe){ae.preventDefault();return}}var be=Is(),De=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),De.value=Yi.text.join(`
`);var $e=document.activeElement;Ot(De),setTimeout(function(){b.display.lineSpace.removeChild(be),$e.focus(),$e==E&&x.showPrimarySelection()},50)}}ce(E,"copy",re),ce(E,"cut",re)},Nr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Nr.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Nr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Nr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Nr.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 z=za(y,a.anchorNode,a.anchorOffset),re=za(y,a.focusNode,a.focusOffset);if(!(z&&!z.bad&&re&&!re.bad&&ft(kt(z,re),b)==0&&ft(ln(z,re),E)==0)){var ae=y.display.view,se=b.line>=y.display.viewFrom&&Fs(y,b)||{node:ae[0].measure.map[2],offset:0},fe=E.line<y.display.viewTo&&Fs(y,E);if(!fe){var be=ae[ae.length-1].measure,De=be.maps?be.maps[be.maps.length-1]:be.map;fe={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!se||!fe){a.removeAllRanges();return}var $e=a.rangeCount&&a.getRangeAt(0),Ke;try{Ke=Pe(se.node,se.offset,fe.offset,fe.node)}catch(Nt){}Ke&&(!ie&&y.state.focused?(a.collapse(se.node,se.offset),Ke.collapsed||(a.removeAllRanges(),a.addRange(Ke))):(a.removeAllRanges(),a.addRange(Ke)),$e&&a.anchorNode==null?a.addRange($e):ie&&this.startGracePeriod()),this.rememberSelection()}},Nr.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)},Nr.prototype.showMultipleSelections=function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},Nr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Nr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return rt(this.div,y)},Nr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Nr.prototype.blur=function(){this.div.blur()},Nr.prototype.getField=function(){return this.div},Nr.prototype.supportsTouch=function(){return!0},Nr.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Ai(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)},Nr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Nr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Re&&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&&Ai(y,function(){hi(y.doc,po(x,b),Fe),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Nr.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=Ae(b.line-1,Je(a.doc,b.line-1).length)),E.ch==Je(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Ae(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var z,re,ae;b.line==y.viewFrom||(z=So(a,b.line))==0?(re=we(y.view[0].line),ae=y.view[0].node):(re=we(y.view[z].line),ae=y.view[z-1].node.nextSibling);var se=So(a,E.line),fe,be;if(se==y.view.length-1?(fe=y.viewTo-1,be=y.lineDiv.lastChild):(fe=we(y.view[se+1].line)-1,be=y.view[se+1].node.previousSibling),!ae)return!1;for(var De=a.doc.splitLines(Yu(a,ae,be,re,fe)),$e=Ft(a.doc,Ae(re,0),Ae(fe,Je(a.doc,fe).text.length));De.length>1&&$e.length>1;)if(ye(De)==ye($e))De.pop(),$e.pop(),fe--;else if(De[0]==$e[0])De.shift(),$e.shift(),re++;else break;for(var Ke=0,Nt=0,Vt=De[0],sn=$e[0],Cn=Math.min(Vt.length,sn.length);Ke<Cn&&Vt.charCodeAt(Ke)==sn.charCodeAt(Ke);)++Ke;for(var An=ye(De),Sn=ye($e),Fn=Math.min(An.length-(De.length==1?Ke:0),Sn.length-($e.length==1?Ke:0));Nt<Fn&&An.charCodeAt(An.length-Nt-1)==Sn.charCodeAt(Sn.length-Nt-1);)++Nt;if(De.length==1&&$e.length==1&&re==b.line)for(;Ke&&Ke>b.ch&&An.charCodeAt(An.length-Nt-1)==Sn.charCodeAt(Sn.length-Nt-1);)Ke--,Nt++;De[De.length-1]=An.slice(0,An.length-Nt).replace(/^\u200b+/,""),De[0]=De[0].slice(Ke).replace(/\u200b+$/,"");var Jn=Ae(re,Ke),Vn=Ae(fe,$e.length?ye($e).length-Nt:0);if(De.length>1||De[0]||ft(Jn,Vn))return Ho(a.doc,De,Jn,Vn,"+input"),!0},Nr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Nr.prototype.reset=function(){this.forceCompositionEnd()},Nr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Nr.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))},Nr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Ai(this.cm,function(){return Ci(a.cm)})},Nr.prototype.setUneditable=function(a){a.contentEditable="false"},Nr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||oi(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Nr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Nr.prototype.onContextMenu=function(){},Nr.prototype.resetPosition=function(){},Nr.prototype.needsContentAttribute=!0;function Fs(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=Je(a.doc,y.line),E=Po(x,b,y.line),z=ue(b,a.doc.direction),re="left";if(z){var ae=ee(z,y.ch);re=ae%2?"right":"left"}var se=xa(E.map,y.ch,re);return se.offset=se.collapse=="right"?se.end:se.start,se}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var z="",re=!1,ae=a.doc.lineSeparator(),se=!1;function fe(Ke){return function(Nt){return Nt.id==Ke}}function be(){re&&(z+=ae,se&&(z+=ae),re=se=!1)}function De(Ke){Ke&&(be(),z+=Ke)}function $e(Ke){if(Ke.nodeType==1){var Nt=Ke.getAttribute("cm-text");if(Nt){De(Nt);return}var Vt=Ke.getAttribute("cm-marker"),sn;if(Vt){var Cn=a.findMarks(Ae(b,0),Ae(E+1,0),fe(+Vt));Cn.length&&(sn=Cn[0].find(0))&&De(Ft(a.doc,sn.from,sn.to).join(ae));return}if(Ke.getAttribute("contenteditable")=="false")return;var An=/^(pre|div|p|li|table|br)$/i.test(Ke.nodeName);if(!/^br$/i.test(Ke.nodeName)&&Ke.textContent.length==0)return;An&&be();for(var Sn=0;Sn<Ke.childNodes.length;Sn++)$e(Ke.childNodes[Sn]);/^(pre|p)$/i.test(Ke.nodeName)&&(se=!0),An&&(re=!0)}else Ke.nodeType==3&&De(Ke.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;$e(y),y!=x;)y=y.nextSibling,se=!1;return z}function za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(Ae(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 z=a.display.view[E];if(z.node==b)return Xu(z,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!rt(b,y))return jo(Ae(we(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var z=a.rest?ye(a.rest):a.line;return jo(Ae(we(z),z.text.length),E)}var re=y.nodeType==3?y:null,ae=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));ae.parentNode!=b;)ae=ae.parentNode;var se=a.measure,fe=se.maps;function be(sn,Cn,An){for(var Sn=-1;Sn<(fe?fe.length:0);Sn++)for(var Fn=Sn<0?se.map:fe[Sn],Jn=0;Jn<Fn.length;Jn+=3){var Vn=Fn[Jn+2];if(Vn==sn||Vn==Cn){var fr=we(Sn<0?a.line:a.rest[Sn]),Or=Fn[Jn]+An;return(An<0||Vn!=sn)&&(Or=Fn[Jn+(An?1:0)]),Ae(fr,Or)}}}var De=be(re,ae,x);if(De)return jo(De,E);for(var $e=ae.nextSibling,Ke=re?re.nodeValue.length-x:0;$e;$e=$e.nextSibling){if(De=be($e,$e.firstChild,0),De)return jo(Ae(De.line,De.ch-Ke),E);Ke+=$e.textContent.length}for(var Nt=ae.previousSibling,Vt=x;Nt;Nt=Nt.previousSibling){if(De=be(Nt,Nt.firstChild,-1),De)return jo(Ae(De.line,De.ch+Vt),E);Vt+=Nt.textContent.length}}var Xr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new he,this.hasSelection=!1,this.composing=null};Xr.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),je&&(E.style.width="0px"),ce(E,"input",function(){ve&&ze>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ce(E,"paste",function(re){ge(b,re)||As(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function z(re){if(!ge(b,re)){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Bs(b);Wa({lineWise:!0,text:ae.text}),re.type=="cut"?b.setSelections(ae.ranges,null,Fe):(x.prevInput="",E.value=ae.text.join(`
`),Ot(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ce(E,"cut",z),ce(E,"copy",z),ce(a.scroller,"paste",function(re){if(!(ui(a,re)||ge(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=re.clipboardData,E.dispatchEvent(ae)}}),ce(a.lineSpace,"selectstart",function(re){ui(a,re)||Ht(re)}),ce(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),ce(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Is(),this.textarea=this.wrapper.firstChild},Xr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Xr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=wi(a,x.sel.primary().head,"div"),z=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-z.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-z.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Oe(x.cursorDiv,a.cursors),Oe(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Xr.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&&Ot(this.textarea),ve&&ze>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",ve&&ze>=9&&(this.hasSelection=null))}},Xr.prototype.getField=function(){return this.textarea},Xr.prototype.supportsTouch=function(){return!1},Xr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!He||Ze()!=this.textarea))try{this.textarea.focus()}catch(a){}},Xr.prototype.blur=function(){this.textarea.blur()},Xr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xr.prototype.receivedFocus=function(){this.slowPoll()},Xr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Xr.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)},Xr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||vn(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(ve&&ze>=9&&this.hasSelection===E||Ee&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var z=E.charCodeAt(0);if(z==8203&&!b&&(b="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,ae=Math.min(b.length,E.length);re<ae&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Ai(y,function(){gl(y,E.slice(re),b.length-re,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
`)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Xr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xr.prototype.onKeyPress=function(){ve&&ze>=9&&(this.hasSelection=null),this.fastPoll()},Xr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var z=Co(x,a),re=b.scroller.scrollTop;if(!z||pe)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(z)==-1&&oi(x,hi)(x.doc,po(z),Fe);var se=E.style.cssText,fe=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px;
z-index: 1000; background: `+(ve?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var De;Te&&(De=window.scrollY),b.input.focus(),Te&&window.scrollTo(null,De),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Ke,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function $e(){if(E.selectionStart!=null){var Vt=x.somethingSelected(),sn="\u200B"+(Vt?E.value:"");E.value="\u21DA",E.value=sn,y.prevInput=Vt?"":"\u200B",E.selectionStart=1,E.selectionEnd=sn.length,b.selForContextMenu=x.doc.sel}}function Ke(){if(y.contextMenuPending==Ke&&(y.contextMenuPending=!1,y.wrapper.style.cssText=fe,E.style.cssText=se,ve&&ze<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!ve||ve&&ze<9)&&$e();var Vt=0,sn=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,ts)(x):Vt++<10?b.detectingSelectAll=setTimeout(sn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(sn,200)}}if(ve&&ze>=9&&$e(),pt){bn(a);var Nt=function(){Ve(window,"mouseup",Nt),setTimeout(Ke,20)};ce(window,"mouseup",Nt)}else setTimeout(Ke,50)},Xr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Xr.prototype.setUneditable=function(){},Xr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?nn(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=Ze();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(ce(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var z=a.form;E=z.submit;try{var re=z.submit=function(){b(),z.submit=E,z.submit(),z.submit=re}}catch(se){}}y.finishInit=function(se){se.save=b,se.getTextArea=function(){return a},se.toTextArea=function(){se.toTextArea=isNaN,b(),a.parentNode.removeChild(se.getWrapperElement()),a.style.display="",a.form&&(Ve(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=Gr(function(se){return a.parentNode.insertBefore(se,a.nextSibling)},y);return ae}function Qu(a){a.off=Ve,a.on=ce,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=Wn,a.countColumn=me,a.findColumn=cn,a.isWordChar=ut,a.Pass=_t,a.signal=Ye,a.Line=Er,a.changeEnd=vo,a.scrollbarModel=Al,a.Pos=Ae,a.cmpPos=ft,a.modes=Rt,a.mimeModes=St,a.resolveMode=Ut,a.getMode=Xt,a.modeExtensions=gn,a.extendMode=_n,a.copyState=Ln,a.startState=Zn,a.innerMode=fn,a.commands=ha,a.keyMap=io,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Wo,a.normalizeKeyMap=Du,a.StringStream=ot,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=Ht,a.e_stopPropagation=dn,a.e_stop=bn,a.addClass=gt,a.contains=rt,a.rmClass=mt,a.keyNames=yo}zu(Gr),Uu(Gr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Si.prototype)Si.prototype.hasOwnProperty(Ga)&&Dt(qu,Ga)<0&&(Gr.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Ga]));return Ct(Si),Gr.inputStyles={textarea:Xr,contenteditable:Nr},Gr.defineMode=function(a){!Gr.defaults.mode&&a!="null"&&(Gr.defaults.mode=a),Zt.apply(this,arguments)},Gr.defineMIME=on,Gr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Gr.defineMIME("text/plain","null"),Gr.defineExtension=function(a,y){Gr.prototype[a]=y},Gr.defineDocExtension=function(a,y){Si.prototype[a]=y},Gr.fromTextArea=Ju,Qu(Gr),Gr.version="5.58.2",Gr})},25419:function(Yt,en,de){(function(ie){ie(de(89780),de(15525),de(98101))})(function(ie){"use strict";ie.defineMode("markdown",function(et,Le){var We=ie.getMode(et,"text/html"),ve=We.name=="null";function ze(me){if(ie.findModeByName){var he=ie.findModeByName(me);he&&(me=he.mime||he.mimes[0])}var Dt=ie.getMode(et,me);return Dt.name=="null"?null:Dt}Le.highlightFormatting===void 0&&(Le.highlightFormatting=!1),Le.maxBlockquoteDepth===void 0&&(Le.maxBlockquoteDepth=0),Le.taskLists===void 0&&(Le.taskLists=!1),Le.strikethrough===void 0&&(Le.strikethrough=!1),Le.emoji===void 0&&(Le.emoji=!1),Le.fencedCodeBlockHighlighting===void 0&&(Le.fencedCodeBlockHighlighting=!0),Le.fencedCodeBlockDefaultMode===void 0&&(Le.fencedCodeBlockDefaultMode="text/plain"),Le.xml===void 0&&(Le.xml=!0),Le.tokenTypeOverrides===void 0&&(Le.tokenTypeOverrides={});var Te={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Ge in Te)Te.hasOwnProperty(Ge)&&Le.tokenTypeOverrides[Ge]&&(Te[Ge]=Le.tokenTypeOverrides[Ge]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,pe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ke=/^\[(x| )\](?=\s)/i,xe=Le.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,wt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,je=/^[^#!\[\]*_\\<>` "'(~:]+/,Re=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,He=/^\s*\[[^\]]+?\]:.*$/,Ee=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,dt=" ";function ht(me,he,Dt){return he.f=he.inline=Dt,Dt(me,he)}function Lt(me,he,Dt){return he.f=he.block=Dt,Dt(me,he)}function Et(me){return!me||!/\S/.test(me.string)}function pt(me){if(me.linkTitle=!1,me.linkHref=!1,me.linkText=!1,me.em=!1,me.strong=!1,me.strikethrough=!1,me.quote=0,me.indentedCode=!1,me.f==mt){var he=ve;if(!he){var Dt=ie.innerMode(We,me.htmlState);he=Dt.mode.name=="xml"&&Dt.state.tagStart===null&&!Dt.state.context&&Dt.state.tokenize.isInText}he&&(me.f=Pt,me.block=Ie,me.htmlState=null)}return me.trailingSpace=0,me.trailingSpaceNewLine=!1,me.prevLine=me.thisLine,me.thisLine={stream:null},null}function Ie(me,he){var Dt=me.column()===he.indentation,un=Et(he.prevLine.stream),_t=he.indentedCode,Fe=he.prevLine.hr,at=he.list!==!1,st=(he.listStack[he.listStack.length-1]||0)+3;he.indentedCode=!1;var cn=he.indentation;if(he.indentationDiff===null&&(he.indentationDiff=he.indentation,at)){for(he.list=null;cn<he.listStack[he.listStack.length-1];)he.listStack.pop(),he.listStack.length?he.indentation=he.listStack[he.listStack.length-1]:he.list=!1;he.list!==!1&&(he.indentationDiff=cn-he.listStack[he.listStack.length-1])}var Bt=!un&&!Fe&&!he.prevLine.header&&(!at||!_t)&&!he.prevLine.fencedCodeEnd,Ne=(he.list===!1||Fe||un)&&he.indentation<=st&&me.match(Ce),ye=null;if(he.indentationDiff>=4&&(_t||he.prevLine.fencedCodeEnd||he.prevLine.header||un))return me.skipToEnd(),he.indentedCode=!0,Te.code;if(me.eatSpace())return null;if(Dt&&he.indentation<=st&&(ye=me.match(xe))&&ye[1].length<=6)return he.quote=0,he.header=ye[1].length,he.thisLine.header=!0,Le.highlightFormatting&&(he.formatting="header"),he.f=he.inline,Oe(he);if(he.indentation<=st&&me.eat(">"))return he.quote=Dt?1:he.quote+1,Le.highlightFormatting&&(he.formatting="quote"),me.eatSpace(),Oe(he);if(!Ne&&!he.setext&&Dt&&he.indentation<=st&&(ye=me.match(pe))){var _e=ye[1]?"ol":"ul";return he.indentation=cn+me.current().length,he.list=!0,he.quote=0,he.listStack.push(he.indentation),he.em=!1,he.strong=!1,he.code=!1,he.strikethrough=!1,Le.taskLists&&me.match(ke,!1)&&(he.taskList=!0),he.f=he.inline,Le.highlightFormatting&&(he.formatting=["list","list-"+_e]),Oe(he)}else{if(Dt&&he.indentation<=st&&(ye=me.match(Re,!0)))return he.quote=0,he.fencedEndRE=new RegExp(ye[1]+"+ *$"),he.localMode=Le.fencedCodeBlockHighlighting&&ze(ye[2]||Le.fencedCodeBlockDefaultMode),he.localMode&&(he.localState=ie.startState(he.localMode)),he.f=he.block=qt,Le.highlightFormatting&&(he.formatting="code-block"),he.code=-1,Oe(he);if(he.setext||(!Bt||!at)&&!he.quote&&he.list===!1&&!he.code&&!Ne&&!He.test(me.string)&&(ye=me.lookAhead(1))&&(ye=ye.match(wt)))return he.setext?(he.header=he.setext,he.setext=0,me.skipToEnd(),Le.highlightFormatting&&(he.formatting="header")):(he.header=ye[0].charAt(0)=="="?1:2,he.setext=he.header),he.thisLine.header=!0,he.f=he.inline,Oe(he);if(Ne)return me.skipToEnd(),he.hr=!0,he.thisLine.hr=!0,Te.hr;if(me.peek()==="[")return ht(me,he,Dn)}return ht(me,he,he.inline)}function mt(me,he){var Dt=We.token(me,he.htmlState);if(!ve){var un=ie.innerMode(We,he.htmlState);(un.mode.name=="xml"&&un.state.tagStart===null&&!un.state.context&&un.state.tokenize.isInText||he.md_inside&&me.current().indexOf(">")>-1)&&(he.f=Pt,he.block=Ie,he.htmlState=null)}return Dt}function qt(me,he){var Dt=he.listStack[he.listStack.length-1]||0,un=he.indentation<Dt,_t=Dt+3;if(he.fencedEndRE&&he.indentation<=_t&&(un||me.match(he.fencedEndRE))){Le.highlightFormatting&&(he.formatting="code-block");var Fe;return un||(Fe=Oe(he)),he.localMode=he.localState=null,he.block=Ie,he.f=Pt,he.fencedEndRE=null,he.code=0,he.thisLine.fencedCodeEnd=!0,un?Lt(me,he,he.block):Fe}else return he.localMode?he.localMode.token(me,he.localState):(me.skipToEnd(),Te.code)}function Oe(me){var he=[];if(me.formatting){he.push(Te.formatting),typeof me.formatting=="string"&&(me.formatting=[me.formatting]);for(var Dt=0;Dt<me.formatting.length;Dt++)he.push(Te.formatting+"-"+me.formatting[Dt]),me.formatting[Dt]==="header"&&he.push(Te.formatting+"-"+me.formatting[Dt]+"-"+me.header),me.formatting[Dt]==="quote"&&(!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=me.quote?he.push(Te.formatting+"-"+me.formatting[Dt]+"-"+me.quote):he.push("error"))}if(me.taskOpen)return he.push("meta"),he.length?he.join(" "):null;if(me.taskClosed)return he.push("property"),he.length?he.join(" "):null;if(me.linkHref?he.push(Te.linkHref,"url"):(me.strong&&he.push(Te.strong),me.em&&he.push(Te.em),me.strikethrough&&he.push(Te.strikethrough),me.emoji&&he.push(Te.emoji),me.linkText&&he.push(Te.linkText),me.code&&he.push(Te.code),me.image&&he.push(Te.image),me.imageAltText&&he.push(Te.imageAltText,"link"),me.imageMarker&&he.push(Te.imageMarker)),me.header&&he.push(Te.header,Te.header+"-"+me.header),me.quote&&(he.push(Te.quote),!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=me.quote?he.push(Te.quote+"-"+me.quote):he.push(Te.quote+"-"+Le.maxBlockquoteDepth)),me.list!==!1){var un=(me.listStack.length-1)%3;un?un===1?he.push(Te.list2):he.push(Te.list3):he.push(Te.list1)}return me.trailingSpaceNewLine?he.push("trailing-space-new-line"):me.trailingSpace&&he.push("trailing-space-"+(me.trailingSpace%2?"a":"b")),he.length?he.join(" "):null}function Qe(me,he){if(me.match(je,!0))return Oe(he)}function Pt(me,he){var Dt=he.text(me,he);if(typeof Dt!="undefined")return Dt;if(he.list)return he.list=null,Oe(he);if(he.taskList){var un=me.match(ke,!0)[1]===" ";return un?he.taskOpen=!0:he.taskClosed=!0,Le.highlightFormatting&&(he.formatting="task"),he.taskList=!1,Oe(he)}if(he.taskOpen=!1,he.taskClosed=!1,he.header&&me.match(/^#+$/,!0))return Le.highlightFormatting&&(he.formatting="header"),Oe(he);var _t=me.next();if(he.linkTitle){he.linkTitle=!1;var Fe=_t;_t==="("&&(Fe=")"),Fe=(Fe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var at="^\\s*(?:[^"+Fe+"\\\\]+|\\\\\\\\|\\\\.)"+Fe;if(me.match(new RegExp(at),!0))return Te.linkHref}if(_t==="`"){var st=he.formatting;Le.highlightFormatting&&(he.formatting="code"),me.eatWhile("`");var cn=me.current().length;if(he.code==0&&(!he.quote||cn==1))return he.code=cn,Oe(he);if(cn==he.code){var Bt=Oe(he);return he.code=0,Bt}else return he.formatting=st,Oe(he)}else if(he.code)return Oe(he);if(_t==="\\"&&(me.next(),Le.highlightFormatting)){var Ne=Oe(he),ye=Te.formatting+"-escape";return Ne?Ne+" "+ye:ye}if(_t==="!"&&me.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return he.imageMarker=!0,he.image=!0,Le.highlightFormatting&&(he.formatting="image"),Oe(he);if(_t==="["&&he.imageMarker&&me.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return he.imageMarker=!1,he.imageAltText=!0,Le.highlightFormatting&&(he.formatting="image"),Oe(he);if(_t==="]"&&he.imageAltText){Le.highlightFormatting&&(he.formatting="image");var Ne=Oe(he);return he.imageAltText=!1,he.image=!1,he.inline=he.f=rt,Ne}if(_t==="["&&!he.image)return he.linkText&&me.match(/^.*?\]/)||(he.linkText=!0,Le.highlightFormatting&&(he.formatting="link")),Oe(he);if(_t==="]"&&he.linkText){Le.highlightFormatting&&(he.formatting="link");var Ne=Oe(he);return he.linkText=!1,he.inline=he.f=me.match(/\(.*?\)| ?\[.*?\]/,!1)?rt:Pt,Ne}if(_t==="<"&&me.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Pe,Le.highlightFormatting&&(he.formatting="link");var Ne=Oe(he);return Ne?Ne+=" ":Ne="",Ne+Te.linkInline}if(_t==="<"&&me.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Pe,Le.highlightFormatting&&(he.formatting="link");var Ne=Oe(he);return Ne?Ne+=" ":Ne="",Ne+Te.linkEmail}if(Le.xml&&_t==="<"&&me.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _e=me.string.indexOf(">",me.pos);if(_e!=-1){var lt=me.string.substring(me.start,_e);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(lt)&&(he.md_inside=!0)}return me.backUp(1),he.htmlState=ie.startState(We),Lt(me,he,mt)}if(Le.xml&&_t==="<"&&me.match(/^\/\w*?>/))return he.md_inside=!1,"tag";if(_t==="*"||_t==="_"){for(var Me=1,Ue=me.pos==1?" ":me.string.charAt(me.pos-2);Me<3&&me.eat(_t);)Me++;var it=me.peek()||" ",ut=!/\s/.test(it)&&(!Ee.test(it)||/\s/.test(Ue)||Ee.test(Ue)),yt=!/\s/.test(Ue)&&(!Ee.test(Ue)||/\s/.test(it)||Ee.test(it)),xt=null,At=null;if(Me%2&&(!he.em&&ut&&(_t==="*"||!yt||Ee.test(Ue))?xt=!0:he.em==_t&&yt&&(_t==="*"||!ut||Ee.test(it))&&(xt=!1)),Me>1&&(!he.strong&&ut&&(_t==="*"||!yt||Ee.test(Ue))?At=!0:he.strong==_t&&yt&&(_t==="*"||!ut||Ee.test(it))&&(At=!1)),At!=null||xt!=null){Le.highlightFormatting&&(he.formatting=xt==null?"strong":At==null?"em":"strong em"),xt===!0&&(he.em=_t),At===!0&&(he.strong=_t);var Bt=Oe(he);return xt===!1&&(he.em=!1),At===!1&&(he.strong=!1),Bt}}else if(_t===" "&&(me.eat("*")||me.eat("_"))){if(me.peek()===" ")return Oe(he);me.backUp(1)}if(Le.strikethrough){if(_t==="~"&&me.eatWhile(_t)){if(he.strikethrough){Le.highlightFormatting&&(he.formatting="strikethrough");var Bt=Oe(he);return he.strikethrough=!1,Bt}else if(me.match(/^[^\s]/,!1))return he.strikethrough=!0,Le.highlightFormatting&&(he.formatting="strikethrough"),Oe(he)}else if(_t===" "&&me.match(/^~~/,!0)){if(me.peek()===" ")return Oe(he);me.backUp(2)}}if(Le.emoji&&_t===":"&&me.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){he.emoji=!0,Le.highlightFormatting&&(he.formatting="emoji");var Wt=Oe(he);return he.emoji=!1,Wt}return _t===" "&&(me.match(/^ +$/,!1)?he.trailingSpace++:he.trailingSpace&&(he.trailingSpaceNewLine=!0)),Oe(he)}function Pe(me,he){var Dt=me.next();if(Dt===">"){he.f=he.inline=Pt,Le.highlightFormatting&&(he.formatting="link");var un=Oe(he);return un?un+=" ":un="",un+Te.linkInline}return me.match(/^[^>]+/,!0),Te.linkInline}function rt(me,he){if(me.eatSpace())return null;var Dt=me.next();return Dt==="("||Dt==="["?(he.f=he.inline=gt(Dt==="("?")":"]"),Le.highlightFormatting&&(he.formatting="link-string"),he.linkHref=!0,Oe(he)):"error"}var Ze={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function gt(me){return function(he,Dt){var un=he.next();if(un===me){Dt.f=Dt.inline=Pt,Le.highlightFormatting&&(Dt.formatting="link-string");var _t=Oe(Dt);return Dt.linkHref=!1,_t}return he.match(Ze[me]),Dt.linkHref=!0,Oe(Dt)}}function Dn(me,he){return me.match(/^([^\]\\]|\\.)*\]:/,!1)?(he.f=Ot,me.next(),Le.highlightFormatting&&(he.formatting="link"),he.linkText=!0,Oe(he)):ht(me,he,Pt)}function Ot(me,he){if(me.match(/^\]:/,!0)){he.f=he.inline=Pn,Le.highlightFormatting&&(he.formatting="link");var Dt=Oe(he);return he.linkText=!1,Dt}return me.match(/^([^\]\\]|\\.)+/,!0),Te.linkText}function Pn(me,he){return me.eatSpace()?null:(me.match(/^[^\s]+/,!0),me.peek()===void 0?he.linkTitle=!0:me.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),he.f=he.inline=Pt,Te.linkHref+" url")}var nn={startState:function(){return{f:Ie,prevLine:{stream:null},thisLine:{stream:null},block:Ie,htmlState:null,indentation:0,inline:Pt,text:Qe,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(me){return{f:me.f,prevLine:me.prevLine,thisLine:me.thisLine,block:me.block,htmlState:me.htmlState&&ie.copyState(We,me.htmlState),indentation:me.indentation,localMode:me.localMode,localState:me.localMode?ie.copyState(me.localMode,me.localState):null,inline:me.inline,text:me.text,formatting:!1,linkText:me.linkText,linkTitle:me.linkTitle,linkHref:me.linkHref,code:me.code,em:me.em,strong:me.strong,strikethrough:me.strikethrough,emoji:me.emoji,header:me.header,setext:me.setext,hr:me.hr,taskList:me.taskList,list:me.list,listStack:me.listStack.slice(0),quote:me.quote,indentedCode:me.indentedCode,trailingSpace:me.trailingSpace,trailingSpaceNewLine:me.trailingSpaceNewLine,md_inside:me.md_inside,fencedEndRE:me.fencedEndRE}},token:function(me,he){if(he.formatting=!1,me!=he.thisLine.stream){if(he.header=0,he.hr=!1,me.match(/^\s*$/,!0))return pt(he),null;if(he.prevLine=he.thisLine,he.thisLine={stream:me},he.taskList=!1,he.trailingSpace=0,he.trailingSpaceNewLine=!1,!he.localState&&(he.f=he.block,he.f!=mt)){var Dt=me.match(/^\s*/,!0)[0].replace(/\t/g,dt).length;if(he.indentation=Dt,he.indentationDiff=null,Dt>0)return null}}return he.f(me,he)},innerMode:function(me){return me.block==mt?{state:me.htmlState,mode:We}:me.localState?{state:me.localState,mode:me.localMode}:{state:me,mode:nn}},indent:function(me,he,Dt){return me.block==mt&&We.indent?We.indent(me.htmlState,he,Dt):me.localState&&me.localMode.indent?me.localMode.indent(me.localState,he,Dt):ie.Pass},blankLine:pt,getType:Oe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return nn},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},98101:function(Yt,en,de){(function(ie){ie(de(89780))})(function(ie){"use strict";ie.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 et=0;et<ie.modeInfo.length;et++){var Le=ie.modeInfo[et];Le.mimes&&(Le.mime=Le.mimes[0])}ie.findModeByMIME=function(We){We=We.toLowerCase();for(var ve=0;ve<ie.modeInfo.length;ve++){var ze=ie.modeInfo[ve];if(ze.mime==We)return ze;if(ze.mimes){for(var Te=0;Te<ze.mimes.length;Te++)if(ze.mimes[Te]==We)return ze}}if(/\+xml$/.test(We))return ie.findModeByMIME("application/xml");if(/\+json$/.test(We))return ie.findModeByMIME("application/json")},ie.findModeByExtension=function(We){We=We.toLowerCase();for(var ve=0;ve<ie.modeInfo.length;ve++){var ze=ie.modeInfo[ve];if(ze.ext){for(var Te=0;Te<ze.ext.length;Te++)if(ze.ext[Te]==We)return ze}}},ie.findModeByFileName=function(We){for(var ve=0;ve<ie.modeInfo.length;ve++){var ze=ie.modeInfo[ve];if(ze.file&&ze.file.test(We))return ze}var Te=We.lastIndexOf("."),Ge=Te>-1&&We.substring(Te+1,We.length);if(Ge)return ie.findModeByExtension(Ge)},ie.findModeByName=function(We){We=We.toLowerCase();for(var ve=0;ve<ie.modeInfo.length;ve++){var ze=ie.modeInfo[ve];if(ze.name.toLowerCase()==We)return ze;if(ze.alias){for(var Te=0;Te<ze.alias.length;Te++)if(ze.alias[Te].toLowerCase()==We)return ze}}}})},67549:function(Yt,en,de){(function(ie){ie(de(89780))})(function(ie){"use strict";ie.defineMode("stex",function(et,Le){"use strict";function We(je,Re){je.cmdState.push(Re)}function ve(je){return je.cmdState.length>0?je.cmdState[je.cmdState.length-1]:null}function ze(je){var Re=je.cmdState.pop();Re&&Re.closeBracket()}function Te(je){for(var Re=je.cmdState,He=Re.length-1;He>=0;He--){var Ee=Re[He];if(Ee.name!="DEFAULT")return Ee}return{styleIdentifier:function(){return null}}}function Ge(je,Re,He){return function(){this.name=je,this.bracketNo=0,this.style=Re,this.styles=He,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ce={};Ce.importmodule=Ge("importmodule","tag",["string","builtin"]),Ce.documentclass=Ge("documentclass","tag",["","atom"]),Ce.usepackage=Ge("usepackage","tag",["atom"]),Ce.begin=Ge("begin","tag",["atom"]),Ce.end=Ge("end","tag",["atom"]),Ce.label=Ge("label","tag",["atom"]),Ce.ref=Ge("ref","tag",["atom"]),Ce.eqref=Ge("eqref","tag",["atom"]),Ce.cite=Ge("cite","tag",["atom"]),Ce.bibitem=Ge("bibitem","tag",["atom"]),Ce.Bibitem=Ge("Bibitem","tag",["atom"]),Ce.RBibitem=Ge("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function pe(je,Re){je.f=Re}function ke(je,Re){var He;if(je.match(/^\\[a-zA-Z@]+/)){var Ee=je.current().slice(1);return He=Ce.hasOwnProperty(Ee)?Ce[Ee]:Ce.DEFAULT,He=new He,We(Re,He),pe(Re,wt),He.style}if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/\\]/))return"tag";if(je.match("\\["))return pe(Re,function(ht,Lt){return xe(ht,Lt,"\\]")}),"keyword";if(je.match("\\("))return pe(Re,function(ht,Lt){return xe(ht,Lt,"\\)")}),"keyword";if(je.match("$$"))return pe(Re,function(ht,Lt){return xe(ht,Lt,"$$")}),"keyword";if(je.match("$"))return pe(Re,function(ht,Lt){return xe(ht,Lt,"$")}),"keyword";var dt=je.next();if(dt=="%")return je.skipToEnd(),"comment";if(dt=="}"||dt=="]"){if(He=ve(Re),He)He.closeBracket(dt),pe(Re,wt);else return"error";return"bracket"}else return dt=="{"||dt=="["?(He=Ce.DEFAULT,He=new He,We(Re,He),"bracket"):/\d/.test(dt)?(je.eatWhile(/[\w.%]/),"atom"):(je.eatWhile(/[\w\-_]/),He=Te(Re),He.name=="begin"&&(He.argument=je.current()),He.styleIdentifier())}function xe(je,Re,He){if(je.eatSpace())return null;if(He&&je.match(He))return pe(Re,ke),"keyword";if(je.match(/^\\[a-zA-Z@]+/))return"tag";if(je.match(/^[a-zA-Z]+/))return"variable-2";if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/]/)||je.match(/^[\^_&]/))return"tag";if(je.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(je.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ee=je.next();return Ee=="{"||Ee=="}"||Ee=="["||Ee=="]"||Ee=="("||Ee==")"?"bracket":Ee=="%"?(je.skipToEnd(),"comment"):"error"}function wt(je,Re){var He=je.peek(),Ee;return He=="{"||He=="["?(Ee=ve(Re),Ee.openBracket(He),je.eat(He),pe(Re,ke),"bracket"):/[ \t\r]/.test(He)?(je.eat(He),null):(pe(Re,ke),ze(Re),ke(je,Re))}return{startState:function(){var je=Le.inMathMode?function(Re,He){return xe(Re,He)}:ke;return{cmdState:[],f:je}},copyState:function(je){return{cmdState:je.cmdState.slice(),f:je.f}},token:function(je,Re){return Re.f(je,Re)},blankLine:function(je){je.f=ke,je.cmdState.length=0},lineComment:"%"}}),ie.defineMIME("text/x-stex","stex"),ie.defineMIME("text/x-latex","stex")})},15525:function(Yt,en,de){(function(ie){ie(de(89780))})(function(ie){"use strict";var et={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},Le={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(We,ve){var ze=We.indentUnit,Te={},Ge=ve.htmlMode?et:Le;for(var Ce in Ge)Te[Ce]=Ge[Ce];for(var Ce in ve)Te[Ce]=ve[Ce];var pe,ke;function xe(Pe,rt){function Ze(Ot){return rt.tokenize=Ot,Ot(Pe,rt)}var gt=Pe.next();if(gt=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?Ze(Re("atom","]]>")):null:Pe.match("--")?Ze(Re("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),Ze(He(1))):null:Pe.eat("?")?(Pe.eatWhile(/[\w\._\-]/),rt.tokenize=Re("meta","?>"),"meta"):(pe=Pe.eat("/")?"closeTag":"openTag",rt.tokenize=wt,"tag bracket");if(gt=="&"){var Dn;return Pe.eat("#")?Pe.eat("x")?Dn=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):Dn=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):Dn=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),Dn?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}xe.isInText=!0;function wt(Pe,rt){var Ze=Pe.next();if(Ze==">"||Ze=="/"&&Pe.eat(">"))return rt.tokenize=xe,pe=Ze==">"?"endTag":"selfcloseTag","tag bracket";if(Ze=="=")return pe="equals",null;if(Ze=="<"){rt.tokenize=xe,rt.state=Lt,rt.tagName=rt.tagStart=null;var gt=rt.tokenize(Pe,rt);return gt?gt+" tag error":"tag error"}else return/[\'\"]/.test(Ze)?(rt.tokenize=je(Ze),rt.stringStartCol=Pe.column(),rt.tokenize(Pe,rt)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function je(Pe){var rt=function(Ze,gt){for(;!Ze.eol();)if(Ze.next()==Pe){gt.tokenize=wt;break}return"string"};return rt.isInAttribute=!0,rt}function Re(Pe,rt){return function(Ze,gt){for(;!Ze.eol();){if(Ze.match(rt)){gt.tokenize=xe;break}Ze.next()}return Pe}}function He(Pe){return function(rt,Ze){for(var gt;(gt=rt.next())!=null;){if(gt=="<")return Ze.tokenize=He(Pe+1),Ze.tokenize(rt,Ze);if(gt==">")if(Pe==1){Ze.tokenize=xe;break}else return Ze.tokenize=He(Pe-1),Ze.tokenize(rt,Ze)}return"meta"}}function Ee(Pe,rt,Ze){this.prev=Pe.context,this.tagName=rt,this.indent=Pe.indented,this.startOfLine=Ze,(Te.doNotIndent.hasOwnProperty(rt)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function dt(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function ht(Pe,rt){for(var Ze;;){if(!Pe.context||(Ze=Pe.context.tagName,!Te.contextGrabbers.hasOwnProperty(Ze)||!Te.contextGrabbers[Ze].hasOwnProperty(rt)))return;dt(Pe)}}function Lt(Pe,rt,Ze){return Pe=="openTag"?(Ze.tagStart=rt.column(),Et):Pe=="closeTag"?pt:Lt}function Et(Pe,rt,Ze){return Pe=="word"?(Ze.tagName=rt.current(),ke="tag",qt):Te.allowMissingTagName&&Pe=="endTag"?(ke="tag bracket",qt(Pe,rt,Ze)):(ke="error",Et)}function pt(Pe,rt,Ze){if(Pe=="word"){var gt=rt.current();return Ze.context&&Ze.context.tagName!=gt&&Te.implicitlyClosed.hasOwnProperty(Ze.context.tagName)&&dt(Ze),Ze.context&&Ze.context.tagName==gt||Te.matchClosing===!1?(ke="tag",Ie):(ke="tag error",mt)}else return Te.allowMissingTagName&&Pe=="endTag"?(ke="tag bracket",Ie(Pe,rt,Ze)):(ke="error",mt)}function Ie(Pe,rt,Ze){return Pe!="endTag"?(ke="error",Ie):(dt(Ze),Lt)}function mt(Pe,rt,Ze){return ke="error",Ie(Pe,rt,Ze)}function qt(Pe,rt,Ze){if(Pe=="word")return ke="attribute",Oe;if(Pe=="endTag"||Pe=="selfcloseTag"){var gt=Ze.tagName,Dn=Ze.tagStart;return Ze.tagName=Ze.tagStart=null,Pe=="selfcloseTag"||Te.autoSelfClosers.hasOwnProperty(gt)?ht(Ze,gt):(ht(Ze,gt),Ze.context=new Ee(Ze,gt,Dn==Ze.indented)),Lt}return ke="error",qt}function Oe(Pe,rt,Ze){return Pe=="equals"?Qe:(Te.allowMissing||(ke="error"),qt(Pe,rt,Ze))}function Qe(Pe,rt,Ze){return Pe=="string"?Pt:Pe=="word"&&Te.allowUnquoted?(ke="string",qt):(ke="error",qt(Pe,rt,Ze))}function Pt(Pe,rt,Ze){return Pe=="string"?Pt:qt(Pe,rt,Ze)}return{startState:function(Pe){var rt={tokenize:xe,state:Lt,indented:Pe||0,tagName:null,tagStart:null,context:null};return Pe!=null&&(rt.baseIndent=Pe),rt},token:function(Pe,rt){if(!rt.tagName&&Pe.sol()&&(rt.indented=Pe.indentation()),Pe.eatSpace())return null;pe=null;var Ze=rt.tokenize(Pe,rt);return(Ze||pe)&&Ze!="comment"&&(ke=null,rt.state=rt.state(pe||Ze,Pe,rt),ke&&(Ze=ke=="error"?Ze+" error":ke)),Ze},indent:function(Pe,rt,Ze){var gt=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+ze;if(gt&&gt.noIndent)return ie.Pass;if(Pe.tokenize!=wt&&Pe.tokenize!=xe)return Ze?Ze.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return Te.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+ze*(Te.multilineTagIndentFactor||1);if(Te.alignCDATA&&/<!\[CDATA\[/.test(rt))return 0;var Dn=rt&&/^<(\/)?([\w_:\.-]*)/.exec(rt);if(Dn&&Dn[1])for(;gt;)if(gt.tagName==Dn[2]){gt=gt.prev;break}else if(Te.implicitlyClosed.hasOwnProperty(gt.tagName))gt=gt.prev;else break;else if(Dn)for(;gt;){var Ot=Te.contextGrabbers[gt.tagName];if(Ot&&Ot.hasOwnProperty(Dn[2]))gt=gt.prev;else break}for(;gt&&gt.prev&&!gt.startOfLine;)gt=gt.prev;return gt?gt.indent+ze:Pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Te.htmlMode?"html":"xml",helperType:Te.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==Qe&&(Pe.state=qt)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var rt=[],Ze=Pe.context;Ze;Ze=Ze.prev)Ze.tagName&&rt.push(Ze.tagName);return rt.reverse()}}}),ie.defineMIME("text/xml","xml"),ie.defineMIME("application/xml","xml"),ie.mimeModes.hasOwnProperty("text/html")||ie.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return rt}});var ie=de(33885),et=de(42978),Le=de(43403),We=de(34280),ve=de(59301),ze=ve.createContext(null),Te=ve.createContext({}),Ge=ze,Ce=de(20068),pe=de(54476),ke=de(92310),xe=de.n(ke),wt=de(77900),je=de(10228),Re=de(26112),He=de(75931),Ee=de(8654),dt=["prefixCls","className","containerRef"],ht=function(gt){var Dn=gt.prefixCls,Ot=gt.className,Pn=gt.containerRef,nn=(0,He.Z)(gt,dt),me=ve.useContext(Te),he=me.panel,Dt=(0,Ee.x1)(he,Pn);return ve.createElement("div",(0,pe.Z)({className:xe()("".concat(Dn,"-content"),Ot),role:"dialog",ref:Dt},(0,Re.Z)(gt,{aria:!0}),{"aria-modal":"true"},nn))},Lt=ht,Et=de(48736);function pt(Ze){return typeof Ze=="string"&&String(Number(Ze))===Ze?((0,Et.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ze)):Ze}function Ie(Ze){warning(!("wrapperClassName"in Ze),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ze.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var mt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function qt(Ze,gt){var Dn,Ot,Pn,nn=Ze.prefixCls,me=Ze.open,he=Ze.placement,Dt=Ze.inline,un=Ze.push,_t=Ze.forceRender,Fe=Ze.autoFocus,at=Ze.keyboard,st=Ze.classNames,cn=Ze.rootClassName,Bt=Ze.rootStyle,Ne=Ze.zIndex,ye=Ze.className,_e=Ze.id,lt=Ze.style,Me=Ze.motion,Ue=Ze.width,it=Ze.height,ut=Ze.children,yt=Ze.mask,xt=Ze.maskClosable,At=Ze.maskMotion,Wt=Ze.maskClassName,pn=Ze.maskStyle,tn=Ze.afterOpenChange,le=Ze.onClose,te=Ze.onMouseEnter,ee=Ze.onMouseOver,oe=Ze.onMouseLeave,ue=Ze.onClick,ne=Ze.onKeyDown,ce=Ze.onKeyUp,Be=Ze.styles,Ve=Ze.drawerRender,Ye=ve.useRef(),ge=ve.useRef(),Mt=ve.useRef();ve.useImperativeHandle(gt,function(){return Ye.current});var ct=function(nt){var Xe=nt.keyCode,Rt=nt.shiftKey;switch(Xe){case je.Z.TAB:{if(Xe===je.Z.TAB){if(!Rt&&document.activeElement===Mt.current){var St;(St=ge.current)===null||St===void 0||St.focus({preventScroll:!0})}else if(Rt&&document.activeElement===ge.current){var Zt;(Zt=Mt.current)===null||Zt===void 0||Zt.focus({preventScroll:!0})}}break}case je.Z.ESC:{le&&at&&(nt.stopPropagation(),le(nt));break}}};ve.useEffect(function(){if(me&&Fe){var tt;(tt=Ye.current)===null||tt===void 0||tt.focus({preventScroll:!0})}},[me]);var Ct=ve.useState(!1),Ht=(0,et.Z)(Ct,2),dn=Ht[0],zt=Ht[1],bn=ve.useContext(Ge),Nn;typeof un=="boolean"?Nn=un?{}:{distance:0}:Nn=un||{};var Tn=(Dn=(Ot=(Pn=Nn)===null||Pn===void 0?void 0:Pn.distance)!==null&&Ot!==void 0?Ot:bn==null?void 0:bn.pushDistance)!==null&&Dn!==void 0?Dn:180,jn=ve.useMemo(function(){return{pushDistance:Tn,push:function(){zt(!0)},pull:function(){zt(!1)}}},[Tn]);ve.useEffect(function(){if(me){var tt;bn==null||(tt=bn.push)===null||tt===void 0||tt.call(bn)}else{var nt;bn==null||(nt=bn.pull)===null||nt===void 0||nt.call(bn)}},[me]),ve.useEffect(function(){return function(){var tt;bn==null||(tt=bn.pull)===null||tt===void 0||tt.call(bn)}},[]);var zn=yt&&ve.createElement(wt.default,(0,pe.Z)({key:"mask"},At,{visible:me}),function(tt,nt){var Xe=tt.className,Rt=tt.style;return ve.createElement("div",{className:xe()("".concat(nn,"-mask"),Xe,st==null?void 0:st.mask,Wt),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},Rt),pn),Be==null?void 0:Be.mask),onClick:xt&&me?le:void 0,ref:nt})}),Hn=typeof Me=="function"?Me(he):Me,Un={};if(dn&&Tn)switch(he){case"top":Un.transform="translateY(".concat(Tn,"px)");break;case"bottom":Un.transform="translateY(".concat(-Tn,"px)");break;case"left":Un.transform="translateX(".concat(Tn,"px)");break;default:Un.transform="translateX(".concat(-Tn,"px)");break}he==="left"||he==="right"?Un.width=pt(Ue):Un.height=pt(it);var Rn={onMouseEnter:te,onMouseOver:ee,onMouseLeave:oe,onClick:ue,onKeyDown:ne,onKeyUp:ce},Wn=ve.createElement(wt.default,(0,pe.Z)({key:"panel"},Hn,{visible:me,forceRender:_t,onVisibleChanged:function(nt){tn==null||tn(nt)},removeOnLeave:!1,leavedClassName:"".concat(nn,"-content-wrapper-hidden")}),function(tt,nt){var Xe=tt.className,Rt=tt.style,St=ve.createElement(Lt,(0,pe.Z)({id:_e,containerRef:nt,prefixCls:nn,className:xe()(ye,st==null?void 0:st.content),style:(0,ie.Z)((0,ie.Z)({},lt),Be==null?void 0:Be.content)},(0,Re.Z)(Ze,{aria:!0}),Rn),ut);return ve.createElement("div",(0,pe.Z)({className:xe()("".concat(nn,"-content-wrapper"),st==null?void 0:st.wrapper,Xe),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},Un),Rt),Be==null?void 0:Be.wrapper)},(0,Re.Z)(Ze,{data:!0})),Ve?Ve(St):St)}),vn=(0,ie.Z)({},Bt);return Ne&&(vn.zIndex=Ne),ve.createElement(Ge.Provider,{value:jn},ve.createElement("div",{className:xe()(nn,"".concat(nn,"-").concat(he),cn,(0,Ce.Z)((0,Ce.Z)({},"".concat(nn,"-open"),me),"".concat(nn,"-inline"),Dt)),style:vn,tabIndex:-1,ref:Ye,onKeyDown:ct},zn,ve.createElement("div",{tabIndex:0,ref:ge,style:mt,"aria-hidden":"true","data-sentinel":"start"}),Wn,ve.createElement("div",{tabIndex:0,ref:Mt,style:mt,"aria-hidden":"true","data-sentinel":"end"})))}var Oe=ve.forwardRef(qt),Qe=Oe,Pt=function(gt){var Dn=gt.open,Ot=Dn===void 0?!1:Dn,Pn=gt.prefixCls,nn=Pn===void 0?"rc-drawer":Pn,me=gt.placement,he=me===void 0?"right":me,Dt=gt.autoFocus,un=Dt===void 0?!0:Dt,_t=gt.keyboard,Fe=_t===void 0?!0:_t,at=gt.width,st=at===void 0?378:at,cn=gt.mask,Bt=cn===void 0?!0:cn,Ne=gt.maskClosable,ye=Ne===void 0?!0:Ne,_e=gt.getContainer,lt=gt.forceRender,Me=gt.afterOpenChange,Ue=gt.destroyOnClose,it=gt.onMouseEnter,ut=gt.onMouseOver,yt=gt.onMouseLeave,xt=gt.onClick,At=gt.onKeyDown,Wt=gt.onKeyUp,pn=gt.panelRef,tn=ve.useState(!1),le=(0,et.Z)(tn,2),te=le[0],ee=le[1],oe=ve.useState(!1),ue=(0,et.Z)(oe,2),ne=ue[0],ce=ue[1];(0,We.Z)(function(){ce(!0)},[]);var Be=ne?Ot:!1,Ve=ve.useRef(),Ye=ve.useRef();(0,We.Z)(function(){Be&&(Ye.current=document.activeElement)},[Be]);var ge=function(dn){var zt;if(ee(dn),Me==null||Me(dn),!dn&&Ye.current&&!((zt=Ve.current)!==null&&zt!==void 0&&zt.contains(Ye.current))){var bn;(bn=Ye.current)===null||bn===void 0||bn.focus({preventScroll:!0})}},Mt=ve.useMemo(function(){return{panel:pn}},[pn]);if(!lt&&!te&&!Be&&Ue)return null;var ct={onMouseEnter:it,onMouseOver:ut,onMouseLeave:yt,onClick:xt,onKeyDown:At,onKeyUp:Wt},Ct=(0,ie.Z)((0,ie.Z)({},gt),{},{open:Be,prefixCls:nn,placement:he,autoFocus:un,keyboard:Fe,width:st,mask:Bt,maskClosable:ye,inline:_e===!1,afterOpenChange:ge,ref:Ve},ct);return ve.createElement(Te.Provider,{value:Mt},ve.createElement(Le.Z,{open:Be||lt||te,autoDestroy:!1,getContainer:_e,autoLock:Bt&&(Be||te)},ve.createElement(Qe,Ct)))},Pe=Pt,rt=Pe},91574:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return ue}});var ie=de(54476),et=de(33885),Le=de(20068),We=de(42978),ve=de(76190),ze=de(75931),Te=de(92310),Ge=de.n(Te),Ce=/margin|padding|width|height|max|min|offset/,pe={left:!0,top:!0},ke={cssFloat:1,styleFloat:1,float:1};function xe(ne){return ne.nodeType===1?ne.ownerDocument.defaultView.getComputedStyle(ne,null):{}}function wt(ne,ce,Be){if(ce=ce.toLowerCase(),Be==="auto"){if(ce==="height")return ne.offsetHeight;if(ce==="width")return ne.offsetWidth}return ce in pe||(pe[ce]=Ce.test(ce)),pe[ce]?parseFloat(Be)||0:Be}function je(ne,ce){var Be=arguments.length,Ve=xe(ne);return ce=ke[ce]?"cssFloat"in ne.style?"cssFloat":"styleFloat":ce,Be===1?Ve:wt(ne,ce,Ve[ce]||ne.style[ce])}function Re(ne,ce,Be){var Ve=arguments.length;if(ce=ke[ce]?"cssFloat"in ne.style?"cssFloat":"styleFloat":ce,Ve===3)return typeof Be=="number"&&Ce.test(ce)&&(Be="".concat(Be,"px")),ne.style[ce]=Be,Be;for(var Ye in ce)ce.hasOwnProperty(Ye)&&Re(ne,Ye,ce[Ye]);return xe(ne)}function He(ne){return ne===document.body?document.documentElement.clientWidth:ne.offsetWidth}function Ee(ne){return ne===document.body?window.innerHeight||document.documentElement.clientHeight:ne.offsetHeight}function dt(){var ne=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),ce=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:ne,height:ce}}function ht(){var ne=document.documentElement.clientWidth,ce=window.innerHeight||document.documentElement.clientHeight;return{width:ne,height:ce}}function Lt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function Et(ne){var ce=ne.getBoundingClientRect(),Be=document.documentElement;return{left:ce.left+(window.pageXOffset||Be.scrollLeft)-(Be.clientLeft||document.body.clientLeft||0),top:ce.top+(window.pageYOffset||Be.scrollTop)-(Be.clientTop||document.body.clientTop||0)}}var pt=de(18929),Ie=de(59301),mt=de(55311),qt=de(8224),Oe=de(10228),Qe=de(43403),Pt=de(77900),Pe=Ie.createContext(null),rt=function(ce){var Be=ce.visible,Ve=ce.maskTransitionName,Ye=ce.getContainer,ge=ce.prefixCls,Mt=ce.rootClassName,ct=ce.icons,Ct=ce.countRender,Ht=ce.showSwitch,dn=ce.showProgress,zt=ce.current,bn=ce.transform,Nn=ce.count,Tn=ce.scale,jn=ce.minScale,zn=ce.maxScale,Hn=ce.closeIcon,Un=ce.onActive,Rn=ce.onClose,Wn=ce.onZoomIn,vn=ce.onZoomOut,tt=ce.onRotateRight,nt=ce.onRotateLeft,Xe=ce.onFlipX,Rt=ce.onFlipY,St=ce.onReset,Zt=ce.toolbarRender,on=ce.zIndex,Ut=ce.image,Xt=(0,Ie.useContext)(Pe),gn=ct.rotateLeft,_n=ct.rotateRight,Ln=ct.zoomIn,fn=ct.zoomOut,Zn=ct.close,ot=ct.left,Je=ct.right,Ft=ct.flipX,Mn=ct.flipY,Gn="".concat(ge,"-operations-operation");Ie.useEffect(function(){var vt=function(Gt){Gt.keyCode===Oe.Z.ESC&&Rn()};return Be&&window.addEventListener("keydown",vt),function(){window.removeEventListener("keydown",vt)}},[Be]);var we=function(qe,Gt){qe.preventDefault(),qe.stopPropagation(),Un(Gt)},Se=Ie.useCallback(function(vt){var qe=vt.type,Gt=vt.disabled,yn=vt.onClick,mn=vt.icon;return Ie.createElement("div",{key:qe,className:Ge()(Gn,"".concat(ge,"-operations-operation-").concat(qe),(0,Le.Z)({},"".concat(ge,"-operations-operation-disabled"),!!Gt)),onClick:yn},mn)},[Gn,ge]),It=Ht?Se({icon:ot,onClick:function(qe){return we(qe,-1)},type:"prev",disabled:zt===0}):void 0,bt=Ht?Se({icon:Je,onClick:function(qe){return we(qe,1)},type:"next",disabled:zt===Nn-1}):void 0,Ae=Se({icon:Mn,onClick:Rt,type:"flipY"}),ft=Se({icon:Ft,onClick:Xe,type:"flipX"}),Tt=Se({icon:gn,onClick:nt,type:"rotateLeft"}),Kt=Se({icon:_n,onClick:tt,type:"rotateRight"}),ln=Se({icon:fn,onClick:vn,type:"zoomOut",disabled:Tn<=jn}),kt=Se({icon:Ln,onClick:Wn,type:"zoomIn",disabled:Tn===zn}),jt=Ie.createElement("div",{className:"".concat(ge,"-operations")},Ae,ft,Tt,Kt,ln,kt);return Ie.createElement(Pt.default,{visible:Be,motionName:Ve},function(vt){var qe=vt.className,Gt=vt.style;return Ie.createElement(Qe.Z,{open:!0,getContainer:Ye!=null?Ye:document.body},Ie.createElement("div",{className:Ge()("".concat(ge,"-operations-wrapper"),qe,Mt),style:(0,et.Z)((0,et.Z)({},Gt),{},{zIndex:on})},Hn===null?null:Ie.createElement("button",{className:"".concat(ge,"-close"),onClick:Rn},Hn||Zn),Ht&&Ie.createElement(Ie.Fragment,null,Ie.createElement("div",{className:Ge()("".concat(ge,"-switch-left"),(0,Le.Z)({},"".concat(ge,"-switch-left-disabled"),zt===0)),onClick:function(mn){return we(mn,-1)}},ot),Ie.createElement("div",{className:Ge()("".concat(ge,"-switch-right"),(0,Le.Z)({},"".concat(ge,"-switch-right-disabled"),zt===Nn-1)),onClick:function(mn){return we(mn,1)}},Je)),Ie.createElement("div",{className:"".concat(ge,"-footer")},dn&&Ie.createElement("div",{className:"".concat(ge,"-progress")},Ct?Ct(zt+1,Nn):"".concat(zt+1," / ").concat(Nn)),Zt?Zt(jt,(0,et.Z)((0,et.Z)({icons:{prevIcon:It,nextIcon:bt,flipYIcon:Ae,flipXIcon:ft,rotateLeftIcon:Tt,rotateRightIcon:Kt,zoomOutIcon:ln,zoomInIcon:kt},actions:{onActive:Un,onFlipY:Rt,onFlipX:Xe,onRotateLeft:nt,onRotateRight:tt,onZoomOut:vn,onZoomIn:Wn,onReset:St,onClose:Rn},transform:bn},Xt?{current:zt,total:Nn}:{}),{},{image:Ut})):jt)))})},Ze=rt,gt=de(13697),Dn=de(16089),Ot={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Pn(ne,ce,Be,Ve){var Ye=(0,Ie.useRef)(null),ge=(0,Ie.useRef)([]),Mt=(0,Ie.useState)(Ot),ct=(0,We.Z)(Mt,2),Ct=ct[0],Ht=ct[1],dn=function(Tn){Ht(Ot),(0,gt.Z)(Ot,Ct)||Ve==null||Ve({transform:Ot,action:Tn})},zt=function(Tn,jn){Ye.current===null&&(ge.current=[],Ye.current=(0,Dn.Z)(function(){Ht(function(zn){var Hn=zn;return ge.current.forEach(function(Un){Hn=(0,et.Z)((0,et.Z)({},Hn),Un)}),Ye.current=null,Ve==null||Ve({transform:Hn,action:jn}),Hn})})),ge.current.push((0,et.Z)((0,et.Z)({},Ct),Tn))},bn=function(Tn,jn,zn,Hn,Un){var Rn=ne.current,Wn=Rn.width,vn=Rn.height,tt=Rn.offsetWidth,nt=Rn.offsetHeight,Xe=Rn.offsetLeft,Rt=Rn.offsetTop,St=Tn,Zt=Ct.scale*Tn;Zt>Be?(Zt=Be,St=Be/Ct.scale):Zt<ce&&(Zt=Un?Zt:ce,St=Zt/Ct.scale);var on=zn!=null?zn:innerWidth/2,Ut=Hn!=null?Hn:innerHeight/2,Xt=St-1,gn=Xt*Wn*.5,_n=Xt*vn*.5,Ln=Xt*(on-Ct.x-Xe),fn=Xt*(Ut-Ct.y-Rt),Zn=Ct.x-(Ln-gn),ot=Ct.y-(fn-_n);if(Tn<1&&Zt===1){var Je=tt*Zt,Ft=nt*Zt,Mn=ht(),Gn=Mn.width,we=Mn.height;Je<=Gn&&Ft<=we&&(Zn=0,ot=0)}zt({x:Zn,y:ot,scale:Zt},jn)};return{transform:Ct,resetTransform:dn,updateTransform:zt,dispatchZoomChange:bn}}var nn=de(48736);function me(ne,ce,Be,Ve){var Ye=ce+Be,ge=(Be-Ve)/2;if(Be>Ve){if(ce>0)return(0,Le.Z)({},ne,ge);if(ce<0&&Ye<Ve)return(0,Le.Z)({},ne,-ge)}else if(ce<0||Ye>Ve)return(0,Le.Z)({},ne,ce<0?ge:-ge);return{}}function he(ne,ce,Be,Ve){var Ye=ht(),ge=Ye.width,Mt=Ye.height,ct=null;return ne<=ge&&ce<=Mt?ct={x:0,y:0}:(ne>ge||ce>Mt)&&(ct=(0,et.Z)((0,et.Z)({},me("x",Be,ne,ge)),me("y",Ve,ce,Mt))),ct}var Dt=1,un=1;function _t(ne,ce,Be,Ve,Ye,ge,Mt){var ct=Ye.rotate,Ct=Ye.scale,Ht=Ye.x,dn=Ye.y,zt=(0,Ie.useState)(!1),bn=(0,We.Z)(zt,2),Nn=bn[0],Tn=bn[1],jn=(0,Ie.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),zn=function(vn){!ce||vn.button!==0||(vn.preventDefault(),vn.stopPropagation(),jn.current={diffX:vn.pageX-Ht,diffY:vn.pageY-dn,transformX:Ht,transformY:dn},Tn(!0))},Hn=function(vn){Be&&Nn&&ge({x:vn.pageX-jn.current.diffX,y:vn.pageY-jn.current.diffY},"move")},Un=function(){if(Be&&Nn){Tn(!1);var vn=jn.current,tt=vn.transformX,nt=vn.transformY,Xe=Ht!==tt&&dn!==nt;if(!Xe)return;var Rt=ne.current.offsetWidth*Ct,St=ne.current.offsetHeight*Ct,Zt=ne.current.getBoundingClientRect(),on=Zt.left,Ut=Zt.top,Xt=ct%180!==0,gn=he(Xt?St:Rt,Xt?Rt:St,on,Ut);gn&&ge((0,et.Z)({},gn),"dragRebound")}},Rn=function(vn){if(!(!Be||vn.deltaY==0)){var tt=Math.abs(vn.deltaY/100),nt=Math.min(tt,un),Xe=Dt+nt*Ve;vn.deltaY>0&&(Xe=Dt/Xe),Mt(Xe,"wheel",vn.clientX,vn.clientY)}};return(0,Ie.useEffect)(function(){var Wn,vn,tt,nt;if(ce){tt=(0,qt.Z)(window,"mouseup",Un,!1),nt=(0,qt.Z)(window,"mousemove",Hn,!1);try{window.top!==window.self&&(Wn=(0,qt.Z)(window.top,"mouseup",Un,!1),vn=(0,qt.Z)(window.top,"mousemove",Hn,!1))}catch(Xe){(0,nn.Kp)(!1,"[rc-image] ".concat(Xe))}}return function(){var Xe,Rt,St,Zt;(Xe=tt)===null||Xe===void 0||Xe.remove(),(Rt=nt)===null||Rt===void 0||Rt.remove(),(St=Wn)===null||St===void 0||St.remove(),(Zt=vn)===null||Zt===void 0||Zt.remove()}},[Be,Nn,Ht,dn,ct,ce]),{isMoving:Nn,onMouseDown:zn,onMouseMove:Hn,onMouseUp:Un,onWheel:Rn}}function Fe(ne){return new Promise(function(ce){if(!ne){ce(!1);return}var Be=document.createElement("img");Be.onerror=function(){return ce(!1)},Be.onload=function(){return ce(!0)},Be.src=ne})}function at(ne){var ce=ne.src,Be=ne.isCustomPlaceholder,Ve=ne.fallback,Ye=(0,Ie.useState)(Be?"loading":"normal"),ge=(0,We.Z)(Ye,2),Mt=ge[0],ct=ge[1],Ct=(0,Ie.useRef)(!1),Ht=Mt==="error";(0,Ie.useEffect)(function(){var Nn=!0;return Fe(ce).then(function(Tn){!Tn&&Nn&&ct("error")}),function(){Nn=!1}},[ce]),(0,Ie.useEffect)(function(){Be&&!Ct.current?ct("loading"):Ht&&ct("normal")},[ce]);var dn=function(){ct("normal")},zt=function(Tn){Ct.current=!1,Mt==="loading"&&Tn!==null&&Tn!==void 0&&Tn.complete&&(Tn.naturalWidth||Tn.naturalHeight)&&(Ct.current=!0,dn())},bn=Ht&&Ve?{src:Ve}:{onLoad:dn,src:ce};return[zt,bn,Mt]}function st(ne,ce){var Be=ne.x-ce.x,Ve=ne.y-ce.y;return Math.hypot(Be,Ve)}function cn(ne,ce,Be,Ve){var Ye=st(ne,Be),ge=st(ce,Ve);if(Ye===0&&ge===0)return[ne.x,ne.y];var Mt=Ye/(Ye+ge),ct=ne.x+Mt*(ce.x-ne.x),Ct=ne.y+Mt*(ce.y-ne.y);return[ct,Ct]}function Bt(ne,ce,Be,Ve,Ye,ge,Mt){var ct=Ye.rotate,Ct=Ye.scale,Ht=Ye.x,dn=Ye.y,zt=(0,Ie.useState)(!1),bn=(0,We.Z)(zt,2),Nn=bn[0],Tn=bn[1],jn=(0,Ie.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),zn=function(vn){jn.current=(0,et.Z)((0,et.Z)({},jn.current),vn)},Hn=function(vn){if(ce){vn.stopPropagation(),Tn(!0);var tt=vn.touches,nt=tt===void 0?[]:tt;nt.length>1?zn({point1:{x:nt[0].clientX,y:nt[0].clientY},point2:{x:nt[1].clientX,y:nt[1].clientY},eventType:"touchZoom"}):zn({point1:{x:nt[0].clientX-Ht,y:nt[0].clientY-dn},eventType:"move"})}},Un=function(vn){var tt=vn.touches,nt=tt===void 0?[]:tt,Xe=jn.current,Rt=Xe.point1,St=Xe.point2,Zt=Xe.eventType;if(nt.length>1&&Zt==="touchZoom"){var on={x:nt[0].clientX,y:nt[0].clientY},Ut={x:nt[1].clientX,y:nt[1].clientY},Xt=cn(Rt,St,on,Ut),gn=(0,We.Z)(Xt,2),_n=gn[0],Ln=gn[1],fn=st(on,Ut)/st(Rt,St);Mt(fn,"touchZoom",_n,Ln,!0),zn({point1:on,point2:Ut,eventType:"touchZoom"})}else Zt==="move"&&(ge({x:nt[0].clientX-Rt.x,y:nt[0].clientY-Rt.y},"move"),zn({eventType:"move"}))},Rn=function(){if(Be){if(Nn&&Tn(!1),zn({eventType:"none"}),Ve>Ct)return ge({x:0,y:0,scale:Ve},"touchZoom");var vn=ne.current.offsetWidth*Ct,tt=ne.current.offsetHeight*Ct,nt=ne.current.getBoundingClientRect(),Xe=nt.left,Rt=nt.top,St=ct%180!==0,Zt=he(St?tt:vn,St?vn:tt,Xe,Rt);Zt&&ge((0,et.Z)({},Zt),"dragRebound")}};return(0,Ie.useEffect)(function(){var Wn;return Be&&ce&&(Wn=(0,qt.Z)(window,"touchmove",function(vn){return vn.preventDefault()},{passive:!1})),function(){var vn;(vn=Wn)===null||vn===void 0||vn.remove()}},[Be,ce]),{isTouching:Nn,onTouchStart:Hn,onTouchMove:Un,onTouchEnd:Rn}}var Ne=["fallback","src","imgRef"],ye=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],_e=function(ce){var Be=ce.fallback,Ve=ce.src,Ye=ce.imgRef,ge=(0,ze.Z)(ce,Ne),Mt=at({src:Ve,fallback:Be}),ct=(0,We.Z)(Mt,2),Ct=ct[0],Ht=ct[1];return Ie.createElement("img",(0,ie.Z)({ref:function(zt){Ye.current=zt,Ct(zt)}},ge,Ht))},lt=function(ce){var Be=ce.prefixCls,Ve=ce.src,Ye=ce.alt,ge=ce.imageInfo,Mt=ce.fallback,ct=ce.movable,Ct=ct===void 0?!0:ct,Ht=ce.onClose,dn=ce.visible,zt=ce.icons,bn=zt===void 0?{}:zt,Nn=ce.rootClassName,Tn=ce.closeIcon,jn=ce.getContainer,zn=ce.current,Hn=zn===void 0?0:zn,Un=ce.count,Rn=Un===void 0?1:Un,Wn=ce.countRender,vn=ce.scaleStep,tt=vn===void 0?.5:vn,nt=ce.minScale,Xe=nt===void 0?1:nt,Rt=ce.maxScale,St=Rt===void 0?50:Rt,Zt=ce.transitionName,on=Zt===void 0?"zoom":Zt,Ut=ce.maskTransitionName,Xt=Ut===void 0?"fade":Ut,gn=ce.imageRender,_n=ce.imgCommonProps,Ln=ce.toolbarRender,fn=ce.onTransform,Zn=ce.onChange,ot=(0,ze.Z)(ce,ye),Je=(0,Ie.useRef)(),Ft=(0,Ie.useContext)(Pe),Mn=Ft&&Rn>1,Gn=Ft&&Rn>=1,we=(0,Ie.useState)(!0),Se=(0,We.Z)(we,2),It=Se[0],bt=Se[1],Ae=Pn(Je,Xe,St,fn),ft=Ae.transform,Tt=Ae.resetTransform,Kt=Ae.updateTransform,ln=Ae.dispatchZoomChange,kt=_t(Je,Ct,dn,tt,ft,Kt,ln),jt=kt.isMoving,vt=kt.onMouseDown,qe=kt.onWheel,Gt=Bt(Je,Ct,dn,Xe,ft,Kt,ln),yn=Gt.isTouching,mn=Gt.onTouchStart,In=Gt.onTouchMove,Qn=Gt.onTouchEnd,er=ft.rotate,kn=ft.scale,$t=Ge()((0,Le.Z)({},"".concat(Be,"-moving"),jt));(0,Ie.useEffect)(function(){It||bt(!0)},[It]);var Bn=function(){Tt("close")},hn=function(){ln(Dt+tt,"zoomIn")},qn=function(){ln(Dt/(Dt+tt),"zoomOut")},dr=function(){Kt({rotate:er+90},"rotateRight")},ir=function(){Kt({rotate:er-90},"rotateLeft")},yr=function(){Kt({flipX:!ft.flipX},"flipX")},br=function(){Kt({flipY:!ft.flipY},"flipY")},Cr=function(){Tt("reset")},hr=function(sr){var or=Hn+sr;!Number.isInteger(or)||or<0||or>Rn-1||(bt(!1),Tt(sr<0?"prev":"next"),Zn==null||Zn(or,Hn))},Pr=function(sr){!dn||!Mn||(sr.keyCode===Oe.Z.LEFT?hr(-1):sr.keyCode===Oe.Z.RIGHT&&hr(1))},xr=function(sr){dn&&(kn!==1?Kt({x:0,y:0,scale:1},"doubleClick"):ln(Dt+tt,"doubleClick",sr.clientX,sr.clientY))};(0,Ie.useEffect)(function(){var lr=(0,qt.Z)(window,"keydown",Pr,!1);return function(){lr.remove()}},[dn,Mn,Hn]);var pr=Ie.createElement(_e,(0,ie.Z)({},_n,{width:ce.width,height:ce.height,imgRef:Je,className:"".concat(Be,"-img"),alt:Ye,style:{transform:"translate3d(".concat(ft.x,"px, ").concat(ft.y,"px, 0) scale3d(").concat(ft.flipX?"-":"").concat(kn,", ").concat(ft.flipY?"-":"").concat(kn,", 1) rotate(").concat(er,"deg)"),transitionDuration:(!It||yn)&&"0s"},fallback:Mt,src:Ve,onWheel:qe,onMouseDown:vt,onDoubleClick:xr,onTouchStart:mn,onTouchMove:In,onTouchEnd:Qn,onTouchCancel:Qn})),Sr=(0,et.Z)({url:Ve,alt:Ye},ge);return Ie.createElement(Ie.Fragment,null,Ie.createElement(mt.Z,(0,ie.Z)({transitionName:on,maskTransitionName:Xt,closable:!1,keyboard:!0,prefixCls:Be,onClose:Ht,visible:dn,classNames:{wrapper:$t},rootClassName:Nn,getContainer:jn},ot,{afterClose:Bn}),Ie.createElement("div",{className:"".concat(Be,"-img-wrapper")},gn?gn(pr,(0,et.Z)({transform:ft,image:Sr},Ft?{current:Hn}:{})):pr)),Ie.createElement(Ze,{visible:dn,transform:ft,maskTransitionName:Xt,closeIcon:Tn,getContainer:jn,prefixCls:Be,rootClassName:Nn,icons:bn,countRender:Wn,showSwitch:Mn,showProgress:Gn,current:Hn,count:Rn,scale:kn,minScale:Xe,maxScale:St,toolbarRender:Ln,onActive:hr,onZoomIn:hn,onZoomOut:qn,onRotateRight:dr,onRotateLeft:ir,onFlipX:yr,onFlipY:br,onClose:Ht,onReset:Cr,zIndex:ot.zIndex!==void 0?ot.zIndex+1:void 0,image:Sr}))},Me=lt,Ue=de(94480),it=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function ut(ne){var ce=Ie.useState({}),Be=(0,We.Z)(ce,2),Ve=Be[0],Ye=Be[1],ge=Ie.useCallback(function(ct,Ct){return Ye(function(Ht){return(0,et.Z)((0,et.Z)({},Ht),{},(0,Le.Z)({},ct,Ct))}),function(){Ye(function(Ht){var dn=(0,et.Z)({},Ht);return delete dn[ct],dn})}},[]),Mt=Ie.useMemo(function(){return ne?ne.map(function(ct){if(typeof ct=="string")return{data:{src:ct}};var Ct={};return Object.keys(ct).forEach(function(Ht){["src"].concat((0,Ue.Z)(it)).includes(Ht)&&(Ct[Ht]=ct[Ht])}),{data:Ct}}):Object.keys(Ve).reduce(function(ct,Ct){var Ht=Ve[Ct],dn=Ht.canPreview,zt=Ht.data;return dn&&ct.push({data:zt,id:Ct}),ct},[])},[ne,Ve]);return[Mt,ge,!!ne]}var yt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],xt=["src"],At=function(ce){var Be,Ve=ce.previewPrefixCls,Ye=Ve===void 0?"rc-image-preview":Ve,ge=ce.children,Mt=ce.icons,ct=Mt===void 0?{}:Mt,Ct=ce.items,Ht=ce.preview,dn=ce.fallback,zt=(0,ve.Z)(Ht)==="object"?Ht:{},bn=zt.visible,Nn=zt.onVisibleChange,Tn=zt.getContainer,jn=zt.current,zn=zt.movable,Hn=zt.minScale,Un=zt.maxScale,Rn=zt.countRender,Wn=zt.closeIcon,vn=zt.onChange,tt=zt.onTransform,nt=zt.toolbarRender,Xe=zt.imageRender,Rt=(0,ze.Z)(zt,yt),St=ut(Ct),Zt=(0,We.Z)(St,3),on=Zt[0],Ut=Zt[1],Xt=Zt[2],gn=(0,pt.Z)(0,{value:jn}),_n=(0,We.Z)(gn,2),Ln=_n[0],fn=_n[1],Zn=(0,Ie.useState)(!1),ot=(0,We.Z)(Zn,2),Je=ot[0],Ft=ot[1],Mn=((Be=on[Ln])===null||Be===void 0?void 0:Be.data)||{},Gn=Mn.src,we=(0,ze.Z)(Mn,xt),Se=(0,pt.Z)(!!bn,{value:bn,onChange:function(yn,mn){Nn==null||Nn(yn,mn,Ln)}}),It=(0,We.Z)(Se,2),bt=It[0],Ae=It[1],ft=(0,Ie.useState)(null),Tt=(0,We.Z)(ft,2),Kt=Tt[0],ln=Tt[1],kt=Ie.useCallback(function(Gt,yn,mn,In){var Qn=Xt?on.findIndex(function(er){return er.data.src===yn}):on.findIndex(function(er){return er.id===Gt});fn(Qn<0?0:Qn),Ae(!0),ln({x:mn,y:In}),Ft(!0)},[on,Xt]);Ie.useEffect(function(){bt?Je||fn(0):Ft(!1)},[bt]);var jt=function(yn,mn){fn(yn),vn==null||vn(yn,mn)},vt=function(){Ae(!1),ln(null)},qe=Ie.useMemo(function(){return{register:Ut,onPreview:kt}},[Ut,kt]);return Ie.createElement(Pe.Provider,{value:qe},ge,Ie.createElement(Me,(0,ie.Z)({"aria-hidden":!bt,movable:zn,visible:bt,prefixCls:Ye,closeIcon:Wn,onClose:vt,mousePosition:Kt,imgCommonProps:we,src:Gn,fallback:dn,icons:ct,minScale:Hn,maxScale:Un,getContainer:Tn,current:Ln,count:on.length,countRender:Rn,onTransform:tt,toolbarRender:nt,imageRender:Xe,onChange:jt},Rt)))},Wt=At,pn=0;function tn(ne,ce){var Be=Ie.useState(function(){return pn+=1,String(pn)}),Ve=(0,We.Z)(Be,1),Ye=Ve[0],ge=Ie.useContext(Pe),Mt={data:ce,canPreview:ne};return Ie.useEffect(function(){if(ge)return ge.register(Ye,Mt)},[]),Ie.useEffect(function(){ge&&ge.register(Ye,Mt)},[ne,ce]),Ye}var le=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],te=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],ee=function(ce){var Be=ce.src,Ve=ce.alt,Ye=ce.onPreviewClose,ge=ce.prefixCls,Mt=ge===void 0?"rc-image":ge,ct=ce.previewPrefixCls,Ct=ct===void 0?"".concat(Mt,"-preview"):ct,Ht=ce.placeholder,dn=ce.fallback,zt=ce.width,bn=ce.height,Nn=ce.style,Tn=ce.preview,jn=Tn===void 0?!0:Tn,zn=ce.className,Hn=ce.onClick,Un=ce.onError,Rn=ce.wrapperClassName,Wn=ce.wrapperStyle,vn=ce.rootClassName,tt=(0,ze.Z)(ce,le),nt=Ht&&Ht!==!0,Xe=(0,ve.Z)(jn)==="object"?jn:{},Rt=Xe.src,St=Xe.visible,Zt=St===void 0?void 0:St,on=Xe.onVisibleChange,Ut=on===void 0?Ye:on,Xt=Xe.getContainer,gn=Xt===void 0?void 0:Xt,_n=Xe.mask,Ln=Xe.maskClassName,fn=Xe.movable,Zn=Xe.icons,ot=Xe.scaleStep,Je=Xe.minScale,Ft=Xe.maxScale,Mn=Xe.imageRender,Gn=Xe.toolbarRender,we=(0,ze.Z)(Xe,te),Se=Rt!=null?Rt:Be,It=(0,pt.Z)(!!Zt,{value:Zt,onChange:Ut}),bt=(0,We.Z)(It,2),Ae=bt[0],ft=bt[1],Tt=at({src:Be,isCustomPlaceholder:nt,fallback:dn}),Kt=(0,We.Z)(Tt,3),ln=Kt[0],kt=Kt[1],jt=Kt[2],vt=(0,Ie.useState)(null),qe=(0,We.Z)(vt,2),Gt=qe[0],yn=qe[1],mn=(0,Ie.useContext)(Pe),In=!!jn,Qn=function(){ft(!1),yn(null)},er=Ge()(Mt,Rn,vn,(0,Le.Z)({},"".concat(Mt,"-error"),jt==="error")),kn=(0,Ie.useMemo)(function(){var qn={};return it.forEach(function(dr){ce[dr]!==void 0&&(qn[dr]=ce[dr])}),qn},it.map(function(qn){return ce[qn]})),$t=(0,Ie.useMemo)(function(){return(0,et.Z)((0,et.Z)({},kn),{},{src:Se})},[Se,kn]),Bn=tn(In,$t),hn=function(dr){var ir=Et(dr.target),yr=ir.left,br=ir.top;mn?mn.onPreview(Bn,Se,yr,br):(yn({x:yr,y:br}),ft(!0)),Hn==null||Hn(dr)};return Ie.createElement(Ie.Fragment,null,Ie.createElement("div",(0,ie.Z)({},tt,{className:er,onClick:In?hn:Hn,style:(0,et.Z)({width:zt,height:bn},Wn)}),Ie.createElement("img",(0,ie.Z)({},kn,{className:Ge()("".concat(Mt,"-img"),(0,Le.Z)({},"".concat(Mt,"-img-placeholder"),Ht===!0),zn),style:(0,et.Z)({height:bn},Nn),ref:ln},kt,{width:zt,height:bn,onError:Un})),jt==="loading"&&Ie.createElement("div",{"aria-hidden":"true",className:"".concat(Mt,"-placeholder")},Ht),_n&&In&&Ie.createElement("div",{className:Ge()("".concat(Mt,"-mask"),Ln),style:{display:(Nn==null?void 0:Nn.display)==="none"?"none":void 0}},_n)),!mn&&In&&Ie.createElement(Me,(0,ie.Z)({"aria-hidden":!Ae,visible:Ae,prefixCls:Ct,onClose:Qn,mousePosition:Gt,src:Se,alt:Ve,imageInfo:{width:zt,height:bn},fallback:dn,getContainer:gn,icons:Zn,movable:fn,scaleStep:ot,minScale:Je,maxScale:Ft,rootClassName:vn,imageRender:Mn,imgCommonProps:kn,toolbarRender:Gn},we)))};ee.PreviewGroup=Wt;var oe=ee,ue=oe},20922:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return Bt}});var ie=de(54476),et=de(20068),Le=de(76190),We=de(42978),ve=de(75931),ze=de(67732),Te=de(83652);function Ge(){return typeof BigInt=="function"}function Ce(Ne){return!Ne&&Ne!==0&&!Number.isNaN(Ne)||!String(Ne).trim()}function pe(Ne){var ye=Ne.trim(),_e=ye.startsWith("-");_e&&(ye=ye.slice(1)),ye=ye.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ye.startsWith(".")&&(ye="0".concat(ye));var lt=ye||"0",Me=lt.split("."),Ue=Me[0]||"0",it=Me[1]||"0";Ue==="0"&&it==="0"&&(_e=!1);var ut=_e?"-":"";return{negative:_e,negativeStr:ut,trimStr:lt,integerStr:Ue,decimalStr:it,fullStr:"".concat(ut).concat(lt)}}function ke(Ne){var ye=String(Ne);return!Number.isNaN(Number(ye))&&ye.includes("e")}function xe(Ne){var ye=String(Ne);if(ke(Ne)){var _e=Number(ye.slice(ye.indexOf("e-")+2)),lt=ye.match(/\.(\d+)/);return lt!=null&&lt[1]&&(_e+=lt[1].length),_e}return ye.includes(".")&&je(ye)?ye.length-ye.indexOf(".")-1:0}function wt(Ne){var ye=String(Ne);if(ke(Ne)){if(Ne>Number.MAX_SAFE_INTEGER)return String(Ge()?BigInt(Ne).toString():Number.MAX_SAFE_INTEGER);if(Ne<Number.MIN_SAFE_INTEGER)return String(Ge()?BigInt(Ne).toString():Number.MIN_SAFE_INTEGER);ye=Ne.toFixed(xe(ye))}return pe(ye).fullStr}function je(Ne){return typeof Ne=="number"?!Number.isNaN(Ne):Ne?/^\s*-?\d+(\.\d+)?\s*$/.test(Ne)||/^\s*-?\d+\.\s*$/.test(Ne)||/^\s*-?\.\d+\s*$/.test(Ne):!1}var Re=function(){function Ne(ye){if((0,ze.Z)(this,Ne),(0,et.Z)(this,"origin",""),(0,et.Z)(this,"negative",void 0),(0,et.Z)(this,"integer",void 0),(0,et.Z)(this,"decimal",void 0),(0,et.Z)(this,"decimalLen",void 0),(0,et.Z)(this,"empty",void 0),(0,et.Z)(this,"nan",void 0),Ce(ye)){this.empty=!0;return}if(this.origin=String(ye),ye==="-"||Number.isNaN(ye)){this.nan=!0;return}var _e=ye;if(ke(_e)&&(_e=Number(_e)),_e=typeof _e=="string"?_e:wt(_e),je(_e)){var lt=pe(_e);this.negative=lt.negative;var Me=lt.trimStr.split(".");this.integer=BigInt(Me[0]);var Ue=Me[1]||"0";this.decimal=BigInt(Ue),this.decimalLen=Ue.length}else this.nan=!0}return(0,Te.Z)(Ne,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(_e){var lt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(_e,"0"));return BigInt(lt)}},{key:"negate",value:function(){var _e=new Ne(this.toString());return _e.negative=!_e.negative,_e}},{key:"cal",value:function(_e,lt,Me){var Ue=Math.max(this.getDecimalStr().length,_e.getDecimalStr().length),it=this.alignDecimal(Ue),ut=_e.alignDecimal(Ue),yt=lt(it,ut).toString(),xt=Me(Ue),At=pe(yt),Wt=At.negativeStr,pn=At.trimStr,tn="".concat(Wt).concat(pn.padStart(xt+1,"0"));return new Ne("".concat(tn.slice(0,-xt),".").concat(tn.slice(-xt)))}},{key:"add",value:function(_e){if(this.isInvalidate())return new Ne(_e);var lt=new Ne(_e);return lt.isInvalidate()?this:this.cal(lt,function(Me,Ue){return Me+Ue},function(Me){return Me})}},{key:"multi",value:function(_e){var lt=new Ne(_e);return this.isInvalidate()||lt.isInvalidate()?new Ne(NaN):this.cal(lt,function(Me,Ue){return Me*Ue},function(Me){return Me*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(_e){return this.toString()===(_e==null?void 0:_e.toString())}},{key:"lessEquals",value:function(_e){return this.add(_e.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return _e?this.isInvalidate()?"":pe("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Ne}(),He=function(){function Ne(ye){if((0,ze.Z)(this,Ne),(0,et.Z)(this,"origin",""),(0,et.Z)(this,"number",void 0),(0,et.Z)(this,"empty",void 0),Ce(ye)){this.empty=!0;return}this.origin=String(ye),this.number=Number(ye)}return(0,Te.Z)(Ne,[{key:"negate",value:function(){return new Ne(-this.toNumber())}},{key:"add",value:function(_e){if(this.isInvalidate())return new Ne(_e);var lt=Number(_e);if(Number.isNaN(lt))return this;var Me=this.number+lt;if(Me>Number.MAX_SAFE_INTEGER)return new Ne(Number.MAX_SAFE_INTEGER);if(Me<Number.MIN_SAFE_INTEGER)return new Ne(Number.MIN_SAFE_INTEGER);var Ue=Math.max(xe(this.number),xe(lt));return new Ne(Me.toFixed(Ue))}},{key:"multi",value:function(_e){var lt=Number(_e);if(this.isInvalidate()||Number.isNaN(lt))return new Ne(NaN);var Me=this.number*lt;if(Me>Number.MAX_SAFE_INTEGER)return new Ne(Number.MAX_SAFE_INTEGER);if(Me<Number.MIN_SAFE_INTEGER)return new Ne(Number.MIN_SAFE_INTEGER);var Ue=Math.max(xe(this.number),xe(lt));return new Ne(Me.toFixed(Ue))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(_e){return this.toNumber()===(_e==null?void 0:_e.toNumber())}},{key:"lessEquals",value:function(_e){return this.add(_e.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return _e?this.isInvalidate()?"":wt(this.number):this.origin}}]),Ne}();function Ee(Ne){return Ge()?new Re(Ne):new He(Ne)}function dt(Ne,ye,_e){var lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ne==="")return"";var Me=pe(Ne),Ue=Me.negativeStr,it=Me.integerStr,ut=Me.decimalStr,yt="".concat(ye).concat(ut),xt="".concat(Ue).concat(it);if(_e>=0){var At=Number(ut[_e]);if(At>=5&&!lt){var Wt=Ee(Ne).add("".concat(Ue,"0.").concat("0".repeat(_e)).concat(10-At));return dt(Wt.toString(),ye,_e,lt)}return _e===0?xt:"".concat(xt).concat(ye).concat(ut.padEnd(_e,"0").slice(0,_e))}return yt===".0"?xt:"".concat(xt).concat(yt)}var ht=Ee,Lt=de(92310),Et=de.n(Lt),pt=de(36901),Ie=de(34280);function mt(Ne,ye){return typeof Proxy!="undefined"&&Ne?new Proxy(Ne,{get:function(lt,Me){if(ye[Me])return ye[Me];var Ue=lt[Me];return typeof Ue=="function"?Ue.bind(lt):Ue}}):Ne}var qt=de(8654),Oe=de(59301),Qe=de(48736);function Pt(Ne,ye){var _e=(0,Oe.useRef)(null);function lt(){try{var Ue=Ne.selectionStart,it=Ne.selectionEnd,ut=Ne.value,yt=ut.substring(0,Ue),xt=ut.substring(it);_e.current={start:Ue,end:it,value:ut,beforeTxt:yt,afterTxt:xt}}catch(At){}}function Me(){if(Ne&&_e.current&&ye)try{var Ue=Ne.value,it=_e.current,ut=it.beforeTxt,yt=it.afterTxt,xt=it.start,At=Ue.length;if(Ue.startsWith(ut))At=ut.length;else if(Ue.endsWith(yt))At=Ue.length-_e.current.afterTxt.length;else{var Wt=ut[xt-1],pn=Ue.indexOf(Wt,xt-1);pn!==-1&&(At=pn+1)}Ne.setSelectionRange(At,At)}catch(tn){(0,Qe.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(tn.message))}}return[lt,Me]}var Pe=de(49658),rt=function(){var ye=(0,Oe.useState)(!1),_e=(0,We.Z)(ye,2),lt=_e[0],Me=_e[1];return(0,Ie.Z)(function(){Me((0,Pe.Z)())},[]),lt},Ze=rt,gt=de(16089),Dn=200,Ot=600;function Pn(Ne){var ye=Ne.prefixCls,_e=Ne.upNode,lt=Ne.downNode,Me=Ne.upDisabled,Ue=Ne.downDisabled,it=Ne.onStep,ut=Oe.useRef(),yt=Oe.useRef([]),xt=Oe.useRef();xt.current=it;var At=function(){clearTimeout(ut.current)},Wt=function(ne,ce){ne.preventDefault(),At(),xt.current(ce);function Be(){xt.current(ce),ut.current=setTimeout(Be,Dn)}ut.current=setTimeout(Be,Ot)};Oe.useEffect(function(){return function(){At(),yt.current.forEach(function(ue){return gt.Z.cancel(ue)})}},[]);var pn=Ze();if(pn)return null;var tn="".concat(ye,"-handler"),le=Et()(tn,"".concat(tn,"-up"),(0,et.Z)({},"".concat(tn,"-up-disabled"),Me)),te=Et()(tn,"".concat(tn,"-down"),(0,et.Z)({},"".concat(tn,"-down-disabled"),Ue)),ee=function(){return yt.current.push((0,gt.Z)(At))},oe={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return Oe.createElement("div",{className:"".concat(tn,"-wrap")},Oe.createElement("span",(0,ie.Z)({},oe,{onMouseDown:function(ne){Wt(ne,!0)},"aria-label":"Increase Value","aria-disabled":Me,className:le}),_e||Oe.createElement("span",{unselectable:"on",className:"".concat(ye,"-handler-up-inner")})),Oe.createElement("span",(0,ie.Z)({},oe,{onMouseDown:function(ne){Wt(ne,!1)},"aria-label":"Decrease Value","aria-disabled":Ue,className:te}),lt||Oe.createElement("span",{unselectable:"on",className:"".concat(ye,"-handler-down-inner")})))}function nn(Ne){var ye=typeof Ne=="number"?wt(Ne):pe(Ne).fullStr,_e=ye.includes(".");return _e?pe(ye.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Ne+"0"}var me=de(30292),he=function(){var Ne=(0,Oe.useRef)(0),ye=function(){gt.Z.cancel(Ne.current)};return(0,Oe.useEffect)(function(){return ye},[]),function(_e){ye(),Ne.current=(0,gt.Z)(function(){_e()})}},Dt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],un=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],_t=function(ye,_e){return ye||_e.isEmpty()?_e.toString():_e.toNumber()},Fe=function(ye){var _e=ht(ye);return _e.isInvalidate()?null:_e},at=Oe.forwardRef(function(Ne,ye){var _e=Ne.prefixCls,lt=Ne.className,Me=Ne.style,Ue=Ne.min,it=Ne.max,ut=Ne.step,yt=ut===void 0?1:ut,xt=Ne.defaultValue,At=Ne.value,Wt=Ne.disabled,pn=Ne.readOnly,tn=Ne.upHandler,le=Ne.downHandler,te=Ne.keyboard,ee=Ne.changeOnWheel,oe=ee===void 0?!1:ee,ue=Ne.controls,ne=ue===void 0?!0:ue,ce=Ne.classNames,Be=Ne.stringMode,Ve=Ne.parser,Ye=Ne.formatter,ge=Ne.precision,Mt=Ne.decimalSeparator,ct=Ne.onChange,Ct=Ne.onInput,Ht=Ne.onPressEnter,dn=Ne.onStep,zt=Ne.changeOnBlur,bn=zt===void 0?!0:zt,Nn=Ne.domRef,Tn=(0,ve.Z)(Ne,Dt),jn="".concat(_e,"-input"),zn=Oe.useRef(null),Hn=Oe.useState(!1),Un=(0,We.Z)(Hn,2),Rn=Un[0],Wn=Un[1],vn=Oe.useRef(!1),tt=Oe.useRef(!1),nt=Oe.useRef(!1),Xe=Oe.useState(function(){return ht(At!=null?At:xt)}),Rt=(0,We.Z)(Xe,2),St=Rt[0],Zt=Rt[1];function on(kn){At===void 0&&Zt(kn)}var Ut=Oe.useCallback(function(kn,$t){if(!$t)return ge>=0?ge:Math.max(xe(kn),xe(yt))},[ge,yt]),Xt=Oe.useCallback(function(kn){var $t=String(kn);if(Ve)return Ve($t);var Bn=$t;return Mt&&(Bn=Bn.replace(Mt,".")),Bn.replace(/[^\w.-]+/g,"")},[Ve,Mt]),gn=Oe.useRef(""),_n=Oe.useCallback(function(kn,$t){if(Ye)return Ye(kn,{userTyping:$t,input:String(gn.current)});var Bn=typeof kn=="number"?wt(kn):kn;if(!$t){var hn=Ut(Bn,$t);if(je(Bn)&&(Mt||hn>=0)){var qn=Mt||".";Bn=dt(Bn,qn,hn)}}return Bn},[Ye,Ut,Mt]),Ln=Oe.useState(function(){var kn=xt!=null?xt:At;return St.isInvalidate()&&["string","number"].includes((0,Le.Z)(kn))?Number.isNaN(kn)?"":kn:_n(St.toString(),!1)}),fn=(0,We.Z)(Ln,2),Zn=fn[0],ot=fn[1];gn.current=Zn;function Je(kn,$t){ot(_n(kn.isInvalidate()?kn.toString(!1):kn.toString(!$t),$t))}var Ft=Oe.useMemo(function(){return Fe(it)},[it,ge]),Mn=Oe.useMemo(function(){return Fe(Ue)},[Ue,ge]),Gn=Oe.useMemo(function(){return!Ft||!St||St.isInvalidate()?!1:Ft.lessEquals(St)},[Ft,St]),we=Oe.useMemo(function(){return!Mn||!St||St.isInvalidate()?!1:St.lessEquals(Mn)},[Mn,St]),Se=Pt(zn.current,Rn),It=(0,We.Z)(Se,2),bt=It[0],Ae=It[1],ft=function($t){return Ft&&!$t.lessEquals(Ft)?Ft:Mn&&!Mn.lessEquals($t)?Mn:null},Tt=function($t){return!ft($t)},Kt=function($t,Bn){var hn=$t,qn=Tt(hn)||hn.isEmpty();if(!hn.isEmpty()&&!Bn&&(hn=ft(hn)||hn,qn=!0),!pn&&!Wt&&qn){var dr=hn.toString(),ir=Ut(dr,Bn);return ir>=0&&(hn=ht(dt(dr,".",ir)),Tt(hn)||(hn=ht(dt(dr,".",ir,!0)))),hn.equals(St)||(on(hn),ct==null||ct(hn.isEmpty()?null:_t(Be,hn)),At===void 0&&Je(hn,Bn)),hn}return St},ln=he(),kt=function kn($t){if(bt(),gn.current=$t,ot($t),!tt.current){var Bn=Xt($t),hn=ht(Bn);hn.isNaN()||Kt(hn,!0)}Ct==null||Ct($t),ln(function(){var qn=$t;Ve||(qn=$t.replace(/。/g,".")),qn!==$t&&kn(qn)})},jt=function(){tt.current=!0},vt=function(){tt.current=!1,kt(zn.current.value)},qe=function($t){kt($t.target.value)},Gt=function($t){var Bn;if(!($t&&Gn||!$t&&we)){vn.current=!1;var hn=ht(nt.current?nn(yt):yt);$t||(hn=hn.negate());var qn=(St||ht(0)).add(hn.toString()),dr=Kt(qn,!1);dn==null||dn(_t(Be,dr),{offset:nt.current?nn(yt):yt,type:$t?"up":"down"}),(Bn=zn.current)===null||Bn===void 0||Bn.focus()}},yn=function($t){var Bn=ht(Xt(Zn)),hn;Bn.isNaN()?hn=Kt(St,$t):hn=Kt(Bn,$t),At!==void 0?Je(St,!1):hn.isNaN()||Je(hn,!1)},mn=function(){vn.current=!0},In=function($t){var Bn=$t.key,hn=$t.shiftKey;vn.current=!0,nt.current=hn,Bn==="Enter"&&(tt.current||(vn.current=!1),yn(!1),Ht==null||Ht($t)),te!==!1&&!tt.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Bn)&&(Gt(Bn==="Up"||Bn==="ArrowUp"),$t.preventDefault())},Qn=function(){vn.current=!1,nt.current=!1};Oe.useEffect(function(){if(oe&&Rn){var kn=function(hn){Gt(hn.deltaY<0),hn.preventDefault()},$t=zn.current;if($t)return $t.addEventListener("wheel",kn,{passive:!1}),function(){return $t.removeEventListener("wheel",kn)}}});var er=function(){bn&&yn(!1),Wn(!1),vn.current=!1};return(0,Ie.o)(function(){St.isInvalidate()||Je(St,!1)},[ge,Ye]),(0,Ie.o)(function(){var kn=ht(At);Zt(kn);var $t=ht(Xt(Zn));(!kn.equals($t)||!vn.current||Ye)&&Je(kn,vn.current)},[At]),(0,Ie.o)(function(){Ye&&Ae()},[Zn]),Oe.createElement("div",{ref:Nn,className:Et()(_e,lt,(0,et.Z)((0,et.Z)((0,et.Z)((0,et.Z)((0,et.Z)({},"".concat(_e,"-focused"),Rn),"".concat(_e,"-disabled"),Wt),"".concat(_e,"-readonly"),pn),"".concat(_e,"-not-a-number"),St.isNaN()),"".concat(_e,"-out-of-range"),!St.isInvalidate()&&!Tt(St))),style:Me,onFocus:function(){Wn(!0)},onBlur:er,onKeyDown:In,onKeyUp:Qn,onCompositionStart:jt,onCompositionEnd:vt,onBeforeInput:mn},ne&&Oe.createElement(Pn,{prefixCls:_e,upNode:tn,downNode:le,upDisabled:Gn,downDisabled:we,onStep:Gt}),Oe.createElement("div",{className:"".concat(jn,"-wrap")},Oe.createElement("input",(0,ie.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ue,"aria-valuemax":it,"aria-valuenow":St.isInvalidate()?null:St.toString(),step:yt},Tn,{ref:(0,qt.sQ)(zn,ye),className:jn,value:Zn,onChange:qe,disabled:Wt,readOnly:pn}))))}),st=Oe.forwardRef(function(Ne,ye){var _e=Ne.disabled,lt=Ne.style,Me=Ne.prefixCls,Ue=Me===void 0?"rc-input-number":Me,it=Ne.value,ut=Ne.prefix,yt=Ne.suffix,xt=Ne.addonBefore,At=Ne.addonAfter,Wt=Ne.className,pn=Ne.classNames,tn=(0,ve.Z)(Ne,un),le=Oe.useRef(null),te=Oe.useRef(null),ee=Oe.useRef(null),oe=function(ne){ee.current&&(0,me.nH)(ee.current,ne)};return Oe.useImperativeHandle(ye,function(){return mt(ee.current,{focus:oe,nativeElement:le.current.nativeElement||te.current})}),Oe.createElement(pt.BaseInput,{className:Wt,triggerFocus:oe,prefixCls:Ue,value:it,disabled:_e,style:lt,prefix:ut,suffix:yt,addonAfter:At,addonBefore:xt,classNames:pn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:le},Oe.createElement(at,(0,ie.Z)({prefixCls:Ue,disabled:_e,ref:ee,domRef:te,className:pn==null?void 0:pn.input},tn)))}),cn=st,Bt=cn},6551:function(Yt,en,de){"use strict";de.d(en,{ZP:function(){return Te}});var ie=de(42978),et=de(59301),Le=de(47273),We=0,ve=(0,Le.Z)();function ze(){var Ge;return ve?(Ge=We,We+=1):Ge="TEST_OR_SSR",Ge}function Te(Ge){var Ce=et.useState(),pe=(0,ie.Z)(Ce,2),ke=pe[0],xe=pe[1];return et.useEffect(function(){xe("rc_select_".concat(ze()))},[]),Ge||ke}},37463:function(Yt,en,de){"use strict";de.d(en,{Ac:function(){return ge},Xo:function(){return ct},Wx:function(){return Ht},ZP:function(){return Gn},lk:function(){return Lt}});var ie=de(54476),et=de(94480),Le=de(20068),We=de(33885),ve=de(42978),ze=de(75931),Te=de(76190),Ge=de(18929),Ce=de(48736),pe=de(59301),ke=de(92310),xe=de.n(ke),wt=de(34280),je=de(49658),Re=de(8654),He=function(Se){var It=Se.className,bt=Se.customizeIcon,Ae=Se.customizeIconProps,ft=Se.children,Tt=Se.onMouseDown,Kt=Se.onClick,ln=typeof bt=="function"?bt(Ae):bt;return pe.createElement("span",{className:It,onMouseDown:function(jt){jt.preventDefault(),Tt==null||Tt(jt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Kt,"aria-hidden":!0},ln!==void 0?ln:pe.createElement("span",{className:xe()(It.split(/\s+/).map(function(kt){return"".concat(kt,"-icon")}))},ft))},Ee=He,dt=function(Se,It,bt,Ae,ft){var Tt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Kt=arguments.length>6?arguments[6]:void 0,ln=arguments.length>7?arguments[7]:void 0,kt=pe.useMemo(function(){if((0,Te.Z)(Ae)==="object")return Ae.clearIcon;if(ft)return ft},[Ae,ft]),jt=pe.useMemo(function(){return!!(!Tt&&Ae&&(bt.length||Kt)&&!(ln==="combobox"&&Kt===""))},[Ae,Tt,bt.length,Kt,ln]);return{allowClear:jt,clearIcon:pe.createElement(Ee,{className:"".concat(Se,"-clear"),onMouseDown:It,customizeIcon:kt},"\xD7")}},ht=pe.createContext(null);function Lt(){return pe.useContext(ht)}function Et(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Se=pe.useState(!1),It=(0,ve.Z)(Se,2),bt=It[0],Ae=It[1],ft=pe.useRef(null),Tt=function(){window.clearTimeout(ft.current)};pe.useEffect(function(){return Tt},[]);var Kt=function(kt,jt){Tt(),ft.current=window.setTimeout(function(){Ae(kt),jt&&jt()},we)};return[bt,Kt,Tt]}function pt(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Se=pe.useRef(null),It=pe.useRef(null);pe.useEffect(function(){return function(){window.clearTimeout(It.current)}},[]);function bt(Ae){(Ae||Se.current===null)&&(Se.current=Ae),window.clearTimeout(It.current),It.current=window.setTimeout(function(){Se.current=null},we)}return[function(){return Se.current},bt]}function Ie(we,Se,It,bt){var Ae=pe.useRef(null);Ae.current={open:Se,triggerOpen:It,customizedTrigger:bt},pe.useEffect(function(){function ft(Tt){var Kt;if(!((Kt=Ae.current)!==null&&Kt!==void 0&&Kt.customizedTrigger)){var ln=Tt.target;ln.shadowRoot&&Tt.composed&&(ln=Tt.composedPath()[0]||ln),Ae.current.open&&we().filter(function(kt){return kt}).every(function(kt){return!kt.contains(ln)&&kt!==ln})&&Ae.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ft),function(){return window.removeEventListener("mousedown",ft)}},[])}var mt=de(10228);function qt(we){return we&&![mt.Z.ESC,mt.Z.SHIFT,mt.Z.BACKSPACE,mt.Z.TAB,mt.Z.WIN_KEY,mt.Z.ALT,mt.Z.META,mt.Z.WIN_KEY_RIGHT,mt.Z.CTRL,mt.Z.SEMICOLON,mt.Z.EQUALS,mt.Z.CAPS_LOCK,mt.Z.CONTEXT_MENU,mt.Z.F1,mt.Z.F2,mt.Z.F3,mt.Z.F4,mt.Z.F5,mt.Z.F6,mt.Z.F7,mt.Z.F8,mt.Z.F9,mt.Z.F10,mt.Z.F11,mt.Z.F12].includes(we)}var Oe=de(26112),Qe=de(11780);function Pt(we,Se,It){var bt=(0,We.Z)((0,We.Z)({},we),It?Se:{});return Object.keys(Se).forEach(function(Ae){var ft=Se[Ae];typeof ft=="function"&&(bt[Ae]=function(){for(var Tt,Kt=arguments.length,ln=new Array(Kt),kt=0;kt<Kt;kt++)ln[kt]=arguments[kt];return ft.apply(void 0,ln),(Tt=we[Ae])===null||Tt===void 0?void 0:Tt.call.apply(Tt,[we].concat(ln))})}),bt}var Pe=Pt,rt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ze=function(Se,It){var bt=Se.prefixCls,Ae=Se.id,ft=Se.inputElement,Tt=Se.autoFocus,Kt=Se.autoComplete,ln=Se.editable,kt=Se.activeDescendantId,jt=Se.value,vt=Se.open,qe=Se.attrs,Gt=(0,ze.Z)(Se,rt),yn=ft||pe.createElement("input",null),mn=yn,In=mn.ref,Qn=mn.props;return(0,Ce.Kp)(!("maxLength"in yn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),yn=pe.cloneElement(yn,(0,We.Z)((0,We.Z)((0,We.Z)({type:"search"},Pe(Gt,Qn,!0)),{},{id:Ae,ref:(0,Re.sQ)(It,In),autoComplete:Kt||"off",autoFocus:Tt,className:xe()("".concat(bt,"-selection-search-input"),Qn==null?void 0:Qn.className),role:"combobox","aria-expanded":vt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ae,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ae,"_list"),"aria-activedescendant":vt?kt:void 0},qe),{},{value:ln?jt:"",readOnly:!ln,unselectable:ln?null:"on",style:(0,We.Z)((0,We.Z)({},Qn.style),{},{opacity:ln?null:0})})),yn},gt=pe.forwardRef(Ze),Dn=gt;function Ot(we){return Array.isArray(we)?we:we!==void 0?[we]:[]}var Pn=typeof window!="undefined"&&window.document&&window.document.documentElement,nn=Pn;function me(we){return we!=null}function he(we){return!we&&we!==0}function Dt(we){return["string","number"].includes((0,Te.Z)(we))}function un(we){var Se=void 0;return we&&(Dt(we.title)?Se=we.title.toString():Dt(we.label)&&(Se=we.label.toString())),Se}function _t(we,Se){nn?pe.useLayoutEffect(we,Se):pe.useEffect(we,Se)}function Fe(we){var Se;return(Se=we.key)!==null&&Se!==void 0?Se:we.value}var at=function(Se){Se.preventDefault(),Se.stopPropagation()},st=function(Se){var It=Se.id,bt=Se.prefixCls,Ae=Se.values,ft=Se.open,Tt=Se.searchValue,Kt=Se.autoClearSearchValue,ln=Se.inputRef,kt=Se.placeholder,jt=Se.disabled,vt=Se.mode,qe=Se.showSearch,Gt=Se.autoFocus,yn=Se.autoComplete,mn=Se.activeDescendantId,In=Se.tabIndex,Qn=Se.removeIcon,er=Se.maxTagCount,kn=Se.maxTagTextLength,$t=Se.maxTagPlaceholder,Bn=$t===void 0?function(On){return"+ ".concat(On.length," ...")}:$t,hn=Se.tagRender,qn=Se.onToggleOpen,dr=Se.onRemove,ir=Se.onInputChange,yr=Se.onInputPaste,br=Se.onInputKeyDown,Cr=Se.onInputMouseDown,hr=Se.onInputCompositionStart,Pr=Se.onInputCompositionEnd,xr=Se.onInputBlur,pr=pe.useRef(null),Sr=(0,pe.useState)(0),lr=(0,ve.Z)(Sr,2),sr=lr[0],or=lr[1],ur=(0,pe.useState)(!1),Br=(0,ve.Z)(ur,2),Vr=Br[0],Jr=Br[1],Tr="".concat(bt,"-selection"),Hr=ft||vt==="multiple"&&Kt===!1||vt==="tags"?Tt:"",Rr=vt==="tags"||vt==="multiple"&&Kt===!1||qe&&(ft||Vr);_t(function(){or(pr.current.scrollWidth)},[Hr]);var zr=function(wn,Kn,vr,rn,Jt){return pe.createElement("span",{title:un(wn),className:xe()("".concat(Tr,"-item"),(0,Le.Z)({},"".concat(Tr,"-item-disabled"),vr))},pe.createElement("span",{className:"".concat(Tr,"-item-content")},Kn),rn&&pe.createElement(Ee,{className:"".concat(Tr,"-item-remove"),onMouseDown:at,onClick:Jt,customizeIcon:Qn},"\xD7"))},ii=function(wn,Kn,vr,rn,Jt,xn){var En=function(mr){at(mr),qn(!ft)};return pe.createElement("span",{onMouseDown:En},hn({label:Kn,value:wn,disabled:vr,closable:rn,onClose:Jt,isMaxTag:!!xn}))},Fr=function(wn){var Kn=wn.disabled,vr=wn.label,rn=wn.value,Jt=!jt&&!Kn,xn=vr;if(typeof kn=="number"&&(typeof vr=="string"||typeof vr=="number")){var En=String(xn);En.length>kn&&(xn="".concat(En.slice(0,kn),"..."))}var Xn=function(cr){cr&&cr.stopPropagation(),dr(wn)};return typeof hn=="function"?ii(rn,xn,Kn,Jt,Xn):zr(wn,xn,Kn,Jt,Xn)},nr=function(wn){if(!Ae.length)return null;var Kn=typeof Bn=="function"?Bn(wn):Bn;return typeof hn=="function"?ii(void 0,Kn,!1,!1,void 0,!0):zr({title:Kn},Kn,!1)},Qt=pe.createElement("div",{className:"".concat(Tr,"-search"),style:{width:sr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},pe.createElement(Dn,{ref:ln,open:ft,prefixCls:bt,id:It,inputElement:null,disabled:jt,autoFocus:Gt,autoComplete:yn,editable:Rr,activeDescendantId:mn,value:Hr,onKeyDown:br,onMouseDown:Cr,onChange:ir,onPaste:yr,onCompositionStart:hr,onCompositionEnd:Pr,onBlur:xr,tabIndex:In,attrs:(0,Oe.Z)(Se,!0)}),pe.createElement("span",{ref:pr,className:"".concat(Tr,"-search-mirror"),"aria-hidden":!0},Hr,"\xA0")),an=pe.createElement(Qe.Z,{prefixCls:"".concat(Tr,"-overflow"),data:Ae,renderItem:Fr,renderRest:nr,suffix:Qt,itemKey:Fe,maxCount:er});return pe.createElement("span",{className:"".concat(Tr,"-wrap")},an,!Ae.length&&!Hr&&pe.createElement("span",{className:"".concat(Tr,"-placeholder")},kt))},cn=st,Bt=function(Se){var It=Se.inputElement,bt=Se.prefixCls,Ae=Se.id,ft=Se.inputRef,Tt=Se.disabled,Kt=Se.autoFocus,ln=Se.autoComplete,kt=Se.activeDescendantId,jt=Se.mode,vt=Se.open,qe=Se.values,Gt=Se.placeholder,yn=Se.tabIndex,mn=Se.showSearch,In=Se.searchValue,Qn=Se.activeValue,er=Se.maxLength,kn=Se.onInputKeyDown,$t=Se.onInputMouseDown,Bn=Se.onInputChange,hn=Se.onInputPaste,qn=Se.onInputCompositionStart,dr=Se.onInputCompositionEnd,ir=Se.onInputBlur,yr=Se.title,br=pe.useState(!1),Cr=(0,ve.Z)(br,2),hr=Cr[0],Pr=Cr[1],xr=jt==="combobox",pr=xr||mn,Sr=qe[0],lr=In||"";xr&&Qn&&!hr&&(lr=Qn),pe.useEffect(function(){xr&&Pr(!1)},[xr,Qn]);var sr=jt!=="combobox"&&!vt&&!mn?!1:!!lr,or=yr===void 0?un(Sr):yr,ur=pe.useMemo(function(){return Sr?null:pe.createElement("span",{className:"".concat(bt,"-selection-placeholder"),style:sr?{visibility:"hidden"}:void 0},Gt)},[Sr,sr,Gt,bt]);return pe.createElement("span",{className:"".concat(bt,"-selection-wrap")},pe.createElement("span",{className:"".concat(bt,"-selection-search")},pe.createElement(Dn,{ref:ft,prefixCls:bt,id:Ae,open:vt,inputElement:It,disabled:Tt,autoFocus:Kt,autoComplete:ln,editable:pr,activeDescendantId:kt,value:lr,onKeyDown:kn,onMouseDown:$t,onChange:function(Vr){Pr(!0),Bn(Vr)},onPaste:hn,onCompositionStart:qn,onCompositionEnd:dr,onBlur:ir,tabIndex:yn,attrs:(0,Oe.Z)(Se,!0),maxLength:xr?er:void 0})),!xr&&Sr?pe.createElement("span",{className:"".concat(bt,"-selection-item"),title:or,style:sr?{visibility:"hidden"}:void 0},Sr.label):null,ur)},Ne=Bt,ye=function(Se,It){var bt=(0,pe.useRef)(null),Ae=(0,pe.useRef)(!1),ft=Se.prefixCls,Tt=Se.open,Kt=Se.mode,ln=Se.showSearch,kt=Se.tokenWithEnter,jt=Se.disabled,vt=Se.prefix,qe=Se.autoClearSearchValue,Gt=Se.onSearch,yn=Se.onSearchSubmit,mn=Se.onToggleOpen,In=Se.onInputKeyDown,Qn=Se.onInputBlur,er=Se.domRef;pe.useImperativeHandle(It,function(){return{focus:function(or){bt.current.focus(or)},blur:function(){bt.current.blur()}}});var kn=pt(0),$t=(0,ve.Z)(kn,2),Bn=$t[0],hn=$t[1],qn=function(or){var ur=or.which,Br=bt.current instanceof HTMLTextAreaElement;!Br&&Tt&&(ur===mt.Z.UP||ur===mt.Z.DOWN)&&or.preventDefault(),In&&In(or),ur===mt.Z.ENTER&&Kt==="tags"&&!Ae.current&&!Tt&&(yn==null||yn(or.target.value)),!(Br&&!Tt&&~[mt.Z.UP,mt.Z.DOWN,mt.Z.LEFT,mt.Z.RIGHT].indexOf(ur))&&qt(ur)&&mn(!0)},dr=function(){hn(!0)},ir=(0,pe.useRef)(null),yr=function(or){Gt(or,!0,Ae.current)!==!1&&mn(!0)},br=function(){Ae.current=!0},Cr=function(or){Ae.current=!1,Kt!=="combobox"&&yr(or.target.value)},hr=function(or){var ur=or.target.value;if(kt&&ir.current&&/[\r\n]/.test(ir.current)){var Br=ir.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");ur=ur.replace(Br,ir.current)}ir.current=null,yr(ur)},Pr=function(or){var ur=or.clipboardData,Br=ur==null?void 0:ur.getData("text");ir.current=Br||""},xr=function(or){var ur=or.target;if(ur!==bt.current){var Br=document.body.style.msTouchAction!==void 0;Br?setTimeout(function(){bt.current.focus()}):bt.current.focus()}},pr=function(or){var ur=Bn();or.target!==bt.current&&!ur&&!(Kt==="combobox"&&jt)&&or.preventDefault(),(Kt!=="combobox"&&(!ln||!ur)||!Tt)&&(Tt&&qe!==!1&&Gt("",!0,!1),mn())},Sr={inputRef:bt,onInputKeyDown:qn,onInputMouseDown:dr,onInputChange:hr,onInputPaste:Pr,onInputCompositionStart:br,onInputCompositionEnd:Cr,onInputBlur:Qn},lr=Kt==="multiple"||Kt==="tags"?pe.createElement(cn,(0,ie.Z)({},Se,Sr)):pe.createElement(Ne,(0,ie.Z)({},Se,Sr));return pe.createElement("div",{ref:er,className:"".concat(ft,"-selector"),onClick:xr,onMouseDown:pr},vt&&pe.createElement("div",{className:"".concat(ft,"-prefix")},vt),lr)},_e=pe.forwardRef(ye),lt=_e,Me=de(65030),Ue=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],it=function(Se){var It=Se===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"}}},ut=function(Se,It){var bt=Se.prefixCls,Ae=Se.disabled,ft=Se.visible,Tt=Se.children,Kt=Se.popupElement,ln=Se.animation,kt=Se.transitionName,jt=Se.dropdownStyle,vt=Se.dropdownClassName,qe=Se.direction,Gt=qe===void 0?"ltr":qe,yn=Se.placement,mn=Se.builtinPlacements,In=Se.dropdownMatchSelectWidth,Qn=Se.dropdownRender,er=Se.dropdownAlign,kn=Se.getPopupContainer,$t=Se.empty,Bn=Se.getTriggerDOMNode,hn=Se.onPopupVisibleChange,qn=Se.onPopupMouseEnter,dr=(0,ze.Z)(Se,Ue),ir="".concat(bt,"-dropdown"),yr=Kt;Qn&&(yr=Qn(Kt));var br=pe.useMemo(function(){return mn||it(In)},[mn,In]),Cr=ln?"".concat(ir,"-").concat(ln):kt,hr=typeof In=="number",Pr=pe.useMemo(function(){return hr?null:In===!1?"minWidth":"width"},[In,hr]),xr=jt;hr&&(xr=(0,We.Z)((0,We.Z)({},xr),{},{width:In}));var pr=pe.useRef(null);return pe.useImperativeHandle(It,function(){return{getPopupElement:function(){var lr;return(lr=pr.current)===null||lr===void 0?void 0:lr.popupElement}}}),pe.createElement(Me.Z,(0,ie.Z)({},dr,{showAction:hn?["click"]:[],hideAction:hn?["click"]:[],popupPlacement:yn||(Gt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:br,prefixCls:ir,popupTransitionName:Cr,popup:pe.createElement("div",{onMouseEnter:qn},yr),ref:pr,stretch:Pr,popupAlign:er,popupVisible:ft,getPopupContainer:kn,popupClassName:xe()(vt,(0,Le.Z)({},"".concat(ir,"-empty"),$t)),popupStyle:xr,getTriggerDOMNode:Bn,onPopupVisibleChange:hn}),Tt)},yt=pe.forwardRef(ut),xt=yt,At=de(66712);function Wt(we,Se){var It=we.key,bt;return"value"in we&&(bt=we.value),It!=null?It:bt!==void 0?bt:"rc-index-key-".concat(Se)}function pn(we){return typeof we!="undefined"&&!Number.isNaN(we)}function tn(we,Se){var It=we||{},bt=It.label,Ae=It.value,ft=It.options,Tt=It.groupLabel,Kt=bt||(Se?"children":"label");return{label:Kt,value:Ae||"value",options:ft||"options",groupLabel:Tt||Kt}}function le(we){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},It=Se.fieldNames,bt=Se.childrenAsData,Ae=[],ft=tn(It,!1),Tt=ft.label,Kt=ft.value,ln=ft.options,kt=ft.groupLabel;function jt(vt,qe){Array.isArray(vt)&&vt.forEach(function(Gt){if(qe||!(ln in Gt)){var yn=Gt[Kt];Ae.push({key:Wt(Gt,Ae.length),groupOption:qe,data:Gt,label:Gt[Tt],value:yn})}else{var mn=Gt[kt];mn===void 0&&bt&&(mn=Gt.label),Ae.push({key:Wt(Gt,Ae.length),group:!0,data:Gt,label:mn}),jt(Gt[ln],!0)}})}return jt(we,!1),Ae}function te(we){var Se=(0,We.Z)({},we);return"props"in Se||Object.defineProperty(Se,"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`."),Se}}),Se}var ee=function(Se,It,bt){if(!It||!It.length)return null;var Ae=!1,ft=function Kt(ln,kt){var jt=(0,At.Z)(kt),vt=jt[0],qe=jt.slice(1);if(!vt)return[ln];var Gt=ln.split(vt);return Ae=Ae||Gt.length>1,Gt.reduce(function(yn,mn){return[].concat((0,et.Z)(yn),(0,et.Z)(Kt(mn,qe)))},[]).filter(Boolean)},Tt=ft(Se,It);return Ae?typeof bt!="undefined"?Tt.slice(0,bt):Tt:null},oe=pe.createContext(null),ue=oe;function ne(we){var Se=we.visible,It=we.values;if(!Se)return null;var bt=50;return pe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(It.slice(0,bt).map(function(Ae){var ft=Ae.label,Tt=Ae.value;return["number","string"].includes((0,Te.Z)(ft))?ft:Tt}).join(", ")),It.length>bt?", ...":null)}var ce=["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"],Be=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ve=function(Se){return Se==="tags"||Se==="multiple"},Ye=pe.forwardRef(function(we,Se){var It,bt=we.id,Ae=we.prefixCls,ft=we.className,Tt=we.showSearch,Kt=we.tagRender,ln=we.direction,kt=we.omitDomProps,jt=we.displayValues,vt=we.onDisplayValuesChange,qe=we.emptyOptions,Gt=we.notFoundContent,yn=Gt===void 0?"Not Found":Gt,mn=we.onClear,In=we.mode,Qn=we.disabled,er=we.loading,kn=we.getInputElement,$t=we.getRawInputElement,Bn=we.open,hn=we.defaultOpen,qn=we.onDropdownVisibleChange,dr=we.activeValue,ir=we.onActiveValueChange,yr=we.activeDescendantId,br=we.searchValue,Cr=we.autoClearSearchValue,hr=we.onSearch,Pr=we.onSearchSplit,xr=we.tokenSeparators,pr=we.allowClear,Sr=we.prefix,lr=we.suffixIcon,sr=we.clearIcon,or=we.OptionList,ur=we.animation,Br=we.transitionName,Vr=we.dropdownStyle,Jr=we.dropdownClassName,Tr=we.dropdownMatchSelectWidth,Hr=we.dropdownRender,Rr=we.dropdownAlign,zr=we.placement,ii=we.builtinPlacements,Fr=we.getPopupContainer,nr=we.showAction,Qt=nr===void 0?[]:nr,an=we.onFocus,On=we.onBlur,wn=we.onKeyUp,Kn=we.onKeyDown,vr=we.onMouseDown,rn=(0,ze.Z)(we,ce),Jt=Ve(In),xn=(Tt!==void 0?Tt:Jt)||In==="combobox",En=(0,We.Z)({},rn);Be.forEach(function(gr){delete En[gr]}),kt==null||kt.forEach(function(gr){delete En[gr]});var Xn=pe.useState(!1),mr=(0,ve.Z)(Xn,2),cr=mr[0],Er=mr[1];pe.useEffect(function(){Er((0,je.Z)())},[]);var Dr=pe.useRef(null),Mr=pe.useRef(null),Zr=pe.useRef(null),Ar=pe.useRef(null),_r=pe.useRef(null),ei=pe.useRef(!1),Mi=Et(),Fi=(0,ve.Z)(Mi,3),xi=Fi[0],vi=Fi[1],Xi=Fi[2];pe.useImperativeHandle(Se,function(){var gr,ar;return{focus:(gr=Ar.current)===null||gr===void 0?void 0:gr.focus,blur:(ar=Ar.current)===null||ar===void 0?void 0:ar.blur,scrollTo:function(di){var Yr;return(Yr=_r.current)===null||Yr===void 0?void 0:Yr.scrollTo(di)},nativeElement:Dr.current||Mr.current}});var wr=pe.useMemo(function(){var gr;if(In!=="combobox")return br;var ar=(gr=jt[0])===null||gr===void 0?void 0:gr.value;return typeof ar=="string"||typeof ar=="number"?String(ar):""},[br,In,jt]),to=In==="combobox"&&typeof kn=="function"&&kn()||null,ti=typeof $t=="function"&&$t(),Bi=(0,Re.x1)(Mr,ti==null||(It=ti.props)===null||It===void 0?void 0:It.ref),ao=pe.useState(!1),Ji=(0,ve.Z)(ao,2),mi=Ji[0],Ri=Ji[1];(0,wt.Z)(function(){Ri(!0)},[]);var Wr=(0,Ge.Z)(!1,{defaultValue:hn,value:Bn}),_i=(0,ve.Z)(Wr,2),lo=_i[0],zi=_i[1],Qr=mi?lo:!1,xo=!yn&&qe;(Qn||xo&&Qr&&In==="combobox")&&(Qr=!1);var so=xo?!1:Qr,Yn=pe.useCallback(function(gr){var ar=gr!==void 0?gr:!Qr;Qn||(zi(ar),Qr!==ar&&(qn==null||qn(ar)))},[Qn,Qr,zi,qn]),rr=pe.useMemo(function(){return(xr||[]).some(function(gr){return[`
`,`\r
`].includes(gr)})},[xr]),$n=pe.useContext(ue)||{},tr=$n.maxCount,kr=$n.rawValues,Ir=function(ar,ci,di){if(!(Jt&&pn(tr)&&(kr==null?void 0:kr.size)>=tr)){var Yr=!0,ni=ar;ir==null||ir(null);var Vi=ee(ar,xr,pn(tr)?tr-kr.size:void 0),Wi=di?null:Vi;return In!=="combobox"&&Wi&&(ni="",Pr==null||Pr(Wi),Yn(!1),Yr=!1),hr&&wr!==ni&&hr(ni,{source:ci?"typing":"effect"}),Yr}},Gi=function(ar){!ar||!ar.trim()||hr(ar,{source:"submit"})};pe.useEffect(function(){!Qr&&!Jt&&In!=="combobox"&&Ir("",!1,!1)},[Qr]),pe.useEffect(function(){lo&&Qn&&zi(!1),Qn&&!ei.current&&vi(!1)},[Qn]);var gi=pt(),ui=(0,ve.Z)(gi,2),Kr=ui[0],Hi=ui[1],Qi=pe.useRef(!1),Li=function(ar){var ci=Kr(),di=ar.key,Yr=di==="Enter";if(Yr&&(In!=="combobox"&&ar.preventDefault(),Qr||Yn(!0)),Hi(!!wr),di==="Backspace"&&!ci&&Jt&&!wr&&jt.length){for(var ni=(0,et.Z)(jt),Vi=null,Wi=ni.length-1;Wi>=0;Wi-=1){var ro=ni[Wi];if(!ro.disabled){ni.splice(Wi,1),Vi=ro;break}}Vi&&vt(ni,{type:"remove",values:[Vi]})}for(var Ti=arguments.length,Pi=new Array(Ti>1?Ti-1:0),Ui=1;Ui<Ti;Ui++)Pi[Ui-1]=arguments[Ui];if(Qr&&(!Yr||!Qi.current)){var co;Yr&&(Qi.current=!0),(co=_r.current)===null||co===void 0||co.onKeyDown.apply(co,[ar].concat(Pi))}Kn==null||Kn.apply(void 0,[ar].concat(Pi))},qi=function(ar){for(var ci=arguments.length,di=new Array(ci>1?ci-1:0),Yr=1;Yr<ci;Yr++)di[Yr-1]=arguments[Yr];if(Qr){var ni;(ni=_r.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[ar].concat(di))}ar.key==="Enter"&&(Qi.current=!1),wn==null||wn.apply(void 0,[ar].concat(di))},no=function(ar){var ci=jt.filter(function(di){return di!==ar});vt(ci,{type:"remove",values:[ar]})},ji=function(){Qi.current=!1},Po=pe.useRef(!1),ja=function(){vi(!0),Qn||(an&&!Po.current&&an.apply(void 0,arguments),Qt.includes("focus")&&Yn(!0)),Po.current=!0},ya=function(){ei.current=!0,vi(!1,function(){Po.current=!1,ei.current=!1,Yn(!1)}),!Qn&&(wr&&(In==="tags"?hr(wr,{source:"submit"}):In==="multiple"&&hr("",{source:"blur"})),On&&On.apply(void 0,arguments))},$i=[];pe.useEffect(function(){return function(){$i.forEach(function(gr){return clearTimeout(gr)}),$i.splice(0,$i.length)}},[]);var uo=function(ar){var ci,di=ar.target,Yr=(ci=Zr.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Yr&&Yr.contains(di)){var ni=setTimeout(function(){var Ti=$i.indexOf(ni);if(Ti!==-1&&$i.splice(Ti,1),Xi(),!cr&&!Yr.contains(document.activeElement)){var Pi;(Pi=Ar.current)===null||Pi===void 0||Pi.focus()}});$i.push(ni)}for(var Vi=arguments.length,Wi=new Array(Vi>1?Vi-1:0),ro=1;ro<Vi;ro++)Wi[ro-1]=arguments[ro];vr==null||vr.apply(void 0,[ar].concat(Wi))},Zi=pe.useState({}),ba=(0,ve.Z)(Zi,2),xa=ba[1];function Va(){xa({})}var wa;ti&&(wa=function(ar){Yn(ar)}),Ie(function(){var gr;return[Dr.current,(gr=Zr.current)===null||gr===void 0?void 0:gr.getPopupElement()]},so,Yn,!!ti);var Ua=pe.useMemo(function(){return(0,We.Z)((0,We.Z)({},we),{},{notFoundContent:yn,open:Qr,triggerOpen:so,id:bt,showSearch:xn,multiple:Jt,toggleOpen:Yn})},[we,yn,so,Qr,bt,xn,Jt,Yn]),Ko=!!lr||er,Yo;Ko&&(Yo=pe.createElement(Ee,{className:xe()("".concat(Ae,"-arrow"),(0,Le.Z)({},"".concat(Ae,"-arrow-loading"),er)),customizeIcon:lr,customizeIconProps:{loading:er,searchValue:wr,open:Qr,focused:xi,showSearch:xn}}));var wo=function(){var ar;mn==null||mn(),(ar=Ar.current)===null||ar===void 0||ar.focus(),vt([],{type:"clear",values:jt}),Ir("",!1,!1)},Xo=dt(Ae,wo,jt,pr,sr,Qn,wr,In),Ca=Xo.allowClear,Jo=Xo.clearIcon,Ao=pe.createElement(or,{ref:_r}),Sa=xe()(Ae,ft,(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat(Ae,"-focused"),xi),"".concat(Ae,"-multiple"),Jt),"".concat(Ae,"-single"),!Jt),"".concat(Ae,"-allow-clear"),pr),"".concat(Ae,"-show-arrow"),Ko),"".concat(Ae,"-disabled"),Qn),"".concat(Ae,"-loading"),er),"".concat(Ae,"-open"),Qr),"".concat(Ae,"-customize-input"),to),"".concat(Ae,"-show-search"),xn)),No=pe.createElement(xt,{ref:Zr,disabled:Qn,prefixCls:Ae,visible:so,popupElement:Ao,animation:ur,transitionName:Br,dropdownStyle:Vr,dropdownClassName:Jr,direction:ln,dropdownMatchSelectWidth:Tr,dropdownRender:Hr,dropdownAlign:Rr,placement:zr,builtinPlacements:ii,getPopupContainer:Fr,empty:qe,getTriggerDOMNode:function(ar){return Mr.current||ar},onPopupVisibleChange:wa,onPopupMouseEnter:Va},ti?pe.cloneElement(ti,{ref:Bi}):pe.createElement(lt,(0,ie.Z)({},we,{domRef:Mr,prefixCls:Ae,inputElement:to,ref:Ar,id:bt,prefix:Sr,showSearch:xn,autoClearSearchValue:Cr,mode:In,activeDescendantId:yr,tagRender:Kt,values:jt,open:Qr,onToggleOpen:Yn,activeValue:dr,searchValue:wr,onSearch:Ir,onSearchSubmit:Gi,onRemove:no,tokenWithEnter:rr,onInputBlur:ji}))),wi;return ti?wi=No:wi=pe.createElement("div",(0,ie.Z)({className:Sa},En,{ref:Dr,onMouseDown:uo,onKeyDown:Li,onKeyUp:qi,onFocus:ja,onBlur:ya}),pe.createElement(ne,{visible:xi&&!Qr,values:jt}),No,Yo,Ca&&Jo),pe.createElement(ht.Provider,{value:Ua},wi)}),ge=Ye,Mt=function(){return null};Mt.isSelectOptGroup=!0;var ct=Mt,Ct=function(){return null};Ct.isSelectOption=!0;var Ht=Ct,dn=de(80547),zt=de(2738),bn=de(48911);function Nn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Tn=["disabled","title","children","style","className"];function jn(we){return typeof we=="string"||typeof we=="number"}var zn=function(Se,It){var bt=Lt(),Ae=bt.prefixCls,ft=bt.id,Tt=bt.open,Kt=bt.multiple,ln=bt.mode,kt=bt.searchValue,jt=bt.toggleOpen,vt=bt.notFoundContent,qe=bt.onPopupScroll,Gt=pe.useContext(ue),yn=Gt.maxCount,mn=Gt.flattenOptions,In=Gt.onActiveValue,Qn=Gt.defaultActiveFirstOption,er=Gt.onSelect,kn=Gt.menuItemSelectedIcon,$t=Gt.rawValues,Bn=Gt.fieldNames,hn=Gt.virtual,qn=Gt.direction,dr=Gt.listHeight,ir=Gt.listItemHeight,yr=Gt.optionRender,br="".concat(Ae,"-item"),Cr=(0,dn.Z)(function(){return mn},[Tt,mn],function(nr,Qt){return Qt[0]&&nr[1]!==Qt[1]}),hr=pe.useRef(null),Pr=pe.useMemo(function(){return Kt&&pn(yn)&&($t==null?void 0:$t.size)>=yn},[Kt,yn,$t==null?void 0:$t.size]),xr=function(Qt){Qt.preventDefault()},pr=function(Qt){var an;(an=hr.current)===null||an===void 0||an.scrollTo(typeof Qt=="number"?{index:Qt}:Qt)},Sr=pe.useCallback(function(nr){return ln==="combobox"?!1:$t.has(nr)},[ln,(0,et.Z)($t).toString(),$t.size]),lr=function(Qt){for(var an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,On=Cr.length,wn=0;wn<On;wn+=1){var Kn=(Qt+wn*an+On)%On,vr=Cr[Kn]||{},rn=vr.group,Jt=vr.data;if(!rn&&!(Jt!=null&&Jt.disabled)&&(Sr(Jt.value)||!Pr))return Kn}return-1},sr=pe.useState(function(){return lr(0)}),or=(0,ve.Z)(sr,2),ur=or[0],Br=or[1],Vr=function(Qt){var an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Br(Qt);var On={source:an?"keyboard":"mouse"},wn=Cr[Qt];if(!wn){In(null,-1,On);return}In(wn.value,Qt,On)};(0,pe.useEffect)(function(){Vr(Qn!==!1?lr(0):-1)},[Cr.length,kt]);var Jr=pe.useCallback(function(nr){return ln==="combobox"?String(nr).toLowerCase()===kt.toLowerCase():$t.has(nr)},[ln,kt,(0,et.Z)($t).toString(),$t.size]);(0,pe.useEffect)(function(){var nr=setTimeout(function(){if(!Kt&&Tt&&$t.size===1){var an=Array.from($t)[0],On=Cr.findIndex(function(wn){var Kn=wn.data;return kt?String(Kn.value).startsWith(kt):Kn.value===an});On!==-1&&(Vr(On),pr(On))}});if(Tt){var Qt;(Qt=hr.current)===null||Qt===void 0||Qt.scrollTo(void 0)}return function(){return clearTimeout(nr)}},[Tt,kt]);var Tr=function(Qt){Qt!==void 0&&er(Qt,{selected:!$t.has(Qt)}),Kt||jt(!1)};if(pe.useImperativeHandle(It,function(){return{onKeyDown:function(Qt){var an=Qt.which,On=Qt.ctrlKey;switch(an){case mt.Z.N:case mt.Z.P:case mt.Z.UP:case mt.Z.DOWN:{var wn=0;if(an===mt.Z.UP?wn=-1:an===mt.Z.DOWN?wn=1:Nn()&&On&&(an===mt.Z.N?wn=1:an===mt.Z.P&&(wn=-1)),wn!==0){var Kn=lr(ur+wn,wn);pr(Kn),Vr(Kn,!0)}break}case mt.Z.TAB:case mt.Z.ENTER:{var vr,rn=Cr[ur];rn&&!(rn!=null&&(vr=rn.data)!==null&&vr!==void 0&&vr.disabled)&&!Pr?Tr(rn.value):Tr(void 0),Tt&&Qt.preventDefault();break}case mt.Z.ESC:jt(!1),Tt&&Qt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Qt){pr(Qt)}}}),Cr.length===0)return pe.createElement("div",{role:"listbox",id:"".concat(ft,"_list"),className:"".concat(br,"-empty"),onMouseDown:xr},vt);var Hr=Object.keys(Bn).map(function(nr){return Bn[nr]}),Rr=function(Qt){return Qt.label};function zr(nr,Qt){var an=nr.group;return{role:an?"presentation":"option",id:"".concat(ft,"_list_").concat(Qt)}}var ii=function(Qt){var an=Cr[Qt];if(!an)return null;var On=an.data||{},wn=On.value,Kn=an.group,vr=(0,Oe.Z)(On,!0),rn=Rr(an);return an?pe.createElement("div",(0,ie.Z)({"aria-label":typeof rn=="string"&&!Kn?rn:null},vr,{key:Qt},zr(an,Qt),{"aria-selected":Jr(wn)}),wn):null},Fr={role:"listbox",id:"".concat(ft,"_list")};return pe.createElement(pe.Fragment,null,hn&&pe.createElement("div",(0,ie.Z)({},Fr,{style:{height:0,width:0,overflow:"hidden"}}),ii(ur-1),ii(ur),ii(ur+1)),pe.createElement(bn.Z,{itemKey:"key",ref:hr,data:Cr,height:dr,itemHeight:ir,fullHeight:!1,onMouseDown:xr,onScroll:qe,virtual:hn,direction:qn,innerProps:hn?null:Fr},function(nr,Qt){var an=nr.group,On=nr.groupOption,wn=nr.data,Kn=nr.label,vr=nr.value,rn=wn.key;if(an){var Jt,xn=(Jt=wn.title)!==null&&Jt!==void 0?Jt:jn(Kn)?Kn.toString():void 0;return pe.createElement("div",{className:xe()(br,"".concat(br,"-group"),wn.className),title:xn},Kn!==void 0?Kn:rn)}var En=wn.disabled,Xn=wn.title,mr=wn.children,cr=wn.style,Er=wn.className,Dr=(0,ze.Z)(wn,Tn),Mr=(0,zt.Z)(Dr,Hr),Zr=Sr(vr),Ar=En||!Zr&&Pr,_r="".concat(br,"-option"),ei=xe()(br,_r,Er,(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat(_r,"-grouped"),On),"".concat(_r,"-active"),ur===Qt&&!Ar),"".concat(_r,"-disabled"),Ar),"".concat(_r,"-selected"),Zr)),Mi=Rr(nr),Fi=!kn||typeof kn=="function"||Zr,xi=typeof Mi=="number"?Mi:Mi||vr,vi=jn(xi)?xi.toString():void 0;return Xn!==void 0&&(vi=Xn),pe.createElement("div",(0,ie.Z)({},(0,Oe.Z)(Mr),hn?{}:zr(nr,Qt),{"aria-selected":Jr(vr),className:ei,title:vi,onMouseMove:function(){ur===Qt||Ar||Vr(Qt)},onClick:function(){Ar||Tr(vr)},style:cr}),pe.createElement("div",{className:"".concat(_r,"-content")},typeof yr=="function"?yr(nr,{index:Qt}):xi),pe.isValidElement(kn)||Zr,Fi&&pe.createElement(Ee,{className:"".concat(br,"-option-state"),customizeIcon:kn,customizeIconProps:{value:vr,disabled:Ar,isSelected:Zr}},Zr?"\u2713":null))}))},Hn=pe.forwardRef(zn),Un=Hn,Rn=function(we,Se){var It=pe.useRef({values:new Map,options:new Map}),bt=pe.useMemo(function(){var ft=It.current,Tt=ft.values,Kt=ft.options,ln=we.map(function(vt){if(vt.label===void 0){var qe;return(0,We.Z)((0,We.Z)({},vt),{},{label:(qe=Tt.get(vt.value))===null||qe===void 0?void 0:qe.label})}return vt}),kt=new Map,jt=new Map;return ln.forEach(function(vt){kt.set(vt.value,vt),jt.set(vt.value,Se.get(vt.value)||Kt.get(vt.value))}),It.current.values=kt,It.current.options=jt,ln},[we,Se]),Ae=pe.useCallback(function(ft){return Se.get(ft)||It.current.options.get(ft)},[Se]);return[bt,Ae]};function Wn(we,Se){return Ot(we).join("").toUpperCase().includes(Se)}var vn=function(we,Se,It,bt,Ae){return pe.useMemo(function(){if(!It||bt===!1)return we;var ft=Se.options,Tt=Se.label,Kt=Se.value,ln=[],kt=typeof bt=="function",jt=It.toUpperCase(),vt=kt?bt:function(Gt,yn){return Ae?Wn(yn[Ae],jt):yn[ft]?Wn(yn[Tt!=="children"?Tt:"label"],jt):Wn(yn[Kt],jt)},qe=kt?function(Gt){return te(Gt)}:function(Gt){return Gt};return we.forEach(function(Gt){if(Gt[ft]){var yn=vt(It,qe(Gt));if(yn)ln.push(Gt);else{var mn=Gt[ft].filter(function(In){return vt(It,qe(In))});mn.length&&ln.push((0,We.Z)((0,We.Z)({},Gt),{},(0,Le.Z)({},ft,mn)))}return}vt(It,qe(Gt))&&ln.push(Gt)}),ln},[we,bt,Ae,It,Se])},tt=de(6551),nt=de(11592),Xe=["children","value"],Rt=["children"];function St(we){var Se=we,It=Se.key,bt=Se.props,Ae=bt.children,ft=bt.value,Tt=(0,ze.Z)(bt,Xe);return(0,We.Z)({key:It,value:ft!==void 0?ft:It,children:Ae},Tt)}function Zt(we){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,nt.Z)(we).map(function(It,bt){if(!pe.isValidElement(It)||!It.type)return null;var Ae=It,ft=Ae.type.isSelectOptGroup,Tt=Ae.key,Kt=Ae.props,ln=Kt.children,kt=(0,ze.Z)(Kt,Rt);return Se||!ft?St(It):(0,We.Z)((0,We.Z)({key:"__RC_SELECT_GRP__".concat(Tt===null?bt:Tt,"__"),label:Tt},kt),{},{options:Zt(ln)})}).filter(function(It){return It})}var on=function(Se,It,bt,Ae,ft){return pe.useMemo(function(){var Tt=Se,Kt=!Se;Kt&&(Tt=Zt(It));var ln=new Map,kt=new Map,jt=function(Gt,yn,mn){mn&&typeof mn=="string"&&Gt.set(yn[mn],yn)},vt=function qe(Gt){for(var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mn=0;mn<Gt.length;mn+=1){var In=Gt[mn];!In[bt.options]||yn?(ln.set(In[bt.value],In),jt(kt,In,bt.label),jt(kt,In,Ae),jt(kt,In,ft)):qe(In[bt.options],!0)}};return vt(Tt),{options:Tt,valueOptions:ln,labelOptions:kt}},[Se,It,bt,Ae,ft])},Ut=on;function Xt(we){var Se=pe.useRef();Se.current=we;var It=pe.useCallback(function(){return Se.current.apply(Se,arguments)},[]);return It}function gn(we){var Se=we.mode,It=we.options,bt=we.children,Ae=we.backfill,ft=we.allowClear,Tt=we.placeholder,Kt=we.getInputElement,ln=we.showSearch,kt=we.onSearch,jt=we.defaultOpen,vt=we.autoFocus,qe=we.labelInValue,Gt=we.value,yn=we.inputValue,mn=we.optionLabelProp,In=isMultiple(Se),Qn=ln!==void 0?ln:In||Se==="combobox",er=It||convertChildrenToData(bt);if(warning(Se!=="tags"||er.every(function(hn){return!hn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Se==="tags"||Se==="combobox"){var kn=er.some(function(hn){return hn.options?hn.options.some(function(qn){return typeof("value"in qn?qn.value:qn.key)=="number"}):typeof("value"in hn?hn.value:hn.key)=="number"});warning(!kn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Se!=="combobox"||!mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Se==="combobox"||!Ae,"`backfill` only works with `combobox` mode."),warning(Se==="combobox"||!Kt,"`getInputElement` only work with `combobox` mode."),noteOnce(Se!=="combobox"||!Kt||!ft||!Tt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),kt&&!Qn&&Se!=="combobox"&&Se!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!jt||vt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Gt!=null){var $t=toArray(Gt);warning(!qe||$t.every(function(hn){return _typeof(hn)==="object"&&("key"in hn||"value"in hn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!In||Array.isArray(Gt),"`value` should be array when `mode` is `multiple` or `tags`")}if(bt){var Bn=null;toNodeArray(bt).some(function(hn){if(!React.isValidElement(hn)||!hn.type)return!1;var qn=hn,dr=qn.type;if(dr.isSelectOption)return!1;if(dr.isSelectOptGroup){var ir=toNodeArray(hn.props.children).every(function(yr){return!React.isValidElement(yr)||!hn.type||yr.type.isSelectOption?!0:(Bn=yr.type,!1)});return!ir}return Bn=dr,!0}),Bn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Bn.displayName||Bn.name||Bn,"`.")),warning(yn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function _n(we,Se){if(we){var It=function bt(Ae){for(var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Tt=0;Tt<Ae.length;Tt++){var Kt=Ae[Tt];if(Kt[Se==null?void 0:Se.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!ft&&Array.isArray(Kt[Se==null?void 0:Se.options])&&bt(Kt[Se==null?void 0:Se.options],!0))break}};It(we)}}var Ln=null,fn=["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"],Zn=["inputValue"];function ot(we){return!we||(0,Te.Z)(we)!=="object"}var Je=pe.forwardRef(function(we,Se){var It=we.id,bt=we.mode,Ae=we.prefixCls,ft=Ae===void 0?"rc-select":Ae,Tt=we.backfill,Kt=we.fieldNames,ln=we.inputValue,kt=we.searchValue,jt=we.onSearch,vt=we.autoClearSearchValue,qe=vt===void 0?!0:vt,Gt=we.onSelect,yn=we.onDeselect,mn=we.dropdownMatchSelectWidth,In=mn===void 0?!0:mn,Qn=we.filterOption,er=we.filterSort,kn=we.optionFilterProp,$t=we.optionLabelProp,Bn=we.options,hn=we.optionRender,qn=we.children,dr=we.defaultActiveFirstOption,ir=we.menuItemSelectedIcon,yr=we.virtual,br=we.direction,Cr=we.listHeight,hr=Cr===void 0?200:Cr,Pr=we.listItemHeight,xr=Pr===void 0?20:Pr,pr=we.labelRender,Sr=we.value,lr=we.defaultValue,sr=we.labelInValue,or=we.onChange,ur=we.maxCount,Br=(0,ze.Z)(we,fn),Vr=(0,tt.ZP)(It),Jr=Ve(bt),Tr=!!(!Bn&&qn),Hr=pe.useMemo(function(){return Qn===void 0&&bt==="combobox"?!1:Qn},[Qn,bt]),Rr=pe.useMemo(function(){return tn(Kt,Tr)},[JSON.stringify(Kt),Tr]),zr=(0,Ge.Z)("",{value:kt!==void 0?kt:ln,postState:function(rr){return rr||""}}),ii=(0,ve.Z)(zr,2),Fr=ii[0],nr=ii[1],Qt=Ut(Bn,qn,Rr,kn,$t),an=Qt.valueOptions,On=Qt.labelOptions,wn=Qt.options,Kn=pe.useCallback(function(Yn){var rr=Ot(Yn);return rr.map(function($n){var tr,kr,Ir,Gi,gi;if(ot($n))tr=$n;else{var ui;Ir=$n.key,kr=$n.label,tr=(ui=$n.value)!==null&&ui!==void 0?ui:Ir}var Kr=an.get(tr);if(Kr){var Hi;if(kr===void 0&&(kr=Kr==null?void 0:Kr[$t||Rr.label]),Ir===void 0&&(Ir=(Hi=Kr==null?void 0:Kr.key)!==null&&Hi!==void 0?Hi:tr),Gi=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Qi}return{label:kr,value:tr,key:Ir,disabled:Gi,title:gi}})},[Rr,$t,an]),vr=(0,Ge.Z)(lr,{value:Sr}),rn=(0,ve.Z)(vr,2),Jt=rn[0],xn=rn[1],En=pe.useMemo(function(){var Yn,rr=Jr&&Jt===null?[]:Jt,$n=Kn(rr);return bt==="combobox"&&he((Yn=$n[0])===null||Yn===void 0?void 0:Yn.value)?[]:$n},[Jt,Kn,bt,Jr]),Xn=Rn(En,an),mr=(0,ve.Z)(Xn,2),cr=mr[0],Er=mr[1],Dr=pe.useMemo(function(){if(!bt&&cr.length===1){var Yn=cr[0];if(Yn.value===null&&(Yn.label===null||Yn.label===void 0))return[]}return cr.map(function(rr){var $n;return(0,We.Z)((0,We.Z)({},rr),{},{label:($n=typeof pr=="function"?pr(rr):rr.label)!==null&&$n!==void 0?$n:rr.value})})},[bt,cr,pr]),Mr=pe.useMemo(function(){return new Set(cr.map(function(Yn){return Yn.value}))},[cr]);pe.useEffect(function(){if(bt==="combobox"){var Yn,rr=(Yn=cr[0])===null||Yn===void 0?void 0:Yn.value;nr(me(rr)?String(rr):"")}},[cr]);var Zr=Xt(function(Yn,rr){var $n=rr!=null?rr:Yn;return(0,Le.Z)((0,Le.Z)({},Rr.value,Yn),Rr.label,$n)}),Ar=pe.useMemo(function(){if(bt!=="tags")return wn;var Yn=(0,et.Z)(wn),rr=function(tr){return an.has(tr)};return(0,et.Z)(cr).sort(function($n,tr){return $n.value<tr.value?-1:1}).forEach(function($n){var tr=$n.value;rr(tr)||Yn.push(Zr(tr,$n.label))}),Yn},[Zr,wn,an,cr,bt]),_r=vn(Ar,Rr,Fr,Hr,kn),ei=pe.useMemo(function(){return bt!=="tags"||!Fr||_r.some(function(Yn){return Yn[kn||"value"]===Fr})||_r.some(function(Yn){return Yn[Rr.value]===Fr})?_r:[Zr(Fr)].concat((0,et.Z)(_r))},[Zr,kn,bt,_r,Fr,Rr]),Mi=function Yn(rr){var $n=(0,et.Z)(rr).sort(function(tr,kr){return er(tr,kr,{searchValue:Fr})});return $n.map(function(tr){return Array.isArray(tr.options)?(0,We.Z)((0,We.Z)({},tr),{},{options:tr.options.length>0?Yn(tr.options):tr.options}):tr})},Fi=pe.useMemo(function(){return er?Mi(ei):ei},[ei,er,Fr]),xi=pe.useMemo(function(){return le(Fi,{fieldNames:Rr,childrenAsData:Tr})},[Fi,Rr,Tr]),vi=function(rr){var $n=Kn(rr);if(xn($n),or&&($n.length!==cr.length||$n.some(function(Ir,Gi){var gi;return((gi=cr[Gi])===null||gi===void 0?void 0:gi.value)!==(Ir==null?void 0:Ir.value)}))){var tr=sr?$n:$n.map(function(Ir){return Ir.value}),kr=$n.map(function(Ir){return te(Er(Ir.value))});or(Jr?tr:tr[0],Jr?kr:kr[0])}},Xi=pe.useState(null),wr=(0,ve.Z)(Xi,2),to=wr[0],ti=wr[1],Bi=pe.useState(0),ao=(0,ve.Z)(Bi,2),Ji=ao[0],mi=ao[1],Ri=dr!==void 0?dr:bt!=="combobox",Wr=pe.useCallback(function(Yn,rr){var $n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},tr=$n.source,kr=tr===void 0?"keyboard":tr;mi(rr),Tt&&bt==="combobox"&&Yn!==null&&kr==="keyboard"&&ti(String(Yn))},[Tt,bt]),_i=function(rr,$n,tr){var kr=function(){var no,ji=Er(rr);return[sr?{label:ji==null?void 0:ji[Rr.label],value:rr,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:rr}:rr,te(ji)]};if($n&&Gt){var Ir=kr(),Gi=(0,ve.Z)(Ir,2),gi=Gi[0],ui=Gi[1];Gt(gi,ui)}else if(!$n&&yn&&tr!=="clear"){var Kr=kr(),Hi=(0,ve.Z)(Kr,2),Qi=Hi[0],Li=Hi[1];yn(Qi,Li)}},lo=Xt(function(Yn,rr){var $n,tr=Jr?rr.selected:!0;tr?$n=Jr?[].concat((0,et.Z)(cr),[Yn]):[Yn]:$n=cr.filter(function(kr){return kr.value!==Yn}),vi($n),_i(Yn,tr),bt==="combobox"?ti(""):(!Ve||qe)&&(nr(""),ti(""))}),zi=function(rr,$n){vi(rr);var tr=$n.type,kr=$n.values;(tr==="remove"||tr==="clear")&&kr.forEach(function(Ir){_i(Ir.value,!1,tr)})},Qr=function(rr,$n){if(nr(rr),ti(null),$n.source==="submit"){var tr=(rr||"").trim();if(tr){var kr=Array.from(new Set([].concat((0,et.Z)(Mr),[tr])));vi(kr),_i(tr,!0),nr("")}return}$n.source!=="blur"&&(bt==="combobox"&&vi(rr),jt==null||jt(rr))},xo=function(rr){var $n=rr;bt!=="tags"&&($n=rr.map(function(kr){var Ir=On.get(kr);return Ir==null?void 0:Ir.value}).filter(function(kr){return kr!==void 0}));var tr=Array.from(new Set([].concat((0,et.Z)(Mr),(0,et.Z)($n))));vi(tr),tr.forEach(function(kr){_i(kr,!0)})},so=pe.useMemo(function(){var Yn=yr!==!1&&In!==!1;return(0,We.Z)((0,We.Z)({},Qt),{},{flattenOptions:xi,onActiveValue:Wr,defaultActiveFirstOption:Ri,onSelect:lo,menuItemSelectedIcon:ir,rawValues:Mr,fieldNames:Rr,virtual:Yn,direction:br,listHeight:hr,listItemHeight:xr,childrenAsData:Tr,maxCount:ur,optionRender:hn})},[ur,Qt,xi,Wr,Ri,lo,ir,Mr,Rr,yr,In,br,hr,xr,Tr,hn]);return pe.createElement(ue.Provider,{value:so},pe.createElement(ge,(0,ie.Z)({},Br,{id:Vr,prefixCls:ft,ref:Se,omitDomProps:Zn,mode:bt,displayValues:Dr,onDisplayValuesChange:zi,direction:br,searchValue:Fr,onSearch:Qr,autoClearSearchValue:qe,onSearchSplit:xo,dropdownMatchSelectWidth:In,OptionList:Un,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Ft=Je;Ft.Option=Ht,Ft.OptGroup=ct;var Mn=Ft,Gn=Mn},63158:function(Yt,en,de){"use strict";var ie=de(54476),et=de(20068),Le=de(42978),We=de(75931),ve=de(59301),ze=de(92310),Te=de.n(ze),Ge=de(18929),Ce=de(10228),pe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ke=ve.forwardRef(function(xe,wt){var je,Re=xe.prefixCls,He=Re===void 0?"rc-switch":Re,Ee=xe.className,dt=xe.checked,ht=xe.defaultChecked,Lt=xe.disabled,Et=xe.loadingIcon,pt=xe.checkedChildren,Ie=xe.unCheckedChildren,mt=xe.onClick,qt=xe.onChange,Oe=xe.onKeyDown,Qe=(0,We.Z)(xe,pe),Pt=(0,Ge.Z)(!1,{value:dt,defaultValue:ht}),Pe=(0,Le.Z)(Pt,2),rt=Pe[0],Ze=Pe[1];function gt(nn,me){var he=rt;return Lt||(he=nn,Ze(he),qt==null||qt(he,me)),he}function Dn(nn){nn.which===Ce.Z.LEFT?gt(!1,nn):nn.which===Ce.Z.RIGHT&&gt(!0,nn),Oe==null||Oe(nn)}function Ot(nn){var me=gt(!rt,nn);mt==null||mt(me,nn)}var Pn=Te()(He,Ee,(je={},(0,et.Z)(je,"".concat(He,"-checked"),rt),(0,et.Z)(je,"".concat(He,"-disabled"),Lt),je));return ve.createElement("button",(0,ie.Z)({},Qe,{type:"button",role:"switch","aria-checked":rt,disabled:Lt,className:Pn,ref:wt,onKeyDown:Dn,onClick:Ot}),Et,ve.createElement("span",{className:"".concat(He,"-inner")},ve.createElement("span",{className:"".concat(He,"-inner-checked")},pt),ve.createElement("span",{className:"".concat(He,"-inner-unchecked")},Ie)))});ke.displayName="Switch",en.Z=ke},22711:function(Yt,en,de){"use strict";de.r(en),de.d(en,{ResizableTextArea:function(){return Pe},default:function(){return Dn}});var ie=de(54476),et=de(20068),Le=de(33885),We=de(94480),ve=de(42978),ze=de(75931),Te=de(92310),Ge=de.n(Te),Ce=de(36901),pe=de(66003),ke=de(30292),xe=de(18929),wt=de(59301),je=de(76190),Re=de(29301),He=de(34280),Ee=de(16089),dt=`
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;
`,ht=["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"],Lt={},Et;function pt(Ot){var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=Ot.getAttribute("id")||Ot.getAttribute("data-reactid")||Ot.getAttribute("name");if(Pn&&Lt[nn])return Lt[nn];var me=window.getComputedStyle(Ot),he=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),Dt=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),un=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),_t=ht.map(function(at){return"".concat(at,":").concat(me.getPropertyValue(at))}).join(";"),Fe={sizingStyle:_t,paddingSize:Dt,borderSize:un,boxSizing:he};return Pn&&nn&&(Lt[nn]=Fe),Fe}function Ie(Ot){var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Et||(Et=document.createElement("textarea"),Et.setAttribute("tab-index","-1"),Et.setAttribute("aria-hidden","true"),Et.setAttribute("name","hiddenTextarea"),document.body.appendChild(Et)),Ot.getAttribute("wrap")?Et.setAttribute("wrap",Ot.getAttribute("wrap")):Et.removeAttribute("wrap");var he=pt(Ot,Pn),Dt=he.paddingSize,un=he.borderSize,_t=he.boxSizing,Fe=he.sizingStyle;Et.setAttribute("style","".concat(Fe,";").concat(dt)),Et.value=Ot.value||Ot.placeholder||"";var at=void 0,st=void 0,cn,Bt=Et.scrollHeight;if(_t==="border-box"?Bt+=un:_t==="content-box"&&(Bt-=Dt),nn!==null||me!==null){Et.value=" ";var Ne=Et.scrollHeight-Dt;nn!==null&&(at=Ne*nn,_t==="border-box"&&(at=at+Dt+un),Bt=Math.max(at,Bt)),me!==null&&(st=Ne*me,_t==="border-box"&&(st=st+Dt+un),cn=Bt>st?"":"hidden",Bt=Math.min(st,Bt))}var ye={height:Bt,overflowY:cn,resize:"none"};return at&&(ye.minHeight=at),st&&(ye.maxHeight=st),ye}var mt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],qt=0,Oe=1,Qe=2,Pt=wt.forwardRef(function(Ot,Pn){var nn=Ot,me=nn.prefixCls,he=nn.defaultValue,Dt=nn.value,un=nn.autoSize,_t=nn.onResize,Fe=nn.className,at=nn.style,st=nn.disabled,cn=nn.onChange,Bt=nn.onInternalAutoSize,Ne=(0,ze.Z)(nn,mt),ye=(0,xe.Z)(he,{value:Dt,postState:function(Ht){return Ht!=null?Ht:""}}),_e=(0,ve.Z)(ye,2),lt=_e[0],Me=_e[1],Ue=function(Ht){Me(Ht.target.value),cn==null||cn(Ht)},it=wt.useRef();wt.useImperativeHandle(Pn,function(){return{textArea:it.current}});var ut=wt.useMemo(function(){return un&&(0,je.Z)(un)==="object"?[un.minRows,un.maxRows]:[]},[un]),yt=(0,ve.Z)(ut,2),xt=yt[0],At=yt[1],Wt=!!un,pn=function(){try{if(document.activeElement===it.current){var Ht=it.current,dn=Ht.selectionStart,zt=Ht.selectionEnd,bn=Ht.scrollTop;it.current.setSelectionRange(dn,zt),it.current.scrollTop=bn}}catch(Nn){}},tn=wt.useState(Qe),le=(0,ve.Z)(tn,2),te=le[0],ee=le[1],oe=wt.useState(),ue=(0,ve.Z)(oe,2),ne=ue[0],ce=ue[1],Be=function(){ee(qt)};(0,He.Z)(function(){Wt&&Be()},[Dt,xt,At,Wt]),(0,He.Z)(function(){if(te===qt)ee(Oe);else if(te===Oe){var Ct=Ie(it.current,!1,xt,At);ee(Qe),ce(Ct)}else pn()},[te]);var Ve=wt.useRef(),Ye=function(){Ee.Z.cancel(Ve.current)},ge=function(Ht){te===Qe&&(_t==null||_t(Ht),un&&(Ye(),Ve.current=(0,Ee.Z)(function(){Be()})))};wt.useEffect(function(){return Ye},[]);var Mt=Wt?ne:null,ct=(0,Le.Z)((0,Le.Z)({},at),Mt);return(te===qt||te===Oe)&&(ct.overflowY="hidden",ct.overflowX="hidden"),wt.createElement(Re.Z,{onResize:ge,disabled:!(un||_t)},wt.createElement("textarea",(0,ie.Z)({},Ne,{ref:it,style:ct,className:Ge()(me,Fe,(0,et.Z)({},"".concat(me,"-disabled"),st)),disabled:st,value:lt,onChange:Ue})))}),Pe=Pt,rt=["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"],Ze=wt.forwardRef(function(Ot,Pn){var nn,me=Ot.defaultValue,he=Ot.value,Dt=Ot.onFocus,un=Ot.onBlur,_t=Ot.onChange,Fe=Ot.allowClear,at=Ot.maxLength,st=Ot.onCompositionStart,cn=Ot.onCompositionEnd,Bt=Ot.suffix,Ne=Ot.prefixCls,ye=Ne===void 0?"rc-textarea":Ne,_e=Ot.showCount,lt=Ot.count,Me=Ot.className,Ue=Ot.style,it=Ot.disabled,ut=Ot.hidden,yt=Ot.classNames,xt=Ot.styles,At=Ot.onResize,Wt=Ot.onClear,pn=Ot.onPressEnter,tn=Ot.readOnly,le=Ot.autoSize,te=Ot.onKeyDown,ee=(0,ze.Z)(Ot,rt),oe=(0,xe.Z)(me,{value:he,defaultValue:me}),ue=(0,ve.Z)(oe,2),ne=ue[0],ce=ue[1],Be=ne==null?"":String(ne),Ve=wt.useState(!1),Ye=(0,ve.Z)(Ve,2),ge=Ye[0],Mt=Ye[1],ct=wt.useRef(!1),Ct=wt.useState(null),Ht=(0,ve.Z)(Ct,2),dn=Ht[0],zt=Ht[1],bn=(0,wt.useRef)(null),Nn=(0,wt.useRef)(null),Tn=function(){var Ft;return(Ft=Nn.current)===null||Ft===void 0?void 0:Ft.textArea},jn=function(){Tn().focus()};(0,wt.useImperativeHandle)(Pn,function(){var Je;return{resizableTextArea:Nn.current,focus:jn,blur:function(){Tn().blur()},nativeElement:((Je=bn.current)===null||Je===void 0?void 0:Je.nativeElement)||Tn()}}),(0,wt.useEffect)(function(){Mt(function(Je){return!it&&Je})},[it]);var zn=wt.useState(null),Hn=(0,ve.Z)(zn,2),Un=Hn[0],Rn=Hn[1];wt.useEffect(function(){if(Un){var Je;(Je=Tn()).setSelectionRange.apply(Je,(0,We.Z)(Un))}},[Un]);var Wn=(0,pe.Z)(lt,_e),vn=(nn=Wn.max)!==null&&nn!==void 0?nn:at,tt=Number(vn)>0,nt=Wn.strategy(Be),Xe=!!vn&&nt>vn,Rt=function(Ft,Mn){var Gn=Mn;!ct.current&&Wn.exceedFormatter&&Wn.max&&Wn.strategy(Mn)>Wn.max&&(Gn=Wn.exceedFormatter(Mn,{max:Wn.max}),Mn!==Gn&&Rn([Tn().selectionStart||0,Tn().selectionEnd||0])),ce(Gn),(0,ke.rJ)(Ft.currentTarget,Ft,_t,Gn)},St=function(Ft){ct.current=!0,st==null||st(Ft)},Zt=function(Ft){ct.current=!1,Rt(Ft,Ft.currentTarget.value),cn==null||cn(Ft)},on=function(Ft){Rt(Ft,Ft.target.value)},Ut=function(Ft){Ft.key==="Enter"&&pn&&pn(Ft),te==null||te(Ft)},Xt=function(Ft){Mt(!0),Dt==null||Dt(Ft)},gn=function(Ft){Mt(!1),un==null||un(Ft)},_n=function(Ft){ce(""),jn(),(0,ke.rJ)(Tn(),Ft,_t)},Ln=Bt,fn;Wn.show&&(Wn.showFormatter?fn=Wn.showFormatter({value:Be,count:nt,maxLength:vn}):fn="".concat(nt).concat(tt?" / ".concat(vn):""),Ln=wt.createElement(wt.Fragment,null,Ln,wt.createElement("span",{className:Ge()("".concat(ye,"-data-count"),yt==null?void 0:yt.count),style:xt==null?void 0:xt.count},fn)));var Zn=function(Ft){var Mn;At==null||At(Ft),(Mn=Tn())!==null&&Mn!==void 0&&Mn.style.height&&zt(!0)},ot=!le&&!_e&&!Fe;return wt.createElement(Ce.BaseInput,{ref:bn,value:Be,allowClear:Fe,handleReset:_n,suffix:Ln,prefixCls:ye,classNames:(0,Le.Z)((0,Le.Z)({},yt),{},{affixWrapper:Ge()(yt==null?void 0:yt.affixWrapper,(0,et.Z)((0,et.Z)({},"".concat(ye,"-show-count"),_e),"".concat(ye,"-textarea-allow-clear"),Fe))}),disabled:it,focused:ge,className:Ge()(Me,Xe&&"".concat(ye,"-out-of-range")),style:(0,Le.Z)((0,Le.Z)({},Ue),dn&&!ot?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof fn=="string"?fn:void 0}},hidden:ut,readOnly:tn,onClear:Wt},wt.createElement(Pe,(0,ie.Z)({},ee,{autoSize:le,maxLength:at,onKeyDown:Ut,onChange:on,onFocus:Xt,onBlur:gn,onCompositionStart:St,onCompositionEnd:Zt,className:Ge()(yt==null?void 0:yt.textarea),style:(0,Le.Z)((0,Le.Z)({},xt==null?void 0:xt.textarea),{},{resize:Ue==null?void 0:Ue.resize}),disabled:it,prefixCls:ye,onResize:Zn,ref:Nn,readOnly:tn})))}),gt=Ze,Dn=gt},8224:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return et}});var ie=de(4676);function et(Le,We,ve,ze){var Te=ie.unstable_batchedUpdates?function(Ce){ie.unstable_batchedUpdates(ve,Ce)}:ve;return Le!=null&&Le.addEventListener&&Le.addEventListener(We,Te,ze),{remove:function(){Le!=null&&Le.removeEventListener&&Le.removeEventListener(We,Te,ze)}}}},48911:function(Yt,en,de){"use strict";de.d(en,{Z:function(){return lt}});var ie=de(54476),et=de(76190),Le=de(33885),We=de(20068),ve=de(42978),ze=de(75931),Te=de(92310),Ge=de.n(Te),Ce=de(29301),pe=de(70425),ke=de(34280),xe=de(59301),wt=de(4676),je=xe.forwardRef(function(Me,Ue){var it=Me.height,ut=Me.offsetY,yt=Me.offsetX,xt=Me.children,At=Me.prefixCls,Wt=Me.onInnerResize,pn=Me.innerProps,tn=Me.rtl,le=Me.extra,te={},ee={display:"flex",flexDirection:"column"};return ut!==void 0&&(te={height:it,position:"relative",overflow:"hidden"},ee=(0,Le.Z)((0,Le.Z)({},ee),{},(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({transform:"translateY(".concat(ut,"px)")},tn?"marginRight":"marginLeft",-yt),"position","absolute"),"left",0),"right",0),"top",0))),xe.createElement("div",{style:te},xe.createElement(Ce.Z,{onResize:function(ue){var ne=ue.offsetHeight;ne&&Wt&&Wt()}},xe.createElement("div",(0,ie.Z)({style:ee,className:Ge()((0,We.Z)({},"".concat(At,"-holder-inner"),At)),ref:Ue},pn),xt,le)))});je.displayName="Filler";var Re=je;function He(Me){var Ue=Me.children,it=Me.setRef,ut=xe.useCallback(function(yt){it(yt)},[]);return xe.cloneElement(Ue,{ref:ut})}function Ee(Me,Ue,it,ut,yt,xt,At,Wt){var pn=Wt.getKey;return Me.slice(Ue,it+1).map(function(tn,le){var te=Ue+le,ee=At(tn,te,{style:{width:ut},offsetX:yt}),oe=pn(tn);return xe.createElement(He,{key:oe,setRef:function(ne){return xt(tn,ne)}},ee)})}function dt(Me,Ue,it,ut){var yt=it-Me,xt=Ue-it,At=Math.min(yt,xt)*2;if(ut<=At){var Wt=Math.floor(ut/2);return ut%2?it+Wt+1:it-Wt}return yt>xt?it-(ut-xt):it+(ut-yt)}function ht(Me,Ue,it){var ut=Me.length,yt=Ue.length,xt,At;if(ut===0&&yt===0)return null;ut<yt?(xt=Me,At=Ue):(xt=Ue,At=Me);var Wt={__EMPTY_ITEM__:!0};function pn(ue){return ue!==void 0?it(ue):Wt}for(var tn=null,le=Math.abs(ut-yt)!==1,te=0;te<At.length;te+=1){var ee=pn(xt[te]),oe=pn(At[te]);if(ee!==oe){tn=te,le=le||ee!==pn(At[te+1]);break}}return tn===null?null:{index:tn,multiple:le}}function Lt(Me,Ue,it){var ut=xe.useState(Me),yt=(0,ve.Z)(ut,2),xt=yt[0],At=yt[1],Wt=xe.useState(null),pn=(0,ve.Z)(Wt,2),tn=pn[0],le=pn[1];return xe.useEffect(function(){var te=ht(xt||[],Me||[],Ue);(te==null?void 0:te.index)!==void 0&&(it==null||it(te.index),le(Me[te.index])),At(Me)},[Me]),[tn]}var Et=de(16089),pt=(typeof navigator=="undefined"?"undefined":(0,et.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ie=pt,mt=function(Me,Ue,it,ut){var yt=(0,xe.useRef)(!1),xt=(0,xe.useRef)(null);function At(){clearTimeout(xt.current),yt.current=!0,xt.current=setTimeout(function(){yt.current=!1},50)}var Wt=(0,xe.useRef)({top:Me,bottom:Ue,left:it,right:ut});return Wt.current.top=Me,Wt.current.bottom=Ue,Wt.current.left=it,Wt.current.right=ut,function(pn,tn){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,te=pn?tn<0&&Wt.current.left||tn>0&&Wt.current.right:tn<0&&Wt.current.top||tn>0&&Wt.current.bottom;return le&&te?(clearTimeout(xt.current),yt.current=!1):(!te||yt.current)&&At(),!yt.current&&te}};function qt(Me,Ue,it,ut,yt,xt,At){var Wt=(0,xe.useRef)(0),pn=(0,xe.useRef)(null),tn=(0,xe.useRef)(null),le=(0,xe.useRef)(!1),te=mt(Ue,it,ut,yt);function ee(Ve,Ye){if(Et.Z.cancel(pn.current),!te(!1,Ye)){var ge=Ve;if(!ge._virtualHandled)ge._virtualHandled=!0;else return;Wt.current+=Ye,tn.current=Ye,Ie||ge.preventDefault(),pn.current=(0,Et.Z)(function(){var Mt=le.current?10:1;At(Wt.current*Mt,!1),Wt.current=0})}}function oe(Ve,Ye){At(Ye,!0),Ie||Ve.preventDefault()}var ue=(0,xe.useRef)(null),ne=(0,xe.useRef)(null);function ce(Ve){if(Me){Et.Z.cancel(ne.current),ne.current=(0,Et.Z)(function(){ue.current=null},2);var Ye=Ve.deltaX,ge=Ve.deltaY,Mt=Ve.shiftKey,ct=Ye,Ct=ge;(ue.current==="sx"||!ue.current&&Mt&&ge&&!Ye)&&(ct=ge,Ct=0,ue.current="sx");var Ht=Math.abs(ct),dn=Math.abs(Ct);ue.current===null&&(ue.current=xt&&Ht>dn?"x":"y"),ue.current==="y"?ee(Ve,Ct):oe(Ve,ct)}}function Be(Ve){Me&&(le.current=Ve.detail===tn.current)}return[ce,Be]}function Oe(Me,Ue,it,ut){var yt=xe.useMemo(function(){return[new Map,[]]},[Me,it.id,ut]),xt=(0,ve.Z)(yt,2),At=xt[0],Wt=xt[1],pn=function(le){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le,ee=At.get(le),oe=At.get(te);if(ee===void 0||oe===void 0)for(var ue=Me.length,ne=Wt.length;ne<ue;ne+=1){var ce,Be=Me[ne],Ve=Ue(Be);At.set(Ve,ne);var Ye=(ce=it.get(Ve))!==null&&ce!==void 0?ce:ut;if(Wt[ne]=(Wt[ne-1]||0)+Ye,Ve===le&&(ee=ne),Ve===te&&(oe=ne),ee!==void 0&&oe!==void 0)break}return{top:Wt[ee-1]||0,bottom:Wt[oe]}};return pn}var Qe=de(67732),Pt=de(83652),Pe=function(){function Me(){(0,Qe.Z)(this,Me),(0,We.Z)(this,"maps",void 0),(0,We.Z)(this,"id",0),(0,We.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Pt.Z)(Me,[{key:"set",value:function(it,ut){this.diffRecords.set(it,this.maps[it]),this.maps[it]=ut,this.id+=1}},{key:"get",value:function(it){return this.maps[it]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Me}(),rt=Pe;function Ze(Me){var Ue=parseFloat(Me);return isNaN(Ue)?0:Ue}function gt(Me,Ue,it){var ut=xe.useState(0),yt=(0,ve.Z)(ut,2),xt=yt[0],At=yt[1],Wt=(0,xe.useRef)(new Map),pn=(0,xe.useRef)(new rt),tn=(0,xe.useRef)(0);function le(){tn.current+=1}function te(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;le();var ue=function(){var Be=!1;Wt.current.forEach(function(Ve,Ye){if(Ve&&Ve.offsetParent){var ge=Ve.offsetHeight,Mt=getComputedStyle(Ve),ct=Mt.marginTop,Ct=Mt.marginBottom,Ht=Ze(ct),dn=Ze(Ct),zt=ge+Ht+dn;pn.current.get(Ye)!==zt&&(pn.current.set(Ye,zt),Be=!0)}}),Be&&At(function(Ve){return Ve+1})};if(oe)ue();else{tn.current+=1;var ne=tn.current;Promise.resolve().then(function(){ne===tn.current&&ue()})}}function ee(oe,ue){var ne=Me(oe),ce=Wt.current.get(ne);ue?(Wt.current.set(ne,ue),te()):Wt.current.delete(ne),!ce!=!ue&&(ue?Ue==null||Ue(oe):it==null||it(oe))}return(0,xe.useEffect)(function(){return le},[]),[ee,te,pn.current,xt]}var Dn=14/15;function Ot(Me,Ue,it){var ut=(0,xe.useRef)(!1),yt=(0,xe.useRef)(0),xt=(0,xe.useRef)(0),At=(0,xe.useRef)(null),Wt=(0,xe.useRef)(null),pn,tn=function(oe){if(ut.current){var ue=Math.ceil(oe.touches[0].pageX),ne=Math.ceil(oe.touches[0].pageY),ce=yt.current-ue,Be=xt.current-ne,Ve=Math.abs(ce)>Math.abs(Be);Ve?yt.current=ue:xt.current=ne;var Ye=it(Ve,Ve?ce:Be,!1,oe);Ye&&oe.preventDefault(),clearInterval(Wt.current),Ye&&(Wt.current=setInterval(function(){Ve?ce*=Dn:Be*=Dn;var ge=Math.floor(Ve?ce:Be);(!it(Ve,ge,!0)||Math.abs(ge)<=.1)&&clearInterval(Wt.current)},16))}},le=function(){ut.current=!1,pn()},te=function(oe){pn(),oe.touches.length===1&&!ut.current&&(ut.current=!0,yt.current=Math.ceil(oe.touches[0].pageX),xt.current=Math.ceil(oe.touches[0].pageY),At.current=oe.target,At.current.addEventListener("touchmove",tn,{passive:!1}),At.current.addEventListener("touchend",le,{passive:!0}))};pn=function(){At.current&&(At.current.removeEventListener("touchmove",tn),At.current.removeEventListener("touchend",le))},(0,ke.Z)(function(){return Me&&Ue.current.addEventListener("touchstart",te,{passive:!0}),function(){var ee;(ee=Ue.current)===null||ee===void 0||ee.removeEventListener("touchstart",te),pn(),clearInterval(Wt.current)}},[Me])}function Pn(Me){return Math.floor(Math.pow(Me,.5))}function nn(Me,Ue){var it="touches"in Me?Me.touches[0]:Me;return it[Ue?"pageX":"pageY"]-window[Ue?"scrollX":"scrollY"]}function me(Me,Ue,it){xe.useEffect(function(){var ut=Ue.current;if(Me&&ut){var yt=!1,xt,At,Wt=function(){Et.Z.cancel(xt)},pn=function ee(){Wt(),xt=(0,Et.Z)(function(){it(At),ee()})},tn=function(){yt=!1,Wt()},le=function(oe){if(!(oe.target.draggable||oe.button!==0)){var ue=oe;ue._virtualHandled||(ue._virtualHandled=!0,yt=!0)}},te=function(oe){if(yt){var ue=nn(oe,!1),ne=ut.getBoundingClientRect(),ce=ne.top,Be=ne.bottom;if(ue<=ce){var Ve=ce-ue;At=-Pn(Ve),pn()}else if(ue>=Be){var Ye=ue-Be;At=Pn(Ye),pn()}else Wt()}};return ut.addEventListener("mousedown",le),ut.ownerDocument.addEventListener("mouseup",tn),ut.ownerDocument.addEventListener("mousemove",te),ut.ownerDocument.addEventListener("dragend",tn),function(){ut.removeEventListener("mousedown",le),ut.ownerDocument.removeEventListener("mouseup",tn),ut.ownerDocument.removeEventListener("mousemove",te),ut.ownerDocument.removeEventListener("dragend",tn),Wt()}}},[Me])}var he=10;function Dt(Me,Ue,it,ut,yt,xt,At,Wt){var pn=xe.useRef(),tn=xe.useState(null),le=(0,ve.Z)(tn,2),te=le[0],ee=le[1];return(0,ke.Z)(function(){if(te&&te.times<he){if(!Me.current){ee(function(Wn){return(0,Le.Z)({},Wn)});return}xt();var oe=te.targetAlign,ue=te.originAlign,ne=te.index,ce=te.offset,Be=Me.current.clientHeight,Ve=!1,Ye=oe,ge=null;if(Be){for(var Mt=oe||ue,ct=0,Ct=0,Ht=0,dn=Math.min(Ue.length-1,ne),zt=0;zt<=dn;zt+=1){var bn=yt(Ue[zt]);Ct=ct;var Nn=it.get(bn);Ht=Ct+(Nn===void 0?ut:Nn),ct=Ht}for(var Tn=Mt==="top"?ce:Be-ce,jn=dn;jn>=0;jn-=1){var zn=yt(Ue[jn]),Hn=it.get(zn);if(Hn===void 0){Ve=!0;break}if(Tn-=Hn,Tn<=0)break}switch(Mt){case"top":ge=Ct-ce;break;case"bottom":ge=Ht-Be+ce;break;default:{var Un=Me.current.scrollTop,Rn=Un+Be;Ct<Un?Ye="top":Ht>Rn&&(Ye="bottom")}}ge!==null&&At(ge),ge!==te.lastTop&&(Ve=!0)}Ve&&ee((0,Le.Z)((0,Le.Z)({},te),{},{times:te.times+1,targetAlign:Ye,lastTop:ge}))}},[te,Me.current]),function(oe){if(oe==null){Wt();return}if(Et.Z.cancel(pn.current),typeof oe=="number")At(oe);else if(oe&&(0,et.Z)(oe)==="object"){var ue,ne=oe.align;"index"in oe?ue=oe.index:ue=Ue.findIndex(function(Ve){return yt(Ve)===oe.key});var ce=oe.offset,Be=ce===void 0?0:ce;ee({times:0,index:ue,offset:Be,originAlign:ne})}}}var un=xe.forwardRef(function(Me,Ue){var it=Me.prefixCls,ut=Me.rtl,yt=Me.scrollOffset,xt=Me.scrollRange,At=Me.onStartMove,Wt=Me.onStopMove,pn=Me.onScroll,tn=Me.horizontal,le=Me.spinSize,te=Me.containerSize,ee=Me.style,oe=Me.thumbStyle,ue=Me.showScrollBar,ne=xe.useState(!1),ce=(0,ve.Z)(ne,2),Be=ce[0],Ve=ce[1],Ye=xe.useState(null),ge=(0,ve.Z)(Ye,2),Mt=ge[0],ct=ge[1],Ct=xe.useState(null),Ht=(0,ve.Z)(Ct,2),dn=Ht[0],zt=Ht[1],bn=!ut,Nn=xe.useRef(),Tn=xe.useRef(),jn=xe.useState(ue),zn=(0,ve.Z)(jn,2),Hn=zn[0],Un=zn[1],Rn=xe.useRef(),Wn=function(){ue===!0||ue===!1||(clearTimeout(Rn.current),Un(!0),Rn.current=setTimeout(function(){Un(!1)},3e3))},vn=xt-te||0,tt=te-le||0,nt=xe.useMemo(function(){if(yt===0||vn===0)return 0;var _n=yt/vn;return _n*tt},[yt,vn,tt]),Xe=function(Ln){Ln.stopPropagation(),Ln.preventDefault()},Rt=xe.useRef({top:nt,dragging:Be,pageY:Mt,startTop:dn});Rt.current={top:nt,dragging:Be,pageY:Mt,startTop:dn};var St=function(Ln){Ve(!0),ct(nn(Ln,tn)),zt(Rt.current.top),At(),Ln.stopPropagation(),Ln.preventDefault()};xe.useEffect(function(){var _n=function(ot){ot.preventDefault()},Ln=Nn.current,fn=Tn.current;return Ln.addEventListener("touchstart",_n,{passive:!1}),fn.addEventListener("touchstart",St,{passive:!1}),function(){Ln.removeEventListener("touchstart",_n),fn.removeEventListener("touchstart",St)}},[]);var Zt=xe.useRef();Zt.current=vn;var on=xe.useRef();on.current=tt,xe.useEffect(function(){if(Be){var _n,Ln=function(ot){var Je=Rt.current,Ft=Je.dragging,Mn=Je.pageY,Gn=Je.startTop;Et.Z.cancel(_n);var we=Nn.current.getBoundingClientRect(),Se=te/(tn?we.width:we.height);if(Ft){var It=(nn(ot,tn)-Mn)*Se,bt=Gn;!bn&&tn?bt-=It:bt+=It;var Ae=Zt.current,ft=on.current,Tt=ft?bt/ft:0,Kt=Math.ceil(Tt*Ae);Kt=Math.max(Kt,0),Kt=Math.min(Kt,Ae),_n=(0,Et.Z)(function(){pn(Kt,tn)})}},fn=function(){Ve(!1),Wt()};return window.addEventListener("mousemove",Ln,{passive:!0}),window.addEventListener("touchmove",Ln,{passive:!0}),window.addEventListener("mouseup",fn,{passive:!0}),window.addEventListener("touchend",fn,{passive:!0}),function(){window.removeEventListener("mousemove",Ln),window.removeEventListener("touchmove",Ln),window.removeEventListener("mouseup",fn),window.removeEventListener("touchend",fn),Et.Z.cancel(_n)}}},[Be]),xe.useEffect(function(){return Wn(),function(){clearTimeout(Rn.current)}},[yt]),xe.useImperativeHandle(Ue,function(){return{delayHidden:Wn}});var Ut="".concat(it,"-scrollbar"),Xt={position:"absolute",visibility:Hn?null:"hidden"},gn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return tn?(Object.assign(Xt,{height:8,left:0,right:0,bottom:0}),Object.assign(gn,(0,We.Z)({height:"100%",width:le},bn?"left":"right",nt))):(Object.assign(Xt,(0,We.Z)({width:8,top:0,bottom:0},bn?"right":"left",0)),Object.assign(gn,{width:"100%",height:le,top:nt})),xe.createElement("div",{ref:Nn,className:Ge()(Ut,(0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(Ut,"-horizontal"),tn),"".concat(Ut,"-vertical"),!tn),"".concat(Ut,"-visible"),Hn)),style:(0,Le.Z)((0,Le.Z)({},Xt),ee),onMouseDown:Xe,onMouseMove:Wn},xe.createElement("div",{ref:Tn,className:Ge()("".concat(Ut,"-thumb"),(0,We.Z)({},"".concat(Ut,"-thumb-moving"),Be)),style:(0,Le.Z)((0,Le.Z)({},gn),oe),onMouseDown:St}))}),_t=un,Fe=20;function at(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,it=Me/Ue*Me;return isNaN(it)&&(it=0),it=Math.max(it,Fe),Math.floor(it)}var st=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],cn=[],Bt={overflowY:"auto",overflowAnchor:"none"};function Ne(Me,Ue){var it=Me.prefixCls,ut=it===void 0?"rc-virtual-list":it,yt=Me.className,xt=Me.height,At=Me.itemHeight,Wt=Me.fullHeight,pn=Wt===void 0?!0:Wt,tn=Me.style,le=Me.data,te=Me.children,ee=Me.itemKey,oe=Me.virtual,ue=Me.direction,ne=Me.scrollWidth,ce=Me.component,Be=ce===void 0?"div":ce,Ve=Me.onScroll,Ye=Me.onVirtualScroll,ge=Me.onVisibleChange,Mt=Me.innerProps,ct=Me.extraRender,Ct=Me.styles,Ht=Me.showScrollBar,dn=Ht===void 0?"optional":Ht,zt=(0,ze.Z)(Me,st),bn=xe.useCallback(function(Qt){return typeof ee=="function"?ee(Qt):Qt==null?void 0:Qt[ee]},[ee]),Nn=gt(bn,null,null),Tn=(0,ve.Z)(Nn,4),jn=Tn[0],zn=Tn[1],Hn=Tn[2],Un=Tn[3],Rn=!!(oe!==!1&&xt&&At),Wn=xe.useMemo(function(){return Object.values(Hn.maps).reduce(function(Qt,an){return Qt+an},0)},[Hn.id,Hn.maps]),vn=Rn&&le&&(Math.max(At*le.length,Wn)>xt||!!ne),tt=ue==="rtl",nt=Ge()(ut,(0,We.Z)({},"".concat(ut,"-rtl"),tt),yt),Xe=le||cn,Rt=(0,xe.useRef)(),St=(0,xe.useRef)(),Zt=(0,xe.useRef)(),on=(0,xe.useState)(0),Ut=(0,ve.Z)(on,2),Xt=Ut[0],gn=Ut[1],_n=(0,xe.useState)(0),Ln=(0,ve.Z)(_n,2),fn=Ln[0],Zn=Ln[1],ot=(0,xe.useState)(!1),Je=(0,ve.Z)(ot,2),Ft=Je[0],Mn=Je[1],Gn=function(){Mn(!0)},we=function(){Mn(!1)},Se={getKey:bn};function It(Qt){gn(function(an){var On;typeof Qt=="function"?On=Qt(an):On=Qt;var wn=dr(On);return Rt.current.scrollTop=wn,wn})}var bt=(0,xe.useRef)({start:0,end:Xe.length}),Ae=(0,xe.useRef)(),ft=Lt(Xe,bn),Tt=(0,ve.Z)(ft,1),Kt=Tt[0];Ae.current=Kt;var ln=xe.useMemo(function(){if(!Rn)return{scrollHeight:void 0,start:0,end:Xe.length-1,offset:void 0};if(!vn){var Qt;return{scrollHeight:((Qt=St.current)===null||Qt===void 0?void 0:Qt.offsetHeight)||0,start:0,end:Xe.length-1,offset:void 0}}for(var an=0,On,wn,Kn,vr=Xe.length,rn=0;rn<vr;rn+=1){var Jt=Xe[rn],xn=bn(Jt),En=Hn.get(xn),Xn=an+(En===void 0?At:En);Xn>=Xt&&On===void 0&&(On=rn,wn=an),Xn>Xt+xt&&Kn===void 0&&(Kn=rn),an=Xn}return On===void 0&&(On=0,wn=0,Kn=Math.ceil(xt/At)),Kn===void 0&&(Kn=Xe.length-1),Kn=Math.min(Kn+1,Xe.length-1),{scrollHeight:an,start:On,end:Kn,offset:wn}},[vn,Rn,Xt,Xe,Un,xt]),kt=ln.scrollHeight,jt=ln.start,vt=ln.end,qe=ln.offset;bt.current.start=jt,bt.current.end=vt,xe.useLayoutEffect(function(){var Qt=Hn.getRecord();if(Qt.size===1){var an=Array.from(Qt.keys())[0],On=Qt.get(an),wn=Xe[jt];if(wn&&On===void 0){var Kn=bn(wn);if(Kn===an){var vr=Hn.get(an),rn=vr-At;It(function(Jt){return Jt+rn})}}}Hn.resetRecord()},[kt]);var Gt=xe.useState({width:0,height:xt}),yn=(0,ve.Z)(Gt,2),mn=yn[0],In=yn[1],Qn=function(an){In({width:an.offsetWidth,height:an.offsetHeight})},er=(0,xe.useRef)(),kn=(0,xe.useRef)(),$t=xe.useMemo(function(){return at(mn.width,ne)},[mn.width,ne]),Bn=xe.useMemo(function(){return at(mn.height,kt)},[mn.height,kt]),hn=kt-xt,qn=(0,xe.useRef)(hn);qn.current=hn;function dr(Qt){var an=Qt;return Number.isNaN(qn.current)||(an=Math.min(an,qn.current)),an=Math.max(an,0),an}var ir=Xt<=0,yr=Xt>=hn,br=fn<=0,Cr=fn>=ne,hr=mt(ir,yr,br,Cr),Pr=function(){return{x:tt?-fn:fn,y:Xt}},xr=(0,xe.useRef)(Pr()),pr=(0,pe.zX)(function(Qt){if(Ye){var an=(0,Le.Z)((0,Le.Z)({},Pr()),Qt);(xr.current.x!==an.x||xr.current.y!==an.y)&&(Ye(an),xr.current=an)}});function Sr(Qt,an){var On=Qt;an?((0,wt.flushSync)(function(){Zn(On)}),pr()):It(On)}function lr(Qt){var an=Qt.currentTarget.scrollTop;an!==Xt&&It(an),Ve==null||Ve(Qt),pr()}var sr=function(an){var On=an,wn=ne?ne-mn.width:0;return On=Math.max(On,0),On=Math.min(On,wn),On},or=(0,pe.zX)(function(Qt,an){an?((0,wt.flushSync)(function(){Zn(function(On){var wn=On+(tt?-Qt:Qt);return sr(wn)})}),pr()):It(function(On){var wn=On+Qt;return wn})}),ur=qt(Rn,ir,yr,br,Cr,!!ne,or),Br=(0,ve.Z)(ur,2),Vr=Br[0],Jr=Br[1];Ot(Rn,Rt,function(Qt,an,On,wn){var Kn=wn;return hr(Qt,an,On)?!1:!Kn||!Kn._virtualHandled?(Kn&&(Kn._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Qt?an:0,deltaY:Qt?0:an}),!0):!1}),me(vn,Rt,function(Qt){It(function(an){return an+Qt})}),(0,ke.Z)(function(){function Qt(On){var wn=ir&&On.detail<0,Kn=yr&&On.detail>0;Rn&&!wn&&!Kn&&On.preventDefault()}var an=Rt.current;return an.addEventListener("wheel",Vr,{passive:!1}),an.addEventListener("DOMMouseScroll",Jr,{passive:!0}),an.addEventListener("MozMousePixelScroll",Qt,{passive:!1}),function(){an.removeEventListener("wheel",Vr),an.removeEventListener("DOMMouseScroll",Jr),an.removeEventListener("MozMousePixelScroll",Qt)}},[Rn,ir,yr]),(0,ke.Z)(function(){if(ne){var Qt=sr(fn);Zn(Qt),pr({x:Qt})}},[mn.width,ne]);var Tr=function(){var an,On;(an=er.current)===null||an===void 0||an.delayHidden(),(On=kn.current)===null||On===void 0||On.delayHidden()},Hr=Dt(Rt,Xe,Hn,At,bn,function(){return zn(!0)},It,Tr);xe.useImperativeHandle(Ue,function(){return{nativeElement:Zt.current,getScrollInfo:Pr,scrollTo:function(an){function On(wn){return wn&&(0,et.Z)(wn)==="object"&&("left"in wn||"top"in wn)}On(an)?(an.left!==void 0&&Zn(sr(an.left)),Hr(an.top)):Hr(an)}}}),(0,ke.Z)(function(){if(ge){var Qt=Xe.slice(jt,vt+1);ge(Qt,Xe)}},[jt,vt,Xe]);var Rr=Oe(Xe,bn,Hn,At),zr=ct==null?void 0:ct({start:jt,end:vt,virtual:vn,offsetX:fn,offsetY:qe,rtl:tt,getSize:Rr}),ii=Ee(Xe,jt,vt,ne,fn,jn,te,Se),Fr=null;xt&&(Fr=(0,Le.Z)((0,We.Z)({},pn?"height":"maxHeight",xt),Bt),Rn&&(Fr.overflowY="hidden",ne&&(Fr.overflowX="hidden"),Ft&&(Fr.pointerEvents="none")));var nr={};return tt&&(nr.dir="rtl"),xe.createElement("div",(0,ie.Z)({ref:Zt,style:(0,Le.Z)((0,Le.Z)({},tn),{},{position:"relative"}),className:nt},nr,zt),xe.createElement(Ce.Z,{onResize:Qn},xe.createElement(Be,{className:"".concat(ut,"-holder"),style:Fr,ref:Rt,onScroll:lr,onMouseEnter:Tr},xe.createElement(Re,{prefixCls:ut,height:kt,offsetX:fn,offsetY:qe,scrollWidth:ne,onInnerResize:zn,ref:St,innerProps:Mt,rtl:tt,extra:zr},ii))),vn&&kt>xt&&xe.createElement(_t,{ref:er,prefixCls:ut,scrollOffset:Xt,scrollRange:kt,rtl:tt,onScroll:Sr,onStartMove:Gn,onStopMove:we,spinSize:Bn,containerSize:mn.height,style:Ct==null?void 0:Ct.verticalScrollBar,thumbStyle:Ct==null?void 0:Ct.verticalScrollBarThumb,showScrollBar:dn}),vn&&ne>mn.width&&xe.createElement(_t,{ref:kn,prefixCls:ut,scrollOffset:fn,scrollRange:ne,rtl:tt,onScroll:Sr,onStartMove:Gn,onStopMove:we,spinSize:$t,containerSize:mn.width,horizontal:!0,style:Ct==null?void 0:Ct.horizontalScrollBar,thumbStyle:Ct==null?void 0:Ct.horizontalScrollBarThumb,showScrollBar:dn}))}var ye=xe.forwardRef(Ne);ye.displayName="List";var _e=ye,lt=_e},93314:function(Yt){"use strict";Yt.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(Yt,en,de){"use strict";de.d(en,{Z:function(){return Ge}});const ie=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,et=(Ce,pe)=>(!pe||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",Le=(Ce,pe)=>{if(Ce.clientHeight<Ce.scrollHeight||Ce.clientWidth<Ce.scrollWidth){const ke=getComputedStyle(Ce,null);return et(ke.overflowY,pe)||et(ke.overflowX,pe)||(xe=>{const wt=(je=>{if(!je.ownerDocument||!je.ownerDocument.defaultView)return null;try{return je.ownerDocument.defaultView.frameElement}catch(Re){return null}})(xe);return!!wt&&(wt.clientHeight<xe.scrollHeight||wt.clientWidth<xe.scrollWidth)})(Ce)}return!1},We=(Ce,pe,ke,xe,wt,je,Re,He)=>je<Ce&&Re>pe||je>Ce&&Re<pe?0:je<=Ce&&He<=ke||Re>=pe&&He>=ke?je-Ce-xe:Re>pe&&He<ke||je<Ce&&He>ke?Re-pe+wt:0,ve=Ce=>{const pe=Ce.parentElement;return pe==null?Ce.getRootNode().host||null:pe},ze=(Ce,pe)=>{var ke,xe,wt,je;if(typeof document=="undefined")return[];const{scrollMode:Re,block:He,inline:Ee,boundary:dt,skipOverflowHiddenElements:ht}=pe,Lt=typeof dt=="function"?dt:_t=>_t!==dt;if(!ie(Ce))throw new TypeError("Invalid target");const Et=document.scrollingElement||document.documentElement,pt=[];let Ie=Ce;for(;ie(Ie)&&Lt(Ie);){if(Ie=ve(Ie),Ie===Et){pt.push(Ie);break}Ie!=null&&Ie===document.body&&Le(Ie)&&!Le(document.documentElement)||Ie!=null&&Le(Ie,ht)&&pt.push(Ie)}const mt=(xe=(ke=window.visualViewport)==null?void 0:ke.width)!=null?xe:innerWidth,qt=(je=(wt=window.visualViewport)==null?void 0:wt.height)!=null?je:innerHeight,{scrollX:Oe,scrollY:Qe}=window,{height:Pt,width:Pe,top:rt,right:Ze,bottom:gt,left:Dn}=Ce.getBoundingClientRect(),{top:Ot,right:Pn,bottom:nn,left:me}=(_t=>{const Fe=window.getComputedStyle(_t);return{top:parseFloat(Fe.scrollMarginTop)||0,right:parseFloat(Fe.scrollMarginRight)||0,bottom:parseFloat(Fe.scrollMarginBottom)||0,left:parseFloat(Fe.scrollMarginLeft)||0}})(Ce);let he=He==="start"||He==="nearest"?rt-Ot:He==="end"?gt+nn:rt+Pt/2-Ot+nn,Dt=Ee==="center"?Dn+Pe/2-me+Pn:Ee==="end"?Ze+Pn:Dn-me;const un=[];for(let _t=0;_t<pt.length;_t++){const Fe=pt[_t],{height:at,width:st,top:cn,right:Bt,bottom:Ne,left:ye}=Fe.getBoundingClientRect();if(Re==="if-needed"&&rt>=0&&Dn>=0&&gt<=qt&&Ze<=mt&&(Fe===Et&&!Le(Fe)||rt>=cn&&gt<=Ne&&Dn>=ye&&Ze<=Bt))return un;const _e=getComputedStyle(Fe),lt=parseInt(_e.borderLeftWidth,10),Me=parseInt(_e.borderTopWidth,10),Ue=parseInt(_e.borderRightWidth,10),it=parseInt(_e.borderBottomWidth,10);let ut=0,yt=0;const xt="offsetWidth"in Fe?Fe.offsetWidth-Fe.clientWidth-lt-Ue:0,At="offsetHeight"in Fe?Fe.offsetHeight-Fe.clientHeight-Me-it:0,Wt="offsetWidth"in Fe?Fe.offsetWidth===0?0:st/Fe.offsetWidth:0,pn="offsetHeight"in Fe?Fe.offsetHeight===0?0:at/Fe.offsetHeight:0;if(Et===Fe)ut=He==="start"?he:He==="end"?he-qt:He==="nearest"?We(Qe,Qe+qt,qt,Me,it,Qe+he,Qe+he+Pt,Pt):he-qt/2,yt=Ee==="start"?Dt:Ee==="center"?Dt-mt/2:Ee==="end"?Dt-mt:We(Oe,Oe+mt,mt,lt,Ue,Oe+Dt,Oe+Dt+Pe,Pe),ut=Math.max(0,ut+Qe),yt=Math.max(0,yt+Oe);else{ut=He==="start"?he-cn-Me:He==="end"?he-Ne+it+At:He==="nearest"?We(cn,Ne,at,Me,it+At,he,he+Pt,Pt):he-(cn+at/2)+At/2,yt=Ee==="start"?Dt-ye-lt:Ee==="center"?Dt-(ye+st/2)+xt/2:Ee==="end"?Dt-Bt+Ue+xt:We(ye,Bt,st,lt,Ue+xt,Dt,Dt+Pe,Pe);const{scrollLeft:tn,scrollTop:le}=Fe;ut=pn===0?0:Math.max(0,Math.min(le+ut/pn,Fe.scrollHeight-at/pn+At)),yt=Wt===0?0:Math.max(0,Math.min(tn+yt/Wt,Fe.scrollWidth-st/Wt+xt)),he+=le-ut,Dt+=tn-yt}un.push({el:Fe,top:ut,left:yt})}return un},Te=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(pe=>pe===Object(pe)&&Object.keys(pe).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function Ge(Ce,pe){if(!Ce.isConnected||!(wt=>{let je=wt;for(;je&&je.parentNode;){if(je.parentNode===document)return!0;je=je.parentNode instanceof ShadowRoot?je.parentNode.host:je.parentNode}return!1})(Ce))return;const ke=(wt=>{const je=window.getComputedStyle(wt);return{top:parseFloat(je.scrollMarginTop)||0,right:parseFloat(je.scrollMarginRight)||0,bottom:parseFloat(je.scrollMarginBottom)||0,left:parseFloat(je.scrollMarginLeft)||0}})(Ce);if((wt=>typeof wt=="object"&&typeof wt.behavior=="function")(pe))return pe.behavior(ze(Ce,pe));const xe=typeof pe=="boolean"||pe==null?void 0:pe.behavior;for(const{el:wt,top:je,left:Re}of ze(Ce,Te(pe))){const He=je-ke.top+ke.bottom,Ee=Re-ke.left+ke.right;wt.scroll({top:He,left:Ee,behavior:xe})}}}}]);