You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1105 lines
652 KiB
1105 lines
652 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[508],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(jt,qt){"use strict";qt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11081:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var jt={},qt="5.0",he={},ie=null,Ze=!1,De=!1,Oe=null,pe=!1,ge=null,Ie=null,_e=0;_e<arguments.length;_e++){var we=arguments[_e];if(we!==null)switch(typeof we){case"number":qt=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?qt=we:Oe=we;break;case"object":typeof we.is3D!="undefined"?ie=we:he=we;break;case"boolean":Ze=we,De=!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},he.material_id!==void 0&&!De&&(Ze=!0)),Oe!==null&&he.id===void 0&&(he.id=Oe);var fe="",$e="",ve=!1,ht=null,Fe=null,Me=null,Pe=!1,Ee=null,nt=null,ut=null,ft=null,ct=null;he.height!==void 0&&(he.height=Math.round(he.height)),he.width!==void 0&&(he.width=Math.round(he.width));var et=function(Re){return parseFloat(Re)>4?parseFloat(Re):5};jt.setHTML5Codebase=function(Re,tt){Ie=Re,mt(Re,tt)},jt.setJavaCodebase=jt.setJavaCodebaseVersion=jt.isCompiledInstalled=jt.setPreCompiledScriptPath=jt.setPreCompiledResourcePath=function(){},jt.setHTML5CodebaseVersion=function(Re,tt){var rt=parseFloat(Re);if(rt!==NaN&&rt<5){console.log("The GeoGebra HTML5 codebase version "+rt+" is deprecated. Using version latest instead.");return}ge=Re,de(Re,tt)},jt.getHTML5CodebaseVersion=function(){return Fe},jt.getParameters=function(){return he},jt.setFontsCSSURL=function(Re){ft=Re},jt.setGiacJSURL=function(Re){},jt.setJNLPFile=function(Re){fe=Re},jt.setJNLPBaseDir=function(Re){},jt.inject=function(){function Re(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var tt="auto",rt=he.id,dn,bt=!1,Jt=0;Jt<arguments.length;Jt++){var He=arguments[Jt];typeof He=="string"?(He=He.toLowerCase(),He.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?tt=He:rt=arguments[Jt]):typeof He=="boolean"?bt=He:He instanceof HTMLElement&&(dn=He)}Tt();function Tt(){if(!pe){setTimeout(Tt,200);return}tt=ln(tt);var Nt=dn||document.getElementById(rt);if(!Nt){console.log("possibly bug on ajax loading? ");return}if(jt.removeExistingApplet(Nt,!1),he.width===void 0&&Nt.clientWidth&&(he.width=Nt.clientWidth),he.height===void 0&&Nt.clientHeight&&(he.height=Nt.clientHeight),!(he.width&&he.height)&&tt==="html5"&&(delete he.width,delete he.height),ht=tt,tt==="screenshot")Be(Nt,he);else{var ae=!1;he.hasOwnProperty("playButton")&&he.playButton||he.hasOwnProperty("clickToLoad")&&he.clickToLoad?ae=!0:he.hasOwnProperty("playButtonAutoDecide")&&he.playButtonAutoDecide&&(ae=(!Ae()||Re())&&it()),ae?(ht="screenshot",un(Nt,he,bt,tt)):Xe(Nt,he,bt)}}};function Ae(){try{return window.self!==window.top}catch(Re){return!0}}function it(){return he.hasOwnProperty("screenshotGenerator")&&he.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}jt.getViews=function(){return ie},jt.isJavaInstalled=function(){return!1};var Ut=function(Re){var tt=function(Jt){var He=JSON.parse(Jt),Tt=function(te){return te.type=="G"||te.type=="E"},Nt=He.elements?He.elements.filter(Tt)[0]:He;if(!Nt||!Nt.url){rt();return}he.fileName=Nt.url,Ye(Nt.settings||{}),ie.is3D=!0;var ae="https://www.geogebra.org/images/";jt.setPreviewImage(Ee||Nt.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Re()},rt=function(){he.onError&&he.onError(),sn("Error: Fetching material (id "+he.material_id+") failed.",he)},dn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",bt="/materials/"+he.material_id+"?scope=basic";We("https://"+dn+"/api/proxy.php?path="+encodeURIComponent(bt),tt,rt)};function Ye(Re){var tt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(rt){Re[rt]=!!Re[rt]}),tt.forEach(function(rt){he[rt]===void 0&&Re[rt]!==void 0&&(he[rt]=Re[rt])}),he.showToolBarHelp===void 0&&(he.showToolBarHelp=he.showToolBar)}function We(Re,tt,rt){var dn=new XMLHttpRequest;dn.open("GET",Re),dn.onload=function(){tt(dn.responseText)},dn.onerror=rt,dn.send()}jt.isHTML5Installed=function(){return!0},jt.getLoadedAppletType=function(){return ht},jt.setPreviewImage=function(Re,tt,rt){Ee=Re,nt=tt,ut=rt},jt.removeExistingApplet=function(Re,tt){var rt;typeof Re=="string"&&(Re=document.getElementById(Re)),ht=null;var dn=null;for(rt=0;rt<Re.childNodes.length;rt++){var bt=Re.childNodes[rt],Jt=bt.className;Jt==="applet_screenshot"?tt?(bt.style.display="block",ht="screenshot"):bt.style.display="none":Jt!=="applet_scaler prerender"&&(Re.removeChild(bt),dn=Jt&&Jt.indexOf("appletParameters")!=-1?bt.id:null,rt--)}var He=he.id!==void 0?he.id:dn,Tt=window[He];Tt&&typeof Tt.getBase64=="function"&&(Tt.remove(),window[He]=null)},jt.refreshHitPoints=function(){if(et(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Re=jt.getAppletObject();return Re&&typeof Re.recalculateEnvironments=="function"?(Re.recalculateEnvironments(),!0):!1},jt.startAnimation=function(){var Re=jt.getAppletObject();return Re&&typeof Re.startAnimation=="function"?(Re.startAnimation(),!0):!1},jt.stopAnimation=function(){var Re=jt.getAppletObject();return Re&&typeof Re.stopAnimation=="function"?(Re.stopAnimation(),!0):!1},jt.getAppletObject=function(){var Re=he.id!==void 0?he.id:"ggbApplet";return window[Re]},jt.resize=function(){};var Ct=function(Re,tt,rt){var dn=document.createElement("param");dn.setAttribute("name",tt),dn.setAttribute("value",rt),Re.appendChild(dn)},Le=function(Re){return Re&&Re!=="false"},Xe=function(Re,tt,rt){et(Fe)<=4.2&&(rt=!0);var dn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Fe||ggbHTML5LoadedCodebaseIsWebSimple&&!Pe)&&(dn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var bt=document.createElement("div");bt.classList.add("appletParameters","notranslate");var Jt=tt.width,He=tt.height;if(tt.disableAutoScale=tt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():tt.disableAutoScale,tt.width!==void 0)if(et(Fe)<=4.4)Le(tt.showToolBar)&&(tt.height-=7),Le(tt.showAlgebraInput)&&(tt.height-=37),tt.width<605&&Le(tt.showToolBar)&&(tt.width=605,Jt=605);else{var Tt=100;(Le(tt.showToolBar)||Le(tt.showMenuBar))&&(tt.hasOwnProperty("customToolBar")&&(tt.customToolbar=tt.customToolBar),Tt=Le(tt.showMenuBar)?245:155),Jt<Tt&&(tt.width=Tt,Jt=Tt)}bt.style.border="none",bt.style.display="inline-block";for(var Nt in tt)tt.hasOwnProperty(Nt)&&Nt!=="appletOnLoad"&&bt.setAttribute("data-param-"+Nt,tt[Nt]);ft&&bt.setAttribute("data-param-fontscssurl",ft),jt.resize=function(){GGBAppletUtils.responsiveResize(Re,tt)},window.addEventListener("resize",function(nn){jt.resize()});var ae=typeof tt.appletOnLoad=="function"?tt.appletOnLoad:function(){};if(!rt&&tt.width!==void 0){tt.hasOwnProperty("showSplash")||bt.setAttribute("data-param-showSplash","false");var te=Re.querySelector(".applet_scaler.prerender"),z=te!==null;if(z)var oe=te.querySelector(".ggb_preview");else{var oe=Dn(Jt,He,tt.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=Jt+"px",te.style.height=He+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),et(Fe)>=5?(tt.appletOnLoad=function(nn){var $t=Re.querySelector(".ggb_preview");$t&&$t.parentNode.removeChild($t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),ae(nn)},z||te.appendChild(oe)):bt.appendChild(oe),te.appendChild(bt),z||Re.appendChild(te),setTimeout(function(){jt.resize()},1)}else{var se=document.createElement("div");se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.appendChild(bt),Re.appendChild(se),tt.appletOnLoad=function(nn){jt.resize(),ae(nn)}}function ne(nn,$t){$t&&typeof $t.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(nn,$t.appletOnLoad):renderGGBElement(nn),sn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",$t)}function be(nn,$t){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:nn,params:$t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(hn){ne(hn.article,hn.params)}),html5AppletsToProcess=null)},et(Fe)<5&&(nn.className+=" geogebraweb")):ne(nn,$t)}if(dn){scriptLoadStarted=!0;for(var Ve=0;Ve<bt.childNodes.length;Ve++){var Wt=bt.childNodes[Ve].tagName;Wt==="TABLE"&&(bt.removeChild(bt.childNodes[Ve]),Ve--)}if(ggbHTML5LoadedScript!==null){var It=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');It!=null&&It.parentNode.removeChild(It)}var gt=document.createElement("script"),At=function(){be(bt,tt)};gt.src=$e+Me,ggbHTML5LoadedCodebaseIsWebSimple=Pe,ggbHTML5LoadedCodebaseVersion=Fe,ggbHTML5LoadedScript=gt.src,sn("GeoGebra HTML5 codebase loaded: '"+$e+"'.",tt),!Ie&&(!ge||ge=="5.0")?(Pe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),At()):$e.requirejs?__webpack_require__.e(981).then(function(){var nn=[__webpack_require__(60981)];At.apply(null,nn)}.bind(this)).catch(__webpack_require__.oe):(gt.onload=At,Re.appendChild(gt))}else be(bt,tt);tt.height=He,tt.width=Jt},Be=function(Re,tt,rt){var dn=Dn(tt.width,tt.height,tt.borderColor,rt),bt=document.createElement("div");bt.style.position="relative",bt.style.display="block",bt.style.width=tt.width+"px",bt.style.height=tt.height+"px",bt.className="applet_screenshot applet_scaler"+(rt?" applet_screenshot_play":""),bt.appendChild(dn);var Jt=GGBAppletUtils.getScale(tt,Re,rt);rt?(Re.appendChild(Lt()),window.GGBT_wsf_view||(Re.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(bt,"66%"),Re.appendChild(bt),Jt!==1&&!isNaN(Jt)&&(GGBAppletUtils.scaleElement(bt,Jt),bt.style.width=tt.width+"px",bt.style.height=tt.height+"px",bt.parentNode.style.width=tt.width*Jt+"px",bt.parentNode.style.height=tt.height*Jt+"px"),jt.resize=function(){ot(Re,dn,bt,rt)},window.addEventListener("resize",function(He){jt.resize()}),jt.resize()};function ot(Re,tt,rt,dn){if(Re.contains(tt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Re.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Re)}var bt=GGBAppletUtils.getScale(he,Re,dn);rt.parentNode!==null&&(!isNaN(bt)&&bt!==1?(GGBAppletUtils.scaleElement(rt,bt),rt.parentNode.style.width=he.width*bt+"px",rt.parentNode.style.height=he.height*bt+"px"):(GGBAppletUtils.scaleElement(rt,1),rt.parentNode.style.width=he.width+"px",rt.parentNode.style.height=he.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Re),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}jt.onExitFullscreen=function(Re,tt){tt.appendChild(Re)};var un=function(Re,tt,rt,dn){Be(Re,tt,!0);for(var bt=function(){var Tt=[];for(He=0;He<Re.childNodes.length;He++)Tt.push(Re.childNodes[He]);if(window.GGBT_wsf_view){var Nt=window.GGBT_wsf_view.renderFullScreen(Re,tt.id),ae=document.getElementById("fullscreencontainer"),te=jQuery(Re).find(".fullscreencontent");te.length>0?(Nt.remove(),te.attr("id","fullscreencontent").show(),jQuery(ae).append(te),window.dispatchEvent(new Event("resize"))):Xe(Nt,tt,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else ht=dn,Xe(Re,tt,!1);if(!window.GGBT_wsf_view)for(He=0;He<Tt.length;He++)Re.removeChild(Tt[He])},Jt=Re.getElementsByClassName("ggb_preview_play"),He=0;He<Jt.length;He++)Jt[He].addEventListener("click",bt,!1),Jt[He].addEventListener("ontouchstart",bt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Re),it()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Lt=function(){var Re=document.createElement("div");if(Re.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var tt='.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");}',rt=document.createElement("style");rt.styleSheet?rt.styleSheet.cssText=tt:rt.appendChild(document.createTextNode(tt)),document.getElementsByTagName("head")[0].appendChild(rt)}return Re},Dn=function(Re,tt,rt,dn){var bt=document.createElement("div");bt.className="ggb_preview",bt.style.position="absolute",bt.style.zIndex="90",bt.style.width=Re-2+"px",bt.style.height=tt-2+"px",bt.style.top="0px",bt.style.left="0px",bt.style.overflow="hidden",bt.style.backgroundColor="white";var Jt="lightgrey";rt!==void 0&&(rt==="none"?Jt="transparent":Jt=rt),bt.style.border="1px solid "+Jt;var He=document.createElement("img");if(He.style.position="relative",He.style.zIndex="1000",He.style.top="-1px",He.style.left="-1px",Ee!==null&&He.setAttribute("src",Ee),He.style.opacity=.7,nt!==null){var Tt,Nt,ae;if(!dn){Tt=document.createElement("img"),Tt.style.position="absolute",Tt.style.zIndex="1001",Tt.style.opacity=1,He.style.opacity=.3,Nt=360,Nt>Re/4*3&&(Nt=Re/4*3),ae=Nt/5.8,Tt.setAttribute("src",nt),Tt.setAttribute("width",Nt),Tt.setAttribute("height",ae);var te=(Re-Nt)/2,z=(tt-ae)/2;Tt.style.left=te+"px",Tt.style.top=z+"px",bt.appendChild(Tt)}}return bt.appendChild(He),bt},ln=function(Re){return Re=Re.toLowerCase(),Re==="html5"||Re==="screenshot"?Re:"html5"},me=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Re,tt){if(Fe=Re,tt){mt(Fe,!0);return}var rt=!Ze;if(rt){var dn=et(Fe);!isNaN(dn)&&dn<4.4&&(rt=!1)}var bt,Jt;window.location.protocol.substr(0,4)==="http"?bt=window.location.protocol:bt="http:";var He=Fe.indexOf("//");He>0?Jt=Fe:He===0?Jt=bt+Fe:Jt="https://www.geogebra.org/apps/5.2.814.0/";for(var Tt in me)if(Fe.slice(me[Tt].length*-1)===me[Tt]||Fe.slice((me[Tt].length+1)*-1)===me[Tt]+"/"){mt(Jt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&rt&&!ie.is3D&&!ie.AV&&!ie.SV&&!ie.CV&&!ie.EV2&&!ie.CP&&!ie.PC&&!ie.DA&&!ie.FI&&!ie.PV&&!Le(he.showToolBar)&&!Le(he.showMenuBar)&&!Le(he.showAlgebraInput)&&!Le(he.enableRightClick)&&(!he.appName||he.appName=="classic")?Jt+="webSimple/":Jt+="web3d/",mt(Jt,!1)},mt=function(Re,tt){if(Re.requirejs){$e=Re;return}Re.slice(-1)!=="/"&&(Re+="/"),$e=Re,tt===null&&(tt=Re.indexOf("http")===-1),ve=tt,Me="web.nocache.js",Pe=!1;var rt=$e.split("/");rt.length>1&&(!tt&&rt[rt.length-2]==="webSimple"?(Me="webSimple.nocache.js",Pe=!0):me.indexOf(rt[rt.length-2])>=0&&(Me=rt[rt.length-2]+".nocache.js")),rt=Re.split("/"),Fe=rt[rt.length-3],Fe.substr(0,4)==="test"?Fe=Fe.substr(4,1)+"."+Fe.substr(5,1):(Fe.substr(0,3)==="war"||Fe.substr(0,4)==="beta")&&(Fe="5.0");var dn=parseFloat(Fe);dn!==NaN&&dn<5&&Re.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+dn+" is deprecated. Using version latest instead."),de("5.0",tt))},sn=function(Re,tt){window.console&&window.console.log&&(!tt||typeof tt.showLogging=="undefined"||tt.showLogging&&tt.showLogging!=="false")&&console.log(Re)};he.material_id!==void 0?Ut(Rt):Rt();function Rt(){var Re=qt;ge!==null?Re=ge:parseFloat(Re)<5&&(Re="5.0"),de(Re,!1),Ie!==null&&mt(Ie,ve),pe=!0}return jt},GGBAppletUtils=function(){"use strict";function jt(){return window.GGBT_wsf_edit!==void 0}function qt(pe,ge){ge!=1?(pe.style.transformOrigin="0% 0% 0px",pe.style.webkitTransformOrigin="0% 0% 0px",pe.style.transform="scale("+ge+","+ge+")",pe.style.webkitTransform="scale("+ge+","+ge+")",pe.style.maxWidth="initial",pe.querySelector(".ggb_preview")!==null&&(pe.querySelector(".ggb_preview").style.maxWidth="initial"),pe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(pe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),pe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(pe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(pe.style.transform="none",pe.style.webkitTransform="none")}function he(pe,ge,Ie,_e,we,fe){var $e=null;if(fe!=null&&fe!="")for(var ve=pe.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+fe+" ")>-1){$e=ve;break}else ve=ve.parentNode;var ht=0,Fe=0,Me=0,Pe=0,Ee=0,nt=0,ut=0;if($e)ht=$e.offsetWidth,Fe=Math.max(_e?$e.offsetWidth:0,$e.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ht=Math.min(window.innerWidth,document.documentElement.clientWidth),Fe=Math.min(window.innerHeight,document.documentElement.clientHeight),Me=ht):(ht=window.innerWidth,Fe=window.innerHeight,Me=window.innerWidth),pe){var ft=pe.getBoundingClientRect();ft.left>0&&ft.left<=ht&&(we===void 0||!we)&&(document.dir==="rtl"?(Ee=ht-ft.width-ft.left,nt=Me<=480?10:30):(nt=ft.left,Ee=Me<=480?10:30),Pe=nt+Ee)}if(pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ct=pe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Pe=40,ut=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Pe=0,ut=40)}}return pe&&((Ie===void 0||!Ie)&&ge>0&&ge+Pe<ht?ht=ge:ht-=Pe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ie===void 0||!Ie)&&(Fe-=ut)),{width:ht,height:Fe}}function ie(pe,ge,Ie,_e,we){if(pe.isScreenshoGenerator)return 1;var fe=_e!==void 0&&_e,$e=pe.noScaleMargin!=null&&pe.noScaleMargin,ve=function(ct){return ct&&ct!=="false"},ht=ve(pe.autoHeight),Fe=he(ge,pe.width,Ie,ht,fe&&window.GGBT_wsf_view||$e,we),Me=parseInt(Fe.width),Pe=pe.width,Ee=pe.height;if(Pe===void 0){var nt=ge.querySelector(".appletParameters");nt&&(Pe=nt.offsetWidth,Ee=nt.offsetHeight)}var ut=Me/Pe,ft=fe?1:Fe.height/Ee;return Ie!==void 0&&!Ie&&(ut=Math.min(1,ut),ft=Math.min(1,ft)),Math.min(ut,ft)}function Ze(pe,ge,Ie){var _e=1,we,fe=!1;if(pe.hasOwnProperty("allowUpscale")&&(fe=pe.allowUpscale),pe.hasOwnProperty("scale")&&(_e=parseFloat(pe.scale),(isNaN(_e)||_e===null||_e===0)&&(_e=1),_e>1&&(fe=!0)),ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(pe.hasOwnProperty("disableAutoScale")&&pe.disableAutoScale))we=ie(pe,ge,fe,Ie,pe.scaleContainerClass);else return _e;return fe&&(!pe.hasOwnProperty("scale")||_e===1)?we:Math.min(_e,we)}function De(pe){var ge=Math.min(window.innerWidth,document.documentElement.clientWidth),Ie=Math.min(window.innerHeight,document.documentElement.clientHeight),_e=pe.getBoundingClientRect(),we=(ge-_e.width)/2,fe=(Ie-_e.height)/2;fe<0&&(fe=0),pe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?pe.style.left="40px":pe.style.left=we+"px",pe.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?pe.style.top="40px":pe.style.top=fe+"px",pe.style.left=we+"px")}function Oe(pe,ge){var Ie=pe.querySelector(".appletParameters");if(Ie){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ge.id!==Ie.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(pe)}if(Ie.parentElement&&/fullscreen/.test(Ie.parentElement.className))return;var _e=Ze(ge,pe);jt()&&Ie.setAttribute("data-param-scale",_e);for(var we=null,fe=0;fe<pe.childNodes.length;fe++)if(pe.childNodes[fe].className!==void 0&&pe.childNodes[fe].className.match(/^applet_scaler/)){we=pe.childNodes[fe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var $e=ge.id!==void 0?ge.id:"ggbApplet",ve=window[$e];(ve==null||!ve.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(_e)&&_e!==1?(we.parentNode.style.width=ge.width*_e+"px",we.parentNode.style.height=ge.height*_e+"px",qt(we,_e)):(qt(we,1),we.parentNode.style.width=ge.width+"px",we.parentNode.style.height=ge.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&De(pe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ie).parents(".content-added-content"))}}return{responsiveResize:Oe,isFlexibleWorksheetEditor:jt,positionCenter:De,getScale:Ze,scaleElement:qt}}();__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 jt=n.location.search;return jt.indexOf(J)!=-1||jt.indexOf(K)!=-1}function q(jt,qt){}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(jt){var qt=s[L].bindings;s[L].bindings=function(){for(var he=qt?qt():{},ie=jt[webModule.__softPermutationId],Ze=O;Ze<ie.length;Ze++){var De=ie[Ze];he[De[O]]=De[P]}return he}};var t;function u(){return v(),t}function v(){if(!t){var jt=o.createElement(Q);if(jt.id=L,jt.style.cssText=R+S,jt.tabIndex=-1,o.body.appendChild(jt),t=jt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var qt=document.compatMode==U?V:W;t.write(qt+X),t.close()}}}function w(jt){function qt(ie){function Ze(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var De=Ze();if(De){ie();return}function Oe(){if(!De){if(!Ze())return;De=!0,ie(),o.removeEventListener&&o.removeEventListener(Z,Oe,!1),pe&&clearInterval(pe)}}o.addEventListener&&o.addEventListener(Z,Oe,!1);var pe=setInterval(function(){Oe()},$)}function he(ie){var Ze=u(),De=Ze.body,Oe=Ze.createElement(_);Oe.language=ab,Oe.crossOrigin=W,Oe.src=ie,webModule.__errFn&&(Oe.onerror=function(){webModule.__errFn(L,new Error(bb+ie))}),De.appendChild(Oe)}qt(function(){he(jt)})}webModule.__startLoadingFragment=function(jt){return C(jt)},webModule.__installRunAsyncCode=function(jt){var qt=u(),he=qt.body,ie=qt.createElement(_);ie.language=ab,ie.text=jt,he.appendChild(ie),he.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(jt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(jt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(jt){var qt=c[jt];return qt==null?null:qt},r=d,webModule.__errFn=e}function B(){function jt(pe){var ge=pe.lastIndexOf(rb);ge==-1&&(ge=pe.length);var Ie=pe.indexOf(sb);Ie==-1&&(Ie=pe.length);var _e=pe.lastIndexOf(tb,Math.min(Ie,ge));return _e>=O?pe.substring(O,_e+P):W}function qt(pe){if(!pe.match(/^\w+:\/\//)){var ge=o.createElement(ub);ge.src=pe+vb,pe=jt(ge.src)}return pe}function he(){var pe=__gwt_getMetaProperty(wb);return pe!=null?pe:W}function ie(){for(var pe=o.getElementsByTagName(_),ge=O;ge<pe.length;++ge)if(pe[ge].src.indexOf(xb)!=-1)return jt(pe[ge].src);return W}function Ze(){var pe=o.getElementsByTagName(yb);return pe.length>O?pe[pe.length-P].href:W}function De(){var pe=o.location;return pe.href==pe.protocol+zb+pe.host+pe.pathname+pe.search+pe.hash}var Oe=he();return Oe==W&&(Oe=ie()),Oe==W&&(Oe=Ze()),Oe==W&&De()&&(Oe=jt(o.location.href)),Oe=qt(Oe),Oe}function C(jt){return jt.match(/^\//)||jt.match(/^[a-zA-Z]+:\/\//)?jt:webModule.__moduleBase+jt}function D(){var jt=[],qt=O,he=[],ie=[];function Ze(pe){var ge=ie[pe](),Ie=he[pe];if(ge in Ie)return ge;var _e=[];for(var we in Ie)_e[Ie[we]]=we;throw r&&r(pe,_e,ge),null}if(__gwt_isKnownPropertyValue=function(pe,ge){return ge in he[pe]},webModule.__getPropMap=function(){var pe={};for(var ge in he)he.hasOwnProperty(ge)&&(pe[ge]=Ze(ge));return pe},webModule.__computePropValue=Ze,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var De;try{De=Cb;var Oe=De.indexOf(Db);Oe!=-1&&(qt=parseInt(De.substring(Oe+P),$),De=De.substring(O,Oe))}catch(pe){}return webModule.__softPermutationId=qt,C(De+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},67303:function(jt,qt,he){"use strict";he.d(qt,{Ax:function(){return Oe},Ds:function(){return pe},KI:function(){return Ie},SI:function(){return De},f1:function(){return Ze}});var ie=he(90524);function Ze(_e){let we=!0;if(_e.length>0){for(let fe=0;fe<_e.length;fe++)if(_e[fe].compile_success==0||!_e[fe].compile_success){we=!1;break}}else we=!1;return we}function De(_e,we=""){let fe=[];for(let $e=0;$e<_e.length;$e++){let ve=_e[$e],ht=we?`${we}/${ve.name}`:`${ve.name}`;fe.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:ht})}return fe}function Oe(_e,we,fe){for(let $e=0;$e<_e.length;$e++){let ve=_e[$e];if(ve.key===we){ve.children=fe;break}ve.children&&Oe(ve.children,we,fe)}return _e}function pe(_e,we,fe){let $e;return function(){let ve=this,ht=arguments,Fe=function(){$e=null,fe||_e.apply(ve,ht)},Me=fe&&!$e;clearTimeout($e),$e=setTimeout(Fe,we),Me&&_e.apply(ve,ht)}}const ge=!0,Ie=ie.Z.API_SERVER},6077:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return $e}});var ie=he(59301),Ze={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},De=he(92310),Oe=he.n(De),pe=he(29787),ge=he(2859),Ie=he(82093),_e=he(49661),we=(ve,ht,Fe)=>new Promise((Me,Pe)=>{var Ee=ft=>{try{ut(Fe.next(ft))}catch(ct){Pe(ct)}},nt=ft=>{try{ut(Fe.throw(ft))}catch(ct){Pe(ct)}},ut=ft=>ft.done?Me(ft.value):Promise.resolve(ft.value).then(Ee,nt);ut((Fe=Fe.apply(ve,ht)).next())}),$e=({data:ve,className:ht,fullWidth:Fe,style:Me={},onClose:Pe,onOk:Ee,showFullTools:nt,noAssociationId:ut})=>{const ft=(0,ie.useRef)(null),ct=(0,ie.useRef)(null),et=(0,ie.useRef)(null),Ae=(0,ie.useRef)(null),[it,Ut]=(0,ie.useState)(!1),[Ye,We]=(0,ie.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ie.useEffect)(()=>(et.current||(et.current=document.createElement("style"),document.head.appendChild(et.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),et.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Ct()):(document.body.removeAttribute("data-custom"),et.current&&(document.head.removeChild(et.current),et.current=null)),()=>{document.body.removeAttribute("data-custom"),et.current&&(document.head.removeChild(et.current),et.current=null)}),[ve==null?void 0:ve.visible]);const Ct=()=>we(void 0,null,function*(){Ut(!0),We("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ot=yield(0,_e.ZJ)(ve==null?void 0:ve.src);ft.current.src="",ft.current.src=ot,ft.current.onload=function(){Be()},Ut(!1),We("")}),Le=ot=>we(void 0,null,function*(){Ut(!0),We("\u6B63\u5728\u4FDD\u5B58\u4E2D");const un=yield(0,Ie.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:ot.dataUrl}});un!=null&&un.id&&!ut?(yield(0,Ie.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:un==null?void 0:un.id,settings:JSON.stringify(ot.state)}})).status===0&&Ee():un!=null&&un.id&&Ee(un),Ut(!1),We("")}),Xe=()=>{const ot=document.querySelector('a[href="https://markerjs.com/"]');ot&&ot.parentNode&&(ot.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(Lt=>{const Dn=document.querySelector(Lt.name);Dn&&Dn.setAttribute("title",Lt.title)})},Be=()=>{ct.current=new ge.hP(ft.current),ct.current.targetRoot=Ae.current,ct.current.addEventListener("render",Le),ct.current.addEventListener("beforeclose",Pe),nt&&(ct.current.availableMarkerTypes=ct.current.ALL_MARKER_TYPES,ct.current.uiStyleSettings.redoButtonVisible=!0,ct.current.uiStyleSettings.notesButtonVisible=!0,ct.current.uiStyleSettings.zoomButtonVisible=!0,ct.current.uiStyleSettings.zoomOutButtonVisible=!0,ct.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ct.current.uiStyleSettings,ct.current.show(),ve!=null&&ve.snapshotData&&ct.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Xe()},300)};return ie.createElement(ie.Fragment,null,(ve==null?void 0:ve.visible)&&ie.createElement(pe.Z,{spinning:it,tip:Ye,style:{position:"absolute",width:"100vw"}},ie.createElement("div",{ref:Ae,className:Oe()(Ze.imageDimensions,ht,Fe?Ze.fullWidth:""),style:Me},ie.createElement("img",{className:Ze.img,ref:ft}))))}},88615:function(jt,qt,he){"use strict";var ie=he(59301),Ze=he(77019),De=he(5269),Oe=he(20554),pe=he(99571),ge=he(38394),Ie=he(21697),_e=he(48136),we=he(59301);const fe=(0,ie.forwardRef)(({callback:$e,showSaveButton:ve,value:ht=""},Fe)=>{const Me=(0,ie.useRef)(),Pe=[{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}`}]}]}],nt=ct=>{Me.current.setValue(Me.current.getValue()+" "+ct.value+" ")},ut=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(Ze.Z,{className:Ie.Z.lists,gutter:[10,10]},Pe.map((ct,et)=>we.createElement(De.Z,{flex:"110px",className:Ie.Z.item},we.createElement("div",null,we.createElement(ge.Z,{value:`$$${ct.value}$$`}),ct.name),we.createElement("div",{className:Ie.Z.children},ct.children.map((Ae,it)=>we.createElement("div",{key:it},we.createElement("h1",null,Ae.name),we.createElement(Ze.Z,{gutter:[10,10]},Ae.data.map((Ut,Ye)=>we.createElement(De.Z,{key:Ye,onClick:()=>nt(Ut),className:Ie.Z.diamond},we.createElement(ge.Z,{value:"`$$"+Ut.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(Ze.Z,{className:Ie.Z.lists,gutter:[10,10]},Ee.map((ct,et)=>we.createElement(De.Z,{flex:"110px",className:Ie.Z.item},we.createElement("div",null,we.createElement(ge.Z,{value:"`$$"+ct.value+"$$`"}),ct.name),we.createElement("div",{className:Ie.Z.children},ct.children.map((Ae,it)=>we.createElement("div",{key:it},Ae.name&&we.createElement("h1",null,Ae.name),we.createElement(Ze.Z,{gutter:[10,10]},Ae.data.map((Ut,Ye)=>we.createElement(De.Z,{key:Ye,onClick:()=>nt(Ut),className:Ie.Z.diamond},we.createElement(ge.Z,{value:"`$$"+Ut.value+"$$`"}))))))))))}],ft=()=>{var ct=document.createElement("div");ct.innerHTML=Me.current.getValue();var et=ct.innerText;return $e&&$e(et),et};return(0,ie.useImperativeHandle)(Fe,()=>({getData:ft})),we.createElement("div",{className:Ie.Z.mathWrap},we.createElement(Oe.default,{defaultActiveKey:"1",items:ut}),we.createElement("math-field",{locale:"zh_cn",className:Ie.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Me,style:{width:800,marginTop:30,fontSize:18}},ht||""),ve&&we.createElement("div",{className:Ie.Z.button},we.createElement(pe.ZP,{size:"large",onClick:ft,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});qt.Z=fe},57884:function(jt,qt,he){"use strict";var ie=he(59301),Ze=he(93314),De=he(99571),Oe=Object.defineProperty,pe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,fe=(Fe,Me,Pe)=>Me in Fe?Oe(Fe,Me,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Fe[Me]=Pe,$e=(Fe,Me)=>{for(var Pe in Me||(Me={}))_e.call(Me,Pe)&&fe(Fe,Pe,Me[Pe]);if(Ie)for(var Pe of Ie(Me))we.call(Me,Pe)&&fe(Fe,Pe,Me[Pe]);return Fe},ve=(Fe,Me)=>pe(Fe,ge(Me));const ht=({img:Fe,buttonProps:Me={},styles:Pe={},customText:Ee,ButtonText:nt,ButtonClick:ut,Buttonclass:ft,ButtonTwo:ct,imgStyles:et,loading:Ae=!1,className:it=""})=>ie.createElement("section",{className:`tc animated fadeIn ${it}`,style:$e({color:"#999",margin:"100px auto",visibility:Ae?"hidden":"visible"},Pe)},ie.createElement("img",{src:Fe||Ze,style:ve($e({},et),{pointerEvents:"none",userSelect:"none"})}),ie.createElement("p",{className:"mt20 font14"},Ee||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),nt&&ie.createElement(De.ZP,$e({className:ft,onClick:ut},Me),nt),ct&&ct);qt.Z=ht},41550:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return ft}});var ie=he(59301),Ze={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},De=he(99571),Oe=he(70557),pe=he(51124),ge=he(25399),Ie=he(49661),_e=he(72664),we=he(57884),fe=he(90524),$e=he(14794),ve=he(59301),ht=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ee=(ct,et,Ae)=>et in ct?ht(ct,et,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):ct[et]=Ae,nt=(ct,et)=>{for(var Ae in et||(et={}))Me.call(et,Ae)&&Ee(ct,Ae,et[Ae]);if(Fe)for(var Ae of Fe(et))Pe.call(et,Ae)&&Ee(ct,Ae,et[Ae]);return ct},ut=(ct,et,Ae)=>new Promise((it,Ut)=>{var Ye=Le=>{try{Ct(Ae.next(Le))}catch(Xe){Ut(Xe)}},We=Le=>{try{Ct(Ae.throw(Le))}catch(Xe){Ut(Xe)}},Ct=Le=>Le.done?it(Le.value):Promise.resolve(Le.value).then(Ye,We);Ct((Ae=Ae.apply(ct,et)).next())}),ft=({editOffice:ct="view",data:et,issaver:Ae,onSaver:it,theme:Ut,type:Ye,filename:We,monacoEditor:Ct,className:Le,style:Xe,close:Be,onClose:ot,hasMask:un,disabledDownload:Lt,onImgDimensions:Dn,showNodata:ln,recordInfo:me})=>{const[de,mt]=(0,ie.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[sn,Rt]=(0,ie.useState)(""),[Re,tt]=(0,ie.useState)(),rt=window.ENV==="build"?"/react/build":"",dn=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,Jt=10*(1024*1024),He=(0,ie.useRef)();et!=null&&et.startsWith("/api")&&Ye!=="txt"&&(et=fe.Z.API_SERVER+et);const Tt=oe=>oe.substring(oe.lastIndexOf("/")+1).split(".").pop();We&&Ct&&(Ct.filename=We),(0,ie.useEffect)(()=>{var oe,se;const ne=(se=(oe=document.cookie)==null?void 0:oe.replace(/\s/g,""))==null?void 0:se.split(";");ne==null||ne.map(be=>{let Ve=be.split("=");Ve[0]==="_educoder_session"&&Rt(Ve[1])})},[]),(0,ie.useEffect)(()=>{Ye==="office"&&(et.indexOf("bigfilescdn.")>-1||et.indexOf("bigfiles1")>-1?tt({url:et,fileType:Tt(et),model:et.indexOf("model=edit")?"edit":"view"}):ae())},[Ye,et]);function Nt(oe){return ut(this,null,function*(){oe.data.type==="pdfdata"&&(it(oe.data.data),window.removeEventListener("message",Nt,!1)),console.log("mess---:",oe.data)})}const ae=()=>ut(void 0,null,function*(){console.log("data:",et);let oe=et;et.startsWith("http")||(oe=location.origin+oe);let se=new URL(oe).pathname.split("/").pop();const ne=yield(0,_e.gJ)({attachment_id:se});ne.url=dn+ne.url,tt(ne)}),te=()=>{if(et.startsWith("http")||et.startsWith("blob:")){z();return}(0,Ie.Sv)(We||"educoder",et,We)},z=()=>{me&&(0,$e.fc)({id:me==null?void 0:me.id,watch_type:1,course_id:me==null?void 0:me.course_id}),(0,Ie.Nd)(We||"educoder",decodeURIComponent(et))};return ve.createElement("div",{style:nt({},Xe||{}),className:`${un&&Ze.bgBlack} ${Ye?Ze.wrp:"hide"}`},Be&&ve.createElement("div",{className:Ze.close,ref:He},!!Dn&&ve.createElement(ge.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>He.current},ve.createElement("span",{onClick:()=>{ot(),Dn()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Lt&&ve.createElement(ge.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>He.current},ve.createElement("span",{onClick:z},ve.createElement("i",{className:"icon-quxiaozhiding"}))),Ae&&ve.createElement(ge.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>He.current},ve.createElement("span",{className:"",onClick:()=>{const oe=document.getElementById("pdfiframe");window.addEventListener("message",Nt,!1),setTimeout(()=>{oe.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(ge.Z,{title:"\u5173\u95ED",getPopupContainer:()=>He.current},ve.createElement("span",{className:"",onClick:()=>{ot()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${Ze[Le]} ${Le} ${Ze.monaco} ${Ye==="txt"?"show":"hide"}`},Ye==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(pe.ZP,nt({},Ct)))),Ye==="audio"&&ve.createElement("audio",{src:`${(et==null?void 0:et.indexOf("http://"))>-1||(et==null?void 0:et.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${et}`,autoPlay:!0}),Ye==="video"&&ve.createElement(ve.Fragment,null,(et==null?void 0:et.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${et}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${et}`,autoPlay:!0})),Ye==="office"&&Re&&ve.createElement("iframe",{src:`${rt}/office.html?key=${Re.key}&url=${btoa(Re.url)}&callbackUrl=${dn+(Re.callbackUrl||"")}&fileType=${Re.fileType}&title=${Re.title||""}&model=${ct}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!Lt}`}),Ye==="html"&&ve.createElement("iframe",{src:et+"&disposition=inline"}),Ye==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${rt}/js/pdfview/index.html?filename=${We||"educoder.pdf"}&url=${encodeURIComponent(et)}&disabledDownload=${!!Lt}&model=${ct}`}),Ye==="image"&&ve.createElement("img",{src:`${(et==null?void 0:et.indexOf("http://"))>-1||(et==null?void 0:et.indexOf("https://"))>-1?"":"data:image/png;base64,"}${et}`}),(Ye==="other"||Ye==="download")&&ve.createElement(ve.Fragment,null,ln?ve.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(De.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:Lt},"\u4E0B\u8F7D")}):ve.createElement(De.ZP,{type:"primary",size:"middle",onClick:te,disabled:Lt},ve.createElement(Oe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ye==="flowChart"&&ve.createElement("div",{className:"embed"},ve.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${et||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(jt,qt,he){"use strict";he.d(qt,{z:function(){return Ct},Z:function(){return Le}});var ie=he(59301),Ze=he(88831),De=he(90290),Oe=he(64018),pe=he(68535),ge=he(90524),Ie=he(49661),_e=he(15342),we=he(77736),fe=he(99571),$e=he(1012),ve=he(41550),ht=he(59301),Me=({html:Xe})=>{const Be=(0,ie.useRef)(null),ot=(0,ie.useRef)(null),un=`.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 Lt=Be.current.attachShadow({mode:"open"});ot.current=document.createElement("div"),ot.current.className="markdown-body",ot.current.innerHTML=Xe,Lt.appendChild(ot.current);const Dn=document.createElement("style");return Dn.textContent=un,Lt.appendChild(Dn),()=>{Lt.innerHTML=""}},[]),(0,ie.useEffect)(()=>{ot.current&&(ot.current.innerHTML=Xe)},[Xe]),ht.createElement("div",{ref:Be})};function Pe(Xe){const Be=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],ot=new RegExp(`\\b(${Be.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Xe.replace(ot,"").trim()}var Ee={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},nt=Object.defineProperty,ut=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,et=(Xe,Be,ot)=>Be in Xe?nt(Xe,Be,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Xe[Be]=ot,Ae=(Xe,Be)=>{for(var ot in Be||(Be={}))ft.call(Be,ot)&&et(Xe,ot,Be[ot]);if(ut)for(var ot of ut(Be))ct.call(Be,ot)&&et(Xe,ot,Be[ot]);return Xe};const it="@\u2581\u2581@",Ut="@\u2581@",Ye=/<pre[^>]*>/g;function We(Xe){let Be=document.createElement("div");return Be.innerHTML=Xe,Be.childNodes.length===0?"":Be.childNodes[0].nodeValue}const Ct=(Xe,Be)=>{Xe=Xe||"";const ot=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,un=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Lt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Dn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Be?Xe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ot,(ln,me,de,mt,sn,Rt,Re)=>{const tt=me||mt||Rt,rt=de||sn||Re||"?";return ge.Z.API_SERVER+"/api/attachments/"+tt+rt+"&t="+(0,Ie.Jn)(tt,Date.now())+(ln.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Xe=Xe.replace(Dn,(ln,me,de,mt,sn,Rt,Re)=>{const tt=me||mt||Rt,rt=de||sn||Re||"?";return ge.Z.API_SERVER+"/attachments/download/"+tt+rt+"&t="+(0,Ie.Jn)(tt,Date.now())+(ln.indexOf(")")>-1?")":"&")}).replace(ot,(ln,me,de,mt,sn,Rt,Re)=>{const tt=me||mt||Rt,rt=de||sn||Re||"?";return ge.Z.API_SERVER+"/api/attachments/"+tt+rt+"&t="+(0,Ie.Jn)(tt,Date.now())+(ln.indexOf(")")>-1?")":"&")}).replace(un,(ln,me,de,mt,sn)=>{const Rt=me||mt,Re=de||sn||"";return'"'+ge.Z.API_SERVER+"/api/attachments/"+Rt+Re+Rt+Re+"&t="+(0,Ie.Jn)(Rt,Date.now())}).replace(Lt,(ln,me,de,mt,sn)=>{const Rt=me||mt,Re=de||sn||"";return"("+ge.Z.API_SERVER+"/files/uploads/"+Rt+Re+Rt+Re+"&t="+(0,Ie.Jn)(Rt,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,`
|
|
`),Xe)};var Le=({value:Xe="",edit:Be=!1,className:ot,showTextOnly:un,showLines:Lt,style:Dn={},stylesPrev:ln={},highlightKeywords:me,showProgramFill:de,isProgramFill:mt,disabledFill:sn=!1,programFillValue:Rt,openEditor:Re=()=>{},onFillChange:tt=bt=>{},onFillBlur:rt=()=>{},onFillFocus:dn=()=>{}})=>{let bt=Pe(String(Xe||""));const Jt=(0,ie.useRef)(),He=(0,ie.useRef)(),[Tt,Nt]=(0,ie.useState)(""),[ae,te]=(0,ie.useState)("office"),[z,oe]=(0,ie.useState)([]),se=(0,ie.useRef)("a"+(0,$e.Z)()),ne={},be=Ne=>/<style[\s\S]*?>/i.test(Ne||""),Ve=(Ne,Zt,pt)=>{const St=document.createElement(Ne===Ut?"input":"textarea");St.style.width="100%",St.style.height=Ne===Ut?"40px":"151px",St.rows=5,St.spellcheck=!1,St.name="edu-program-fill",St.placeholder="\u8BF7\u8F93\u5165",St.dataset.id=Zt;const Ft=Object.keys(ne).length;return ne[Ft]=St,`<span class="edu-program-fill-wrap ${Ne===Ut?"":"show"}" style="width:${Ne===Ut?"600px":"100%"}" title=${pt||""}><span>${St.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Wt(Ne){return Ne=Ne.replace(/!\[.*?\]\(.*?\)/g,""),Ne=Ne.replace(/\[.*?\]\(.*?\)/g,""),Ne=Ne.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ne=Ne.replace(/<embed.*?>/g,""),Ne=Ne.replace(/<img.*?>/g,""),Ne=Ne.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ne=Ne.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ne=Ne.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ne=Ne.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ne}const It=Ne=>!un&&be(bt)?Ne:Ne.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Zt,pt){let St=pt.replace(/(\n|\r)/g,"").split("}"),Ft=[];return St.map(xn=>{xn!=""&&Ft.push(`.${se.current} ${xn}`)}),`<style>${Ft.join("}")}</style>`}),gt=(0,ie.useMemo)(()=>{try{const St=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ft=/\"\/api\/attachments\/|\"\/attachments\/download\//g,xn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,_t=/\(\/attachments\/download\//g;bt=bt.replace(_t,"("+ge.Z.API_SERVER+"/attachments/download/").replace(St,"("+ge.Z.API_SERVER+"/api/attachments/").replace(Ft,'"'+ge.Z.API_SERVER+"/api/attachments/").replace(xn,'"'+ge.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),Jt.current.style.display="none"}catch(St){}if(de){let St=-1;return bt=bt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Ft,xn,_t){var Cn;return++St,Ve(Ft,St,(Cn=Rt==null?void 0:Rt[St])==null?void 0:Cn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${It(bt||"")}</pre>`}let Ne=It(bt);Ne=(0,De.ZP)(Ne);const Zt=(0,De.ez)();bt.match(/\[TOC\]/)&&(Ne=Ne.replace("<p>[TOC]</p>",(0,De.Qv)()),(0,De.Iy)()),Ne=Ne.replace(/(__special_katext_id_\d+__)/g,(St,Ft)=>{const{type:xn,expression:_t}=Zt[Ft];return(0,_e.renderToString)(We(_t)||"",{displayMode:xn==="block",throwOnError:!1,output:"html"})}),Ne=Ne.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,De.AL)();const pt=document.createElement("div");if(pt.innerHTML=Ne,un)return pt.innerText;if(me){const St=me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return hn(pt,St),pt.innerHTML}return setTimeout(()=>yt(),500),pt.innerHTML},[bt,me]);(0,ie.useEffect)(()=>{at.current&&at.current.querySelectorAll(["input","textarea"]).forEach(Zt=>{Zt.oninput=At,Zt.onblur=nn,Zt.onfocus=$t})},[z]),(0,ie.useEffect)(()=>{var Ne,Zt,pt,St,Ft;if(Rt!=null&&Rt.length)try{const xn=at.current.querySelectorAll(".edu-program-fill-score"),_t=at.current.querySelectorAll('[name="edu-program-fill"]');for(const[Cn,Tn]of _t.entries())Tn.value=((Ne=Rt==null?void 0:Rt[Cn])==null?void 0:Ne.value)||"",((Zt=Rt==null?void 0:Rt[Cn])==null?void 0:Zt.type)==="warning"?Tn.className="program-fill-warning":((pt=Rt==null?void 0:Rt[Cn])==null?void 0:pt.type)==="success"?Tn.className="program-fill-success":Tn.className="";for(const[Cn,Tn]of xn.entries())Tn.innerHTML=(St=Rt==null?void 0:Rt[Cn])!=null&&St.score?`${(Ft=Rt==null?void 0:Rt[Cn])==null?void 0:Ft.score}\u5206`:"";oe(Rt)}catch(xn){console.log(xn,"error")}},[Rt]);const At=Ne=>{z[Ne.target.dataset.id]=z[Ne.target.dataset.id]||{},z[Ne.target.dataset.id].value=Ne.target.value,oe([...z]),tt(z,Ne.target.dataset.id)},nn=Ne=>{z[Ne.target.dataset.id]=z[Ne.target.dataset.id]||{},z[Ne.target.dataset.id].value=Ne.target.value,oe([...z]),rt(z,Ne.target.dataset.id)},$t=Ne=>{z[Ne.target.dataset.id]=z[Ne.target.dataset.id]||{},z[Ne.target.dataset.id].value=Ne.target.value,oe([...z]),dn(z,Ne.target.dataset.id)};function hn(Ne,Zt){return Ne.childNodes.forEach(pt=>{var St;if(pt.childNodes.length>0)hn(pt,Zt);else if(pt.nodeName!=="IMG")if(pt.innerHTML)pt.innerHTML=(St=pt.innerHTML)==null?void 0:St.replace(new RegExp(Zt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ft=document.createElement("span");Ft.innerHTML=pt.textContent.replace(new RegExp(Zt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),pt.replaceWith(Ft)}})}const at=(0,ie.useRef)();De.jb.WebkitLineClamp=Lt,Lt&&(Dn=Ae(Ae({},Dn),De.jb));function xe(Ne){let Zt=Ne.target;if(Zt.tagName.toUpperCase()==="A"){let pt=Zt.getAttribute("href");if(pt.indexOf("office")>-1)Ne.preventDefault(),Nt(pt),te("office");else if(pt.indexOf("application/pdf")>-1)Ne.preventDefault(),Nt(pt),te("pdf");else if(pt.indexOf("text/html")>-1)Ne.preventDefault(),Nt(pt),te("html");else if(pt.startsWith("#")){Ne.preventDefault();let St=document.getElementById(pt.replace("#",""));St&&St.scrollIntoView(!0)}}}const yt=()=>{var Ne;const Zt=(Ne=at.current)==null?void 0:Ne.querySelectorAll("video");Zt==null||Zt.forEach(pt=>{if(pt.oncontextmenu=()=>!1,pt.src.indexOf(".m3u8")>-1&&!pt.canPlayType("application/vnd.apple.mpegurl")){if(pe.ZP.isSupported()){var St=new pe.ZP;St.loadSource(pt.src),St.attachMedia(pt)}}})};(0,ie.useEffect)(()=>{if(at.current&>&>.match(Ye)&&window.PR.prettyPrint(),at.current)return at.current.addEventListener("click",xe),()=>{var Ne;(Ne=at.current)==null||Ne.removeEventListener("click",xe),(0,De.AL)(),(0,De.Iy)()}},[gt,at.current,xe]);const xt=Ne=>{Ne.target.nodeName==="IMG"&&Ne.target.className.indexOf("draw-flowchart")>-1?(Jt.current.style.zIndex=1,Jt.current.style.display="flex",Jt.current.style.width=Ne.target.clientWidth+"px",Jt.current.style.height=Ne.target.clientHeight+"px",Jt.current.style.top=Ne.target.offsetTop+"px",Jt.current.style.left=Ne.target.offsetLeft+"px",Ne.target.id&&(He.current=Ne.target.id)):Jt.current.style.display="none"},Dt=()=>{Jt.current.style.display="none"};return(0,ie.useEffect)(()=>{var Ne;const Zt=pt=>{pt.preventDefault(),pt.clipboardData.setData("text",window.getSelection().toString())};return(Ne=at.current)==null||Ne.addEventListener("copy",Zt),()=>{var pt;(pt=at.current)==null||pt.removeEventListener("copy",Zt)}},[at.current]),ie.createElement("div",{style:{position:"relative"},onMouseLeave:Dt},un&&ie.createElement("div",{ref:at,className:`${Ee.mdBody} `},gt),!un&&!be(gt)&&ie.createElement("div",{ref:at,style:Ae({},Dn),onMouseOver:xt,className:`${ot||""} ${sn?"disabled-fill":""} markdown-body ${Ee.mdBody} ${se.current}`,dangerouslySetInnerHTML:{__html:gt}}),!un&&be(gt)&&ie.createElement(Me,{html:gt}),ie.createElement("div",{ref:Jt,className:`${Ee.button} ${Be?"":Ee.previewFlowChart}`},ie.createElement(we.Z,null,ie.createElement(fe.ZP,{onClick:()=>{Be?Re(He.current):(Nt(He.current),te("flowChart"))}},Be?"\u7F16\u8F91":"\u9884\u89C8"))),ie.createElement(ve.Z,{close:!0,data:Tt,type:Tt!=null&&Tt.length?ae:"",style:Ae({},ln),onClose:()=>Nt("")}))}},39479:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return Oe}});var ie=he(59301),Ze=he(33796),De=he(90083),Oe=()=>{const[pe,ge]=(0,ie.useState)(""),[Ie,_e]=(0,ie.useState)(0);let[we,fe]=(0,ie.useState)(),[$e,ve]=(0,ie.useState)();const[ht,Fe]=(0,ie.useState)(!1),Me=(0,ie.useRef)("");(0,ie.useEffect)(()=>Ze.Z.subscribe("preview-image",Ye=>{ge(Ye),console.log(Ae.current)}),[]),(0,ie.useEffect)(()=>(document.addEventListener("keydown",Pe),()=>{document.removeEventListener("keydown",Pe)}),[]),(0,ie.useEffect)(()=>{Me.current=pe},[pe]);function Pe(Ut){console.log("e====",Ut),Ut.keyCode==27&&Me.current&&Ee()}function Ee(){document.body.style.overflow="auto",fe(void 0),ve(void 0),_e(0),ge("")}function nt(){_e(Ie+90)}function ut(){we=Ae.current.width*1.1,$e=Ae.current.height*1.1,ve($e),fe(we)}function ft(){we=Ae.current.width/1.1,$e=Ae.current.height/1.1,ve($e),fe(we)}const ct=(0,ie.useRef)(),et=(0,ie.useRef)(),Ae=(0,ie.useRef)(),it=Ut=>{(Ut.nativeEvent.target===ct.current||Ut.nativeEvent.target===et.current)&&Ee()};return ie.createElement(ie.Fragment,null,pe?ie.createElement("div",null,ie.createElement("div",{className:"preview-wrp-group",ref:et},ie.createElement(De.Z,{className:"image-preview",src:pe,style:{display:"none"},preview:{visible:!0,src:pe,onVisibleChange:Ut=>{ge("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},44905:function(jt,qt,he){"use strict";he.d(qt,{h:function(){return ct}});var ie=he(59301),Ze=he(82326),De=he(28284),Oe=he(99571),pe=he(89780),ge=he.n(pe),Ie=he(66543),_e=he(59598),we=Object.defineProperty,fe=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Me=(et,Ae,it)=>Ae in et?we(et,Ae,{enumerable:!0,configurable:!0,writable:!0,value:it}):et[Ae]=it,Pe=(et,Ae)=>{for(var it in Ae||(Ae={}))ht.call(Ae,it)&&Me(et,it,Ae[it]);if(ve)for(var it of ve(Ae))Fe.call(Ae,it)&&Me(et,it,Ae[it]);return et},Ee=(et,Ae)=>fe(et,$e(Ae));const nt=Ze.default.Option,ut={labelCol:{span:4},wrapperCol:{span:20}},ft={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};qt.Z=({callback:et,onCancel:Ae})=>{const[it,Ut]=(0,ie.useState)("python");function Ye(Ct){Ut(ft[Ct][1])}function We(Ct){et(Ct)}return ie.createElement(De.default,Ee(Pe({},ut),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:We,style:{width:500}}),ie.createElement(De.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ie.createElement(Ze.default,{getPopupContainer:Ct=>Ct.parentNode,onChange:Ye},Object.keys(ft).map(Ct=>ie.createElement(nt,{key:Ct,value:Ct},ft[Ct][0])))),ie.createElement(De.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ie.createElement(ct,{mode:it})),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Oe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Oe.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))};function ct({value:et,onChange:Ae,mode:it,options:Ut={}}){const Ye=(0,ie.useRef)(),[We,Ct]=(0,ie.useState)();return(0,ie.useEffect)(()=>{if(We){let Le=function(Xe){const Be=Xe.getValue();Ae&&Ae(Be)};return We.on("change",Le),()=>{We.off("change",Le)}}},[We,Ae]),(0,ie.useEffect)(()=>{We&&We.setOption("mode",it)},[We,it]),(0,ie.useEffect)(()=>{We&&(et!==We.getValue()||et==="")&&setTimeout(()=>{We.setValue(et||"")},300)},[We,et]),(0,ie.useEffect)(()=>{if(Ye.current&&!We){const Le=ge().fromTextArea(Ye.current,Pe({mode:it,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ut));Ct(Le)}},[Ye.current,We]),ie.createElement("div",{className:"my-codemirror-container"},ie.createElement("textarea",{ref:Ye}))}},2978:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return Mt}});var ie=he(59301),Ze=he(76560),De=he(89780),Oe=he.n(De),pe=he(76374),ge=he(66543),Ie=he(6313),_e=he(25717),we=he(99498),fe=he(25419),$e=he(67549),ve=he(38394),ht=({value:Et="",className:Bt,showTextOnly:rn,showLines:Yt,style:Qt={}})=>{const wn=(0,ie.useMemo)(()=>"",[Et]);return ie.createElement(ie.Fragment,null,ie.createElement("div",{dangerouslySetInnerHTML:{__html:wn}}))},Fe=Object.defineProperty,Me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ft=(Et,Bt,rn)=>Bt in Et?Fe(Et,Bt,{enumerable:!0,configurable:!0,writable:!0,value:rn}):Et[Bt]=rn,ct=(Et,Bt)=>{for(var rn in Bt||(Bt={}))nt.call(Bt,rn)&&ft(Et,rn,Bt[rn]);if(Ee)for(var rn of Ee(Bt))ut.call(Bt,rn)&&ft(Et,rn,Bt[rn]);return Et},et=(Et,Bt)=>Me(Et,Pe(Bt));let Ae=[{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 it({onActionCallback:Et,title:Bt,icon:rn,actionName:Yt,className:Qt="",children:wn}){function In(){Et(Yt)}return ie.createElement("a",{title:Bt,className:Qt,onClick:In},ie.createElement("i",{className:`${rn}`}),wn)}var Ut=({watch:Et,showNullButton:Bt,showNullProgramButton:rn,onActionCallback:Yt,fullScreen:Qt,insertTemp:wn,hidetoolBar:In,extraUse:kn})=>{const cn=[...Ae,{title:`${Et?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Et?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ie.createElement("ul",{className:"markdown-toolbar-container"},!In&&cn.map((On,qe)=>ie.createElement("li",{key:qe},On.actionName?ie.createElement(it,et(ct({},On),{onActionCallback:Yt})):ie.createElement("span",{className:"v-line"}))),Bt?ie.createElement("li",null,ie.createElement(it,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Yt},ie.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,rn?ie.createElement(ie.Fragment,null,ie.createElement("li",null,ie.createElement(it,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Yt},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ie.createElement("li",null,ie.createElement(it,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Yt},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,wn&&ie.createElement("li",null,ie.createElement(it,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${wn}`,onActionCallback:Yt},ie.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),kn&&ie.createElement("li",null,kn),ie.createElement("li",{className:"btn-full-screen"},ie.createElement(it,{icon:`${Qt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Qt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Yt})))},Ye=he(75790),We=he(28284),Ct=he(37568),Le=he(99571),Xe=Object.defineProperty,Be=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable,ln=(Et,Bt,rn)=>Bt in Et?Xe(Et,Bt,{enumerable:!0,configurable:!0,writable:!0,value:rn}):Et[Bt]=rn,me=(Et,Bt)=>{for(var rn in Bt||(Bt={}))Lt.call(Bt,rn)&&ln(Et,rn,Bt[rn]);if(un)for(var rn of un(Bt))Dn.call(Bt,rn)&&ln(Et,rn,Bt[rn]);return Et},de=(Et,Bt)=>Be(Et,ot(Bt));const mt={labelCol:{span:4},wrapperCol:{span:20}};var sn=({callback:Et,onCancel:Bt})=>{function rn(Yt){Et(Yt)}return ie.createElement(We.default,de(me({},mt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:rn,style:{width:500}}),ie.createElement(We.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ie.createElement(Ct.default,null)),ie.createElement(We.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ie.createElement(Ct.default,null)),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Le.ZP,{type:"ghost",onClick:Bt},"\u53D6\u6D88")))},Rt=he(44905),Re=he(45596),tt=he(62957),rt=he(77019),dn=he(6077),bt=he(59301),Jt=({callback:Et,onCancel:Bt})=>{const rn=document.createElement("canvas"),Yt=rn.getContext("2d");rn.width=1e3,rn.height=800,Yt.fillStyle="#ffffff",Yt.fillRect(0,0,rn.width,rn.height);const Qt=rn.toDataURL("image/png");return bt.createElement(tt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},bt.createElement(rt.Z,{style:{height:"100vh"}},bt.createElement(dn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Qt,visible:!0,title:String(Date.now())},onOk:wn=>{Et({src:wn.url})},onClose:Bt})))},He=he(30641),Tt=he(5269),Nt=he(6767),ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},te=he(59301),oe=(0,ie.forwardRef)(({onCancel:Et,editImgId:Bt,callback:rn},Yt)=>{let Qt=(0,ie.useRef)(),wn=(0,ie.useRef)(),In=(0,ie.useRef)(),kn=(0,ie.useRef)(!1);const cn=(0,ie.useRef)(!1);console.log("ref:",Yt);const[On,qe]=(0,ie.useState)(0),[je,Ot]=(0,ie.useState)("100vh");return(0,ie.useEffect)(()=>{qe(1)},[]),(0,ie.useImperativeHandle)(Yt,()=>({setHeight:Ot})),te.createElement("div",{ref:cn,className:"body-overflow-initial"},te.createElement(He.Z,{width:"100vw",height:je,footer:null,closable:!0,placement:"bottom",open:!!On,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ae.drawerWrap}`,onClose:()=>{window.saveDrawData(Ln=>{rn({src:`/api/attachments/${Ln}`,id:Ln})})},title:te.createElement(rt.Z,{align:"middle"},te.createElement(Tt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),te.createElement(Tt.Z,{onClick:()=>{Ot(je==="60px"?"100vh":"60px")}},te.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),te.createElement(Tt.Z,{onClick:()=>{window.saveDrawData(Ln=>{if(Ln===null){Nt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Nt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),rn({src:`/api/attachments/${Ln}`,id:Ln,disabledClose:!0})})}},te.createElement(Le.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},te.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Bt||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:wn})))}),se=he(90524),ne=he(47889),be=he(71051);const Ve=ne.ZP.Group,Wt={margin:"0 8px"};var It=({callback:Et,onCancel:Bt})=>{function rn(Yt){Et(Yt)}return ie.createElement(We.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:rn},ie.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ie.createElement("span",{style:Wt},"\u5355\u5143\u683C\u6570\uFF1A"),ie.createElement("span",{style:Wt},"\u884C\u6570"),ie.createElement(We.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ie.createElement(be.Z,null)),ie.createElement("span",{style:Wt},"\u5217\u6570"),ie.createElement(We.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ie.createElement(be.Z,null))),ie.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ie.createElement("span",{style:Wt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ie.createElement(We.default.Item,{name:"align"},ie.createElement(Ve,null,ie.createElement(ne.ZP,{value:"default"},ie.createElement("i",{className:"fa fa-align-justify"})),ie.createElement(ne.ZP,{value:"left"},ie.createElement("i",{className:"fa fa-align-left"})),ie.createElement(ne.ZP,{value:"center"},ie.createElement("i",{className:"fa fa-align-center"})),ie.createElement(ne.ZP,{value:"right"},ie.createElement("i",{className:"fa fa-align-right"}))))),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Le.ZP,{type:"ghost",onClick:Bt},"\u53D6\u6D88")))},gt=he(71411),At=he(11081),nn=he.n(At),hn=(0,ie.forwardRef)(({use3d:Et,width:Bt,height:rn,callback:Yt,showSaveButton:Qt},wn)=>{const In=(0,ie.useRef)(),kn=(0,ie.useRef)(),[cn,On]=(0,ie.useState)(!1),qe=(0,ie.useRef)({id:In,appName:"graphing",width:Bt||1e3,height:rn||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)(()=>{kn.current=new(nn())(qe.current,!0),window.onload=function(){kn.current.inject("applet_container")}},[]);const je=()=>{var Ot=window.ggbApplet.getPNGBase64(1,!0,72);return Yt&&Yt(Ot),Ot};return(0,ie.useEffect)(()=>{qe.current.appName=cn?"3D":"graphing",kn.current.inject("applet_container")},[cn]),(0,ie.useEffect)(()=>{On(Et)},[Et]),(0,ie.useImperativeHandle)(wn,()=>({getImgData:je})),ie.createElement(ie.Fragment,null,ie.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:In}),ie.createElement(rt.Z,{align:"middle"},ie.createElement(Tt.Z,{flex:1},ie.createElement(gt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:cn,onChange:Ot=>On(Ot)})),ie.createElement(Tt.Z,null,ie.createElement(Le.ZP,{size:"large",onClick:je,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),at=he(88615);const xe="link",yt="upload-image",xt="add-flowchart",Dt="draw-image",Ne="add-flowchart",Zt="code-block",pt="add-table",St="------------",Ft={default:St,left:`:${St}`,center:`:${St}:`,right:`${St}:`};var xn=he(17904),_t=he(49661);function Cn(){}let Tn=0;const Mn=1e4,qn="\u2581",$n="@\u2581\u2581@",Nn="@\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 Fn(Et){return/^\d+$/.test(Et)?`${Et}px`:Et}const Je=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Qe={[Je+"-B"]:"bold",[Je+"-I"]:"italic"},Ge={[xe]:"\u6DFB\u52A0\u94FE\u63A5",[Zt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[yt]:"\u6DFB\u52A0\u56FE\u7247",[Dt]:"\u6DFB\u52A0\u753B\u56FE",[xt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[pt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Mt=({defaultValue:Et="",onChange:Bt,width:rn="100%",height:Yt=400,miniToolbar:Qt=!1,isFocus:wn=!1,watch:In,insertTemp:kn,mode:cn="markdown",id:On="markdown-editor-id",showResizeBar:qe=!1,noStorage:je=!1,showNullButton:Ot=!1,showNullProgramButton:Ln=!1,hidetoolBar:zn=!1,fullScreen:Ce=!1,onBlur:Se,onCMBeforeChange:Pt,onFullScreen:dt,className:Te="",disablePaste:lt=!1,disabled:wt=!1,disabledFill:Xt=!1,placeholder:an="",values:vt="",extraUse:Gt,onAddBlank:st})=>{const[Ke,Ht]=(0,ie.useState)(null),[yn,fn]=(0,ie.useState)(Et),[Pn,Kn]=(0,ie.useState)(In),[Jn,ir]=(0,ie.useState)(Ce),[_n,tr]=(0,ie.useState)(""),[Gn,or]=(0,ie.useState)(0),[gr,dr]=(0,ie.useState)(Yt),[yr,br]=(0,ie.useState)(!1),[Cr,hr]=(0,ie.useState)(0),[Pr,xr]=(0,ie.useState)(0),fr=(0,ie.useRef)(),Sr=(0,ie.useRef)(),ar=(0,ie.useRef)(),lr=(0,ie.useRef)(),nr=(0,ie.useRef)(),sr=(0,ie.useRef)(),Rr=(0,Ze.useDispatch)();(0,ie.useEffect)(()=>{const en=window.scrollY||window.pageYOffset;fn(vt),Ke==null||Ke.setValue(vt),window.scrollTo(0,en)},[vt]),(0,ie.useEffect)(()=>{dt==null||dt(Jn)},[Jn]),(0,ie.useEffect)(()=>{if(fr.current){let en=function(pn,bn){var jn;if(lt){bn.preventDefault();return}const vr=bn.clipboardData;if(vr){const ur=vr.types.toString(),Er=vr.items;if(ur==="Files"||vr.types.indexOf("Files")>-1){if(bn.preventDefault(),cn=="stex")return;try{let Dr=Er[1];((jn=Er[0])==null?void 0:jn.kind)==="file"&&(Dr=Er[0]);const Lr=Dr.getAsFile(),zr=Lr.name.split(".").pop();(0,Re.I)(Lr,Ar=>{var _r,ei,Li;Ar.id?((_r=Lr==null?void 0:Lr.type)==null?void 0:_r.indexOf("image"))>-1?Vt.replaceSelection(`<img width="100%" src="/api/attachments/${Ar.id}?type=${Ar.content_type})" alt="" />`):((ei=Lr==null?void 0:Lr.type)==null?void 0:ei.indexOf("video"))>-1?Vt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ar.id}"></video>`):((Li=Lr==null?void 0:Lr.type)==null?void 0:Li.indexOf("pdf"))>-1?Vt.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=${Lr.type}&disposition=inline" target="_blank">${Lr.name}</a>`):Rn.includes(zr)?Vt.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=office&disposition=inline" target="_blank">${Lr.name}</a>`):Vt.replaceSelection(`[${Lr.name}](/api/attachments/${Ar.id}?type=${Ar.content_type})`):(Ar==null?void 0:Ar.status)===401&&(document.location.href="/user/login")})}catch(Dr){Nt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Vt=Oe().fromTextArea(fr.current,{mode:cn,lineNumbers:!Qt,lineWrapping:!0,value:Et,autoCloseTags:!0,autoCloseBrackets:!0});return Vt.on("keyup",function(pn,bn){bn.keyCode===8&&(pn.getValue()==""?Vt.setOption("placeholder",an):Vt.setOption("placeholder",null))}),Vt.on("keydown",function(pn,bn){if(bn.keyCode===8){var jn=Jr(pn);jn&&bn.preventDefault()}}),wn&&Vt.focus(),Vt.on("paste",en),wt&&Vt.on("beforeChange",function(pn,bn){(bn.origin==="paste"||bn.origin==="+input")&&bn.cancel()}),Ht(Vt),()=>{Vt.off("paste",en)}}},[]);const Vr=(0,ie.useCallback)(()=>{if(Sr.current)try{}catch(en){console.log(en,"---- to set md editor body height")}},[gr,Sr,Jn]);(0,ie.useEffect)(()=>{function en(){let Vt=new pe.Z(pn=>{for(let bn of pn)(bn.target.offsetHeight>0||bn.target.offsetWidth>0)&&(Vr(),Ke.setSize("100%","100%"),Ke.refresh())});return Vt.observe(fr.current.parentElement),Vt}if(Ke){const Vt=en();return()=>{var pn,bn;(pn=fr.current)!=null&&pn.parentElement&&Vt.unobserve((bn=fr.current)==null?void 0:bn.parentElement)}}},[Ke,Vr]),(0,ie.useEffect)(()=>{if(Ke){let en=[];for(const[Vt,pn]of Object.entries(Qe)){let bn={[Vt]:()=>{Tr(pn)}};en.push(bn),Ke.addKeyMap(bn)}return()=>{for(let Vt of en)Ke.removeKeyMap(Vt)}}},[Ke]),(0,ie.useEffect)(()=>{Ce!==Jn&&ir(Ce)},[Ce]),(0,xn.Z)(()=>{if(!je&&Gn>0){let en=new Date().getTime(),Vt=window.sessionStorage.getItem(On);en>=Gn+Mn&&(!Vt||Vt!==yn)&&(window.sessionStorage.setItem(On,yn),br(!0))}},Mn),(0,ie.useEffect)(()=>{Kn(In)},[Ke,In]),(0,ie.useEffect)(()=>{Ke&&wn&&Ke.focus()},[Ke,wn]),(0,ie.useEffect)(()=>{if(Pn&&Ke){let en=function(pn){let bn=pn.target;if(lr.current){let jn=bn.scrollTop/bn.scrollHeight;lr.current.scrollTop=lr.current.scrollHeight*jn}};const Vt=Ke.getScrollerElement();return Vt.addEventListener("scroll",en),()=>{Vt.removeEventListener("scroll",en)}}},[Ke,Pn]),(0,ie.useEffect)(()=>{if(Ke&&Pt){let en=function(Vt,pn){Pt(Vt,pn)};return Ke.on("beforeChange",en),()=>{Ke.off("beforeChange",en)}}},[Ke,Pt]),(0,ie.useEffect)(()=>{if(Ke&&Se){let en=function(){Se(Ke.getValue())};return Ke.on("blur",en),()=>{Ke.off("blur",en)}}},[Ke,Se]);function Jr(en,Vt){var pn=en.getDoc(),bn=pn.getCursor(),jn=pn.getLine(bn.line),vr=jn.charAt(bn.ch-1),ur=jn.lastIndexOf("@\u2581@",bn.ch),Er=jn.lastIndexOf("@\u2581\u2581@",bn.ch),Dr=ur>Er?ur:Er,Lr=ur>Er?3:4;if($n.indexOf(vr)===-1)return null;if(console.log("change1:",Vt,en,jn,bn,Dr,ur,Er,vr),Dr>=0&&bn.ch-Dr<5){var zr=Dr+Lr;return pn.replaceRange("",{line:bn.line,ch:Dr},{line:bn.line,ch:zr}),{line:bn.line,ch:zr}}return null}(0,ie.useEffect)(()=>{if(Ke){let en=function(Vt,pn){const bn=Vt.getValue();fn(bn),or(new Date().getTime()),Vt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Bt&&(Ln?Bt(bn,tn(bn)):Bt(bn))};return Ke.on("change",en),()=>{Ke.off("change",en)}}},[Ke,Bt]),(0,ie.useEffect)(()=>{if(Ke)if(Et==null)Ke.setValue(""),fn("");else{const en=window.scrollY||window.pageYOffset;Et!==Ke.getValue()&&(Ke.setValue(Et),fn(Et),Ke.setCursor(wt?1:Ke.lineCount(),0),window.scrollTo(0,en))}},[Ke,Et]);const Tr=(0,ie.useCallback)(en=>{const Vt=Ke.getCursor(),pn=Ke.getSelection();let bn=pn.split(`
|
|
`);switch(en){case"bold":return Ke.replaceSelection("**"+pn+"**"),pn===""&&Ke.setCursor(Vt.line,Vt.ch+2),Ke.focus();case"italic":return Ke.replaceSelection("*"+pn+"*"),pn===""&&Ke.setCursor(Vt.line,Vt.ch+1),Ke.focus();case"code":return Ke.replaceSelection("`"+pn+"`"),pn===""&&Ke.setCursor(Vt.line,Vt.ch+1),Ke.focus();case"inline-latex":return(0,_t.Ye)(Rr)?void 0:(tr("inline-latex"),Ke.focus());case"latex":return Ke.replaceSelection("```latex\n"+pn+"\n```"),Ke.setCursor(Vt.line+1,pn.length+1),Ke.focus();case"line-break":return Ke.replaceSelection(`<br/>
|
|
`),Ke.focus();case"list-ul":return pn===""?Ke.replaceSelection("- "+pn):Ke.replaceSelection(bn.map(jn=>jn===""?"":`- ${jn}`).join(`
|
|
`)),Ke.focus();case"list-ol":return pn===""?Ke.replaceSelection("1. "+pn):Ke.replaceSelection(bn.map((jn,vr)=>jn===""?"":`${vr+1}. ${jn}`).join(`
|
|
`)),Ke.focus();case"add-null-ch":st==null||st();return;case"add-signal":return pn===""&&Ke.setCursor(Vt.line,Vt.ch),Ke.replaceSelection(Nn),Ke.focus();case"add-multiple":return pn===""&&Ke.setCursor(Vt.line,Vt.ch),Ke.replaceSelection($n),Ke.focus();case"inster-template-1":return pn===""&&Ke.setCursor(Vt.line,Vt.ch),Ke.replaceSelection(Un),Ke.focus();case"eraser":return Ke.setValue(""),Ke.focus();case"trigger-watch":return Kn(!Pn),Ke.focus();case"trigger-full-screen":return ir(!Jn),Ke.focus();case xe:tr(xe);return;case Zt:tr(Zt);return;case yt:tr(yt);return;case Dt:tr(Dt);return;case"maths-latex":if((0,_t.Ye)(Rr))return;tr("maths-latex");return;case xt:nr.current="",sessionStorage.removeItem("file_id"),tr(xt);return;case pt:tr(pt);return;default:throw new Error}},[Ke,Pn,Jn]),Hr=(0,ie.useCallback)((en,Vt)=>{var pn,bn,jn,vr,ur,Er;en!=null&&en.disabledClose||tr("");const{src:Dr,alt:Lr,id:zr}=en||{};switch(_n){case xe:const{title:Fi,link:xi}=en;return Ke.replaceSelection(`[${Fi}](${xi})`),Ke.focus();case Zt:const{language:vi,content:Xi}=en;return Ke.replaceSelection(["```"+vi,Xi,"```"].join(`
|
|
`)),Ke.focus();case"maths-latex":for(var Ar=atob(en),_r=new Uint8Array(Ar.length),ei=0;ei<Ar.length;ei++)_r[ei]=Ar.charCodeAt(ei);var Li=new Blob([_r],{type:"image/png"});(0,Re.I)(Li,mi=>{mi.id?Ke.replaceSelection(``):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,_t.Ye)(Rr))return;Ke.replaceSelection("`$$"+en+"$$`");break;case Ne:if(!zr)return;Ke.getValue().indexOf(Dr)===-1?Ke.replaceSelection(`<center><img id="${zr}" width="80%" src="${Dr}" class="draw-flowchart" alt="${Lr||""}" /></center>`):document.getElementById(zr).src=se.Z.API_SERVER+Dr+"?t="+Date.now();break;case yt:case Dt:const wr=Vt,to=(jn=(bn=(pn=wr==null?void 0:wr.name)==null?void 0:pn.split("."))==null?void 0:bn.pop)==null?void 0:jn.call(bn);return((vr=wr==null?void 0:wr.type)==null?void 0:vr.indexOf("image"))>-1||!(wr!=null&&wr.type)?wr!=null&&wr.align||wr!=null&&wr.width?Ke.replaceSelection(`<p style="text-align:${wr.align||"initial"}"><img width="${wr.width?wr.width+"%":"initial"}" src="${Dr}" alt="${Lr||""}" /></p>`):Ke.replaceSelection(`<img width="100%" src="${Dr}" alt="${Lr||""}" />`):((ur=wr==null?void 0:wr.type)==null?void 0:ur.indexOf("video"))>-1?Ke.replaceSelection(`<video width="100%" controls src="${Dr}"></video>`):((Er=wr==null?void 0:wr.type)==null?void 0:Er.indexOf("pdf"))>-1?Ke.replaceSelection(`<a href="${Dr}?type=${wr.type}&disposition=inline" target="_blank">${wr.name}</a>`):Rn.includes(to)?Ke.replaceSelection(`<a href="${Dr}?type=office&disposition=inline" target="_blank">${wr.name}</a>`):Ke.replaceSelection(`[${wr.name}](${Dr})`),Ke.focus();case pt:const{row:ti,col:Ri,align:ao}=en;let Ji=`
|
|
`;for(let mi=0;mi<ti;mi++){let Ii=[],Wr=[];for(let _i=0;_i<Ri;_i++)mi===1&&Wr.push(Ft[ao]),Ii.push(" ");mi===1&&(Ji+=`| ${Wr.join(" | ")} |
|
|
`),Ji+=`| ${Ii.join(Ri===1?"":" | ")} |
|
|
`}return Ke.replaceSelection(Ji+`
|
|
`),Ke.focus();default:throw new Error}},[Ke,_n]),Ir=(0,ie.useMemo)(()=>{switch(_n){case xe:return ie.createElement(sn,{callback:Hr,onCancel:Zr});case Zt:return ie.createElement(Rt.Z,{callback:Hr,onCancel:Zr});case yt:return ie.createElement(Re.Z,{callback:Hr,onCancel:Zr});case xt:return ie.createElement(oe,{editImgId:nr.current,callback:Hr,onCancel:Zr});case pt:return ie.createElement(It,{callback:Hr,onCancel:Zr});case"maths-latex":return ie.createElement(hn,{showSaveButton:!0,callback:Hr});case"inline-latex":return ie.createElement(at.Z,{showSaveButton:!0,callback:Hr});default:return null}},[_n]);function Zr(){tr("")}(0,ie.useEffect)(()=>{if(ar.current){let en=function(ur){jn=!0,vr=ur.pageY},Vt=function(){jn=!1},pn=function(ur){if(jn){let Er=ur.pageY-vr;Er<0&&(Er=0),Er>300&&(Er=300);let Dr=Yt+Er+"px";dr(Dr)}},bn=ar.current,jn=!1,vr=0;return bn.addEventListener("mousedown",en),document.addEventListener("mousemove",pn),document.addEventListener("mouseup",Vt),()=>{bn.removeEventListener("mousedown",en),document.removeEventListener("mousemove",pn),document.removeEventListener("mouseup",Vt)}}},[Ke,ar]),(0,ie.useEffect)(()=>{dr(Yt)},[Yt]);const ii=Fn(rn),Fr=Fn(gr),Qn={width:ii,height:Fr},Kt=(0,ie.useMemo)(()=>{if(Gn){let en=new Date(Gn),Vt=en.getHours(),pn=en.getMinutes(),bn=en.getSeconds();return Vt=Vt<10?"0"+Vt:Vt,pn=pn<10?"0"+pn:pn,bn=bn<10?"0"+bn:bn,`${Vt}:${pn}:${bn}`}return 0},[Gn]),tn=en=>{const Vt=[];if(Ln){let pn=-1;en=en.replace(/(@▁▁@|@▁@)/g,function(bn,jn,vr){Vt.push({multiLine:bn!==Nn})})}return Vt};function An(){window.sessionStorage.removeItem(On),br(!1),or(0)}function vn(){br(!1),or(0),Ke.setValue(window.sessionStorage.getItem(On))}(0,ie.useEffect)(()=>{Ge[_n]&&_n!==Dt&&_n!==xt&&setTimeout(()=>{const en=document.getElementsByClassName("markdown-popup-form")[0],Vt=window.innerWidth/2-en.offsetWidth/2,pn=window.innerHeight/2-en.offsetHeight/2;hr(Vt),xr(pn)},0)},[_n]);const Wn=en=>{en.preventDefault();const Vt=en.clientX-Cr,pn=en.clientY-Pr;document.body.onmousemove=bn=>{let jn=bn.clientX-Vt,vr=bn.clientY-pn;const ur=document.getElementsByClassName("markdown-popup-form")[0],Er=window.innerWidth-ur.offsetWidth,Dr=window.innerHeight-ur.offsetHeight;jn=Math.max(0,Math.min(jn,Er)),vr=Math.max(0,Math.min(vr,Dr)),pr(bn.clientX,bn.clientY,Vt,pn)&&(hr(jn),xr(vr))},document.body.onmouseup=function(){document.body.onmousemove=null}},pr=(en,Vt,pn,bn)=>{const jn=document.body.clientHeight,vr=document.body.clientWidth;return en<20&&pn>en||en>vr-20&&pn<en||Vt<20&&bn>Vt||Vt>jn-20&&bn<Vt?(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 ${Te} ${Pn?"on-preview":""} ${Qt?"mini":""} ${Jn?"full-screen":""}`,style:Qn},ie.createElement(Ut,{insertTemp:kn,watch:Pn,fullScreen:Jn,showNullButton:Ot,showNullProgramButton:Ln,onActionCallback:Tr,hidetoolBar:zn,extraUse:Gt}),ie.createElement("div",{className:"markdown-editor-body"},ie.createElement("div",{className:"codemirror-container"},ie.createElement("textarea",{ref:fr,placeholder:an})),Pn?ie.createElement("div",{ref:lr,className:"preview-container"},cn==="stex"&&ie.createElement(ht,{value:yn}),cn!=="stex"&&ie.createElement(ve.Z,{edit:!0,disabledFill:Xt,showProgramFill:Ln,value:yn,openEditor:en=>{var Vt;nr.current=en,(Vt=sr.current)==null||Vt.setHeight("100vh"),setTimeout(()=>{tr("add-flowchart")},150)}})):null))),qe?ie.createElement("a",{ref:ar,className:"editor-resize"}):null,_n===Dt&&ie.createElement(Jt,{callback:Hr,onCancel:Zr}),_n===xt&&ie.createElement(oe,{ref:sr,editImgId:nr.current,callback:Hr,onCancel:Zr}),ie.createElement(Ye.Z,null,Ge[_n]&&_n!==Dt&&_n!==xt?ie.createElement(tt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Pr},title:ie.createElement("div",{style:{cursor:"move"},onMouseDown:Wn},Ge[_n]),open:!0,onCancel:Zr,footer:null,destroyOnClose:!0,width:_n===xt?"1200px":null,height:_n===xt?"80vh":null,className:"markdown-popup-form"},Ir):null))}},45596:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return Ae},I:function(){return Ut}});var ie=he(28284),Ze=he(6767),De=he(37568),Oe=he(77736),pe=he(71051),ge=he(47889),Ie=he(99571),_e=he(67303),we=he(59301),fe=he(59301),$e=Object.defineProperty,ve=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ee=(Ye,We,Ct)=>We in Ye?$e(Ye,We,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):Ye[We]=Ct,nt=(Ye,We)=>{for(var Ct in We||(We={}))Me.call(We,Ct)&&Ee(Ye,Ct,We[Ct]);if(Fe)for(var Ct of Fe(We))Pe.call(We,Ct)&&Ee(Ye,Ct,We[Ct]);return Ye},ut=(Ye,We)=>ve(Ye,ht(We));const{useForm:ft}=ie.default,ct={width:280,marginRight:10},et={labelCol:{span:5},wrapperCol:{span:19}};var Ae=({callback:Ye,onCancel:We})=>{const[Ct]=ft();let Le=(0,we.useRef)();function Xe(un){Le.current.width=Ct.getFieldValue("width"),Le.current.align=Ct.getFieldValue("align"),Ye(un,Le.current)}function Be(un,Lt){if(un.status===-1){Ze.ZP.error(un.message);return}Ct.setFieldsValue({src:`/api/attachments/${un.id}`,type:Lt.type})}function ot(un){let Lt=un.target.files[0];Le.current=Lt,Ut(Lt,Be)}return fe.createElement(ie.default,ut(nt({form:Ct},et),{className:"upload-image-panel",onFinish:Xe,style:{width:470,overflow:"hidden"}}),fe.createElement(ie.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(ie.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(De.default,{style:ct})),fe.createElement(it,{onFileChange:ot}))),fe.createElement(ie.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(De.default,{style:{width:264}})),fe.createElement(ie.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(Oe.Z,null,fe.createElement(ie.default.Item,{name:"width",style:{margin:0}},fe.createElement(pe.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(ie.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(ge.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),fe.createElement("aside",null,fe.createElement(ie.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(Ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Ie.ZP,{type:"default",onClick:We},"\u53D6\u6D88"))))};function it({onFileChange:Ye}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Ye}))}function Ut(Ye,We){if(!Ye)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ct=new FormData;Ct.append("editormd-image-file",Ye),Ct.append("file_param_name","editormd-image-file"),Ct.append("byxhr","true");var Le=new window.XMLHttpRequest;Le.withCredentials=!0,Le.addEventListener("load",function(Xe){We(JSON.parse(Xe.target.responseText),Ye)},!1),Le.addEventListener("error",function(Xe){console.error(Xe)},!1),Le.open("POST",`${_e.KI}/api/attachments.json`),Le.send(Ct)}},75790:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return De}});var ie=he(59301),Ze=he(4676);class De extends ie.Component{constructor(pe){super(pe);const ge=window.document;this.node=ge.createElement("div"),ge.body.appendChild(this.node)}render(){const{children:pe}=this.props;return(0,Ze.createPortal)(pe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(jt,qt,he){"use strict";he.d(qt,{SV:function(){return Jt},ZP:function(){return bt}});var ie=he(59301),Ze=he(76374);const De={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"]},Oe={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},pe={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},ge={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},Ie={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 _e=he(53184),we=he.n(_e),fe=(He,Tt,Nt)=>new Promise((ae,te)=>{var z=ne=>{try{se(Nt.next(ne))}catch(be){te(be)}},oe=ne=>{try{se(Nt.throw(ne))}catch(be){te(be)}},se=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,oe);se((Nt=Nt.apply(He,Tt)).next())});const $e={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ve=(He,Tt,Nt,ae)=>{const te=Tt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Nt.lineNumber,endColumn:Nt.column});return Array.from(new Set(te.match(/\b\w{2,}\b/g)||[])).map(oe=>({label:oe,kind:He.languages.CompletionItemKind.Text,insertText:oe,range:ae}))},ht=(He,Tt,Nt,ae)=>{He.languages.registerCompletionItemProvider(Tt,{provideCompletionItems(te,z){const oe=te.getWordUntilPosition(z),se={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:oe.startColumn,endColumn:oe.endColumn},ne=te.getLineContent(z.lineNumber).substring(oe.startColumn-2,oe.endColumn);return{suggestions:[...ve(He,te,z,se),...Nt.map(Ve=>({label:Ve,kind:He.languages.CompletionItemKind.Keyword,documentation:Ve,insertText:Ve,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se})),...ae.map(Ve=>({label:Ve.label,kind:He.languages.CompletionItemKind.Snippet,documentation:Ve.content,insertText:ne.startsWith("#")?Ve.content.replace(/#/,""):Ve.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}))]}}})};var Fe=He=>{$e.languages.forEach(Tt=>{He.languages.registerDocumentFormattingEditProvider(Tt,{provideDocumentFormattingEdits(Nt){return fe(this,null,function*(){const ae=we()(Nt.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:Nt.getFullModelRange(),text:ae}]})}})}),ht(He,"java",Oe.keywords,Oe.quickKey),ht(He,"cpp",pe.keywords,pe.quickKey),ht(He,"c",De.keywords,[]),ht(He,"python",ge.keywords,ge.quickKey),ht(He,"scala",Ie.keywords,Ie.quickKey)};const Me="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Pe=Object.defineProperty,Ee=(He,Tt,Nt)=>Tt in He?Pe(He,Tt,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):He[Tt]=Nt,nt=(He,Tt,Nt)=>Ee(He,typeof Tt!="symbol"?Tt+"":Tt,Nt);const ut=class _s{constructor(Tt,Nt,ae){this.placeholder=Tt,this.editor=Nt,this.monaco=ae,Nt.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)}};nt(ut,"ID","editor.widget.placeholderHint");var ct=ut,et=he(96236),Ae=he(6767),it=he(25399),Ut=he(89392),Ye=he(33796),We=he(56102),Ct=Object.defineProperty,Le=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,Lt=(He,Tt,Nt)=>Tt in He?Ct(He,Tt,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):He[Tt]=Nt,Dn=(He,Tt)=>{for(var Nt in Tt||(Tt={}))ot.call(Tt,Nt)&&Lt(He,Nt,Tt[Nt]);if(Be)for(var Nt of Be(Tt))un.call(Tt,Nt)&&Lt(He,Nt,Tt[Nt]);return He},ln=(He,Tt)=>Le(He,Xe(Tt)),me=(He,Tt)=>{var Nt={};for(var ae in He)ot.call(He,ae)&&Tt.indexOf(ae)<0&&(Nt[ae]=He[ae]);if(He!=null&&Be)for(var ae of Be(He))Tt.indexOf(ae)<0&&un.call(He,ae)&&(Nt[ae]=He[ae]);return Nt},de=(He,Tt,Nt)=>new Promise((ae,te)=>{var z=ne=>{try{se(Nt.next(ne))}catch(be){te(be)}},oe=ne=>{try{se(Nt.throw(ne))}catch(be){te(be)}},se=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,oe);se((Nt=Nt.apply(He,Tt)).next())});function mt(He){return/^\d+$/.test(He)?`${He}px`:He}function sn(){}let Rt=!1;const Re={"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 tt(He=[]){let Tt=He;if(Array.isArray(He)){for(let Nt=0;Nt<He.length;Nt++){let ae=Re[He[Nt]];if(ae)return ae}return Tt[0]}return Re[Tt]||Tt}let rt=null;const dn=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(He){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",He)}});var bt=He=>{var Tt=He,{width:Nt="100%",height:ae="100%",value:te,language:z="javascript",style:oe={},options:se={},overrideServices:ne={},theme:be="vs-dark",onEditBlur:Ve,isCopy:Wt=!1,onSave:It,autoHeight:gt=!1,forbidCopy:At=!1,onChange:nn=sn,editorDidMount:$t=sn,onFocus:hn=sn,onBreakPoint:at=sn,breakPointValue:xe=[],filename:yt="educoder.txt",errorLine:xt,errorContent:Dt="",highlightLine:Ne,openBreakPoint:Zt=!1,placeholder:pt="",showMiniMap:St=!0}=Tt,Ft=me(Tt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const xn=(0,ie.useRef)(),_t=(0,ie.useRef)({}),Cn=(0,ie.useRef)(),Tn=(0,ie.useRef)(),Mn=(0,ie.useRef)([]),qn=(0,ie.useRef)(!1),$n=(0,ie.useRef)(),Nn=(0,ie.useRef)(),Un=(0,ie.useRef)(!1),[Rn,Fn]=(0,ie.useState)(!1);function Sn(){let qe;return xn.current&&(qe=new Ze.Z(je=>{for(let Ot of je)(Ot.target.offsetHeight>0||Ot.target.offsetWidth>0)&&_t.current.instance.layout()}),qe.observe(xn.current)),qe}function Je(){Ae.ZP.warning({content:decodeURIComponent(Me),key:"monaco-editor-tip"})}const Qe=()=>{let qe=_t.current.instance;if(te!=null&&qe&&Rn){const je=qe.getModel();je&&te!==je.getValue()&&(Rt=!0,je.setValue(te),qe.layout(),Rt=!1)}};(0,ie.useEffect)(()=>{const qe=Ye.Z.subscribe("formatDocument",je=>{var Ot;let Ln=_t.current.instance;(Ot=Ln==null?void 0:Ln.getAction)==null||Ot.call(Ln,"editor.action.formatDocument").run()});return window.updateMonacoValue=je=>{nn(je)},qe},[]),(0,ie.useEffect)(()=>{var qe;let je=_t.current.instance;Tn.current&&clearTimeout(Tn.current),Tn.current=setTimeout(()=>{Qe()},500),te&&(te!=null&&te.length)&&((qe=je==null?void 0:je.updateOptions)==null||qe.call(je,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,Rn,_t.current]),(0,ie.useEffect)(()=>{if(xt&&_t.current&&_t.current.instance){let je=_t.current.instance;je.changeViewZones(function(Ot){var Ln=document.createElement("div");Ln.style.padding="10px 20px",Ln.style.width="calc(100% - 20px)",Ln.className="my-error-line-wrp",Ln.innerHTML=Dt,Ot.addZone({afterLineNumber:xt||11,heightInLines:3,domNode:Ln})});var qe={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(qe),je.revealPositionInCenter({lineNumber:20,column:1})}},[xt,_t.current,Rn]);const Ge=(qe="",je)=>{if(!qe||qe.trim()==="")return!0;const Ln=_t.current.instance.getModel().getLineTokens(je);let zn=!1;for(let Ce=0;Ce<2;Ce++)Ln.getStandardTokenType(Ce)===1&&(zn=!0);return zn};(0,ie.useEffect)(()=>{var qe;const je=(qe=_t.current)==null?void 0:qe.instance;if(je&&Rn&&At){const Ot=je.onDidBlurEditorWidget(()=>{Un.current=!1}),Ln=je.onDidFocusEditorText(()=>{Un.current=!0});return()=>{Ot.dispose(),Ln.dispose()}}},[_t.current,Rn,At]),(0,ie.useEffect)(()=>{var qe;if((qe=_t.current)!=null&&qe.instance&&Rn&&Zt){let je=_t.current.instance,Ot=je.getModel();if(!Ot)return;(()=>{var vt;let Gt=[],st=[];const Ke=Ot.getAllDecorations();for(let yn of Ke)yn.options.className==="highlighted-line"&&(Gt.push((vt=yn==null?void 0:yn.range)==null?void 0:vt.startLineNumber),st.push(yn==null?void 0:yn.id));if(Ne===Gt[0])return;Ot.deltaDecorations(st,[]);const Ht=Ot.getLineCount();Ne&&Ne<=Ht&&(je.deltaDecorations([],[{range:new rt.Range(Ne,1,Ne,Ot.getLineMaxColumn(Ne)),options:{isWholeLine:!0,className:"highlighted-line"}}]),je.revealLineInCenter(Ne))})();const zn=(vt=!1)=>{var Gt;let st=[],Ke=[];const Ht=Ot.getAllDecorations();for(let yn of Ht)yn.options.linesDecorationsClassName==="breakpoints-select"&&(st.push((Gt=yn==null?void 0:yn.range)==null?void 0:Gt.startLineNumber),Ke.push(yn==null?void 0:yn.id));if(vt)return{lines:st,ids:Ke};at(st)},Ce=vt=>de(void 0,null,function*(){let Gt={range:new rt.Range(vt,1,vt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ot.deltaDecorations([],[Gt]),zn()}),Se=vt=>de(void 0,null,function*(){let Gt=[];const st=je.getLineDecorations(vt);for(let Ke of st)Ke.options.linesDecorationsClassName==="breakpoints-select"&&Gt.push(Ke.id);yield Ot.deltaDecorations(Gt,[]),zn()}),Pt=vt=>{let Gt=je.getLineDecorations(vt);for(let st of Gt)if(st.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ut.isEqual)(xe,zn(!0).lines)){Ot.deltaDecorations(zn(!0).ids,[]);const vt=xe.map(Gt=>({range:new rt.Range(Gt,1,Gt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ot.deltaDecorations([],vt)}const dt=je.onDidChangeModelContent(vt=>{let Gt=je.getPosition();if(Gt){let st=Gt.lineNumber;clearTimeout(Nn.current),Nn.current=setTimeout(()=>{Ge(Ot.getLineContent(st),st)?Se(st):Pt(st)?(Se(st),Ce(st)):zn()},100)}}),Te=je.onMouseDown(vt=>{var Gt,st,Ke;if(vt.target.detail&&((Ke=(st=(Gt=vt.target)==null?void 0:Gt.element)==null?void 0:st.className)!=null&&Ke.includes("line-numbers"))){let Ht=vt.target.position.lineNumber;if(Ge(Ot.getLineContent(Ht),Ht))return;Pt(Ht)?Se(Ht):Ce(Ht)}}),lt=vt=>{let Gt={range:new rt.Range(vt,1,vt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Mn.current=je.deltaDecorations(Mn.current,[Gt])},wt=()=>{Mn.current=je.deltaDecorations(Mn.current,[])},Xt=je.onMouseMove(vt=>{var Gt,st,Ke;if(wt(),vt.target.detail&&((Ke=(st=(Gt=vt.target)==null?void 0:Gt.element)==null?void 0:st.className)!=null&&Ke.includes("line-numbers"))){let Ht=vt.target.position.lineNumber;if(Ge(Ot.getLineContent(Ht),Ht))return;lt(Ht)}}),an=je.onMouseLeave(()=>{wt()});return()=>{dt.dispose(),Te.dispose(),Xt.dispose(),an.dispose()}}},[_t.current,Rn,xe,Ne,Zt,z]),(0,ie.useEffect)(()=>{var qe;(qe=_t.current)!=null&&qe.instance&&Zt&&_t.current.instance.setPosition({lineNumber:0,column:0})},[Ne]);function Mt(){let qe=_t.current.instance;if(qe){const je=qe.getSelection(),Ot=_t.current.pastePos||{},Ln=new rt.Range(Ot.startLineNumber||je.endLineNumber,Ot.startColumn||je.endColumn,Ot.endLineNumber||je.endLineNumber,Ot.endColumn||je.endColumn);setTimeout(()=>{qe.executeEdits("",[{range:Ln,text:""}])},300)}}function Et(qe){(window.navigator.platform.match("Mac")?qe.metaKey:qe.ctrlKey)&&qe.keyCode==83&&(qe.preventDefault(),It())}const Bt=()=>{if(gt&&_t.current.instance){const qe=_t.current.instance.getContentHeight();cn(qe<ae?ae:qe)}else cn(ae)};function rn(qe){var je=document.createEvent("MouseEvents");je.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),qe.dispatchEvent(je)}const Yt=qe=>{if(!Un.current)return;const{keyCode:je,ctrlKey:Ot,metaKey:Ln,target:zn,type:Ce}=qe;return(Ce==="paste"||(je===67||je===86)&&(Ln||Ot))&&zn.nodeName==="TEXTAREA"&&(Je(),qe.preventDefault()),!1};function Qt(qe,je){var Ot=window.URL||window.webkitURL||window,Ln=new Blob([je]),zn=document.createElementNS("http://www.w3.org/1999/xhtml","a");zn.href=Ot.createObjectURL(Ln),zn.download=qe,rn(zn)}(0,ie.useEffect)(()=>{Bt()},[Bt]),(0,ie.useEffect)(()=>{xn.current&&!Rn&&Promise.all([he.e(8909),he.e(5028)]).then(he.bind(he,71448)).then(qe=>{try{rt=qe,_t.current.instance=rt.editor.create(xn.current,{value:te,language:tt(z),theme:be,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:St||!1}},ne);const je=_t.current.instance;let zn=[...et.BH._menuItems].find(dt=>dt[0]._debugName=="EditorContext")[1],Ce=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Se=(dt,Te)=>{var lt,wt;let Xt=dt._first;do Te.includes((wt=(lt=Xt.element)==null?void 0:lt.command)==null?void 0:wt.id)&&dt._remove(Xt);while(Xt=Xt.next)};if($t(je,rt),setTimeout(()=>{Bt(),_t.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Qt(yt||"educoder.txt",je.getValue())}})},500),_t.current.subscription=je.onDidChangeModelContent(dt=>{qn.current?clearTimeout($n.current):(Bt(),nn(je.getValue(),dt)),$n.current=setTimeout(()=>{qn.current=!1},500)}),window.Monaco||Fe(rt,tt(z)),At&&(Se(zn,Ce),xn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Yt),window.removeEventListener("paste",Yt),window.addEventListener("keydown",Yt),window.addEventListener("paste",Yt)),window.Monaco=rt,Ve&&je.onDidBlurEditorWidget(()=>{Ve(je.getValue())}),hn&&je.onDidFocusEditorText(()=>{At&&dn(),hn(je.getValue())}),At){dn();try{je.onDidPaste(dt=>{const Te=je.getSelection(),lt=_t.current.pastePos||{},wt=new rt.Range(lt.startLineNumber||Te.endLineNumber,lt.startColumn||Te.endColumn,lt.endLineNumber||Te.endLineNumber,lt.endColumn||Te.endColumn);je.executeEdits("",[{range:dt.range,text:""}])})}catch(dt){}}let Pt=Sn();return pt&&typeof pt=="string"&&new ct(pt,je,rt),Fn(!0),()=>{const dt=_t.current.instance;dt.dispose();const Te=dt.getModel();Te&&Te.dispose(),_t.current.subscription&&_t.current.subscription.dispose(),Pt.unobserve(xn.current)}}catch(je){}})},[]),(0,ie.useEffect)(()=>{if(_t.current.instance&&Rn)return document.addEventListener("keydown",Et,!1),()=>{document.removeEventListener("keydown",Et)}},[It,Rn]),(0,ie.useEffect)(()=>{let qe=_t.current.instance;if(qe&&Rn){let je=tt(z);rt.editor.setModelLanguage(qe.getModel(),je)}},[z,Rn]),(0,ie.useEffect)(()=>{_t.current.instance&&Rn&&rt.editor.setTheme(be)},[be,Rn]),(0,ie.useEffect)(()=>{let qe=_t.current.instance;Cn.current=se,qe&&Rn&&(qe.updateOptions(Dn({},se)),setTimeout(()=>{qe.getModel().updateOptions(Dn({},se))},200))},[JSON.stringify(se),Rn]),(0,ie.useEffect)(()=>{let qe=_t.current.instance;qe&&Rn&&qe.layout()},[Nt,ae,Rn]);const[wn,In]=(0,ie.useState)(mt(Nt)),[kn,cn]=(0,ie.useState)(mt(ae)),On=ln(Dn({},oe),{width:wn,height:kn,position:"relative"});return ie.createElement("div",{className:"my-monaco-editor",ref:xn,style:On},Wt&&ie.createElement(We.CopyToClipboard,{text:te,onCopy:()=>Ae.ZP.success("\u590D\u5236\u6210\u529F")},ie.createElement(it.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 Jt({width:He="100%",height:Tt="100%",original:Nt,modified:ae,language:te,options:z={}}){const oe=(0,ie.useRef)(),[se,ne]=(0,ie.useState)(null);function be(gt){let At;return oe.current&&(At=new Ze.Z(nn=>{for(let $t of nn)($t.target.offsetHeight>0||$t.target.offsetWidth>0)&>.layout()}),At.observe(oe.current)),At}(0,ie.useEffect)(()=>(oe.current&&Promise.all([he.e(8909),he.e(9404)]).then(he.bind(he,2550)).then(gt=>{rt=gt;const At=rt.editor.createDiffEditor(oe.current,ln(Dn({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},z),{wordWrap:!0}));ne(At);let nn=be(At);return()=>{At.dispose();const $t=At.getModel();$t&&$t.dispose(),nn.unobserve(oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ie.useEffect)(()=>{se&&se.setModel({original:rt.editor.createModel(Nt,te),modified:rt.editor.createModel(ae,te)})},[Nt,ae,te,se]);const Ve=mt(He),Wt=mt(Tt),It={width:Ve,height:Wt};return ie.createElement("div",{className:"my-diff-editor",ref:oe,style:It})}},17904:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return Ze}});var ie=he(59301);function Ze(De,Oe){const pe=(0,ie.useRef)();(0,ie.useEffect)(()=>{pe.current=De}),(0,ie.useEffect)(()=>{function ge(){pe.current()}if(Oe!==null){let Ie=setInterval(ge,Oe);return()=>clearInterval(Ie)}},[Oe])}},67810:function(jt,qt,he){"use strict";he.r(qt),he.d(qt,{default:function(){return Sn}});var ie=he(59301),Ze=he(76560),De=he(90524),Oe=he(77019),pe=he(5269),ge=he(99571),Ie={wrap:"wrap___oiJRJ",head:"head___zCLJu",recommendItem:"recommendItem___Z46_0",buttonWrap:"buttonWrap___Gol4S",privateMessage:"privateMessage___UCiuy",flex1:"flex1___FVk7y",mWidth147:"mWidth147___f_pcl"},_e=he(14195),we=Object.defineProperty,fe=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Me=(Je,Qe,Ge)=>Qe in Je?we(Je,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Je[Qe]=Ge,Pe=(Je,Qe)=>{for(var Ge in Qe||(Qe={}))ht.call(Qe,Ge)&&Me(Je,Ge,Qe[Ge]);if(ve)for(var Ge of ve(Qe))Fe.call(Qe,Ge)&&Me(Je,Ge,Qe[Ge]);return Je},Ee=(Je,Qe)=>fe(Je,$e(Qe)),nt=(Je,Qe)=>{var Ge={};for(var Mt in Je)ht.call(Je,Mt)&&Qe.indexOf(Mt)<0&&(Ge[Mt]=Je[Mt]);if(Je!=null&&ve)for(var Mt of ve(Je))Qe.indexOf(Mt)<0&&Fe.call(Je,Mt)&&(Ge[Mt]=Je[Mt]);return Ge},ut=(Je,Qe,Ge)=>new Promise((Mt,Et)=>{var Bt=Qt=>{try{Yt(Ge.next(Qt))}catch(wn){Et(wn)}},rn=Qt=>{try{Yt(Ge.throw(Qt))}catch(wn){Et(wn)}},Yt=Qt=>Qt.done?Mt(Qt.value):Promise.resolve(Qt.value).then(Bt,rn);Yt((Ge=Ge.apply(Je,Qe)).next())});const ft=Je=>{var Qe=Je,{user:Ge,forumsDetail:Mt,globalSetting:Et,loading:Bt,dispatch:rn}=Qe,Yt=nt(Qe,["user","forumsDetail","globalSetting","loading","dispatch"]),Qt,wn,In,kn;const{author_info:cn,memo:On,recommend_shixuns:qe}=Mt.forumsDetailData||{},je=()=>ut(void 0,null,function*(){(cn!=null&&cn.watched?yield(0,_e.Sr)({user_id:cn.login}):yield(0,_e.YP)({user_id:cn.login}))&&rn({type:"forumsDetail/setForumsDetailData",payload:Ee(Pe({},Mt.forumsDetailData),{author_info:Ee(Pe({},cn),{watched:!(cn!=null&&cn.watched)})})})});return ie.createElement("section",{className:Ie.wrap},ie.createElement("aside",{className:"ml20"},ie.createElement("div",{className:`bg-white pt40 pb40 pl20 pr20 ${Ie.head}`},ie.createElement("a",{href:`/users/${cn==null?void 0:cn.login}`,target:"_blank"},(cn==null?void 0:cn.image_url)&&ie.createElement("img",{src:`${De.Z.API_SERVER}/images/${cn==null?void 0:cn.image_url}`})),ie.createElement("div",{className:"tc font20"},cn==null?void 0:cn.username),ie.createElement("div",{className:"tc c-grey-999"},cn==null?void 0:cn.identity),((Qt=Ge.userInfo)==null?void 0:Qt.user_id)!==(cn==null?void 0:cn.user_id)&&ie.createElement(Oe.Z,{justify:"center",className:`mt30 ${Ie.buttonWrap}`},ie.createElement(pe.Z,null,ie.createElement(ge.ZP,{type:"primary",className:"mr10",onClick:je},cn!=null&&cn.watched?"\u53D6\u6D88\u5173\u6CE8":"\u5173\u6CE8")),ie.createElement(pe.Z,null,ie.createElement(ge.ZP,{className:Ie.privateMessage,href:`/messages/${(wn=Ge.userInfo)==null?void 0:wn.login}/message_detail?target_ids=${cn==null?void 0:cn.user_id}`,target:"_blank"},"\u79C1\u4FE1")))),!!((In=On==null?void 0:On.tag)!=null&&In.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 ${Ie.tag}`},(kn=On==null?void 0:On.tag)==null?void 0:kn.map((Ot,Ln)=>ie.createElement("span",{key:Ln,className:"c-light-primary mr10"},Ot)))),ie.createElement("div",{className:"pt10 pb10 pl10 pr10"},ie.createElement("div",{className:"font16 mb20"},"\u63A8\u8350\u5B9E\u8BAD"),ie.createElement("div",{className:Ie.recommend},qe==null?void 0:qe.map(Ot=>ie.createElement("div",{className:Ie.recommendItem},ie.createElement("a",{href:`/shixuns/${Ot.identifier}/challenges`,target:"_blank"},ie.createElement("img",{alt:Ot.id,src:`${Ot.image_url}`})),ie.createElement("div",{className:`${Ie.flex1} ml10`},ie.createElement("a",{href:`/shixuns/${Ot.identifier}/challenges`,target:"_blank",title:Ot.name,className:`${Ie.mWidth147} multi-llipsis1e c-grey-666 mb10`},Ot.name),ie.createElement("div",{className:"c-grey-999"},Ot.myshixuns_count," \u4EBA\u5B66\u4E60"))))))))};var ct=(0,Ze.connect)(({user:Je,forumsDetail:Qe,loading:Ge,globalSetting:Mt})=>({user:Je,forumsDetail:Qe,globalSetting:Mt,loading:Ge.models.forumsDetail}))(ft),et=he(56656),Ae=he.n(et),it=he(38394),Ut=he(6767),Ye=he(62957),We=he(37568),Ct=he(93041),Le=he(91882),Xe=he(25399),Be=he(75727),ot=he(2978),un=he(26227),Lt={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"},Dn=Object.defineProperty,ln=Object.defineProperties,me=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,Rt=(Je,Qe,Ge)=>Qe in Je?Dn(Je,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Je[Qe]=Ge,Re=(Je,Qe)=>{for(var Ge in Qe||(Qe={}))mt.call(Qe,Ge)&&Rt(Je,Ge,Qe[Ge]);if(de)for(var Ge of de(Qe))sn.call(Qe,Ge)&&Rt(Je,Ge,Qe[Ge]);return Je},tt=(Je,Qe)=>ln(Je,me(Qe)),rt=(Je,Qe,Ge)=>new Promise((Mt,Et)=>{var Bt=Qt=>{try{Yt(Ge.next(Qt))}catch(wn){Et(wn)}},rn=Qt=>{try{Yt(Ge.throw(Qt))}catch(wn){Et(wn)}},Yt=Qt=>Qt.done?Mt(Qt.value):Promise.resolve(Qt.value).then(Bt,rn);Yt((Ge=Ge.apply(Je,Qe)).next())});Ae().locale("ZH-cn");function dn({user:Je,vlist:Qe=[],dispatch:Ge,params:Mt,id:Et,memo_replies:Bt,forumsDetail:rn}){return ie.createElement("aside",{className:Lt.comment},Qe.map(function(Yt,Qt){var wn,In;return ie.createElement(Oe.Z,{key:Qt,className:Lt.commentItem},ie.createElement(pe.Z,{span:24},ie.createElement(Oe.Z,null,ie.createElement(pe.Z,{flex:"1"},ie.createElement("a",{href:`/users/${Yt.user_login}`,target:"_blank",className:"c-light-black"},Yt==null?void 0:Yt.username),ie.createElement("span",{className:"c-light-black ml10"},Yt.time)),(Yt.can_delete||Yt.user_id===((wn=Je.userInfo)==null?void 0:wn.user_id)||Yt.user_login===((In=Je.userInfo)==null?void 0:In.login))&&ie.createElement(pe.Z,{className:"forums-comment-delete",style:{display:"none"}},ie.createElement(Xe.Z,{title:"\u5220\u9664"},ie.createElement(un.Z,{className:"current",onClick:()=>{Ye.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:()=>rt(this,null,function*(){const kn=yield(0,_e.sW)({id:Yt.id}),cn=Bt.find(On=>On.id===Et).children.filter(On=>On.id!==Yt.id);Bt.find(On=>On.id===Et).children=cn,Ge({type:"forumsDetail/setForumsDetailData",payload:tt(Re({},rn.forumsDetailData),{memo_replies:[...Bt]})})})})}}))))),ie.createElement(pe.Z,null,ie.createElement(it.Z,{value:Yt.content})))}))}var bt=dn,Jt=he(49661),He=Object.defineProperty,Tt=Object.defineProperties,Nt=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(Je,Qe,Ge)=>Qe in Je?He(Je,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Je[Qe]=Ge,se=(Je,Qe)=>{for(var Ge in Qe||(Qe={}))te.call(Qe,Ge)&&oe(Je,Ge,Qe[Ge]);if(ae)for(var Ge of ae(Qe))z.call(Qe,Ge)&&oe(Je,Ge,Qe[Ge]);return Je},ne=(Je,Qe)=>Tt(Je,Nt(Qe)),be=(Je,Qe)=>{var Ge={};for(var Mt in Je)te.call(Je,Mt)&&Qe.indexOf(Mt)<0&&(Ge[Mt]=Je[Mt]);if(Je!=null&&ae)for(var Mt of ae(Je))Qe.indexOf(Mt)<0&&z.call(Je,Mt)&&(Ge[Mt]=Je[Mt]);return Ge},Ve=(Je,Qe,Ge)=>new Promise((Mt,Et)=>{var Bt=Qt=>{try{Yt(Ge.next(Qt))}catch(wn){Et(wn)}},rn=Qt=>{try{Yt(Ge.throw(Qt))}catch(wn){Et(wn)}},Yt=Qt=>Qt.done?Mt(Qt.value):Promise.resolve(Qt.value).then(Bt,rn);Yt((Ge=Ge.apply(Je,Qe)).next())});Ae().locale("ZH-cn");const Wt=(Je,Qe)=>{var Ge=Je,{user:Mt,forumsDetail:Et,globalSetting:Bt,loading:rn,dispatch:Yt,handleClick:Qt}=Ge,wn=be(Ge,["user","forumsDetail","globalSetting","loading","dispatch","handleClick"]);const{memo:In,memo_replies:kn}=Et.forumsDetailData||{},cn=(0,Ze.useParams)(),[On,qe]=(0,ie.useState)(""),[je,Ot]=(0,ie.useState)(""),[Ln,zn]=(0,ie.useState)(-1),[Ce,Se]=(0,ie.useState)(!1),[Pt,dt]=(0,ie.useState)(1),[Te,lt]=(0,ie.useState)(!1);(0,ie.useImperativeHandle)(Qe,()=>({onMdFouch:an})),(0,ie.useEffect)(()=>{Se((In==null?void 0:In.replies_count)>10)},[In==null?void 0:In.replies_count]);const wt=()=>Ve(void 0,null,function*(){var vt;const Gt=Pt+1;dt(Gt);const st=yield(0,_e.z5)({id:cn.memoId,page:Gt});st!=null&&st.memo_replies&&(Yt({type:"forumsDetail/setForumsDetailData",payload:ne(se({},Et.forumsDetailData),{memo_replies:[...kn,...st.memo_replies]})}),Se(((vt=st.memo_replies)==null?void 0:vt.length)===10))}),Xt=vt=>{var Gt,st,Ke,Ht;return ne(se({},vt),{image_url:(Gt=Mt.userInfo)==null?void 0:Gt.image_url,children:[],user_id:(st=Mt.userInfo)==null?void 0:st.user_id,user_login:(Ke=Mt.userInfo)==null?void 0:Ke.login,username:(Ht=Mt.userInfo)==null?void 0:Ht.username,time:`${(0,Jt.li)((new Date().getTime()-new Date(vt.created_at).getTime())/1e3)}\u524D`})},an=()=>{lt(!0)};return ie.createElement("section",{className:Lt.wrap},!!(kn!=null&&kn.length)&&ie.createElement("aside",{className:Lt.content},ie.createElement("div",{style:{padding:"10px 15px 5px 15px",justifyContent:"space-between",display:"flex"}},ie.createElement("span",null,"\u5168\u90E8\u56DE\u590D\uFF08",In.replies_count,"\uFF09")),ie.createElement("aside",{className:Lt.replyList},kn==null?void 0:kn.map(function(vt,Gt){var st;return ie.createElement(Oe.Z,{gutter:[12,12],key:Gt},ie.createElement(pe.Z,{flex:"40px"},ie.createElement("a",{href:`/users/${vt.user_login}`,target:"_blank"},ie.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"50",height:"50",src:`${De.Z.IMG_SERVER}/images/${vt==null?void 0:vt.image_url}`}))),ie.createElement(pe.Z,{flex:"1"},ie.createElement(Oe.Z,{align:"middle"},ie.createElement(pe.Z,{span:24},ie.createElement("a",{href:`/users/${vt.user_login}`,target:"_blank"},ie.createElement("span",{className:"c-light-black"},vt==null?void 0:vt.username)),ie.createElement("span",{className:"c-light-black ml10"},vt.time)),ie.createElement(pe.Z,{span:24},ie.createElement("div",{onClick:Qt},ie.createElement(it.Z,{value:vt.content}))),!!((st=vt==null?void 0:vt.children)!=null&&st.length)&&ie.createElement(bt,{user:Mt,id:vt==null?void 0:vt.id,vlist:vt==null?void 0:vt.children,dispatch:Yt,params:cn,memo_replies:kn,forumsDetail:Et}),ie.createElement(pe.Z,{span:24,className:"mt5 c-light-black"},Ln===Gt?ie.createElement("aside",null,ie.createElement(ot.Z,{onChange:Ke=>{Ot(Ke)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),ie.createElement(Oe.Z,null,ie.createElement(pe.Z,{span:24,className:"tr"},ie.createElement(ge.ZP,{type:"primary",size:"middle",onClick:()=>Ve(this,null,function*(){if(je==="")Ut.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const Ke=yield(0,_e.ts)({parent_id:vt.id,content:je});Ot(null),Ke&&(zn(-1),kn.find(Ht=>Ht.id===Ke.parent_id).children.push(Xt(Ke)),Yt({type:"forumsDetail/setForumsDetailData",payload:ne(se({},Et.forumsDetailData),{memo:ne(se({},In),{replies_count:In.replies_count+1}),memo_replies:[...kn]})}))}})},"\u53D1\u9001")))):ie.createElement("div",{className:"tr"},ie.createElement("span",{className:"iconfont icon-huifu1 mr15 ml30 current",onClick:()=>zn(Gt)}),ie.createElement(Xe.Z,{title:vt.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ie.createElement("span",{className:vt.user_praise?"c-orange":"c-gery-888"},ie.createElement("i",{className:"iconfont icon-dianzan mr3 current",onClick:()=>Ve(this,null,function*(){const Ke=yield(0,_e.vL)({id:vt.id,container_type:"Memo",type:vt.user_praise?0:1});(Ke==null?void 0:Ke.praise_count)>=0&&(kn.find(Ht=>Ht.id===vt.id).user_praise=!vt.user_praise,kn.find(Ht=>Ht.id===vt.id).praise_count=Ke==null?void 0:Ke.praise_count,Yt({type:"forumsDetail/setForumsDetailData",payload:ne(se({},Et.forumsDetailData),{memo_replies:[...kn]})}))})}),vt.praise_count>0?vt.praise_count:"")))))))}))),Ce&&ie.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center"}},ie.createElement(Oe.Z,{justify:"space-between"},ie.createElement(pe.Z,null),ie.createElement(pe.Z,null,Ce&&ie.createElement("a",{className:"c-black",onClick:wt},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA")))),ie.createElement("aside",{className:Lt.reply},ie.createElement(ot.Z,{onBlur:()=>lt(!1),isFocus:Te,defaultValue:On,id:"writeForumsReviewId",onChange:vt=>{qe(vt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ie.createElement(Oe.Z,null,ie.createElement(pe.Z,{flex:"1"}),ie.createElement(pe.Z,null,ie.createElement(ge.ZP,{type:"primary",size:"middle",onClick:()=>Ve(void 0,null,function*(){if(On==="")Ut.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const vt=yield(0,_e.ts)({parent_id:In.id,content:On});qe(null),vt&&Yt({type:"forumsDetail/setForumsDetailData",payload:ne(se({},Et.forumsDetailData),{memo:ne(se({},In),{replies_count:In.replies_count+1}),memo_replies:[Xt(vt),...kn]})})}})},"\u53D1\u9001")))))};var It=(0,Ze.connect)(({user:Je,forumsDetail:Qe,loading:Ge,globalSetting:Mt})=>({user:Je,forumsDetail:Qe,globalSetting:Mt,loading:Ge.models.forumsDetail}),null,null,{forwardRef:!0})((0,ie.forwardRef)(Wt)),gt={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"},At=he(87169),nn=he(39479),$t=he(33796),hn=Object.defineProperty,at=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,Ne=(Je,Qe,Ge)=>Qe in Je?hn(Je,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Je[Qe]=Ge,Zt=(Je,Qe)=>{for(var Ge in Qe||(Qe={}))xt.call(Qe,Ge)&&Ne(Je,Ge,Qe[Ge]);if(yt)for(var Ge of yt(Qe))Dt.call(Qe,Ge)&&Ne(Je,Ge,Qe[Ge]);return Je},pt=(Je,Qe)=>at(Je,xe(Qe)),St=(Je,Qe)=>{var Ge={};for(var Mt in Je)xt.call(Je,Mt)&&Qe.indexOf(Mt)<0&&(Ge[Mt]=Je[Mt]);if(Je!=null&&yt)for(var Mt of yt(Je))Qe.indexOf(Mt)<0&&Dt.call(Je,Mt)&&(Ge[Mt]=Je[Mt]);return Ge},Ft=(Je,Qe,Ge)=>new Promise((Mt,Et)=>{var Bt=Qt=>{try{Yt(Ge.next(Qt))}catch(wn){Et(wn)}},rn=Qt=>{try{Yt(Ge.throw(Qt))}catch(wn){Et(wn)}},Yt=Qt=>Qt.done?Mt(Qt.value):Promise.resolve(Qt.value).then(Bt,rn);Yt((Ge=Ge.apply(Je,Qe)).next())});const xn={5:"\u6280\u672F\u5206\u4EAB",3:"\u64CD\u4F5C\u6307\u5357",16:"\u901A\u77E5\u516C\u544A"},_t=Je=>{var Qe=Je,{user:Ge,forumsDetail:Mt,globalSetting:Et,loading:Bt,dispatch:rn}=Qe,Yt=St(Qe,["user","forumsDetail","globalSetting","loading","dispatch"]),Qt,wn,In,kn,cn;const{author_info:On,memo:qe,attachments_list:je}=Mt.forumsDetailData||{},Ot=(0,ie.useRef)(),Ln=(0,ie.useRef)(),zn=()=>Ft(void 0,null,function*(){const wt={id:qe.id,sticky:qe.sticky?0:1},Xt=yield(0,_e.B0)(wt);(Xt==null?void 0:Xt.status)===0&&rn({type:"forumsDetail/setForumsDetailData",payload:pt(Zt({},Mt.forumsDetailData),{memo:pt(Zt({},qe),{sticky:!(qe!=null&&qe.sticky)})})})}),Ce=()=>Ft(void 0,null,function*(){const wt=yield(0,_e.sW)({id:qe==null?void 0:qe.id});(wt==null?void 0:wt.status)===0&&(Ut.ZP.success("\u5220\u9664\u6210\u529F"),Ze.history.push("/forums")),(wt==null?void 0:wt.status)===-1&&Ze.history.push("/forums")}),Se=()=>Ft(void 0,null,function*(){Ye.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(We.default,{defaultValue:Ot.current,onChange:wt=>Ot.current=wt.target.value})),onOk:()=>Ft(void 0,null,function*(){const wt=yield(0,_e.eh)({id:qe==null?void 0:qe.id,container_type:"Memo",score:Ot.current?Number(Ot.current):0,user_id:On==null?void 0:On.user_id});if(Ot.current=null,(wt==null?void 0:wt.code)>0){rn({type:"forumsDetail/setForumsDetailData",payload:pt(Zt({},Mt.forumsDetailData),{memo:pt(Zt({},qe),{reward:wt==null?void 0:wt.code})})}),Ut.ZP.success("\u5956\u52B1\u6210\u529F");return}Ut.ZP.success("\u5956\u52B1\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7CFB\u7EDF\u7BA1\u7406\u5458\uFF01")})})}),Pt=()=>{Ln.current.onMdFouch&&Ln.current.onMdFouch()},dt=()=>Ft(void 0,null,function*(){const wt=yield(0,_e.vL)({id:qe.id,container_type:"Memo",type:1});(wt==null?void 0:wt.praise_count)>=0&&rn({type:"forumsDetail/setForumsDetailData",payload:pt(Zt({},Mt.forumsDetailData),{memo:pt(Zt({},qe),{user_praise:!(qe!=null&&qe.user_praise),memo_praise_count:wt==null?void 0:wt.praise_count})})})}),Te=ie.createElement(Ct.default,{className:gt.menu},((Qt=Ge.userInfo)==null?void 0:Qt.admin)&&(qe==null?void 0:qe.sticky)&&ie.createElement(Ct.default.Item,null,ie.createElement("a",{onClick:()=>zn()},"\u53D6\u6D88\u7F6E\u9876")),((wn=Ge.userInfo)==null?void 0:wn.admin)&&!(qe!=null&&qe.sticky)&&ie.createElement(Ct.default.Item,null,ie.createElement("a",{onClick:()=>zn()},"\u7F6E\xA0\xA0\u9876")),ie.createElement(Ct.default.Item,null,ie.createElement(Ze.Link,{to:`/forums/${qe==null?void 0:qe.id}/edit`},"\u7F16\xA0\xA0\u8F91")),ie.createElement(Ct.default.Item,null,ie.createElement("a",{onClick:()=>{Ye.default.confirm({title:"\u63D0\u793A",icon:ie.createElement(At.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:()=>{Ce()},cancelText:"\u53D6\u6D88"})}},"\u5220\xA0\xA0\u9664"))),lt=wt=>{let{nodeName:Xt,src:an}=wt.target;Xt==="IMG"&&($t.Z.publish("preview-image",an),console.log("src:",an))};return(0,ie.useEffect)(()=>{},[]),ie.createElement("section",{className:gt.wrap},ie.createElement(Le.Z,{separator:"/",className:"mb5"},ie.createElement(Le.Z.Item,null,ie.createElement(Ze.Link,{to:`/forums/categories/${qe==null?void 0:qe.forum_id}`},xn[qe==null?void 0:qe.forum_id])),ie.createElement(Le.Z.Item,null,"\u8BE6\u60C5")),ie.createElement("header",{className:`bg-white pt40 pb40 pl30 pr30 ${gt.header}`},ie.createElement(Oe.Z,{align:"middle"},ie.createElement(pe.Z,{flex:1,className:"font24 mb5"},ie.createElement("span",{className:gt.title},qe==null?void 0:qe.subject),(qe==null?void 0:qe.sticky)&&ie.createElement("span",{className:gt.top},"\u7F6E\u9876"),!!(qe!=null&&qe.reward)&&ie.createElement(Xe.Z,{placement:"bottom",title:`\u83B7\u5F97\u5E73\u53F0\u5956\u52B1\u91D1\u5E01\uFF1A${qe==null?void 0:qe.reward}`},ie.createElement("span",{className:"ml10 c-orange-ff7"},ie.createElement("i",{className:"iconfont icon-gift font16 mr5"}),ie.createElement("span",{className:"font14"},qe==null?void 0:qe.reward)))),ie.createElement(pe.Z,null,(((In=Ge.userInfo)==null?void 0:In.admin)||((kn=Ge.userInfo)==null?void 0:kn.user_id)===(On==null?void 0:On.user_id))&&ie.createElement(Be.Z,{dropdownRender:()=>Te},ie.createElement("i",{className:"fa fa-bars font-16 current c-grey-bcb"})))),ie.createElement(Oe.Z,{align:"middle",className:"font14"},ie.createElement(pe.Z,{flex:1,className:"c-grey-999"},ie.createElement("span",null,Ae()(qe==null?void 0:qe.time).fromNow()," \u66F4\u65B0")),ie.createElement(pe.Z,{className:"c-grey-999"},((cn=Ge.userInfo)==null?void 0:cn.admin)&&ie.createElement(Xe.Z,{placement:"bottom",title:"\u5E16\u5B50\u5956\u52B1"},ie.createElement("span",{className:`current pr10 ${gt.line}`,onClick:Se},ie.createElement("i",{className:"iconfont icon-jiangli font18 mr5"}))),ie.createElement("span",{className:`pr10 pl10 ${qe!=null&&qe.replies_count?gt.line:""}`},ie.createElement("i",{className:"iconfont icon-liulanyan font18 mr5"}),qe==null?void 0:qe.viewed_count),!!(qe!=null&&qe.replies_count)&&ie.createElement(Xe.Z,{placement:"bottom",title:"\u5199\u8BC4\u8BBA"},ie.createElement("span",{className:"current pl10",onClick:Pt},ie.createElement("i",{className:"iconfont icon-huifu1 font18 mr5"}),qe==null?void 0:qe.replies_count))))),ie.createElement("main",{className:"bg-white pt40 pb40 pl40 pr40"},ie.createElement("div",{onClick:lt},ie.createElement(it.Z,{value:qe==null?void 0:qe.content})),ie.createElement("div",{className:"bg-white pl40 pr40 mt40"},ie.createElement("div",{className:`mt10 mb20 ${gt.flexCenter}`},ie.createElement("div",{className:`${gt.like} ${qe!=null&&qe.user_praise?"":gt.canLike}`,onClick:dt},ie.createElement("i",{className:"iconfont icon-dianzan font18"}),ie.createElement("br",null),ie.createElement("span",null,qe==null?void 0:qe.memo_praise_count)))),!!(je!=null&&je.length)&&ie.createElement("div",{className:"mt40"},je==null?void 0:je.map(wt=>ie.createElement("div",{className:`c-grey-888 ${gt.flexCenter}`},ie.createElement("i",{className:"iconfont icon-fujian mr10 font14 c-green-29b"}),ie.createElement("a",{href:wt==null?void 0:wt.url,title:wt==null?void 0:wt.title,className:`${gt.attachmentName} mr10`},wt==null?void 0:wt.title),ie.createElement("span",{className:"font12 c-grey-666 mt3"},wt==null?void 0:wt.filesize))))),ie.createElement(It,{ref:Ln,handleClick:lt}),ie.createElement(nn.Z,null))};var Cn=(0,Ze.connect)(({user:Je,forumsDetail:Qe,loading:Ge,globalSetting:Mt})=>({user:Je,forumsDetail:Qe,globalSetting:Mt,loading:Ge.effects}))(_t),Tn={flex:"flex___fgmSn"},Mn=he(29787),qn=Object.getOwnPropertySymbols,$n=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,Un=(Je,Qe)=>{var Ge={};for(var Mt in Je)$n.call(Je,Mt)&&Qe.indexOf(Mt)<0&&(Ge[Mt]=Je[Mt]);if(Je!=null&&qn)for(var Mt of qn(Je))Qe.indexOf(Mt)<0&&Nn.call(Je,Mt)&&(Ge[Mt]=Je[Mt]);return Ge},Rn=(Je,Qe,Ge)=>new Promise((Mt,Et)=>{var Bt=Qt=>{try{Yt(Ge.next(Qt))}catch(wn){Et(wn)}},rn=Qt=>{try{Yt(Ge.throw(Qt))}catch(wn){Et(wn)}},Yt=Qt=>Qt.done?Mt(Qt.value):Promise.resolve(Qt.value).then(Bt,rn);Yt((Ge=Ge.apply(Je,Qe)).next())});const Fn=Je=>{var Qe=Je,{forumsDetail:Ge,globalSetting:Mt,loading:Et,dispatch:Bt}=Qe,rn=Un(Qe,["forumsDetail","globalSetting","loading","dispatch"]);const Yt=(0,Ze.useParams)(),[Qt,wn]=(0,ie.useState)(!1);(0,ie.useEffect)(()=>{In()},[Yt.memoId]);const In=()=>Rn(void 0,null,function*(){wn(!0);let kn=yield Bt({type:"forumsDetail/getForumsDetailData",payload:{id:Yt.memoId}});wn(!1)});return ie.createElement(Mn.Z,{spinning:Qt},ie.createElement("section",{className:`edu-container mb20 mt30 ${Tn.flex}`},ie.createElement(Cn,null),ie.createElement(ct,null)))};var Sn=(0,Ze.connect)(({forumsDetail:Je,loading:Qe,globalSetting:Ge})=>({forumsDetail:Je,globalSetting:Ge,loading:Qe.models.forumsDetail}))(Fn)},90290:function(jt,qt,he){"use strict";he.d(qt,{AL:function(){return ct},Iy:function(){return $e},Qv:function(){return Fe},ez:function(){return ft},jb:function(){return ve}});var ie=he(32834),Ze=he.n(ie),De=he(11690),Oe=he.n(De);let pe=1;function ge(Ye,We){const Ct=Ye.match(/^(\s+)(?:```)/);if(Ct===null)return We;const Le=Ct[1];return We.split(`
|
|
`).map(Xe=>{const Be=Xe.match(/^\s+/);if(Be===null)return Xe;const[ot]=Be;return ot.length>=Le.length?Xe.slice(Le.length):Xe}).join(`
|
|
`)}let Ie=[],_e=["<ul>"];const we=new(Ze()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function $e(){Ie.length=0,_e=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ht(Ye,We,Ct,Le){if(We>=Ye.length||Ye[We].level<=Ct)return We;var Xe=Ye[We];Le.push("<li><a href='#"+pe+Xe.anchor+"'>"+Xe.text+"</a>"),We++;var Be=[];return We=ht(Ye,We,Xe.level,Be),Be.length>0&&(Le.push("<ul>"),Be.forEach(function(ot){Le.push(ot)}),Le.push("</ul>")),Le.push("</li>"),We=ht(Ye,We,Ct,Le),We}function Fe(){return ht(Ie,0,0,_e),_e.push("</ul>"),_e.join("")}const Me={heading(Ye){const We=fe.exec(Ye);if(pe+=1,We)return{type:"heading",raw:We[0],depth:We[1].length,text:We[2]}},fences(Ye){const We=this.rules.block.fences.exec(Ye);if(We){const Ct=We[0];let Le=ge(Ct,We[3]||"");const Xe=We[2]?We[2].trim():We[2];if(["latex","katex","math"].indexOf(Xe)>=0){const Be=nt(),ot=Le;Le=Be,ut[Be]={type:"block",expression:ot}}return{type:"code",raw:Ct,lang:Xe,text:Le}}}},Pe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ee=0;const nt=()=>`__special_katext_id_${Ee++}__`;let ut={};function ft(){return ut}function ct(){Ee=0,ut={}}function et(Ye){return Ye=Ye.replace(Pe,(We,Ct)=>{const Le=nt();return ut[Le]={type:"inline",expression:Ct},Le}),Ye}const Ae=we.listitem;we.listitem=function(Ye){return Ae(et(Ye))};const it=we.paragraph;we.paragraph=function(Ye){return it(et(Ye))};const Ut=we.tablecell;we.tablecell=function(Ye,We){return Ut(et(Ye),We)},we.code=function(Ye,We,Ct){const Le=(We||"").match(/\S*/)[0];return Le?["latex","katex","math"].indexOf(Le)>=0?`<p class='editormd-tex'>${Ye}</p>`:`<pre class="prettyprint linenums"><code class="language-${We}">${Ct?Ye:(0,De.escape)(Ye,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Ct?Ye:(0,De.escape)(Ye,!0))+"</code></pre>"},we.heading=function(Ye,We,Ct){let Le=this.options.headerPrefix+Ct.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ie.push({anchor:Le,level:We,text:Ye}),"<h"+We+' id="'+pe+Le+'">'+Ye+"</h"+We+">"},Ze().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ze().use({tokenizer:Me,renderer:we}),qt.ZP=Ze()},99498:function(jt,qt,he){(function(ie){ie(he(89780))})(function(ie){ie.defineOption("placeholder","",function(_e,we,fe){var $e=fe&&fe!=ie.Init;if(we&&!$e)_e.on("blur",pe),_e.on("change",ge),_e.on("swapDoc",ge),ie.on(_e.getInputField(),"compositionupdate",_e.state.placeholderCompose=function(){Oe(_e)}),ge(_e);else if(!we&&$e){_e.off("blur",pe),_e.off("change",ge),_e.off("swapDoc",ge),ie.off(_e.getInputField(),"compositionupdate",_e.state.placeholderCompose),Ze(_e);var ve=_e.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}we&&!_e.hasFocus()&&pe(_e)});function Ze(_e){_e.state.placeholder&&(_e.state.placeholder.parentNode.removeChild(_e.state.placeholder),_e.state.placeholder=null)}function De(_e){Ze(_e);var we=_e.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=_e.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var fe=_e.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),we.appendChild(fe),_e.display.lineSpace.insertBefore(we,_e.display.lineSpace.firstChild)}function Oe(_e){setTimeout(function(){var we=!1,fe=_e.getInputField();fe.nodeName=="TEXTAREA"?we=!fe.value:_e.lineCount()==1&&(we=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),we?De(_e):Ze(_e)},20)}function pe(_e){Ie(_e)&&De(_e)}function ge(_e){var we=_e.getWrapperElement(),fe=Ie(_e);we.className=we.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?De(_e):Ze(_e)}function Ie(_e){return _e.lineCount()===1&&_e.getLine(0)===""}})},25717:function(jt,qt,he){(function(ie){ie(he(89780))})(function(ie){var Ze={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},De=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(Me,Pe,Ee){Ee&&Ee!=ie.Init&&(Me.removeKeyMap(pe),Me.state.closeBrackets=null),Pe&&(ge(Oe(Pe,"pairs")),Me.state.closeBrackets=Pe,Me.addKeyMap(pe))});function Oe(Me,Pe){return Pe=="pairs"&&typeof Me=="string"?Me:typeof Me=="object"&&Me[Pe]!=null?Me[Pe]:Ze[Pe]}var pe={Backspace:we,Enter:fe};function ge(Me){for(var Pe=0;Pe<Me.length;Pe++){var Ee=Me.charAt(Pe),nt="'"+Ee+"'";pe[nt]||(pe[nt]=Ie(Ee))}}ge(Ze.pairs+"`");function Ie(Me){return function(Pe){return ve(Pe,Me)}}function _e(Me){var Pe=Me.state.closeBrackets;if(!Pe||Pe.override)return Pe;var Ee=Me.getModeAt(Me.getCursor());return Ee.closeBrackets||Pe}function we(Me){var Pe=_e(Me);if(!Pe||Me.getOption("disableInput"))return ie.Pass;for(var Ee=Oe(Pe,"pairs"),nt=Me.listSelections(),ut=0;ut<nt.length;ut++){if(!nt[ut].empty())return ie.Pass;var ft=ht(Me,nt[ut].head);if(!ft||Ee.indexOf(ft)%2!=0)return ie.Pass}for(var ut=nt.length-1;ut>=0;ut--){var ct=nt[ut].head;Me.replaceRange("",De(ct.line,ct.ch-1),De(ct.line,ct.ch+1),"+delete")}}function fe(Me){var Pe=_e(Me),Ee=Pe&&Oe(Pe,"explode");if(!Ee||Me.getOption("disableInput"))return ie.Pass;for(var nt=Me.listSelections(),ut=0;ut<nt.length;ut++){if(!nt[ut].empty())return ie.Pass;var ft=ht(Me,nt[ut].head);if(!ft||Ee.indexOf(ft)%2!=0)return ie.Pass}Me.operation(function(){var ct=Me.lineSeparator()||`
|
|
`;Me.replaceSelection(ct+ct,null),Me.execCommand("goCharLeft"),nt=Me.listSelections();for(var et=0;et<nt.length;et++){var Ae=nt[et].head.line;Me.indentLine(Ae,null,!0),Me.indentLine(Ae+1,null,!0)}})}function $e(Me){var Pe=ie.cmpPos(Me.anchor,Me.head)>0;return{anchor:new De(Me.anchor.line,Me.anchor.ch+(Pe?-1:1)),head:new De(Me.head.line,Me.head.ch+(Pe?1:-1))}}function ve(Me,Pe){var Ee=_e(Me);if(!Ee||Me.getOption("disableInput"))return ie.Pass;var nt=Oe(Ee,"pairs"),ut=nt.indexOf(Pe);if(ut==-1)return ie.Pass;for(var ft=Oe(Ee,"closeBefore"),ct=Oe(Ee,"triples"),et=nt.charAt(ut+1)==Pe,Ae=Me.listSelections(),it=ut%2==0,Ut,Ye=0;Ye<Ae.length;Ye++){var We=Ae[Ye],Ct=We.head,Le,Xe=Me.getRange(Ct,De(Ct.line,Ct.ch+1));if(it&&!We.empty())Le="surround";else if((et||!it)&&Xe==Pe)et&&Fe(Me,Ct)?Le="both":ct.indexOf(Pe)>=0&&Me.getRange(Ct,De(Ct.line,Ct.ch+3))==Pe+Pe+Pe?Le="skipThree":Le="skip";else if(et&&Ct.ch>1&&ct.indexOf(Pe)>=0&&Me.getRange(De(Ct.line,Ct.ch-2),Ct)==Pe+Pe){if(Ct.ch>2&&/\bstring/.test(Me.getTokenTypeAt(De(Ct.line,Ct.ch-2))))return ie.Pass;Le="addFour"}else if(et){var Be=Ct.ch==0?" ":Me.getRange(De(Ct.line,Ct.ch-1),Ct);if(!ie.isWordChar(Xe)&&Be!=Pe&&!ie.isWordChar(Be))Le="both";else return ie.Pass}else if(it&&(Xe.length===0||/\s/.test(Xe)||ft.indexOf(Xe)>-1))Le="both";else return ie.Pass;if(!Ut)Ut=Le;else if(Ut!=Le)return ie.Pass}var ot=ut%2?nt.charAt(ut-1):Pe,un=ut%2?Pe:nt.charAt(ut+1);Me.operation(function(){if(Ut=="skip")Me.execCommand("goCharRight");else if(Ut=="skipThree")for(var Lt=0;Lt<3;Lt++)Me.execCommand("goCharRight");else if(Ut=="surround"){for(var Dn=Me.getSelections(),Lt=0;Lt<Dn.length;Lt++)Dn[Lt]=ot+Dn[Lt]+un;Me.replaceSelections(Dn,"around"),Dn=Me.listSelections().slice();for(var Lt=0;Lt<Dn.length;Lt++)Dn[Lt]=$e(Dn[Lt]);Me.setSelections(Dn)}else Ut=="both"?(Me.replaceSelection(ot+un,null),Me.triggerElectric(ot+un),Me.execCommand("goCharLeft")):Ut=="addFour"&&(Me.replaceSelection(ot+ot+ot+ot,"before"),Me.execCommand("goCharRight"))})}function ht(Me,Pe){var Ee=Me.getRange(De(Pe.line,Pe.ch-1),De(Pe.line,Pe.ch+1));return Ee.length==2?Ee:null}function Fe(Me,Pe){var Ee=Me.getTokenAt(De(Pe.line,Pe.ch+1));return/\bstring/.test(Ee.type)&&Ee.start==Pe.ch&&(Pe.ch==0||!/\bstring/.test(Me.getTokenTypeAt(Pe)))}})},6313:function(jt,qt,he){(function(ie){ie(he(89780),he(32855))})(function(ie){ie.defineOption("autoCloseTags",!1,function(we,fe,$e){if($e!=ie.Init&&$e&&we.removeKeyMap("autoCloseTags"),!!fe){var ve={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(ve["'/'"]=function(ht){return ge(ht)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(ve["'>'"]=function(ht){return Oe(ht)}),we.addKeyMap(ve)}});var Ze=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],De=["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 Oe(we){if(we.getOption("disableInput"))return ie.Pass;for(var fe=we.listSelections(),$e=[],ve=we.getOption("autoCloseTags"),ht=0;ht<fe.length;ht++){if(!fe[ht].empty())return ie.Pass;var Fe=fe[ht].head,Me=we.getTokenAt(Fe),Pe=ie.innerMode(we.getMode(),Me.state),Ee=Pe.state,nt=Pe.mode.xmlCurrentTag&&Pe.mode.xmlCurrentTag(Ee),ut=nt&&nt.name;if(!ut)return ie.Pass;var ft=Pe.mode.configuration=="html",ct=typeof ve=="object"&&ve.dontCloseTags||ft&&Ze,et=typeof ve=="object"&&ve.indentTags||ft&&De;Me.end>Fe.ch&&(ut=ut.slice(0,ut.length-Me.end+Fe.ch));var Ae=ut.toLowerCase();if(!ut||Me.type=="string"&&(Me.end!=Fe.ch||!/[\"\']/.test(Me.string.charAt(Me.string.length-1))||Me.string.length==1)||Me.type=="tag"&&nt.close||Me.string.indexOf("/")==Fe.ch-Me.start-1||ct&&Ie(ct,Ae)>-1||_e(we,Pe.mode.xmlCurrentContext&&Pe.mode.xmlCurrentContext(Ee)||[],ut,Fe,!0))return ie.Pass;var it=typeof ve=="object"&&ve.emptyTags;if(it&&Ie(it,ut)>-1){$e[ht]={text:"/>",newPos:ie.Pos(Fe.line,Fe.ch+2)};continue}var Ut=et&&Ie(et,Ae)>-1;$e[ht]={indent:Ut,text:">"+(Ut?`
|
|
|
|
`:"")+"</"+ut+">",newPos:Ut?ie.Pos(Fe.line+1,0):ie.Pos(Fe.line,Fe.ch+1)}}for(var Ye=typeof ve=="object"&&ve.dontIndentOnAutoClose,ht=fe.length-1;ht>=0;ht--){var We=$e[ht];we.replaceRange(We.text,fe[ht].head,fe[ht].anchor,"+insert");var Ct=we.listSelections().slice(0);Ct[ht]={head:We.newPos,anchor:We.newPos},we.setSelections(Ct),!Ye&&We.indent&&(we.indentLine(We.newPos.line,null,!0),we.indentLine(We.newPos.line+1,null,!0))}}function pe(we,fe){for(var $e=we.listSelections(),ve=[],ht=fe?"/":"</",Fe=we.getOption("autoCloseTags"),Me=typeof Fe=="object"&&Fe.dontIndentOnSlash,Pe=0;Pe<$e.length;Pe++){if(!$e[Pe].empty())return ie.Pass;var Ee=$e[Pe].head,nt=we.getTokenAt(Ee),ut=ie.innerMode(we.getMode(),nt.state),ft=ut.state;if(fe&&(nt.type=="string"||nt.string.charAt(0)!="<"||nt.start!=Ee.ch-1))return ie.Pass;var ct,et=ut.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(et&&ut.mode.name=="javascript")ct=ht+"script";else if(et&&ut.mode.name=="css")ct=ht+"style";else{var Ae=ut.mode.xmlCurrentContext&&ut.mode.xmlCurrentContext(ft);if(!Ae||Ae.length&&_e(we,Ae,Ae[Ae.length-1],Ee))return ie.Pass;ct=ht+Ae[Ae.length-1]}we.getLine(Ee.line).charAt(nt.end)!=">"&&(ct+=">"),ve[Pe]=ct}if(we.replaceSelections(ve),$e=we.listSelections(),!Me)for(var Pe=0;Pe<$e.length;Pe++)(Pe==$e.length-1||$e[Pe].head.line<$e[Pe+1].head.line)&&we.indentLine($e[Pe].head.line)}function ge(we){return we.getOption("disableInput")?ie.Pass:pe(we,!0)}ie.commands.closeTag=function(we){return pe(we)};function Ie(we,fe){if(we.indexOf)return we.indexOf(fe);for(var $e=0,ve=we.length;$e<ve;++$e)if(we[$e]==fe)return $e;return-1}function _e(we,fe,$e,ve,ht){if(!ie.scanForClosingTag)return!1;var Fe=Math.min(we.lastLine()+1,ve.line+500),Me=ie.scanForClosingTag(we,ve,null,Fe);if(!Me||Me.tag!=$e)return!1;for(var Pe=ht?1:0,Ee=fe.length-1;Ee>=0&&fe[Ee]==$e;Ee--)++Pe;ve=Me.to;for(var Ee=1;Ee<Pe;Ee++){var nt=ie.scanForClosingTag(we,ve,null,Fe);if(!nt||nt.tag!=$e)return!1;ve=nt.to}return!0}})},32855:function(jt,qt,he){(function(ie){ie(he(89780))})(function(ie){"use strict";var Ze=ie.Pos;function De(Ee,nt){return Ee.line-nt.line||Ee.ch-nt.ch}var Oe="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",pe=Oe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ge=new RegExp("<(/?)(["+Oe+"]["+pe+"]*)","g");function Ie(Ee,nt,ut,ft){this.line=nt,this.ch=ut,this.cm=Ee,this.text=Ee.getLine(nt),this.min=ft?Math.max(ft.from,Ee.firstLine()):Ee.firstLine(),this.max=ft?Math.min(ft.to-1,Ee.lastLine()):Ee.lastLine()}function _e(Ee,nt){var ut=Ee.cm.getTokenTypeAt(Ze(Ee.line,nt));return ut&&/\btag\b/.test(ut)}function we(Ee){if(!(Ee.line>=Ee.max))return Ee.ch=0,Ee.text=Ee.cm.getLine(++Ee.line),!0}function fe(Ee){if(!(Ee.line<=Ee.min))return Ee.text=Ee.cm.getLine(--Ee.line),Ee.ch=Ee.text.length,!0}function $e(Ee){for(;;){var nt=Ee.text.indexOf(">",Ee.ch);if(nt==-1){if(we(Ee))continue;return}if(!_e(Ee,nt+1)){Ee.ch=nt+1;continue}var ut=Ee.text.lastIndexOf("/",nt),ft=ut>-1&&!/\S/.test(Ee.text.slice(ut+1,nt));return Ee.ch=nt+1,ft?"selfClose":"regular"}}function ve(Ee){for(;;){var nt=Ee.ch?Ee.text.lastIndexOf("<",Ee.ch-1):-1;if(nt==-1){if(fe(Ee))continue;return}if(!_e(Ee,nt+1)){Ee.ch=nt;continue}ge.lastIndex=nt,Ee.ch=nt;var ut=ge.exec(Ee.text);if(ut&&ut.index==nt)return ut}}function ht(Ee){for(;;){ge.lastIndex=Ee.ch;var nt=ge.exec(Ee.text);if(!nt){if(we(Ee))continue;return}if(!_e(Ee,nt.index+1)){Ee.ch=nt.index+1;continue}return Ee.ch=nt.index+nt[0].length,nt}}function Fe(Ee){for(;;){var nt=Ee.ch?Ee.text.lastIndexOf(">",Ee.ch-1):-1;if(nt==-1){if(fe(Ee))continue;return}if(!_e(Ee,nt+1)){Ee.ch=nt;continue}var ut=Ee.text.lastIndexOf("/",nt),ft=ut>-1&&!/\S/.test(Ee.text.slice(ut+1,nt));return Ee.ch=nt+1,ft?"selfClose":"regular"}}function Me(Ee,nt){for(var ut=[];;){var ft=ht(Ee),ct,et=Ee.line,Ae=Ee.ch-(ft?ft[0].length:0);if(!ft||!(ct=$e(Ee)))return;if(ct!="selfClose")if(ft[1]){for(var it=ut.length-1;it>=0;--it)if(ut[it]==ft[2]){ut.length=it;break}if(it<0&&(!nt||nt==ft[2]))return{tag:ft[2],from:Ze(et,Ae),to:Ze(Ee.line,Ee.ch)}}else ut.push(ft[2])}}function Pe(Ee,nt){for(var ut=[];;){var ft=Fe(Ee);if(!ft)return;if(ft=="selfClose"){ve(Ee);continue}var ct=Ee.line,et=Ee.ch,Ae=ve(Ee);if(!Ae)return;if(Ae[1])ut.push(Ae[2]);else{for(var it=ut.length-1;it>=0;--it)if(ut[it]==Ae[2]){ut.length=it;break}if(it<0&&(!nt||nt==Ae[2]))return{tag:Ae[2],from:Ze(Ee.line,Ee.ch),to:Ze(ct,et)}}}}ie.registerHelper("fold","xml",function(Ee,nt){for(var ut=new Ie(Ee,nt.line,0);;){var ft=ht(ut);if(!ft||ut.line!=nt.line)return;var ct=$e(ut);if(!ct)return;if(!ft[1]&&ct!="selfClose"){var et=Ze(ut.line,ut.ch),Ae=Me(ut,ft[2]);return Ae&&De(Ae.from,et)>0?{from:et,to:Ae.from}:null}}}),ie.findMatchingTag=function(Ee,nt,ut){var ft=new Ie(Ee,nt.line,nt.ch,ut);if(!(ft.text.indexOf(">")==-1&&ft.text.indexOf("<")==-1)){var ct=$e(ft),et=ct&&Ze(ft.line,ft.ch),Ae=ct&&ve(ft);if(!(!ct||!Ae||De(ft,nt)>0)){var it={from:Ze(ft.line,ft.ch),to:et,tag:Ae[2]};return ct=="selfClose"?{open:it,close:null,at:"open"}:Ae[1]?{open:Pe(ft,Ae[2]),close:it,at:"close"}:(ft=new Ie(Ee,et.line,et.ch,ut),{open:it,close:Me(ft,Ae[2]),at:"open"})}}},ie.findEnclosingTag=function(Ee,nt,ut,ft){for(var ct=new Ie(Ee,nt.line,nt.ch,ut);;){var et=Pe(ct,ft);if(!et)break;var Ae=new Ie(Ee,nt.line,nt.ch,ut),it=Me(Ae,et.tag);if(it)return{open:et,close:it}}},ie.scanForClosingTag=function(Ee,nt,ut,ft){var ct=new Ie(Ee,nt.line,nt.ch,ft?{from:0,to:ft}:null);return Me(ct,ut)}})},89780:function(jt){(function(qt,he){jt.exports=he()})(this,function(){"use strict";var qt=navigator.userAgent,he=navigator.platform,ie=/gecko\/\d/i.test(qt),Ze=/MSIE \d/.test(qt),De=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qt),Oe=/Edge\/(\d+)/.exec(qt),pe=Ze||De||Oe,ge=pe&&(Ze?document.documentMode||6:+(Oe||De)[1]),Ie=!Oe&&/WebKit\//.test(qt),_e=Ie&&/Qt\/\d+\.\d+/.test(qt),we=!Oe&&/Chrome\//.test(qt),fe=/Opera\//.test(qt),$e=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qt),ht=/PhantomJS/.test(qt),Fe=!Oe&&/AppleWebKit/.test(qt)&&/Mobile\/\w+/.test(qt),Me=/Android/.test(qt),Pe=Fe||Me||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qt),Ee=Fe||/Mac/.test(he),nt=/\bCrOS\b/.test(qt),ut=/win/i.test(he),ft=fe&&qt.match(/Version\/(\d*\.\d*)/);ft&&(ft=Number(ft[1])),ft&&ft>=15&&(fe=!1,Ie=!0);var ct=Ee&&(_e||fe&&(ft==null||ft<12.11)),et=ie||pe&&ge>=9;function Ae(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var it=function(a,y){var x=a.className,b=Ae(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 Ut(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ye(a,y){return Ut(a).appendChild(y)}function We(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ee=0;ee<y.length;++ee)E.appendChild(y[ee]);return E}function Ct(a,y,x,b){var E=We(a,y,x,b);return E.setAttribute("role","presentation"),E}var Le;document.createRange?Le=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Le=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 Xe(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 Be(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function ot(a,y){var x=a.className;Ae(y).test(x)||(a.className+=(x?" ":"")+y)}function un(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!Ae(x[b]).test(y)&&(y+=" "+x[b]);return y}var Lt=function(a){a.select()};Fe?Lt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:pe&&(Lt=function(a){try{a.select()}catch(y){}});function Dn(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function ln(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 ee=b||0,re=E||0;;){var le=a.indexOf(" ",ee);if(le<0||le>=y)return re+(y-ee);re+=le-ee,re+=x-re%x,ee=le+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=Dn(this.onTimeout,this)};de.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},de.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function mt(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var sn=50,Rt={toString:function(){return"CodeMirror.Pass"}},Re={scroll:!1},tt={origin:"*mouse"},rt={origin:"+move"};function dn(a,y,x){for(var b=0,E=0;;){var ee=a.indexOf(" ",b);ee==-1&&(ee=a.length);var re=ee-b;if(ee==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var bt=[""];function Jt(a){for(;bt.length<=a;)bt.push(He(bt)+" ");return bt[a]}function He(a){return a[a.length-1]}function Tt(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function Nt(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function ae(){}function te(a,y){var x;return Object.create?x=Object.create(a):(ae.prototype=a,x=new ae),y&&ln(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function se(a,y){return y?y.source.indexOf("\\w")>-1&&oe(a)?!0:y.test(a):oe(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ve(a){return a.charCodeAt(0)>=768&&be.test(a)}function Wt(a,y,x){for(;(x<0?y>0:y<a.length)&&Ve(a.charAt(y));)y+=x;return y}function It(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function gt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var re=a[ee];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",ee),E=!0)}E||b(y,x,"ltr")}var At=null;function nn(a,y,x){var b;At=null;for(var E=0;E<a.length;++E){var ee=a[E];if(ee.from<y&&ee.to>y)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:At=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:At=E)}return b!=null?b:At}var $t=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(ce){return ce<=247?a.charAt(ce):1424<=ce&&ce<=1524?"R":1536<=ce&&ce<=1785?y.charAt(ce-1536):1774<=ce&&ce<=2220?"r":8192<=ce&&ce<=8203?"w":ce==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ue(ce,ye,ke){this.level=ce,this.from=ye,this.to=ke}return function(ce,ye){var ke=ye=="ltr"?"L":"R";if(ce.length==0||ye=="ltr"&&!b.test(ce))return!1;for(var Ue=ce.length,ze=[],kt=0;kt<Ue;++kt)ze.push(x(ce.charCodeAt(kt)));for(var zt=0,on=ke;zt<Ue;++zt){var mn=ze[zt];mn=="m"?ze[zt]=on:on=mn}for(var En=0,gn=ke;En<Ue;++En){var Bn=ze[En];Bn=="1"&&gn=="r"?ze[En]="n":ee.test(Bn)&&(gn=Bn,Bn=="r"&&(ze[En]="R"))}for(var Vn=1,Hn=ze[0];Vn<Ue-1;++Vn){var cr=ze[Vn];cr=="+"&&Hn=="1"&&ze[Vn+1]=="1"?ze[Vn]="1":cr==","&&Hn==ze[Vn+1]&&(Hn=="1"||Hn=="n")&&(ze[Vn]=Hn),Hn=cr}for(var Or=0;Or<Ue;++Or){var li=ze[Or];if(li==",")ze[Or]="N";else if(li=="%"){var jr=void 0;for(jr=Or+1;jr<Ue&&ze[jr]=="%";++jr);for(var Bi=Or&&ze[Or-1]=="!"||jr<Ue&&ze[jr]=="1"?"1":"N",ki=Or;ki<jr;++ki)ze[ki]=Bi;Or=jr-1}}for(var qr=0,Ei=ke;qr<Ue;++qr){var di=ze[qr];Ei=="L"&&di=="1"?ze[qr]="L":ee.test(di)&&(Ei=di)}for(var ri=0;ri<Ue;++ri)if(E.test(ze[ri])){var $r=void 0;for($r=ri+1;$r<Ue&&E.test(ze[$r]);++$r);for(var Ur=(ri?ze[ri-1]:ke)=="L",Di=($r<Ue?ze[$r]:ke)=="L",Vo=Ur==Di?Ur?"L":"R":ke,bo=ri;bo<$r;++bo)ze[bo]=Vo;ri=$r-1}for(var pi=[],eo,si=0;si<Ue;)if(re.test(ze[si])){var bl=si;for(++si;si<Ue&&re.test(ze[si]);++si);pi.push(new ue(0,bl,si))}else{var oo=si,Mo=pi.length,To=ye=="rtl"?1:0;for(++si;si<Ue&&ze[si]!="L";++si);for(var bi=oo;bi<si;)if(le.test(ze[bi])){oo<bi&&(pi.splice(Mo,0,new ue(1,oo,bi)),Mo+=To);var Uo=bi;for(++bi;bi<si&&le.test(ze[bi]);++bi);pi.splice(Mo,0,new ue(2,Uo,bi)),Mo+=To,oo=bi}else++bi;oo<si&&pi.splice(Mo,0,new ue(1,oo,si))}return ye=="ltr"&&(pi[0].level==1&&(eo=ce.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new ue(0,0,eo[0].length))),He(pi).level==1&&(eo=ce.match(/\s+$/))&&(He(pi).to-=eo[0].length,pi.push(new ue(0,Ue-eo[0].length,Ue)))),ye=="rtl"?pi.reverse():pi}}();function hn(a,y){var x=a.order;return x==null&&(x=a.order=$t(a.text,y)),x}var at=[],xe=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]||at).concat(x)}};function yt(a,y){return a._handlers&&a._handlers[y]||at}function xt(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var ee=mt(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function Dt(a,y){var x=yt(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 Ne(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Dt(a,x||y.type,a,y),_t(y)||y.codemirrorIgnore}function Zt(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)mt(x,y[b])==-1&&x.push(y[b])}function pt(a,y){return yt(a,y).length>0}function St(a){a.prototype.on=function(y,x){xe(this,y,x)},a.prototype.off=function(y,x){xt(this,y,x)}}function Ft(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function xn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function _t(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Cn(a){Ft(a),xn(a)}function Tn(a){return a.target||a.srcElement}function Mn(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 qn=function(){if(pe&&ge<9)return!1;var a=We("div");return"draggable"in a||"dragDrop"in a}(),$n;function Nn(a){if($n==null){var y=We("span","\u200B");Ye(a,We("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&($n=y.offsetWidth<=1&&y.offsetHeight>2&&!(pe&&ge<8))}var x=$n?We("span","\u200B"):We("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=Ye(a,document.createTextNode("A\u062EA")),x=Le(y,0,1).getBoundingClientRect(),b=Le(y,1,2).getBoundingClientRect();return Ut(a),!x||x.left==x.right?!1:Un=b.right-x.right<3}var Fn=`
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
|
|
`,y);E==-1&&(E=a.length);var ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=ee.indexOf("\r");re!=-1?(x.push(ee.slice(0,re)),y+=re+1):(x.push(ee),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Sn=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},Je=function(){var a=We("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Qe=null;function Ge(a){if(Qe!=null)return Qe;var y=Ye(a,We("span","x")),x=y.getBoundingClientRect(),b=Le(y,0,1).getBoundingClientRect();return Qe=Math.abs(x.left-b.left)>1}var Mt={},Et={};function Bt(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Mt[a]=y}function rn(a,y){Et[a]=y}function Yt(a){if(typeof a=="string"&&Et.hasOwnProperty(a))a=Et[a];else if(a&&typeof a.name=="string"&&Et.hasOwnProperty(a.name)){var y=Et[a.name];typeof y=="string"&&(y={name:y}),a=te(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Yt("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Yt("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Qt(a,y){y=Yt(y);var x=Mt[y.name];if(!x)return Qt(a,"text/plain");var b=x(a,y);if(wn.hasOwnProperty(y.name)){var E=wn[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var wn={};function In(a,y){var x=wn.hasOwnProperty(a)?wn[a]:wn[a]={};ln(y,x)}function kn(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 cn(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 On(a,y,x){return a.startState?a.startState(y,x):!0}var qe=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};qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qe.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},qe.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},qe.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},qe.prototype.backUp=function(a){this.pos-=a},qe.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)},qe.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},qe.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(re){return x?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var ee=this.string.slice(this.pos).match(a);return ee&&ee.index>0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},qe.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},qe.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],ee=E.chunkSize();if(y<ee){x=E;break}y-=ee}return x.lines[y]}function Ot(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ee){var re=ee.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function Ln(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function zn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Ce(a){if(a.parent==null)return null;for(var y=a.parent,x=mt(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],ee=E.height;if(y<ee){a=E;continue e}y-=ee,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var le=a.lines[re],ue=le.height;if(y<ue)break;y-=ue}return x+re}function Pt(a,y){return y>=a.first&&y<a.first+a.size}function dt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Te(a,y,x){if(x===void 0&&(x=null),!(this instanceof Te))return new Te(a,y,x);this.line=a,this.ch=y,this.sticky=x}function lt(a,y){return a.line-y.line||a.ch-y.ch}function wt(a,y){return a.sticky==y.sticky&<(a,y)==0}function Xt(a){return Te(a.line,a.ch)}function an(a,y){return lt(a,y)<0?y:a}function vt(a,y){return lt(a,y)<0?a:y}function Gt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function st(a,y){if(y.line<a.first)return Te(a.first,0);var x=a.first+a.size-1;return y.line>x?Te(x,je(a,x).text.length):Ke(y,je(a,y.line).text.length)}function Ke(a,y){var x=a.ch;return x==null||x>y?Te(a.line,y):x<0?Te(a.line,0):a}function Ht(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=st(a,y[b]);return x}var yn=function(a,y){this.state=a,this.lookAhead=y},fn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};fn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},fn.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}},fn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fn.fromSaved=function(a,y,x){return y instanceof yn?new fn(a,kn(a.mode,y.state),x,y.lookAhead):new fn(a,kn(a.mode,y),x)},fn.prototype.save=function(a){var y=a!==!1?kn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yn(y,this.maxLookAhead):y};function Pn(a,y,x,b){var E=[a.state.modeGen],ee={};dr(a,y.text,a.doc.mode,x,function(ce,ye){return E.push(ce,ye)},ee,b);for(var re=x.state,le=function(ce){x.baseTokens=E;var ye=a.state.overlays[ce],ke=1,Ue=0;x.state=!0,dr(a,y.text,ye.mode,x,function(ze,kt){for(var zt=ke;Ue<ze;){var on=E[ke];on>ze&&E.splice(ke,1,ze,E[ke+1],on),ke+=2,Ue=Math.min(ze,on)}if(kt)if(ye.opaque)E.splice(zt,ke-zt,ze,"overlay "+kt),ke=zt+2;else for(;zt<ke;zt+=2){var mn=E[zt+1];E[zt+1]=(mn?mn+" ":"")+"overlay "+kt}},ee),x.state=re,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)le(ue);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function Kn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Jn(a,Ce(y)),E=y.text.length>a.options.maxHighlightLength&&kn(a.doc.mode,b.state),ee=Pn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Jn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new fn(b,!0,y);var ee=yr(a,y,x),re=ee>b.first&&je(b,ee-1).stateAfter,le=re?fn.fromSaved(b,re,ee):new fn(b,On(b.mode),ee);return b.iter(ee,y,function(ue){ir(a,ue.text,le);var ce=le.line;ue.stateAfter=ce==y-1||ce%5==0||ce>=E.viewFrom&&ce<E.viewTo?le.save():null,le.nextLine()}),x&&(b.modeFrontier=le.line),le}function ir(a,y,x,b){var E=a.doc.mode,ee=new qe(y,a.options.tabSize,x);for(ee.start=ee.pos=b||0,y==""&&_n(E,x.state);!ee.eol();)tr(E,ee,x.state),ee.start=ee.pos}function _n(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=cn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function tr(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=cn(a,x).mode);var ee=a.token(y,x);if(y.pos>y.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var Gn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function or(a,y,x,b){var E=a.doc,ee=E.mode,re;y=st(E,y);var le=je(E,y.line),ue=Jn(a,y.line,x),ce=new qe(le.text,a.options.tabSize,ue),ye;for(b&&(ye=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,re=tr(ee,ce,ue.state),b&&ye.push(new Gn(ce,re,kn(E.mode,ue.state)));return b?ye:new Gn(ce,re,ue.state)}function gr(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 dr(a,y,x,b,E,ee,re){var le=x.flattenSpans;le==null&&(le=a.options.flattenSpans);var ue=0,ce=null,ye=new qe(y,a.options.tabSize,b),ke,Ue=a.options.addModeClass&&[null];for(y==""&&gr(_n(x,b.state),ee);!ye.eol();){if(ye.pos>a.options.maxHighlightLength?(le=!1,re&&ir(a,y,b,ye.pos),ye.pos=y.length,ke=null):ke=gr(tr(x,ye,b.state,Ue),ee),Ue){var ze=Ue[0].name;ze&&(ke="m-"+(ke?ze+" "+ke:ze))}if(!le||ce!=ke){for(;ue<ye.start;)ue=Math.min(ye.start,ue+5e3),E(ue,ce);ce=ke}ye.start=ye.pos}for(;ue<ye.pos;){var kt=Math.min(ye.pos,ue+5e3);E(kt,ce),ue=kt}}function yr(a,y,x){for(var b,E,ee=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),le=y;le>re;--le){if(le<=ee.first)return ee.first;var ue=je(ee,le-1),ce=ue.stateAfter;if(ce&&(!x||le+(ce instanceof yn?ce.lookAhead:0)<=ee.modeFrontier))return le;var ye=me(ue.text,null,a.options.tabSize);(E==null||b>ye)&&(E=le-1,b=ye)}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 fr(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 ar(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function lr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function nr(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,le=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);if(le||ee.from==y&&re.type=="bookmark"&&(!x||!ee.marker.insertLeft)){var ue=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);(b||(b=[])).push(new fr(re,ee.from,ue?null:ee.to))}}return b}function sr(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,le=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);if(le||ee.from==y&&re.type=="bookmark"&&(!x||ee.marker.insertLeft)){var ue=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);(b||(b=[])).push(new fr(re,ue?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function Rr(a,y){if(y.full)return null;var x=Pt(a,y.from.line)&&je(a,y.from.line).markedSpans,b=Pt(a,y.to.line)&&je(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,re=lt(y.from,y.to)==0,le=nr(x,E,re),ue=sr(b,ee,re),ce=y.text.length==1,ye=He(y.text).length+(ce?E:0);if(le)for(var ke=0;ke<le.length;++ke){var Ue=le[ke];if(Ue.to==null){var ze=Sr(ue,Ue.marker);ze?ce&&(Ue.to=ze.to==null?null:ze.to+ye):Ue.to=E}}if(ue)for(var kt=0;kt<ue.length;++kt){var zt=ue[kt];if(zt.to!=null&&(zt.to+=ye),zt.from==null){var on=Sr(le,zt.marker);on||(zt.from=ye,ce&&(le||(le=[])).push(zt))}else zt.from+=ye,ce&&(le||(le=[])).push(zt)}le&&(le=Vr(le)),ue&&ue!=le&&(ue=Vr(ue));var mn=[le];if(!ce){var En=y.text.length-2,gn;if(En>0&&le)for(var Bn=0;Bn<le.length;++Bn)le[Bn].to==null&&(gn||(gn=[])).push(new fr(le[Bn].marker,null,null));for(var Vn=0;Vn<En;++Vn)mn.push(gn);mn.push(ue)}return mn}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(ze){if(ze.markedSpans)for(var kt=0;kt<ze.markedSpans.length;++kt){var zt=ze.markedSpans[kt].marker;zt.readOnly&&(!b||mt(b,zt)==-1)&&(b||(b=[])).push(zt)}}),!b)return null;for(var E=[{from:y,to:x}],ee=0;ee<b.length;++ee)for(var re=b[ee],le=re.find(0),ue=0;ue<E.length;++ue){var ce=E[ue];if(!(lt(ce.to,le.from)<0||lt(ce.from,le.to)>0)){var ye=[ue,1],ke=lt(ce.from,le.from),Ue=lt(ce.to,le.to);(ke<0||!re.inclusiveLeft&&!ke)&&ye.push({from:ce.from,to:le.from}),(Ue>0||!re.inclusiveRight&&!Ue)&&ye.push({from:le.to,to:ce.to}),E.splice.apply(E,ye),ue+=ye.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 Ir(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(),ee=lt(b.from,E.from)||Ir(a)-Ir(y);if(ee)return-ee;var re=lt(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,ee=0;ee<x.length;++ee)E=x[ee],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ii(b,E.marker)<0)&&(b=E.marker);return b}function Qn(a){return Fr(a,!0)}function Kt(a){return Fr(a,!1)}function tn(a,y){var x=hr&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ee=x[E];ee.marker.collapsed&&(ee.from==null||ee.from<y)&&(ee.to==null||ee.to>y)&&(!b||ii(b,ee.marker)<0)&&(b=ee.marker)}return b}function An(a,y,x,b,E){var ee=je(a,y),re=hr&&ee.markedSpans;if(re)for(var le=0;le<re.length;++le){var ue=re[le];if(ue.marker.collapsed){var ce=ue.marker.find(0),ye=lt(ce.from,x)||Ir(ue.marker)-Ir(E),ke=lt(ce.to,b)||Zr(ue.marker)-Zr(E);if(!(ye>=0&&ke<=0||ye<=0&&ke>=0)&&(ye<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?lt(ce.to,x)>=0:lt(ce.to,x)>0)||ye>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?lt(ce.from,b)<=0:lt(ce.from,b)<0)))return!0}}}function vn(a){for(var y;y=Qn(a);)a=y.find(-1,!0).line;return a}function Wn(a){for(var y;y=Kt(a);)a=y.find(1,!0).line;return a}function pr(a){for(var y,x;y=Kt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function en(a,y){var x=je(a,y),b=vn(x);return x==b?y:Ce(b)}function Vt(a,y){if(y>a.lastLine())return y;var x=je(a,y),b;if(!pn(a,x))return y;for(;b=Kt(x);)x=b.find(1,!0).line;return Ce(x)+1}function pn(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&&bn(a,y,b))return!0}}}function bn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return bn(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,ee=0;ee<y.markedSpans.length;++ee)if(E=y.markedSpans[ee],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&bn(a,y,E))return!0}function jn(a){a=vn(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var ee=x.parent;ee;x=ee,ee=x.parent)for(var re=0;re<ee.children.length;++re){var le=ee.children[re];if(le==x)break;y+=le.height}return y}function vr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Qn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Kt(b);){var ee=x.find(0,!0);y-=b.text.length-ee.from.ch,b=ee.to.line,y+=b.text.length-ee.to.ch}return y}function ur(a){var y=a.display,x=a.doc;y.maxLine=je(x,x.first),y.maxLineLength=vr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=vr(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 Ce(this)},St(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&&zn(a,E)}function Lr(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=Ct("span",null,null,Ie?"padding-right: .1px":null),b={pre:Ct("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var ee=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Fi,Rn(a.display.measure)&&(re=hn(ee,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var le=y!=a.display.externalMeasured&&Ce(ee);wr(ee,b,Kn(a,ee,le)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=un(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=un(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(Nn(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(Ie){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Dt(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=un(b.pre.className,b.textClass||"")),b}function Li(a){var y=We("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Fi(a,y,x,b,E,ee,re){if(y){var le=a.splitSpaces?xi(y,a.trailingSpace):y,ue=a.cm.state.specialChars,ce=!1,ye;if(!ue.test(y))a.col+=y.length,ye=document.createTextNode(le),a.map.push(a.pos,a.pos+y.length,ye),pe&&ge<9&&(ce=!0),a.pos+=y.length;else{ye=document.createDocumentFragment();for(var ke=0;;){ue.lastIndex=ke;var Ue=ue.exec(y),ze=Ue?Ue.index-ke:y.length-ke;if(ze){var kt=document.createTextNode(le.slice(ke,ke+ze));pe&&ge<9?ye.appendChild(We("span",[kt])):ye.appendChild(kt),a.map.push(a.pos,a.pos+ze,kt),a.col+=ze,a.pos+=ze}if(!Ue)break;ke+=ze+1;var zt=void 0;if(Ue[0]==" "){var on=a.cm.options.tabSize,mn=on-a.col%on;zt=ye.appendChild(We("span",Jt(mn),"cm-tab")),zt.setAttribute("role","presentation"),zt.setAttribute("cm-text"," "),a.col+=mn}else Ue[0]=="\r"||Ue[0]==`
|
|
`?(zt=ye.appendChild(We("span",Ue[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),zt.setAttribute("cm-text",Ue[0]),a.col+=1):(zt=a.cm.options.specialCharPlaceholder(Ue[0]),zt.setAttribute("cm-text",Ue[0]),pe&&ge<9?ye.appendChild(We("span",[zt])):ye.appendChild(zt),a.col+=1);a.map.push(a.pos,a.pos+1,zt),a.pos++}}if(a.trailingSpace=le.charCodeAt(y.length-1)==32,x||b||E||ce||ee||re){var En=x||"";b&&(En+=b),E&&(En+=E);var gn=We("span",[ye],En,ee);if(re)for(var Bn in re)re.hasOwnProperty(Bn)&&Bn!="style"&&Bn!="class"&&gn.setAttribute(Bn,re[Bn]);return a.content.appendChild(gn)}a.content.appendChild(ye)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ee=a.charAt(E);ee==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ee="\xA0"),b+=ee,x=ee==" "}return b}function vi(a,y){return function(x,b,E,ee,re,le,ue){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,ye=ce+b.length;;){for(var ke=void 0,Ue=0;Ue<y.length&&(ke=y[Ue],!(ke.to>ce&&ke.from<=ce));Ue++);if(ke.to>=ye)return a(x,b,E,ee,re,le,ue);a(x,b.slice(0,ke.to-ce),E,ee,null,le,ue),ee=null,b=b.slice(ke.to-ce),ce=ke.to}}}function 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,ee=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(ee,ee=x[re]),_r(x[re+1],y.cm.options));return}for(var le=E.length,ue=0,ce=1,ye="",ke,Ue,ze=0,kt,zt,on,mn,En;;){if(ze==ue){kt=zt=on=Ue="",En=null,mn=null,ze=1/0;for(var gn=[],Bn=void 0,Vn=0;Vn<b.length;++Vn){var Hn=b[Vn],cr=Hn.marker;if(cr.type=="bookmark"&&Hn.from==ue&&cr.widgetNode)gn.push(cr);else if(Hn.from<=ue&&(Hn.to==null||Hn.to>ue||cr.collapsed&&Hn.to==ue&&Hn.from==ue)){if(Hn.to!=null&&Hn.to!=ue&&ze>Hn.to&&(ze=Hn.to,zt=""),cr.className&&(kt+=" "+cr.className),cr.css&&(Ue=(Ue?Ue+";":"")+cr.css),cr.startStyle&&Hn.from==ue&&(on+=" "+cr.startStyle),cr.endStyle&&Hn.to==ze&&(Bn||(Bn=[])).push(cr.endStyle,Hn.to),cr.title&&((En||(En={})).title=cr.title),cr.attributes)for(var Or in cr.attributes)(En||(En={}))[Or]=cr.attributes[Or];cr.collapsed&&(!mn||ii(mn.marker,cr)<0)&&(mn=Hn)}else Hn.from>ue&&ze>Hn.from&&(ze=Hn.from)}if(Bn)for(var li=0;li<Bn.length;li+=2)Bn[li+1]==ze&&(zt+=" "+Bn[li]);if(!mn||mn.from==ue)for(var jr=0;jr<gn.length;++jr)Xi(y,0,gn[jr]);if(mn&&(mn.from||0)==ue){if(Xi(y,(mn.to==null?le+1:mn.to)-ue,mn.marker,mn.from==null),mn.to==null)return;mn.to==ue&&(mn=!1)}}if(ue>=le)break;for(var Bi=Math.min(le,ze);;){if(ye){var ki=ue+ye.length;if(!mn){var qr=ki>Bi?ye.slice(0,Bi-ue):ye;y.addToken(y,qr,ke?ke+kt:kt,on,ue+qr.length==ze?zt:"",Ue,En)}if(ki>=Bi){ye=ye.slice(Bi-ue),ue=Bi;break}ue=ki,on=""}ye=E.slice(ee,ee=x[ce++]),ke=_r(x[ce++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=pr(y),this.size=this.rest?Ce(He(this.rest))-x+1:1,this.node=this.text=null,this.hidden=pn(a,y)}function ti(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var re=new to(a.doc,je(a.doc,ee),ee);E=ee+re.size,b.push(re)}return b}var Ri=null;function ao(a){Ri?Ri.ops.push(a):a.ownsGroup=Ri={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{Ri=null,y(x)}}var Ii=null;function Wr(a,y){var x=yt(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Ri?E=Ri.delayedCallbacks:Ii?E=Ii:(E=Ii=[],setTimeout(_i,0));for(var ee=function(le){E.push(function(){return x[le].apply(null,b)})},re=0;re<x.length;++re)ee(re)}}function _i(){var a=Ii;Ii=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 ee=y.changes[E];ee=="text"?so(a,y):ee=="gutter"?er(a,y,x,b):ee=="class"?Zn(a,y):ee=="widget"&&Yn(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=We("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),pe&&ge<8&&(a.node.style.zIndex=2)),a.node}function Qr(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=Zi(y);y.background=b.insertBefore(We("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ei(a,y)}function 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,Zn(a,y)):x&&(y.text.className=x)}function Zn(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 er(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=Zi(y);y.gutterBackground=We("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var ee=y.line.gutterMarkers;if(a.options.lineNumbers||ee){var re=Zi(y),le=y.gutter=We("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(le),re.insertBefore(le,y.text),y.line.gutterClass&&(le.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=le.appendChild(We("div",dt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var ce=a.display.gutterSpecs[ue].className,ye=ee.hasOwnProperty(ce)&&ee[ce];ye&&le.appendChild(We("div",[ye],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ce]+"px; width: "+b.gutterWidth[ce]+"px"))}}}function Yn(a,y,x){y.alignable&&(y.alignable=null);for(var b=Ae("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);kr(a,y,x)}function Xn(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),Zn(a,y),er(a,y,x,b),kr(a,y,b),y.node}function kr(a,y,x){if(Nr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Nr(a,y.rest[b],y,x,!1)}function Nr(a,y,x,b,E){if(y.widgets)for(var ee=Zi(x),re=0,le=y.widgets;re<le.length;++re){var ue=le[re],ce=We("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),Gi(ue,ce,x,b),a.display.input.setUneditable(ce),E&&ue.above?ee.insertBefore(ce,x.gutter||x.text):ee.appendChild(ce),Wr(ue,"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(!Xe(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;"),Ye(y.display.measure,We("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=Tn(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=Ye(a.measure,We("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Mi(a){return sn-a.display.nativeBarWidth}function qi(a){return a.display.scroller.clientWidth-Mi(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Mi(a)-a.display.barHeight}function ji(a,y,x){var b=a.options.lineWrapping,E=b&&qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var ee=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),le=0;le<re.length-1;le++){var ue=re[le],ce=re[le+1];Math.abs(ue.bottom-ce.bottom)>2&&ee.push((ue.bottom+ce.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function 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(Ce(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=vn(y);var x=Ce(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,Ye(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=Ce(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 ee=x+(b||""),re;return y.cache.hasOwnProperty(ee)?re=y.cache[ee]:(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[ee]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,ee,re,le,ue,ce=0;ce<a.length;ce+=3)if(le=a[ce],ue=a[ce+1],y<le?(E=0,ee=1,re="left"):y<ue?(E=y-le,ee=E+1):(ce==a.length-3||y==ue&&a[ce+3]>y)&&(ee=ue-le,E=ee-1,y>=ue&&(re="right")),E!=null){if(b=a[ce+2],le==ue&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;ce&&a[ce-2]==a[ce-3]&&a[ce-1].insertLeft;)b=a[(ce-=3)+2],re="left";if(x=="right"&&E==ue-le)for(;ce<a.length-3&&a[ce+3]==a[ce+4]&&!a[ce+5].insertLeft;)b=a[(ce+=3)+2],re="right";break}return{node:b,start:E,end:ee,collapse:re,coverStart:le,coverEnd:ue}}function Va(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),ee=E.node,re=E.start,le=E.end,ue=E.collapse,ce;if(ee.nodeType==3){for(var ye=0;ye<4;ye++){for(;re&&Ve(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+le<E.coverEnd&&Ve(y.line.text.charAt(E.coverStart+le));)++le;if(pe&&ge<9&&re==0&&le==E.coverEnd-E.coverStart?ce=ee.parentNode.getBoundingClientRect():ce=Va(Le(ee,re,le).getClientRects(),b),ce.left||ce.right||re==0)break;le=re,re=re-1,ue="right"}pe&&ge<11&&(ce=Ua(a.display.measure,ce))}else{re>0&&(ue=b="right");var ke;a.options.lineWrapping&&(ke=ee.getClientRects()).length>1?ce=ke[b=="right"?ke.length-1:0]:ce=ee.getBoundingClientRect()}if(pe&&ge<9&&!re&&(!ce||!ce.left&&!ce.right)){var Ue=ee.parentNode.getClientRects()[0];Ue?ce={left:Ue.left,right:Ue.left+Ui(a.display),top:Ue.top,bottom:Ue.bottom}:ce=ba}for(var ze=ce.top-y.rect.top,kt=ce.bottom-y.rect.top,zt=(ze+kt)/2,on=y.view.measure.heights,mn=0;mn<on.length-1&&!(zt<on[mn]);mn++);var En=mn?on[mn-1]:0,gn=on[mn],Bn={left:(ue=="right"?ce.right:ce.left)-y.rect.left,right:(ue=="left"?ce.left:ce.right)-y.rect.left,top:En,bottom:gn};return!ce.left&&!ce.right&&(Bn.bogus=!0),a.options.singleCursorHeightPerLine||(Bn.rtop=ze,Bn.rbottom=kt),Bn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ge(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,Ut(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 we&&Me?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return we&&Me?-(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 ee=Jo(y);x.top+=ee,x.bottom+=ee}if(b=="line")return x;b||(b="local");var re=jn(y);if(b=="local"?re+=Kr(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var le=a.display.lineSpace.getBoundingClientRect();re+=le.top+(b=="window"?0:Ca());var ue=le.left+(b=="window"?0:Xo());x.left+=ue,x.right+=ue}return x.top+=re,x.bottom+=re,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();else if(x=="local"||!x){var ee=a.display.sizer.getBoundingClientRect();b+=ee.left,E+=ee.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function Bo(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,ee){b=b||je(a.doc,y.line),E||(E=uo(a,b));function re(kt,zt){var on=zi(a,E,kt,zt?"right":"left",ee);return zt?on.left=on.right:on.right=on.left,Ao(a,b,on,x)}var le=hn(b,a.doc.direction),ue=y.ch,ce=y.sticky;if(ue>=b.text.length?(ue=b.text.length,ce="before"):ue<=0&&(ue=0,ce="after"),!le)return re(ce=="before"?ue-1:ue,ce=="before");function ye(kt,zt,on){var mn=le[zt],En=mn.level==1;return re(on?kt-1:kt,En!=on)}var ke=nn(le,ue,ce),Ue=At,ze=ye(ue,ke,ce=="before");return Ue!=null&&(ze.other=ye(ue,Ue,ce!="before")),ze}function mr(a,y){var x=0;y=st(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=je(a.doc,y.line),E=jn(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function rr(a,y,x,b,E){var ee=Te(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return rr(b.first,0,null,-1,-1);var E=Se(b,x),ee=b.first+b.size-1;if(E>ee)return rr(b.first+b.size-1,je(b,ee).text.length,null,1,1);y<0&&(y=0);for(var re=je(b,E);;){var le=Vi(a,re,E,y,x),ue=tn(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ce=ue.find(1);if(ce.line==E)return ce;re=je(b,E=ce.line)}}function hi(a,y,x,b){b-=Jo(y);var E=y.text.length,ee=It(function(re){return zi(a,x,re-1).bottom<=b},E,0);return E=It(function(re){return zi(a,x,re).top>b},ee,E),{begin:ee,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 hi(a,y,x,E)}function ni(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Vi(a,y,x,b,E){E-=jn(y);var ee=uo(a,y),re=Jo(y),le=0,ue=y.text.length,ce=!0,ye=hn(y,a.doc.direction);if(ye){var ke=(a.options.lineWrapping?ro:Wi)(a,y,x,ee,ye,b,E);ce=ke.level!=1,le=ce?ke.from:ke.to-1,ue=ce?ke.to:ke.from-1}var Ue=null,ze=null,kt=It(function(Vn){var Hn=zi(a,ee,Vn);return Hn.top+=re,Hn.bottom+=re,ni(Hn,b,E,!1)?(Hn.top<=E&&Hn.left<=b&&(Ue=Vn,ze=Hn),!0):!1},le,ue),zt,on,mn=!1;if(ze){var En=b-ze.left<ze.right-b,gn=En==ce;kt=Ue+(gn?0:1),on=gn?"after":"before",zt=En?ze.left:ze.right}else{!ce&&(kt==ue||kt==le)&&kt++,on=kt==0?"after":kt==y.text.length?"before":zi(a,ee,kt-(ce?1:0)).bottom+re<=E==ce?"after":"before";var Bn=wi(a,Te(x,kt,on),"line",y,ee);zt=Bn.left,mn=E<Bn.top?-1:E>=Bn.bottom?1:0}return kt=Wt(y.text,kt,1),rr(x,kt,on,mn,b-zt)}function Wi(a,y,x,b,E,ee,re){var le=It(function(ke){var Ue=E[ke],ze=Ue.level!=1;return ni(wi(a,Te(x,ze?Ue.to:Ue.from,ze?"before":"after"),"line",y,b),ee,re,!0)},0,E.length-1),ue=E[le];if(le>0){var ce=ue.level!=1,ye=wi(a,Te(x,ce?ue.from:ue.to,ce?"after":"before"),"line",y,b);ni(ye,ee,re,!0)&&ye.top>re&&(ue=E[le-1])}return ue}function ro(a,y,x,b,E,ee,re){var le=hi(a,y,b,re),ue=le.begin,ce=le.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var ye=null,ke=null,Ue=0;Ue<E.length;Ue++){var ze=E[Ue];if(!(ze.from>=ce||ze.to<=ue)){var kt=ze.level!=1,zt=zi(a,b,kt?Math.min(ce,ze.to)-1:Math.max(ue,ze.from)).right,on=zt<ee?ee-zt+1e9:zt-ee;(!ye||ke>on)&&(ye=ze,ke=on)}}return ye||(ye=E[E.length-1]),ye.from<ue&&(ye={from:ue,to:ye.to,level:ye.level}),ye.to>ce&&(ye={from:ye.from,to:ce,level:ye.level}),ye}var Ti;function Pi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ti==null){Ti=We("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ti.appendChild(document.createTextNode("x")),Ti.appendChild(We("br"));Ti.appendChild(document.createTextNode("x"))}Ye(a.measure,Ti);var x=Ti.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Ut(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=We("span","xxxxxxxxxx"),x=We("pre",[y],"CodeMirror-line-like");Ye(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,re=0;ee;ee=ee.nextSibling,++re){var le=a.display.gutterSpecs[re].className;x[le]=ee.offsetLeft+ee.clientLeft+E,b[le]=ee.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function wl(a){var y=Pi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(pn(a.doc,E))return 0;var ee=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(ee+=E.widgets[re].height);return x?ee+(Math.ceil(E.text.length/b)||1)*y:ee+y}}function Ya(a){var y=a.doc,x=wl(a);y.iter(function(b){var E=x(b);E!=b.height&&zn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&Tn(y).getAttribute("cm-not-content")=="true")return null;var ee,re,le=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-le.left,re=y.clientY-le.top}catch(ke){return null}var ue=ci(a,ee,re),ce;if(b&&ue.xRel>0&&(ce=je(a.doc,ue.line).text).length==ue.ch){var ye=me(ce,ce.length,a.options.tabSize)-ce.length;ue=Te(ue.line,Math.max(0,Math.round((ee-Qi(a.display).left)/Ui(a.display))-ye))}return ue}function So(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function 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&&en(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)hr&&Vt(a.doc,x+b)>E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var ee=ka(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var re=ka(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):fo(a)}else{var le=ka(a,y,y,-1),ue=ka(a,x,x+b,1);le&&ue?(E.view=E.view.slice(0,le.index).concat(ti(a,le.lineN,ue.lineN)).concat(E.view.slice(ue.index)),E.viewTo+=b):fo(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function ho(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var ee=b.view[So(a,y)];if(ee.node!=null){var re=ee.changes||(ee.changes=[]);mt(re,x)==-1&&re.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=So(a,y),ee,re=a.display.view;if(!hr||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var le=a.display.viewFrom,ue=0;ue<E;ue++)le+=re[ue].size;if(le!=y){if(b>0){if(E==re.length-1)return null;ee=le+re[E].size-y,E++}else ee=le-y;y+=ee,x+=ee}for(;en(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(),ee=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var le=x.sel.ranges[re];if(!(le.from().line>=a.display.viewTo||le.to().line<a.display.viewFrom)){var ue=le.empty();(ue||a.options.showCursorWhenSelecting)&&kl(a,le.head,E),ue||zs(a,le,ee)}}return b}function kl(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(We("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var ee=x.appendChild(We("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ee.style.display="",ee.style.left=b.other.left+"px",ee.style.top=b.other.top+"px",ee.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function zs(a,y,x){var b=a.display,E=a.doc,ee=document.createDocumentFragment(),re=Qi(a.display),le=re.left,ue=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-re.right,ce=E.direction=="ltr";function ye(gn,Bn,Vn,Hn){Bn<0&&(Bn=0),Bn=Math.round(Bn),Hn=Math.round(Hn),ee.appendChild(We("div",null,"CodeMirror-selected","position: absolute; left: "+gn+`px;
|
|
top: `+Bn+"px; width: "+(Vn==null?ue-gn:Vn)+`px;
|
|
height: `+(Hn-Bn)+"px"))}function ke(gn,Bn,Vn){var Hn=je(E,gn),cr=Hn.text.length,Or,li;function jr(qr,Ei){return Bo(a,Te(gn,qr),"div",Hn,Ei)}function Bi(qr,Ei,di){var ri=Yr(a,Hn,null,qr),$r=Ei=="ltr"==(di=="after")?"left":"right",Ur=di=="after"?ri.begin:ri.end-(/\s/.test(Hn.text.charAt(ri.end-1))?2:1);return jr(Ur,$r)[$r]}var ki=hn(Hn,E.direction);return gt(ki,Bn||0,Vn==null?cr:Vn,function(qr,Ei,di,ri){var $r=di=="ltr",Ur=jr(qr,$r?"left":"right"),Di=jr(Ei-1,$r?"right":"left"),Vo=Bn==null&&qr==0,bo=Vn==null&&Ei==cr,pi=ri==0,eo=!ki||ri==ki.length-1;if(Di.top-Ur.top<=3){var si=(ce?Vo:bo)&&pi,bl=(ce?bo:Vo)&&eo,oo=si?le:($r?Ur:Di).left,Mo=bl?ue:($r?Di:Ur).right;ye(oo,Ur.top,Mo-oo,Ur.bottom)}else{var To,bi,Uo,xl;$r?(To=ce&&Vo&&pi?le:Ur.left,bi=ce?ue:Bi(qr,di,"before"),Uo=ce?le:Bi(Ei,di,"after"),xl=ce&&bo&&eo?ue:Di.right):(To=ce?Bi(qr,di,"before"):le,bi=!ce&&Vo&&pi?ue:Ur.right,Uo=!ce&&bo&&eo?le:Di.left,xl=ce?Bi(Ei,di,"after"):ue),ye(To,Ur.top,bi-To,Ur.bottom),Ur.bottom<Di.top&&ye(le,Ur.bottom,null,Di.top),ye(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 Ue=y.from(),ze=y.to();if(Ue.line==ze.line)ke(Ue.line,Ue.ch,ze.ch);else{var kt=je(E,Ue.line),zt=je(E,ze.line),on=vn(kt)==vn(zt),mn=ke(Ue.line,Ue.ch,on?kt.text.length+1:null).end,En=ke(ze.line,on?0:null,ze.ch).start;on&&(mn.top<En.top-2?(ye(mn.right,mn.top,null,mn.bottom),ye(le,En.top,En.left,En.bottom)):ye(mn.right,mn.top,En.left-mn.right,mn.bottom)),mn.bottom<En.top&&ye(le,mn.bottom,null,En.top)}x.appendChild(ee)}function Xa(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Ro(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function 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,Ro(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Dt(a,"focus",a,y),a.state.focused=!0,ot(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Ie&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Ro(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Dt(a,"blur",a,y),a.state.focused=!1,it(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],ee=a.options.lineWrapping,re=void 0,le=0;if(!E.hidden){if(pe&&ge<8){var ue=E.node.offsetTop+E.node.offsetHeight;re=ue-x,x=ue}else{var ce=E.node.getBoundingClientRect();re=ce.bottom-ce.top,!ee&&E.text.firstChild&&(le=E.text.firstChild.getBoundingClientRect().right-ce.left-1)}var ye=E.line.height-re;if((ye>.005||ye<-.005)&&(zn(E.line,re),Ll(E.line),E.rest))for(var ke=0;ke<E.rest.length;ke++)Ll(E.rest[ke]);if(le>a.display.sizerWidth){var Ue=Math.ceil(le/Ui(a.display));Ue>a.display.maxLineLength&&(a.display.maxLineLength=Ue,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ll(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 La(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,ee=Se(y,b),re=Se(y,E);if(x&&x.ensure){var le=x.ensure.from.line,ue=x.ensure.to.line;le<ee?(ee=le,re=Se(y,jn(je(y,le))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=re&&(ee=Se(y,jn(je(y,ue))-a.wrapper.clientHeight),re=ue)}return{from:ee,to:Math.max(re,ee+1)}}function Ws(a,y){if(!Ne(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&&!ht){var ee=We("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-x.viewOffset-Kr(a.display))+`px;
|
|
height: `+(y.bottom-y.top+Mi(a)+x.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Te(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Te(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var re=!1,le=wi(a,y),ue=!x||x==y?le:wi(a,x);E={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-b,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+b};var ce=Qa(a,E),ye=a.doc.scrollTop,ke=a.doc.scrollLeft;if(ce.scrollTop!=null&&($o(a,ce.scrollTop),Math.abs(a.doc.scrollTop-ye)>1&&(re=!0)),ce.scrollLeft!=null&&(ko(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-ke)>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,ee=no(a),re={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var le=a.doc.height+Hi(x),ue=y.top<b,ce=y.bottom>le-b;if(y.top<E)re.scrollTop=ue?0:y.top;else if(y.bottom>E+ee){var ye=Math.min(y.top,(ce?le:y.bottom)-ee);ye!=E&&(re.scrollTop=ye)}var ke=a.options.fixedGutter?0:x.gutters.offsetWidth,Ue=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-ke,ze=qi(a)-x.gutters.offsetWidth,kt=y.right-y.left>ze;return kt&&(y.right=y.left+ze),y.left<10?re.scrollLeft=0:y.left<Ue?re.scrollLeft=Math.max(0,y.left+ke-(kt?0:10)):y.right>ze+Ue-3&&(re.scrollLeft=y.right+(kt?0:10)-ze),re}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Io(a){Ma(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function qo(a,y,x){(y!=null||x!=null)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function js(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=mr(a,y.from),b=mr(a,y.to);Ml(a,x,b,y.margin)}}function Ml(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,Il(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+Mi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=We("div",[We("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=We("div",[We("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),xe(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),xe(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,pe&&ge<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var ee=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},Eo.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Eo.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Eo.prototype.zeroWidthHack=function(){var a=Ee&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},Eo.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function No(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;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 Bl(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&it(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),xe(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&&ot(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 Lo(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 ee=0;ee<y.length;ee++)Js(y[ee]);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&&ur(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+Mi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-qi(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function 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==Be();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&No(y,a.barMeasure),a.updatedDisplay&&nl(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&El(a.cm)}function Qs(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Rl(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,st(b,a.scrollToPos.from),st(b,a.scrollToPos.to),a.scrollToPos.margin);Ws(y,E)}var ee=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(ee)for(var le=0;le<ee.length;++le)ee[le].lines.length||Dt(ee[le],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&Dt(re[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Dt(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{Lo(a)}}function oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Do(a);try{return y.apply(a,arguments)}finally{Lo(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Do(this);try{return a.apply(this,arguments)}finally{Lo(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{Lo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Dn(qs,a))}function qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Jn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(b.line>=a.display.viewFrom){var re=ee.styles,le=ee.text.length>a.options.maxHighlightLength?kn(y.mode,b.state):null,ue=Pn(a,ee,b,!0);le&&(b.state=le),ee.styles=ue.styles;var ce=ee.styleClasses,ye=ue.classes;ye?ee.styleClasses=ye:ce&&(ee.styleClasses=null);for(var ke=!re||re.length!=ee.styles.length||ce!=ye&&(!ce||!ye||ce.bgClass!=ye.bgClass||ce.textClass!=ye.textClass),Ue=0;!ke&&Ue<re.length;++Ue)ke=re[Ue]!=ee.styles[Ue];ke&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&ir(a,ee.text,b),ee.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Ai(a,function(){for(var ee=0;ee<E.length;ee++)ho(a,E[ee],"text")})}}var Ta=function(a,y,x){var b=a.display;this.viewport=y,this.visible=La(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){pt(a,y)&&this.events.push(arguments)},Ta.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Dt.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=Mi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Mi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Be();if(!y||!Xe(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Xe(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==Be())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Xe(document.body,a.anchorNode)&&Xe(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return fo(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cl(a)==0)return!1;Nl(a)&&(fo(a),y.dims=co(a));var E=b.first+b.size,ee=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ee&&ee-x.viewFrom<20&&(ee=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),hr&&(ee=en(a.doc,ee),re=Vt(a.doc,re));var le=ee!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hs(a,ee,re),x.viewOffset=jn(je(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=Cl(a);if(!le&&ue==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ce=eu(a);return ue>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ue>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(ce),Ut(x.cursorDiv),Ut(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,le&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Rl(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=La(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=La(a.display,a.doc,x));if(!$a(a,y))break;Da(a);var E=ea(a);Qo(a),No(a,E),nl(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function el(a,y){var x=new Ta(a,y);if($a(a,x)){Da(a),Rl(a,x);var b=ea(a);Qo(a),No(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ee=b.lineDiv,re=ee.firstChild;function le(kt){var zt=kt.nextSibling;return Ie&&Ee&&a.display.currentWheelTarget==kt?kt.style.display="none":kt.parentNode.removeChild(kt),zt}for(var ue=b.view,ce=b.viewFrom,ye=0;ye<ue.length;ye++){var ke=ue[ye];if(!ke.hidden)if(!ke.node||ke.node.parentNode!=ee){var Ue=Xn(a,ke,ce,x);ee.insertBefore(Ue,re)}else{for(;re!=ke.node;)re=le(re);var ze=E&&y!=null&&y<=ce&&ke.lineNumber;ke.changes&&(mt(ke.changes,"gutter")>-1&&(ze=!1),lo(a,ke,ce,x)),ze&&(Ut(ke.lineNumber),ke.lineNumber.appendChild(document.createTextNode(dt(a.options,ce)))),re=ke.node.nextSibling}ce+=ke.size}for(;re;)re=le(re)}function tl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function nl(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Mi(a)+"px"}function Il(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ee=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=ee),x[re].gutterBackground&&(x[re].gutterBackground.style.left=ee));var le=x[re].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Nl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=dt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(We("div",[We("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ee=E.firstChild.offsetWidth,re=E.offsetWidth-ee;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ee,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function rl(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ee=a[E],re=null;if(typeof ee!="string"&&(re=ee.style,ee=ee.className),ee=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ee,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Ol(a){var y=a.gutters,x=a.gutterSpecs;Ut(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ee=E.className,re=E.style,le=y.appendChild(We("div",null,"CodeMirror-gutter "+ee));re&&(le.style.cssText=re),ee=="CodeMirror-linenumbers"&&(a.lineGutter=le,le.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function ra(a){Ol(a.display),Ci(a),Il(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=We("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=We("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Ct("div",null,"CodeMirror-code"),E.selectionDiv=We("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=We("div",null,"CodeMirror-cursors"),E.measure=We("div",null,"CodeMirror-measure"),E.lineMeasure=We("div",null,"CodeMirror-measure"),E.lineSpace=Ct("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=Ct("div",[E.lineSpace],"CodeMirror-lines");E.mover=We("div",[ee],null,"position: relative"),E.sizer=We("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=We("div",null,null,"position: absolute; height: "+sn+"px; width: 1px;"),E.gutters=We("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=We("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=We("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),pe&&ge<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Ie&&!(ie&&Pe)&&(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,Ni=null;pe?Ni=-.53:ie?Ni=15:we?Ni=-.7:$e&&(Ni=-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*=Ni,y.y*=Ni,y}function _l(a,y){var x=Fl(y),b=x.x,E=x.y,ee=a.display,re=ee.scroller,le=re.scrollWidth>re.clientWidth,ue=re.scrollHeight>re.clientHeight;if(b&&le||E&&ue){if(E&&Ee&&Ie){e:for(var ce=y.target,ye=ee.view;ce!=re;ce=ce.parentNode)for(var ke=0;ke<ye.length;ke++)if(ye[ke].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!ie&&!fe&&Ni!=null){E&&ue&&$o(a,Math.max(0,re.scrollTop+E*Ni)),ko(a,Math.max(0,re.scrollLeft+b*Ni)),(!E||E&&ue)&&Ft(y),ee.wheelStartX=null;return}if(E&&Ni!=null){var Ue=E*Ni,ze=a.doc.scrollTop,kt=ze+ee.wrapper.clientHeight;Ue<0?ze=Math.max(0,ze+Ue-50):kt=Math.min(a.doc.height,kt+Ue+50),el(a,{top:ze,bottom:kt})}Pa<20&&(ee.wheelStartX==null?(ee.wheelStartX=re.scrollLeft,ee.wheelStartY=re.scrollTop,ee.wheelDX=b,ee.wheelDY=E,setTimeout(function(){if(ee.wheelStartX!=null){var zt=re.scrollLeft-ee.wheelStartX,on=re.scrollTop-ee.wheelStartY,mn=on&&ee.wheelDY&&on/ee.wheelDY||zt&&ee.wheelDX&&zt/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,mn&&(Ni=(Ni*Pa+mn)/(Pa+1),++Pa)}},200)):(ee.wheelDX+=b,ee.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(!wt(x.anchor,b.anchor)||!wt(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 Mr(Xt(this.ranges[y].anchor),Xt(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(lt(y,b.from())>=0&<(a,b.to())<=0)return x}return-1};var Mr=function(a,y){this.anchor=a,this.head=y};Mr.prototype.from=function(){return vt(this.anchor,this.head)},Mr.prototype.to=function(){return an(this.anchor,this.head)},Mr.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(Ue,ze){return lt(Ue.from(),ze.from())}),x=mt(y,E);for(var ee=1;ee<y.length;ee++){var re=y[ee],le=y[ee-1],ue=lt(le.to(),re.from());if(b&&!re.empty()?ue>0:ue>=0){var ce=vt(le.from(),re.from()),ye=an(le.to(),re.to()),ke=le.empty()?re.from()==re.head:le.from()==le.head;ee<=x&&--x,y.splice(--ee,2,new Mr(ke?ye:ce,ke?ce:ye))}}return new Oi(y,x)}function po(a,y){return new Oi([new Mr(a,y||a)],0)}function vo(a){return a.text?Te(a.from.line+a.text.length-1,He(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hl(a,y){if(lt(a,y.from)<0)return a;if(lt(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),Te(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 Mr(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?Te(x.line,a.ch-y.ch+x.ch):Te(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Te(a.first,0),ee=E,re=0;re<y.length;re++){var le=y[re],ue=zl(le.from,E,ee),ce=zl(vo(le),E,ee);if(E=le.to,ee=ce,x=="around"){var ye=a.sel.ranges[re],ke=lt(ye.head,ye.anchor)<0;b[re]=new Mr(ke?ce:ue,ke?ue:ce)}else b[re]=new Mr(ue,ue)}return new Oi(b,a.sel.primIndex)}function ol(a){a.doc.mode=Qt(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&&He(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function al(a,y,x,b){function E(En){return x?x[En]:null}function ee(En,gn,Bn){Dr(En,gn,Bn,b),Wr(En,"change",En,y)}function re(En,gn){for(var Bn=[],Vn=En;Vn<gn;++Vn)Bn.push(new Er(ce[Vn],E(Vn),b));return Bn}var le=y.from,ue=y.to,ce=y.text,ye=je(a,le.line),ke=je(a,ue.line),Ue=He(ce),ze=E(ce.length-1),kt=ue.line-le.line;if(y.full)a.insert(0,re(0,ce.length)),a.remove(ce.length,a.size-ce.length);else if(Wl(a,y)){var zt=re(0,ce.length-1);ee(ke,ke.text,ze),kt&&a.remove(le.line,kt),zt.length&&a.insert(le.line,zt)}else if(ye==ke)if(ce.length==1)ee(ye,ye.text.slice(0,le.ch)+Ue+ye.text.slice(ue.ch),ze);else{var on=re(1,ce.length-1);on.push(new Er(Ue+ye.text.slice(ue.ch),ze,b)),ee(ye,ye.text.slice(0,le.ch)+ce[0],E(0)),a.insert(le.line+1,on)}else if(ce.length==1)ee(ye,ye.text.slice(0,le.ch)+ce[0]+ke.text.slice(ue.ch),E(0)),a.remove(le.line+1,kt);else{ee(ye,ye.text.slice(0,le.ch)+ce[0],E(0)),ee(ke,Ue+ke.text.slice(ue.ch),ze);var mn=re(1,ce.length-1);kt>1&&a.remove(le.line+1,kt-1),a.insert(le.line+1,mn)}Wr(a,"change",a,y)}function mo(a,y,x){function b(E,ee,re){if(E.linked)for(var le=0;le<E.linked.length;++le){var ue=E.linked[le];if(ue.doc!=ee){var ce=re&&ue.sharedHist;x&&!ce||(y(ue.doc,ce),b(ue.doc,E,ce))}}}b(a,null,!0)}function Zl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),ol(a),Gl(a),a.options.lineWrapping||ur(a),a.options.mode=y.modeOption,Ci(a)}function Gl(a){(a.doc.direction=="rtl"?ot:it)(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:Xt(y.from),to:vo(y),text:Ot(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=He(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return jl(a.done),He(a.done);if(a.done.length&&!He(a.done).ranges)return He(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),He(a.done)}function Vl(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,re,le;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=lu(E,E.lastOp==b)))le=He(re.changes),lt(y.from,y.to)==0&<(y.from,le.to)==0?le.to=vo(y):re.changes.push(ll(a,y));else{var ue=He(E.done);for((!ue||!ue.ranges)&&Ba(a.sel,E.done),re={changes:[ll(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ee,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,le||Dt(a,"historyAdded")}function su(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||su(a,ee,He(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&jl(E.undone)}function Ba(a,y){var x=He(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Ul(a,y,x,b){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=re.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function du(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Kl(a,y){var x=du(a,y),b=Rr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ee=x[E],re=b[E];if(ee&&re)e:for(var le=0;le<re.length;++le){for(var ue=re[le],ce=0;ce<ee.length;++ce)if(ee[ce].marker==ue.marker)continue e;ee.push(ue)}else re&&(x[E]=re)}return x}function Oo(a,y,x){for(var b=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){b.push(x?Oi.prototype.deepCopy.call(ee):ee);continue}var re=ee.changes,le=[];b.push({changes:le});for(var ue=0;ue<re.length;++ue){var ce=re[ue],ye=void 0;if(le.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var ke in ce)(ye=ke.match(/^spans_(\d+)$/))&&mt(y,Number(ye[1]))>-1&&(He(le)[ke]=ce[ke],delete ce[ke])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=lt(y,E)<0;ee!=lt(x,E)<0?(E=y,y=x):ee!=lt(y,x)<0&&(y=x)}return new Mr(E,y)}else return new Mr(x||y,y)}function Ra(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),fi(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),ee=0;ee<a.sel.ranges.length;ee++)b[ee]=sl(a.sel.ranges[ee],y[ee],null,E);var re=Ki(a.cm,b,a.sel.primIndex);fi(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,fi(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xl(a,y,x,b){fi(a,po(y,x),b)}function hu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ee=0;ee<E.length;ee++)this.ranges[ee]=new Mr(st(a,E[ee].anchor),st(a,E[ee].head))},origin:x&&x.origin};return Dt(a,"beforeSelectionChange",a,b),a.cm&&Dt(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=He(b);E&&E.ranges?(b[b.length-1]=y,Ia(a,y,x)):fi(a,y,x)}function fi(a,y,x){Ia(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ia(a,y,x){(pt(a,"beforeSelectionChange")||a.cm&&pt(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,x));var b=x&&x.bias||(lt(y.primary().head,a.sel.primary().head)<0?-1:1);Ql(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Io(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,Zt(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,ee=0;ee<y.ranges.length;ee++){var re=y.ranges[ee],le=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],ue=Na(a,re.anchor,le&&le.anchor,x,b),ce=Na(a,re.head,le&&le.head,x,b);(E||ue!=re.anchor||ce!=re.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new Mr(ue,ce))}return E?Ki(a.cm,E,y.primIndex):y}function Fo(a,y,x,b,E){var ee=je(a,y.line);if(ee.markedSpans)for(var re=0;re<ee.markedSpans.length;++re){var le=ee.markedSpans[re],ue=le.marker,ce="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,ye="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ce?le.from<=y.ch:le.from<y.ch))&&(le.to==null||(ye?le.to>=y.ch:le.to>y.ch))){if(E&&(Dt(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(ee.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(x){var ke=ue.find(b<0?1:-1),Ue=void 0;if((b<0?ye:ce)&&(ke=es(a,ke,-b,ke&&ke.line==y.line?ee:null)),ke&&ke.line==y.line&&(Ue=lt(ke,x))&&(b<0?Ue<0:Ue>0))return Fo(a,ke,y,b,E)}var ze=ue.find(b<0?-1:1);return(b<0?ce:ye)&&(ze=es(a,ze,b,ze.line==y.line?ee:null)),ze?Fo(a,ze,y,b,E):null}}return y}function Na(a,y,x,b,E){var ee=b||1,re=Fo(a,y,x,ee,E)||!E&&Fo(a,y,x,ee,!0)||Fo(a,y,x,-ee,E)||!E&&Fo(a,y,x,-ee,!0);return re||(a.cantEdit=!0,Te(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?st(a,Te(y.line-1)):null:x>0&&y.ch==(b||je(a,y.line)).text.length?y.line<a.first+a.size-1?Te(y.line+1,0):null:new Te(y.line,y.ch+x)}function ts(a){a.setSelection(Te(a.firstLine(),0),Te(a.lastLine()),Re)}function ns(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,ee,re,le){E&&(b.from=st(a,E)),ee&&(b.to=st(a,ee)),re&&(b.text=re),le!==void 0&&(b.origin=le)}),Dt(a,"beforeChange",a,b),a.cm&&Dt(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(!((pt(a,"beforeChange")||a.cm&&pt(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]==""&<(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,Rr(a,y));var b=[];mo(a,function(E,ee){!ee&&mt(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),oa(E,y,null,Rr(E,y))})}}function Oa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,re=a.sel,le=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,ce=0;ce<le.length&&(ee=le[ce],!(x?ee.ranges&&!ee.equals(a.sel):!ee.ranges));ce++);if(ce!=le.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=le.pop(),ee.ranges){if(Ba(ee,ue),x&&!ee.equals(a.sel)){fi(a,ee,{clearRedo:!1});return}re=ee}else if(b){le.push(ee);return}else break;var ye=[];Ba(re,ue),ue.push({changes:ye,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var ke=pt(a,"beforeChange")||a.cm&&pt(a.cm,"beforeChange"),Ue=function(zt){var on=ee.changes[zt];if(on.origin=y,ke&&!ns(a,on,!1))return le.length=0,{};ye.push(ll(a,on));var mn=zt?il(a,on):He(le);oa(a,on,mn,Kl(a,on)),!zt&&a.cm&&a.cm.scrollIntoView({from:on.from,to:vo(on)});var En=[];mo(a,function(gn,Bn){!Bn&&mt(En,gn.history)==-1&&(ls(gn.history,on),En.push(gn.history)),oa(gn,on,null,Kl(gn,on))})},ze=ee.changes.length-1;ze>=0;--ze){var kt=Ue(ze);if(kt)return kt.v}}}}function is(a,y){if(y!=0&&(a.first+=y,a.sel=new Oi(Tt(a.sel.ranges,function(E){return new Mr(Te(E.anchor.line+y,E.anchor.ch),Te(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Ci(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)ho(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return oi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){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:Te(a.first,0),to:Te(y.to.line+E,y.to.ch),text:[He(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:Te(ee,je(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Ot(a,y.from,y.to),x||(x=il(a,y)),a.cm?fu(a.cm,y,b):al(a,y,b),Ia(a,x,Re),a.cantEdit&&Na(a,Te(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,ee=y.from,re=y.to,le=!1,ue=ee.line;a.options.lineWrapping||(ue=Ce(vn(je(b,ee.line))),b.iter(ue,re.line+1,function(ze){if(ze==E.maxLine)return le=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Zt(a),al(b,y,x,wl(a)),a.options.lineWrapping||(b.iter(ue,ee.line+y.text.length,function(ze){var kt=vr(ze);kt>E.maxLineLength&&(E.maxLine=ze,E.maxLineLength=kt,E.maxLineChanged=!0,le=!1)}),le&&(a.curOp.updateMaxLine=!0)),br(b,ee.line),na(a,400);var ce=y.text.length-(re.line-ee.line)-1;y.full?Ci(a):ee.line==re.line&&y.text.length==1&&!Wl(a.doc,y)?ho(a,ee.line,"text"):Ci(a,ee.line,re.line+1,ce);var ye=pt(a,"changes"),ke=pt(a,"change");if(ke||ye){var Ue={from:ee,to:re,text:y.text,removed:y.removed,origin:y.origin};ke&&Wr(a,"change",a,Ue),ye&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Ue)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var ee;b||(b=x),lt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),_o(a,{from:x,to:b,text:y,origin:E})}function os(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function as(a,y,x,b){for(var E=0;E<a.length;++E){var ee=a[E],re=!0;if(ee.ranges){ee.copied||(ee=a[E]=ee.deepCopy(),ee.copied=!0);for(var le=0;le<ee.ranges.length;le++)os(ee.ranges[le].anchor,y,x,b),os(ee.ranges[le].head,y,x,b);continue}for(var ue=0;ue<ee.changes.length;++ue){var ce=ee.changes[ue];if(x<ce.from.line)ce.from=Te(ce.from.line+b,ce.from.ch),ce.to=Te(ce.to.line+b,ce.to.ch);else if(y<=ce.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function ls(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;as(a.done,x,b,E),as(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ee=y;return typeof y=="number"?ee=je(a,Gt(a,y)):E=Ce(y),E==null?null:(b(ee,E)&&a.cm&&ho(a.cm,E,x),ee)}function la(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}la.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Lr(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 ee=Math.min(y,E-a),re=b.height;if(b.removeInner(a,ee),this.height-=re-b.height,E==ee&&(this.children.splice(x--,1),b.parent=null),(y-=ee)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof la))){var le=[];this.collapse(le),this.children=[new la(le)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<=ee){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,le=re;le<E.lines.length;){var ue=new la(E.lines.slice(le,le+=25));E.height-=ue.height,this.children.splice(++b,0,ue),ue.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=ee}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new sa(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=mt(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new sa(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<ee){var re=Math.min(y,ee-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=ee}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Ce(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var ee=gi(this);zn(x,Math.max(0,x.height-ee)),a&&(Ai(a,function(){ss(a,x,-ee),ho(a,b,"widget")}),Wr(a,"lineWidgetCleared",a,this,b))}},ua.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=gi(this)-y;E&&(pn(this.doc,b)||zn(b,b.height+E),x&&Ai(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Wr(x,"lineWidgetChanged",x,a,Ce(b))}))},St(ua);function ss(a,y,x){jn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),aa(a,y,"widget",function(re){var le=re.widgets||(re.widgets=[]);if(E.insertAt==null?le.push(E):le.splice(Math.min(le.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,ee&&!pn(a,re)){var ue=jn(re)<a.scrollTop;zn(re,re.height+gi(E)),ue&&qa(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Wr(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:Ce(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),pt(this,"clear")){var x=this.find();x&&Wr(this,"clear",x.from,x.to)}for(var b=null,E=null,ee=0;ee<this.lines.length;++ee){var re=this.lines[ee],le=Sr(re.markedSpans,this);a&&!this.collapsed?ho(a,Ce(re),"text"):a&&(le.to!=null&&(E=Ce(re)),le.from!=null&&(b=Ce(re))),re.markedSpans=ar(re.markedSpans,le),le.from==null&&this.collapsed&&!pn(this.doc,re)&&a&&zn(re,Pi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ce=vn(this.lines[ue]),ye=vr(ce);ye>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=ye,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&&Lo(a),this.parent&&this.parent.clear()}},go.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var ee=this.lines[E],re=Sr(ee.markedSpans,this);if(re.from!=null&&(x=Te(y?ee:Ce(ee),re.from),a==-1))return x;if(re.to!=null&&(b=Te(y?ee:Ce(ee),re.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Ai(b,function(){var E=y.line,ee=Ce(y.line),re=$i(b,ee);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!pn(x.doc,E)&&x.height!=null){var le=x.height;x.height=null;var ue=gi(x)-le;ue&&zn(E,E.height+ue)}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||mt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(mt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},St(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 ee=new go(a,E),re=lt(y,x);if(b&&ln(b,ee,!1),re>0||re==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=Ct("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(An(a,y.line,y,x,ee)||y.line!=x.line&&An(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");xr()}ee.addToHistory&&Vl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var le=y.line,ue=a.cm,ce;if(a.iter(le,x.line+1,function(ke){ue&&ee.collapsed&&!ue.options.lineWrapping&&vn(ke)==ue.display.maxLine&&(ce=!0),ee.collapsed&&le!=y.line&&zn(ke,0),lr(ke,new fr(ee,le==y.line?y.ch:null,le==x.line?x.ch:null)),++le}),ee.collapsed&&a.iter(y.line,x.line+1,function(ke){pn(a,ke)&&zn(ke,0)}),ee.clearOnEnter&&xe(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Pr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++us,ee.atomic=!0),ue){if(ce&&(ue.curOp.updateMaxLine=!0),ee.collapsed)Ci(ue,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var ye=y.line;ye<=x.line;ye++)ho(ue,ye,"text");ee.atomic&&ql(ue.doc),Wr(ue,"markerAdded",ue,ee)}return ee}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Wr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},St(ca);function vu(a,y,x,b,E){b=ln(b),b.shared=!1;var ee=[zo(a,y,x,b,E)],re=ee[0],le=b.widgetNode;return mo(a,function(ue){le&&(b.widgetNode=le.cloneNode(!0)),ee.push(zo(ue,st(ue,y),st(ue,x),b,E));for(var ce=0;ce<ue.linked.length;++ce)if(ue.linked[ce].isParent)return;re=He(ee)}),new ca(ee,re)}function cs(a){return a.findMarks(Te(a.first,0),a.clipPos(Te(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),ee=a.clipPos(E.from),re=a.clipPos(E.to);if(lt(ee,re)){var le=zo(a,ee,re,b.primary,b.primary.type);b.markers.push(le),le.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ee=[E.primary.doc];mo(E.primary.doc,function(ue){return ee.push(ue)});for(var re=0;re<E.markers.length;re++){var le=E.markers[re];mt(ee,le.doc)==-1&&(le.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 ee=Te(x,0);this.sel=po(ee),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:ee,to:ee,text:a}),fi(this,po(ee),Re)};Si.prototype=te(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=Ln(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=Te(this.first,0),x=this.first+this.size-1;_o(this,{from:y,to:Te(x,je(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),fi(this,po(y),Re)}),replaceRange:function(a,y,x,b){y=st(this,y),x=x?st(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Ot(this,st(this,a),st(this,y));return x===!1?b:b.join(x||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(Pt(this,a))return je(this,a)},getLineNumber:function(a){return Ce(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=je(this,a)),vn(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return st(this,a)},getCursor:function(a){var y=this.sel.primary(),x;return a==null||a=="head"?x=y.head:a=="anchor"?x=y.anchor:a=="end"||a=="to"||a===!1?x=y.to():x=y.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ai(function(a,y,x){Xl(this,st(this,typeof a=="number"?Te(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xl(this,st(this,a),st(this,y||a),x)}),extendSelection:ai(function(a,y,x){Ra(this,st(this,a),y&&st(this,y),x)}),extendSelections:ai(function(a,y){Yl(this,Ht(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=Tt(this.sel.ranges,a);Yl(this,Ht(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Mr(st(this,a[E].anchor),st(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),fi(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Mr(st(this,a),st(this,y||a))),fi(this,Ki(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Ot(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=Ot(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,ee=0;ee<E.ranges.length;ee++){var re=E.ranges[ee];b[ee]={from:re.from(),to:re.to(),text:this.splitLines(a[ee]),origin:x}}for(var le=y&&y!="end"&&ou(this,b,y),ue=b.length-1;ue>=0;ue--)_o(this,b[ue]);le?Jl(this,le):this.cm&&Io(this.cm)}),undo:ai(function(){Oa(this,"undo")}),redo:ai(function(){Oa(this,"redo")}),undoSelection:ai(function(){Oa(this,"undo",!0)}),redoSelection:ai(function(){Oa(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new 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&&ne(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ai(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,ne(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Pt(this,a)||(y=a,a=je(this,a),!a))return null}else if(y=Ce(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(Ae(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",ee=b[E];if(ee)if(x==null)b[E]=null;else{var re=ee.match(Ae(x));if(!re)return!1;var le=re.index+re[0].length;b[E]=ee.slice(0,re.index)+(!re.index||le==ee.length?"":" ")+ee.slice(le)||null}else return!1;return!0})}),addLineWidget:ai(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return zo(this,st(this,a),st(this,y),x,x&&x.type||"range")},setBookmark:function(a,y){var x={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=st(this,a),zo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=st(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=st(this,a),y=st(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var re=ee.markedSpans;if(re)for(var le=0;le<re.length;le++){var ue=re[le];!(ue.to!=null&&E==a.line&&a.ch>=ue.to||ue.from==null&&E!=a.line||ue.from!=null&&E==y.line&&ue.from>=y.ch)&&(!x||x(ue.marker))&&b.push(ue.marker.parent||ue.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var ee=E.text.length+b;if(ee>a)return y=a,!0;a-=ee,++x}),st(this,Te(x,y))},indexFromPos:function(a){a=st(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var x=this.lineSeparator().length;return this.iter(this.first,a.line,function(b){y+=b.text.length+x}),y},copy:function(a){var y=new Si(Ln(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(Ln(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):Fn(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 ds=0;function bu(a){var y=this;if(hs(y),!(Ne(y,a)||ui(y.display,a))){Ft(a),pe&&(ds=+new Date);var x=Co(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,ee=Array(E),re=0,le=function(){++re==E&&oi(y,function(){x=st(y.doc,x);var ze={from:x,to:x,text:y.doc.splitLines(ee.filter(function(kt){return kt!=null}).join(y.doc.lineSeparator())),origin:"paste"};_o(y.doc,ze),Jl(y.doc,po(st(y.doc,x),st(y.doc,vo(ze))))})()},ue=function(ze,kt){if(y.options.allowDropFileTypes&&mt(y.options.allowDropFileTypes,ze.type)==-1){le();return}var zt=new FileReader;zt.onerror=function(){return le()},zt.onload=function(){var on=zt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(on)){le();return}ee[kt]=on,le()},zt.readAsText(ze)},ce=0;ce<b.length;ce++)ue(b[ce],ce);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var ye=a.dataTransfer.getData("Text");if(ye){var ke;if(y.state.draggingText&&!y.state.draggingText.copy&&(ke=y.listSelections()),Ia(y.doc,po(x,x)),ke)for(var Ue=0;Ue<ke.length;++Ue)Ho(y.doc,"",ke[Ue].anchor,ke[Ue].head,"drag");y.replaceSelection(ye,"around","paste"),y.display.input.focus()}}catch(ze){}}}}function xu(a,y){if(pe&&(!a.state.draggingText||+new Date-ds<100)){Cn(y);return}if(!(Ne(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!$e)){var x=We("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();kl(a,x,b),a.display.dragCursor||(a.display.dragCursor=We("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ye(a.display.dragCursor,b)}}function hs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function fs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var ee=0;ee<x.length;ee++)a(x[ee])})}}var ps=!1;function Cu(){ps||(Su(),ps=!0)}function Su(){var a;xe(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fs(ku)},100))}),xe(window,"blur",function(){return fs(Ro)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var yo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},da=0;da<10;da++)yo[da+48]=yo[da+96]=String(da);for(var Fa=65;Fa<=90;Fa++)yo[Fa]=String.fromCharCode(Fa);for(var ha=1;ha<=12;ha++)yo[ha+111]=yo[ha+63235]="F"+ha;var io={};io.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},io.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},io.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},io.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},io.default=Ee?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ee,re=0;re<y.length-1;re++){var le=y[re];if(/^(cmd|meta|m)$/i.test(le))ee=!0;else if(/^a(lt)?$/i.test(le))x=!0;else if(/^(c|ctrl|control)$/i.test(le))b=!0;else if(/^s(hift)?$/i.test(le))E=!0;else throw new Error("Unrecognized modifier name: "+le)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ee&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function 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=Tt(x.split(" "),Eu),ee=0;ee<E.length;ee++){var re=void 0,le=void 0;ee==E.length-1?(le=E.join(" "),re=b):(le=E.slice(0,ee+1).join(" "),re="...");var ue=y[le];if(!ue)y[le]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+le)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function Wo(a,y,x,b){y=_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 ee=0;ee<y.fallthrough.length;ee++){var re=Wo(a,y.fallthrough[ee],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ms(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(ct?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(ct?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(fe&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function _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 ee=y(x[E]);b.length&<(ee.from,He(b).to)<=0;){var re=b.pop();if(lt(re.from,ee.from)<0){ee.from=re.from;break}}b.push(ee)}Ai(a,function(){for(var le=b.length-1;le>=0;le--)Ho(a.doc,"",b[le].from,b[le].to,"+delete");Io(a)})}function cl(a,y,x){var b=Wt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function dl(a,y,x){var b=cl(a,y.ch,x);return b==null?null:new Te(y.line,b,x<0?"after":"before")}function hl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=hn(x,y.doc.direction);if(ee){var re=E<0?He(ee):ee[0],le=E<0==(re.level==1),ue=le?"after":"before",ce;if(re.level>0||y.doc.direction=="rtl"){var ye=uo(y,x);ce=E<0?x.text.length-1:0;var ke=zi(y,ye,ce).top;ce=It(function(Ue){return zi(y,ye,Ue).top==ke},E<0==(re.level==1)?re.from:re.to-1,ce),ue=="before"&&(ce=cl(x,ce,1))}else ce=E<0?re.to:re.from;return new Te(b,ce,ue)}}return new Te(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=hn(y,a.doc.direction);if(!E)return dl(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ee=nn(E,x.ch,x.sticky),re=E[ee];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return dl(y,x,b);var le=function(mn,En){return cl(y,mn instanceof Te?mn.ch:mn,En)},ue,ce=function(mn){return a.options.lineWrapping?(ue=ue||uo(a,y),Yr(a,y,ue,mn)):{begin:0,end:y.text.length}},ye=ce(x.sticky=="before"?le(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var ke=re.level==1==b<0,Ue=le(x,ke?1:-1);if(Ue!=null&&(ke?Ue<=re.to&&Ue<=ye.end:Ue>=re.from&&Ue>=ye.begin)){var ze=ke?"before":"after";return new Te(x.line,Ue,ze)}}var kt=function(mn,En,gn){for(var Bn=function(Or,li){return li?new Te(x.line,le(Or,1),"before"):new Te(x.line,Or,"after")};mn>=0&&mn<E.length;mn+=En){var Vn=E[mn],Hn=En>0==(Vn.level!=1),cr=Hn?gn.begin:le(gn.end,-1);if(Vn.from<=cr&&cr<Vn.to||(cr=Hn?Vn.from:le(Vn.to,-1),gn.begin<=cr&&cr<gn.end))return Bn(cr,Hn)}},zt=kt(ee+b,b,ye);if(zt)return zt;var on=b>0?ye.end:le(ye.begin,-1);return on!=null&&!(b>0&&on==y.text.length)&&(zt=kt(b>0?0:E.length-1,b,ce(on)),zt)?zt:null}var fa={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Re)},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:Te(y.head.line+1,0)}:{from:y.head,to:Te(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:Te(y.from().line,0),to:st(a.doc,Te(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:Te(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(Te(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Te(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 Mu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},rt)},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")},rt)},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},rt)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var ee=x[E].from(),re=me(a.getLine(ee.line),ee.ch,b);y.push(Jt(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,ee=je(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new Te(E.line,E.ch-1)),E.ch>0)E=new Te(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Te(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 Te(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Te(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Mr(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);Io(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=vn(x);return b!=x&&(y=Ce(b)),hl(!0,a,b,y,1)}function Mu(a,y){var x=je(a.doc,y),b=Wn(x);return b!=x&&(y=Ce(b)),hl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=je(a.doc,x.line),E=hn(b,a.doc.direction);if(!E||E[0].level==0){var ee=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=ee&&y.ch;return Te(x.line,re?0:ee,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=fa[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=Rt}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 de;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vs(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null: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")&&(Ft(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 fl=null;function Cs(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Be(),!Ne(y,a))){pe&&ge<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=ws(y,a);fe&&(fl=b?x:null,!b&&x==88&&!Je&&(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)&&Bu(y)}}function Bu(a){var y=a.display.lineDiv;ot(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(it(y,"CodeMirror-crosshair"),xt(document,"keyup",x),xt(document,"mouseover",x))}xe(document,"keyup",x),xe(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),Ne(this,a)}function ks(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||Ne(y,a)||a.ctrlKey&&!a.altKey||Ee&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==fl){fl=null,Ft(a);return}if(!(fe&&(!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 Ru=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+Ru>a&<(y,this.pos)==0&&x==this.button};var va,ma;function Iu(a,y){var x=+new Date;return ma&&ma.compare(x,a,y)?(va=ma=null,"triple"):va&&va.compare(x,a,y)?(ma=new 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(!(Ne(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Ie||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=Co(y,a),E=Mn(a),ee=b?Iu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,ee,a))&&(E==1?b?Fu(y,b,ee,a):Tn(a)==x.scroller&&Ft(a):E==2?(b&&Ra(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(et?y.display.input.onContextMenu(a):Dl(y)))}}}function Nu(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,pa(a,ms(ee,E),E,function(re){if(typeof re=="string"&&(re=fa[re]),!re)return!1;var le=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),le=re(a,x)!=Rt}finally{a.state.suppressEdits=!1}return le})}function Ou(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=nt?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=Ee?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ee?x.altKey:x.ctrlKey)),E}function Fu(a,y,x,b){pe?setTimeout(Dn(El,a),0):a.curOp.focus=Be();var E=Ou(a,x,b),ee=a.doc.sel,re;a.options.dragDrop&&qn&&!a.isReadOnly()&&x=="single"&&(re=ee.contains(y))>-1&&(lt((re=ee.ranges[re]).from(),y)<0||y.xRel>0)&&(lt(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,ee=!1,re=oi(a,function(ce){Ie&&(E.scroller.draggable=!1),a.state.draggingText=!1,xt(E.wrapper.ownerDocument,"mouseup",re),xt(E.wrapper.ownerDocument,"mousemove",le),xt(E.scroller,"dragstart",ue),xt(E.scroller,"drop",re),ee||(Ft(ce),b.addNew||Ra(a.doc,x,null,null,b.extend),Ie&&!$e||pe&&ge==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),le=function(ce){ee=ee||Math.abs(y.clientX-ce.clientX)+Math.abs(y.clientY-ce.clientY)>=10},ue=function(){return ee=!0};Ie&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),xe(E.wrapper.ownerDocument,"mouseup",re),xe(E.wrapper.ownerDocument,"mousemove",le),xe(E.scroller,"dragstart",ue),xe(E.scroller,"drop",re),Dl(a),setTimeout(function(){return E.input.focus()},20)}function Ds(a,y,x){if(x=="char")return new Mr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Mr(Te(y.line,0),st(a.doc,Te(y.line+1,0)));var b=x(a,y);return new Mr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;Ft(y);var re,le,ue=ee.sel,ce=ue.ranges;if(b.addNew&&!b.extend?(le=ee.sel.contains(x),le>-1?re=ce[le]:re=new Mr(x,x)):(re=ee.sel.primary(),le=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Mr(x,x)),x=Co(a,y,!0,!0),le=-1;else{var ye=Ds(a,x,b.unit);b.extend?re=sl(re,ye.anchor,ye.head,b.extend):re=ye}b.addNew?le==-1?(le=ce.length,fi(ee,Ki(a,ce.concat([re]),le),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[le].empty()&&b.unit=="char"&&!b.extend?(fi(ee,Ki(a,ce.slice(0,le).concat(ce.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=ee.sel):ul(ee,le,re,tt):(le=0,fi(ee,new Oi([re],0),tt),ue=ee.sel);var ke=x;function Ue(gn){if(lt(ke,gn)!=0)if(ke=gn,b.unit=="rectangle"){for(var Bn=[],Vn=a.options.tabSize,Hn=me(je(ee,x.line).text,x.ch,Vn),cr=me(je(ee,gn.line).text,gn.ch,Vn),Or=Math.min(Hn,cr),li=Math.max(Hn,cr),jr=Math.min(x.line,gn.line),Bi=Math.min(a.lastLine(),Math.max(x.line,gn.line));jr<=Bi;jr++){var ki=je(ee,jr).text,qr=dn(ki,Or,Vn);Or==li?Bn.push(new Mr(Te(jr,qr),Te(jr,qr))):ki.length>qr&&Bn.push(new Mr(Te(jr,qr),Te(jr,dn(ki,li,Vn))))}Bn.length||Bn.push(new Mr(x,x)),fi(ee,Ki(a,ue.ranges.slice(0,le).concat(Bn),le),{origin:"*mouse",scroll:!1}),a.scrollIntoView(gn)}else{var Ei=re,di=Ds(a,gn,b.unit),ri=Ei.anchor,$r;lt(di.anchor,ri)>0?($r=di.head,ri=vt(Ei.from(),di.anchor)):($r=di.anchor,ri=an(Ei.to(),di.head));var Ur=ue.ranges.slice(0);Ur[le]=zu(a,new Mr(st(ee,ri),$r)),fi(ee,Ki(a,Ur,le),tt)}}var ze=E.wrapper.getBoundingClientRect(),kt=0;function zt(gn){var Bn=++kt,Vn=Co(a,gn,!0,b.unit=="rectangle");if(Vn)if(lt(Vn,ke)!=0){a.curOp.focus=Be(),Ue(Vn);var Hn=La(E,ee);(Vn.line>=Hn.to||Vn.line<Hn.from)&&setTimeout(oi(a,function(){kt==Bn&&zt(gn)}),150)}else{var cr=gn.clientY<ze.top?-20:gn.clientY>ze.bottom?20:0;cr&&setTimeout(oi(a,function(){kt==Bn&&(E.scroller.scrollTop+=cr,zt(gn))}),50)}}function on(gn){a.state.selectingText=!1,kt=1/0,gn&&(Ft(gn),E.input.focus()),xt(E.wrapper.ownerDocument,"mousemove",mn),xt(E.wrapper.ownerDocument,"mouseup",En),ee.history.lastSelOrigin=null}var mn=oi(a,function(gn){gn.buttons===0||!Mn(gn)?on(gn):zt(gn)}),En=oi(a,on);a.state.selectingText=En,xe(E.wrapper.ownerDocument,"mousemove",mn),xe(E.wrapper.ownerDocument,"mouseup",En)}function zu(a,y){var x=y.anchor,b=y.head,E=je(a.doc,x.line);if(lt(x,b)==0&&x.sticky==b.sticky)return y;var ee=hn(E);if(!ee)return y;var re=nn(ee,x.ch,x.sticky),le=ee[re];if(le.from!=x.ch&&le.to!=x.ch)return y;var ue=re+(le.from==x.ch==(le.level!=1)?0:1);if(ue==0||ue==ee.length)return y;var ce;if(b.line!=x.line)ce=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var ye=nn(ee,b.ch,b.sticky),ke=ye-re||(b.ch-x.ch)*(le.level==1?-1:1);ye==ue-1||ye==ue?ce=ke<0:ce=ke>0}var Ue=ee[ue+(ce?-1:0)],ze=ce==(Ue.level==1),kt=ze?Ue.from:Ue.to,zt=ze?"after":"before";return x.ch==kt&&x.sticky==zt?y:new Mr(new Te(x.line,kt,zt),b)}function Ls(a,y,x,b){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(Ue){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&Ft(y);var re=a.display,le=re.lineDiv.getBoundingClientRect();if(ee>le.bottom||!pt(a,x))return _t(y);ee-=le.top-re.viewOffset;for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var ce=re.gutters.childNodes[ue];if(ce&&ce.getBoundingClientRect().right>=E){var ye=Se(a.doc,ee),ke=a.display.gutterSpecs[ue];return Dt(a,x,a,ye,ke.className,y),_t(y)}}}function vl(a,y){return Ls(a,y,"gutterClick",!0)}function Ms(a,y){ui(a.display,y)||Wu(a,y)||Ne(a,y,"contextmenu")||et||a.display.input.onContextMenu(y)}function Wu(a,y){return pt(a,"gutterContextMenu")?Ls(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,ee,re){a.defaults[b]=E,ee&&(y[b]=re?function(le,ue,ce){ce!=Go&&ee(le,ue,ce)}:ee)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,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 ee=[],re=b.doc.first;b.doc.iter(function(ue){for(var ce=0;;){var ye=ue.text.indexOf(E,ce);if(ye==-1)break;ce=ye+E.length,ee.push(Te(re,ye))}re++});for(var le=ee.length-1;le>=0;le--)Ho(b.doc,E,ee[le],Te(ee[le].line,ee[le].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=Go&&b.refresh()}),x("specialCharPlaceholder",Li,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Pe?"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",!ut),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Ts(b),ra(b)},!0),x("keyMap","default",function(b,E,ee){var re=_a(E),le=ee!=Go&&_a(ee);le&&le.detach&&le.detach(b,re),re.attach&&re.attach(b,le||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 No(b)},!0),x("scrollbarStyle","native",function(b){Bl(b),No(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rl(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Ro(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,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,ee=y?xe:xt;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(ot(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(it(a.display.wrapper,"CodeMirror-wrap"),ur(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return No(a)},100)}function Gr(a,y){var x=this;if(!(this instanceof Gr))return new Gr(a,y);this.options=y=y?ln(y):{},ln(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),ee=this.display=new ru(a,b,E,y);ee.wrapper.CodeMirror=this,Ts(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new de,keySeq:null,specialChars:null},y.autofocus&&!Pe&&ee.input.focus(),pe&&ge<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Pe||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Ro(this);for(var re in za)za.hasOwnProperty(re)&&za[re](this,y[re],Go);Nl(this),y.finishInit&&y.finishInit(this);for(var le=0;le<ml.length;++le)ml[le](this);Lo(this),Ie&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}Gr.defaults=Ps,Gr.optionHandlers=za;function Vu(a){var y=a.display;xe(y.scroller,"mousedown",oi(a,Es)),pe&&ge<11?xe(y.scroller,"dblclick",oi(a,function(ue){if(!Ne(a,ue)){var ce=Co(a,ue);if(!(!ce||vl(a,ue)||ui(a.display,ue))){Ft(ue);var ye=a.findWordAt(ce);Ra(a.doc,ye.anchor,ye.head)}}})):xe(y.scroller,"dblclick",function(ue){return Ne(a,ue)||Ft(ue)}),xe(y.scroller,"contextmenu",function(ue){return Ms(a,ue)}),xe(y.input.getField(),"contextmenu",function(ue){y.scroller.contains(ue.target)||Ms(a,ue)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function ee(ue){if(ue.touches.length!=1)return!1;var ce=ue.touches[0];return ce.radiusX<=1&&ce.radiusY<=1}function re(ue,ce){if(ce.left==null)return!0;var ye=ce.left-ue.left,ke=ce.top-ue.top;return ye*ye+ke*ke>20*20}xe(y.scroller,"touchstart",function(ue){if(!Ne(a,ue)&&!ee(ue)&&!vl(a,ue)){y.input.ensurePolled(),clearTimeout(x);var ce=+new Date;y.activeTouch={start:ce,moved:!1,prev:ce-b.end<=300?b:null},ue.touches.length==1&&(y.activeTouch.left=ue.touches[0].pageX,y.activeTouch.top=ue.touches[0].pageY)}}),xe(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),xe(y.scroller,"touchend",function(ue){var ce=y.activeTouch;if(ce&&!ui(y,ue)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var ye=a.coordsChar(y.activeTouch,"page"),ke;!ce.prev||re(ce,ce.prev)?ke=new Mr(ye,ye):!ce.prev.prev||re(ce,ce.prev.prev)?ke=a.findWordAt(ye):ke=new Mr(Te(ye.line,0),st(a.doc,Te(ye.line+1,0))),a.setSelection(ke.anchor,ke.head),a.focus(),Ft(ue)}E()}),xe(y.scroller,"touchcancel",E),xe(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Dt(a,"scroll",a))}),xe(y.scroller,"mousewheel",function(ue){return _l(a,ue)}),xe(y.scroller,"DOMMouseScroll",function(ue){return _l(a,ue)}),xe(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){Ne(a,ue)||Cn(ue)},over:function(ue){Ne(a,ue)||(wu(a,ue),Cn(ue))},start:function(ue){return xu(a,ue)},drop:oi(a,bu),leave:function(ue){Ne(a,ue)||hs(a)}};var le=y.input.getField();xe(le,"keyup",function(ue){return Ss.call(a,ue)}),xe(le,"keydown",oi(a,Cs)),xe(le,"keypress",oi(a,ks)),xe(le,"focus",function(ue){return Ja(a,ue)}),xe(le,"blur",function(ue){return Ro(a,ue)})}var ml=[];Gr.defineInitHook=function(a){return ml.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=Jn(a,y).state:x="prev");var re=a.options.tabSize,le=je(E,y),ue=me(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ce=le.text.match(/^\s*/)[0],ye;if(!b&&!/\S/.test(le.text))ye=0,x="not";else if(x=="smart"&&(ye=E.mode.indent(ee,le.text.slice(ce.length),le.text),ye==Rt||ye>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?ye=me(je(E,y-1).text,null,re):ye=0:x=="add"?ye=ue+a.options.indentUnit:x=="subtract"?ye=ue-a.options.indentUnit:typeof x=="number"&&(ye=ue+x),ye=Math.max(0,ye);var ke="",Ue=0;if(a.options.indentWithTabs)for(var ze=Math.floor(ye/re);ze;--ze)Ue+=re,ke+=" ";if(Ue<ye&&(ke+=Jt(ye-Ue)),ke!=ce)return Ho(E,ke,Te(y,0),Te(y,ce.length),"+input"),le.stateAfter=null,!0;for(var kt=0;kt<E.sel.ranges.length;kt++){var zt=E.sel.ranges[kt];if(zt.head.line==y&&zt.head.ch<ce.length){var on=Te(y,ce.length);ul(E,kt,new Mr(on,on));break}}}var Yi=null;function Wa(a){Yi=a}function gl(a,y,x,b,E){var ee=a.doc;a.display.shift=!1,b||(b=ee.sel);var re=+new Date-200,le=E=="paste"||a.state.pasteIncoming>re,ue=Fn(y),ce=null;if(le&&b.ranges.length>1)if(Yi&&Yi.text.join(`
|
|
`)==y){if(b.ranges.length%Yi.text.length==0){ce=[];for(var ye=0;ye<Yi.text.length;ye++)ce.push(ee.splitLines(Yi.text[ye]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=Tt(ue,function(mn){return[mn]}));for(var ke=a.curOp.updateInput,Ue=b.ranges.length-1;Ue>=0;Ue--){var ze=b.ranges[Ue],kt=ze.from(),zt=ze.to();ze.empty()&&(x&&x>0?kt=Te(kt.line,kt.ch-x):a.state.overwrite&&!le?zt=Te(zt.line,Math.min(je(ee,zt.line).text.length,zt.ch+He(ue).length)):le&&Yi&&Yi.lineWise&&Yi.text.join(`
|
|
`)==ue.join(`
|
|
`)&&(kt=zt=Te(kt.line,0)));var on={from:kt,to:zt,text:ce?ce[Ue%ce.length]:ue,origin:E||(le?"paste":a.state.cutIncoming>re?"cut":"+input")};_o(a.doc,on),Wr(a,"inputRead",a,on)}y&&!le&&Bs(a,y),Io(a),a.curOp.updateInput<2&&(a.curOp.updateInput=ke),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 Bs(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var ee=a.getModeAt(E.head),re=!1;if(ee.electricChars){for(var le=0;le<ee.electricChars.length;le++)if(y.indexOf(ee.electricChars.charAt(le))>-1){re=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(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 Rs(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ee={anchor:Te(E,0),head:Te(E+1,0)};x.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:x}}function Is(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Ns(){var a=We("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=We("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ie?a.style.width="1000px":a.setAttribute("wrap","off"),Fe&&(a.style.border="1px solid black"),Is(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var ee=this.options,re=ee[b];ee[b]==E&&b!="mode"||(ee[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,re),Dt(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,E){this.state.keyMaps[E?"push":"unshift"](_a(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,ee=0;ee<E.length;++ee)if(E[ee]==b||E[ee].name==b)return E.splice(ee,1),!0},addOverlay:yi(function(b,E){var ee=b.token?b:a.getMode(this.options,b);if(ee.startState)throw new Error("Overlays may not be stateful.");Nt(this.state.overlays,{mode:ee,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,ee=0;ee<E.length;++ee){var re=E[ee].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(ee,1),this.state.modeGen++,Ci(this);return}}}),indentLine:yi(function(b,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Pt(this.doc,b)&&ga(this,b,E,ee)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,ee=-1,re=0;re<E.length;re++){var le=E[re];if(le.empty())le.head.line>ee&&(ga(this,le.head.line,b,!0),ee=le.head.line,re==this.doc.sel.primIndex&&Io(this));else{var ue=le.from(),ce=le.to(),ye=Math.max(ee,ue.line);ee=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var ke=ye;ke<ee;++ke)ga(this,ke,b);var Ue=this.doc.sel.ranges;ue.ch==0&&E.length==Ue.length&&Ue[re].from().ch>0&&ul(this.doc,re,new Mr(ue,Ue[re].to()),Re)}}}),getTokenAt:function(b,E){return or(this,b,E)},getLineTokens:function(b,E){return or(this,Te(b),E,!0)},getTokenTypeAt:function(b){b=st(this.doc,b);var E=Kn(this,je(this.doc,b.line)),ee=0,re=(E.length-1)/2,le=b.ch,ue;if(le==0)ue=E[2];else for(;;){var ce=ee+re>>1;if((ce?E[ce*2-1]:0)>=le)re=ce;else if(E[ce*2+1]<le)ee=ce+1;else{ue=E[ce*2+2];break}}var ye=ue?ue.indexOf("overlay "):-1;return ye<0?ue:ye==0?null:ue.slice(0,ye-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var ee=[];if(!x.hasOwnProperty(E))return ee;var re=x[E],le=this.getModeAt(b);if(typeof le[E]=="string")re[le[E]]&&ee.push(re[le[E]]);else if(le[E])for(var ue=0;ue<le[E].length;ue++){var ce=re[le[E][ue]];ce&&ee.push(ce)}else le.helperType&&re[le.helperType]?ee.push(re[le.helperType]):re[le.name]&&ee.push(re[le.name]);for(var ye=0;ye<re._global.length;ye++){var ke=re._global[ye];ke.pred(le,this)&&mt(ee,ke.val)==-1&&ee.push(ke.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=Gt(ee,b==null?ee.first+ee.size-1:b),Jn(this,b+1,E).state},cursorCoords:function(b,E){var ee,re=this.doc.sel.primary();return b==null?ee=re.head:typeof b=="object"?ee=st(this.doc,b):ee=b?re.from():re.to(),wi(this,ee,E||"page")},charCoords:function(b,E){return Bo(this,st(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,ee){var re=!1,le;if(typeof b=="number"){var ue=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ue&&(b=ue,re=!0),le=je(this.doc,b)}else le=b;return Ao(this,le,{top:0,left:0},E||"page",ee||re).top+(re?this.doc.height-jn(le):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,ee,re,le){var ue=this.display;b=wi(this,st(this.doc,b));var ce=b.bottom,ye=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ue.sizer.appendChild(E),re=="over")ce=b.top;else if(re=="above"||re=="near"){var ke=Math.max(ue.wrapper.clientHeight,this.doc.height),Ue=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>ke)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=ke&&(ce=b.bottom),ye+E.offsetWidth>Ue&&(ye=Ue-E.offsetWidth)}E.style.top=ce+"px",E.style.left=E.style.right="",le=="right"?(ye=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(le=="left"?ye=0:le=="middle"&&(ye=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=ye+"px"),ee&&Gs(this,{left:ye,top:ce,right:ye+E.offsetWidth,bottom:ce+E.offsetHeight})},triggerOnKeyDown:yi(Cs),triggerOnKeyPress:yi(ks),triggerOnKeyUp:Ss,triggerOnMouseDown:yi(Es),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:yi(function(b){Bs(this,b)}),findPosH:function(b,E,ee,re){var le=1;E<0&&(le=-1,E=-E);for(var ue=st(this.doc,b),ce=0;ce<E&&(ue=yl(this.doc,ue,le,ee,re),!ue.hitSide);++ce);return ue},moveH:yi(function(b,E){var ee=this;this.extendSelectionsBy(function(re){return ee.display.shift||ee.doc.extend||re.empty()?yl(ee.doc,re.head,b,E,ee.options.rtlMoveVisually):b<0?re.from():re.to()},rt)}),deleteH:yi(function(b,E){var ee=this.doc.sel,re=this.doc;ee.somethingSelected()?re.replaceSelection("",null,"+delete"):Zo(this,function(le){var ue=yl(re,le.head,b,E,!1);return b<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(b,E,ee,re){var le=1,ue=re;E<0&&(le=-1,E=-E);for(var ce=st(this.doc,b),ye=0;ye<E;++ye){var ke=wi(this,ce,"div");if(ue==null?ue=ke.left:ke.left=ue,ce=Os(this,ke,le,ee),ce.hitSide)break}return ce},moveV:yi(function(b,E){var ee=this,re=this.doc,le=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(ye){if(ue)return b<0?ye.from():ye.to();var ke=wi(ee,ye.head,"div");ye.goalColumn!=null&&(ke.left=ye.goalColumn),le.push(ke.left);var Ue=Os(ee,ke,b,E);return E=="page"&&ye==re.sel.primary()&&qa(ee,Bo(ee,Ue,"div").top-ke.top),Ue},rt),le.length)for(var ce=0;ce<re.sel.ranges.length;ce++)re.sel.ranges[ce].goalColumn=le[ce]}),findWordAt:function(b){var E=this.doc,ee=je(E,b.line).text,re=b.ch,le=b.ch;if(ee){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||le==ee.length)&&re?--re:++le;for(var ce=ee.charAt(re),ye=se(ce,ue)?function(ke){return se(ke,ue)}:/\s/.test(ce)?function(ke){return/\s/.test(ke)}:function(ke){return!/\s/.test(ke)&&!se(ke)};re>0&&ye(ee.charAt(re-1));)--re;for(;le<ee.length&&ye(ee.charAt(le));)++le}return new Mr(Te(b.line,re),Te(b.line,le))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ot(this.display.cursorDiv,"CodeMirror-overwrite"):it(this.display.cursorDiv,"CodeMirror-overwrite"),Dt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Be()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yi(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Mi(this)-this.display.barHeight,width:b.scrollWidth-Mi(this)-this.display.barWidth,clientHeight:no(this),clientWidth:qi(this)}},scrollIntoView:yi(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:Te(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):Ml(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var ee=this,re=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ce=0;ce<ue.widgets.length;ce++)if(ue.widgets[ce].noHScroll){ho(ee,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,Dt(this,"refresh",this)}),operation:function(b){return Ai(this,b)},startOperation:function(){return Do(this)},endOperation:function(){return Lo(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),Dt(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}},St(a),a.registerHelper=function(b,E,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,re){a.registerHelper(b,E,re),x[b]._global.push({pred:ee,val:re})}}function yl(a,y,x,b,E){var ee=y,re=x,le=je(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function ce(){var En=y.line+ue;return En<a.first||En>=a.first+a.size?!1:(y=new Te(En,y.ch,y.sticky),le=je(a,En))}function ye(En){var gn;if(b=="codepoint"){var Bn=le.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Bn)?gn=null:gn=new Te(y.line,Math.max(0,Math.min(le.text.length,y.ch+x*(Bn>=55296&&Bn<56320?2:1))),-x)}else E?gn=Lu(a.cm,le,y,x):gn=dl(le,y,x);if(gn==null)if(!En&&ce())y=hl(E,a.cm,le,y.line,ue);else return!1;else y=gn;return!0}if(b=="char"||b=="codepoint")ye();else if(b=="column")ye(!0);else if(b=="word"||b=="group")for(var ke=null,Ue=b=="group",ze=a.cm&&a.cm.getHelper(y,"wordChars"),kt=!0;!(x<0&&!ye(!kt));kt=!1){var zt=le.text.charAt(y.ch)||`
|
|
`,on=se(zt,ze)?"w":Ue&&zt==`
|
|
`?"n":!Ue||/\s/.test(zt)?null:"p";if(Ue&&!kt&&!on&&(on="s"),ke&&ke!=on){x<0&&(x=1,ye(),y.sticky="after");break}if(on&&(ke=on),x>0&&!ye(!kt))break}var mn=Na(a,y,ee,re,!0);return wt(ee,mn)&&(mn.hitSide=!0),mn}function Os(a,y,x,b){var E=a.doc,ee=y.left,re;if(b=="page"){var le=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*Pi(a.display),3);re=(x>0?y.bottom:y.top)+x*ue}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var ce;ce=ci(a,ee,re),!!ce.outside;){if(x<0?re<=0:re>=E.height){ce.hitSide=!0;break}re+=x*5}return ce}var Br=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Br.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Is(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}xe(E,"paste",function(le){!ee(le)||Ne(b,le)||As(le,b)||ge<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),xe(E,"compositionstart",function(le){y.composing={data:le.data,done:!1}}),xe(E,"compositionupdate",function(le){y.composing||(y.composing={data:le.data,done:!1})}),xe(E,"compositionend",function(le){y.composing&&(le.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),xe(E,"touchstart",function(){return x.forceCompositionEnd()}),xe(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(le){if(!(!ee(le)||Ne(b,le))){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()}),le.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Rs(b);Wa({lineWise:!0,text:ue.text}),le.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,Re),b.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ce=Yi.text.join(`
|
|
`);if(le.clipboardData.setData("Text",ce),le.clipboardData.getData("Text")==ce){le.preventDefault();return}}var ye=Ns(),ke=ye.firstChild;b.display.lineSpace.insertBefore(ye,b.display.lineSpace.firstChild),ke.value=Yi.text.join(`
|
|
`);var Ue=document.activeElement;Lt(ke),setTimeout(function(){b.display.lineSpace.removeChild(ye),Ue.focus(),Ue==E&&x.showPrimarySelection()},50)}}xe(E,"copy",re),xe(E,"cut",re)},Br.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Br.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Br.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Br.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Br.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var ee=Za(y,a.anchorNode,a.anchorOffset),re=Za(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&re&&!re.bad&<(vt(ee,re),b)==0&<(an(ee,re),E)==0)){var le=y.display.view,ue=b.line>=y.display.viewFrom&&Fs(y,b)||{node:le[0].measure.map[2],offset:0},ce=E.line<y.display.viewTo&&Fs(y,E);if(!ce){var ye=le[le.length-1].measure,ke=ye.maps?ye.maps[ye.maps.length-1]:ye.map;ce={node:ke[ke.length-1],offset:ke[ke.length-2]-ke[ke.length-3]}}if(!ue||!ce){a.removeAllRanges();return}var Ue=a.rangeCount&&a.getRangeAt(0),ze;try{ze=Le(ue.node,ue.offset,ce.offset,ce.node)}catch(kt){}ze&&(!ie&&y.state.focused?(a.collapse(ue.node,ue.offset),ze.collapsed||(a.removeAllRanges(),a.addRange(ze))):(a.removeAllRanges(),a.addRange(ze)),Ue&&a.anchorNode==null?a.addRange(Ue):ie&&this.startGracePeriod()),this.rememberSelection()}},Br.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)},Br.prototype.showMultipleSelections=function(a){Ye(this.cm.display.cursorDiv,a.cursors),Ye(this.cm.display.selectionDiv,a.selection)},Br.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Br.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Xe(this.div,y)},Br.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Br.prototype.blur=function(){this.div.blur()},Br.prototype.getField=function(){return this.div},Br.prototype.supportsTouch=function(){return!0},Br.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)},Br.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Br.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Me&&we&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&Ai(y,function(){fi(y.doc,po(x,b),Re),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Br.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=Te(b.line-1,je(a.doc,b.line-1).length)),E.ch==je(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Te(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,re,le;b.line==y.viewFrom||(ee=So(a,b.line))==0?(re=Ce(y.view[0].line),le=y.view[0].node):(re=Ce(y.view[ee].line),le=y.view[ee-1].node.nextSibling);var ue=So(a,E.line),ce,ye;if(ue==y.view.length-1?(ce=y.viewTo-1,ye=y.lineDiv.lastChild):(ce=Ce(y.view[ue+1].line)-1,ye=y.view[ue+1].node.previousSibling),!le)return!1;for(var ke=a.doc.splitLines(Yu(a,le,ye,re,ce)),Ue=Ot(a.doc,Te(re,0),Te(ce,je(a.doc,ce).text.length));ke.length>1&&Ue.length>1;)if(He(ke)==He(Ue))ke.pop(),Ue.pop(),ce--;else if(ke[0]==Ue[0])ke.shift(),Ue.shift(),re++;else break;for(var ze=0,kt=0,zt=ke[0],on=Ue[0],mn=Math.min(zt.length,on.length);ze<mn&&zt.charCodeAt(ze)==on.charCodeAt(ze);)++ze;for(var En=He(ke),gn=He(Ue),Bn=Math.min(En.length-(ke.length==1?ze:0),gn.length-(Ue.length==1?ze:0));kt<Bn&&En.charCodeAt(En.length-kt-1)==gn.charCodeAt(gn.length-kt-1);)++kt;if(ke.length==1&&Ue.length==1&&re==b.line)for(;ze&&ze>b.ch&&En.charCodeAt(En.length-kt-1)==gn.charCodeAt(gn.length-kt-1);)ze--,kt++;ke[ke.length-1]=En.slice(0,En.length-kt).replace(/^\u200b+/,""),ke[0]=ke[0].slice(ze).replace(/\u200b+$/,"");var Vn=Te(re,ze),Hn=Te(ce,Ue.length?He(Ue).length-kt:0);if(ke.length>1||ke[0]||lt(Vn,Hn))return Ho(a.doc,ke,Vn,Hn,"+input"),!0},Br.prototype.ensurePolled=function(){this.forceCompositionEnd()},Br.prototype.reset=function(){this.forceCompositionEnd()},Br.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Br.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))},Br.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Ai(this.cm,function(){return Ci(a.cm)})},Br.prototype.setUneditable=function(a){a.contentEditable="false"},Br.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))},Br.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Br.prototype.onContextMenu=function(){},Br.prototype.resetPosition=function(){},Br.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),ee=hn(b,a.doc.direction),re="left";if(ee){var le=nn(ee,y.ch);re=le%2?"right":"left"}var ue=xa(E.map,y.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",re=!1,le=a.doc.lineSeparator(),ue=!1;function ce(ze){return function(kt){return kt.id==ze}}function ye(){re&&(ee+=le,ue&&(ee+=le),re=ue=!1)}function ke(ze){ze&&(ye(),ee+=ze)}function Ue(ze){if(ze.nodeType==1){var kt=ze.getAttribute("cm-text");if(kt){ke(kt);return}var zt=ze.getAttribute("cm-marker"),on;if(zt){var mn=a.findMarks(Te(b,0),Te(E+1,0),ce(+zt));mn.length&&(on=mn[0].find(0))&&ke(Ot(a.doc,on.from,on.to).join(le));return}if(ze.getAttribute("contenteditable")=="false")return;var En=/^(pre|div|p|li|table|br)$/i.test(ze.nodeName);if(!/^br$/i.test(ze.nodeName)&&ze.textContent.length==0)return;En&&ye();for(var gn=0;gn<ze.childNodes.length;gn++)Ue(ze.childNodes[gn]);/^(pre|p)$/i.test(ze.nodeName)&&(ue=!0),En&&(re=!0)}else ze.nodeType==3&&ke(ze.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ue(y),y!=x;)y=y.nextSibling,ue=!1;return ee}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(Te(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ee=a.display.view[E];if(ee.node==b)return Xu(ee,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Xe(b,y))return jo(Te(Ce(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ee=a.rest?He(a.rest):a.line;return jo(Te(Ce(ee),ee.text.length),E)}var re=y.nodeType==3?y:null,le=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));le.parentNode!=b;)le=le.parentNode;var ue=a.measure,ce=ue.maps;function ye(on,mn,En){for(var gn=-1;gn<(ce?ce.length:0);gn++)for(var Bn=gn<0?ue.map:ce[gn],Vn=0;Vn<Bn.length;Vn+=3){var Hn=Bn[Vn+2];if(Hn==on||Hn==mn){var cr=Ce(gn<0?a.line:a.rest[gn]),Or=Bn[Vn]+En;return(En<0||Hn!=on)&&(Or=Bn[Vn+(En?1:0)]),Te(cr,Or)}}}var ke=ye(re,le,x);if(ke)return jo(ke,E);for(var Ue=le.nextSibling,ze=re?re.nodeValue.length-x:0;Ue;Ue=Ue.nextSibling){if(ke=ye(Ue,Ue.firstChild,0),ke)return jo(Te(ke.line,ke.ch-ze),E);ze+=Ue.textContent.length}for(var kt=le.previousSibling,zt=x;kt;kt=kt.previousSibling){if(ke=ye(kt,kt.firstChild,-1),ke)return jo(Te(ke.line,ke.ch+zt),E);zt+=kt.textContent.length}}var Xr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,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),Fe&&(E.style.width="0px"),xe(E,"input",function(){pe&&ge>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),xe(E,"paste",function(re){Ne(b,re)||As(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(re){if(!Ne(b,re)){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var le=Rs(b);Wa({lineWise:!0,text:le.text}),re.type=="cut"?b.setSelections(le.ranges,null,Re):(x.prevInput="",E.value=le.text.join(`
|
|
`),Lt(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}xe(E,"cut",ee),xe(E,"copy",ee),xe(a.scroller,"paste",function(re){if(!(ui(a,re)||Ne(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,E.dispatchEvent(le)}}),xe(a.lineSpace,"selectstart",function(re){ui(a,re)||Ft(re)}),xe(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"})}}),xe(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Ns(),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"),ee=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-ee.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Ye(x.cursorDiv,a.cursors),Ye(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&&Lt(this.textarea),pe&&ge>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",pe&&ge>=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"&&(!Pe||Be()!=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||Sn(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(pe&&ge>=9&&this.hasSelection===E||Ee&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!b&&(b="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(b.length,E.length);re<le&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return 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(){pe&&ge>=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 ee=Co(x,a),re=b.scroller.scrollTop;if(!ee||fe)return;var le=x.options.resetSelectionOnContextMenu;le&&x.doc.sel.contains(ee)==-1&&oi(x,fi)(x.doc,po(ee),Re);var ue=E.style.cssText,ce=y.wrapper.style.cssText,ye=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-ye.top-5)+"px; left: "+(a.clientX-ye.left-5)+`px;
|
|
z-index: 1000; background: `+(pe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ke;Ie&&(ke=window.scrollY),b.input.focus(),Ie&&window.scrollTo(null,ke),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=ze,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Ue(){if(E.selectionStart!=null){var zt=x.somethingSelected(),on="\u200B"+(zt?E.value:"");E.value="\u21DA",E.value=on,y.prevInput=zt?"":"\u200B",E.selectionStart=1,E.selectionEnd=on.length,b.selForContextMenu=x.doc.sel}}function ze(){if(y.contextMenuPending==ze&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=ue,pe&&ge<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!pe||pe&&ge<9)&&Ue();var zt=0,on=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,ts)(x):zt++<10?b.detectingSelectAll=setTimeout(on,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(on,200)}}if(pe&&ge>=9&&Ue(),et){Cn(a);var kt=function(){xt(window,"mouseup",kt),setTimeout(ze,20)};xe(window,"mouseup",kt)}else setTimeout(ze,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?ln(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=Be();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=le.getValue()}var E;if(a.form&&(xe(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var re=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=re}}catch(ue){}}y.finishInit=function(ue){ue.save=b,ue.getTextArea=function(){return a},ue.toTextArea=function(){ue.toTextArea=isNaN,b(),a.parentNode.removeChild(ue.getWrapperElement()),a.style.display="",a.form&&(xt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var le=Gr(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return le}function Qu(a){a.off=xt,a.on=xe,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=Fn,a.countColumn=me,a.findColumn=dn,a.isWordChar=oe,a.Pass=Rt,a.signal=Dt,a.Line=Er,a.changeEnd=vo,a.scrollbarModel=Al,a.Pos=Te,a.cmpPos=lt,a.modes=Mt,a.mimeModes=Et,a.resolveMode=Yt,a.getMode=Qt,a.modeExtensions=wn,a.extendMode=In,a.copyState=kn,a.startState=On,a.innerMode=cn,a.commands=fa,a.keyMap=io,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Wo,a.normalizeKeyMap=Du,a.StringStream=qe,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=Ft,a.e_stopPropagation=xn,a.e_stop=Cn,a.addClass=ot,a.contains=Xe,a.rmClass=it,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)&&mt(qu,Ga)<0&&(Gr.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Ga]));return St(Si),Gr.inputStyles={textarea:Xr,contenteditable:Br},Gr.defineMode=function(a){!Gr.defaults.mode&&a!="null"&&(Gr.defaults.mode=a),Bt.apply(this,arguments)},Gr.defineMIME=rn,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(jt,qt,he){(function(ie){ie(he(89780),he(15525),he(98101))})(function(ie){"use strict";ie.defineMode("markdown",function(Ze,De){var Oe=ie.getMode(Ze,"text/html"),pe=Oe.name=="null";function ge(me){if(ie.findModeByName){var de=ie.findModeByName(me);de&&(me=de.mime||de.mimes[0])}var mt=ie.getMode(Ze,me);return mt.name=="null"?null:mt}De.highlightFormatting===void 0&&(De.highlightFormatting=!1),De.maxBlockquoteDepth===void 0&&(De.maxBlockquoteDepth=0),De.taskLists===void 0&&(De.taskLists=!1),De.strikethrough===void 0&&(De.strikethrough=!1),De.emoji===void 0&&(De.emoji=!1),De.fencedCodeBlockHighlighting===void 0&&(De.fencedCodeBlockHighlighting=!0),De.fencedCodeBlockDefaultMode===void 0&&(De.fencedCodeBlockDefaultMode="text/plain"),De.xml===void 0&&(De.xml=!0),De.tokenTypeOverrides===void 0&&(De.tokenTypeOverrides={});var Ie={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 _e in Ie)Ie.hasOwnProperty(_e)&&De.tokenTypeOverrides[_e]&&(Ie[_e]=De.tokenTypeOverrides[_e]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,$e=/^\[(x| )\](?=\s)/i,ve=De.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ht=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Fe=/^[^#!\[\]*_\\<>` "'(~:]+/,Me=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Pe=/^\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]/,nt=" ";function ut(me,de,mt){return de.f=de.inline=mt,mt(me,de)}function ft(me,de,mt){return de.f=de.block=mt,mt(me,de)}function ct(me){return!me||!/\S/.test(me.string)}function et(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==it){var de=pe;if(!de){var mt=ie.innerMode(Oe,me.htmlState);de=mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText}de&&(me.f=Ct,me.block=Ae,me.htmlState=null)}return me.trailingSpace=0,me.trailingSpaceNewLine=!1,me.prevLine=me.thisLine,me.thisLine={stream:null},null}function Ae(me,de){var mt=me.column()===de.indentation,sn=ct(de.prevLine.stream),Rt=de.indentedCode,Re=de.prevLine.hr,tt=de.list!==!1,rt=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var dn=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,tt)){for(de.list=null;dn<de.listStack[de.listStack.length-1];)de.listStack.pop(),de.listStack.length?de.indentation=de.listStack[de.listStack.length-1]:de.list=!1;de.list!==!1&&(de.indentationDiff=dn-de.listStack[de.listStack.length-1])}var bt=!sn&&!Re&&!de.prevLine.header&&(!tt||!Rt)&&!de.prevLine.fencedCodeEnd,Jt=(de.list===!1||Re||sn)&&de.indentation<=rt&&me.match(we),He=null;if(de.indentationDiff>=4&&(Rt||de.prevLine.fencedCodeEnd||de.prevLine.header||sn))return me.skipToEnd(),de.indentedCode=!0,Ie.code;if(me.eatSpace())return null;if(mt&&de.indentation<=rt&&(He=me.match(ve))&&He[1].length<=6)return de.quote=0,de.header=He[1].length,de.thisLine.header=!0,De.highlightFormatting&&(de.formatting="header"),de.f=de.inline,Ye(de);if(de.indentation<=rt&&me.eat(">"))return de.quote=mt?1:de.quote+1,De.highlightFormatting&&(de.formatting="quote"),me.eatSpace(),Ye(de);if(!Jt&&!de.setext&&mt&&de.indentation<=rt&&(He=me.match(fe))){var Tt=He[1]?"ol":"ul";return de.indentation=dn+me.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,De.taskLists&&me.match($e,!1)&&(de.taskList=!0),de.f=de.inline,De.highlightFormatting&&(de.formatting=["list","list-"+Tt]),Ye(de)}else{if(mt&&de.indentation<=rt&&(He=me.match(Me,!0)))return de.quote=0,de.fencedEndRE=new RegExp(He[1]+"+ *$"),de.localMode=De.fencedCodeBlockHighlighting&&ge(He[2]||De.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=ie.startState(de.localMode)),de.f=de.block=Ut,De.highlightFormatting&&(de.formatting="code-block"),de.code=-1,Ye(de);if(de.setext||(!bt||!tt)&&!de.quote&&de.list===!1&&!de.code&&!Jt&&!Pe.test(me.string)&&(He=me.lookAhead(1))&&(He=He.match(ht)))return de.setext?(de.header=de.setext,de.setext=0,me.skipToEnd(),De.highlightFormatting&&(de.formatting="header")):(de.header=He[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,Ye(de);if(Jt)return me.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,Ie.hr;if(me.peek()==="[")return ut(me,de,un)}return ut(me,de,de.inline)}function it(me,de){var mt=Oe.token(me,de.htmlState);if(!pe){var sn=ie.innerMode(Oe,de.htmlState);(sn.mode.name=="xml"&&sn.state.tagStart===null&&!sn.state.context&&sn.state.tokenize.isInText||de.md_inside&&me.current().indexOf(">")>-1)&&(de.f=Ct,de.block=Ae,de.htmlState=null)}return mt}function Ut(me,de){var mt=de.listStack[de.listStack.length-1]||0,sn=de.indentation<mt,Rt=mt+3;if(de.fencedEndRE&&de.indentation<=Rt&&(sn||me.match(de.fencedEndRE))){De.highlightFormatting&&(de.formatting="code-block");var Re;return sn||(Re=Ye(de)),de.localMode=de.localState=null,de.block=Ae,de.f=Ct,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,sn?ft(me,de,de.block):Re}else return de.localMode?de.localMode.token(me,de.localState):(me.skipToEnd(),Ie.code)}function Ye(me){var de=[];if(me.formatting){de.push(Ie.formatting),typeof me.formatting=="string"&&(me.formatting=[me.formatting]);for(var mt=0;mt<me.formatting.length;mt++)de.push(Ie.formatting+"-"+me.formatting[mt]),me.formatting[mt]==="header"&&de.push(Ie.formatting+"-"+me.formatting[mt]+"-"+me.header),me.formatting[mt]==="quote"&&(!De.maxBlockquoteDepth||De.maxBlockquoteDepth>=me.quote?de.push(Ie.formatting+"-"+me.formatting[mt]+"-"+me.quote):de.push("error"))}if(me.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(me.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(me.linkHref?de.push(Ie.linkHref,"url"):(me.strong&&de.push(Ie.strong),me.em&&de.push(Ie.em),me.strikethrough&&de.push(Ie.strikethrough),me.emoji&&de.push(Ie.emoji),me.linkText&&de.push(Ie.linkText),me.code&&de.push(Ie.code),me.image&&de.push(Ie.image),me.imageAltText&&de.push(Ie.imageAltText,"link"),me.imageMarker&&de.push(Ie.imageMarker)),me.header&&de.push(Ie.header,Ie.header+"-"+me.header),me.quote&&(de.push(Ie.quote),!De.maxBlockquoteDepth||De.maxBlockquoteDepth>=me.quote?de.push(Ie.quote+"-"+me.quote):de.push(Ie.quote+"-"+De.maxBlockquoteDepth)),me.list!==!1){var sn=(me.listStack.length-1)%3;sn?sn===1?de.push(Ie.list2):de.push(Ie.list3):de.push(Ie.list1)}return me.trailingSpaceNewLine?de.push("trailing-space-new-line"):me.trailingSpace&&de.push("trailing-space-"+(me.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function We(me,de){if(me.match(Fe,!0))return Ye(de)}function Ct(me,de){var mt=de.text(me,de);if(typeof mt!="undefined")return mt;if(de.list)return de.list=null,Ye(de);if(de.taskList){var sn=me.match($e,!0)[1]===" ";return sn?de.taskOpen=!0:de.taskClosed=!0,De.highlightFormatting&&(de.formatting="task"),de.taskList=!1,Ye(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&me.match(/^#+$/,!0))return De.highlightFormatting&&(de.formatting="header"),Ye(de);var Rt=me.next();if(de.linkTitle){de.linkTitle=!1;var Re=Rt;Rt==="("&&(Re=")"),Re=(Re+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var tt="^\\s*(?:[^"+Re+"\\\\]+|\\\\\\\\|\\\\.)"+Re;if(me.match(new RegExp(tt),!0))return Ie.linkHref}if(Rt==="`"){var rt=de.formatting;De.highlightFormatting&&(de.formatting="code"),me.eatWhile("`");var dn=me.current().length;if(de.code==0&&(!de.quote||dn==1))return de.code=dn,Ye(de);if(dn==de.code){var bt=Ye(de);return de.code=0,bt}else return de.formatting=rt,Ye(de)}else if(de.code)return Ye(de);if(Rt==="\\"&&(me.next(),De.highlightFormatting)){var Jt=Ye(de),He=Ie.formatting+"-escape";return Jt?Jt+" "+He:He}if(Rt==="!"&&me.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,De.highlightFormatting&&(de.formatting="image"),Ye(de);if(Rt==="["&&de.imageMarker&&me.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,De.highlightFormatting&&(de.formatting="image"),Ye(de);if(Rt==="]"&&de.imageAltText){De.highlightFormatting&&(de.formatting="image");var Jt=Ye(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=Xe,Jt}if(Rt==="["&&!de.image)return de.linkText&&me.match(/^.*?\]/)||(de.linkText=!0,De.highlightFormatting&&(de.formatting="link")),Ye(de);if(Rt==="]"&&de.linkText){De.highlightFormatting&&(de.formatting="link");var Jt=Ye(de);return de.linkText=!1,de.inline=de.f=me.match(/\(.*?\)| ?\[.*?\]/,!1)?Xe:Ct,Jt}if(Rt==="<"&&me.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Le,De.highlightFormatting&&(de.formatting="link");var Jt=Ye(de);return Jt?Jt+=" ":Jt="",Jt+Ie.linkInline}if(Rt==="<"&&me.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Le,De.highlightFormatting&&(de.formatting="link");var Jt=Ye(de);return Jt?Jt+=" ":Jt="",Jt+Ie.linkEmail}if(De.xml&&Rt==="<"&&me.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Tt=me.string.indexOf(">",me.pos);if(Tt!=-1){var Nt=me.string.substring(me.start,Tt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Nt)&&(de.md_inside=!0)}return me.backUp(1),de.htmlState=ie.startState(Oe),ft(me,de,it)}if(De.xml&&Rt==="<"&&me.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(Rt==="*"||Rt==="_"){for(var ae=1,te=me.pos==1?" ":me.string.charAt(me.pos-2);ae<3&&me.eat(Rt);)ae++;var z=me.peek()||" ",oe=!/\s/.test(z)&&(!Ee.test(z)||/\s/.test(te)||Ee.test(te)),se=!/\s/.test(te)&&(!Ee.test(te)||/\s/.test(z)||Ee.test(z)),ne=null,be=null;if(ae%2&&(!de.em&&oe&&(Rt==="*"||!se||Ee.test(te))?ne=!0:de.em==Rt&&se&&(Rt==="*"||!oe||Ee.test(z))&&(ne=!1)),ae>1&&(!de.strong&&oe&&(Rt==="*"||!se||Ee.test(te))?be=!0:de.strong==Rt&&se&&(Rt==="*"||!oe||Ee.test(z))&&(be=!1)),be!=null||ne!=null){De.highlightFormatting&&(de.formatting=ne==null?"strong":be==null?"em":"strong em"),ne===!0&&(de.em=Rt),be===!0&&(de.strong=Rt);var bt=Ye(de);return ne===!1&&(de.em=!1),be===!1&&(de.strong=!1),bt}}else if(Rt===" "&&(me.eat("*")||me.eat("_"))){if(me.peek()===" ")return Ye(de);me.backUp(1)}if(De.strikethrough){if(Rt==="~"&&me.eatWhile(Rt)){if(de.strikethrough){De.highlightFormatting&&(de.formatting="strikethrough");var bt=Ye(de);return de.strikethrough=!1,bt}else if(me.match(/^[^\s]/,!1))return de.strikethrough=!0,De.highlightFormatting&&(de.formatting="strikethrough"),Ye(de)}else if(Rt===" "&&me.match(/^~~/,!0)){if(me.peek()===" ")return Ye(de);me.backUp(2)}}if(De.emoji&&Rt===":"&&me.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,De.highlightFormatting&&(de.formatting="emoji");var Ve=Ye(de);return de.emoji=!1,Ve}return Rt===" "&&(me.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),Ye(de)}function Le(me,de){var mt=me.next();if(mt===">"){de.f=de.inline=Ct,De.highlightFormatting&&(de.formatting="link");var sn=Ye(de);return sn?sn+=" ":sn="",sn+Ie.linkInline}return me.match(/^[^>]+/,!0),Ie.linkInline}function Xe(me,de){if(me.eatSpace())return null;var mt=me.next();return mt==="("||mt==="["?(de.f=de.inline=ot(mt==="("?")":"]"),De.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,Ye(de)):"error"}var Be={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ot(me){return function(de,mt){var sn=de.next();if(sn===me){mt.f=mt.inline=Ct,De.highlightFormatting&&(mt.formatting="link-string");var Rt=Ye(mt);return mt.linkHref=!1,Rt}return de.match(Be[me]),mt.linkHref=!0,Ye(mt)}}function un(me,de){return me.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=Lt,me.next(),De.highlightFormatting&&(de.formatting="link"),de.linkText=!0,Ye(de)):ut(me,de,Ct)}function Lt(me,de){if(me.match(/^\]:/,!0)){de.f=de.inline=Dn,De.highlightFormatting&&(de.formatting="link");var mt=Ye(de);return de.linkText=!1,mt}return me.match(/^([^\]\\]|\\.)+/,!0),Ie.linkText}function Dn(me,de){return me.eatSpace()?null:(me.match(/^[^\s]+/,!0),me.peek()===void 0?de.linkTitle=!0:me.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=Ct,Ie.linkHref+" url")}var ln={startState:function(){return{f:Ae,prevLine:{stream:null},thisLine:{stream:null},block:Ae,htmlState:null,indentation:0,inline:Ct,text:We,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(me){return{f:me.f,prevLine:me.prevLine,thisLine:me.thisLine,block:me.block,htmlState:me.htmlState&&ie.copyState(Oe,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,de){if(de.formatting=!1,me!=de.thisLine.stream){if(de.header=0,de.hr=!1,me.match(/^\s*$/,!0))return et(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:me},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=it)){var mt=me.match(/^\s*/,!0)[0].replace(/\t/g,nt).length;if(de.indentation=mt,de.indentationDiff=null,mt>0)return null}}return de.f(me,de)},innerMode:function(me){return me.block==it?{state:me.htmlState,mode:Oe}:me.localState?{state:me.localState,mode:me.localMode}:{state:me,mode:ln}},indent:function(me,de,mt){return me.block==it&&Oe.indent?Oe.indent(me.htmlState,de,mt):me.localState&&me.localMode.indent?me.localMode.indent(me.localState,de,mt):ie.Pass},blankLine:et,getType:Ye,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ln},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},98101:function(jt,qt,he){(function(ie){ie(he(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 Ze=0;Ze<ie.modeInfo.length;Ze++){var De=ie.modeInfo[Ze];De.mimes&&(De.mime=De.mimes[0])}ie.findModeByMIME=function(Oe){Oe=Oe.toLowerCase();for(var pe=0;pe<ie.modeInfo.length;pe++){var ge=ie.modeInfo[pe];if(ge.mime==Oe)return ge;if(ge.mimes){for(var Ie=0;Ie<ge.mimes.length;Ie++)if(ge.mimes[Ie]==Oe)return ge}}if(/\+xml$/.test(Oe))return ie.findModeByMIME("application/xml");if(/\+json$/.test(Oe))return ie.findModeByMIME("application/json")},ie.findModeByExtension=function(Oe){Oe=Oe.toLowerCase();for(var pe=0;pe<ie.modeInfo.length;pe++){var ge=ie.modeInfo[pe];if(ge.ext){for(var Ie=0;Ie<ge.ext.length;Ie++)if(ge.ext[Ie]==Oe)return ge}}},ie.findModeByFileName=function(Oe){for(var pe=0;pe<ie.modeInfo.length;pe++){var ge=ie.modeInfo[pe];if(ge.file&&ge.file.test(Oe))return ge}var Ie=Oe.lastIndexOf("."),_e=Ie>-1&&Oe.substring(Ie+1,Oe.length);if(_e)return ie.findModeByExtension(_e)},ie.findModeByName=function(Oe){Oe=Oe.toLowerCase();for(var pe=0;pe<ie.modeInfo.length;pe++){var ge=ie.modeInfo[pe];if(ge.name.toLowerCase()==Oe)return ge;if(ge.alias){for(var Ie=0;Ie<ge.alias.length;Ie++)if(ge.alias[Ie].toLowerCase()==Oe)return ge}}}})},67549:function(jt,qt,he){(function(ie){ie(he(89780))})(function(ie){"use strict";ie.defineMode("stex",function(Ze,De){"use strict";function Oe(Fe,Me){Fe.cmdState.push(Me)}function pe(Fe){return Fe.cmdState.length>0?Fe.cmdState[Fe.cmdState.length-1]:null}function ge(Fe){var Me=Fe.cmdState.pop();Me&&Me.closeBracket()}function Ie(Fe){for(var Me=Fe.cmdState,Pe=Me.length-1;Pe>=0;Pe--){var Ee=Me[Pe];if(Ee.name!="DEFAULT")return Ee}return{styleIdentifier:function(){return null}}}function _e(Fe,Me,Pe){return function(){this.name=Fe,this.bracketNo=0,this.style=Me,this.styles=Pe,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=_e("importmodule","tag",["string","builtin"]),we.documentclass=_e("documentclass","tag",["","atom"]),we.usepackage=_e("usepackage","tag",["atom"]),we.begin=_e("begin","tag",["atom"]),we.end=_e("end","tag",["atom"]),we.label=_e("label","tag",["atom"]),we.ref=_e("ref","tag",["atom"]),we.eqref=_e("eqref","tag",["atom"]),we.cite=_e("cite","tag",["atom"]),we.bibitem=_e("bibitem","tag",["atom"]),we.Bibitem=_e("Bibitem","tag",["atom"]),we.RBibitem=_e("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(Fe,Me){Fe.f=Me}function $e(Fe,Me){var Pe;if(Fe.match(/^\\[a-zA-Z@]+/)){var Ee=Fe.current().slice(1);return Pe=we.hasOwnProperty(Ee)?we[Ee]:we.DEFAULT,Pe=new Pe,Oe(Me,Pe),fe(Me,ht),Pe.style}if(Fe.match(/^\\[$&%#{}_]/)||Fe.match(/^\\[,;!\/\\]/))return"tag";if(Fe.match("\\["))return fe(Me,function(ut,ft){return ve(ut,ft,"\\]")}),"keyword";if(Fe.match("\\("))return fe(Me,function(ut,ft){return ve(ut,ft,"\\)")}),"keyword";if(Fe.match("$$"))return fe(Me,function(ut,ft){return ve(ut,ft,"$$")}),"keyword";if(Fe.match("$"))return fe(Me,function(ut,ft){return ve(ut,ft,"$")}),"keyword";var nt=Fe.next();if(nt=="%")return Fe.skipToEnd(),"comment";if(nt=="}"||nt=="]"){if(Pe=pe(Me),Pe)Pe.closeBracket(nt),fe(Me,ht);else return"error";return"bracket"}else return nt=="{"||nt=="["?(Pe=we.DEFAULT,Pe=new Pe,Oe(Me,Pe),"bracket"):/\d/.test(nt)?(Fe.eatWhile(/[\w.%]/),"atom"):(Fe.eatWhile(/[\w\-_]/),Pe=Ie(Me),Pe.name=="begin"&&(Pe.argument=Fe.current()),Pe.styleIdentifier())}function ve(Fe,Me,Pe){if(Fe.eatSpace())return null;if(Pe&&Fe.match(Pe))return fe(Me,$e),"keyword";if(Fe.match(/^\\[a-zA-Z@]+/))return"tag";if(Fe.match(/^[a-zA-Z]+/))return"variable-2";if(Fe.match(/^\\[$&%#{}_]/)||Fe.match(/^\\[,;!\/]/)||Fe.match(/^[\^_&]/))return"tag";if(Fe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Fe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ee=Fe.next();return Ee=="{"||Ee=="}"||Ee=="["||Ee=="]"||Ee=="("||Ee==")"?"bracket":Ee=="%"?(Fe.skipToEnd(),"comment"):"error"}function ht(Fe,Me){var Pe=Fe.peek(),Ee;return Pe=="{"||Pe=="["?(Ee=pe(Me),Ee.openBracket(Pe),Fe.eat(Pe),fe(Me,$e),"bracket"):/[ \t\r]/.test(Pe)?(Fe.eat(Pe),null):(fe(Me,$e),ge(Me),$e(Fe,Me))}return{startState:function(){var Fe=De.inMathMode?function(Me,Pe){return ve(Me,Pe)}:$e;return{cmdState:[],f:Fe}},copyState:function(Fe){return{cmdState:Fe.cmdState.slice(),f:Fe.f}},token:function(Fe,Me){return Me.f(Fe,Me)},blankLine:function(Fe){Fe.f=$e,Fe.cmdState.length=0},lineComment:"%"}}),ie.defineMIME("text/x-stex","stex"),ie.defineMIME("text/x-latex","stex")})},15525:function(jt,qt,he){(function(ie){ie(he(89780))})(function(ie){"use strict";var Ze={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},De={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(Oe,pe){var ge=Oe.indentUnit,Ie={},_e=pe.htmlMode?Ze:De;for(var we in _e)Ie[we]=_e[we];for(var we in pe)Ie[we]=pe[we];var fe,$e;function ve(Le,Xe){function Be(Lt){return Xe.tokenize=Lt,Lt(Le,Xe)}var ot=Le.next();if(ot=="<")return Le.eat("!")?Le.eat("[")?Le.match("CDATA[")?Be(Me("atom","]]>")):null:Le.match("--")?Be(Me("comment","-->")):Le.match("DOCTYPE",!0,!0)?(Le.eatWhile(/[\w\._\-]/),Be(Pe(1))):null:Le.eat("?")?(Le.eatWhile(/[\w\._\-]/),Xe.tokenize=Me("meta","?>"),"meta"):(fe=Le.eat("/")?"closeTag":"openTag",Xe.tokenize=ht,"tag bracket");if(ot=="&"){var un;return Le.eat("#")?Le.eat("x")?un=Le.eatWhile(/[a-fA-F\d]/)&&Le.eat(";"):un=Le.eatWhile(/[\d]/)&&Le.eat(";"):un=Le.eatWhile(/[\w\.\-:]/)&&Le.eat(";"),un?"atom":"error"}else return Le.eatWhile(/[^&<]/),null}ve.isInText=!0;function ht(Le,Xe){var Be=Le.next();if(Be==">"||Be=="/"&&Le.eat(">"))return Xe.tokenize=ve,fe=Be==">"?"endTag":"selfcloseTag","tag bracket";if(Be=="=")return fe="equals",null;if(Be=="<"){Xe.tokenize=ve,Xe.state=ft,Xe.tagName=Xe.tagStart=null;var ot=Xe.tokenize(Le,Xe);return ot?ot+" tag error":"tag error"}else return/[\'\"]/.test(Be)?(Xe.tokenize=Fe(Be),Xe.stringStartCol=Le.column(),Xe.tokenize(Le,Xe)):(Le.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Fe(Le){var Xe=function(Be,ot){for(;!Be.eol();)if(Be.next()==Le){ot.tokenize=ht;break}return"string"};return Xe.isInAttribute=!0,Xe}function Me(Le,Xe){return function(Be,ot){for(;!Be.eol();){if(Be.match(Xe)){ot.tokenize=ve;break}Be.next()}return Le}}function Pe(Le){return function(Xe,Be){for(var ot;(ot=Xe.next())!=null;){if(ot=="<")return Be.tokenize=Pe(Le+1),Be.tokenize(Xe,Be);if(ot==">")if(Le==1){Be.tokenize=ve;break}else return Be.tokenize=Pe(Le-1),Be.tokenize(Xe,Be)}return"meta"}}function Ee(Le,Xe,Be){this.prev=Le.context,this.tagName=Xe,this.indent=Le.indented,this.startOfLine=Be,(Ie.doNotIndent.hasOwnProperty(Xe)||Le.context&&Le.context.noIndent)&&(this.noIndent=!0)}function nt(Le){Le.context&&(Le.context=Le.context.prev)}function ut(Le,Xe){for(var Be;;){if(!Le.context||(Be=Le.context.tagName,!Ie.contextGrabbers.hasOwnProperty(Be)||!Ie.contextGrabbers[Be].hasOwnProperty(Xe)))return;nt(Le)}}function ft(Le,Xe,Be){return Le=="openTag"?(Be.tagStart=Xe.column(),ct):Le=="closeTag"?et:ft}function ct(Le,Xe,Be){return Le=="word"?(Be.tagName=Xe.current(),$e="tag",Ut):Ie.allowMissingTagName&&Le=="endTag"?($e="tag bracket",Ut(Le,Xe,Be)):($e="error",ct)}function et(Le,Xe,Be){if(Le=="word"){var ot=Xe.current();return Be.context&&Be.context.tagName!=ot&&Ie.implicitlyClosed.hasOwnProperty(Be.context.tagName)&&nt(Be),Be.context&&Be.context.tagName==ot||Ie.matchClosing===!1?($e="tag",Ae):($e="tag error",it)}else return Ie.allowMissingTagName&&Le=="endTag"?($e="tag bracket",Ae(Le,Xe,Be)):($e="error",it)}function Ae(Le,Xe,Be){return Le!="endTag"?($e="error",Ae):(nt(Be),ft)}function it(Le,Xe,Be){return $e="error",Ae(Le,Xe,Be)}function Ut(Le,Xe,Be){if(Le=="word")return $e="attribute",Ye;if(Le=="endTag"||Le=="selfcloseTag"){var ot=Be.tagName,un=Be.tagStart;return Be.tagName=Be.tagStart=null,Le=="selfcloseTag"||Ie.autoSelfClosers.hasOwnProperty(ot)?ut(Be,ot):(ut(Be,ot),Be.context=new Ee(Be,ot,un==Be.indented)),ft}return $e="error",Ut}function Ye(Le,Xe,Be){return Le=="equals"?We:(Ie.allowMissing||($e="error"),Ut(Le,Xe,Be))}function We(Le,Xe,Be){return Le=="string"?Ct:Le=="word"&&Ie.allowUnquoted?($e="string",Ut):($e="error",Ut(Le,Xe,Be))}function Ct(Le,Xe,Be){return Le=="string"?Ct:Ut(Le,Xe,Be)}return{startState:function(Le){var Xe={tokenize:ve,state:ft,indented:Le||0,tagName:null,tagStart:null,context:null};return Le!=null&&(Xe.baseIndent=Le),Xe},token:function(Le,Xe){if(!Xe.tagName&&Le.sol()&&(Xe.indented=Le.indentation()),Le.eatSpace())return null;fe=null;var Be=Xe.tokenize(Le,Xe);return(Be||fe)&&Be!="comment"&&($e=null,Xe.state=Xe.state(fe||Be,Le,Xe),$e&&(Be=$e=="error"?Be+" error":$e)),Be},indent:function(Le,Xe,Be){var ot=Le.context;if(Le.tokenize.isInAttribute)return Le.tagStart==Le.indented?Le.stringStartCol+1:Le.indented+ge;if(ot&&ot.noIndent)return ie.Pass;if(Le.tokenize!=ht&&Le.tokenize!=ve)return Be?Be.match(/^(\s*)/)[0].length:0;if(Le.tagName)return Ie.multilineTagIndentPastTag!==!1?Le.tagStart+Le.tagName.length+2:Le.tagStart+ge*(Ie.multilineTagIndentFactor||1);if(Ie.alignCDATA&&/<!\[CDATA\[/.test(Xe))return 0;var un=Xe&&/^<(\/)?([\w_:\.-]*)/.exec(Xe);if(un&&un[1])for(;ot;)if(ot.tagName==un[2]){ot=ot.prev;break}else if(Ie.implicitlyClosed.hasOwnProperty(ot.tagName))ot=ot.prev;else break;else if(un)for(;ot;){var Lt=Ie.contextGrabbers[ot.tagName];if(Lt&&Lt.hasOwnProperty(un[2]))ot=ot.prev;else break}for(;ot&&ot.prev&&!ot.startOfLine;)ot=ot.prev;return ot?ot.indent+ge:Le.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ie.htmlMode?"html":"xml",helperType:Ie.htmlMode?"html":"xml",skipAttribute:function(Le){Le.state==We&&(Le.state=Ut)},xmlCurrentTag:function(Le){return Le.tagName?{name:Le.tagName,close:Le.type=="closeTag"}:null},xmlCurrentContext:function(Le){for(var Xe=[],Be=Le.context;Be;Be=Be.prev)Be.tagName&&Xe.push(Be.tagName);return Xe.reverse()}}}),ie.defineMIME("text/xml","xml"),ie.defineMIME("application/xml","xml"),ie.mimeModes.hasOwnProperty("text/html")||ie.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(jt,qt,he){"use strict";he.d(qt,{hP:function(){return Nt}});var ie=function(ae,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var se in oe)Object.prototype.hasOwnProperty.call(oe,se)&&(z[se]=oe[se])})(ae,te)};function Ze(ae,te){function z(){this.constructor=ae}ie(ae,te),ae.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function De(ae,te,z,oe){return new(z||(z=Promise))(function(se,ne){function be(It){try{Wt(oe.next(It))}catch(gt){ne(gt)}}function Ve(It){try{Wt(oe.throw(It))}catch(gt){ne(gt)}}function Wt(It){var gt;It.done?se(It.value):(gt=It.value,gt instanceof z?gt:new z(function(At){At(gt)})).then(be,Ve)}Wt((oe=oe.apply(ae,te||[])).next())})}function Oe(ae,te){var z,oe,se,ne,be={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return ne={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Ve(Wt){return function(It){return function(gt){if(z)throw new TypeError("Generator is already executing.");for(;be;)try{if(z=1,oe&&(se=2>[0]?oe.return:gt[0]?oe.throw||((se=oe.return)&&se.call(oe),0):oe.next)&&!(se=se.call(oe,gt[1])).done)return se;switch(oe=0,se&&(gt=[2>[0],se.value]),gt[0]){case 0:case 1:se=gt;break;case 4:return be.label++,{value:gt[1],done:!1};case 5:be.label++,oe=gt[1],gt=[0];continue;case 7:gt=be.ops.pop(),be.trys.pop();continue;default:if(se=be.trys,!((se=se.length>0&&se[se.length-1])||gt[0]!==6&>[0]!==2)){be=0;continue}if(gt[0]===3&&(!se||gt[1]>se[0]&>[1]<se[3])){be.label=gt[1];break}if(gt[0]===6&&be.label<se[1]){be.label=se[1],se=gt;break}if(se&&be.label<se[2]){be.label=se[2],be.ops.push(gt);break}se[2]&&be.ops.pop(),be.trys.pop();continue}gt=te.call(ae,be)}catch(At){gt=[6,At],oe=0}finally{z=se=0}if(5>[0])throw gt[1];return{value:gt[0]?gt[1]:void 0,done:!0}}([Wt,It])}}}function pe(){for(var ae=0,te=0,z=arguments.length;te<z;te++)ae+=arguments[te].length;var oe=Array(ae),se=0;for(te=0;te<z;te++)for(var ne=arguments[te],be=0,Ve=ne.length;be<Ve;be++,se++)oe[se]=ne[be];return oe}var ge=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(te,z){for(var oe=0,se=z;oe<se.length;oe++){var ne=se[oe],be=ne[0],Ve=ne[1];te.setAttribute(be,Ve)}},ae.createRect=function(te,z,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","rect");return se.setAttribute("width",te.toString()),se.setAttribute("height",z.toString()),oe&&ae.setAttributes(se,oe),se},ae.createLine=function(te,z,oe,se,ne){var be=document.createElementNS("http://www.w3.org/2000/svg","line");return be.setAttribute("x1",te.toString()),be.setAttribute("y1",z.toString()),be.setAttribute("x2",oe.toString()),be.setAttribute("y2",se.toString()),ne&&ae.setAttributes(be,ne),be},ae.createPolygon=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",te),z&&ae.setAttributes(oe,z),oe},ae.createCircle=function(te,z){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()),z&&ae.setAttributes(oe,z),oe},ae.createEllipse=function(te,z,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return se.setAttribute("cx",(te/2).toString()),se.setAttribute("cy",(z/2).toString()),se.setAttribute("rx",(te/2).toString()),se.setAttribute("ry",(z/2).toString()),oe&&ae.setAttributes(se,oe),se},ae.createGroup=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&ae.setAttributes(z,te),z},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(te,z,oe,se,ne,be,Ve){var Wt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Wt,[["id",te],["orient",z],["markerWidth",oe.toString()],["markerHeight",se.toString()],["refX",ne.toString()],["refY",be.toString()]]),Wt.appendChild(Ve),Wt},ae.createText=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),te&&ae.setAttributes(z,te),z},ae.createTSpan=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=te,z&&ae.setAttributes(oe,z),oe},ae.createImage=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&ae.setAttributes(z,te),z},ae.createPoint=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=te,oe.y=z,oe},ae.createPath=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",te),z&&ae.setAttributes(oe,z),oe},ae}(),Ie=function(){function ae(){}return ae.addKey=function(te){ae.key=te},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),_e=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(te,z,oe){var se=this;return new Promise(function(ne){var be=oe!==void 0?oe:document.createElement("canvas");te===null&&(se.markersOnly=!0,se.naturalSize=!1);var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("width",z.width.baseVal.valueAsString),Ve.setAttribute("height",z.height.baseVal.valueAsString),Ve.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Ve.innerHTML=z.innerHTML,se.naturalSize===!0?(Ve.width.baseVal.value=te.naturalWidth,Ve.height.baseVal.value=te.naturalHeight):se.width!==void 0&&se.height!==void 0&&(Ve.width.baseVal.value=se.width,Ve.height.baseVal.value=se.height),be.width=Ve.width.baseVal.value,be.height=Ve.height.baseVal.value;var Wt=Ve.outerHTML,It=be.getContext("2d");se.markersOnly!==!0&&It.drawImage(te,0,0,be.width,be.height);var gt=window.URL,At=new Image(be.width,be.height);At.setAttribute("crossOrigin","anonymous");var nn=new Blob([Wt],{type:"image/svg+xml"}),$t=gt.createObjectURL(nn);At.onload=function(){It.drawImage(At,0,0),gt.revokeObjectURL($t);var hn=be.toDataURL(se.imageType,se.imageQuality);ne(hn)},At.src=$t})},ae}(),we=function(){},fe=function(){function ae(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ae.prototype.addClass=function(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},ae.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)},ae.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 $e("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ve("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ve("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ae.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),$e=function(ae,te){this.selector=ae,this.style=te},ve=function(ae,te){this.localName=ae,this.style=te},ht=function(){function ae(te,z,oe,se,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=oe,this.uiStyleSettings=se,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ae.prototype.show=function(te){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var 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 be=document.createElement("div");be.className=""+z.toolbarButtonStyleClass.name,be.setAttribute("data-type-name",ne.typeName),be.innerHTML=ne.icon,be.addEventListener("click",function(){z.markerToolbarButtonClicked(be,ne)}),z.buttons.push(be),z.markerButtons.push(be)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var se=document.createElement("div");se.className=this.toolbarBlockStyleClass.name,se.style.whiteSpace="nowrap",se.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(se),this.addActionButton(se,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(se,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ae.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},ae.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<te||z===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},ae.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ae.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(z){z.className=z.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(te,z,oe){var se=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",oe),ne.addEventListener("click",function(){se.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)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ve("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ve("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("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 ve("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new $e("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new $e("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ae.prototype.markerToolbarButtonClicked=function(te,z){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(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)},ae.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},ae.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){z.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},ae}(),Fe=function(){function ae(te,z,oe,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=oe,this.styles=se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new ve("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new ve("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ve("toolbox-panel-row_colors",`
|
|
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
padding: `+z+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new $e("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new $e("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ae.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(te){var z,oe,se=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((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 be;ne.uiStyleSettings=se.uiStyleSettings;var Ve=document.createElement("div");Ve.className=se.toolboxButtonStyleClass.name+" "+((be=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&be!==void 0?be:se.toolboxButtonStyleColorsClass.name),Ve.innerHTML=ne.icon,Ve.title=ne.title,Ve.addEventListener("click",function(){se.panelButtonClick(ne)}),se.panelButtons.push(Ve),se.buttonRow.appendChild(Ve)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(te){var z=this,oe=-1;if(te!==this.activePanel){oe=this.panels.indexOf(te),this.panelRow.innerHTML="";var se=te.getUi();se.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(se),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,be){var Ve,Wt;ne.className=z.toolboxButtonStyleClass.name+" "+(be===oe?""+((Ve=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:z.toolboxActiveButtonStyleColorsClass.name):""+((Wt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Wt!==void 0?Wt:z.toolboxButtonStyleColorsClass.name))})},ae}(),Me=function(ae,te){this.title=ae,this.icon=te},Pe=function(ae){function te(z,oe,se,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return be.colors=[],be.addTransparent=!1,be.colorBoxes=[],be.colors=oe,be.currentColor=se,be.setCurrentColor=be.setCurrentColor.bind(be),be.getColorBox=be.getColorBox.bind(be),be}return Ze(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(se){var ne=z.getColorBox(se);oe.appendChild(ne),z.colorBoxes.push(ne)}),oe},te.prototype.getColorBox=function(z){var oe=this,se=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-se,be=document.createElement("div");be.style.display="inline-block",be.style.boxSizing="content-box",be.style.width=ne-2+"px",be.style.height=ne-2+"px",be.style.padding="1px",be.style.marginRight="2px",be.style.marginBottom="2px",be.style.borderWidth="2px",be.style.borderStyle="solid",be.style.borderRadius=(ne+2)/2+"px",be.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",be.addEventListener("click",function(){oe.setCurrentColor(z,be)});var Ve=document.createElement("div");return Ve.style.display="inline-block",Ve.style.width=ne-2+"px",Ve.style.height=ne-2+"px",Ve.style.backgroundColor=z,Ve.style.borderRadius=ne/2+"px",z==="transparent"&&(Ve.style.fill=this.uiStyleSettings.toolboxAccentColor,Ve.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),be.appendChild(Ve),be},te.prototype.setCurrentColor=function(z,oe){var se=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(Me),Ee=function(){function ae(te,z,oe){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(te){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(te,z){},ae.prototype.dblClick=function(te,z){},ae.prototype.manipulate=function(te){},ae.prototype.pointerUp=function(te){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},ae.prototype.scale=function(te,z){},ae.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},ae.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},ae.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)}},ae.typeName="MarkerBase",ae}(),nt=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.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},ae}(),ut=function(){function ae(){this.GRIP_SIZE=10,this.visual=ge.createGroup(),this.visual.appendChild(ge.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ge.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},ae}(),ft=function(){function ae(){}return ae.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},ae.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},ae}(),ct=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(ge.createTransform()),ne.setupControlBox(),ne}return Ze(te,ae),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var oe=ge.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var se=this.unrotatePoint(z);if(this.manipulationStartX=se.x,this.manipulationStartY=se.y,this.offsetX=se.x-this.left,this.offsetY=se.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var be=this.container.transform.baseVal.getItem(0);be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(be,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var oe=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var oe=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var oe=this.manipulationStartLeft,se=this.manipulationStartWidth,ne=this.manipulationStartTop,be=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+z.x-this.manipulationStartX,se=this.manipulationStartWidth+this.manipulationStartLeft-oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:se=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,be=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:be=this.manipulationStartHeight+z.y-this.manipulationStartY}se>=0?(this.left=oe,this.width=se):(this.left=oe+se,this.width=-se),be>=0?(this.top=ne,this.height=be):(this.top=ne+be,this.height=-be),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var oe=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM(),se=ge.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(oe)).x,y:se.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM();oe=oe.inverse();var se=ge.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(oe)).x,y:se.y}},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup();var z=ge.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ge.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ge.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new nt,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var z=new ut;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,oe=-z/2,se=oe,ne=(this.width+this.CB_DISTANCE)/2-z/2,be=(this.height+this.CB_DISTANCE)/2-z/2,Ve=this.height+this.CB_DISTANCE-z/2,Wt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,se),this.positionGrip(this.controlGrips.topCenter.visual,ne,se),this.positionGrip(this.controlGrips.topRight.visual,Wt,se),this.positionGrip(this.controlGrips.centerLeft.visual,oe,be),this.positionGrip(this.controlGrips.centerRight.visual,Wt,be),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,Ve),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Ve),this.positionGrip(this.controlGrips.bottomRight.visual,Wt,Ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,se-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,oe,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(oe,se),z.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ft.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ft.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe);var se=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:se.x*z,y:se.y*oe});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*oe,this.adjustControlBox()},te}(Ee),et=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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 Ze(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.setSize()},te.title="Rectangle marker",te}(ct),Ae=function(ae){function te(z,oe,se,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return be.widths=[],be.widthBoxes=[],be.widths=oe,be.currentWidth=se,be.setCurrentWidth=be.setCurrentWidth.bind(be),be}return Ze(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(se){var 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=se===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(se,ne)}),oe.appendChild(ne);var be=document.createElement("div");be.innerText=se.toString(),be.style.marginRight="5px",ne.appendChild(be);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.display="flex",Ve.style.alignItems="center";var Wt=document.createElement("hr");Wt.style.minWidth="20px",Wt.style.border="0px",Wt.style.borderTop=se+"px solid "+z.uiStyleSettings.toolboxColor,Wt.style.flexGrow="2",Ve.appendChild(Wt),ne.appendChild(Ve),z.widthBoxes.push(ne)}),oe},te.prototype.setCurrentWidth=function(z,oe){var se=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Me),it=function(ae){function te(z,oe,se,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return be.styles=[],be.styleBoxes=[],be.styles=oe,be.currentStyle=se,be.setCurrentStyle=be.setCurrentStyle.bind(be),be}return Ze(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(se){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.styles.length-5+"%",ne.style.borderColor=se===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(se,ne)}),oe.appendChild(ne);var be=document.createElement("div");be.style.minHeight="20px",be.style.flexGrow="2",be.style.overflow="hidden";var Ve=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(se!==""?'stroke-dasharray="'+se+'"':"")+` />
|
|
</svg>`;be.innerHTML=Ve,ne.appendChild(be),z.styleBoxes.push(ne)}),oe},te.prototype.setCurrentStyle=function(z,oe){var se=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Me),Ut=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||this;return ne.strokeColor=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Pe("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ae("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ze(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(et),Ye=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},We=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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 Ze(te,ae),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var oe=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var z=new ut;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,oe,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(oe,se),z.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.x1=this.x1*z,this.y1=this.y1*oe,this.x2=this.x2*z,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},te}(Ee),Ct=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Pe("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ae("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,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()),ge.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(We),Le=function(ae){function te(z,oe,se,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return be.fonts=[],be.fontBoxes=[],be.fonts=oe,be.currentFont=se,be.setCurrentFont=be.setCurrentFont.bind(be),be}return Ze(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(se){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.fonts.length-5+"%",ne.style.borderColor=se===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(se,ne)}),oe.appendChild(ne);var be=document.createElement("div");be.style.display="flex",be.style.minHeight="20px",be.style.flexGrow="2",be.style.fontFamily=se,be.style.overflow="hidden";var Ve=document.createElement("div");Ve.style.whiteSpace="nowrap",Ve.style.overflow="hidden",Ve.style.textOverflow="ellipsis",Ve.innerHTML="The quick brown fox jumps over the lazy dog",be.appendChild(Ve),ne.appendChild(be),z.fontBoxes.push(ne)}),oe},te.prototype.setCurrentFont=function(z,oe){var se=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Me),Xe=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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=se.defaultColor,ne.fontFamily=se.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 Pe("Color",se.defaultColorSet,se.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Le("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){if(ae.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(se){se===z&&(oe=!0)}),oe},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.bgRectangle=ge.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ge.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(oe){z.textElement.appendChild(ge.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),oe=1;if(z.width>0&&z.height>0){var se=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;oe=Math.min(se,ne)}return oe},te.prototype.getTextPosition=function(z){var oe=this.textElement.getBBox(),se=0,ne=0;return oe.width>0&&oe.height>0&&(se=(this.width-oe.width*z)/2,ne=this.height/2-oe.height*z/2),{x:se,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),oe=this.getTextScale(),se=this.getTextPosition(oe);se.y-=z.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,z),this.setSize(),(oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,z.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var se=oe.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(se)),oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),se=this.textElement.getBBox(),ne={x:se.width*z,y:se.height*z};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*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},te.prototype.dblClick=function(z,oe){ae.prototype.dblClick.call(this,z,oe),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&ge.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&ge.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,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}(ct),Be=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=se.defaultColor,ne.lineWidth=se.defaultStrokeWidth,ne.pixelRatio=se.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 Pe("Color",se.defaultColorSet,se.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Ae("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.drawingImage=ge.createImage(),this.visual.appendChild(this.drawingImage);var z=ge.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,oe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):ae.prototype.pointerDown.call(this,z,oe)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,z)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],se=oe[0],ne=oe[1],be=oe[2],Ve=oe[3],Wt=!1,It=0;It<this.canvasElement.height;It++)for(var gt=0;gt<this.canvasElement.width;gt++)z.data[It*this.canvasElement.width*4+4*gt+3]>0&&(Wt=!0,It<ne&&(ne=It),gt<se&&(se=gt),It>Ve&&(Ve=It),gt>be&&(be=gt));if(Wt){this.left=se/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(be-se)/this.pixelRatio,this.height=(Ve-ne)/this.pixelRatio;var At=document.createElement("canvas");At.width=be-se,At.height=Ve-ne,At.getContext("2d").putImageData(this.canvasContext.getImageData(se,ne,be-se,Ve-ne),0,0),this.drawingImgUrl=At.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),ae.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,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}(ct),ot=function(ae){function te(z,oe,se){var ne=ae.call(this,z,se||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=oe,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Ze(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var se=function(Ve){var Wt="both";switch(Ve){case 0:Wt="both";break;case 1:Wt="start";break;case 2:Wt="end";break;case 3:Wt="none"}var It=document.createElement("div");if(It.style.display="flex",It.style.flexGrow="2",It.style.alignItems="center",It.style.justifyContent="space-between",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.borderColor=Wt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){z.setCurrentType(Wt,It)}),oe.appendChild(It),Wt==="both"||Wt==="start"){var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,gt.style.marginLeft="5px",It.appendChild(gt)}var At=document.createElement("div");At.style.display="flex",At.style.alignItems="center",At.style.minHeight="20px",At.style.flexGrow="2";var nn=document.createElement("hr");if(nn.style.minWidth="20px",nn.style.border="0px",nn.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),nn.style.flexGrow="2",At.appendChild(nn),It.appendChild(At),Wt==="both"||Wt==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.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>`,$t.style.marginRight="5px",It.appendChild($t)}ne.typeBoxes.push(It)},ne=this,be=0;be<4;be++)se(be);return oe},te.prototype.setCurrentType=function(z,oe){var se=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Me),un=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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 ot("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,oe){var se=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-se/2+","+(oe+ne/2)+" "+z+","+(oe-ne/2)+" "+(z+se/2)+","+(oe+ne/2)},te.prototype.createTips=function(){this.arrow1=ge.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ge.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ge.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ge.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;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}(Ct),Lt=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||this;return ne.fillColor=se.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Pe("Color",se.defaultColorSet,se.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Ze(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(et),Dn=function(ae){function te(z,oe,se,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return be.opacities=[],be.opacityBoxes=[],be.opacities=oe,be.currentOpacity=se,be.setCurrentOpacity=be.setCurrentOpacity.bind(be),be}return Ze(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(se){var 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=se===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(se,ne)}),oe.appendChild(ne);var be=document.createElement("div");be.innerText=100*se+"%",ne.appendChild(be),z.opacityBoxes.push(ne)}),oe},te.prototype.setCurrentOpacity=function(z,oe){var se=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Me),ln=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=se.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=se.defaultHighlightOpacity,ne.fillPanel=new Pe("Color",se.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Dn("Opacity",se.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Ze(te,ae),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',te}(Lt),me='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',de='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',mt=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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=se.defaultStrokeColor,ne.bgColor=se.defaultFillColor,ne.fontFamily=se.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 Pe("Text color",se.defaultColorSet,ne.color,me),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Pe("Fill color",se.defaultColorSet,ne.bgColor,de),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Le("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new ut,ne.tipGrip.visual.transform.baseVal.appendItem(ge.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){return ae.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},te.prototype.createTip=function(){ge.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ge.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,oe){this.state==="new"&&ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,z,oe)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,z);else{var oe=this.state==="creating";ae.prototype.pointerUp.call(this,z),this.setTipPoints(oe),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var oe=this.unrotatePoint(z);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ge.setAttributes(this.bgRectangle,[["fill",z]]),ge.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var oe=Math.min(this.height/2,15),se=this.height/5;z&&(this.tipPosition={x:oe+se/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))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+se,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-se,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-se,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-se},this.tipBase2Position={x:this.width,y:this.height-oe}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+se,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-se})},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.positionTip()},te.prototype.positionTip=function(){ge.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),ae.prototype.select.call(this)},te.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,ae.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*oe},this.positionTip()},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}(Xe),sn=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.fillColor=se.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 Pe("Line color",pe(se.defaultColorSet,["transparent"]),se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Pe("Fill color",pe(se.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ae("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Dn("Opacity",se.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ge.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,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}(ct),Rt=function(ae){function te(z,oe,se){return ae.call(this,z,oe,se)||this}return Ze(te,ae),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},te.prototype.createTips=function(){this.tip1=ge.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ge.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ge.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,0);var se=this.tip2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(se,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',te}(Ct),Re=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||this;return ne.strokePanel.colors=se.defaultColorSet,ne.fillColor="transparent",ne}return Ze(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(sn),tt=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(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))},ae.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),rt=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Pe("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ae("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorCurve=ge.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ge.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ge.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=ge.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ge.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),ae.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,oe){this.curveX=this.curveX*z,this.curveY=this.curveY*oe,ae.prototype.scale.call(this,z,oe)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.curveY,this.createVisual(),this.adjustVisual()},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}(We),dn=function(ae){function te(z,oe,se){var ne=ae.call(this,z,oe,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.fillColor=se.defaultFillColor,ne.textColor=se.defaultStrokeColor,ne.fontFamily=se.defaultFontFamily,ne.fontSize=se.defaultCaptionFontSize,ne.captionText=se.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 Pe("Line color",pe(se.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Pe("Fill color",pe(se.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ae("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Le("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Pe("Text color",se.defaultColorSet,ne.textColor,me),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Ze(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ge.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ge.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=ge.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ge.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),ge.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ge.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,oe){ae.prototype.dblClick.call(this,z,oe),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ge.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ge.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ge.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ge.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},ae.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,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}(ct),bt=function(){function ae(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),Jt=function(ae){function te(z,oe,se){var ne=ae.call(this,z,!1)||this;return ne.dataUrl=oe,ne.state=se,ne}return Ze(te,ae),te}(bt),He=function(ae){function te(z,oe,se){se===void 0&&(se=!1);var ne=ae.call(this,z,se)||this;return ne.marker=oe,ne}return Ze(te,ae),te}(bt),Tt=function(){function ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ae.prototype.addEventListener=function(te,z){this[te].push(z)},ae.prototype.removeEventListener=function(te,z){var oe=this[te].indexOf(z);oe>-1&&this[te].splice(oe,1)},ae}(),Nt=function(){function ae(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 Ye,this._isOpen=!1,this.undoRedoManager=new tt,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 Tt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ut,Be,un,Xe,Re,sn,ln,mt,Rt,Lt,Ct,rt,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ut,Be,un,Xe,sn,ln,mt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ut,Be,un,Xe,ln]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(oe){if(typeof oe=="string"){var se=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===oe});se!==void 0&&z._availableMarkerTypes.push(se)}else z._availableMarkerTypes.push(oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(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(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new bt(te))})},ae.prototype.render=function(){return De(this,void 0,void 0,function(){var te;return Oe(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new _e).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},ae.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var oe=!1;te||this.eventListeners.beforeclose.forEach(function(se){var ne=new bt(z,!0);se(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(se){return se(new bt(z))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var te,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];(te=this._availableMarkerTypes).push.apply(te,z)},ae.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(z){te(z.dataUrl,z.state)})},ae.prototype.removeRenderEventListener=function(te){},ae.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},ae.prototype.removeCloseEventListener=function(te){},ae.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))},ae.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,oe=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(z,oe)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(te,z){this._isResizing=!0;var oe=te/this.imageWidth,se=z/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(z),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(oe,se),this._isResizing=!1},ae.prototype.scaleMarkers=function(te,z){var oe,se=this;this._currentMarker&&this._currentMarker instanceof Xe?this._currentMarker.scale(te,z):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==se._currentMarker&&ne.scale(te,z)}),oe!==void 0&&this.setCurrentMarker(oe)},ae.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ae.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=te.left-z.left,this.top=te.top-z.top},ae.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ae.prototype.addDefs=function(){for(var te,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];this.defs=ge.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,z)},ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ae.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ae.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ae.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ae.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var 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()},ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var 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 ht(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 Fe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ae.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ae.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var ne=new He(te,te._currentMarker,!0);se(ne),ne.defaultPrevented&&(z=!0)}),!z){var oe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(se){return se(new He(te,oe))})}}},ae.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(be){var Ve=new He(te,void 0,!0);be(Ve),Ve.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var oe=function(be){var Ve=se.markers[be];se.setCurrentMarker(se.markers[be]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(Wt){return Wt(new He(te,Ve))})},se=this,ne=this.markers.length-1;ne>=0;ne--)oe(ne);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.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))},ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===z.width&&oe.height===z.height){var se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new bt(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new bt(te))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var te=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new bt(te))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var te=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new bt(te))}))},ae.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},ae.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},ae.prototype.startRenderAndClose=function(){return De(this,void 0,void 0,function(){var te,z,oe=this;return Oe(this,function(se){switch(se.label){case 0:return[4,this.render()];case 1:return te=se.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Jt(oe,te,z))}),this.close(!0),[2]}})})},ae.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return z.markers.push(oe.getState())}),z},ae.prototype.restoreState=function(te){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(oe){var se=z._availableMarkerTypes.find(function(be){return be.typeName===oe.typeName});if(se!==void 0){var ne=z.addNewMarker(se);ne.restoreState(oe),z.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(oe){return oe(new bt(z))})},ae.prototype.addNewMarker=function(te){var z=ge.createGroup();return this.markerImage.appendChild(z),new te(z,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(te){var z,oe=this;(z=typeof te=="string"?this._availableMarkerTypes.find(function(se){return se.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(se){return se(new He(oe,oe._currentMarker))}))},ae.prototype.markerCreated=function(te){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof Be&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Be):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new He(z,z._currentMarker))})},ae.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},ae.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},ae.prototype.markerStateChanged=function(te){var z=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new He(z,te))})},ae.prototype.setCurrentMarker=function(te){var z=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(oe){return oe(new He(z,z._currentMarker))})),this._currentMarker=te,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(oe){return oe(new He(z,z._currentMarker))}))},ae.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(oe){return oe.ownsTarget(te.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},ae.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(oe){return oe.ownsTarget(te.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},ae.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}))},ae.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()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(te,z){var oe=this.markerImage.getBoundingClientRect();return{x:(te-oe.left)/this.zoomLevel,y:(z-oe.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var 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()},ae.prototype.addLicenseKey=function(te){Ie.addKey(te)},ae.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},ae.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},ae.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(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new bt(te))}))},ae.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new bt(te))}))},ae.instanceCounter=0,ae}()},66042:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return Xe}});var ie=he(33885),Ze=he(42978),De=he(43403),Oe=he(34280),pe=he(59301),ge=pe.createContext(null),Ie=pe.createContext({}),_e=ge,we=he(20068),fe=he(54476),$e=he(92310),ve=he.n($e),ht=he(77900),Fe=he(10228),Me=he(26112),Pe=he(75931),Ee=he(8654),nt=["prefixCls","className","containerRef"],ut=function(ot){var un=ot.prefixCls,Lt=ot.className,Dn=ot.containerRef,ln=(0,Pe.Z)(ot,nt),me=pe.useContext(Ie),de=me.panel,mt=(0,Ee.x1)(de,Dn);return pe.createElement("div",(0,fe.Z)({className:ve()("".concat(un,"-content"),Lt),role:"dialog",ref:mt},(0,Me.Z)(ot,{aria:!0}),{"aria-modal":"true"},ln))},ft=ut,ct=he(48736);function et(Be){return typeof Be=="string"&&String(Number(Be))===Be?((0,ct.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Be)):Be}function Ae(Be){warning(!("wrapperClassName"in Be),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Be.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var it={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ut(Be,ot){var un,Lt,Dn,ln=Be.prefixCls,me=Be.open,de=Be.placement,mt=Be.inline,sn=Be.push,Rt=Be.forceRender,Re=Be.autoFocus,tt=Be.keyboard,rt=Be.classNames,dn=Be.rootClassName,bt=Be.rootStyle,Jt=Be.zIndex,He=Be.className,Tt=Be.id,Nt=Be.style,ae=Be.motion,te=Be.width,z=Be.height,oe=Be.children,se=Be.mask,ne=Be.maskClosable,be=Be.maskMotion,Ve=Be.maskClassName,Wt=Be.maskStyle,It=Be.afterOpenChange,gt=Be.onClose,At=Be.onMouseEnter,nn=Be.onMouseOver,$t=Be.onMouseLeave,hn=Be.onClick,at=Be.onKeyDown,xe=Be.onKeyUp,yt=Be.styles,xt=Be.drawerRender,Dt=pe.useRef(),Ne=pe.useRef(),Zt=pe.useRef();pe.useImperativeHandle(ot,function(){return Dt.current});var pt=function(Qe){var Ge=Qe.keyCode,Mt=Qe.shiftKey;switch(Ge){case Fe.Z.TAB:{if(Ge===Fe.Z.TAB){if(!Mt&&document.activeElement===Zt.current){var Et;(Et=Ne.current)===null||Et===void 0||Et.focus({preventScroll:!0})}else if(Mt&&document.activeElement===Ne.current){var Bt;(Bt=Zt.current)===null||Bt===void 0||Bt.focus({preventScroll:!0})}}break}case Fe.Z.ESC:{gt&&tt&&(Qe.stopPropagation(),gt(Qe));break}}};pe.useEffect(function(){if(me&&Re){var Je;(Je=Dt.current)===null||Je===void 0||Je.focus({preventScroll:!0})}},[me]);var St=pe.useState(!1),Ft=(0,Ze.Z)(St,2),xn=Ft[0],_t=Ft[1],Cn=pe.useContext(_e),Tn;typeof sn=="boolean"?Tn=sn?{}:{distance:0}:Tn=sn||{};var Mn=(un=(Lt=(Dn=Tn)===null||Dn===void 0?void 0:Dn.distance)!==null&&Lt!==void 0?Lt:Cn==null?void 0:Cn.pushDistance)!==null&&un!==void 0?un:180,qn=pe.useMemo(function(){return{pushDistance:Mn,push:function(){_t(!0)},pull:function(){_t(!1)}}},[Mn]);pe.useEffect(function(){if(me){var Je;Cn==null||(Je=Cn.push)===null||Je===void 0||Je.call(Cn)}else{var Qe;Cn==null||(Qe=Cn.pull)===null||Qe===void 0||Qe.call(Cn)}},[me]),pe.useEffect(function(){return function(){var Je;Cn==null||(Je=Cn.pull)===null||Je===void 0||Je.call(Cn)}},[]);var $n=se&&pe.createElement(ht.default,(0,fe.Z)({key:"mask"},be,{visible:me}),function(Je,Qe){var Ge=Je.className,Mt=Je.style;return pe.createElement("div",{className:ve()("".concat(ln,"-mask"),Ge,rt==null?void 0:rt.mask,Ve),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},Mt),Wt),yt==null?void 0:yt.mask),onClick:ne&&me?gt:void 0,ref:Qe})}),Nn=typeof ae=="function"?ae(de):ae,Un={};if(xn&&Mn)switch(de){case"top":Un.transform="translateY(".concat(Mn,"px)");break;case"bottom":Un.transform="translateY(".concat(-Mn,"px)");break;case"left":Un.transform="translateX(".concat(Mn,"px)");break;default:Un.transform="translateX(".concat(-Mn,"px)");break}de==="left"||de==="right"?Un.width=et(te):Un.height=et(z);var Rn={onMouseEnter:At,onMouseOver:nn,onMouseLeave:$t,onClick:hn,onKeyDown:at,onKeyUp:xe},Fn=pe.createElement(ht.default,(0,fe.Z)({key:"panel"},Nn,{visible:me,forceRender:Rt,onVisibleChanged:function(Qe){It==null||It(Qe)},removeOnLeave:!1,leavedClassName:"".concat(ln,"-content-wrapper-hidden")}),function(Je,Qe){var Ge=Je.className,Mt=Je.style,Et=pe.createElement(ft,(0,fe.Z)({id:Tt,containerRef:Qe,prefixCls:ln,className:ve()(He,rt==null?void 0:rt.content),style:(0,ie.Z)((0,ie.Z)({},Nt),yt==null?void 0:yt.content)},(0,Me.Z)(Be,{aria:!0}),Rn),oe);return pe.createElement("div",(0,fe.Z)({className:ve()("".concat(ln,"-content-wrapper"),rt==null?void 0:rt.wrapper,Ge),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},Un),Mt),yt==null?void 0:yt.wrapper)},(0,Me.Z)(Be,{data:!0})),xt?xt(Et):Et)}),Sn=(0,ie.Z)({},bt);return Jt&&(Sn.zIndex=Jt),pe.createElement(_e.Provider,{value:qn},pe.createElement("div",{className:ve()(ln,"".concat(ln,"-").concat(de),dn,(0,we.Z)((0,we.Z)({},"".concat(ln,"-open"),me),"".concat(ln,"-inline"),mt)),style:Sn,tabIndex:-1,ref:Dt,onKeyDown:pt},$n,pe.createElement("div",{tabIndex:0,ref:Ne,style:it,"aria-hidden":"true","data-sentinel":"start"}),Fn,pe.createElement("div",{tabIndex:0,ref:Zt,style:it,"aria-hidden":"true","data-sentinel":"end"})))}var Ye=pe.forwardRef(Ut),We=Ye,Ct=function(ot){var un=ot.open,Lt=un===void 0?!1:un,Dn=ot.prefixCls,ln=Dn===void 0?"rc-drawer":Dn,me=ot.placement,de=me===void 0?"right":me,mt=ot.autoFocus,sn=mt===void 0?!0:mt,Rt=ot.keyboard,Re=Rt===void 0?!0:Rt,tt=ot.width,rt=tt===void 0?378:tt,dn=ot.mask,bt=dn===void 0?!0:dn,Jt=ot.maskClosable,He=Jt===void 0?!0:Jt,Tt=ot.getContainer,Nt=ot.forceRender,ae=ot.afterOpenChange,te=ot.destroyOnClose,z=ot.onMouseEnter,oe=ot.onMouseOver,se=ot.onMouseLeave,ne=ot.onClick,be=ot.onKeyDown,Ve=ot.onKeyUp,Wt=ot.panelRef,It=pe.useState(!1),gt=(0,Ze.Z)(It,2),At=gt[0],nn=gt[1],$t=pe.useState(!1),hn=(0,Ze.Z)($t,2),at=hn[0],xe=hn[1];(0,Oe.Z)(function(){xe(!0)},[]);var yt=at?Lt:!1,xt=pe.useRef(),Dt=pe.useRef();(0,Oe.Z)(function(){yt&&(Dt.current=document.activeElement)},[yt]);var Ne=function(xn){var _t;if(nn(xn),ae==null||ae(xn),!xn&&Dt.current&&!((_t=xt.current)!==null&&_t!==void 0&&_t.contains(Dt.current))){var Cn;(Cn=Dt.current)===null||Cn===void 0||Cn.focus({preventScroll:!0})}},Zt=pe.useMemo(function(){return{panel:Wt}},[Wt]);if(!Nt&&!At&&!yt&&te)return null;var pt={onMouseEnter:z,onMouseOver:oe,onMouseLeave:se,onClick:ne,onKeyDown:be,onKeyUp:Ve},St=(0,ie.Z)((0,ie.Z)({},ot),{},{open:yt,prefixCls:ln,placement:de,autoFocus:sn,keyboard:Re,width:rt,mask:bt,maskClosable:He,inline:Tt===!1,afterOpenChange:Ne,ref:xt},pt);return pe.createElement(Ie.Provider,{value:Zt},pe.createElement(De.Z,{open:yt||Nt||At,autoDestroy:!1,getContainer:Tt,autoLock:bt&&(yt||At)},pe.createElement(We,St)))},Le=Ct,Xe=Le},91574:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return hn}});var ie=he(54476),Ze=he(33885),De=he(20068),Oe=he(42978),pe=he(76190),ge=he(75931),Ie=he(92310),_e=he.n(Ie),we=/margin|padding|width|height|max|min|offset/,fe={left:!0,top:!0},$e={cssFloat:1,styleFloat:1,float:1};function ve(at){return at.nodeType===1?at.ownerDocument.defaultView.getComputedStyle(at,null):{}}function ht(at,xe,yt){if(xe=xe.toLowerCase(),yt==="auto"){if(xe==="height")return at.offsetHeight;if(xe==="width")return at.offsetWidth}return xe in fe||(fe[xe]=we.test(xe)),fe[xe]?parseFloat(yt)||0:yt}function Fe(at,xe){var yt=arguments.length,xt=ve(at);return xe=$e[xe]?"cssFloat"in at.style?"cssFloat":"styleFloat":xe,yt===1?xt:ht(at,xe,xt[xe]||at.style[xe])}function Me(at,xe,yt){var xt=arguments.length;if(xe=$e[xe]?"cssFloat"in at.style?"cssFloat":"styleFloat":xe,xt===3)return typeof yt=="number"&&we.test(xe)&&(yt="".concat(yt,"px")),at.style[xe]=yt,yt;for(var Dt in xe)xe.hasOwnProperty(Dt)&&Me(at,Dt,xe[Dt]);return ve(at)}function Pe(at){return at===document.body?document.documentElement.clientWidth:at.offsetWidth}function Ee(at){return at===document.body?window.innerHeight||document.documentElement.clientHeight:at.offsetHeight}function nt(){var at=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),xe=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:at,height:xe}}function ut(){var at=document.documentElement.clientWidth,xe=window.innerHeight||document.documentElement.clientHeight;return{width:at,height:xe}}function ft(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function ct(at){var xe=at.getBoundingClientRect(),yt=document.documentElement;return{left:xe.left+(window.pageXOffset||yt.scrollLeft)-(yt.clientLeft||document.body.clientLeft||0),top:xe.top+(window.pageYOffset||yt.scrollTop)-(yt.clientTop||document.body.clientTop||0)}}var et=he(18929),Ae=he(59301),it=he(55311),Ut=he(8224),Ye=he(10228),We=he(43403),Ct=he(77900),Le=Ae.createContext(null),Xe=function(xe){var yt=xe.visible,xt=xe.maskTransitionName,Dt=xe.getContainer,Ne=xe.prefixCls,Zt=xe.rootClassName,pt=xe.icons,St=xe.countRender,Ft=xe.showSwitch,xn=xe.showProgress,_t=xe.current,Cn=xe.transform,Tn=xe.count,Mn=xe.scale,qn=xe.minScale,$n=xe.maxScale,Nn=xe.closeIcon,Un=xe.onActive,Rn=xe.onClose,Fn=xe.onZoomIn,Sn=xe.onZoomOut,Je=xe.onRotateRight,Qe=xe.onRotateLeft,Ge=xe.onFlipX,Mt=xe.onFlipY,Et=xe.onReset,Bt=xe.toolbarRender,rn=xe.zIndex,Yt=xe.image,Qt=(0,Ae.useContext)(Le),wn=pt.rotateLeft,In=pt.rotateRight,kn=pt.zoomIn,cn=pt.zoomOut,On=pt.close,qe=pt.left,je=pt.right,Ot=pt.flipX,Ln=pt.flipY,zn="".concat(Ne,"-operations-operation");Ae.useEffect(function(){var st=function(Ht){Ht.keyCode===Ye.Z.ESC&&Rn()};return yt&&window.addEventListener("keydown",st),function(){window.removeEventListener("keydown",st)}},[yt]);var Ce=function(Ke,Ht){Ke.preventDefault(),Ke.stopPropagation(),Un(Ht)},Se=Ae.useCallback(function(st){var Ke=st.type,Ht=st.disabled,yn=st.onClick,fn=st.icon;return Ae.createElement("div",{key:Ke,className:_e()(zn,"".concat(Ne,"-operations-operation-").concat(Ke),(0,De.Z)({},"".concat(Ne,"-operations-operation-disabled"),!!Ht)),onClick:yn},fn)},[zn,Ne]),Pt=Ft?Se({icon:qe,onClick:function(Ke){return Ce(Ke,-1)},type:"prev",disabled:_t===0}):void 0,dt=Ft?Se({icon:je,onClick:function(Ke){return Ce(Ke,1)},type:"next",disabled:_t===Tn-1}):void 0,Te=Se({icon:Ln,onClick:Mt,type:"flipY"}),lt=Se({icon:Ot,onClick:Ge,type:"flipX"}),wt=Se({icon:wn,onClick:Qe,type:"rotateLeft"}),Xt=Se({icon:In,onClick:Je,type:"rotateRight"}),an=Se({icon:cn,onClick:Sn,type:"zoomOut",disabled:Mn<=qn}),vt=Se({icon:kn,onClick:Fn,type:"zoomIn",disabled:Mn===$n}),Gt=Ae.createElement("div",{className:"".concat(Ne,"-operations")},Te,lt,wt,Xt,an,vt);return Ae.createElement(Ct.default,{visible:yt,motionName:xt},function(st){var Ke=st.className,Ht=st.style;return Ae.createElement(We.Z,{open:!0,getContainer:Dt!=null?Dt:document.body},Ae.createElement("div",{className:_e()("".concat(Ne,"-operations-wrapper"),Ke,Zt),style:(0,Ze.Z)((0,Ze.Z)({},Ht),{},{zIndex:rn})},Nn===null?null:Ae.createElement("button",{className:"".concat(Ne,"-close"),onClick:Rn},Nn||On),Ft&&Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:_e()("".concat(Ne,"-switch-left"),(0,De.Z)({},"".concat(Ne,"-switch-left-disabled"),_t===0)),onClick:function(fn){return Ce(fn,-1)}},qe),Ae.createElement("div",{className:_e()("".concat(Ne,"-switch-right"),(0,De.Z)({},"".concat(Ne,"-switch-right-disabled"),_t===Tn-1)),onClick:function(fn){return Ce(fn,1)}},je)),Ae.createElement("div",{className:"".concat(Ne,"-footer")},xn&&Ae.createElement("div",{className:"".concat(Ne,"-progress")},St?St(_t+1,Tn):"".concat(_t+1," / ").concat(Tn)),Bt?Bt(Gt,(0,Ze.Z)((0,Ze.Z)({icons:{prevIcon:Pt,nextIcon:dt,flipYIcon:Te,flipXIcon:lt,rotateLeftIcon:wt,rotateRightIcon:Xt,zoomOutIcon:an,zoomInIcon:vt},actions:{onActive:Un,onFlipY:Mt,onFlipX:Ge,onRotateLeft:Qe,onRotateRight:Je,onZoomOut:Sn,onZoomIn:Fn,onReset:Et,onClose:Rn},transform:Cn},Qt?{current:_t,total:Tn}:{}),{},{image:Yt})):Gt)))})},Be=Xe,ot=he(13697),un=he(16089),Lt={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Dn(at,xe,yt,xt){var Dt=(0,Ae.useRef)(null),Ne=(0,Ae.useRef)([]),Zt=(0,Ae.useState)(Lt),pt=(0,Oe.Z)(Zt,2),St=pt[0],Ft=pt[1],xn=function(Mn){Ft(Lt),(0,ot.Z)(Lt,St)||xt==null||xt({transform:Lt,action:Mn})},_t=function(Mn,qn){Dt.current===null&&(Ne.current=[],Dt.current=(0,un.Z)(function(){Ft(function($n){var Nn=$n;return Ne.current.forEach(function(Un){Nn=(0,Ze.Z)((0,Ze.Z)({},Nn),Un)}),Dt.current=null,xt==null||xt({transform:Nn,action:qn}),Nn})})),Ne.current.push((0,Ze.Z)((0,Ze.Z)({},St),Mn))},Cn=function(Mn,qn,$n,Nn,Un){var Rn=at.current,Fn=Rn.width,Sn=Rn.height,Je=Rn.offsetWidth,Qe=Rn.offsetHeight,Ge=Rn.offsetLeft,Mt=Rn.offsetTop,Et=Mn,Bt=St.scale*Mn;Bt>yt?(Bt=yt,Et=yt/St.scale):Bt<xe&&(Bt=Un?Bt:xe,Et=Bt/St.scale);var rn=$n!=null?$n:innerWidth/2,Yt=Nn!=null?Nn:innerHeight/2,Qt=Et-1,wn=Qt*Fn*.5,In=Qt*Sn*.5,kn=Qt*(rn-St.x-Ge),cn=Qt*(Yt-St.y-Mt),On=St.x-(kn-wn),qe=St.y-(cn-In);if(Mn<1&&Bt===1){var je=Je*Bt,Ot=Qe*Bt,Ln=ut(),zn=Ln.width,Ce=Ln.height;je<=zn&&Ot<=Ce&&(On=0,qe=0)}_t({x:On,y:qe,scale:Bt},qn)};return{transform:St,resetTransform:xn,updateTransform:_t,dispatchZoomChange:Cn}}var ln=he(48736);function me(at,xe,yt,xt){var Dt=xe+yt,Ne=(yt-xt)/2;if(yt>xt){if(xe>0)return(0,De.Z)({},at,Ne);if(xe<0&&Dt<xt)return(0,De.Z)({},at,-Ne)}else if(xe<0||Dt>xt)return(0,De.Z)({},at,xe<0?Ne:-Ne);return{}}function de(at,xe,yt,xt){var Dt=ut(),Ne=Dt.width,Zt=Dt.height,pt=null;return at<=Ne&&xe<=Zt?pt={x:0,y:0}:(at>Ne||xe>Zt)&&(pt=(0,Ze.Z)((0,Ze.Z)({},me("x",yt,at,Ne)),me("y",xt,xe,Zt))),pt}var mt=1,sn=1;function Rt(at,xe,yt,xt,Dt,Ne,Zt){var pt=Dt.rotate,St=Dt.scale,Ft=Dt.x,xn=Dt.y,_t=(0,Ae.useState)(!1),Cn=(0,Oe.Z)(_t,2),Tn=Cn[0],Mn=Cn[1],qn=(0,Ae.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),$n=function(Sn){!xe||Sn.button!==0||(Sn.preventDefault(),Sn.stopPropagation(),qn.current={diffX:Sn.pageX-Ft,diffY:Sn.pageY-xn,transformX:Ft,transformY:xn},Mn(!0))},Nn=function(Sn){yt&&Tn&&Ne({x:Sn.pageX-qn.current.diffX,y:Sn.pageY-qn.current.diffY},"move")},Un=function(){if(yt&&Tn){Mn(!1);var Sn=qn.current,Je=Sn.transformX,Qe=Sn.transformY,Ge=Ft!==Je&&xn!==Qe;if(!Ge)return;var Mt=at.current.offsetWidth*St,Et=at.current.offsetHeight*St,Bt=at.current.getBoundingClientRect(),rn=Bt.left,Yt=Bt.top,Qt=pt%180!==0,wn=de(Qt?Et:Mt,Qt?Mt:Et,rn,Yt);wn&&Ne((0,Ze.Z)({},wn),"dragRebound")}},Rn=function(Sn){if(!(!yt||Sn.deltaY==0)){var Je=Math.abs(Sn.deltaY/100),Qe=Math.min(Je,sn),Ge=mt+Qe*xt;Sn.deltaY>0&&(Ge=mt/Ge),Zt(Ge,"wheel",Sn.clientX,Sn.clientY)}};return(0,Ae.useEffect)(function(){var Fn,Sn,Je,Qe;if(xe){Je=(0,Ut.Z)(window,"mouseup",Un,!1),Qe=(0,Ut.Z)(window,"mousemove",Nn,!1);try{window.top!==window.self&&(Fn=(0,Ut.Z)(window.top,"mouseup",Un,!1),Sn=(0,Ut.Z)(window.top,"mousemove",Nn,!1))}catch(Ge){(0,ln.Kp)(!1,"[rc-image] ".concat(Ge))}}return function(){var Ge,Mt,Et,Bt;(Ge=Je)===null||Ge===void 0||Ge.remove(),(Mt=Qe)===null||Mt===void 0||Mt.remove(),(Et=Fn)===null||Et===void 0||Et.remove(),(Bt=Sn)===null||Bt===void 0||Bt.remove()}},[yt,Tn,Ft,xn,pt,xe]),{isMoving:Tn,onMouseDown:$n,onMouseMove:Nn,onMouseUp:Un,onWheel:Rn}}function Re(at){return new Promise(function(xe){if(!at){xe(!1);return}var yt=document.createElement("img");yt.onerror=function(){return xe(!1)},yt.onload=function(){return xe(!0)},yt.src=at})}function tt(at){var xe=at.src,yt=at.isCustomPlaceholder,xt=at.fallback,Dt=(0,Ae.useState)(yt?"loading":"normal"),Ne=(0,Oe.Z)(Dt,2),Zt=Ne[0],pt=Ne[1],St=(0,Ae.useRef)(!1),Ft=Zt==="error";(0,Ae.useEffect)(function(){var Tn=!0;return Re(xe).then(function(Mn){!Mn&&Tn&&pt("error")}),function(){Tn=!1}},[xe]),(0,Ae.useEffect)(function(){yt&&!St.current?pt("loading"):Ft&&pt("normal")},[xe]);var xn=function(){pt("normal")},_t=function(Mn){St.current=!1,Zt==="loading"&&Mn!==null&&Mn!==void 0&&Mn.complete&&(Mn.naturalWidth||Mn.naturalHeight)&&(St.current=!0,xn())},Cn=Ft&&xt?{src:xt}:{onLoad:xn,src:xe};return[_t,Cn,Zt]}function rt(at,xe){var yt=at.x-xe.x,xt=at.y-xe.y;return Math.hypot(yt,xt)}function dn(at,xe,yt,xt){var Dt=rt(at,yt),Ne=rt(xe,xt);if(Dt===0&&Ne===0)return[at.x,at.y];var Zt=Dt/(Dt+Ne),pt=at.x+Zt*(xe.x-at.x),St=at.y+Zt*(xe.y-at.y);return[pt,St]}function bt(at,xe,yt,xt,Dt,Ne,Zt){var pt=Dt.rotate,St=Dt.scale,Ft=Dt.x,xn=Dt.y,_t=(0,Ae.useState)(!1),Cn=(0,Oe.Z)(_t,2),Tn=Cn[0],Mn=Cn[1],qn=(0,Ae.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),$n=function(Sn){qn.current=(0,Ze.Z)((0,Ze.Z)({},qn.current),Sn)},Nn=function(Sn){if(xe){Sn.stopPropagation(),Mn(!0);var Je=Sn.touches,Qe=Je===void 0?[]:Je;Qe.length>1?$n({point1:{x:Qe[0].clientX,y:Qe[0].clientY},point2:{x:Qe[1].clientX,y:Qe[1].clientY},eventType:"touchZoom"}):$n({point1:{x:Qe[0].clientX-Ft,y:Qe[0].clientY-xn},eventType:"move"})}},Un=function(Sn){var Je=Sn.touches,Qe=Je===void 0?[]:Je,Ge=qn.current,Mt=Ge.point1,Et=Ge.point2,Bt=Ge.eventType;if(Qe.length>1&&Bt==="touchZoom"){var rn={x:Qe[0].clientX,y:Qe[0].clientY},Yt={x:Qe[1].clientX,y:Qe[1].clientY},Qt=dn(Mt,Et,rn,Yt),wn=(0,Oe.Z)(Qt,2),In=wn[0],kn=wn[1],cn=rt(rn,Yt)/rt(Mt,Et);Zt(cn,"touchZoom",In,kn,!0),$n({point1:rn,point2:Yt,eventType:"touchZoom"})}else Bt==="move"&&(Ne({x:Qe[0].clientX-Mt.x,y:Qe[0].clientY-Mt.y},"move"),$n({eventType:"move"}))},Rn=function(){if(yt){if(Tn&&Mn(!1),$n({eventType:"none"}),xt>St)return Ne({x:0,y:0,scale:xt},"touchZoom");var Sn=at.current.offsetWidth*St,Je=at.current.offsetHeight*St,Qe=at.current.getBoundingClientRect(),Ge=Qe.left,Mt=Qe.top,Et=pt%180!==0,Bt=de(Et?Je:Sn,Et?Sn:Je,Ge,Mt);Bt&&Ne((0,Ze.Z)({},Bt),"dragRebound")}};return(0,Ae.useEffect)(function(){var Fn;return yt&&xe&&(Fn=(0,Ut.Z)(window,"touchmove",function(Sn){return Sn.preventDefault()},{passive:!1})),function(){var Sn;(Sn=Fn)===null||Sn===void 0||Sn.remove()}},[yt,xe]),{isTouching:Tn,onTouchStart:Nn,onTouchMove:Un,onTouchEnd:Rn}}var Jt=["fallback","src","imgRef"],He=["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"],Tt=function(xe){var yt=xe.fallback,xt=xe.src,Dt=xe.imgRef,Ne=(0,ge.Z)(xe,Jt),Zt=tt({src:xt,fallback:yt}),pt=(0,Oe.Z)(Zt,2),St=pt[0],Ft=pt[1];return Ae.createElement("img",(0,ie.Z)({ref:function(_t){Dt.current=_t,St(_t)}},Ne,Ft))},Nt=function(xe){var yt=xe.prefixCls,xt=xe.src,Dt=xe.alt,Ne=xe.imageInfo,Zt=xe.fallback,pt=xe.movable,St=pt===void 0?!0:pt,Ft=xe.onClose,xn=xe.visible,_t=xe.icons,Cn=_t===void 0?{}:_t,Tn=xe.rootClassName,Mn=xe.closeIcon,qn=xe.getContainer,$n=xe.current,Nn=$n===void 0?0:$n,Un=xe.count,Rn=Un===void 0?1:Un,Fn=xe.countRender,Sn=xe.scaleStep,Je=Sn===void 0?.5:Sn,Qe=xe.minScale,Ge=Qe===void 0?1:Qe,Mt=xe.maxScale,Et=Mt===void 0?50:Mt,Bt=xe.transitionName,rn=Bt===void 0?"zoom":Bt,Yt=xe.maskTransitionName,Qt=Yt===void 0?"fade":Yt,wn=xe.imageRender,In=xe.imgCommonProps,kn=xe.toolbarRender,cn=xe.onTransform,On=xe.onChange,qe=(0,ge.Z)(xe,He),je=(0,Ae.useRef)(),Ot=(0,Ae.useContext)(Le),Ln=Ot&&Rn>1,zn=Ot&&Rn>=1,Ce=(0,Ae.useState)(!0),Se=(0,Oe.Z)(Ce,2),Pt=Se[0],dt=Se[1],Te=Dn(je,Ge,Et,cn),lt=Te.transform,wt=Te.resetTransform,Xt=Te.updateTransform,an=Te.dispatchZoomChange,vt=Rt(je,St,xn,Je,lt,Xt,an),Gt=vt.isMoving,st=vt.onMouseDown,Ke=vt.onWheel,Ht=bt(je,St,xn,Ge,lt,Xt,an),yn=Ht.isTouching,fn=Ht.onTouchStart,Pn=Ht.onTouchMove,Kn=Ht.onTouchEnd,Jn=lt.rotate,ir=lt.scale,_n=_e()((0,De.Z)({},"".concat(yt,"-moving"),Gt));(0,Ae.useEffect)(function(){Pt||dt(!0)},[Pt]);var tr=function(){wt("close")},Gn=function(){an(mt+Je,"zoomIn")},or=function(){an(mt/(mt+Je),"zoomOut")},gr=function(){Xt({rotate:Jn+90},"rotateRight")},dr=function(){Xt({rotate:Jn-90},"rotateLeft")},yr=function(){Xt({flipX:!lt.flipX},"flipX")},br=function(){Xt({flipY:!lt.flipY},"flipY")},Cr=function(){wt("reset")},hr=function(lr){var nr=Nn+lr;!Number.isInteger(nr)||nr<0||nr>Rn-1||(dt(!1),wt(lr<0?"prev":"next"),On==null||On(nr,Nn))},Pr=function(lr){!xn||!Ln||(lr.keyCode===Ye.Z.LEFT?hr(-1):lr.keyCode===Ye.Z.RIGHT&&hr(1))},xr=function(lr){xn&&(ir!==1?Xt({x:0,y:0,scale:1},"doubleClick"):an(mt+Je,"doubleClick",lr.clientX,lr.clientY))};(0,Ae.useEffect)(function(){var ar=(0,Ut.Z)(window,"keydown",Pr,!1);return function(){ar.remove()}},[xn,Ln,Nn]);var fr=Ae.createElement(Tt,(0,ie.Z)({},In,{width:xe.width,height:xe.height,imgRef:je,className:"".concat(yt,"-img"),alt:Dt,style:{transform:"translate3d(".concat(lt.x,"px, ").concat(lt.y,"px, 0) scale3d(").concat(lt.flipX?"-":"").concat(ir,", ").concat(lt.flipY?"-":"").concat(ir,", 1) rotate(").concat(Jn,"deg)"),transitionDuration:(!Pt||yn)&&"0s"},fallback:Zt,src:xt,onWheel:Ke,onMouseDown:st,onDoubleClick:xr,onTouchStart:fn,onTouchMove:Pn,onTouchEnd:Kn,onTouchCancel:Kn})),Sr=(0,Ze.Z)({url:xt,alt:Dt},Ne);return Ae.createElement(Ae.Fragment,null,Ae.createElement(it.Z,(0,ie.Z)({transitionName:rn,maskTransitionName:Qt,closable:!1,keyboard:!0,prefixCls:yt,onClose:Ft,visible:xn,classNames:{wrapper:_n},rootClassName:Tn,getContainer:qn},qe,{afterClose:tr}),Ae.createElement("div",{className:"".concat(yt,"-img-wrapper")},wn?wn(fr,(0,Ze.Z)({transform:lt,image:Sr},Ot?{current:Nn}:{})):fr)),Ae.createElement(Be,{visible:xn,transform:lt,maskTransitionName:Qt,closeIcon:Mn,getContainer:qn,prefixCls:yt,rootClassName:Tn,icons:Cn,countRender:Fn,showSwitch:Ln,showProgress:zn,current:Nn,count:Rn,scale:ir,minScale:Ge,maxScale:Et,toolbarRender:kn,onActive:hr,onZoomIn:Gn,onZoomOut:or,onRotateRight:gr,onRotateLeft:dr,onFlipX:yr,onFlipY:br,onClose:Ft,onReset:Cr,zIndex:qe.zIndex!==void 0?qe.zIndex+1:void 0,image:Sr}))},ae=Nt,te=he(94480),z=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function oe(at){var xe=Ae.useState({}),yt=(0,Oe.Z)(xe,2),xt=yt[0],Dt=yt[1],Ne=Ae.useCallback(function(pt,St){return Dt(function(Ft){return(0,Ze.Z)((0,Ze.Z)({},Ft),{},(0,De.Z)({},pt,St))}),function(){Dt(function(Ft){var xn=(0,Ze.Z)({},Ft);return delete xn[pt],xn})}},[]),Zt=Ae.useMemo(function(){return at?at.map(function(pt){if(typeof pt=="string")return{data:{src:pt}};var St={};return Object.keys(pt).forEach(function(Ft){["src"].concat((0,te.Z)(z)).includes(Ft)&&(St[Ft]=pt[Ft])}),{data:St}}):Object.keys(xt).reduce(function(pt,St){var Ft=xt[St],xn=Ft.canPreview,_t=Ft.data;return xn&&pt.push({data:_t,id:St}),pt},[])},[at,xt]);return[Zt,Ne,!!at]}var se=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],ne=["src"],be=function(xe){var yt,xt=xe.previewPrefixCls,Dt=xt===void 0?"rc-image-preview":xt,Ne=xe.children,Zt=xe.icons,pt=Zt===void 0?{}:Zt,St=xe.items,Ft=xe.preview,xn=xe.fallback,_t=(0,pe.Z)(Ft)==="object"?Ft:{},Cn=_t.visible,Tn=_t.onVisibleChange,Mn=_t.getContainer,qn=_t.current,$n=_t.movable,Nn=_t.minScale,Un=_t.maxScale,Rn=_t.countRender,Fn=_t.closeIcon,Sn=_t.onChange,Je=_t.onTransform,Qe=_t.toolbarRender,Ge=_t.imageRender,Mt=(0,ge.Z)(_t,se),Et=oe(St),Bt=(0,Oe.Z)(Et,3),rn=Bt[0],Yt=Bt[1],Qt=Bt[2],wn=(0,et.Z)(0,{value:qn}),In=(0,Oe.Z)(wn,2),kn=In[0],cn=In[1],On=(0,Ae.useState)(!1),qe=(0,Oe.Z)(On,2),je=qe[0],Ot=qe[1],Ln=((yt=rn[kn])===null||yt===void 0?void 0:yt.data)||{},zn=Ln.src,Ce=(0,ge.Z)(Ln,ne),Se=(0,et.Z)(!!Cn,{value:Cn,onChange:function(yn,fn){Tn==null||Tn(yn,fn,kn)}}),Pt=(0,Oe.Z)(Se,2),dt=Pt[0],Te=Pt[1],lt=(0,Ae.useState)(null),wt=(0,Oe.Z)(lt,2),Xt=wt[0],an=wt[1],vt=Ae.useCallback(function(Ht,yn,fn,Pn){var Kn=Qt?rn.findIndex(function(Jn){return Jn.data.src===yn}):rn.findIndex(function(Jn){return Jn.id===Ht});cn(Kn<0?0:Kn),Te(!0),an({x:fn,y:Pn}),Ot(!0)},[rn,Qt]);Ae.useEffect(function(){dt?je||cn(0):Ot(!1)},[dt]);var Gt=function(yn,fn){cn(yn),Sn==null||Sn(yn,fn)},st=function(){Te(!1),an(null)},Ke=Ae.useMemo(function(){return{register:Yt,onPreview:vt}},[Yt,vt]);return Ae.createElement(Le.Provider,{value:Ke},Ne,Ae.createElement(ae,(0,ie.Z)({"aria-hidden":!dt,movable:$n,visible:dt,prefixCls:Dt,closeIcon:Fn,onClose:st,mousePosition:Xt,imgCommonProps:Ce,src:zn,fallback:xn,icons:pt,minScale:Nn,maxScale:Un,getContainer:Mn,current:kn,count:rn.length,countRender:Rn,onTransform:Je,toolbarRender:Qe,imageRender:Ge,onChange:Gt},Mt)))},Ve=be,Wt=0;function It(at,xe){var yt=Ae.useState(function(){return Wt+=1,String(Wt)}),xt=(0,Oe.Z)(yt,1),Dt=xt[0],Ne=Ae.useContext(Le),Zt={data:xe,canPreview:at};return Ae.useEffect(function(){if(Ne)return Ne.register(Dt,Zt)},[]),Ae.useEffect(function(){Ne&&Ne.register(Dt,Zt)},[at,xe]),Dt}var gt=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],At=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],nn=function(xe){var yt=xe.src,xt=xe.alt,Dt=xe.onPreviewClose,Ne=xe.prefixCls,Zt=Ne===void 0?"rc-image":Ne,pt=xe.previewPrefixCls,St=pt===void 0?"".concat(Zt,"-preview"):pt,Ft=xe.placeholder,xn=xe.fallback,_t=xe.width,Cn=xe.height,Tn=xe.style,Mn=xe.preview,qn=Mn===void 0?!0:Mn,$n=xe.className,Nn=xe.onClick,Un=xe.onError,Rn=xe.wrapperClassName,Fn=xe.wrapperStyle,Sn=xe.rootClassName,Je=(0,ge.Z)(xe,gt),Qe=Ft&&Ft!==!0,Ge=(0,pe.Z)(qn)==="object"?qn:{},Mt=Ge.src,Et=Ge.visible,Bt=Et===void 0?void 0:Et,rn=Ge.onVisibleChange,Yt=rn===void 0?Dt:rn,Qt=Ge.getContainer,wn=Qt===void 0?void 0:Qt,In=Ge.mask,kn=Ge.maskClassName,cn=Ge.movable,On=Ge.icons,qe=Ge.scaleStep,je=Ge.minScale,Ot=Ge.maxScale,Ln=Ge.imageRender,zn=Ge.toolbarRender,Ce=(0,ge.Z)(Ge,At),Se=Mt!=null?Mt:yt,Pt=(0,et.Z)(!!Bt,{value:Bt,onChange:Yt}),dt=(0,Oe.Z)(Pt,2),Te=dt[0],lt=dt[1],wt=tt({src:yt,isCustomPlaceholder:Qe,fallback:xn}),Xt=(0,Oe.Z)(wt,3),an=Xt[0],vt=Xt[1],Gt=Xt[2],st=(0,Ae.useState)(null),Ke=(0,Oe.Z)(st,2),Ht=Ke[0],yn=Ke[1],fn=(0,Ae.useContext)(Le),Pn=!!qn,Kn=function(){lt(!1),yn(null)},Jn=_e()(Zt,Rn,Sn,(0,De.Z)({},"".concat(Zt,"-error"),Gt==="error")),ir=(0,Ae.useMemo)(function(){var or={};return z.forEach(function(gr){xe[gr]!==void 0&&(or[gr]=xe[gr])}),or},z.map(function(or){return xe[or]})),_n=(0,Ae.useMemo)(function(){return(0,Ze.Z)((0,Ze.Z)({},ir),{},{src:Se})},[Se,ir]),tr=It(Pn,_n),Gn=function(gr){var dr=ct(gr.target),yr=dr.left,br=dr.top;fn?fn.onPreview(tr,Se,yr,br):(yn({x:yr,y:br}),lt(!0)),Nn==null||Nn(gr)};return Ae.createElement(Ae.Fragment,null,Ae.createElement("div",(0,ie.Z)({},Je,{className:Jn,onClick:Pn?Gn:Nn,style:(0,Ze.Z)({width:_t,height:Cn},Fn)}),Ae.createElement("img",(0,ie.Z)({},ir,{className:_e()("".concat(Zt,"-img"),(0,De.Z)({},"".concat(Zt,"-img-placeholder"),Ft===!0),$n),style:(0,Ze.Z)({height:Cn},Tn),ref:an},vt,{width:_t,height:Cn,onError:Un})),Gt==="loading"&&Ae.createElement("div",{"aria-hidden":"true",className:"".concat(Zt,"-placeholder")},Ft),In&&Pn&&Ae.createElement("div",{className:_e()("".concat(Zt,"-mask"),kn),style:{display:(Tn==null?void 0:Tn.display)==="none"?"none":void 0}},In)),!fn&&Pn&&Ae.createElement(ae,(0,ie.Z)({"aria-hidden":!Te,visible:Te,prefixCls:St,onClose:Kn,mousePosition:Ht,src:Se,alt:xt,imageInfo:{width:_t,height:Cn},fallback:xn,getContainer:wn,icons:On,movable:cn,scaleStep:qe,minScale:je,maxScale:Ot,rootClassName:Sn,imageRender:Ln,imgCommonProps:ir,toolbarRender:zn},Ce)))};nn.PreviewGroup=Ve;var $t=nn,hn=$t},6551:function(jt,qt,he){"use strict";he.d(qt,{ZP:function(){return Ie}});var ie=he(42978),Ze=he(59301),De=he(47273),Oe=0,pe=(0,De.Z)();function ge(){var _e;return pe?(_e=Oe,Oe+=1):_e="TEST_OR_SSR",_e}function Ie(_e){var we=Ze.useState(),fe=(0,ie.Z)(we,2),$e=fe[0],ve=fe[1];return Ze.useEffect(function(){ve("rc_select_".concat(ge()))},[]),_e||$e}},37463:function(jt,qt,he){"use strict";he.d(qt,{Ac:function(){return Ne},Xo:function(){return pt},Wx:function(){return Ft},ZP:function(){return zn},lk:function(){return ft}});var ie=he(54476),Ze=he(94480),De=he(20068),Oe=he(33885),pe=he(42978),ge=he(75931),Ie=he(76190),_e=he(18929),we=he(48736),fe=he(59301),$e=he(92310),ve=he.n($e),ht=he(34280),Fe=he(49658),Me=he(8654),Pe=function(Se){var Pt=Se.className,dt=Se.customizeIcon,Te=Se.customizeIconProps,lt=Se.children,wt=Se.onMouseDown,Xt=Se.onClick,an=typeof dt=="function"?dt(Te):dt;return fe.createElement("span",{className:Pt,onMouseDown:function(Gt){Gt.preventDefault(),wt==null||wt(Gt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Xt,"aria-hidden":!0},an!==void 0?an:fe.createElement("span",{className:ve()(Pt.split(/\s+/).map(function(vt){return"".concat(vt,"-icon")}))},lt))},Ee=Pe,nt=function(Se,Pt,dt,Te,lt){var wt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Xt=arguments.length>6?arguments[6]:void 0,an=arguments.length>7?arguments[7]:void 0,vt=fe.useMemo(function(){if((0,Ie.Z)(Te)==="object")return Te.clearIcon;if(lt)return lt},[Te,lt]),Gt=fe.useMemo(function(){return!!(!wt&&Te&&(dt.length||Xt)&&!(an==="combobox"&&Xt===""))},[Te,wt,dt.length,Xt,an]);return{allowClear:Gt,clearIcon:fe.createElement(Ee,{className:"".concat(Se,"-clear"),onMouseDown:Pt,customizeIcon:vt},"\xD7")}},ut=fe.createContext(null);function ft(){return fe.useContext(ut)}function ct(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Se=fe.useState(!1),Pt=(0,pe.Z)(Se,2),dt=Pt[0],Te=Pt[1],lt=fe.useRef(null),wt=function(){window.clearTimeout(lt.current)};fe.useEffect(function(){return wt},[]);var Xt=function(vt,Gt){wt(),lt.current=window.setTimeout(function(){Te(vt),Gt&&Gt()},Ce)};return[dt,Xt,wt]}function et(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Se=fe.useRef(null),Pt=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(Pt.current)}},[]);function dt(Te){(Te||Se.current===null)&&(Se.current=Te),window.clearTimeout(Pt.current),Pt.current=window.setTimeout(function(){Se.current=null},Ce)}return[function(){return Se.current},dt]}function Ae(Ce,Se,Pt,dt){var Te=fe.useRef(null);Te.current={open:Se,triggerOpen:Pt,customizedTrigger:dt},fe.useEffect(function(){function lt(wt){var Xt;if(!((Xt=Te.current)!==null&&Xt!==void 0&&Xt.customizedTrigger)){var an=wt.target;an.shadowRoot&&wt.composed&&(an=wt.composedPath()[0]||an),Te.current.open&&Ce().filter(function(vt){return vt}).every(function(vt){return!vt.contains(an)&&vt!==an})&&Te.current.triggerOpen(!1)}}return window.addEventListener("mousedown",lt),function(){return window.removeEventListener("mousedown",lt)}},[])}var it=he(10228);function Ut(Ce){return Ce&&![it.Z.ESC,it.Z.SHIFT,it.Z.BACKSPACE,it.Z.TAB,it.Z.WIN_KEY,it.Z.ALT,it.Z.META,it.Z.WIN_KEY_RIGHT,it.Z.CTRL,it.Z.SEMICOLON,it.Z.EQUALS,it.Z.CAPS_LOCK,it.Z.CONTEXT_MENU,it.Z.F1,it.Z.F2,it.Z.F3,it.Z.F4,it.Z.F5,it.Z.F6,it.Z.F7,it.Z.F8,it.Z.F9,it.Z.F10,it.Z.F11,it.Z.F12].includes(Ce)}var Ye=he(26112),We=he(11780);function Ct(Ce,Se,Pt){var dt=(0,Oe.Z)((0,Oe.Z)({},Ce),Pt?Se:{});return Object.keys(Se).forEach(function(Te){var lt=Se[Te];typeof lt=="function"&&(dt[Te]=function(){for(var wt,Xt=arguments.length,an=new Array(Xt),vt=0;vt<Xt;vt++)an[vt]=arguments[vt];return lt.apply(void 0,an),(wt=Ce[Te])===null||wt===void 0?void 0:wt.call.apply(wt,[Ce].concat(an))})}),dt}var Le=Ct,Xe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Be=function(Se,Pt){var dt=Se.prefixCls,Te=Se.id,lt=Se.inputElement,wt=Se.autoFocus,Xt=Se.autoComplete,an=Se.editable,vt=Se.activeDescendantId,Gt=Se.value,st=Se.open,Ke=Se.attrs,Ht=(0,ge.Z)(Se,Xe),yn=lt||fe.createElement("input",null),fn=yn,Pn=fn.ref,Kn=fn.props;return(0,we.Kp)(!("maxLength"in yn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),yn=fe.cloneElement(yn,(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({type:"search"},Le(Ht,Kn,!0)),{},{id:Te,ref:(0,Me.sQ)(Pt,Pn),autoComplete:Xt||"off",autoFocus:wt,className:ve()("".concat(dt,"-selection-search-input"),Kn==null?void 0:Kn.className),role:"combobox","aria-expanded":st||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Te,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Te,"_list"),"aria-activedescendant":st?vt:void 0},Ke),{},{value:an?Gt:"",readOnly:!an,unselectable:an?null:"on",style:(0,Oe.Z)((0,Oe.Z)({},Kn.style),{},{opacity:an?null:0})})),yn},ot=fe.forwardRef(Be),un=ot;function Lt(Ce){return Array.isArray(Ce)?Ce:Ce!==void 0?[Ce]:[]}var Dn=typeof window!="undefined"&&window.document&&window.document.documentElement,ln=Dn;function me(Ce){return Ce!=null}function de(Ce){return!Ce&&Ce!==0}function mt(Ce){return["string","number"].includes((0,Ie.Z)(Ce))}function sn(Ce){var Se=void 0;return Ce&&(mt(Ce.title)?Se=Ce.title.toString():mt(Ce.label)&&(Se=Ce.label.toString())),Se}function Rt(Ce,Se){ln?fe.useLayoutEffect(Ce,Se):fe.useEffect(Ce,Se)}function Re(Ce){var Se;return(Se=Ce.key)!==null&&Se!==void 0?Se:Ce.value}var tt=function(Se){Se.preventDefault(),Se.stopPropagation()},rt=function(Se){var Pt=Se.id,dt=Se.prefixCls,Te=Se.values,lt=Se.open,wt=Se.searchValue,Xt=Se.autoClearSearchValue,an=Se.inputRef,vt=Se.placeholder,Gt=Se.disabled,st=Se.mode,Ke=Se.showSearch,Ht=Se.autoFocus,yn=Se.autoComplete,fn=Se.activeDescendantId,Pn=Se.tabIndex,Kn=Se.removeIcon,Jn=Se.maxTagCount,ir=Se.maxTagTextLength,_n=Se.maxTagPlaceholder,tr=_n===void 0?function(An){return"+ ".concat(An.length," ...")}:_n,Gn=Se.tagRender,or=Se.onToggleOpen,gr=Se.onRemove,dr=Se.onInputChange,yr=Se.onInputPaste,br=Se.onInputKeyDown,Cr=Se.onInputMouseDown,hr=Se.onInputCompositionStart,Pr=Se.onInputCompositionEnd,xr=Se.onInputBlur,fr=fe.useRef(null),Sr=(0,fe.useState)(0),ar=(0,pe.Z)(Sr,2),lr=ar[0],nr=ar[1],sr=(0,fe.useState)(!1),Rr=(0,pe.Z)(sr,2),Vr=Rr[0],Jr=Rr[1],Tr="".concat(dt,"-selection"),Hr=lt||st==="multiple"&&Xt===!1||st==="tags"?wt:"",Ir=st==="tags"||st==="multiple"&&Xt===!1||Ke&&(lt||Vr);Rt(function(){nr(fr.current.scrollWidth)},[Hr]);var Zr=function(vn,Wn,pr,en,Vt){return fe.createElement("span",{title:sn(vn),className:ve()("".concat(Tr,"-item"),(0,De.Z)({},"".concat(Tr,"-item-disabled"),pr))},fe.createElement("span",{className:"".concat(Tr,"-item-content")},Wn),en&&fe.createElement(Ee,{className:"".concat(Tr,"-item-remove"),onMouseDown:tt,onClick:Vt,customizeIcon:Kn},"\xD7"))},ii=function(vn,Wn,pr,en,Vt,pn){var bn=function(vr){tt(vr),or(!lt)};return fe.createElement("span",{onMouseDown:bn},Gn({label:Wn,value:vn,disabled:pr,closable:en,onClose:Vt,isMaxTag:!!pn}))},Fr=function(vn){var Wn=vn.disabled,pr=vn.label,en=vn.value,Vt=!Gt&&!Wn,pn=pr;if(typeof ir=="number"&&(typeof pr=="string"||typeof pr=="number")){var bn=String(pn);bn.length>ir&&(pn="".concat(bn.slice(0,ir),"..."))}var jn=function(ur){ur&&ur.stopPropagation(),gr(vn)};return typeof Gn=="function"?ii(en,pn,Wn,Vt,jn):Zr(vn,pn,Wn,Vt,jn)},Qn=function(vn){if(!Te.length)return null;var Wn=typeof tr=="function"?tr(vn):tr;return typeof Gn=="function"?ii(void 0,Wn,!1,!1,void 0,!0):Zr({title:Wn},Wn,!1)},Kt=fe.createElement("div",{className:"".concat(Tr,"-search"),style:{width:lr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},fe.createElement(un,{ref:an,open:lt,prefixCls:dt,id:Pt,inputElement:null,disabled:Gt,autoFocus:Ht,autoComplete:yn,editable:Ir,activeDescendantId:fn,value:Hr,onKeyDown:br,onMouseDown:Cr,onChange:dr,onPaste:yr,onCompositionStart:hr,onCompositionEnd:Pr,onBlur:xr,tabIndex:Pn,attrs:(0,Ye.Z)(Se,!0)}),fe.createElement("span",{ref:fr,className:"".concat(Tr,"-search-mirror"),"aria-hidden":!0},Hr,"\xA0")),tn=fe.createElement(We.Z,{prefixCls:"".concat(Tr,"-overflow"),data:Te,renderItem:Fr,renderRest:Qn,suffix:Kt,itemKey:Re,maxCount:Jn});return fe.createElement("span",{className:"".concat(Tr,"-wrap")},tn,!Te.length&&!Hr&&fe.createElement("span",{className:"".concat(Tr,"-placeholder")},vt))},dn=rt,bt=function(Se){var Pt=Se.inputElement,dt=Se.prefixCls,Te=Se.id,lt=Se.inputRef,wt=Se.disabled,Xt=Se.autoFocus,an=Se.autoComplete,vt=Se.activeDescendantId,Gt=Se.mode,st=Se.open,Ke=Se.values,Ht=Se.placeholder,yn=Se.tabIndex,fn=Se.showSearch,Pn=Se.searchValue,Kn=Se.activeValue,Jn=Se.maxLength,ir=Se.onInputKeyDown,_n=Se.onInputMouseDown,tr=Se.onInputChange,Gn=Se.onInputPaste,or=Se.onInputCompositionStart,gr=Se.onInputCompositionEnd,dr=Se.onInputBlur,yr=Se.title,br=fe.useState(!1),Cr=(0,pe.Z)(br,2),hr=Cr[0],Pr=Cr[1],xr=Gt==="combobox",fr=xr||fn,Sr=Ke[0],ar=Pn||"";xr&&Kn&&!hr&&(ar=Kn),fe.useEffect(function(){xr&&Pr(!1)},[xr,Kn]);var lr=Gt!=="combobox"&&!st&&!fn?!1:!!ar,nr=yr===void 0?sn(Sr):yr,sr=fe.useMemo(function(){return Sr?null:fe.createElement("span",{className:"".concat(dt,"-selection-placeholder"),style:lr?{visibility:"hidden"}:void 0},Ht)},[Sr,lr,Ht,dt]);return fe.createElement("span",{className:"".concat(dt,"-selection-wrap")},fe.createElement("span",{className:"".concat(dt,"-selection-search")},fe.createElement(un,{ref:lt,prefixCls:dt,id:Te,open:st,inputElement:Pt,disabled:wt,autoFocus:Xt,autoComplete:an,editable:fr,activeDescendantId:vt,value:ar,onKeyDown:ir,onMouseDown:_n,onChange:function(Vr){Pr(!0),tr(Vr)},onPaste:Gn,onCompositionStart:or,onCompositionEnd:gr,onBlur:dr,tabIndex:yn,attrs:(0,Ye.Z)(Se,!0),maxLength:xr?Jn:void 0})),!xr&&Sr?fe.createElement("span",{className:"".concat(dt,"-selection-item"),title:nr,style:lr?{visibility:"hidden"}:void 0},Sr.label):null,sr)},Jt=bt,He=function(Se,Pt){var dt=(0,fe.useRef)(null),Te=(0,fe.useRef)(!1),lt=Se.prefixCls,wt=Se.open,Xt=Se.mode,an=Se.showSearch,vt=Se.tokenWithEnter,Gt=Se.disabled,st=Se.prefix,Ke=Se.autoClearSearchValue,Ht=Se.onSearch,yn=Se.onSearchSubmit,fn=Se.onToggleOpen,Pn=Se.onInputKeyDown,Kn=Se.onInputBlur,Jn=Se.domRef;fe.useImperativeHandle(Pt,function(){return{focus:function(nr){dt.current.focus(nr)},blur:function(){dt.current.blur()}}});var ir=et(0),_n=(0,pe.Z)(ir,2),tr=_n[0],Gn=_n[1],or=function(nr){var sr=nr.which,Rr=dt.current instanceof HTMLTextAreaElement;!Rr&&wt&&(sr===it.Z.UP||sr===it.Z.DOWN)&&nr.preventDefault(),Pn&&Pn(nr),sr===it.Z.ENTER&&Xt==="tags"&&!Te.current&&!wt&&(yn==null||yn(nr.target.value)),!(Rr&&!wt&&~[it.Z.UP,it.Z.DOWN,it.Z.LEFT,it.Z.RIGHT].indexOf(sr))&&Ut(sr)&&fn(!0)},gr=function(){Gn(!0)},dr=(0,fe.useRef)(null),yr=function(nr){Ht(nr,!0,Te.current)!==!1&&fn(!0)},br=function(){Te.current=!0},Cr=function(nr){Te.current=!1,Xt!=="combobox"&&yr(nr.target.value)},hr=function(nr){var sr=nr.target.value;if(vt&&dr.current&&/[\r\n]/.test(dr.current)){var Rr=dr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");sr=sr.replace(Rr,dr.current)}dr.current=null,yr(sr)},Pr=function(nr){var sr=nr.clipboardData,Rr=sr==null?void 0:sr.getData("text");dr.current=Rr||""},xr=function(nr){var sr=nr.target;if(sr!==dt.current){var Rr=document.body.style.msTouchAction!==void 0;Rr?setTimeout(function(){dt.current.focus()}):dt.current.focus()}},fr=function(nr){var sr=tr();nr.target!==dt.current&&!sr&&!(Xt==="combobox"&&Gt)&&nr.preventDefault(),(Xt!=="combobox"&&(!an||!sr)||!wt)&&(wt&&Ke!==!1&&Ht("",!0,!1),fn())},Sr={inputRef:dt,onInputKeyDown:or,onInputMouseDown:gr,onInputChange:hr,onInputPaste:Pr,onInputCompositionStart:br,onInputCompositionEnd:Cr,onInputBlur:Kn},ar=Xt==="multiple"||Xt==="tags"?fe.createElement(dn,(0,ie.Z)({},Se,Sr)):fe.createElement(Jt,(0,ie.Z)({},Se,Sr));return fe.createElement("div",{ref:Jn,className:"".concat(lt,"-selector"),onClick:xr,onMouseDown:fr},st&&fe.createElement("div",{className:"".concat(lt,"-prefix")},st),ar)},Tt=fe.forwardRef(He),Nt=Tt,ae=he(65030),te=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Se){var Pt=Se===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"}}},oe=function(Se,Pt){var dt=Se.prefixCls,Te=Se.disabled,lt=Se.visible,wt=Se.children,Xt=Se.popupElement,an=Se.animation,vt=Se.transitionName,Gt=Se.dropdownStyle,st=Se.dropdownClassName,Ke=Se.direction,Ht=Ke===void 0?"ltr":Ke,yn=Se.placement,fn=Se.builtinPlacements,Pn=Se.dropdownMatchSelectWidth,Kn=Se.dropdownRender,Jn=Se.dropdownAlign,ir=Se.getPopupContainer,_n=Se.empty,tr=Se.getTriggerDOMNode,Gn=Se.onPopupVisibleChange,or=Se.onPopupMouseEnter,gr=(0,ge.Z)(Se,te),dr="".concat(dt,"-dropdown"),yr=Xt;Kn&&(yr=Kn(Xt));var br=fe.useMemo(function(){return fn||z(Pn)},[fn,Pn]),Cr=an?"".concat(dr,"-").concat(an):vt,hr=typeof Pn=="number",Pr=fe.useMemo(function(){return hr?null:Pn===!1?"minWidth":"width"},[Pn,hr]),xr=Gt;hr&&(xr=(0,Oe.Z)((0,Oe.Z)({},xr),{},{width:Pn}));var fr=fe.useRef(null);return fe.useImperativeHandle(Pt,function(){return{getPopupElement:function(){var ar;return(ar=fr.current)===null||ar===void 0?void 0:ar.popupElement}}}),fe.createElement(ae.Z,(0,ie.Z)({},gr,{showAction:Gn?["click"]:[],hideAction:Gn?["click"]:[],popupPlacement:yn||(Ht==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:br,prefixCls:dr,popupTransitionName:Cr,popup:fe.createElement("div",{onMouseEnter:or},yr),ref:fr,stretch:Pr,popupAlign:Jn,popupVisible:lt,getPopupContainer:ir,popupClassName:ve()(st,(0,De.Z)({},"".concat(dr,"-empty"),_n)),popupStyle:xr,getTriggerDOMNode:tr,onPopupVisibleChange:Gn}),wt)},se=fe.forwardRef(oe),ne=se,be=he(66712);function Ve(Ce,Se){var Pt=Ce.key,dt;return"value"in Ce&&(dt=Ce.value),Pt!=null?Pt:dt!==void 0?dt:"rc-index-key-".concat(Se)}function Wt(Ce){return typeof Ce!="undefined"&&!Number.isNaN(Ce)}function It(Ce,Se){var Pt=Ce||{},dt=Pt.label,Te=Pt.value,lt=Pt.options,wt=Pt.groupLabel,Xt=dt||(Se?"children":"label");return{label:Xt,value:Te||"value",options:lt||"options",groupLabel:wt||Xt}}function gt(Ce){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=Se.fieldNames,dt=Se.childrenAsData,Te=[],lt=It(Pt,!1),wt=lt.label,Xt=lt.value,an=lt.options,vt=lt.groupLabel;function Gt(st,Ke){Array.isArray(st)&&st.forEach(function(Ht){if(Ke||!(an in Ht)){var yn=Ht[Xt];Te.push({key:Ve(Ht,Te.length),groupOption:Ke,data:Ht,label:Ht[wt],value:yn})}else{var fn=Ht[vt];fn===void 0&&dt&&(fn=Ht.label),Te.push({key:Ve(Ht,Te.length),group:!0,data:Ht,label:fn}),Gt(Ht[an],!0)}})}return Gt(Ce,!1),Te}function At(Ce){var Se=(0,Oe.Z)({},Ce);return"props"in Se||Object.defineProperty(Se,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Se}}),Se}var nn=function(Se,Pt,dt){if(!Pt||!Pt.length)return null;var Te=!1,lt=function Xt(an,vt){var Gt=(0,be.Z)(vt),st=Gt[0],Ke=Gt.slice(1);if(!st)return[an];var Ht=an.split(st);return Te=Te||Ht.length>1,Ht.reduce(function(yn,fn){return[].concat((0,Ze.Z)(yn),(0,Ze.Z)(Xt(fn,Ke)))},[]).filter(Boolean)},wt=lt(Se,Pt);return Te?typeof dt!="undefined"?wt.slice(0,dt):wt:null},$t=fe.createContext(null),hn=$t;function at(Ce){var Se=Ce.visible,Pt=Ce.values;if(!Se)return null;var dt=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Pt.slice(0,dt).map(function(Te){var lt=Te.label,wt=Te.value;return["number","string"].includes((0,Ie.Z)(lt))?lt:wt}).join(", ")),Pt.length>dt?", ...":null)}var xe=["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"],yt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],xt=function(Se){return Se==="tags"||Se==="multiple"},Dt=fe.forwardRef(function(Ce,Se){var Pt,dt=Ce.id,Te=Ce.prefixCls,lt=Ce.className,wt=Ce.showSearch,Xt=Ce.tagRender,an=Ce.direction,vt=Ce.omitDomProps,Gt=Ce.displayValues,st=Ce.onDisplayValuesChange,Ke=Ce.emptyOptions,Ht=Ce.notFoundContent,yn=Ht===void 0?"Not Found":Ht,fn=Ce.onClear,Pn=Ce.mode,Kn=Ce.disabled,Jn=Ce.loading,ir=Ce.getInputElement,_n=Ce.getRawInputElement,tr=Ce.open,Gn=Ce.defaultOpen,or=Ce.onDropdownVisibleChange,gr=Ce.activeValue,dr=Ce.onActiveValueChange,yr=Ce.activeDescendantId,br=Ce.searchValue,Cr=Ce.autoClearSearchValue,hr=Ce.onSearch,Pr=Ce.onSearchSplit,xr=Ce.tokenSeparators,fr=Ce.allowClear,Sr=Ce.prefix,ar=Ce.suffixIcon,lr=Ce.clearIcon,nr=Ce.OptionList,sr=Ce.animation,Rr=Ce.transitionName,Vr=Ce.dropdownStyle,Jr=Ce.dropdownClassName,Tr=Ce.dropdownMatchSelectWidth,Hr=Ce.dropdownRender,Ir=Ce.dropdownAlign,Zr=Ce.placement,ii=Ce.builtinPlacements,Fr=Ce.getPopupContainer,Qn=Ce.showAction,Kt=Qn===void 0?[]:Qn,tn=Ce.onFocus,An=Ce.onBlur,vn=Ce.onKeyUp,Wn=Ce.onKeyDown,pr=Ce.onMouseDown,en=(0,ge.Z)(Ce,xe),Vt=xt(Pn),pn=(wt!==void 0?wt:Vt)||Pn==="combobox",bn=(0,Oe.Z)({},en);yt.forEach(function(mr){delete bn[mr]}),vt==null||vt.forEach(function(mr){delete bn[mr]});var jn=fe.useState(!1),vr=(0,pe.Z)(jn,2),ur=vr[0],Er=vr[1];fe.useEffect(function(){Er((0,Fe.Z)())},[]);var Dr=fe.useRef(null),Lr=fe.useRef(null),zr=fe.useRef(null),Ar=fe.useRef(null),_r=fe.useRef(null),ei=fe.useRef(!1),Li=ct(),Fi=(0,pe.Z)(Li,3),xi=Fi[0],vi=Fi[1],Xi=Fi[2];fe.useImperativeHandle(Se,function(){var mr,rr;return{focus:(mr=Ar.current)===null||mr===void 0?void 0:mr.focus,blur:(rr=Ar.current)===null||rr===void 0?void 0:rr.blur,scrollTo:function(hi){var Yr;return(Yr=_r.current)===null||Yr===void 0?void 0:Yr.scrollTo(hi)},nativeElement:Dr.current||Lr.current}});var wr=fe.useMemo(function(){var mr;if(Pn!=="combobox")return br;var rr=(mr=Gt[0])===null||mr===void 0?void 0:mr.value;return typeof rr=="string"||typeof rr=="number"?String(rr):""},[br,Pn,Gt]),to=Pn==="combobox"&&typeof ir=="function"&&ir()||null,ti=typeof _n=="function"&&_n(),Ri=(0,Me.x1)(Lr,ti==null||(Pt=ti.props)===null||Pt===void 0?void 0:Pt.ref),ao=fe.useState(!1),Ji=(0,pe.Z)(ao,2),mi=Ji[0],Ii=Ji[1];(0,ht.Z)(function(){Ii(!0)},[]);var Wr=(0,_e.Z)(!1,{defaultValue:Gn,value:tr}),_i=(0,pe.Z)(Wr,2),lo=_i[0],Zi=_i[1],Qr=mi?lo:!1,xo=!yn&&Ke;(Kn||xo&&Qr&&Pn==="combobox")&&(Qr=!1);var so=xo?!1:Qr,Zn=fe.useCallback(function(mr){var rr=mr!==void 0?mr:!Qr;Kn||(Zi(rr),Qr!==rr&&(or==null||or(rr)))},[Kn,Qr,Zi,or]),er=fe.useMemo(function(){return(xr||[]).some(function(mr){return[`
|
|
`,`\r
|
|
`].includes(mr)})},[xr]),Yn=fe.useContext(hn)||{},Xn=Yn.maxCount,kr=Yn.rawValues,Nr=function(rr,ci,hi){if(!(Vt&&Wt(Xn)&&(kr==null?void 0:kr.size)>=Xn)){var Yr=!0,ni=rr;dr==null||dr(null);var Vi=nn(rr,xr,Wt(Xn)?Xn-kr.size:void 0),Wi=hi?null:Vi;return Pn!=="combobox"&&Wi&&(ni="",Pr==null||Pr(Wi),Zn(!1),Yr=!1),hr&&wr!==ni&&hr(ni,{source:ci?"typing":"effect"}),Yr}},Gi=function(rr){!rr||!rr.trim()||hr(rr,{source:"submit"})};fe.useEffect(function(){!Qr&&!Vt&&Pn!=="combobox"&&Nr("",!1,!1)},[Qr]),fe.useEffect(function(){lo&&Kn&&Zi(!1),Kn&&!ei.current&&vi(!1)},[Kn]);var gi=et(),ui=(0,pe.Z)(gi,2),Kr=ui[0],Hi=ui[1],Qi=fe.useRef(!1),Mi=function(rr){var ci=Kr(),hi=rr.key,Yr=hi==="Enter";if(Yr&&(Pn!=="combobox"&&rr.preventDefault(),Qr||Zn(!0)),Hi(!!wr),hi==="Backspace"&&!ci&&Vt&&!wr&&Gt.length){for(var ni=(0,Ze.Z)(Gt),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&&st(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,[rr].concat(Pi))}Wn==null||Wn.apply(void 0,[rr].concat(Pi))},qi=function(rr){for(var ci=arguments.length,hi=new Array(ci>1?ci-1:0),Yr=1;Yr<ci;Yr++)hi[Yr-1]=arguments[Yr];if(Qr){var ni;(ni=_r.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[rr].concat(hi))}rr.key==="Enter"&&(Qi.current=!1),vn==null||vn.apply(void 0,[rr].concat(hi))},no=function(rr){var ci=Gt.filter(function(hi){return hi!==rr});st(ci,{type:"remove",values:[rr]})},ji=function(){Qi.current=!1},Po=fe.useRef(!1),ja=function(){vi(!0),Kn||(tn&&!Po.current&&tn.apply(void 0,arguments),Kt.includes("focus")&&Zn(!0)),Po.current=!0},ya=function(){ei.current=!0,vi(!1,function(){Po.current=!1,ei.current=!1,Zn(!1)}),!Kn&&(wr&&(Pn==="tags"?hr(wr,{source:"submit"}):Pn==="multiple"&&hr("",{source:"blur"})),An&&An.apply(void 0,arguments))},$i=[];fe.useEffect(function(){return function(){$i.forEach(function(mr){return clearTimeout(mr)}),$i.splice(0,$i.length)}},[]);var uo=function(rr){var ci,hi=rr.target,Yr=(ci=zr.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Yr&&Yr.contains(hi)){var ni=setTimeout(function(){var Ti=$i.indexOf(ni);if(Ti!==-1&&$i.splice(Ti,1),Xi(),!ur&&!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];pr==null||pr.apply(void 0,[rr].concat(Wi))},zi=fe.useState({}),ba=(0,pe.Z)(zi,2),xa=ba[1];function Va(){xa({})}var wa;ti&&(wa=function(rr){Zn(rr)}),Ae(function(){var mr;return[Dr.current,(mr=zr.current)===null||mr===void 0?void 0:mr.getPopupElement()]},so,Zn,!!ti);var Ua=fe.useMemo(function(){return(0,Oe.Z)((0,Oe.Z)({},Ce),{},{notFoundContent:yn,open:Qr,triggerOpen:so,id:dt,showSearch:pn,multiple:Vt,toggleOpen:Zn})},[Ce,yn,so,Qr,dt,pn,Vt,Zn]),Ko=!!ar||Jn,Yo;Ko&&(Yo=fe.createElement(Ee,{className:ve()("".concat(Te,"-arrow"),(0,De.Z)({},"".concat(Te,"-arrow-loading"),Jn)),customizeIcon:ar,customizeIconProps:{loading:Jn,searchValue:wr,open:Qr,focused:xi,showSearch:pn}}));var wo=function(){var rr;fn==null||fn(),(rr=Ar.current)===null||rr===void 0||rr.focus(),st([],{type:"clear",values:Gt}),Nr("",!1,!1)},Xo=nt(Te,wo,Gt,fr,lr,Kn,wr,Pn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Ao=fe.createElement(nr,{ref:_r}),Sa=ve()(Te,lt,(0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)({},"".concat(Te,"-focused"),xi),"".concat(Te,"-multiple"),Vt),"".concat(Te,"-single"),!Vt),"".concat(Te,"-allow-clear"),fr),"".concat(Te,"-show-arrow"),Ko),"".concat(Te,"-disabled"),Kn),"".concat(Te,"-loading"),Jn),"".concat(Te,"-open"),Qr),"".concat(Te,"-customize-input"),to),"".concat(Te,"-show-search"),pn)),Bo=fe.createElement(ne,{ref:zr,disabled:Kn,prefixCls:Te,visible:so,popupElement:Ao,animation:sr,transitionName:Rr,dropdownStyle:Vr,dropdownClassName:Jr,direction:an,dropdownMatchSelectWidth:Tr,dropdownRender:Hr,dropdownAlign:Ir,placement:Zr,builtinPlacements:ii,getPopupContainer:Fr,empty:Ke,getTriggerDOMNode:function(rr){return Lr.current||rr},onPopupVisibleChange:wa,onPopupMouseEnter:Va},ti?fe.cloneElement(ti,{ref:Ri}):fe.createElement(Nt,(0,ie.Z)({},Ce,{domRef:Lr,prefixCls:Te,inputElement:to,ref:Ar,id:dt,prefix:Sr,showSearch:pn,autoClearSearchValue:Cr,mode:Pn,activeDescendantId:yr,tagRender:Xt,values:Gt,open:Qr,onToggleOpen:Zn,activeValue:gr,searchValue:wr,onSearch:Nr,onSearchSubmit:Gi,onRemove:no,tokenWithEnter:er,onInputBlur:ji}))),wi;return ti?wi=Bo:wi=fe.createElement("div",(0,ie.Z)({className:Sa},bn,{ref:Dr,onMouseDown:uo,onKeyDown:Mi,onKeyUp:qi,onFocus:ja,onBlur:ya}),fe.createElement(at,{visible:xi&&!Qr,values:Gt}),Bo,Yo,Ca&&Jo),fe.createElement(ut.Provider,{value:Ua},wi)}),Ne=Dt,Zt=function(){return null};Zt.isSelectOptGroup=!0;var pt=Zt,St=function(){return null};St.isSelectOption=!0;var Ft=St,xn=he(80547),_t=he(2738),Cn=he(6790);function Tn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Mn=["disabled","title","children","style","className"];function qn(Ce){return typeof Ce=="string"||typeof Ce=="number"}var $n=function(Se,Pt){var dt=ft(),Te=dt.prefixCls,lt=dt.id,wt=dt.open,Xt=dt.multiple,an=dt.mode,vt=dt.searchValue,Gt=dt.toggleOpen,st=dt.notFoundContent,Ke=dt.onPopupScroll,Ht=fe.useContext(hn),yn=Ht.maxCount,fn=Ht.flattenOptions,Pn=Ht.onActiveValue,Kn=Ht.defaultActiveFirstOption,Jn=Ht.onSelect,ir=Ht.menuItemSelectedIcon,_n=Ht.rawValues,tr=Ht.fieldNames,Gn=Ht.virtual,or=Ht.direction,gr=Ht.listHeight,dr=Ht.listItemHeight,yr=Ht.optionRender,br="".concat(Te,"-item"),Cr=(0,xn.Z)(function(){return fn},[wt,fn],function(Qn,Kt){return Kt[0]&&Qn[1]!==Kt[1]}),hr=fe.useRef(null),Pr=fe.useMemo(function(){return Xt&&Wt(yn)&&(_n==null?void 0:_n.size)>=yn},[Xt,yn,_n==null?void 0:_n.size]),xr=function(Kt){Kt.preventDefault()},fr=function(Kt){var tn;(tn=hr.current)===null||tn===void 0||tn.scrollTo(typeof Kt=="number"?{index:Kt}:Kt)},Sr=fe.useCallback(function(Qn){return an==="combobox"?!1:_n.has(Qn)},[an,(0,Ze.Z)(_n).toString(),_n.size]),ar=function(Kt){for(var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,An=Cr.length,vn=0;vn<An;vn+=1){var Wn=(Kt+vn*tn+An)%An,pr=Cr[Wn]||{},en=pr.group,Vt=pr.data;if(!en&&!(Vt!=null&&Vt.disabled)&&(Sr(Vt.value)||!Pr))return Wn}return-1},lr=fe.useState(function(){return ar(0)}),nr=(0,pe.Z)(lr,2),sr=nr[0],Rr=nr[1],Vr=function(Kt){var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Rr(Kt);var An={source:tn?"keyboard":"mouse"},vn=Cr[Kt];if(!vn){Pn(null,-1,An);return}Pn(vn.value,Kt,An)};(0,fe.useEffect)(function(){Vr(Kn!==!1?ar(0):-1)},[Cr.length,vt]);var Jr=fe.useCallback(function(Qn){return an==="combobox"?String(Qn).toLowerCase()===vt.toLowerCase():_n.has(Qn)},[an,vt,(0,Ze.Z)(_n).toString(),_n.size]);(0,fe.useEffect)(function(){var Qn=setTimeout(function(){if(!Xt&&wt&&_n.size===1){var tn=Array.from(_n)[0],An=Cr.findIndex(function(vn){var Wn=vn.data;return vt?String(Wn.value).startsWith(vt):Wn.value===tn});An!==-1&&(Vr(An),fr(An))}});if(wt){var Kt;(Kt=hr.current)===null||Kt===void 0||Kt.scrollTo(void 0)}return function(){return clearTimeout(Qn)}},[wt,vt]);var Tr=function(Kt){Kt!==void 0&&Jn(Kt,{selected:!_n.has(Kt)}),Xt||Gt(!1)};if(fe.useImperativeHandle(Pt,function(){return{onKeyDown:function(Kt){var tn=Kt.which,An=Kt.ctrlKey;switch(tn){case it.Z.N:case it.Z.P:case it.Z.UP:case it.Z.DOWN:{var vn=0;if(tn===it.Z.UP?vn=-1:tn===it.Z.DOWN?vn=1:Tn()&&An&&(tn===it.Z.N?vn=1:tn===it.Z.P&&(vn=-1)),vn!==0){var Wn=ar(sr+vn,vn);fr(Wn),Vr(Wn,!0)}break}case it.Z.TAB:case it.Z.ENTER:{var pr,en=Cr[sr];en&&!(en!=null&&(pr=en.data)!==null&&pr!==void 0&&pr.disabled)&&!Pr?Tr(en.value):Tr(void 0),wt&&Kt.preventDefault();break}case it.Z.ESC:Gt(!1),wt&&Kt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Kt){fr(Kt)}}}),Cr.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(lt,"_list"),className:"".concat(br,"-empty"),onMouseDown:xr},st);var Hr=Object.keys(tr).map(function(Qn){return tr[Qn]}),Ir=function(Kt){return Kt.label};function Zr(Qn,Kt){var tn=Qn.group;return{role:tn?"presentation":"option",id:"".concat(lt,"_list_").concat(Kt)}}var ii=function(Kt){var tn=Cr[Kt];if(!tn)return null;var An=tn.data||{},vn=An.value,Wn=tn.group,pr=(0,Ye.Z)(An,!0),en=Ir(tn);return tn?fe.createElement("div",(0,ie.Z)({"aria-label":typeof en=="string"&&!Wn?en:null},pr,{key:Kt},Zr(tn,Kt),{"aria-selected":Jr(vn)}),vn):null},Fr={role:"listbox",id:"".concat(lt,"_list")};return fe.createElement(fe.Fragment,null,Gn&&fe.createElement("div",(0,ie.Z)({},Fr,{style:{height:0,width:0,overflow:"hidden"}}),ii(sr-1),ii(sr),ii(sr+1)),fe.createElement(Cn.Z,{itemKey:"key",ref:hr,data:Cr,height:gr,itemHeight:dr,fullHeight:!1,onMouseDown:xr,onScroll:Ke,virtual:Gn,direction:or,innerProps:Gn?null:Fr},function(Qn,Kt){var tn=Qn.group,An=Qn.groupOption,vn=Qn.data,Wn=Qn.label,pr=Qn.value,en=vn.key;if(tn){var Vt,pn=(Vt=vn.title)!==null&&Vt!==void 0?Vt:qn(Wn)?Wn.toString():void 0;return fe.createElement("div",{className:ve()(br,"".concat(br,"-group"),vn.className),title:pn},Wn!==void 0?Wn:en)}var bn=vn.disabled,jn=vn.title,vr=vn.children,ur=vn.style,Er=vn.className,Dr=(0,ge.Z)(vn,Mn),Lr=(0,_t.Z)(Dr,Hr),zr=Sr(pr),Ar=bn||!zr&&Pr,_r="".concat(br,"-option"),ei=ve()(br,_r,Er,(0,De.Z)((0,De.Z)((0,De.Z)((0,De.Z)({},"".concat(_r,"-grouped"),An),"".concat(_r,"-active"),sr===Kt&&!Ar),"".concat(_r,"-disabled"),Ar),"".concat(_r,"-selected"),zr)),Li=Ir(Qn),Fi=!ir||typeof ir=="function"||zr,xi=typeof Li=="number"?Li:Li||pr,vi=qn(xi)?xi.toString():void 0;return jn!==void 0&&(vi=jn),fe.createElement("div",(0,ie.Z)({},(0,Ye.Z)(Lr),Gn?{}:Zr(Qn,Kt),{"aria-selected":Jr(pr),className:ei,title:vi,onMouseMove:function(){sr===Kt||Ar||Vr(Kt)},onClick:function(){Ar||Tr(pr)},style:ur}),fe.createElement("div",{className:"".concat(_r,"-content")},typeof yr=="function"?yr(Qn,{index:Kt}):xi),fe.isValidElement(ir)||zr,Fi&&fe.createElement(Ee,{className:"".concat(br,"-option-state"),customizeIcon:ir,customizeIconProps:{value:pr,disabled:Ar,isSelected:zr}},zr?"\u2713":null))}))},Nn=fe.forwardRef($n),Un=Nn,Rn=function(Ce,Se){var Pt=fe.useRef({values:new Map,options:new Map}),dt=fe.useMemo(function(){var lt=Pt.current,wt=lt.values,Xt=lt.options,an=Ce.map(function(st){if(st.label===void 0){var Ke;return(0,Oe.Z)((0,Oe.Z)({},st),{},{label:(Ke=wt.get(st.value))===null||Ke===void 0?void 0:Ke.label})}return st}),vt=new Map,Gt=new Map;return an.forEach(function(st){vt.set(st.value,st),Gt.set(st.value,Se.get(st.value)||Xt.get(st.value))}),Pt.current.values=vt,Pt.current.options=Gt,an},[Ce,Se]),Te=fe.useCallback(function(lt){return Se.get(lt)||Pt.current.options.get(lt)},[Se]);return[dt,Te]};function Fn(Ce,Se){return Lt(Ce).join("").toUpperCase().includes(Se)}var Sn=function(Ce,Se,Pt,dt,Te){return fe.useMemo(function(){if(!Pt||dt===!1)return Ce;var lt=Se.options,wt=Se.label,Xt=Se.value,an=[],vt=typeof dt=="function",Gt=Pt.toUpperCase(),st=vt?dt:function(Ht,yn){return Te?Fn(yn[Te],Gt):yn[lt]?Fn(yn[wt!=="children"?wt:"label"],Gt):Fn(yn[Xt],Gt)},Ke=vt?function(Ht){return At(Ht)}:function(Ht){return Ht};return Ce.forEach(function(Ht){if(Ht[lt]){var yn=st(Pt,Ke(Ht));if(yn)an.push(Ht);else{var fn=Ht[lt].filter(function(Pn){return st(Pt,Ke(Pn))});fn.length&&an.push((0,Oe.Z)((0,Oe.Z)({},Ht),{},(0,De.Z)({},lt,fn)))}return}st(Pt,Ke(Ht))&&an.push(Ht)}),an},[Ce,dt,Te,Pt,Se])},Je=he(6551),Qe=he(11592),Ge=["children","value"],Mt=["children"];function Et(Ce){var Se=Ce,Pt=Se.key,dt=Se.props,Te=dt.children,lt=dt.value,wt=(0,ge.Z)(dt,Ge);return(0,Oe.Z)({key:Pt,value:lt!==void 0?lt:Pt,children:Te},wt)}function Bt(Ce){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Qe.Z)(Ce).map(function(Pt,dt){if(!fe.isValidElement(Pt)||!Pt.type)return null;var Te=Pt,lt=Te.type.isSelectOptGroup,wt=Te.key,Xt=Te.props,an=Xt.children,vt=(0,ge.Z)(Xt,Mt);return Se||!lt?Et(Pt):(0,Oe.Z)((0,Oe.Z)({key:"__RC_SELECT_GRP__".concat(wt===null?dt:wt,"__"),label:wt},vt),{},{options:Bt(an)})}).filter(function(Pt){return Pt})}var rn=function(Se,Pt,dt,Te,lt){return fe.useMemo(function(){var wt=Se,Xt=!Se;Xt&&(wt=Bt(Pt));var an=new Map,vt=new Map,Gt=function(Ht,yn,fn){fn&&typeof fn=="string"&&Ht.set(yn[fn],yn)},st=function Ke(Ht){for(var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fn=0;fn<Ht.length;fn+=1){var Pn=Ht[fn];!Pn[dt.options]||yn?(an.set(Pn[dt.value],Pn),Gt(vt,Pn,dt.label),Gt(vt,Pn,Te),Gt(vt,Pn,lt)):Ke(Pn[dt.options],!0)}};return st(wt),{options:wt,valueOptions:an,labelOptions:vt}},[Se,Pt,dt,Te,lt])},Yt=rn;function Qt(Ce){var Se=fe.useRef();Se.current=Ce;var Pt=fe.useCallback(function(){return Se.current.apply(Se,arguments)},[]);return Pt}function wn(Ce){var Se=Ce.mode,Pt=Ce.options,dt=Ce.children,Te=Ce.backfill,lt=Ce.allowClear,wt=Ce.placeholder,Xt=Ce.getInputElement,an=Ce.showSearch,vt=Ce.onSearch,Gt=Ce.defaultOpen,st=Ce.autoFocus,Ke=Ce.labelInValue,Ht=Ce.value,yn=Ce.inputValue,fn=Ce.optionLabelProp,Pn=isMultiple(Se),Kn=an!==void 0?an:Pn||Se==="combobox",Jn=Pt||convertChildrenToData(dt);if(warning(Se!=="tags"||Jn.every(function(Gn){return!Gn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Se==="tags"||Se==="combobox"){var ir=Jn.some(function(Gn){return Gn.options?Gn.options.some(function(or){return typeof("value"in or?or.value:or.key)=="number"}):typeof("value"in Gn?Gn.value:Gn.key)=="number"});warning(!ir,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Se!=="combobox"||!fn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Se==="combobox"||!Te,"`backfill` only works with `combobox` mode."),warning(Se==="combobox"||!Xt,"`getInputElement` only work with `combobox` mode."),noteOnce(Se!=="combobox"||!Xt||!lt||!wt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),vt&&!Kn&&Se!=="combobox"&&Se!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Gt||st,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ht!=null){var _n=toArray(Ht);warning(!Ke||_n.every(function(Gn){return _typeof(Gn)==="object"&&("key"in Gn||"value"in Gn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Pn||Array.isArray(Ht),"`value` should be array when `mode` is `multiple` or `tags`")}if(dt){var tr=null;toNodeArray(dt).some(function(Gn){if(!React.isValidElement(Gn)||!Gn.type)return!1;var or=Gn,gr=or.type;if(gr.isSelectOption)return!1;if(gr.isSelectOptGroup){var dr=toNodeArray(Gn.props.children).every(function(yr){return!React.isValidElement(yr)||!Gn.type||yr.type.isSelectOption?!0:(tr=yr.type,!1)});return!dr}return tr=gr,!0}),tr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(tr.displayName||tr.name||tr,"`.")),warning(yn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function In(Ce,Se){if(Ce){var Pt=function dt(Te){for(var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wt=0;wt<Te.length;wt++){var Xt=Te[wt];if(Xt[Se==null?void 0:Se.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!lt&&Array.isArray(Xt[Se==null?void 0:Se.options])&&dt(Xt[Se==null?void 0:Se.options],!0))break}};Pt(Ce)}}var kn=null,cn=["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"],On=["inputValue"];function qe(Ce){return!Ce||(0,Ie.Z)(Ce)!=="object"}var je=fe.forwardRef(function(Ce,Se){var Pt=Ce.id,dt=Ce.mode,Te=Ce.prefixCls,lt=Te===void 0?"rc-select":Te,wt=Ce.backfill,Xt=Ce.fieldNames,an=Ce.inputValue,vt=Ce.searchValue,Gt=Ce.onSearch,st=Ce.autoClearSearchValue,Ke=st===void 0?!0:st,Ht=Ce.onSelect,yn=Ce.onDeselect,fn=Ce.dropdownMatchSelectWidth,Pn=fn===void 0?!0:fn,Kn=Ce.filterOption,Jn=Ce.filterSort,ir=Ce.optionFilterProp,_n=Ce.optionLabelProp,tr=Ce.options,Gn=Ce.optionRender,or=Ce.children,gr=Ce.defaultActiveFirstOption,dr=Ce.menuItemSelectedIcon,yr=Ce.virtual,br=Ce.direction,Cr=Ce.listHeight,hr=Cr===void 0?200:Cr,Pr=Ce.listItemHeight,xr=Pr===void 0?20:Pr,fr=Ce.labelRender,Sr=Ce.value,ar=Ce.defaultValue,lr=Ce.labelInValue,nr=Ce.onChange,sr=Ce.maxCount,Rr=(0,ge.Z)(Ce,cn),Vr=(0,Je.ZP)(Pt),Jr=xt(dt),Tr=!!(!tr&&or),Hr=fe.useMemo(function(){return Kn===void 0&&dt==="combobox"?!1:Kn},[Kn,dt]),Ir=fe.useMemo(function(){return It(Xt,Tr)},[JSON.stringify(Xt),Tr]),Zr=(0,_e.Z)("",{value:vt!==void 0?vt:an,postState:function(er){return er||""}}),ii=(0,pe.Z)(Zr,2),Fr=ii[0],Qn=ii[1],Kt=Yt(tr,or,Ir,ir,_n),tn=Kt.valueOptions,An=Kt.labelOptions,vn=Kt.options,Wn=fe.useCallback(function(Zn){var er=Lt(Zn);return er.map(function(Yn){var Xn,kr,Nr,Gi,gi;if(qe(Yn))Xn=Yn;else{var ui;Nr=Yn.key,kr=Yn.label,Xn=(ui=Yn.value)!==null&&ui!==void 0?ui:Nr}var Kr=tn.get(Xn);if(Kr){var Hi;if(kr===void 0&&(kr=Kr==null?void 0:Kr[_n||Ir.label]),Nr===void 0&&(Nr=(Hi=Kr==null?void 0:Kr.key)!==null&&Hi!==void 0?Hi:Xn),Gi=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Qi}return{label:kr,value:Xn,key:Nr,disabled:Gi,title:gi}})},[Ir,_n,tn]),pr=(0,_e.Z)(ar,{value:Sr}),en=(0,pe.Z)(pr,2),Vt=en[0],pn=en[1],bn=fe.useMemo(function(){var Zn,er=Jr&&Vt===null?[]:Vt,Yn=Wn(er);return dt==="combobox"&&de((Zn=Yn[0])===null||Zn===void 0?void 0:Zn.value)?[]:Yn},[Vt,Wn,dt,Jr]),jn=Rn(bn,tn),vr=(0,pe.Z)(jn,2),ur=vr[0],Er=vr[1],Dr=fe.useMemo(function(){if(!dt&&ur.length===1){var Zn=ur[0];if(Zn.value===null&&(Zn.label===null||Zn.label===void 0))return[]}return ur.map(function(er){var Yn;return(0,Oe.Z)((0,Oe.Z)({},er),{},{label:(Yn=typeof fr=="function"?fr(er):er.label)!==null&&Yn!==void 0?Yn:er.value})})},[dt,ur,fr]),Lr=fe.useMemo(function(){return new Set(ur.map(function(Zn){return Zn.value}))},[ur]);fe.useEffect(function(){if(dt==="combobox"){var Zn,er=(Zn=ur[0])===null||Zn===void 0?void 0:Zn.value;Qn(me(er)?String(er):"")}},[ur]);var zr=Qt(function(Zn,er){var Yn=er!=null?er:Zn;return(0,De.Z)((0,De.Z)({},Ir.value,Zn),Ir.label,Yn)}),Ar=fe.useMemo(function(){if(dt!=="tags")return vn;var Zn=(0,Ze.Z)(vn),er=function(Xn){return tn.has(Xn)};return(0,Ze.Z)(ur).sort(function(Yn,Xn){return Yn.value<Xn.value?-1:1}).forEach(function(Yn){var Xn=Yn.value;er(Xn)||Zn.push(zr(Xn,Yn.label))}),Zn},[zr,vn,tn,ur,dt]),_r=Sn(Ar,Ir,Fr,Hr,ir),ei=fe.useMemo(function(){return dt!=="tags"||!Fr||_r.some(function(Zn){return Zn[ir||"value"]===Fr})||_r.some(function(Zn){return Zn[Ir.value]===Fr})?_r:[zr(Fr)].concat((0,Ze.Z)(_r))},[zr,ir,dt,_r,Fr,Ir]),Li=function Zn(er){var Yn=(0,Ze.Z)(er).sort(function(Xn,kr){return Jn(Xn,kr,{searchValue:Fr})});return Yn.map(function(Xn){return Array.isArray(Xn.options)?(0,Oe.Z)((0,Oe.Z)({},Xn),{},{options:Xn.options.length>0?Zn(Xn.options):Xn.options}):Xn})},Fi=fe.useMemo(function(){return Jn?Li(ei):ei},[ei,Jn,Fr]),xi=fe.useMemo(function(){return gt(Fi,{fieldNames:Ir,childrenAsData:Tr})},[Fi,Ir,Tr]),vi=function(er){var Yn=Wn(er);if(pn(Yn),nr&&(Yn.length!==ur.length||Yn.some(function(Nr,Gi){var gi;return((gi=ur[Gi])===null||gi===void 0?void 0:gi.value)!==(Nr==null?void 0:Nr.value)}))){var Xn=lr?Yn:Yn.map(function(Nr){return Nr.value}),kr=Yn.map(function(Nr){return At(Er(Nr.value))});nr(Jr?Xn:Xn[0],Jr?kr:kr[0])}},Xi=fe.useState(null),wr=(0,pe.Z)(Xi,2),to=wr[0],ti=wr[1],Ri=fe.useState(0),ao=(0,pe.Z)(Ri,2),Ji=ao[0],mi=ao[1],Ii=gr!==void 0?gr:dt!=="combobox",Wr=fe.useCallback(function(Zn,er){var Yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Xn=Yn.source,kr=Xn===void 0?"keyboard":Xn;mi(er),wt&&dt==="combobox"&&Zn!==null&&kr==="keyboard"&&ti(String(Zn))},[wt,dt]),_i=function(er,Yn,Xn){var kr=function(){var no,ji=Er(er);return[lr?{label:ji==null?void 0:ji[Ir.label],value:er,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:er}:er,At(ji)]};if(Yn&&Ht){var Nr=kr(),Gi=(0,pe.Z)(Nr,2),gi=Gi[0],ui=Gi[1];Ht(gi,ui)}else if(!Yn&&yn&&Xn!=="clear"){var Kr=kr(),Hi=(0,pe.Z)(Kr,2),Qi=Hi[0],Mi=Hi[1];yn(Qi,Mi)}},lo=Qt(function(Zn,er){var Yn,Xn=Jr?er.selected:!0;Xn?Yn=Jr?[].concat((0,Ze.Z)(ur),[Zn]):[Zn]:Yn=ur.filter(function(kr){return kr.value!==Zn}),vi(Yn),_i(Zn,Xn),dt==="combobox"?ti(""):(!xt||Ke)&&(Qn(""),ti(""))}),Zi=function(er,Yn){vi(er);var Xn=Yn.type,kr=Yn.values;(Xn==="remove"||Xn==="clear")&&kr.forEach(function(Nr){_i(Nr.value,!1,Xn)})},Qr=function(er,Yn){if(Qn(er),ti(null),Yn.source==="submit"){var Xn=(er||"").trim();if(Xn){var kr=Array.from(new Set([].concat((0,Ze.Z)(Lr),[Xn])));vi(kr),_i(Xn,!0),Qn("")}return}Yn.source!=="blur"&&(dt==="combobox"&&vi(er),Gt==null||Gt(er))},xo=function(er){var Yn=er;dt!=="tags"&&(Yn=er.map(function(kr){var Nr=An.get(kr);return Nr==null?void 0:Nr.value}).filter(function(kr){return kr!==void 0}));var Xn=Array.from(new Set([].concat((0,Ze.Z)(Lr),(0,Ze.Z)(Yn))));vi(Xn),Xn.forEach(function(kr){_i(kr,!0)})},so=fe.useMemo(function(){var Zn=yr!==!1&&Pn!==!1;return(0,Oe.Z)((0,Oe.Z)({},Kt),{},{flattenOptions:xi,onActiveValue:Wr,defaultActiveFirstOption:Ii,onSelect:lo,menuItemSelectedIcon:dr,rawValues:Lr,fieldNames:Ir,virtual:Zn,direction:br,listHeight:hr,listItemHeight:xr,childrenAsData:Tr,maxCount:sr,optionRender:Gn})},[sr,Kt,xi,Wr,Ii,lo,dr,Lr,Ir,yr,Pn,br,hr,xr,Tr,Gn]);return fe.createElement(hn.Provider,{value:so},fe.createElement(Ne,(0,ie.Z)({},Rr,{id:Vr,prefixCls:lt,ref:Se,omitDomProps:On,mode:dt,displayValues:Dr,onDisplayValuesChange:Zi,direction:br,searchValue:Fr,onSearch:Qr,autoClearSearchValue:Ke,onSearchSplit:xo,dropdownMatchSelectWidth:Pn,OptionList:Un,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Ot=je;Ot.Option=Ft,Ot.OptGroup=pt;var Ln=Ot,zn=Ln},63158:function(jt,qt,he){"use strict";var ie=he(54476),Ze=he(20068),De=he(42978),Oe=he(75931),pe=he(59301),ge=he(92310),Ie=he.n(ge),_e=he(18929),we=he(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],$e=pe.forwardRef(function(ve,ht){var Fe,Me=ve.prefixCls,Pe=Me===void 0?"rc-switch":Me,Ee=ve.className,nt=ve.checked,ut=ve.defaultChecked,ft=ve.disabled,ct=ve.loadingIcon,et=ve.checkedChildren,Ae=ve.unCheckedChildren,it=ve.onClick,Ut=ve.onChange,Ye=ve.onKeyDown,We=(0,Oe.Z)(ve,fe),Ct=(0,_e.Z)(!1,{value:nt,defaultValue:ut}),Le=(0,De.Z)(Ct,2),Xe=Le[0],Be=Le[1];function ot(ln,me){var de=Xe;return ft||(de=ln,Be(de),Ut==null||Ut(de,me)),de}function un(ln){ln.which===we.Z.LEFT?ot(!1,ln):ln.which===we.Z.RIGHT&&ot(!0,ln),Ye==null||Ye(ln)}function Lt(ln){var me=ot(!Xe,ln);it==null||it(me,ln)}var Dn=Ie()(Pe,Ee,(Fe={},(0,Ze.Z)(Fe,"".concat(Pe,"-checked"),Xe),(0,Ze.Z)(Fe,"".concat(Pe,"-disabled"),ft),Fe));return pe.createElement("button",(0,ie.Z)({},We,{type:"button",role:"switch","aria-checked":Xe,disabled:ft,className:Dn,ref:ht,onKeyDown:un,onClick:Lt}),ct,pe.createElement("span",{className:"".concat(Pe,"-inner")},pe.createElement("span",{className:"".concat(Pe,"-inner-checked")},et),pe.createElement("span",{className:"".concat(Pe,"-inner-unchecked")},Ae)))});$e.displayName="Switch",qt.Z=$e},22711:function(jt,qt,he){"use strict";he.r(qt),he.d(qt,{ResizableTextArea:function(){return Le},default:function(){return un}});var ie=he(54476),Ze=he(20068),De=he(33885),Oe=he(94480),pe=he(42978),ge=he(75931),Ie=he(92310),_e=he.n(Ie),we=he(36901),fe=he(66003),$e=he(30292),ve=he(18929),ht=he(59301),Fe=he(76190),Me=he(29301),Pe=he(34280),Ee=he(16089),nt=`
|
|
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;
|
|
`,ut=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ft={},ct;function et(Lt){var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ln=Lt.getAttribute("id")||Lt.getAttribute("data-reactid")||Lt.getAttribute("name");if(Dn&&ft[ln])return ft[ln];var me=window.getComputedStyle(Lt),de=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),mt=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),sn=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),Rt=ut.map(function(tt){return"".concat(tt,":").concat(me.getPropertyValue(tt))}).join(";"),Re={sizingStyle:Rt,paddingSize:mt,borderSize:sn,boxSizing:de};return Dn&&ln&&(ft[ln]=Re),Re}function Ae(Lt){var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ct||(ct=document.createElement("textarea"),ct.setAttribute("tab-index","-1"),ct.setAttribute("aria-hidden","true"),ct.setAttribute("name","hiddenTextarea"),document.body.appendChild(ct)),Lt.getAttribute("wrap")?ct.setAttribute("wrap",Lt.getAttribute("wrap")):ct.removeAttribute("wrap");var de=et(Lt,Dn),mt=de.paddingSize,sn=de.borderSize,Rt=de.boxSizing,Re=de.sizingStyle;ct.setAttribute("style","".concat(Re,";").concat(nt)),ct.value=Lt.value||Lt.placeholder||"";var tt=void 0,rt=void 0,dn,bt=ct.scrollHeight;if(Rt==="border-box"?bt+=sn:Rt==="content-box"&&(bt-=mt),ln!==null||me!==null){ct.value=" ";var Jt=ct.scrollHeight-mt;ln!==null&&(tt=Jt*ln,Rt==="border-box"&&(tt=tt+mt+sn),bt=Math.max(tt,bt)),me!==null&&(rt=Jt*me,Rt==="border-box"&&(rt=rt+mt+sn),dn=bt>rt?"":"hidden",bt=Math.min(rt,bt))}var He={height:bt,overflowY:dn,resize:"none"};return tt&&(He.minHeight=tt),rt&&(He.maxHeight=rt),He}var it=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ut=0,Ye=1,We=2,Ct=ht.forwardRef(function(Lt,Dn){var ln=Lt,me=ln.prefixCls,de=ln.defaultValue,mt=ln.value,sn=ln.autoSize,Rt=ln.onResize,Re=ln.className,tt=ln.style,rt=ln.disabled,dn=ln.onChange,bt=ln.onInternalAutoSize,Jt=(0,ge.Z)(ln,it),He=(0,ve.Z)(de,{value:mt,postState:function(Ft){return Ft!=null?Ft:""}}),Tt=(0,pe.Z)(He,2),Nt=Tt[0],ae=Tt[1],te=function(Ft){ae(Ft.target.value),dn==null||dn(Ft)},z=ht.useRef();ht.useImperativeHandle(Dn,function(){return{textArea:z.current}});var oe=ht.useMemo(function(){return sn&&(0,Fe.Z)(sn)==="object"?[sn.minRows,sn.maxRows]:[]},[sn]),se=(0,pe.Z)(oe,2),ne=se[0],be=se[1],Ve=!!sn,Wt=function(){try{if(document.activeElement===z.current){var Ft=z.current,xn=Ft.selectionStart,_t=Ft.selectionEnd,Cn=Ft.scrollTop;z.current.setSelectionRange(xn,_t),z.current.scrollTop=Cn}}catch(Tn){}},It=ht.useState(We),gt=(0,pe.Z)(It,2),At=gt[0],nn=gt[1],$t=ht.useState(),hn=(0,pe.Z)($t,2),at=hn[0],xe=hn[1],yt=function(){nn(Ut)};(0,Pe.Z)(function(){Ve&&yt()},[mt,ne,be,Ve]),(0,Pe.Z)(function(){if(At===Ut)nn(Ye);else if(At===Ye){var St=Ae(z.current,!1,ne,be);nn(We),xe(St)}else Wt()},[At]);var xt=ht.useRef(),Dt=function(){Ee.Z.cancel(xt.current)},Ne=function(Ft){At===We&&(Rt==null||Rt(Ft),sn&&(Dt(),xt.current=(0,Ee.Z)(function(){yt()})))};ht.useEffect(function(){return Dt},[]);var Zt=Ve?at:null,pt=(0,De.Z)((0,De.Z)({},tt),Zt);return(At===Ut||At===Ye)&&(pt.overflowY="hidden",pt.overflowX="hidden"),ht.createElement(Me.Z,{onResize:Ne,disabled:!(sn||Rt)},ht.createElement("textarea",(0,ie.Z)({},Jt,{ref:z,style:pt,className:_e()(me,Re,(0,Ze.Z)({},"".concat(me,"-disabled"),rt)),disabled:rt,value:Nt,onChange:te})))}),Le=Ct,Xe=["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"],Be=ht.forwardRef(function(Lt,Dn){var ln,me=Lt.defaultValue,de=Lt.value,mt=Lt.onFocus,sn=Lt.onBlur,Rt=Lt.onChange,Re=Lt.allowClear,tt=Lt.maxLength,rt=Lt.onCompositionStart,dn=Lt.onCompositionEnd,bt=Lt.suffix,Jt=Lt.prefixCls,He=Jt===void 0?"rc-textarea":Jt,Tt=Lt.showCount,Nt=Lt.count,ae=Lt.className,te=Lt.style,z=Lt.disabled,oe=Lt.hidden,se=Lt.classNames,ne=Lt.styles,be=Lt.onResize,Ve=Lt.onClear,Wt=Lt.onPressEnter,It=Lt.readOnly,gt=Lt.autoSize,At=Lt.onKeyDown,nn=(0,ge.Z)(Lt,Xe),$t=(0,ve.Z)(me,{value:de,defaultValue:me}),hn=(0,pe.Z)($t,2),at=hn[0],xe=hn[1],yt=at==null?"":String(at),xt=ht.useState(!1),Dt=(0,pe.Z)(xt,2),Ne=Dt[0],Zt=Dt[1],pt=ht.useRef(!1),St=ht.useState(null),Ft=(0,pe.Z)(St,2),xn=Ft[0],_t=Ft[1],Cn=(0,ht.useRef)(null),Tn=(0,ht.useRef)(null),Mn=function(){var Ot;return(Ot=Tn.current)===null||Ot===void 0?void 0:Ot.textArea},qn=function(){Mn().focus()};(0,ht.useImperativeHandle)(Dn,function(){var je;return{resizableTextArea:Tn.current,focus:qn,blur:function(){Mn().blur()},nativeElement:((je=Cn.current)===null||je===void 0?void 0:je.nativeElement)||Mn()}}),(0,ht.useEffect)(function(){Zt(function(je){return!z&&je})},[z]);var $n=ht.useState(null),Nn=(0,pe.Z)($n,2),Un=Nn[0],Rn=Nn[1];ht.useEffect(function(){if(Un){var je;(je=Mn()).setSelectionRange.apply(je,(0,Oe.Z)(Un))}},[Un]);var Fn=(0,fe.Z)(Nt,Tt),Sn=(ln=Fn.max)!==null&&ln!==void 0?ln:tt,Je=Number(Sn)>0,Qe=Fn.strategy(yt),Ge=!!Sn&&Qe>Sn,Mt=function(Ot,Ln){var zn=Ln;!pt.current&&Fn.exceedFormatter&&Fn.max&&Fn.strategy(Ln)>Fn.max&&(zn=Fn.exceedFormatter(Ln,{max:Fn.max}),Ln!==zn&&Rn([Mn().selectionStart||0,Mn().selectionEnd||0])),xe(zn),(0,$e.rJ)(Ot.currentTarget,Ot,Rt,zn)},Et=function(Ot){pt.current=!0,rt==null||rt(Ot)},Bt=function(Ot){pt.current=!1,Mt(Ot,Ot.currentTarget.value),dn==null||dn(Ot)},rn=function(Ot){Mt(Ot,Ot.target.value)},Yt=function(Ot){Ot.key==="Enter"&&Wt&&Wt(Ot),At==null||At(Ot)},Qt=function(Ot){Zt(!0),mt==null||mt(Ot)},wn=function(Ot){Zt(!1),sn==null||sn(Ot)},In=function(Ot){xe(""),qn(),(0,$e.rJ)(Mn(),Ot,Rt)},kn=bt,cn;Fn.show&&(Fn.showFormatter?cn=Fn.showFormatter({value:yt,count:Qe,maxLength:Sn}):cn="".concat(Qe).concat(Je?" / ".concat(Sn):""),kn=ht.createElement(ht.Fragment,null,kn,ht.createElement("span",{className:_e()("".concat(He,"-data-count"),se==null?void 0:se.count),style:ne==null?void 0:ne.count},cn)));var On=function(Ot){var Ln;be==null||be(Ot),(Ln=Mn())!==null&&Ln!==void 0&&Ln.style.height&&_t(!0)},qe=!gt&&!Tt&&!Re;return ht.createElement(we.BaseInput,{ref:Cn,value:yt,allowClear:Re,handleReset:In,suffix:kn,prefixCls:He,classNames:(0,De.Z)((0,De.Z)({},se),{},{affixWrapper:_e()(se==null?void 0:se.affixWrapper,(0,Ze.Z)((0,Ze.Z)({},"".concat(He,"-show-count"),Tt),"".concat(He,"-textarea-allow-clear"),Re))}),disabled:z,focused:Ne,className:_e()(ae,Ge&&"".concat(He,"-out-of-range")),style:(0,De.Z)((0,De.Z)({},te),xn&&!qe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof cn=="string"?cn:void 0}},hidden:oe,readOnly:It,onClear:Ve},ht.createElement(Le,(0,ie.Z)({},nn,{autoSize:gt,maxLength:tt,onKeyDown:Yt,onChange:rn,onFocus:Qt,onBlur:wn,onCompositionStart:Et,onCompositionEnd:Bt,className:_e()(se==null?void 0:se.textarea),style:(0,De.Z)((0,De.Z)({},ne==null?void 0:ne.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:He,onResize:On,ref:Tn,readOnly:It})))}),ot=Be,un=ot},8224:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return Ze}});var ie=he(4676);function Ze(De,Oe,pe,ge){var Ie=ie.unstable_batchedUpdates?function(we){ie.unstable_batchedUpdates(pe,we)}:pe;return De!=null&&De.addEventListener&&De.addEventListener(Oe,Ie,ge),{remove:function(){De!=null&&De.removeEventListener&&De.removeEventListener(Oe,Ie,ge)}}}},6790:function(jt,qt,he){"use strict";he.d(qt,{Z:function(){return Nt}});var ie=he(54476),Ze=he(76190),De=he(33885),Oe=he(20068),pe=he(42978),ge=he(75931),Ie=he(92310),_e=he.n(Ie),we=he(29301),fe=he(70425),$e=he(34280),ve=he(59301),ht=he(4676),Fe=ve.forwardRef(function(ae,te){var z=ae.height,oe=ae.offsetY,se=ae.offsetX,ne=ae.children,be=ae.prefixCls,Ve=ae.onInnerResize,Wt=ae.innerProps,It=ae.rtl,gt=ae.extra,At={},nn={display:"flex",flexDirection:"column"};return oe!==void 0&&(At={height:z,position:"relative",overflow:"hidden"},nn=(0,De.Z)((0,De.Z)({},nn),{},(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({transform:"translateY(".concat(oe,"px)")},It?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:At},ve.createElement(we.Z,{onResize:function(hn){var at=hn.offsetHeight;at&&Ve&&Ve()}},ve.createElement("div",(0,ie.Z)({style:nn,className:_e()((0,Oe.Z)({},"".concat(be,"-holder-inner"),be)),ref:te},Wt),ne,gt)))});Fe.displayName="Filler";var Me=Fe;function Pe(ae){var te=ae.children,z=ae.setRef,oe=ve.useCallback(function(se){z(se)},[]);return ve.cloneElement(te,{ref:oe})}function Ee(ae,te,z,oe,se,ne,be,Ve){var Wt=Ve.getKey;return ae.slice(te,z+1).map(function(It,gt){var At=te+gt,nn=be(It,At,{style:{width:oe},offsetX:se}),$t=Wt(It);return ve.createElement(Pe,{key:$t,setRef:function(at){return ne(It,at)}},nn)})}function nt(ae,te,z,oe){var se=z-ae,ne=te-z,be=Math.min(se,ne)*2;if(oe<=be){var Ve=Math.floor(oe/2);return oe%2?z+Ve+1:z-Ve}return se>ne?z-(oe-ne):z+(oe-se)}function ut(ae,te,z){var oe=ae.length,se=te.length,ne,be;if(oe===0&&se===0)return null;oe<se?(ne=ae,be=te):(ne=te,be=ae);var Ve={__EMPTY_ITEM__:!0};function Wt(hn){return hn!==void 0?z(hn):Ve}for(var It=null,gt=Math.abs(oe-se)!==1,At=0;At<be.length;At+=1){var nn=Wt(ne[At]),$t=Wt(be[At]);if(nn!==$t){It=At,gt=gt||nn!==Wt(be[At+1]);break}}return It===null?null:{index:It,multiple:gt}}function ft(ae,te,z){var oe=ve.useState(ae),se=(0,pe.Z)(oe,2),ne=se[0],be=se[1],Ve=ve.useState(null),Wt=(0,pe.Z)(Ve,2),It=Wt[0],gt=Wt[1];return ve.useEffect(function(){var At=ut(ne||[],ae||[],te);(At==null?void 0:At.index)!==void 0&&(z==null||z(At.index),gt(ae[At.index])),be(ae)},[ae]),[It]}var ct=he(16089),et=(typeof navigator=="undefined"?"undefined":(0,Ze.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ae=et,it=function(ae,te,z,oe){var se=(0,ve.useRef)(!1),ne=(0,ve.useRef)(null);function be(){clearTimeout(ne.current),se.current=!0,ne.current=setTimeout(function(){se.current=!1},50)}var Ve=(0,ve.useRef)({top:ae,bottom:te,left:z,right:oe});return Ve.current.top=ae,Ve.current.bottom=te,Ve.current.left=z,Ve.current.right=oe,function(Wt,It){var gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,At=Wt?It<0&&Ve.current.left||It>0&&Ve.current.right:It<0&&Ve.current.top||It>0&&Ve.current.bottom;return gt&&At?(clearTimeout(ne.current),se.current=!1):(!At||se.current)&&be(),!se.current&&At}};function Ut(ae,te,z,oe,se,ne,be){var Ve=(0,ve.useRef)(0),Wt=(0,ve.useRef)(null),It=(0,ve.useRef)(null),gt=(0,ve.useRef)(!1),At=it(te,z,oe,se);function nn(xt,Dt){if(ct.Z.cancel(Wt.current),!At(!1,Dt)){var Ne=xt;if(!Ne._virtualHandled)Ne._virtualHandled=!0;else return;Ve.current+=Dt,It.current=Dt,Ae||Ne.preventDefault(),Wt.current=(0,ct.Z)(function(){var Zt=gt.current?10:1;be(Ve.current*Zt,!1),Ve.current=0})}}function $t(xt,Dt){be(Dt,!0),Ae||xt.preventDefault()}var hn=(0,ve.useRef)(null),at=(0,ve.useRef)(null);function xe(xt){if(ae){ct.Z.cancel(at.current),at.current=(0,ct.Z)(function(){hn.current=null},2);var Dt=xt.deltaX,Ne=xt.deltaY,Zt=xt.shiftKey,pt=Dt,St=Ne;(hn.current==="sx"||!hn.current&&Zt&&Ne&&!Dt)&&(pt=Ne,St=0,hn.current="sx");var Ft=Math.abs(pt),xn=Math.abs(St);hn.current===null&&(hn.current=ne&&Ft>xn?"x":"y"),hn.current==="y"?nn(xt,St):$t(xt,pt)}}function yt(xt){ae&&(gt.current=xt.detail===It.current)}return[xe,yt]}function Ye(ae,te,z,oe){var se=ve.useMemo(function(){return[new Map,[]]},[ae,z.id,oe]),ne=(0,pe.Z)(se,2),be=ne[0],Ve=ne[1],Wt=function(gt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gt,nn=be.get(gt),$t=be.get(At);if(nn===void 0||$t===void 0)for(var hn=ae.length,at=Ve.length;at<hn;at+=1){var xe,yt=ae[at],xt=te(yt);be.set(xt,at);var Dt=(xe=z.get(xt))!==null&&xe!==void 0?xe:oe;if(Ve[at]=(Ve[at-1]||0)+Dt,xt===gt&&(nn=at),xt===At&&($t=at),nn!==void 0&&$t!==void 0)break}return{top:Ve[nn-1]||0,bottom:Ve[$t]}};return Wt}var We=he(67732),Ct=he(83652),Le=function(){function ae(){(0,We.Z)(this,ae),(0,Oe.Z)(this,"maps",void 0),(0,Oe.Z)(this,"id",0),(0,Oe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ct.Z)(ae,[{key:"set",value:function(z,oe){this.diffRecords.set(z,this.maps[z]),this.maps[z]=oe,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ae}(),Xe=Le;function Be(ae){var te=parseFloat(ae);return isNaN(te)?0:te}function ot(ae,te,z){var oe=ve.useState(0),se=(0,pe.Z)(oe,2),ne=se[0],be=se[1],Ve=(0,ve.useRef)(new Map),Wt=(0,ve.useRef)(new Xe),It=(0,ve.useRef)(0);function gt(){It.current+=1}function At(){var $t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;gt();var hn=function(){var yt=!1;Ve.current.forEach(function(xt,Dt){if(xt&&xt.offsetParent){var Ne=xt.offsetHeight,Zt=getComputedStyle(xt),pt=Zt.marginTop,St=Zt.marginBottom,Ft=Be(pt),xn=Be(St),_t=Ne+Ft+xn;Wt.current.get(Dt)!==_t&&(Wt.current.set(Dt,_t),yt=!0)}}),yt&&be(function(xt){return xt+1})};if($t)hn();else{It.current+=1;var at=It.current;Promise.resolve().then(function(){at===It.current&&hn()})}}function nn($t,hn){var at=ae($t),xe=Ve.current.get(at);hn?(Ve.current.set(at,hn),At()):Ve.current.delete(at),!xe!=!hn&&(hn?te==null||te($t):z==null||z($t))}return(0,ve.useEffect)(function(){return gt},[]),[nn,At,Wt.current,ne]}var un=14/15;function Lt(ae,te,z){var oe=(0,ve.useRef)(!1),se=(0,ve.useRef)(0),ne=(0,ve.useRef)(0),be=(0,ve.useRef)(null),Ve=(0,ve.useRef)(null),Wt,It=function($t){if(oe.current){var hn=Math.ceil($t.touches[0].pageX),at=Math.ceil($t.touches[0].pageY),xe=se.current-hn,yt=ne.current-at,xt=Math.abs(xe)>Math.abs(yt);xt?se.current=hn:ne.current=at;var Dt=z(xt,xt?xe:yt,!1,$t);Dt&&$t.preventDefault(),clearInterval(Ve.current),Dt&&(Ve.current=setInterval(function(){xt?xe*=un:yt*=un;var Ne=Math.floor(xt?xe:yt);(!z(xt,Ne,!0)||Math.abs(Ne)<=.1)&&clearInterval(Ve.current)},16))}},gt=function(){oe.current=!1,Wt()},At=function($t){Wt(),$t.touches.length===1&&!oe.current&&(oe.current=!0,se.current=Math.ceil($t.touches[0].pageX),ne.current=Math.ceil($t.touches[0].pageY),be.current=$t.target,be.current.addEventListener("touchmove",It,{passive:!1}),be.current.addEventListener("touchend",gt,{passive:!0}))};Wt=function(){be.current&&(be.current.removeEventListener("touchmove",It),be.current.removeEventListener("touchend",gt))},(0,$e.Z)(function(){return ae&&te.current.addEventListener("touchstart",At,{passive:!0}),function(){var nn;(nn=te.current)===null||nn===void 0||nn.removeEventListener("touchstart",At),Wt(),clearInterval(Ve.current)}},[ae])}function Dn(ae){return Math.floor(Math.pow(ae,.5))}function ln(ae,te){var z="touches"in ae?ae.touches[0]:ae;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function me(ae,te,z){ve.useEffect(function(){var oe=te.current;if(ae&&oe){var se=!1,ne,be,Ve=function(){ct.Z.cancel(ne)},Wt=function nn(){Ve(),ne=(0,ct.Z)(function(){z(be),nn()})},It=function($t){if(!($t.target.draggable||$t.button!==0)){var hn=$t;hn._virtualHandled||(hn._virtualHandled=!0,se=!0)}},gt=function(){se=!1,Ve()},At=function($t){if(se){var hn=ln($t,!1),at=oe.getBoundingClientRect(),xe=at.top,yt=at.bottom;if(hn<=xe){var xt=xe-hn;be=-Dn(xt),Wt()}else if(hn>=yt){var Dt=hn-yt;be=Dn(Dt),Wt()}else Ve()}};return oe.addEventListener("mousedown",It),oe.ownerDocument.addEventListener("mouseup",gt),oe.ownerDocument.addEventListener("mousemove",At),function(){oe.removeEventListener("mousedown",It),oe.ownerDocument.removeEventListener("mouseup",gt),oe.ownerDocument.removeEventListener("mousemove",At),Ve()}}},[ae])}var de=10;function mt(ae,te,z,oe,se,ne,be,Ve){var Wt=ve.useRef(),It=ve.useState(null),gt=(0,pe.Z)(It,2),At=gt[0],nn=gt[1];return(0,$e.Z)(function(){if(At&&At.times<de){if(!ae.current){nn(function(Fn){return(0,De.Z)({},Fn)});return}ne();var $t=At.targetAlign,hn=At.originAlign,at=At.index,xe=At.offset,yt=ae.current.clientHeight,xt=!1,Dt=$t,Ne=null;if(yt){for(var Zt=$t||hn,pt=0,St=0,Ft=0,xn=Math.min(te.length-1,at),_t=0;_t<=xn;_t+=1){var Cn=se(te[_t]);St=pt;var Tn=z.get(Cn);Ft=St+(Tn===void 0?oe:Tn),pt=Ft}for(var Mn=Zt==="top"?xe:yt-xe,qn=xn;qn>=0;qn-=1){var $n=se(te[qn]),Nn=z.get($n);if(Nn===void 0){xt=!0;break}if(Mn-=Nn,Mn<=0)break}switch(Zt){case"top":Ne=St-xe;break;case"bottom":Ne=Ft-yt+xe;break;default:{var Un=ae.current.scrollTop,Rn=Un+yt;St<Un?Dt="top":Ft>Rn&&(Dt="bottom")}}Ne!==null&&be(Ne),Ne!==At.lastTop&&(xt=!0)}xt&&nn((0,De.Z)((0,De.Z)({},At),{},{times:At.times+1,targetAlign:Dt,lastTop:Ne}))}},[At,ae.current]),function($t){if($t==null){Ve();return}if(ct.Z.cancel(Wt.current),typeof $t=="number")be($t);else if($t&&(0,Ze.Z)($t)==="object"){var hn,at=$t.align;"index"in $t?hn=$t.index:hn=te.findIndex(function(xt){return se(xt)===$t.key});var xe=$t.offset,yt=xe===void 0?0:xe;nn({times:0,index:hn,offset:yt,originAlign:at})}}}var sn=ve.forwardRef(function(ae,te){var z=ae.prefixCls,oe=ae.rtl,se=ae.scrollOffset,ne=ae.scrollRange,be=ae.onStartMove,Ve=ae.onStopMove,Wt=ae.onScroll,It=ae.horizontal,gt=ae.spinSize,At=ae.containerSize,nn=ae.style,$t=ae.thumbStyle,hn=ae.showScrollBar,at=ve.useState(!1),xe=(0,pe.Z)(at,2),yt=xe[0],xt=xe[1],Dt=ve.useState(null),Ne=(0,pe.Z)(Dt,2),Zt=Ne[0],pt=Ne[1],St=ve.useState(null),Ft=(0,pe.Z)(St,2),xn=Ft[0],_t=Ft[1],Cn=!oe,Tn=ve.useRef(),Mn=ve.useRef(),qn=ve.useState(hn),$n=(0,pe.Z)(qn,2),Nn=$n[0],Un=$n[1],Rn=ve.useRef(),Fn=function(){hn===!0||hn===!1||(clearTimeout(Rn.current),Un(!0),Rn.current=setTimeout(function(){Un(!1)},3e3))},Sn=ne-At||0,Je=At-gt||0,Qe=ve.useMemo(function(){if(se===0||Sn===0)return 0;var In=se/Sn;return In*Je},[se,Sn,Je]),Ge=function(kn){kn.stopPropagation(),kn.preventDefault()},Mt=ve.useRef({top:Qe,dragging:yt,pageY:Zt,startTop:xn});Mt.current={top:Qe,dragging:yt,pageY:Zt,startTop:xn};var Et=function(kn){xt(!0),pt(ln(kn,It)),_t(Mt.current.top),be(),kn.stopPropagation(),kn.preventDefault()};ve.useEffect(function(){var In=function(qe){qe.preventDefault()},kn=Tn.current,cn=Mn.current;return kn.addEventListener("touchstart",In,{passive:!1}),cn.addEventListener("touchstart",Et,{passive:!1}),function(){kn.removeEventListener("touchstart",In),cn.removeEventListener("touchstart",Et)}},[]);var Bt=ve.useRef();Bt.current=Sn;var rn=ve.useRef();rn.current=Je,ve.useEffect(function(){if(yt){var In,kn=function(qe){var je=Mt.current,Ot=je.dragging,Ln=je.pageY,zn=je.startTop;ct.Z.cancel(In);var Ce=Tn.current.getBoundingClientRect(),Se=At/(It?Ce.width:Ce.height);if(Ot){var Pt=(ln(qe,It)-Ln)*Se,dt=zn;!Cn&&It?dt-=Pt:dt+=Pt;var Te=Bt.current,lt=rn.current,wt=lt?dt/lt:0,Xt=Math.ceil(wt*Te);Xt=Math.max(Xt,0),Xt=Math.min(Xt,Te),In=(0,ct.Z)(function(){Wt(Xt,It)})}},cn=function(){xt(!1),Ve()};return window.addEventListener("mousemove",kn,{passive:!0}),window.addEventListener("touchmove",kn,{passive:!0}),window.addEventListener("mouseup",cn,{passive:!0}),window.addEventListener("touchend",cn,{passive:!0}),function(){window.removeEventListener("mousemove",kn),window.removeEventListener("touchmove",kn),window.removeEventListener("mouseup",cn),window.removeEventListener("touchend",cn),ct.Z.cancel(In)}}},[yt]),ve.useEffect(function(){return Fn(),function(){clearTimeout(Rn.current)}},[se]),ve.useImperativeHandle(te,function(){return{delayHidden:Fn}});var Yt="".concat(z,"-scrollbar"),Qt={position:"absolute",visibility:Nn?null:"hidden"},wn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return It?(Object.assign(Qt,{height:8,left:0,right:0,bottom:0}),Object.assign(wn,(0,Oe.Z)({height:"100%",width:gt},Cn?"left":"right",Qe))):(Object.assign(Qt,(0,Oe.Z)({width:8,top:0,bottom:0},Cn?"right":"left",0)),Object.assign(wn,{width:"100%",height:gt,top:Qe})),ve.createElement("div",{ref:Tn,className:_e()(Yt,(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},"".concat(Yt,"-horizontal"),It),"".concat(Yt,"-vertical"),!It),"".concat(Yt,"-visible"),Nn)),style:(0,De.Z)((0,De.Z)({},Qt),nn),onMouseDown:Ge,onMouseMove:Fn},ve.createElement("div",{ref:Mn,className:_e()("".concat(Yt,"-thumb"),(0,Oe.Z)({},"".concat(Yt,"-thumb-moving"),yt)),style:(0,De.Z)((0,De.Z)({},wn),$t),onMouseDown:Et}))}),Rt=sn,Re=20;function tt(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=ae/te*ae;return isNaN(z)&&(z=0),z=Math.max(z,Re),Math.floor(z)}var rt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],dn=[],bt={overflowY:"auto",overflowAnchor:"none"};function Jt(ae,te){var z=ae.prefixCls,oe=z===void 0?"rc-virtual-list":z,se=ae.className,ne=ae.height,be=ae.itemHeight,Ve=ae.fullHeight,Wt=Ve===void 0?!0:Ve,It=ae.style,gt=ae.data,At=ae.children,nn=ae.itemKey,$t=ae.virtual,hn=ae.direction,at=ae.scrollWidth,xe=ae.component,yt=xe===void 0?"div":xe,xt=ae.onScroll,Dt=ae.onVirtualScroll,Ne=ae.onVisibleChange,Zt=ae.innerProps,pt=ae.extraRender,St=ae.styles,Ft=ae.showScrollBar,xn=Ft===void 0?"optional":Ft,_t=(0,ge.Z)(ae,rt),Cn=ve.useCallback(function(Kt){return typeof nn=="function"?nn(Kt):Kt==null?void 0:Kt[nn]},[nn]),Tn=ot(Cn,null,null),Mn=(0,pe.Z)(Tn,4),qn=Mn[0],$n=Mn[1],Nn=Mn[2],Un=Mn[3],Rn=!!($t!==!1&&ne&&be),Fn=ve.useMemo(function(){return Object.values(Nn.maps).reduce(function(Kt,tn){return Kt+tn},0)},[Nn.id,Nn.maps]),Sn=Rn&>&&(Math.max(be*gt.length,Fn)>ne||!!at),Je=hn==="rtl",Qe=_e()(oe,(0,Oe.Z)({},"".concat(oe,"-rtl"),Je),se),Ge=gt||dn,Mt=(0,ve.useRef)(),Et=(0,ve.useRef)(),Bt=(0,ve.useRef)(),rn=(0,ve.useState)(0),Yt=(0,pe.Z)(rn,2),Qt=Yt[0],wn=Yt[1],In=(0,ve.useState)(0),kn=(0,pe.Z)(In,2),cn=kn[0],On=kn[1],qe=(0,ve.useState)(!1),je=(0,pe.Z)(qe,2),Ot=je[0],Ln=je[1],zn=function(){Ln(!0)},Ce=function(){Ln(!1)},Se={getKey:Cn};function Pt(Kt){wn(function(tn){var An;typeof Kt=="function"?An=Kt(tn):An=Kt;var vn=gr(An);return Mt.current.scrollTop=vn,vn})}var dt=(0,ve.useRef)({start:0,end:Ge.length}),Te=(0,ve.useRef)(),lt=ft(Ge,Cn),wt=(0,pe.Z)(lt,1),Xt=wt[0];Te.current=Xt;var an=ve.useMemo(function(){if(!Rn)return{scrollHeight:void 0,start:0,end:Ge.length-1,offset:void 0};if(!Sn){var Kt;return{scrollHeight:((Kt=Et.current)===null||Kt===void 0?void 0:Kt.offsetHeight)||0,start:0,end:Ge.length-1,offset:void 0}}for(var tn=0,An,vn,Wn,pr=Ge.length,en=0;en<pr;en+=1){var Vt=Ge[en],pn=Cn(Vt),bn=Nn.get(pn),jn=tn+(bn===void 0?be:bn);jn>=Qt&&An===void 0&&(An=en,vn=tn),jn>Qt+ne&&Wn===void 0&&(Wn=en),tn=jn}return An===void 0&&(An=0,vn=0,Wn=Math.ceil(ne/be)),Wn===void 0&&(Wn=Ge.length-1),Wn=Math.min(Wn+1,Ge.length-1),{scrollHeight:tn,start:An,end:Wn,offset:vn}},[Sn,Rn,Qt,Ge,Un,ne]),vt=an.scrollHeight,Gt=an.start,st=an.end,Ke=an.offset;dt.current.start=Gt,dt.current.end=st,ve.useLayoutEffect(function(){var Kt=Nn.getRecord();if(Kt.size===1){var tn=Array.from(Kt.keys())[0],An=Kt.get(tn),vn=Ge[Gt];if(vn&&An===void 0){var Wn=Cn(vn);if(Wn===tn){var pr=Nn.get(tn),en=pr-be;Pt(function(Vt){return Vt+en})}}}Nn.resetRecord()},[vt]);var Ht=ve.useState({width:0,height:ne}),yn=(0,pe.Z)(Ht,2),fn=yn[0],Pn=yn[1],Kn=function(tn){Pn({width:tn.offsetWidth,height:tn.offsetHeight})},Jn=(0,ve.useRef)(),ir=(0,ve.useRef)(),_n=ve.useMemo(function(){return tt(fn.width,at)},[fn.width,at]),tr=ve.useMemo(function(){return tt(fn.height,vt)},[fn.height,vt]),Gn=vt-ne,or=(0,ve.useRef)(Gn);or.current=Gn;function gr(Kt){var tn=Kt;return Number.isNaN(or.current)||(tn=Math.min(tn,or.current)),tn=Math.max(tn,0),tn}var dr=Qt<=0,yr=Qt>=Gn,br=cn<=0,Cr=cn>=at,hr=it(dr,yr,br,Cr),Pr=function(){return{x:Je?-cn:cn,y:Qt}},xr=(0,ve.useRef)(Pr()),fr=(0,fe.zX)(function(Kt){if(Dt){var tn=(0,De.Z)((0,De.Z)({},Pr()),Kt);(xr.current.x!==tn.x||xr.current.y!==tn.y)&&(Dt(tn),xr.current=tn)}});function Sr(Kt,tn){var An=Kt;tn?((0,ht.flushSync)(function(){On(An)}),fr()):Pt(An)}function ar(Kt){var tn=Kt.currentTarget.scrollTop;tn!==Qt&&Pt(tn),xt==null||xt(Kt),fr()}var lr=function(tn){var An=tn,vn=at?at-fn.width:0;return An=Math.max(An,0),An=Math.min(An,vn),An},nr=(0,fe.zX)(function(Kt,tn){tn?((0,ht.flushSync)(function(){On(function(An){var vn=An+(Je?-Kt:Kt);return lr(vn)})}),fr()):Pt(function(An){var vn=An+Kt;return vn})}),sr=Ut(Rn,dr,yr,br,Cr,!!at,nr),Rr=(0,pe.Z)(sr,2),Vr=Rr[0],Jr=Rr[1];Lt(Rn,Mt,function(Kt,tn,An,vn){var Wn=vn;return hr(Kt,tn,An)?!1:!Wn||!Wn._virtualHandled?(Wn&&(Wn._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Kt?tn:0,deltaY:Kt?0:tn}),!0):!1}),me(Sn,Mt,function(Kt){Pt(function(tn){return tn+Kt})}),(0,$e.Z)(function(){function Kt(An){var vn=dr&&An.detail<0,Wn=yr&&An.detail>0;Rn&&!vn&&!Wn&&An.preventDefault()}var tn=Mt.current;return tn.addEventListener("wheel",Vr,{passive:!1}),tn.addEventListener("DOMMouseScroll",Jr,{passive:!0}),tn.addEventListener("MozMousePixelScroll",Kt,{passive:!1}),function(){tn.removeEventListener("wheel",Vr),tn.removeEventListener("DOMMouseScroll",Jr),tn.removeEventListener("MozMousePixelScroll",Kt)}},[Rn,dr,yr]),(0,$e.Z)(function(){if(at){var Kt=lr(cn);On(Kt),fr({x:Kt})}},[fn.width,at]);var Tr=function(){var tn,An;(tn=Jn.current)===null||tn===void 0||tn.delayHidden(),(An=ir.current)===null||An===void 0||An.delayHidden()},Hr=mt(Mt,Ge,Nn,be,Cn,function(){return $n(!0)},Pt,Tr);ve.useImperativeHandle(te,function(){return{nativeElement:Bt.current,getScrollInfo:Pr,scrollTo:function(tn){function An(vn){return vn&&(0,Ze.Z)(vn)==="object"&&("left"in vn||"top"in vn)}An(tn)?(tn.left!==void 0&&On(lr(tn.left)),Hr(tn.top)):Hr(tn)}}}),(0,$e.Z)(function(){if(Ne){var Kt=Ge.slice(Gt,st+1);Ne(Kt,Ge)}},[Gt,st,Ge]);var Ir=Ye(Ge,Cn,Nn,be),Zr=pt==null?void 0:pt({start:Gt,end:st,virtual:Sn,offsetX:cn,offsetY:Ke,rtl:Je,getSize:Ir}),ii=Ee(Ge,Gt,st,at,cn,qn,At,Se),Fr=null;ne&&(Fr=(0,De.Z)((0,Oe.Z)({},Wt?"height":"maxHeight",ne),bt),Rn&&(Fr.overflowY="hidden",at&&(Fr.overflowX="hidden"),Ot&&(Fr.pointerEvents="none")));var Qn={};return Je&&(Qn.dir="rtl"),ve.createElement("div",(0,ie.Z)({ref:Bt,style:(0,De.Z)((0,De.Z)({},It),{},{position:"relative"}),className:Qe},Qn,_t),ve.createElement(we.Z,{onResize:Kn},ve.createElement(yt,{className:"".concat(oe,"-holder"),style:Fr,ref:Mt,onScroll:ar,onMouseEnter:Tr},ve.createElement(Me,{prefixCls:oe,height:vt,offsetX:cn,offsetY:Ke,scrollWidth:at,onInnerResize:$n,ref:Et,innerProps:Zt,rtl:Je,extra:Zr},ii))),Sn&&vt>ne&&ve.createElement(Rt,{ref:Jn,prefixCls:oe,scrollOffset:Qt,scrollRange:vt,rtl:Je,onScroll:Sr,onStartMove:zn,onStopMove:Ce,spinSize:tr,containerSize:fn.height,style:St==null?void 0:St.verticalScrollBar,thumbStyle:St==null?void 0:St.verticalScrollBarThumb,showScrollBar:xn}),Sn&&at>fn.width&&ve.createElement(Rt,{ref:ir,prefixCls:oe,scrollOffset:cn,scrollRange:at,rtl:Je,onScroll:Sr,onStartMove:zn,onStopMove:Ce,spinSize:_n,containerSize:fn.width,horizontal:!0,style:St==null?void 0:St.horizontalScrollBar,thumbStyle:St==null?void 0:St.horizontalScrollBarThumb,showScrollBar:xn}))}var He=ve.forwardRef(Jt);He.displayName="List";var Tt=He,Nt=Tt},93314:function(jt){"use strict";jt.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(jt,qt,he){"use strict";he.d(qt,{Z:function(){return _e}});const ie=we=>typeof we=="object"&&we!=null&&we.nodeType===1,Ze=(we,fe)=>(!fe||we!=="hidden")&&we!=="visible"&&we!=="clip",De=(we,fe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const $e=getComputedStyle(we,null);return Ze($e.overflowY,fe)||Ze($e.overflowX,fe)||(ve=>{const ht=(Fe=>{if(!Fe.ownerDocument||!Fe.ownerDocument.defaultView)return null;try{return Fe.ownerDocument.defaultView.frameElement}catch(Me){return null}})(ve);return!!ht&&(ht.clientHeight<ve.scrollHeight||ht.clientWidth<ve.scrollWidth)})(we)}return!1},Oe=(we,fe,$e,ve,ht,Fe,Me,Pe)=>Fe<we&&Me>fe||Fe>we&&Me<fe?0:Fe<=we&&Pe<=$e||Me>=fe&&Pe>=$e?Fe-we-ve:Me>fe&&Pe<$e||Fe<we&&Pe>$e?Me-fe+ht:0,pe=we=>{const fe=we.parentElement;return fe==null?we.getRootNode().host||null:fe},ge=(we,fe)=>{var $e,ve,ht,Fe;if(typeof document=="undefined")return[];const{scrollMode:Me,block:Pe,inline:Ee,boundary:nt,skipOverflowHiddenElements:ut}=fe,ft=typeof nt=="function"?nt:Rt=>Rt!==nt;if(!ie(we))throw new TypeError("Invalid target");const ct=document.scrollingElement||document.documentElement,et=[];let Ae=we;for(;ie(Ae)&&ft(Ae);){if(Ae=pe(Ae),Ae===ct){et.push(Ae);break}Ae!=null&&Ae===document.body&&De(Ae)&&!De(document.documentElement)||Ae!=null&&De(Ae,ut)&&et.push(Ae)}const it=(ve=($e=window.visualViewport)==null?void 0:$e.width)!=null?ve:innerWidth,Ut=(Fe=(ht=window.visualViewport)==null?void 0:ht.height)!=null?Fe:innerHeight,{scrollX:Ye,scrollY:We}=window,{height:Ct,width:Le,top:Xe,right:Be,bottom:ot,left:un}=we.getBoundingClientRect(),{top:Lt,right:Dn,bottom:ln,left:me}=(Rt=>{const Re=window.getComputedStyle(Rt);return{top:parseFloat(Re.scrollMarginTop)||0,right:parseFloat(Re.scrollMarginRight)||0,bottom:parseFloat(Re.scrollMarginBottom)||0,left:parseFloat(Re.scrollMarginLeft)||0}})(we);let de=Pe==="start"||Pe==="nearest"?Xe-Lt:Pe==="end"?ot+ln:Xe+Ct/2-Lt+ln,mt=Ee==="center"?un+Le/2-me+Dn:Ee==="end"?Be+Dn:un-me;const sn=[];for(let Rt=0;Rt<et.length;Rt++){const Re=et[Rt],{height:tt,width:rt,top:dn,right:bt,bottom:Jt,left:He}=Re.getBoundingClientRect();if(Me==="if-needed"&&Xe>=0&&un>=0&&ot<=Ut&&Be<=it&&(Re===ct&&!De(Re)||Xe>=dn&&ot<=Jt&&un>=He&&Be<=bt))return sn;const Tt=getComputedStyle(Re),Nt=parseInt(Tt.borderLeftWidth,10),ae=parseInt(Tt.borderTopWidth,10),te=parseInt(Tt.borderRightWidth,10),z=parseInt(Tt.borderBottomWidth,10);let oe=0,se=0;const ne="offsetWidth"in Re?Re.offsetWidth-Re.clientWidth-Nt-te:0,be="offsetHeight"in Re?Re.offsetHeight-Re.clientHeight-ae-z:0,Ve="offsetWidth"in Re?Re.offsetWidth===0?0:rt/Re.offsetWidth:0,Wt="offsetHeight"in Re?Re.offsetHeight===0?0:tt/Re.offsetHeight:0;if(ct===Re)oe=Pe==="start"?de:Pe==="end"?de-Ut:Pe==="nearest"?Oe(We,We+Ut,Ut,ae,z,We+de,We+de+Ct,Ct):de-Ut/2,se=Ee==="start"?mt:Ee==="center"?mt-it/2:Ee==="end"?mt-it:Oe(Ye,Ye+it,it,Nt,te,Ye+mt,Ye+mt+Le,Le),oe=Math.max(0,oe+We),se=Math.max(0,se+Ye);else{oe=Pe==="start"?de-dn-ae:Pe==="end"?de-Jt+z+be:Pe==="nearest"?Oe(dn,Jt,tt,ae,z+be,de,de+Ct,Ct):de-(dn+tt/2)+be/2,se=Ee==="start"?mt-He-Nt:Ee==="center"?mt-(He+rt/2)+ne/2:Ee==="end"?mt-bt+te+ne:Oe(He,bt,rt,Nt,te+ne,mt,mt+Le,Le);const{scrollLeft:It,scrollTop:gt}=Re;oe=Wt===0?0:Math.max(0,Math.min(gt+oe/Wt,Re.scrollHeight-tt/Wt+be)),se=Ve===0?0:Math.max(0,Math.min(It+se/Ve,Re.scrollWidth-rt/Ve+ne)),de+=gt-oe,mt+=It-se}sn.push({el:Re,top:oe,left:se})}return sn},Ie=we=>we===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(we)?we:{block:"start",inline:"nearest"};function _e(we,fe){if(!we.isConnected||!(ht=>{let Fe=ht;for(;Fe&&Fe.parentNode;){if(Fe.parentNode===document)return!0;Fe=Fe.parentNode instanceof ShadowRoot?Fe.parentNode.host:Fe.parentNode}return!1})(we))return;const $e=(ht=>{const Fe=window.getComputedStyle(ht);return{top:parseFloat(Fe.scrollMarginTop)||0,right:parseFloat(Fe.scrollMarginRight)||0,bottom:parseFloat(Fe.scrollMarginBottom)||0,left:parseFloat(Fe.scrollMarginLeft)||0}})(we);if((ht=>typeof ht=="object"&&typeof ht.behavior=="function")(fe))return fe.behavior(ge(we,fe));const ve=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:ht,top:Fe,left:Me}of ge(we,Ie(fe))){const Pe=Fe-$e.top+$e.bottom,Ee=Me-$e.left+$e.right;ht.scroll({top:Pe,left:Ee,behavior:ve})}}}}]);
|