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

1154 lines
740 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[7857],{40001:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});var re=le(60499),Je=le(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ze=me,be=le(7657),Ce=function(de,Ze){return Je.createElement(be.Z,(0,re.Z)({},de,{ref:Ze,icon:ze}))},Ne=Je.forwardRef(Ce),$e=Ne},73331:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});var re=le(60499),Je=le(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},ze=me,be=le(7657),Ce=function(de,Ze){return Je.createElement(be.Z,(0,re.Z)({},de,{ref:Ze,icon:ze}))},Ne=Je.forwardRef(Ce),$e=Ne},15277:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});var re=le(60499),Je=le(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ze=me,be=le(7657),Ce=function(de,Ze){return Je.createElement(be.Z,(0,re.Z)({},de,{ref:Ze,icon:ze}))},Ne=Je.forwardRef(Ce),$e=Ne},61485:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});var re=le(60499),Je=le(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ze=me,be=le(7657),Ce=function(de,Ze){return Je.createElement(be.Z,(0,re.Z)({},de,{ref:Ze,icon:ze}))},Ne=Je.forwardRef(Ce),$e=Ne},47472:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});var re=le(60499),Je=le(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ze=me,be=le(7657),Ce=function(de,Ze){return Je.createElement(be.Z,(0,re.Z)({},de,{ref:Ze,icon:ze}))},Ne=Je.forwardRef(Ce),$e=Ne},87395:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});var re=le(60499),Je=le(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},ze=me,be=le(7657),Ce=function(de,Ze){return Je.createElement(be.Z,(0,re.Z)({},de,{ref:Ze,icon:ze}))},Ne=Je.forwardRef(Ce),$e=Ne},88319:function(){"use strict"},94896:function(){"use strict"},74501:function(Wt,Tt){"use strict";Tt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},84915: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 Wt={},Tt="5.0",le={},re=null,Je=!1,me=!1,ze=null,be=!1,Ce=null,Ne=null,$e=0;$e<arguments.length;$e++){var Se=arguments[$e];if(Se!==null)switch(typeof Se){case"number":Tt=Se.toFixed(1);break;case"string":Se.match(new RegExp("^[0-9]\\.[0-9]+$"))?Tt=Se:ze=Se;break;case"object":typeof Se.is3D!="undefined"?re=Se:le=Se;break;case"boolean":Je=Se,me=!0;break}}re===null&&(re={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},le.material_id!==void 0&&!me&&(Je=!0)),ze!==null&&le.id===void 0&&(le.id=ze);var de="",Ze="",xe=!1,ot=null,Be=null,Me=null,Re=!1,Oe=null,rt=null,gt=null,xt=null,at=null;le.height!==void 0&&(le.height=Math.round(le.height)),le.width!==void 0&&(le.width=Math.round(le.width));var Ye=function(Ae){return parseFloat(Ae)>4?parseFloat(Ae):5};Wt.setHTML5Codebase=function(Ae,nt){Ne=Ae,ut(Ae,nt)},Wt.setJavaCodebase=Wt.setJavaCodebaseVersion=Wt.isCompiledInstalled=Wt.setPreCompiledScriptPath=Wt.setPreCompiledResourcePath=function(){},Wt.setHTML5CodebaseVersion=function(Ae,nt){var dt=parseFloat(Ae);if(dt!==NaN&&dt<5){console.log("The GeoGebra HTML5 codebase version "+dt+" is deprecated. Using version latest instead.");return}Ce=Ae,fe(Ae,nt)},Wt.getHTML5CodebaseVersion=function(){return Be},Wt.getParameters=function(){return le},Wt.setFontsCSSURL=function(Ae){xt=Ae},Wt.setGiacJSURL=function(Ae){},Wt.setJNLPFile=function(Ae){de=Ae},Wt.setJNLPBaseDir=function(Ae){},Wt.inject=function(){function Ae(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var nt="auto",dt=le.id,rn,Et=!1,Ut=0;Ut<arguments.length;Ut++){var Ge=arguments[Ut];typeof Ge=="string"?(Ge=Ge.toLowerCase(),Ge.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?nt=Ge:dt=arguments[Ut]):typeof Ge=="boolean"?Et=Ge:Ge instanceof HTMLElement&&(rn=Ge)}Pt();function Pt(){if(!be){setTimeout(Pt,200);return}nt=At(nt);var tt=rn||document.getElementById(dt);if(!tt){console.log("possibly bug on ajax loading? ");return}if(Wt.removeExistingApplet(tt,!1),le.width===void 0&&tt.clientWidth&&(le.width=tt.clientWidth),le.height===void 0&&tt.clientHeight&&(le.height=tt.clientHeight),!(le.width&&le.height)&&nt==="html5"&&(delete le.width,delete le.height),ot=nt,nt==="screenshot")et(tt,le);else{var ae=!1;le.hasOwnProperty("playButton")&&le.playButton||le.hasOwnProperty("clickToLoad")&&le.clickToLoad?ae=!0:le.hasOwnProperty("playButtonAutoDecide")&&le.playButtonAutoDecide&&(ae=(!st()||Ae())&&We()),ae?(ot="screenshot",Ct(tt,le,Et,nt)):Ke(tt,le,Et)}}};function st(){try{return window.self!==window.top}catch(Ae){return!0}}function We(){return le.hasOwnProperty("screenshotGenerator")&&le.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Wt.getViews=function(){return re},Wt.isJavaInstalled=function(){return!1};var St=function(Ae){var nt=function(Ut){var Ge=JSON.parse(Ut),Pt=function(ee){return ee.type=="G"||ee.type=="E"},tt=Ge.elements?Ge.elements.filter(Pt)[0]:Ge;if(!tt||!tt.url){dt();return}le.fileName=tt.url,Xe(tt.settings||{}),re.is3D=!0;var ae="https://www.geogebra.org/images/";Wt.setPreviewImage(Oe||tt.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Ae()},dt=function(){le.onError&&le.onError(),_t("Error: Fetching material (id "+le.material_id+") failed.",le)},rn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Et="/materials/"+le.material_id+"?scope=basic";_e("https://"+rn+"/api/proxy.php?path="+encodeURIComponent(Et),nt,dt)};function Xe(Ae){var nt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(dt){Ae[dt]=!!Ae[dt]}),nt.forEach(function(dt){le[dt]===void 0&&Ae[dt]!==void 0&&(le[dt]=Ae[dt])}),le.showToolBarHelp===void 0&&(le.showToolBarHelp=le.showToolBar)}function _e(Ae,nt,dt){var rn=new XMLHttpRequest;rn.open("GET",Ae),rn.onload=function(){nt(rn.responseText)},rn.onerror=dt,rn.send()}Wt.isHTML5Installed=function(){return!0},Wt.getLoadedAppletType=function(){return ot},Wt.setPreviewImage=function(Ae,nt,dt){Oe=Ae,rt=nt,gt=dt},Wt.removeExistingApplet=function(Ae,nt){var dt;typeof Ae=="string"&&(Ae=document.getElementById(Ae)),ot=null;var rn=null;for(dt=0;dt<Ae.childNodes.length;dt++){var Et=Ae.childNodes[dt],Ut=Et.className;Ut==="applet_screenshot"?nt?(Et.style.display="block",ot="screenshot"):Et.style.display="none":Ut!=="applet_scaler prerender"&&(Ae.removeChild(Et),rn=Ut&&Ut.indexOf("appletParameters")!=-1?Et.id:null,dt--)}var Ge=le.id!==void 0?le.id:rn,Pt=window[Ge];Pt&&typeof Pt.getBase64=="function"&&(Pt.remove(),window[Ge]=null)},Wt.refreshHitPoints=function(){if(Ye(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ae=Wt.getAppletObject();return Ae&&typeof Ae.recalculateEnvironments=="function"?(Ae.recalculateEnvironments(),!0):!1},Wt.startAnimation=function(){var Ae=Wt.getAppletObject();return Ae&&typeof Ae.startAnimation=="function"?(Ae.startAnimation(),!0):!1},Wt.stopAnimation=function(){var Ae=Wt.getAppletObject();return Ae&&typeof Ae.stopAnimation=="function"?(Ae.stopAnimation(),!0):!1},Wt.getAppletObject=function(){var Ae=le.id!==void 0?le.id:"ggbApplet";return window[Ae]},Wt.resize=function(){};var ft=function(Ae,nt,dt){var rn=document.createElement("param");rn.setAttribute("name",nt),rn.setAttribute("value",dt),Ae.appendChild(rn)},Le=function(Ae){return Ae&&Ae!=="false"},Ke=function(Ae,nt,dt){Ye(Be)<=4.2&&(dt=!0);var rn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Be||ggbHTML5LoadedCodebaseIsWebSimple&&!Re)&&(rn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Et=document.createElement("div");Et.classList.add("appletParameters","notranslate");var Ut=nt.width,Ge=nt.height;if(nt.disableAutoScale=nt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():nt.disableAutoScale,nt.width!==void 0)if(Ye(Be)<=4.4)Le(nt.showToolBar)&&(nt.height-=7),Le(nt.showAlgebraInput)&&(nt.height-=37),nt.width<605&&Le(nt.showToolBar)&&(nt.width=605,Ut=605);else{var Pt=100;(Le(nt.showToolBar)||Le(nt.showMenuBar))&&(nt.hasOwnProperty("customToolBar")&&(nt.customToolbar=nt.customToolBar),Pt=Le(nt.showMenuBar)?245:155),Ut<Pt&&(nt.width=Pt,Ut=Pt)}Et.style.border="none",Et.style.display="inline-block";for(var tt in nt)nt.hasOwnProperty(tt)&&tt!=="appletOnLoad"&&Et.setAttribute("data-param-"+tt,nt[tt]);xt&&Et.setAttribute("data-param-fontscssurl",xt),Wt.resize=function(){GGBAppletUtils.responsiveResize(Ae,nt)},window.addEventListener("resize",function(Dt){Wt.resize()});var ae=typeof nt.appletOnLoad=="function"?nt.appletOnLoad:function(){};if(!dt&&nt.width!==void 0){nt.hasOwnProperty("showSplash")||Et.setAttribute("data-param-showSplash","false");var ee=Ae.querySelector(".applet_scaler.prerender"),z=ee!==null;if(z)var ie=ee.querySelector(".ggb_preview");else{var ie=wt(Ut,Ge,nt.borderColor,!1);ee=document.createElement("div"),ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.style.width=Ut+"px",ee.style.height=Ge+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ee,"66%"),Ye(Be)>=5?(nt.appletOnLoad=function(Dt){var kt=Ae.querySelector(".ggb_preview");kt&&kt.parentNode.removeChild(kt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ee),window.GGBT_wsf_view&&$(window).trigger("resize"),ae(Dt)},z||ee.appendChild(ie)):Et.appendChild(ie),ee.appendChild(Et),z||Ae.appendChild(ee),setTimeout(function(){Wt.resize()},1)}else{var se=document.createElement("div");se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.appendChild(Et),Ae.appendChild(se),nt.appletOnLoad=function(Dt){Wt.resize(),ae(Dt)}}function ne(Dt,kt){kt&&typeof kt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Dt,kt.appletOnLoad):renderGGBElement(Dt),_t("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",kt)}function we(Dt,kt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Dt,params:kt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Gt){ne(Gt.article,Gt.params)}),html5AppletsToProcess=null)},Ye(Be)<5&&(Dt.className+=" geogebraweb")):ne(Dt,kt)}if(rn){scriptLoadStarted=!0;for(var Ve=0;Ve<Et.childNodes.length;Ve++){var It=Et.childNodes[Ve].tagName;It==="TABLE"&&(Et.removeChild(Et.childNodes[Ve]),Ve--)}if(ggbHTML5LoadedScript!==null){var je=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');je!=null&&je.parentNode.removeChild(je)}var Qe=document.createElement("script"),ht=function(){we(Et,nt)};Qe.src=Ze+Me,ggbHTML5LoadedCodebaseIsWebSimple=Re,ggbHTML5LoadedCodebaseVersion=Be,ggbHTML5LoadedScript=Qe.src,_t("GeoGebra HTML5 codebase loaded: '"+Ze+"'.",nt),!Ne&&(!Ce||Ce=="5.0")?(Re?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ht()):Ze.requirejs?__webpack_require__.e(4510).then(function(){var Dt=[__webpack_require__(4510)];ht.apply(null,Dt)}.bind(this)).catch(__webpack_require__.oe):(Qe.onload=ht,Ae.appendChild(Qe))}else we(Et,nt);nt.height=Ge,nt.width=Ut},et=function(Ae,nt,dt){var rn=wt(nt.width,nt.height,nt.borderColor,dt),Et=document.createElement("div");Et.style.position="relative",Et.style.display="block",Et.style.width=nt.width+"px",Et.style.height=nt.height+"px",Et.className="applet_screenshot applet_scaler"+(dt?" applet_screenshot_play":""),Et.appendChild(rn);var Ut=GGBAppletUtils.getScale(nt,Ae,dt);dt?(Ae.appendChild(Ie()),window.GGBT_wsf_view||(Ae.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Et,"66%"),Ae.appendChild(Et),Ut!==1&&!isNaN(Ut)&&(GGBAppletUtils.scaleElement(Et,Ut),Et.style.width=nt.width+"px",Et.style.height=nt.height+"px",Et.parentNode.style.width=nt.width*Ut+"px",Et.parentNode.style.height=nt.height*Ut+"px"),Wt.resize=function(){pe(Ae,rn,Et,dt)},window.addEventListener("resize",function(Ge){Wt.resize()}),Wt.resize()};function pe(Ae,nt,dt,rn){if(Ae.contains(nt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ae.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ae)}var Et=GGBAppletUtils.getScale(le,Ae,rn);dt.parentNode!==null&&(!isNaN(Et)&&Et!==1?(GGBAppletUtils.scaleElement(dt,Et),dt.parentNode.style.width=le.width*Et+"px",dt.parentNode.style.height=le.height*Et+"px"):(GGBAppletUtils.scaleElement(dt,1),dt.parentNode.style.width=le.width+"px",dt.parentNode.style.height=le.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ae),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Wt.onExitFullscreen=function(Ae,nt){nt.appendChild(Ae)};var Ct=function(Ae,nt,dt,rn){et(Ae,nt,!0);for(var Et=function(){var Pt=[];for(Ge=0;Ge<Ae.childNodes.length;Ge++)Pt.push(Ae.childNodes[Ge]);if(window.GGBT_wsf_view){var tt=window.GGBT_wsf_view.renderFullScreen(Ae,nt.id),ae=document.getElementById("fullscreencontainer"),ee=jQuery(Ae).find(".fullscreencontent");ee.length>0?(tt.remove(),ee.attr("id","fullscreencontent").show(),jQuery(ae).append(ee),window.dispatchEvent(new Event("resize"))):Ke(tt,nt,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else ot=rn,Ke(Ae,nt,!1);if(!window.GGBT_wsf_view)for(Ge=0;Ge<Pt.length;Ge++)Ae.removeChild(Pt[Ge])},Ut=Ae.getElementsByClassName("ggb_preview_play"),Ge=0;Ge<Ut.length;Ge++)Ut[Ge].addEventListener("click",Et,!1),Ut[Ge].addEventListener("ontouchstart",Et,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ae),We()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ie=function(){var Ae=document.createElement("div");if(Ae.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var nt='.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");}',dt=document.createElement("style");dt.styleSheet?dt.styleSheet.cssText=nt:dt.appendChild(document.createTextNode(nt)),document.getElementsByTagName("head")[0].appendChild(dt)}return Ae},wt=function(Ae,nt,dt,rn){var Et=document.createElement("div");Et.className="ggb_preview",Et.style.position="absolute",Et.style.zIndex="90",Et.style.width=Ae-2+"px",Et.style.height=nt-2+"px",Et.style.top="0px",Et.style.left="0px",Et.style.overflow="hidden",Et.style.backgroundColor="white";var Ut="lightgrey";dt!==void 0&&(dt==="none"?Ut="transparent":Ut=dt),Et.style.border="1px solid "+Ut;var Ge=document.createElement("img");if(Ge.style.position="relative",Ge.style.zIndex="1000",Ge.style.top="-1px",Ge.style.left="-1px",Oe!==null&&Ge.setAttribute("src",Oe),Ge.style.opacity=.7,rt!==null){var Pt,tt,ae;if(!rn){Pt=document.createElement("img"),Pt.style.position="absolute",Pt.style.zIndex="1001",Pt.style.opacity=1,Ge.style.opacity=.3,tt=360,tt>Ae/4*3&&(tt=Ae/4*3),ae=tt/5.8,Pt.setAttribute("src",rt),Pt.setAttribute("width",tt),Pt.setAttribute("height",ae);var ee=(Ae-tt)/2,z=(nt-ae)/2;Pt.style.left=ee+"px",Pt.style.top=z+"px",Et.appendChild(Pt)}}return Et.appendChild(Ge),Et},At=function(Ae){return Ae=Ae.toLowerCase(),Ae==="html5"||Ae==="screenshot"?Ae:"html5"},ye=["web","webSimple","web3d","tablet","tablet3d","phone"],fe=function(Ae,nt){if(Be=Ae,nt){ut(Be,!0);return}var dt=!Je;if(dt){var rn=Ye(Be);!isNaN(rn)&&rn<4.4&&(dt=!1)}var Et,Ut;window.location.protocol.substr(0,4)==="http"?Et=window.location.protocol:Et="http:";var Ge=Be.indexOf("//");Ge>0?Ut=Be:Ge===0?Ut=Et+Be:Ut="https://www.geogebra.org/apps/5.2.814.0/";for(var Pt in ye)if(Be.slice(ye[Pt].length*-1)===ye[Pt]||Be.slice((ye[Pt].length+1)*-1)===ye[Pt]+"/"){ut(Ut,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&dt&&!re.is3D&&!re.AV&&!re.SV&&!re.CV&&!re.EV2&&!re.CP&&!re.PC&&!re.DA&&!re.FI&&!re.PV&&!Le(le.showToolBar)&&!Le(le.showMenuBar)&&!Le(le.showAlgebraInput)&&!Le(le.enableRightClick)&&(!le.appName||le.appName=="classic")?Ut+="webSimple/":Ut+="web3d/",ut(Ut,!1)},ut=function(Ae,nt){if(Ae.requirejs){Ze=Ae;return}Ae.slice(-1)!=="/"&&(Ae+="/"),Ze=Ae,nt===null&&(nt=Ae.indexOf("http")===-1),xe=nt,Me="web.nocache.js",Re=!1;var dt=Ze.split("/");dt.length>1&&(!nt&&dt[dt.length-2]==="webSimple"?(Me="webSimple.nocache.js",Re=!0):ye.indexOf(dt[dt.length-2])>=0&&(Me=dt[dt.length-2]+".nocache.js")),dt=Ae.split("/"),Be=dt[dt.length-3],Be.substr(0,4)==="test"?Be=Be.substr(4,1)+"."+Be.substr(5,1):(Be.substr(0,3)==="war"||Be.substr(0,4)==="beta")&&(Be="5.0");var rn=parseFloat(Be);rn!==NaN&&rn<5&&Ae.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+rn+" is deprecated. Using version latest instead."),fe("5.0",nt))},_t=function(Ae,nt){window.console&&window.console.log&&(!nt||typeof nt.showLogging=="undefined"||nt.showLogging&&nt.showLogging!=="false")&&console.log(Ae)};le.material_id!==void 0?St(bt):bt();function bt(){var Ae=Tt;Ce!==null?Ae=Ce:parseFloat(Ae)<5&&(Ae="5.0"),fe(Ae,!1),Ne!==null&&ut(Ne,xe),be=!0}return Wt},GGBAppletUtils=function(){"use strict";function Wt(){return window.GGBT_wsf_edit!==void 0}function Tt(be,Ce){Ce!=1?(be.style.transformOrigin="0% 0% 0px",be.style.webkitTransformOrigin="0% 0% 0px",be.style.transform="scale("+Ce+","+Ce+")",be.style.webkitTransform="scale("+Ce+","+Ce+")",be.style.maxWidth="initial",be.querySelector(".ggb_preview")!==null&&(be.querySelector(".ggb_preview").style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[0]!==void 0&&(be.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[1]!==void 0&&(be.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(be.style.transform="none",be.style.webkitTransform="none")}function le(be,Ce,Ne,$e,Se,de){var Ze=null;if(de!=null&&de!="")for(var xe=be.parentNode;xe!=null;)if((" "+xe.className+" ").indexOf(" "+de+" ")>-1){Ze=xe;break}else xe=xe.parentNode;var ot=0,Be=0,Me=0,Re=0,Oe=0,rt=0,gt=0;if(Ze)ot=Ze.offsetWidth,Be=Math.max($e?Ze.offsetWidth:0,Ze.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ot=Math.min(window.innerWidth,document.documentElement.clientWidth),Be=Math.min(window.innerHeight,document.documentElement.clientHeight),Me=ot):(ot=window.innerWidth,Be=window.innerHeight,Me=window.innerWidth),be){var xt=be.getBoundingClientRect();xt.left>0&&xt.left<=ot&&(Se===void 0||!Se)&&(document.dir==="rtl"?(Oe=ot-xt.width-xt.left,rt=Me<=480?10:30):(rt=xt.left,Oe=Me<=480?10:30),Re=rt+Oe)}if(be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var at=be.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Re=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Re=0,gt=40)}}return be&&((Ne===void 0||!Ne)&&Ce>0&&Ce+Re<ot?ot=Ce:ot-=Re,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ne===void 0||!Ne)&&(Be-=gt)),{width:ot,height:Be}}function re(be,Ce,Ne,$e,Se){if(be.isScreenshoGenerator)return 1;var de=$e!==void 0&&$e,Ze=be.noScaleMargin!=null&&be.noScaleMargin,xe=function(at){return at&&at!=="false"},ot=xe(be.autoHeight),Be=le(Ce,be.width,Ne,ot,de&&window.GGBT_wsf_view||Ze,Se),Me=parseInt(Be.width),Re=be.width,Oe=be.height;if(Re===void 0){var rt=Ce.querySelector(".appletParameters");rt&&(Re=rt.offsetWidth,Oe=rt.offsetHeight)}var gt=Me/Re,xt=de?1:Be.height/Oe;return Ne!==void 0&&!Ne&&(gt=Math.min(1,gt),xt=Math.min(1,xt)),Math.min(gt,xt)}function Je(be,Ce,Ne){var $e=1,Se,de=!1;if(be.hasOwnProperty("allowUpscale")&&(de=be.allowUpscale),be.hasOwnProperty("scale")&&($e=parseFloat(be.scale),(isNaN($e)||$e===null||$e===0)&&($e=1),$e>1&&(de=!0)),Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(be.hasOwnProperty("disableAutoScale")&&be.disableAutoScale))Se=re(be,Ce,de,Ne,be.scaleContainerClass);else return $e;return de&&(!be.hasOwnProperty("scale")||$e===1)?Se:Math.min($e,Se)}function me(be){var Ce=Math.min(window.innerWidth,document.documentElement.clientWidth),Ne=Math.min(window.innerHeight,document.documentElement.clientHeight),$e=be.getBoundingClientRect(),Se=(Ce-$e.width)/2,de=(Ne-$e.height)/2;de<0&&(de=0),be.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Se<40?be.style.left="40px":be.style.left=Se+"px",be.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?be.style.top="40px":be.style.top=de+"px",be.style.left=Se+"px")}function ze(be,Ce){var Ne=be.querySelector(".appletParameters");if(Ne){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ce.id!==Ne.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(be)}if(Ne.parentElement&&/fullscreen/.test(Ne.parentElement.className))return;var $e=Je(Ce,be);Wt()&&Ne.setAttribute("data-param-scale",$e);for(var Se=null,de=0;de<be.childNodes.length;de++)if(be.childNodes[de].className!==void 0&&be.childNodes[de].className.match(/^applet_scaler/)){Se=be.childNodes[de];break}if(Se!==null&&Se.querySelector(".noscale")!==null)return;var Ze=Ce.id!==void 0?Ce.id:"ggbApplet",xe=window[Ze];(xe==null||!xe.recalculateEnvironments)&&Se!==null&&!Se.className.match(/fullscreen/)&&(Se.parentNode.style.transform="",!isNaN($e)&&$e!==1?(Se.parentNode.style.width=Ce.width*$e+"px",Se.parentNode.style.height=Ce.height*$e+"px",Tt(Se,$e)):(Tt(Se,1),Se.parentNode.style.width=Ce.width+"px",Se.parentNode.style.height=Ce.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&me(be),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ne).parents(".content-added-content"))}}return{responsiveResize:ze,isFlexibleWorksheetEditor:Wt,positionCenter:me,getScale:Je,scaleElement:Tt}}();__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 Wt=n.location.search;return Wt.indexOf(J)!=-1||Wt.indexOf(K)!=-1}function q(Wt,Tt){}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(Wt){var Tt=s[L].bindings;s[L].bindings=function(){for(var le=Tt?Tt():{},re=Wt[webModule.__softPermutationId],Je=O;Je<re.length;Je++){var me=re[Je];le[me[O]]=me[P]}return le}};var t;function u(){return v(),t}function v(){if(!t){var Wt=o.createElement(Q);if(Wt.id=L,Wt.style.cssText=R+S,Wt.tabIndex=-1,o.body.appendChild(Wt),t=Wt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Tt=document.compatMode==U?V:W;t.write(Tt+X),t.close()}}}function w(Wt){function Tt(re){function Je(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var me=Je();if(me){re();return}function ze(){if(!me){if(!Je())return;me=!0,re(),o.removeEventListener&&o.removeEventListener(Z,ze,!1),be&&clearInterval(be)}}o.addEventListener&&o.addEventListener(Z,ze,!1);var be=setInterval(function(){ze()},$)}function le(re){var Je=u(),me=Je.body,ze=Je.createElement(_);ze.language=ab,ze.crossOrigin=W,ze.src=re,webModule.__errFn&&(ze.onerror=function(){webModule.__errFn(L,new Error(bb+re))}),me.appendChild(ze)}Tt(function(){le(Wt)})}webModule.__startLoadingFragment=function(Wt){return C(Wt)},webModule.__installRunAsyncCode=function(Wt){var Tt=u(),le=Tt.body,re=Tt.createElement(_);re.language=ab,re.text=Wt,le.appendChild(re),le.removeChild(re)};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(Wt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Wt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Wt){var Tt=c[Wt];return Tt==null?null:Tt},r=d,webModule.__errFn=e}function B(){function Wt(be){var Ce=be.lastIndexOf(rb);Ce==-1&&(Ce=be.length);var Ne=be.indexOf(sb);Ne==-1&&(Ne=be.length);var $e=be.lastIndexOf(tb,Math.min(Ne,Ce));return $e>=O?be.substring(O,$e+P):W}function Tt(be){if(!be.match(/^\w+:\/\//)){var Ce=o.createElement(ub);Ce.src=be+vb,be=Wt(Ce.src)}return be}function le(){var be=__gwt_getMetaProperty(wb);return be!=null?be:W}function re(){for(var be=o.getElementsByTagName(_),Ce=O;Ce<be.length;++Ce)if(be[Ce].src.indexOf(xb)!=-1)return Wt(be[Ce].src);return W}function Je(){var be=o.getElementsByTagName(yb);return be.length>O?be[be.length-P].href:W}function me(){var be=o.location;return be.href==be.protocol+zb+be.host+be.pathname+be.search+be.hash}var ze=le();return ze==W&&(ze=re()),ze==W&&(ze=Je()),ze==W&&me()&&(ze=Wt(o.location.href)),ze=Tt(ze),ze}function C(Wt){return Wt.match(/^\//)||Wt.match(/^[a-zA-Z]+:\/\//)?Wt:webModule.__moduleBase+Wt}function D(){var Wt=[],Tt=O,le=[],re=[];function Je(be){var Ce=re[be](),Ne=le[be];if(Ce in Ne)return Ce;var $e=[];for(var Se in Ne)$e[Ne[Se]]=Se;throw r&&r(be,$e,Ce),null}if(__gwt_isKnownPropertyValue=function(be,Ce){return Ce in le[be]},webModule.__getPropMap=function(){var be={};for(var Ce in le)le.hasOwnProperty(Ce)&&(be[Ce]=Je(Ce));return be},webModule.__computePropValue=Je,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var me;try{me=Cb;var ze=me.indexOf(Db);ze!=-1&&(Tt=parseInt(me.substring(ze+P),$),me=me.substring(O,ze))}catch(be){}return webModule.__softPermutationId=Tt,C(me+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})()},23216:function(Wt,Tt,le){"use strict";le.d(Tt,{Ax:function(){return ze},Ds:function(){return be},KI:function(){return Ne},SI:function(){return me},f1:function(){return Je}});var re=le(14185);function Je($e){let Se=!0;if($e.length>0){for(let de=0;de<$e.length;de++)if($e[de].compile_success==0||!$e[de].compile_success){Se=!1;break}}else Se=!1;return Se}function me($e,Se=""){let de=[];for(let Ze=0;Ze<$e.length;Ze++){let xe=$e[Ze],ot=Se?`${Se}/${xe.name}`:`${xe.name}`;de.push({title:xe.name,type:xe.type,isLeaf:xe.type!=="tree",key:ot})}return de}function ze($e,Se,de){for(let Ze=0;Ze<$e.length;Ze++){let xe=$e[Ze];if(xe.key===Se){xe.children=de;break}xe.children&&ze(xe.children,Se,de)}return $e}function be($e,Se,de){let Ze;return function(){let xe=this,ot=arguments,Be=function(){Ze=null,de||$e.apply(xe,ot)},Me=de&&!Ze;clearTimeout(Ze),Ze=setTimeout(Be,Se),Me&&$e.apply(xe,ot)}}const Ce=!0,Ne=re.Z.API_SERVER},46642:function(Wt,Tt,le){"use strict";le.d(Tt,{t:function(){return xe}});var re=le(59301),Je=le(7939),me={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},ze=le(92310),be=le.n(ze),Ce=Object.defineProperty,Ne=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(ot,Be,Me)=>Be in ot?Ce(ot,Be,{enumerable:!0,configurable:!0,writable:!0,value:Me}):ot[Be]=Me,Ze=(ot,Be)=>{for(var Me in Be||(Be={}))$e.call(Be,Me)&&de(ot,Me,Be[Me]);if(Ne)for(var Me of Ne(Be))Se.call(Be,Me)&&de(ot,Me,Be[Me]);return ot};const xe=({cancelText:ot="\u53D6\u6D88",okText:Be="\u786E\u5B9A",loading:Me=!1,hasOkBtn:Re=!0,hasCancelBtn:Oe=!0,okButtonProps:rt={},onCancel:gt=()=>{},onOk:xt=()=>{},className:at=""})=>re.createElement("div",{className:be()(me.buttonFixed,at)},re.createElement("div",{className:me.buttonWrap},Oe&&re.createElement(Je.ZP,{size:"middle",className:`${me.button} mr20`,onClick:gt},ot),Re&&re.createElement(Je.ZP,Ze({size:"middle",type:"primary",className:`${me.button} mr20`,loading:Me,onClick:xt},rt),Be)))},40254:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return Ze}});var re=le(59301),Je={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},me=le(92310),ze=le.n(me),be=le(29787),Ce=le(2859),Ne=le(49317),$e=le(76406),Se=(xe,ot,Be)=>new Promise((Me,Re)=>{var Oe=xt=>{try{gt(Be.next(xt))}catch(at){Re(at)}},rt=xt=>{try{gt(Be.throw(xt))}catch(at){Re(at)}},gt=xt=>xt.done?Me(xt.value):Promise.resolve(xt.value).then(Oe,rt);gt((Be=Be.apply(xe,ot)).next())}),Ze=({data:xe,className:ot,fullWidth:Be,style:Me={},onClose:Re,onOk:Oe,showFullTools:rt,noAssociationId:gt})=>{const xt=(0,re.useRef)(null),at=(0,re.useRef)(null),Ye=(0,re.useRef)(null),st=(0,re.useRef)(null),[We,St]=(0,re.useState)(!1),[Xe,_e]=(0,re.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,re.useEffect)(()=>(Ye.current||(Ye.current=document.createElement("style"),document.head.appendChild(Ye.current)),xe!=null&&xe.visible?(document.body.setAttribute("data-custom","y-hidden"),Ye.current.innerHTML=" html { overflow-y: hidden; }",xe!=null&&xe.src&&ft()):(document.body.removeAttribute("data-custom"),Ye.current&&(document.head.removeChild(Ye.current),Ye.current=null)),()=>{document.body.removeAttribute("data-custom"),Ye.current&&(document.head.removeChild(Ye.current),Ye.current=null)}),[xe==null?void 0:xe.visible]);const ft=()=>Se(void 0,null,function*(){St(!0),_e("\u6B63\u5728\u52A0\u8F7D\u4E2D");const pe=yield(0,$e.ZJ)(xe==null?void 0:xe.src);xt.current.src="",xt.current.src=pe,xt.current.onload=function(){et()},St(!1),_e("")}),Le=pe=>Se(void 0,null,function*(){St(!0),_e("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Ct=yield(0,Ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:xe.title,file:pe.dataUrl}});Ct!=null&&Ct.id&&!gt?(yield(0,Ne.ZP)(`/api/attachments/${xe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Ct==null?void 0:Ct.id,settings:JSON.stringify(pe.state)}})).status===0&&Oe():Ct!=null&&Ct.id&&Oe(Ct),St(!1),_e("")}),Ke=()=>{const pe=document.querySelector('a[href="https://markerjs.com/"]');pe&&pe.parentNode&&(pe.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(Ie=>{const wt=document.querySelector(Ie.name);wt&&wt.setAttribute("title",Ie.title)})},et=()=>{at.current=new Ce.hP(xt.current),at.current.targetRoot=st.current,at.current.addEventListener("render",Le),at.current.addEventListener("beforeclose",Re),rt&&(at.current.availableMarkerTypes=at.current.ALL_MARKER_TYPES,at.current.uiStyleSettings.redoButtonVisible=!0,at.current.uiStyleSettings.notesButtonVisible=!0,at.current.uiStyleSettings.zoomButtonVisible=!0,at.current.uiStyleSettings.zoomOutButtonVisible=!0,at.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=at.current.uiStyleSettings,at.current.show(),xe!=null&&xe.snapshotData&&at.current.restoreState(xe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ke()},300)};return re.createElement(re.Fragment,null,(xe==null?void 0:xe.visible)&&re.createElement(be.Z,{spinning:We,tip:Xe,style:{position:"absolute",width:"100vw"}},re.createElement("div",{ref:st,className:ze()(Je.imageDimensions,ot,Be?Je.fullWidth:""),style:Me},re.createElement("img",{className:Je.img,ref:xt}))))}},9057:function(Wt,Tt,le){"use strict";var re=le(59301),Je=le(77019),me=le(5269),ze=le(31691),be=le(7939),Ce=le(35883),Ne=le(74501),$e=le(48136),Se=le(59301);const de=(0,re.forwardRef)(({callback:Ze,showSaveButton:xe,value:ot=""},Be)=>{const Me=(0,re.useRef)(),Re=[{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 "}]}]}],Oe=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],rt=at=>{Me.current.setValue(Me.current.getValue()+" "+at.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Se.createElement(Je.Z,{className:Ne.Z.lists,gutter:[10,10]},Re.map((at,Ye)=>Se.createElement(me.Z,{flex:"110px",className:Ne.Z.item},Se.createElement("div",null,Se.createElement(Ce.Z,{value:`$$${at.value}$$`}),at.name),Se.createElement("div",{className:Ne.Z.children},at.children.map((st,We)=>Se.createElement("div",{key:We},Se.createElement("h1",null,st.name),Se.createElement(Je.Z,{gutter:[10,10]},st.data.map((St,Xe)=>Se.createElement(me.Z,{key:Xe,onClick:()=>rt(St),className:Ne.Z.diamond},Se.createElement(Ce.Z,{value:"`$$"+St.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Se.createElement(Je.Z,{className:Ne.Z.lists,gutter:[10,10]},Oe.map((at,Ye)=>Se.createElement(me.Z,{flex:"110px",className:Ne.Z.item},Se.createElement("div",null,Se.createElement(Ce.Z,{value:"`$$"+at.value+"$$`"}),at.name),Se.createElement("div",{className:Ne.Z.children},at.children.map((st,We)=>Se.createElement("div",{key:We},st.name&&Se.createElement("h1",null,st.name),Se.createElement(Je.Z,{gutter:[10,10]},st.data.map((St,Xe)=>Se.createElement(me.Z,{key:Xe,onClick:()=>rt(St),className:Ne.Z.diamond},Se.createElement(Ce.Z,{value:"`$$"+St.value+"$$`"}))))))))))}],xt=()=>{var at=document.createElement("div");at.innerHTML=Me.current.getValue();var Ye=at.innerText;return Ze&&Ze(Ye),Ye};return(0,re.useImperativeHandle)(Be,()=>({getData:xt})),Se.createElement("div",{className:Ne.Z.mathWrap},Se.createElement(ze.default,{defaultActiveKey:"1",items:gt}),Se.createElement("math-field",{locale:"zh_cn",className:Ne.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Me,style:{width:800,marginTop:30,fontSize:18}},ot||""),xe&&Se.createElement("div",{className:Ne.Z.button},Se.createElement(be.ZP,{size:"large",onClick:xt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Tt.Z=de},90736:function(Wt,Tt,le){"use strict";var re=le(59301),Je=le(4977),me=le(7939),ze=Object.defineProperty,be=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(Be,Me,Re)=>Me in Be?ze(Be,Me,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Be[Me]=Re,Ze=(Be,Me)=>{for(var Re in Me||(Me={}))$e.call(Me,Re)&&de(Be,Re,Me[Re]);if(Ne)for(var Re of Ne(Me))Se.call(Me,Re)&&de(Be,Re,Me[Re]);return Be},xe=(Be,Me)=>be(Be,Ce(Me));const ot=({img:Be,buttonProps:Me={},styles:Re={},customText:Oe,ButtonText:rt,ButtonClick:gt,Buttonclass:xt,ButtonTwo:at,imgStyles:Ye,loading:st=!1,className:We=""})=>re.createElement("section",{className:`tc animated fadeIn ${We}`,style:Ze({color:"#999",margin:"100px auto",visibility:st?"hidden":"visible"},Re)},re.createElement("img",{src:Be||Je,style:xe(Ze({},Ye),{pointerEvents:"none",userSelect:"none"})}),re.createElement("p",{className:"mt20 font14"},Oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),rt&&re.createElement(me.ZP,Ze({className:xt,onClick:gt},Me),rt),at&&at);Tt.Z=ot},86974:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return xt}});var re=le(59301),Je={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},me=le(7939),ze=le(70557),be=le(34728),Ce=le(25399),Ne=le(76406),$e=le(84849),Se=le(90736),de=le(14185),Ze=le(52078),xe=le(59301),ot=Object.defineProperty,Be=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Oe=(at,Ye,st)=>Ye in at?ot(at,Ye,{enumerable:!0,configurable:!0,writable:!0,value:st}):at[Ye]=st,rt=(at,Ye)=>{for(var st in Ye||(Ye={}))Me.call(Ye,st)&&Oe(at,st,Ye[st]);if(Be)for(var st of Be(Ye))Re.call(Ye,st)&&Oe(at,st,Ye[st]);return at},gt=(at,Ye,st)=>new Promise((We,St)=>{var Xe=Le=>{try{ft(st.next(Le))}catch(Ke){St(Ke)}},_e=Le=>{try{ft(st.throw(Le))}catch(Ke){St(Ke)}},ft=Le=>Le.done?We(Le.value):Promise.resolve(Le.value).then(Xe,_e);ft((st=st.apply(at,Ye)).next())}),xt=({editOffice:at="view",data:Ye,issaver:st,onSaver:We,theme:St,type:Xe,filename:_e,monacoEditor:ft,className:Le,style:Ke,close:et,onClose:pe,hasMask:Ct,disabledDownload:Ie,onImgDimensions:wt,showNodata:At,recordInfo:ye})=>{const[fe,ut]=(0,re.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[_t,bt]=(0,re.useState)(""),[Ae,nt]=(0,re.useState)(),dt=window.ENV==="build"?"/react/build":"",rn=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,Ut=10*(1024*1024),Ge=(0,re.useRef)();Ye!=null&&Ye.startsWith("/api")&&Xe!=="txt"&&(Ye=de.Z.API_SERVER+Ye);const Pt=se=>se.substring(se.lastIndexOf("/")+1).split(".").pop();_e&&ft&&(ft.filename=_e),(0,re.useEffect)(()=>{var se,ne;const we=(ne=(se=document.cookie)==null?void 0:se.replace(/\s/g,""))==null?void 0:ne.split(";");we==null||we.map(Ve=>{let It=Ve.split("=");It[0]==="_educoder_session"&&bt(It[1])})},[]),(0,re.useEffect)(()=>{Xe==="office"&&(Ye.indexOf("bigfilescdn.")>-1||Ye.indexOf("bigfiles1")>-1?nt({url:Ye,fileType:Pt(Ye),model:Ye.indexOf("model=edit")?"edit":"view"}):Ye.indexOf("coze")>-1?nt({url:Ye,fileType:"doc",model:"view"}):ae())},[Xe,Ye]);function tt(se){return gt(this,null,function*(){se.data.type==="pdfdata"&&(We(se.data.data),window.removeEventListener("message",tt,!1)),console.log("mess---:",se.data)})}const ae=()=>gt(void 0,null,function*(){console.log("data:",Ye);let se=Ye;Ye.startsWith("http")||(se=location.origin+se);let ne=new URL(se).pathname.split("/").pop();const we=yield(0,$e.gJ)({attachment_id:ne});we.url=rn+we.url,nt(we)}),ee=()=>{if(Ye.startsWith("http")||Ye.startsWith("blob:")){z();return}(0,Ne.Sv)(_e||"educoder",Ye,_e)},z=()=>{ye&&(0,Ze.fc)({id:ye==null?void 0:ye.id,watch_type:1,course_id:ye==null?void 0:ye.course_id}),(0,Ne.Nd)(_e||"educoder",decodeURIComponent(Ye))};(0,re.useEffect)(()=>(window.addEventListener("message",ie),()=>{window.removeEventListener("message",ie)}),[]);const ie=se=>{var ne;((ne=se==null?void 0:se.data)==null?void 0:ne.type)==="closePop"&&pe()};return xe.createElement("div",{style:rt({},Ke||{}),className:`${Ct&&Je.bgBlack} ${Xe?Je.wrp:"hide"}`},!!Xe&&et&&xe.createElement("div",{id:"closePop",className:Je.close,ref:Ge},!!wt&&xe.createElement(Ce.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ge.current},xe.createElement("span",{onClick:()=>{pe(),wt()}},xe.createElement("i",{className:"icon-yulanpizhu"}))),!Ie&&window.parent===window&&xe.createElement(Ce.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ge.current},xe.createElement("span",{onClick:z},xe.createElement("i",{className:"icon-quxiaozhiding"}))),st&&xe.createElement(Ce.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ge.current},xe.createElement("span",{className:"",onClick:()=>{const se=document.getElementById("pdfiframe");window.addEventListener("message",tt,!1),setTimeout(()=>{se.contentWindow.postMessage("getData","*")},300)}},xe.createElement("i",{className:"icon-baocun"}))),xe.createElement(Ce.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ge.current},xe.createElement("span",{className:"",onClick:()=>{pe()}},xe.createElement("i",{className:"icon-guanbi1"})))),xe.createElement("div",{className:`${Je[Le]} ${Le} ${Je.monaco} ${Xe==="txt"?"show":"hide"}`},Xe==="txt"&&xe.createElement(xe.Fragment,null,xe.createElement(be.ZP,rt({},ft)))),Xe==="audio"&&xe.createElement("audio",{controls:!0,src:`${(Ye==null?void 0:Ye.indexOf("http://"))>-1||(Ye==null?void 0:Ye.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ye}`,autoPlay:!0}),Xe==="video"&&xe.createElement(xe.Fragment,null,(Ye==null?void 0:Ye.indexOf("http"))>-1?xe.createElement("video",{controls:!0,src:`${Ye}`,autoPlay:!0}):xe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ye}`,autoPlay:!0})),Xe==="office"&&Ae&&xe.createElement("iframe",{src:`${dt}/office.html?key=${Ae.key}&url=${btoa(Ae.url)}&callbackUrl=${rn+(Ae.callbackUrl||"")}&fileType=${Ae.fileType}&title=${Ae.title||""}&model=${at}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!Ie}`}),Xe==="html"&&xe.createElement("iframe",{src:Ye+"&disposition=inline"}),Xe==="pdf"&&xe.createElement("iframe",{id:"pdfiframe",src:`${dt}/js/pdf/index.html?filename=${_e||"educoder.pdf"}&url=${encodeURIComponent(Ye)}&disabledDownload=${!!Ie}&model=${at}`}),Xe==="image"&&xe.createElement("img",{src:`${(Ye==null?void 0:Ye.indexOf("http://"))>-1||(Ye==null?void 0:Ye.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ye}`}),(Xe==="other"||Xe==="download")&&xe.createElement(xe.Fragment,null,At?xe.createElement(Se.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:xe.createElement(me.ZP,{icon:xe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ee,disabled:Ie},"\u4E0B\u8F7D")}):xe.createElement(me.ZP,{type:"primary",size:"middle",onClick:ee,disabled:Ie},xe.createElement(ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Xe==="flowChart"&&xe.createElement("div",{className:"embed"},xe.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Ye||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(Wt,Tt,le){"use strict";le.d(Tt,{z:function(){return ft},Z:function(){return Le}});var re=le(59301),Je=le(46214),me=le(20047),ze=le(64018),be=le(16471),Ce=le(14185),Ne=le(76406),$e=le(15342),Se=le(44104),de=le(7939),Ze=le(1012),xe=le(86974),ot=le(59301),Me=({html:Ke})=>{const et=(0,re.useRef)(null),pe=(0,re.useRef)(null),Ct=`.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,re.useEffect)(()=>{const Ie=et.current.attachShadow({mode:"open"});pe.current=document.createElement("div"),pe.current.className="markdown-body",pe.current.innerHTML=Ke,Ie.appendChild(pe.current);const wt=document.createElement("style");return wt.textContent=Ct,Ie.appendChild(wt),()=>{Ie.innerHTML=""}},[]),(0,re.useEffect)(()=>{pe.current&&(pe.current.innerHTML=Ke)},[Ke]),ot.createElement("div",{ref:et})};function Re(Ke){const et=["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"],pe=new RegExp(`\\b(${et.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),Ct=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return Ke.replace(pe,"").replace(Ct,"").trim()}var Oe={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},rt=Object.defineProperty,gt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,Ye=(Ke,et,pe)=>et in Ke?rt(Ke,et,{enumerable:!0,configurable:!0,writable:!0,value:pe}):Ke[et]=pe,st=(Ke,et)=>{for(var pe in et||(et={}))xt.call(et,pe)&&Ye(Ke,pe,et[pe]);if(gt)for(var pe of gt(et))at.call(et,pe)&&Ye(Ke,pe,et[pe]);return Ke};const We="@\u2581\u2581@",St="@\u2581@",Xe=/<pre[^>]*>/g;function _e(Ke){let et=document.createElement("div");return et.innerHTML=Ke,et.childNodes.length===0?"":et.childNodes[0].nodeValue}const ft=(Ke,et)=>{Ke=Ke||"";const pe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ct=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ie=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,wt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return et?Ke.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(pe,(At,ye,fe,ut,_t,bt,Ae)=>{const nt=ye||ut||bt,dt=fe||_t||Ae||"?";return Ce.Z.API_SERVER+"/api/attachments/"+nt+dt+"&t="+(0,Ne.Jn)(nt,Date.now())+(At.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ke=Ke.replace(wt,(At,ye,fe,ut,_t,bt,Ae)=>{const nt=ye||ut||bt,dt=fe||_t||Ae||"?";return Ce.Z.API_SERVER+"/attachments/download/"+nt+dt+"&t="+(0,Ne.Jn)(nt,Date.now())+(At.indexOf(")")>-1?")":"&")}).replace(pe,(At,ye,fe,ut,_t,bt,Ae)=>{const nt=ye||ut||bt,dt=fe||_t||Ae||"?";return Ce.Z.API_SERVER+"/api/attachments/"+nt+dt+"&t="+(0,Ne.Jn)(nt,Date.now())+(At.indexOf(")")>-1?")":"&")}).replace(Ct,(At,ye,fe,ut,_t)=>{const bt=ye||ut,Ae=fe||_t||"";return'"'+Ce.Z.API_SERVER+"/api/attachments/"+bt+Ae+bt+Ae+"&t="+(0,Ne.Jn)(bt,Date.now())}).replace(Ie,(At,ye,fe,ut,_t)=>{const bt=ye||ut,Ae=fe||_t||"";return"("+Ce.Z.API_SERVER+"/files/uploads/"+bt+Ae+bt+Ae+"&t="+(0,Ne.Jn)(bt,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,`
`),Ke)};var Le=({value:Ke="",edit:et=!1,className:pe,showTextOnly:Ct,showLines:Ie,style:wt={},stylesPrev:At={},highlightKeywords:ye,showProgramFill:fe,isProgramFill:ut,disabledFill:_t=!1,programFillValue:bt,openEditor:Ae=()=>{},onFillChange:nt=Et=>{},onFillBlur:dt=()=>{},onFillFocus:rn=()=>{}})=>{let Et=Re(String(Ke||""));const Ut=(0,re.useRef)(),Ge=(0,re.useRef)(),[Pt,tt]=(0,re.useState)(""),[ae,ee]=(0,re.useState)("office"),[z,ie]=(0,re.useState)([]),se=(0,re.useRef)("a"+(0,Ze.Z)()),ne={},we=pt=>/<style[\s\S]*?>/i.test(pt||""),Ve=(pt,dn,Rt)=>{const Yt=document.createElement(pt===St?"input":"textarea");Yt.style.width="100%",Yt.style.height=pt===St?"40px":"151px",Yt.rows=5,Yt.spellcheck=!1,Yt.name="edu-program-fill",Yt.placeholder="\u8BF7\u8F93\u5165",Yt.dataset.id=dn;const an=Object.keys(ne).length;return ne[an]=Yt,`<span class="edu-program-fill-wrap ${pt===St?"":"show"}" style="width:${pt===St?"600px":"100%"}" title=${Rt||""}><span>${Yt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function It(pt){return pt=pt.replace(/!\[.*?\]\(.*?\)/g,""),pt=pt.replace(/\[.*?\]\(.*?\)/g,""),pt=pt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),pt=pt.replace(/<embed.*?>/g,""),pt=pt.replace(/<img.*?>/g,""),pt=pt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),pt=pt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),pt=pt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),pt=pt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),pt}const je=pt=>!Ct&&we(Et)?pt:pt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(dn,Rt){let Yt=Rt.replace(/(\n|\r)/g,"").split("}"),an=[];return Yt.map(Tn=>{Tn!=""&&an.push(`.${se.current} ${Tn}`)}),`<style>${an.join("}")}</style>`}),Qe=(0,re.useMemo)(()=>{(0,me.Iy)();try{const Yt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,an=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Tn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,bn=/\(\/attachments\/download\//g;Et=Et.replace(bn,"("+Ce.Z.API_SERVER+"/attachments/download/").replace(Yt,"("+Ce.Z.API_SERVER+"/api/attachments/").replace(an,'"'+Ce.Z.API_SERVER+"/api/attachments/").replace(Tn,'"'+Ce.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,`
`),Ut.current.style.display="none"}catch(Yt){}if(fe){let Yt=-1;return Et=Et.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(an,Tn,bn){var ke;return++Yt,Ve(an,Yt,(ke=bt==null?void 0:bt[Yt])==null?void 0:ke.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${je(Et||"")}</pre>`}let pt=je(Et);pt=(0,me.ZP)(pt);const dn=(0,me.ez)();Et.match(/\[TOC\]/)&&(pt=pt.replace("<p>[TOC]</p>",(0,me.Qv)()),(0,me.Iy)()),pt=pt.replace(/(__special_katext_id_\d+__)/g,(Yt,an)=>{const{type:Tn,expression:bn}=dn[an];return(0,$e.renderToString)(_e(bn)||"",{displayMode:Tn==="block",throwOnError:!1,output:"html"})}),pt=pt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,me.AL)();const Rt=document.createElement("div");if(Rt.innerHTML=pt,Ct)return Rt.innerText;if(ye){const Yt=ye.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Gt(Rt,Yt),Rt.innerHTML}return setTimeout(()=>sn(),500),Rt.innerHTML},[Et,ye]);(0,re.useEffect)(()=>{Zt.current&&Zt.current.querySelectorAll(["input","textarea"]).forEach(dn=>{dn.oninput=ht,dn.onblur=Dt,dn.onfocus=kt})},[z]),(0,re.useEffect)(()=>{var pt,dn,Rt,Yt,an;if(bt!=null&&bt.length)try{const Tn=Zt.current.querySelectorAll(".edu-program-fill-score"),bn=Zt.current.querySelectorAll('[name="edu-program-fill"]');for(const[ke,Ue]of bn.entries())Ue.value=((pt=bt==null?void 0:bt[ke])==null?void 0:pt.value)||"",((dn=bt==null?void 0:bt[ke])==null?void 0:dn.type)==="warning"?Ue.className="program-fill-warning":((Rt=bt==null?void 0:bt[ke])==null?void 0:Rt.type)==="success"?Ue.className="program-fill-success":Ue.className="";for(const[ke,Ue]of Tn.entries())Ue.innerHTML=(Yt=bt==null?void 0:bt[ke])!=null&&Yt.score?`${(an=bt==null?void 0:bt[ke])==null?void 0:an.score}\u5206`:"";ie(bt)}catch(Tn){console.log(Tn,"error")}},[bt]);const ht=pt=>{z[pt.target.dataset.id]=z[pt.target.dataset.id]||{},z[pt.target.dataset.id].value=pt.target.value,ie([...z]),nt(z,pt.target.dataset.id)},Dt=pt=>{z[pt.target.dataset.id]=z[pt.target.dataset.id]||{},z[pt.target.dataset.id].value=pt.target.value,ie([...z]),dt(z,pt.target.dataset.id)},kt=pt=>{z[pt.target.dataset.id]=z[pt.target.dataset.id]||{},z[pt.target.dataset.id].value=pt.target.value,ie([...z]),rn(z,pt.target.dataset.id)};function Gt(pt,dn){return pt.childNodes.forEach(Rt=>{var Yt;if(Rt.childNodes.length>0)Gt(Rt,dn);else if(Rt.nodeName!=="IMG")if(Rt.innerHTML)Rt.innerHTML=(Yt=Rt.innerHTML)==null?void 0:Yt.replace(new RegExp(dn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const an=document.createElement("span");an.innerHTML=Rt.textContent.replace(new RegExp(dn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Rt.replaceWith(an)}})}const Zt=(0,re.useRef)();me.jb.WebkitLineClamp=Ie,Ie&&(wt=st(st({},wt),me.jb));function Lt(pt){let dn=pt.target;if(dn.tagName.toUpperCase()==="A"){let Rt=dn.getAttribute("href");if(Rt.indexOf("office")>-1)pt.preventDefault(),tt(Rt),ee("office");else if(Rt.indexOf("application/pdf")>-1)pt.preventDefault(),tt(Rt),ee("pdf");else if(Rt.indexOf("text/html")>-1)pt.preventDefault(),tt(Rt),ee("html");else if(Rt.startsWith("#")){pt.preventDefault();let Yt=document.getElementById(Rt.replace("#",""));Yt&&Yt.scrollIntoView(!0)}}}const sn=()=>{var pt;const dn=(pt=Zt.current)==null?void 0:pt.querySelectorAll("video");dn==null||dn.forEach(Rt=>{if(Rt.oncontextmenu=()=>!1,Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(be.ZP.isSupported()){var Yt=new be.ZP;Yt.loadSource(Rt.src),Yt.attachMedia(Rt)}}})};(0,re.useEffect)(()=>{if(Zt.current&&Qe&&Qe.match(Xe)&&window.PR.prettyPrint(),Zt.current)return Zt.current.addEventListener("click",Lt),()=>{var pt;(pt=Zt.current)==null||pt.removeEventListener("click",Lt),(0,me.AL)(),(0,me.Iy)()}},[Qe,Zt.current,Lt]);const Jt=pt=>{pt.target.nodeName==="IMG"&&pt.target.className.indexOf("draw-flowchart")>-1?(Ut.current.style.zIndex=1,Ut.current.style.display="flex",Ut.current.style.width=pt.target.clientWidth+"px",Ut.current.style.height=pt.target.clientHeight+"px",Ut.current.style.top=pt.target.offsetTop+"px",Ut.current.style.left=pt.target.offsetLeft+"px",pt.target.id&&(Ge.current=pt.target.id)):Ut.current.style.display="none"},on=()=>{Ut.current.style.display="none"};return(0,re.useEffect)(()=>{var pt;const dn=Rt=>{Rt.preventDefault(),Rt.clipboardData.setData("text",window.getSelection().toString())};return(pt=Zt.current)==null||pt.addEventListener("copy",dn),()=>{var Rt;(Rt=Zt.current)==null||Rt.removeEventListener("copy",dn)}},[Zt.current]),re.createElement("div",{style:{position:"relative"},onMouseLeave:on},Ct&&re.createElement("div",{ref:Zt,className:`${Oe.mdBody} `},Qe),!Ct&&!we(Qe)&&re.createElement("div",{ref:Zt,style:st({},wt),onMouseOver:Jt,className:`${pe||""} ${_t?"disabled-fill":""} markdown-body ${Oe.mdBody} ${se.current}`,dangerouslySetInnerHTML:{__html:Qe}}),!Ct&&we(Qe)&&re.createElement(Me,{html:Qe}),re.createElement("div",{ref:Ut,className:`${Oe.button} ${et?"":Oe.previewFlowChart}`},re.createElement(Se.Z,null,re.createElement(de.ZP,{onClick:()=>{et?Ae(Ge.current):(tt(Ge.current),ee("flowChart"))}},et?"\u7F16\u8F91":"\u9884\u89C8"))),re.createElement(xe.Z,{close:!0,data:Pt,type:Pt!=null&&Pt.length?ae:"",style:st({},At),onClose:()=>tt("")}))}},28267:function(Wt,Tt,le){"use strict";le.d(Tt,{h:function(){return at}});var re=le(59301),Je=le(82326),me=le(28284),ze=le(7939),be=le(89780),Ce=le.n(be),Ne=le(88319),$e=le(94896),Se=Object.defineProperty,de=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Me=(Ye,st,We)=>st in Ye?Se(Ye,st,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ye[st]=We,Re=(Ye,st)=>{for(var We in st||(st={}))ot.call(st,We)&&Me(Ye,We,st[We]);if(xe)for(var We of xe(st))Be.call(st,We)&&Me(Ye,We,st[We]);return Ye},Oe=(Ye,st)=>de(Ye,Ze(st));const rt=Je.default.Option,gt={labelCol:{span:4},wrapperCol:{span:20}},xt={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"]};Tt.Z=({callback:Ye,onCancel:st})=>{const[We,St]=(0,re.useState)("python");function Xe(ft){St(xt[ft][1])}function _e(ft){Ye(ft)}return re.createElement(me.default,Oe(Re({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:_e,style:{width:500}}),re.createElement(me.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},re.createElement(Je.default,{getPopupContainer:ft=>ft.parentNode,onChange:Xe},Object.keys(xt).map(ft=>re.createElement(rt,{key:ft,value:ft},xt[ft][0])))),re.createElement(me.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},re.createElement(at,{mode:We})),re.createElement("div",{className:"flex-container flex-end"},re.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),re.createElement(ze.ZP,{type:"ghost",onClick:st},"\u53D6\u6D88")))};function at({value:Ye,onChange:st,mode:We,options:St={}}){const Xe=(0,re.useRef)(),[_e,ft]=(0,re.useState)();return(0,re.useEffect)(()=>{if(_e){let Le=function(Ke){const et=Ke.getValue();st&&st(et)};return _e.on("change",Le),()=>{_e.off("change",Le)}}},[_e,st]),(0,re.useEffect)(()=>{_e&&_e.setOption("mode",We)},[_e,We]),(0,re.useEffect)(()=>{_e&&(Ye!==_e.getValue()||Ye==="")&&setTimeout(()=>{_e.setValue(Ye||"")},300)},[_e,Ye]),(0,re.useEffect)(()=>{if(Xe.current&&!_e){const Le=Ce().fromTextArea(Xe.current,Re({mode:We,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},St));ft(Le)}},[Xe.current,_e]),re.createElement("div",{className:"my-codemirror-container"},re.createElement("textarea",{ref:Xe}))}},39116:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return Dn}});var re=le(59301),Je=le(44283),me=le(89780),ze=le.n(me),be=le(76374),Ce=le(88319),Ne=le(6313),$e=le(25717),Se=le(99498),de=le(25419),Ze=le(67549),xe=le(35883),ot=({value:tn="",className:yn,showTextOnly:un,showLines:Ln,style:Yn={}})=>{const zn=(0,re.useMemo)(()=>"",[tn]);return re.createElement(re.Fragment,null,re.createElement("div",{dangerouslySetInnerHTML:{__html:zn}}))},Be=Object.defineProperty,Me=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,xt=(tn,yn,un)=>yn in tn?Be(tn,yn,{enumerable:!0,configurable:!0,writable:!0,value:un}):tn[yn]=un,at=(tn,yn)=>{for(var un in yn||(yn={}))rt.call(yn,un)&&xt(tn,un,yn[un]);if(Oe)for(var un of Oe(yn))gt.call(yn,un)&&xt(tn,un,yn[un]);return tn},Ye=(tn,yn)=>Me(tn,Re(yn));let st=[{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 We({onActionCallback:tn,title:yn,icon:un,actionName:Ln,className:Yn="",children:zn}){function Bn(){tn(Ln)}return re.createElement("a",{title:yn,className:Yn,onClick:Bn},re.createElement("i",{className:`${un}`}),zn)}var St=({watch:tn,showNullButton:yn,showNullProgramButton:un,onActionCallback:Ln,fullScreen:Yn,insertTemp:zn,hidetoolBar:Bn,extraUse:_n})=>{const Vn=[...st,{title:`${tn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${tn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return re.createElement("ul",{className:"markdown-toolbar-container"},!Bn&&Vn.map((Qn,jn)=>re.createElement("li",{key:jn},Qn.actionName?re.createElement(We,Ye(at({},Qn),{onActionCallback:Ln})):re.createElement("span",{className:"v-line"}))),yn?re.createElement("li",null,re.createElement(We,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ln},re.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,un?re.createElement(re.Fragment,null,re.createElement("li",null,re.createElement(We,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ln},re.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),re.createElement("li",null,re.createElement(We,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ln},re.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,zn&&re.createElement("li",null,re.createElement(We,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${zn}`,onActionCallback:Ln},re.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_n&&re.createElement("li",null,_n),re.createElement("li",{className:"btn-full-screen"},re.createElement(We,{icon:`${Yn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Yn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ln})))},Xe=le(88487),_e=le(28284),ft=le(37568),Le=le(7939),Ke=Object.defineProperty,et=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,At=(tn,yn,un)=>yn in tn?Ke(tn,yn,{enumerable:!0,configurable:!0,writable:!0,value:un}):tn[yn]=un,ye=(tn,yn)=>{for(var un in yn||(yn={}))Ie.call(yn,un)&&At(tn,un,yn[un]);if(Ct)for(var un of Ct(yn))wt.call(yn,un)&&At(tn,un,yn[un]);return tn},fe=(tn,yn)=>et(tn,pe(yn));const ut={labelCol:{span:4},wrapperCol:{span:20}};var _t=({callback:tn,onCancel:yn})=>{function un(Ln){tn(Ln)}return re.createElement(_e.default,fe(ye({},ut),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:un,style:{width:500}}),re.createElement(_e.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},re.createElement(ft.default,null)),re.createElement(_e.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},re.createElement(ft.default,null)),re.createElement("div",{className:"flex-container flex-end"},re.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),re.createElement(Le.ZP,{type:"ghost",onClick:yn},"\u53D6\u6D88")))},bt=le(28267),Ae=le(53332),nt=le(62957),dt=le(77019),rn=le(40254),Et=le(59301),Ut=({callback:tn,onCancel:yn})=>{const un=document.createElement("canvas"),Ln=un.getContext("2d");un.width=1e3,un.height=800,Ln.fillStyle="#ffffff",Ln.fillRect(0,0,un.width,un.height);const Yn=un.toDataURL("image/png");return Et.createElement(nt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Et.createElement(dt.Z,{style:{height:"100vh"}},Et.createElement(rn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Yn,visible:!0,title:String(Date.now())},onOk:zn=>{tn({src:zn.url})},onClose:yn})))},Ge=le(36207),Pt=le(5269),tt=le(6767),ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ee=le(59301),ie=(0,re.forwardRef)(({onCancel:tn,editImgId:yn,callback:un},Ln)=>{let Yn=(0,re.useRef)(),zn=(0,re.useRef)(),Bn=(0,re.useRef)(),_n=(0,re.useRef)(!1);const Vn=(0,re.useRef)(!1);console.log("ref:",Ln);const[Qn,jn]=(0,re.useState)(0),[yt,Ht]=(0,re.useState)("100vh");return(0,re.useEffect)(()=>{jn(1)},[]),(0,re.useImperativeHandle)(Ln,()=>({setHeight:Ht})),ee.createElement("div",{ref:Vn,className:"body-overflow-initial"},ee.createElement(Ge.Z,{width:"100vw",height:yt,footer:null,closable:!0,placement:"bottom",open:!!Qn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ae.drawerWrap}`,onClose:()=>{window.saveDrawData(In=>{un({src:`/api/attachments/${In}`,id:In})})},title:ee.createElement(dt.Z,{align:"middle"},ee.createElement(Pt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(Pt.Z,{onClick:()=>{Ht(yt==="60px"?"100vh":"60px")}},ee.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ee.createElement(Pt.Z,{onClick:()=>{window.saveDrawData(In=>{if(In===null){tt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}tt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),un({src:`/api/attachments/${In}`,id:In,disabledClose:!0})})}},ee.createElement(Le.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ee.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${yn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:zn})))}),se=le(14185),ne=le(47889),we=le(4875);const Ve=ne.ZP.Group,It={margin:"0 8px"};var je=({callback:tn,onCancel:yn})=>{function un(Ln){tn(Ln)}return re.createElement(_e.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:un},re.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},re.createElement("span",{style:It},"\u5355\u5143\u683C\u6570\uFF1A"),re.createElement("span",{style:It},"\u884C\u6570"),re.createElement(_e.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},re.createElement(we.Z,null)),re.createElement("span",{style:It},"\u5217\u6570"),re.createElement(_e.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},re.createElement(we.Z,null))),re.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},re.createElement("span",{style:It},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),re.createElement(_e.default.Item,{name:"align"},re.createElement(Ve,null,re.createElement(ne.ZP,{value:"default"},re.createElement("i",{className:"fa fa-align-justify"})),re.createElement(ne.ZP,{value:"left"},re.createElement("i",{className:"fa fa-align-left"})),re.createElement(ne.ZP,{value:"center"},re.createElement("i",{className:"fa fa-align-center"})),re.createElement(ne.ZP,{value:"right"},re.createElement("i",{className:"fa fa-align-right"}))))),re.createElement("div",{className:"flex-container flex-end"},re.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),re.createElement(Le.ZP,{type:"ghost",onClick:yn},"\u53D6\u6D88")))},Qe=le(58755),ht=le(84915),Dt=le.n(ht),Gt=(0,re.forwardRef)(({use3d:tn,width:yn,height:un,callback:Ln,showSaveButton:Yn},zn)=>{const Bn=(0,re.useRef)(),_n=(0,re.useRef)(),[Vn,Qn]=(0,re.useState)(!1),jn=(0,re.useRef)({id:Bn,appName:"graphing",width:yn||1e3,height:un||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,re.useEffect)(()=>{_n.current=new(Dt())(jn.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const yt=()=>{var Ht=window.ggbApplet.getPNGBase64(1,!0,72);return Ln&&Ln(Ht),Ht};return(0,re.useEffect)(()=>{jn.current.appName=Vn?"3D":"graphing",_n.current.inject("applet_container")},[Vn]),(0,re.useEffect)(()=>{Qn(tn)},[tn]),(0,re.useImperativeHandle)(zn,()=>({getImgData:yt})),re.createElement(re.Fragment,null,re.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Bn}),re.createElement(dt.Z,{align:"middle"},re.createElement(Pt.Z,{flex:1},re.createElement(Qe.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Vn,onChange:Ht=>Qn(Ht)})),re.createElement(Pt.Z,null,re.createElement(Le.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Zt=le(9057);const Lt="link",sn="upload-image",Jt="add-flowchart",on="draw-image",pt="add-flowchart",dn="code-block",Rt="add-table",Yt="------------",an={default:Yt,left:`:${Yt}`,center:`:${Yt}:`,right:`${Yt}:`};var Tn=le(79006),bn=le(76406);function ke(){}let Ue=0;const mt=1e4,zt="\u2581",nn="@\u2581\u2581@",fn="@\u2581@",$n=`
**\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`,An=["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 pn(tn){return/^\d+$/.test(tn)?`${tn}px`:tn}const vn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Kn={[vn+"-B"]:"bold",[vn+"-I"]:"italic"},gn={[Lt]:"\u6DFB\u52A0\u94FE\u63A5",[dn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[sn]:"\u6DFB\u52A0\u56FE\u7247",[on]:"\u6DFB\u52A0\u753B\u56FE",[Jt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Rt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Dn=({defaultValue:tn="",onChange:yn,width:un="100%",height:Ln=400,miniToolbar:Yn=!1,isFocus:zn=!1,watch:Bn,insertTemp:_n,mode:Vn="markdown",id:Qn="markdown-editor-id",showResizeBar:jn=!1,noStorage:yt=!1,showNullButton:Ht=!1,showNullProgramButton:In=!1,hidetoolBar:Un=!1,fullScreen:Ee=!1,onBlur:He,onCMBeforeChange:ve,onFullScreen:De,className:ge="",disablePaste:Pe=!1,disabled:qe=!1,disabledFill:Bt=!1,placeholder:Nt="",values:Qt="",extraUse:Mt,onAddBlank:ct})=>{const[it,jt]=(0,re.useState)(null),[hn,ln]=(0,re.useState)(tn),[cn,Zn]=(0,re.useState)(Bn),[Xn,Jn]=(0,re.useState)(Ee),[Nn,Sn]=(0,re.useState)(""),[Pn,Hn]=(0,re.useState)(0),[ur,qn]=(0,re.useState)(Ln),[lr,ir]=(0,re.useState)(!1),[er,tr]=(0,re.useState)(0),[gr,mr]=(0,re.useState)(0),cr=(0,re.useRef)(),vr=(0,re.useRef)(),Cr=(0,re.useRef)(),or=(0,re.useRef)(),dr=(0,re.useRef)(),Fn=(0,re.useRef)(),wr=(0,Je.useDispatch)();(0,re.useEffect)(()=>{const Vt=window.scrollY||window.pageYOffset;ln(Qt),it==null||it.setValue(Qt),window.scrollTo(0,Vt)},[Qt]),(0,re.useEffect)(()=>{De==null||De(Xn)},[Xn]),(0,re.useEffect)(()=>{if(cr.current){let Vt=function(xn,Cn){var rr;if(Pe){Cn.preventDefault();return}const Mr=Cn.clipboardData;if(Mr){const br=Mr.types.toString(),Ir=Mr.items;if(br==="Files"||Mr.types.indexOf("Files")>-1){if(Cn.preventDefault(),Vn=="stex")return;try{let Dr=Ir[1];((rr=Ir[0])==null?void 0:rr.kind)==="file"&&(Dr=Ir[0]);const Lr=Dr.getAsFile(),Hr=Lr.name.split(".").pop();(0,Ae.I)(Lr,Or=>{var _r,ti,Di;Or.id?((_r=Lr==null?void 0:Lr.type)==null?void 0:_r.indexOf("image"))>-1?Kt.replaceSelection(`<img width="100%" src="/api/attachments/${Or.id}?type=${Or.content_type})" alt="" />`):((ti=Lr==null?void 0:Lr.type)==null?void 0:ti.indexOf("video"))>-1?Kt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Or.id}"></video>`):((Di=Lr==null?void 0:Lr.type)==null?void 0:Di.indexOf("pdf"))>-1?Kt.replaceSelection(`<a href="/api/attachments/${Or.id}?type=${Lr.type}&disposition=inline" target="_blank">${Lr.name}</a>`):An.includes(Hr)?Kt.replaceSelection(`<a href="/api/attachments/${Or.id}?type=office&disposition=inline" target="_blank">${Lr.name}</a>`):Kt.replaceSelection(`[${Lr.name}](/api/attachments/${Or.id}?type=${Or.content_type})`):(Or==null?void 0:Or.status)===401&&(document.location.href="/user/login")})}catch(Dr){tt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Kt=ze().fromTextArea(cr.current,{mode:Vn,lineNumbers:!Yn,lineWrapping:!0,value:tn,autoCloseTags:!0,autoCloseBrackets:!0});return Kt.on("keyup",function(xn,Cn){Cn.keyCode===8&&(xn.getValue()==""?Kt.setOption("placeholder",Nt):Kt.setOption("placeholder",null))}),Kt.on("keydown",function(xn,Cn){if(Cn.keyCode===8){var rr=jr(xn);rr&&Cn.preventDefault()}}),zn&&Kt.focus(),Kt.on("paste",Vt),qe&&Kt.on("beforeChange",function(xn,Cn){(Cn.origin==="paste"||Cn.origin==="+input")&&Cn.cancel()}),jt(Kt),()=>{Kt.off("paste",Vt)}}},[]);const Rr=(0,re.useCallback)(()=>{if(vr.current)try{}catch(Vt){console.log(Vt,"---- to set md editor body height")}},[ur,vr,Xn]);(0,re.useEffect)(()=>{function Vt(){let Kt=new be.Z(xn=>{for(let Cn of xn)(Cn.target.offsetHeight>0||Cn.target.offsetWidth>0)&&(Rr(),it.setSize("100%","100%"),it.refresh())});return Kt.observe(cr.current.parentElement),Kt}if(it){const Kt=Vt();return()=>{var xn,Cn;(xn=cr.current)!=null&&xn.parentElement&&Kt.unobserve((Cn=cr.current)==null?void 0:Cn.parentElement)}}},[it,Rr]),(0,re.useEffect)(()=>{if(it){let Vt=[];for(const[Kt,xn]of Object.entries(Kn)){let Cn={[Kt]:()=>{Er(xn)}};Vt.push(Cn),it.addKeyMap(Cn)}return()=>{for(let Kt of Vt)it.removeKeyMap(Kt)}}},[it]),(0,re.useEffect)(()=>{Ee!==Xn&&Jn(Ee)},[Ee]),(0,Tn.Z)(()=>{if(!yt&&Pn>0){let Vt=new Date().getTime(),Kt=window.sessionStorage.getItem(Qn);Vt>=Pn+mt&&(!Kt||Kt!==hn)&&(window.sessionStorage.setItem(Qn,hn),ir(!0))}},mt),(0,re.useEffect)(()=>{Zn(Bn)},[it,Bn]),(0,re.useEffect)(()=>{it&&zn&&it.focus()},[it,zn]),(0,re.useEffect)(()=>{if(cn&&it){let Vt=function(xn){let Cn=xn.target;if(or.current){let rr=Cn.scrollTop/Cn.scrollHeight;or.current.scrollTop=or.current.scrollHeight*rr}};const Kt=it.getScrollerElement();return Kt.addEventListener("scroll",Vt),()=>{Kt.removeEventListener("scroll",Vt)}}},[it,cn]),(0,re.useEffect)(()=>{if(it&&ve){let Vt=function(Kt,xn){ve(Kt,xn)};return it.on("beforeChange",Vt),()=>{it.off("beforeChange",Vt)}}},[it,ve]),(0,re.useEffect)(()=>{if(it&&He){let Vt=function(){He(it.getValue())};return it.on("blur",Vt),()=>{it.off("blur",Vt)}}},[it,He]);function jr(Vt,Kt){var xn=Vt.getDoc(),Cn=xn.getCursor(),rr=xn.getLine(Cn.line),Mr=rr.charAt(Cn.ch-1),br=rr.lastIndexOf("@\u2581@",Cn.ch),Ir=rr.lastIndexOf("@\u2581\u2581@",Cn.ch),Dr=br>Ir?br:Ir,Lr=br>Ir?3:4;if(nn.indexOf(Mr)===-1)return null;if(console.log("change1:",Kt,Vt,rr,Cn,Dr,br,Ir,Mr),Dr>=0&&Cn.ch-Dr<5){var Hr=Dr+Lr;return xn.replaceRange("",{line:Cn.line,ch:Dr},{line:Cn.line,ch:Hr}),{line:Cn.line,ch:Hr}}return null}(0,re.useEffect)(()=>{if(it){let Vt=function(Kt,xn){const Cn=Kt.getValue();ln(Cn),Hn(new Date().getTime()),Kt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),yn&&(In?yn(Cn,qt(Cn)):yn(Cn))};return it.on("change",Vt),()=>{it.off("change",Vt)}}},[it,yn]),(0,re.useEffect)(()=>{if(it)if(tn==null)it.setValue(""),ln("");else{const Vt=window.scrollY||window.pageYOffset;tn!==it.getValue()&&(it.setValue(tn),ln(tn),it.setCursor(qe?1:it.lineCount(),0),window.scrollTo(0,Vt))}},[it,tn]);const Er=(0,re.useCallback)(Vt=>{const Kt=it.getCursor(),xn=it.getSelection();let Cn=xn.split(`
`);switch(Vt){case"bold":return it.replaceSelection("**"+xn+"**"),xn===""&&it.setCursor(Kt.line,Kt.ch+2),it.focus();case"italic":return it.replaceSelection("*"+xn+"*"),xn===""&&it.setCursor(Kt.line,Kt.ch+1),it.focus();case"code":return it.replaceSelection("`"+xn+"`"),xn===""&&it.setCursor(Kt.line,Kt.ch+1),it.focus();case"inline-latex":return(0,bn.Ye)(wr)?void 0:(Sn("inline-latex"),it.focus());case"latex":return it.replaceSelection("```latex\n"+xn+"\n```"),it.setCursor(Kt.line+1,xn.length+1),it.focus();case"line-break":return it.replaceSelection(`<br/>
`),it.focus();case"list-ul":return xn===""?it.replaceSelection("- "+xn):it.replaceSelection(Cn.map(rr=>rr===""?"":`- ${rr}`).join(`
`)),it.focus();case"list-ol":return xn===""?it.replaceSelection("1. "+xn):it.replaceSelection(Cn.map((rr,Mr)=>rr===""?"":`${Mr+1}. ${rr}`).join(`
`)),it.focus();case"add-null-ch":ct==null||ct();return;case"add-signal":return xn===""&&it.setCursor(Kt.line,Kt.ch),it.replaceSelection(fn),it.focus();case"add-multiple":return xn===""&&it.setCursor(Kt.line,Kt.ch),it.replaceSelection(nn),it.focus();case"inster-template-1":return xn===""&&it.setCursor(Kt.line,Kt.ch),it.replaceSelection($n),it.focus();case"eraser":return it.setValue(""),it.focus();case"trigger-watch":return Zn(!cn),it.focus();case"trigger-full-screen":return Jn(!Xn),it.focus();case Lt:Sn(Lt);return;case dn:Sn(dn);return;case sn:Sn(sn);return;case on:Sn(on);return;case"maths-latex":if((0,bn.Ye)(wr))return;Sn("maths-latex");return;case Jt:dr.current="",sessionStorage.removeItem("file_id"),Sn(Jt);return;case Rt:Sn(Rt);return;default:throw new Error}},[it,cn,Xn]),Br=(0,re.useCallback)((Vt,Kt)=>{var xn,Cn,rr,Mr,br,Ir;Vt!=null&&Vt.disabledClose||Sn("");const{src:Dr,alt:Lr,id:Hr}=Vt||{};switch(Nn){case Lt:const{title:Fi,link:xi}=Vt;return it.replaceSelection(`[${Fi}](${xi})`),it.focus();case dn:const{language:mi,content:Yi}=Vt;return it.replaceSelection(["```"+mi,Yi,"```"].join(`
`)),it.focus();case"maths-latex":for(var Or=atob(Vt),_r=new Uint8Array(Or.length),ti=0;ti<Or.length;ti++)_r[ti]=Or.charCodeAt(ti);var Di=new Blob([_r],{type:"image/png"});return(0,Ae.I)(Di,vi=>{vi.id?it.replaceSelection(`![,](/api/attachments/${vi.id}?type=${vi.content_type})`):(vi==null?void 0:vi.status)===401&&(document.location.href="/user/login")}),it.focus();case"inline-latex":return(0,bn.Ye)(wr)?void 0:(it.replaceSelection("`$$"+Vt+"$$`"),it.focus());case pt:return Hr?(it.getValue().indexOf(Dr)===-1?it.replaceSelection(`<center><img id="${Hr}" width="80%" src="${Dr}" class="draw-flowchart" alt="${Lr||""}" /></center>`):document.getElementById(Hr).src=se.Z.API_SERVER+Dr+"?t="+Date.now(),it.focus()):void 0;case sn:case on:const Ar=Kt,to=(rr=(Cn=(xn=Ar==null?void 0:Ar.name)==null?void 0:xn.split("."))==null?void 0:Cn.pop)==null?void 0:rr.call(Cn);return((Mr=Ar==null?void 0:Ar.type)==null?void 0:Mr.indexOf("image"))>-1||!(Ar!=null&&Ar.type)?Ar!=null&&Ar.align||Ar!=null&&Ar.width?it.replaceSelection(`<p style="text-align:${Ar.align||"initial"}"><img width="${Ar.width?Ar.width+"%":"initial"}" src="${Dr}" alt="${Lr||""}" /></p>`):it.replaceSelection(`<img width="100%" src="${Dr}" alt="${Lr||""}" />`):((br=Ar==null?void 0:Ar.type)==null?void 0:br.indexOf("video"))>-1?it.replaceSelection(`<video width="100%" controls src="${Dr}"></video>`):((Ir=Ar==null?void 0:Ar.type)==null?void 0:Ir.indexOf("pdf"))>-1?it.replaceSelection(`<a href="${Dr}?type=${Ar.type}&disposition=inline" target="_blank">${Ar.name}</a>`):An.includes(to)?it.replaceSelection(`<a href="${Dr}?type=office&disposition=inline" target="_blank">${Ar.name}</a>`):it.replaceSelection(`[${Ar.name}](${Dr})`),it.focus();case Rt:const{row:ni,col:Ai,align:ao}=Vt;let Xi=`
`;for(let vi=0;vi<ni;vi++){let Bi=[],Gr=[];for(let zi=0;zi<Ai;zi++)vi===1&&Gr.push(an[ao]),Bi.push(" ");vi===1&&(Xi+=`| ${Gr.join(" | ")} |
`),Xi+=`| ${Bi.join(Ai===1?"":" | ")} |
`}return it.replaceSelection(Xi+`
`),it.focus();default:throw new Error}},[it,Nn]),kr=(0,re.useMemo)(()=>{switch(Nn){case Lt:return re.createElement(_t,{callback:Br,onCancel:Tr});case dn:return re.createElement(bt.Z,{callback:Br,onCancel:Tr});case sn:return re.createElement(Ae.Z,{callback:Br,onCancel:Tr});case Jt:return re.createElement(ie,{editImgId:dr.current,callback:Br,onCancel:Tr});case Rt:return re.createElement(je,{callback:Br,onCancel:Tr});case"maths-latex":return re.createElement(Gt,{showSaveButton:!0,callback:Br});case"inline-latex":return re.createElement(Zt.Z,{showSaveButton:!0,callback:Br});default:return null}},[Nn]);function Tr(){Sn("")}(0,re.useEffect)(()=>{if(Cr.current){let Vt=function(br){rr=!0,Mr=br.pageY},Kt=function(){rr=!1},xn=function(br){if(rr){let Ir=br.pageY-Mr;Ir<0&&(Ir=0),Ir>300&&(Ir=300);let Dr=Ln+Ir+"px";qn(Dr)}},Cn=Cr.current,rr=!1,Mr=0;return Cn.addEventListener("mousedown",Vt),document.addEventListener("mousemove",xn),document.addEventListener("mouseup",Kt),()=>{Cn.removeEventListener("mousedown",Vt),document.removeEventListener("mousemove",xn),document.removeEventListener("mouseup",Kt)}}},[it,Cr]),(0,re.useEffect)(()=>{qn(Ln)},[Ln]);const zr=pn(un),fr=pn(ur),Gn={width:zr,height:fr},$t=(0,re.useMemo)(()=>{if(Pn){let Vt=new Date(Pn),Kt=Vt.getHours(),xn=Vt.getMinutes(),Cn=Vt.getSeconds();return Kt=Kt<10?"0"+Kt:Kt,xn=xn<10?"0"+xn:xn,Cn=Cn<10?"0"+Cn:Cn,`${Kt}:${xn}:${Cn}`}return 0},[Pn]),qt=Vt=>{const Kt=[];if(In){let xn=-1;Vt=Vt.replace(/(@▁▁@|@▁@)/g,function(Cn,rr,Mr){Kt.push({multiLine:Cn!==fn})})}return Kt};function Xt(){window.sessionStorage.removeItem(Qn),ir(!1),Hn(0)}function Ot(){ir(!1),Hn(0),it.setValue(window.sessionStorage.getItem(Qn))}(0,re.useEffect)(()=>{gn[Nn]&&Nn!==on&&Nn!==Jt&&setTimeout(()=>{const Vt=document.getElementsByClassName("markdown-popup-form")[0],Kt=window.innerWidth/2-Vt.offsetWidth/2,xn=window.innerHeight/2-Vt.offsetHeight/2;tr(Kt),mr(xn)},0)},[Nn]);const En=Vt=>{Vt.preventDefault();const Kt=Vt.clientX-er,xn=Vt.clientY-gr;document.body.onmousemove=Cn=>{let rr=Cn.clientX-Kt,Mr=Cn.clientY-xn;const br=document.getElementsByClassName("markdown-popup-form")[0],Ir=window.innerWidth-br.offsetWidth,Dr=window.innerHeight-br.offsetHeight;rr=Math.max(0,Math.min(rr,Ir)),Mr=Math.max(0,Math.min(Mr,Dr)),On(Cn.clientX,Cn.clientY,Kt,xn)&&(tr(rr),mr(Mr))},document.body.onmouseup=function(){document.body.onmousemove=null}},On=(Vt,Kt,xn,Cn)=>{const rr=document.body.clientHeight,Mr=document.body.clientWidth;return Vt<20&&xn>Vt||Vt>Mr-20&&xn<Vt||Kt<20&&Cn>Kt||Kt>rr-20&&Cn<Kt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return re.createElement(re.Fragment,null,re.createElement("div",{className:"markdown-editor-wrapper",ref:vr},re.createElement("div",{className:`markdown-editor-container ${ge} ${cn?"on-preview":""} ${Yn?"mini":""} ${Xn?"full-screen":""}`,style:Gn},re.createElement(St,{insertTemp:_n,watch:cn,fullScreen:Xn,showNullButton:Ht,showNullProgramButton:In,onActionCallback:Er,hidetoolBar:Un,extraUse:Mt}),re.createElement("div",{className:"markdown-editor-body"},re.createElement("div",{className:"codemirror-container"},re.createElement("textarea",{ref:cr,placeholder:Nt})),cn?re.createElement("div",{ref:or,className:"preview-container"},Vn==="stex"&&re.createElement(ot,{value:hn}),Vn!=="stex"&&re.createElement(xe.Z,{edit:!0,disabledFill:Bt,showProgramFill:In,value:hn,openEditor:Vt=>{var Kt;dr.current=Vt,(Kt=Fn.current)==null||Kt.setHeight("100vh"),setTimeout(()=>{Sn("add-flowchart")},150)}})):null))),jn?re.createElement("a",{ref:Cr,className:"editor-resize"}):null,Nn===on&&re.createElement(Ut,{callback:Br,onCancel:Tr}),Nn===Jt&&re.createElement(ie,{ref:Fn,editImgId:dr.current,callback:Br,onCancel:Tr}),re.createElement(Xe.Z,null,gn[Nn]&&Nn!==on&&Nn!==Jt?re.createElement(nt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:er,top:gr},title:re.createElement("div",{style:{cursor:"move"},onMouseDown:En},gn[Nn]),open:!0,onCancel:Tr,footer:null,destroyOnClose:!0,width:Nn===Jt?"1200px":null,height:Nn===Jt?"80vh":null,className:"markdown-popup-form"},kr):null))}},53332:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return st},I:function(){return St}});var re=le(28284),Je=le(6767),me=le(37568),ze=le(44104),be=le(4875),Ce=le(47889),Ne=le(7939),$e=le(23216),Se=le(59301),de=le(59301),Ze=Object.defineProperty,xe=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Oe=(Xe,_e,ft)=>_e in Xe?Ze(Xe,_e,{enumerable:!0,configurable:!0,writable:!0,value:ft}):Xe[_e]=ft,rt=(Xe,_e)=>{for(var ft in _e||(_e={}))Me.call(_e,ft)&&Oe(Xe,ft,_e[ft]);if(Be)for(var ft of Be(_e))Re.call(_e,ft)&&Oe(Xe,ft,_e[ft]);return Xe},gt=(Xe,_e)=>xe(Xe,ot(_e));const{useForm:xt}=re.default,at={width:280,marginRight:10},Ye={labelCol:{span:5},wrapperCol:{span:19}};var st=({callback:Xe,onCancel:_e})=>{const[ft]=xt();let Le=(0,Se.useRef)();function Ke(Ct){Le.current.width=ft.getFieldValue("width"),Le.current.align=ft.getFieldValue("align"),Xe(Ct,Le.current)}function et(Ct,Ie){if(Ct.status===-1){Je.ZP.error(Ct.message);return}ft.setFieldsValue({src:`/api/attachments/${Ct.id}`,type:Ie.type})}function pe(Ct){let Ie=Ct.target.files[0];Le.current=Ie,St(Ie,et)}return de.createElement(re.default,gt(rt({form:ft},Ye),{className:"upload-image-panel",onFinish:Ke,style:{width:470,overflow:"hidden"}}),de.createElement(re.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(re.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(me.default,{style:at})),de.createElement(We,{onFileChange:pe}))),de.createElement(re.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(me.default,{style:{width:264}})),de.createElement(re.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(ze.Z,null,de.createElement(re.default.Item,{name:"width",style:{margin:0}},de.createElement(be.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(re.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(Ce.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"}]})),de.createElement("aside",null,de.createElement(re.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(Ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Ne.ZP,{type:"default",onClick:_e},"\u53D6\u6D88"))))};function We({onFileChange:Xe}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:Xe}))}function St(Xe,_e){if(!Xe)throw new String("\u6CA1\u6709\u6587\u4EF6");let ft=new FormData;ft.append("editormd-image-file",Xe),ft.append("file_param_name","editormd-image-file"),ft.append("byxhr","true");var Le=new window.XMLHttpRequest;Le.withCredentials=!0,Le.addEventListener("load",function(Ke){_e(JSON.parse(Ke.target.responseText),Xe)},!1),Le.addEventListener("error",function(Ke){console.error(Ke)},!1),Le.open("POST",`${$e.KI}/api/attachments.json`),Le.send(ft)}},88487:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return me}});var re=le(59301),Je=le(4676);class me extends re.Component{constructor(be){super(be);const Ce=window.document;this.node=Ce.createElement("div"),Ce.body.appendChild(this.node)}render(){const{children:be}=this.props;return(0,Je.createPortal)(be,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},34728:function(Wt,Tt,le){"use strict";le.d(Tt,{SV:function(){return Ut},ZP:function(){return Et}});var re=le(59301),Je=le(76374);const me={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"]},ze={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"]},be={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(`
`)}]},Ce={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(`
`)}]},Ne={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=le(53184),Se=le.n($e),de=(Ge,Pt,tt)=>new Promise((ae,ee)=>{var z=ne=>{try{se(tt.next(ne))}catch(we){ee(we)}},ie=ne=>{try{se(tt.throw(ne))}catch(we){ee(we)}},se=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,ie);se((tt=tt.apply(Ge,Pt)).next())});const Ze={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},xe=(Ge,Pt,tt,ae)=>{const ee=Pt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:tt.lineNumber,endColumn:tt.column});return Array.from(new Set(ee.match(/\b\w{2,}\b/g)||[])).map(ie=>({label:ie,kind:Ge.languages.CompletionItemKind.Text,insertText:ie,range:ae}))},ot=(Ge,Pt,tt,ae)=>{Ge.languages.registerCompletionItemProvider(Pt,{provideCompletionItems(ee,z){const ie=ee.getWordUntilPosition(z),se={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:ie.startColumn,endColumn:ie.endColumn},ne=ee.getLineContent(z.lineNumber).substring(ie.startColumn-2,ie.endColumn);return{suggestions:[...xe(Ge,ee,z,se),...tt.map(Ve=>({label:Ve,kind:Ge.languages.CompletionItemKind.Keyword,documentation:Ve,insertText:Ve,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se})),...ae.map(Ve=>({label:Ve.label,kind:Ge.languages.CompletionItemKind.Snippet,documentation:Ve.content,insertText:ne.startsWith("#")?Ve.content.replace(/#/,""):Ve.content,insertTextRules:Ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}))]}}})};var Be=Ge=>{Ze.languages.forEach(Pt=>{Ge.languages.registerDocumentFormattingEditProvider(Pt,{provideDocumentFormattingEdits(tt){return de(this,null,function*(){const ae=Se()(tt.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:tt.getFullModelRange(),text:ae}]})}})}),ot(Ge,"java",ze.keywords,ze.quickKey),ot(Ge,"cpp",be.keywords,be.quickKey),ot(Ge,"c",me.keywords,[]),ot(Ge,"python",Ce.keywords,Ce.quickKey),ot(Ge,"scala",Ne.keywords,Ne.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 Re=Object.defineProperty,Oe=(Ge,Pt,tt)=>Pt in Ge?Re(Ge,Pt,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Ge[Pt]=tt,rt=(Ge,Pt,tt)=>Oe(Ge,typeof Pt!="symbol"?Pt+"":Pt,tt);const gt=class zs{constructor(Pt,tt,ae){this.placeholder=Pt,this.editor=tt,this.monaco=ae,tt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return zs.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};rt(gt,"ID","editor.widget.placeholderHint");var at=gt,Ye=le(96236),st=le(6767),We=le(25399),St=le(78267),Xe=le(33156),_e=le(56102),ft=Object.defineProperty,Le=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Ie=(Ge,Pt,tt)=>Pt in Ge?ft(Ge,Pt,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Ge[Pt]=tt,wt=(Ge,Pt)=>{for(var tt in Pt||(Pt={}))pe.call(Pt,tt)&&Ie(Ge,tt,Pt[tt]);if(et)for(var tt of et(Pt))Ct.call(Pt,tt)&&Ie(Ge,tt,Pt[tt]);return Ge},At=(Ge,Pt)=>Le(Ge,Ke(Pt)),ye=(Ge,Pt)=>{var tt={};for(var ae in Ge)pe.call(Ge,ae)&&Pt.indexOf(ae)<0&&(tt[ae]=Ge[ae]);if(Ge!=null&&et)for(var ae of et(Ge))Pt.indexOf(ae)<0&&Ct.call(Ge,ae)&&(tt[ae]=Ge[ae]);return tt},fe=(Ge,Pt,tt)=>new Promise((ae,ee)=>{var z=ne=>{try{se(tt.next(ne))}catch(we){ee(we)}},ie=ne=>{try{se(tt.throw(ne))}catch(we){ee(we)}},se=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,ie);se((tt=tt.apply(Ge,Pt)).next())});function ut(Ge){return/^\d+$/.test(Ge)?`${Ge}px`:Ge}function _t(){}let bt=!1;const Ae={"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 nt(Ge=[]){let Pt=Ge;if(Array.isArray(Ge)){for(let tt=0;tt<Ge.length;tt++){let ae=Ae[Ge[tt]];if(ae)return ae}return Pt[0]}return Ae[Pt]||Pt}let dt=null;const rn=()=>fe(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Ge){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Ge)}});var Et=Ge=>{var Pt=Ge,{width:tt="100%",height:ae="100%",value:ee,language:z="javascript",style:ie={},options:se={},overrideServices:ne={},theme:we="vs-dark",onEditBlur:Ve,isCopy:It=!1,onSave:je,autoHeight:Qe=!1,forbidCopy:ht=!1,forbidCopyTips:Dt,onChange:kt=_t,editorDidMount:Gt=_t,onFocus:Zt=_t,onBreakPoint:Lt=_t,breakPointValue:sn=[],filename:Jt="educoder.txt",errorLine:on,errorContent:pt="",highlightLine:dn,openBreakPoint:Rt=!1,placeholder:Yt="",showMiniMap:an=!0}=Pt,Tn=ye(Pt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const bn=(0,re.useRef)(),ke=(0,re.useRef)({}),Ue=(0,re.useRef)(),mt=(0,re.useRef)(),zt=(0,re.useRef)([]),nn=(0,re.useRef)(!1),fn=(0,re.useRef)(),$n=(0,re.useRef)(),An=(0,re.useRef)(!1),[pn,wn]=(0,re.useState)(!1);function vn(){let yt;return bn.current&&(yt=new Je.Z(Ht=>{for(let In of Ht)(In.target.offsetHeight>0||In.target.offsetWidth>0)&&ke.current.instance.layout()}),yt.observe(bn.current)),yt}function Kn(){st.ZP.warning({content:decodeURIComponent(Dt||Me),key:"monaco-editor-tip"})}const gn=()=>{let yt=ke.current.instance;if(ee!=null&&yt&&pn){const Ht=yt.getModel();Ht&&ee!==Ht.getValue()&&(bt=!0,Ht.setValue(ee),yt.layout(),bt=!1)}};(0,re.useEffect)(()=>{const yt=Xe.Z.subscribe("formatDocument",Ht=>{var In;let Un=ke.current.instance;(In=Un==null?void 0:Un.getAction)==null||In.call(Un,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ht=>{kt(Ht)},yt},[]),(0,re.useEffect)(()=>{var yt;let Ht=ke.current.instance;mt.current&&clearTimeout(mt.current),mt.current=setTimeout(()=>{gn()},500),ee&&(ee!=null&&ee.length)&&((yt=Ht==null?void 0:Ht.updateOptions)==null||yt.call(Ht,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ee.split(/\r\n|\r|\n/g).length))+3,5)}))},[ee,pn,ke.current]),(0,re.useEffect)(()=>{if(on&&ke.current&&ke.current.instance){let Ht=ke.current.instance;Ht.changeViewZones(function(In){var Un=document.createElement("div");Un.style.padding="10px 20px",Un.style.width="calc(100% - 20px)",Un.className="my-error-line-wrp",Un.innerHTML=pt,In.addZone({afterLineNumber:on||11,heightInLines:3,domNode:Un})});var yt={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}};Ht.addOverlayWidget(yt),Ht.revealPositionInCenter({lineNumber:20,column:1})}},[on,ke.current,pn]);const Dn=(yt="",Ht)=>{if(!yt||yt.trim()==="")return!0;const Un=ke.current.instance.getModel().getLineTokens(Ht);let Ee=!1;for(let He=0;He<2;He++)Un.getStandardTokenType(He)===1&&(Ee=!0);return Ee};(0,re.useEffect)(()=>{var yt;const Ht=(yt=ke.current)==null?void 0:yt.instance;if(Ht&&pn&&ht){const In=Ht.onDidBlurEditorWidget(()=>{An.current=!1}),Un=Ht.onDidFocusEditorText(()=>{An.current=!0});return()=>{In.dispose(),Un.dispose()}}},[ke.current,pn,ht]),(0,re.useEffect)(()=>{var yt;if((yt=ke.current)!=null&&yt.instance&&pn&&Rt){let Ht=ke.current.instance,In=Ht.getModel();if(!In)return;(()=>{var Mt;let ct=[],it=[];const jt=In.getAllDecorations();for(let ln of jt)ln.options.className==="highlighted-line"&&(ct.push((Mt=ln==null?void 0:ln.range)==null?void 0:Mt.startLineNumber),it.push(ln==null?void 0:ln.id));if(dn===ct[0])return;In.deltaDecorations(it,[]);const hn=In.getLineCount();dn&&dn<=hn&&(Ht.deltaDecorations([],[{range:new dt.Range(dn,1,dn,In.getLineMaxColumn(dn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ht.revealLineInCenter(dn))})();const Ee=(Mt=!1)=>{var ct;let it=[],jt=[];const hn=In.getAllDecorations();for(let ln of hn)ln.options.linesDecorationsClassName==="breakpoints-select"&&(it.push((ct=ln==null?void 0:ln.range)==null?void 0:ct.startLineNumber),jt.push(ln==null?void 0:ln.id));if(Mt)return{lines:it,ids:jt};Lt(it)},He=Mt=>fe(void 0,null,function*(){let ct={range:new dt.Range(Mt,1,Mt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield In.deltaDecorations([],[ct]),Ee()}),ve=Mt=>fe(void 0,null,function*(){let ct=[];const it=Ht.getLineDecorations(Mt);for(let jt of it)jt.options.linesDecorationsClassName==="breakpoints-select"&&ct.push(jt.id);yield In.deltaDecorations(ct,[]),Ee()}),De=Mt=>{let ct=Ht.getLineDecorations(Mt);for(let it of ct)if(it.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,St.isEqual)(sn,Ee(!0).lines)){In.deltaDecorations(Ee(!0).ids,[]);const Mt=sn.map(ct=>({range:new dt.Range(ct,1,ct,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));In.deltaDecorations([],Mt)}const ge=Ht.onDidChangeModelContent(Mt=>{let ct=Ht.getPosition();if(ct){let it=ct.lineNumber;clearTimeout($n.current),$n.current=setTimeout(()=>{Dn(In.getLineContent(it),it)?ve(it):De(it)?(ve(it),He(it)):Ee()},100)}}),Pe=Ht.onMouseDown(Mt=>{var ct,it,jt;if(Mt.target.detail&&((jt=(it=(ct=Mt.target)==null?void 0:ct.element)==null?void 0:it.className)!=null&&jt.includes("line-numbers"))){let hn=Mt.target.position.lineNumber;if(Dn(In.getLineContent(hn),hn))return;De(hn)?ve(hn):He(hn)}}),qe=Mt=>{let ct={range:new dt.Range(Mt,1,Mt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};zt.current=Ht.deltaDecorations(zt.current,[ct])},Bt=()=>{zt.current=Ht.deltaDecorations(zt.current,[])},Nt=Ht.onMouseMove(Mt=>{var ct,it,jt;if(Bt(),Mt.target.detail&&((jt=(it=(ct=Mt.target)==null?void 0:ct.element)==null?void 0:it.className)!=null&&jt.includes("line-numbers"))){let hn=Mt.target.position.lineNumber;if(Dn(In.getLineContent(hn),hn))return;qe(hn)}}),Qt=Ht.onMouseLeave(()=>{Bt()});return()=>{ge.dispose(),Pe.dispose(),Nt.dispose(),Qt.dispose()}}},[ke.current,pn,sn,dn,Rt,z]),(0,re.useEffect)(()=>{var yt;(yt=ke.current)!=null&&yt.instance&&Rt&&ke.current.instance.setPosition({lineNumber:0,column:0})},[dn]);function tn(){let yt=ke.current.instance;if(yt){const Ht=yt.getSelection(),In=ke.current.pastePos||{},Un=new dt.Range(In.startLineNumber||Ht.endLineNumber,In.startColumn||Ht.endColumn,In.endLineNumber||Ht.endLineNumber,In.endColumn||Ht.endColumn);setTimeout(()=>{yt.executeEdits("",[{range:Un,text:""}])},300)}}function yn(yt){(window.navigator.platform.match("Mac")?yt.metaKey:yt.ctrlKey)&&yt.keyCode==83&&(yt.preventDefault(),je())}const un=()=>{if(Qe&&ke.current.instance){const yt=ke.current.instance.getContentHeight();Qn(yt<ae?ae:yt)}else Qn(ae)};function Ln(yt){var Ht=document.createEvent("MouseEvents");Ht.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),yt.dispatchEvent(Ht)}const Yn=yt=>{if(!An.current)return;const{keyCode:Ht,ctrlKey:In,metaKey:Un,target:Ee,type:He}=yt;return(He==="paste"||(Ht===67||Ht===86)&&(Un||In))&&Ee.nodeName==="TEXTAREA"&&(Kn(),yt.preventDefault()),!1};function zn(yt,Ht){var In=window.URL||window.webkitURL||window,Un=new Blob([Ht]),Ee=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ee.href=In.createObjectURL(Un),Ee.download=yt,Ln(Ee)}(0,re.useEffect)(()=>{un()},[un]),(0,re.useEffect)(()=>{bn.current&&!pn&&Promise.all([le.e(8909),le.e(5977)]).then(le.bind(le,71448)).then(yt=>{try{dt=yt,ke.current.instance=dt.editor.create(bn.current,{value:ee,language:nt(z),theme:we,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:an||!1}},ne);const Ht=ke.current.instance;let Ee=[...Ye.BH._menuItems].find(ge=>ge[0]._debugName=="EditorContext")[1],He=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ve=(ge,Pe)=>{var qe,Bt;let Nt=ge._first;do Pe.includes((Bt=(qe=Nt.element)==null?void 0:qe.command)==null?void 0:Bt.id)&&ge._remove(Nt);while(Nt=Nt.next)};if(Gt(Ht,dt),setTimeout(()=>{un(),ke.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{zn(Jt||"educoder.txt",Ht.getValue())}})},500),ke.current.subscription=Ht.onDidChangeModelContent(ge=>{nn.current?clearTimeout(fn.current):(un(),kt(Ht.getValue(),ge)),fn.current=setTimeout(()=>{nn.current=!1},500)}),window.Monaco||Be(dt,nt(z)),ht&&(ve(Ee,He),bn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Yn),window.removeEventListener("paste",Yn),window.addEventListener("keydown",Yn),window.addEventListener("paste",Yn)),window.Monaco=dt,Ve&&Ht.onDidBlurEditorWidget(()=>{Ve(Ht.getValue())}),Zt&&Ht.onDidFocusEditorText(()=>{ht&&rn(),Zt(Ht.getValue())}),ht){rn();try{Ht.onDidPaste(ge=>{const Pe=Ht.getSelection(),qe=ke.current.pastePos||{},Bt=new dt.Range(qe.startLineNumber||Pe.endLineNumber,qe.startColumn||Pe.endColumn,qe.endLineNumber||Pe.endLineNumber,qe.endColumn||Pe.endColumn);Ht.executeEdits("",[{range:ge.range,text:""}])})}catch(ge){}}let De=vn();return Yt&&typeof Yt=="string"&&new at(Yt,Ht,dt),wn(!0),()=>{const ge=ke.current.instance;ge.dispose();const Pe=ge.getModel();Pe&&Pe.dispose(),ke.current.subscription&&ke.current.subscription.dispose(),De.unobserve(bn.current)}}catch(Ht){}})},[]),(0,re.useEffect)(()=>{if(ke.current.instance&&pn)return document.addEventListener("keydown",yn,!1),()=>{document.removeEventListener("keydown",yn)}},[je,pn]),(0,re.useEffect)(()=>{let yt=ke.current.instance;if(yt&&pn){let Ht=nt(z);dt.editor.setModelLanguage(yt.getModel(),Ht)}},[z,pn]),(0,re.useEffect)(()=>{ke.current.instance&&pn&&dt.editor.setTheme(we)},[we,pn]),(0,re.useEffect)(()=>{let yt=ke.current.instance;Ue.current=se,yt&&pn&&(yt.updateOptions(wt({},se)),setTimeout(()=>{yt.getModel().updateOptions(wt({},se))},200))},[JSON.stringify(se),pn]),(0,re.useEffect)(()=>{let yt=ke.current.instance;yt&&pn&&yt.layout()},[tt,ae,pn]);const[Bn,_n]=(0,re.useState)(ut(tt)),[Vn,Qn]=(0,re.useState)(ut(ae)),jn=At(wt({},ie),{width:Bn,height:Vn,position:"relative"});return re.createElement("div",{className:"my-monaco-editor",ref:bn,style:jn,onFocus:()=>{ht&&rn()}},It&&re.createElement(_e.CopyToClipboard,{text:ee,onCopy:()=>st.ZP.success("\u590D\u5236\u6210\u529F")},re.createElement(We.Z,{title:"\u590D\u5236\u4EE3\u7801"},re.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},re.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ut({width:Ge="100%",height:Pt="100%",original:tt,modified:ae,language:ee,options:z={}}){const ie=(0,re.useRef)(),[se,ne]=(0,re.useState)(null);function we(Qe){let ht;return ie.current&&(ht=new Je.Z(Dt=>{for(let kt of Dt)(kt.target.offsetHeight>0||kt.target.offsetWidth>0)&&Qe.layout()}),ht.observe(ie.current)),ht}(0,re.useEffect)(()=>(ie.current&&Promise.all([le.e(8909),le.e(9404)]).then(le.bind(le,2550)).then(Qe=>{dt=Qe;const ht=dt.editor.createDiffEditor(ie.current,At(wt({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(ht);let Dt=we(ht);return()=>{ht.dispose();const kt=ht.getModel();kt&&kt.dispose(),Dt.unobserve(ie.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,re.useEffect)(()=>{se&&se.setModel({original:dt.editor.createModel(tt,ee),modified:dt.editor.createModel(ae,ee)})},[tt,ae,ee,se]);const Ve=ut(Ge),It=ut(Pt),je={width:Ve,height:It};return re.createElement("div",{className:"my-diff-editor",ref:ie,style:je})}},79006:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return Je}});var re=le(59301);function Je(me,ze){const be=(0,re.useRef)();(0,re.useEffect)(()=>{be.current=me}),(0,re.useEffect)(()=>{function Ce(){be.current()}if(ze!==null){let Ne=setInterval(Ce,ze);return()=>clearInterval(Ne)}},[ze])}},33168:function(Wt,Tt,le){"use strict";le.r(Tt),le.d(Tt,{default:function(){return _e}});var re=le(59301),Je=le(44283),me=le(31691),ze=le(28284),be=le(62957),Ce=le(37568),Ne=le(39116),$e=le(66443),Se={flex_box_center:"flex_box_center___Tn66_",flex_space_between:"flex_space_between___P50q5",flex_box_vertical_center:"flex_box_vertical_center___pL1pq",flex_box_center_end:"flex_box_center_end___dvJxR",flex_box_column:"flex_box_column___rEutz",bg:"bg___QHZnQ",formWrap:"formWrap___izBdR"},de=le(15267),Ze=le(74671),xe=le(46642),ot=le(30592),Be=le(59301),Me=Object.defineProperty,Re=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,at=(ft,Le,Ke)=>Le in ft?Me(ft,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):ft[Le]=Ke,Ye=(ft,Le)=>{for(var Ke in Le||(Le={}))gt.call(Le,Ke)&&at(ft,Ke,Le[Ke]);if(rt)for(var Ke of rt(Le))xt.call(Le,Ke)&&at(ft,Ke,Le[Ke]);return ft},st=(ft,Le)=>Re(ft,Oe(Le)),We=(ft,Le,Ke)=>new Promise((et,pe)=>{var Ct=At=>{try{wt(Ke.next(At))}catch(ye){pe(ye)}},Ie=At=>{try{wt(Ke.throw(At))}catch(ye){pe(ye)}},wt=At=>At.done?et(At.value):Promise.resolve(At.value).then(Ct,Ie);wt((Ke=Ke.apply(ft,Le)).next())});const{TabPane:St}=me.default,Xe=({shixunsDetail:ft,dispatch:Le,practiceSetting:Ke})=>{var et,pe;const Ct=(0,Je.useParams)(),[Ie]=ze.default.useForm(),[wt,At]=(0,re.useState)({}),{challengesNew:ye}=ft,fe=(0,re.useRef)(null),{selectQuestionParams:ut,id:_t,newQuestion:bt}=Ke,[Ae,nt]=(0,re.useState)(!0);(0,re.useEffect)(()=>{nt(!0),Le({type:"shixunsDetail/getChallengesNew",payload:Ye({},Ct)}),nt(!1)},[Ct]);const dt=(Pt,tt=!1,ae=1)=>We(void 0,null,function*(){var ee;const z=Ye({},wt),ie=!(!Pt.unity_3d_routes||Pt.unity_3d_routes=="");z.identifier=Ct.id,z.st=1;const se=yield(0,$e.al)(st(Ye({},z),{unity_3d_routes:ie?Pt.unity_3d_routes:null,unity_3d:ie,sync_origin_shixun:tt}));se.status===1&&((ee=ft==null?void 0:ft.detail)!=null&&ee.copy_for_exercise&&(0,Ze.m)(Le,ft,Ct.id,ae),Je.history.replace(`/shixuns/${Ct.id}/edit/${se.challenge_id}/editquestion?tab=2`),setTimeout(()=>{Le({type:"practiceSetting/setParams",payload:{newQuestion:null}}),Le({type:"practiceSetting/setUpdateIndex"})},200))}),rn=()=>{Ge()},Et=Pt=>{clearTimeout(fe.current),fe.current=setTimeout(()=>{"subject"in Pt&&bt&&Le({type:"practiceSetting/setParams",payload:{newQuestion:{st:1,name:Pt==null?void 0:Pt.subject}}});const{subject:tt,task_pass:ae}=Ie.getFieldsValue();tt!==""||ae!==(0,Ze.S)(ye.task_pass_default)?Le({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}):Le({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})},500)},Ut=Pt=>{At(Ye({},Ie.getFieldsValue())),Et(Pt)},Ge=()=>{var Pt;const tt=()=>{Je.history.push(`/shixuns/${_t}/challenges`),Le({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};(Pt=Ke==null?void 0:Ke.sideBar)!=null&&Pt.confirmLeave?be.default.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{tt()}}):tt()};return Be.createElement("section",{className:Se.bg},Be.createElement(me.default,{activeKey:"1"},Be.createElement(St,{tab:"\u672C\u5173\u4EFB\u52A1",key:"1"},Be.createElement(ze.default,{form:Ie,className:Se.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:Ut,onFinish:dt},Be.createElement("div",{className:Se.fieldWrap},Be.createElement(ze.default.Item,{initialValue:"",name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},Be.createElement(Ce.default,{bordered:!1,maxLength:60,suffix:`${((et=wt.subject)==null?void 0:et.length)||0}/60`,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),Be.createElement("div",{className:Se.mdWrap},Be.createElement(ze.default.Item,{name:"task_pass",label:"\u8FC7\u5173\u4EFB\u52A1:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u6700\u5927\u9650\u523635000\u4E2A\u5B57\u7B26"}]},Be.createElement(Ne.Z,{watch:!0,defaultValue:ye.task_pass_default}))),(0,de.ag)()&&Be.createElement("div",{className:Se.fieldWrap},Be.createElement(ze.default.Item,{initialValue:"",name:"unity_3d_routes",label:"\u5D4C\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0:"},Be.createElement(Ce.default,{bordered:!1,maxLength:60,suffix:`${((pe=wt.unity_3d_routes)==null?void 0:pe.length)||0}/60`,placeholder:"\u8BF7\u8F93\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0\u5730\u5740"}))),Be.createElement(ze.default.Item,{noStyle:!0},Be.createElement(xe.t,{okButtonProps:{htmlType:"submit"},className:"customFixedButton",onCancel:rn}))))),Be.createElement(ot.Z,{loading:Ae}))};var _e=(0,Je.connect)(({shixunsDetail:ft,practiceSetting:Le})=>({shixunsDetail:ft,practiceSetting:Le}))(Xe)},30592:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return be}});var re=le(59301),Je=le(29787),me={loading:"loading___lueiN"},be=({loading:Ce})=>Ce?re.createElement("div",{className:me.loading},re.createElement(Je.Z,null)):re.createElement(re.Fragment,null)},74671:function(Wt,Tt,le){"use strict";le.d(Tt,{S:function(){return Ce},m:function(){return Ne}});var re=le(76406),Je=le(6767),me=le(62957),ze=le(59301),be=($e,Se,de)=>new Promise((Ze,xe)=>{var ot=Re=>{try{Me(de.next(Re))}catch(Oe){xe(Oe)}},Be=Re=>{try{Me(de.throw(Re))}catch(Oe){xe(Oe)}},Me=Re=>Re.done?Ze(Re.value):Promise.resolve(Re.value).then(ot,Be);Me((de=de.apply($e,Se)).next())});const Ce=$e=>{let Se=document.createElement("textarea");return Se.value=$e,Se.value},Ne=($e,Se,de,Ze,xe)=>be(void 0,null,function*(){var ot,Be;const Me=yield $e({type:"shixunsDetail/saveCopyForExercise",payload:{id:de,save_type:Ze}});Ze===1?((Me==null?void 0:Me.status)==0&&Je.ZP.success("\u4FDD\u5B58\u6210\u529F"),(ot=Me==null?void 0:Me.data)!=null&&ot.exists_same_shixun_name?$e({type:"classroomList/setActionTabs",payload:{key:"\u91CD\u540D\u4FEE\u6539",name:(Be=Me==null?void 0:Me.data)==null?void 0:Be.shixun_name}}):$e({type:"classroomList/setActionTabs",payload:{}})):($e({type:"classroomList/setActionTabs",payload:{}}),(Me==null?void 0:Me.status)===0&&me.default.info({title:"\u63D0\u793A",width:460,icon:null,centered:!0,content:ze.createElement("div",null,ze.createElement("div",null,"\u5B9E\u8BAD\u540C\u6B65\u4FEE\u6539\u5B8C\u6210\uFF0C\u8BF7\u9A8C\u8BC1\u5B9E\u8BAD\u662F\u5426\u53EF\u4EE5\u6B63\u5E38\u4F7F\u7528\u3002")),okText:"\u524D\u5F80\u539F\u5B9E\u8BAD",onOk:()=>{var Re,Oe;(0,re.xg)(`/shixuns/${(Oe=(Re=Se==null?void 0:Se.detail)==null?void 0:Re.fork_from)==null?void 0:Oe.fork_identifier}/challenges`)}}))})},20047:function(Wt,Tt,le){"use strict";le.d(Tt,{AL:function(){return at},Iy:function(){return Ze},Qv:function(){return Be},ez:function(){return xt},jb:function(){return xe}});var re=le(32834),Je=le.n(re),me=le(11690),ze=le.n(me);let be=1;function Ce(Xe,_e){const ft=Xe.match(/^(\s+)(?:```)/);if(ft===null)return _e;const Le=ft[1];return _e.split(`
`).map(Ke=>{const et=Ke.match(/^\s+/);if(et===null)return Ke;const[pe]=et;return pe.length>=Le.length?Ke.slice(Le.length):Ke}).join(`
`)}let Ne=[],$e=["<ul>"];const Se=new(Je()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ze(){Ne.length=0,$e=["<ul>"]}const xe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ot(Xe,_e,ft,Le){if(_e>=Xe.length||Xe[_e].level<=ft)return _e;var Ke=Xe[_e];Le.push("<li><a href='#"+be+Ke.anchor+"'>"+Ke.text+"</a>"),_e++;var et=[];return _e=ot(Xe,_e,Ke.level,et),et.length>0&&(Le.push("<ul>"),et.forEach(function(pe){Le.push(pe)}),Le.push("</ul>")),Le.push("</li>"),_e=ot(Xe,_e,ft,Le),_e}function Be(){return ot(Ne,0,0,$e),$e.push("</ul>"),$e.join("")}const Me={heading(Xe){const _e=de.exec(Xe);if(be+=1,_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},fences(Xe){const _e=this.rules.block.fences.exec(Xe);if(_e){const ft=_e[0];let Le=Ce(ft,_e[3]||"");const Ke=_e[2]?_e[2].trim():_e[2];if(["latex","katex","math"].indexOf(Ke)>=0){const et=rt(),pe=Le;Le=et,gt[et]={type:"block",expression:pe}}return{type:"code",raw:ft,lang:Ke,text:Le}}}},Re=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Oe=0;const rt=()=>`__special_katext_id_${Oe++}__`;let gt={};function xt(){return gt}function at(){Oe=0,gt={}}function Ye(Xe){return Xe=Xe.replace(Re,(_e,ft)=>{const Le=rt();return gt[Le]={type:"inline",expression:ft},Le}),Xe}const st=Se.listitem;Se.listitem=function(Xe){return st(Ye(Xe))};const We=Se.paragraph;Se.paragraph=function(Xe){return We(Ye(Xe))};const St=Se.tablecell;Se.tablecell=function(Xe,_e){return St(Ye(Xe),_e)},Se.code=function(Xe,_e,ft){const Le=(_e||"").match(/\S*/)[0];return Le?["latex","katex","math"].indexOf(Le)>=0?`<p class='editormd-tex'>${Xe}</p>`:`<pre class="prettyprint linenums"><code class="language-${_e}">${ft?Xe:(0,me.escape)(Xe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ft?Xe:(0,me.escape)(Xe,!0))+"</code></pre>"},Se.heading=function(Xe,_e,ft){let Le=this.options.headerPrefix+ft.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ne.push({anchor:Le,level:_e,text:Xe}),"<h"+_e+' id="'+be+Le+'">'+Xe+"</h"+_e+">"},Je().setOptions({silent:!0,gfm:!0,pedantic:!1}),Je().use({tokenizer:Me,renderer:Se}),Tt.ZP=Je()},86013:function(Wt,Tt,le){"use strict";var re=le(59301),Je=le(19248);const me=ze=>{let be;return typeof ze=="object"&&(ze!=null&&ze.clearIcon)?be=ze:ze&&(be={clearIcon:re.createElement(Je.Z,null)}),be};Tt.Z=me},38406:function(Wt,Tt,le){"use strict";var re=le(59301),Je=le(48755),me=le(584);const ze=be=>{const{componentName:Ce}=be,{getPrefixCls:Ne}=(0,re.useContext)(Je.E_),$e=Ne("empty");switch(Ce){case"Table":case"List":return re.createElement(me.Z,{image:me.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return re.createElement(me.Z,{image:me.Z.PRESENTED_IMAGE_SIMPLE,className:`${$e}-small`});case"Table.filter":return null;default:return re.createElement(me.Z,null)}};Tt.Z=ze},36207:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return It}});var re=le(59301),Je=le(92310),me=le.n(Je),ze=le(85899),be=le(72190),Ce=le(43403),Ne=le(34280),$e=re.createContext(null),Se=re.createContext({}),de=$e,Ze=le(18642),xe=le(60499),ot=le(77900),Be=le(10228),Me=le(26112),Re=le(42244),Oe=le(8654),rt=["prefixCls","className","containerRef"],gt=function(Qe){var ht=Qe.prefixCls,Dt=Qe.className,kt=Qe.containerRef,Gt=(0,Re.Z)(Qe,rt),Zt=re.useContext(Se),Lt=Zt.panel,sn=(0,Oe.x1)(Lt,kt);return re.createElement("div",(0,xe.Z)({className:me()("".concat(ht,"-content"),Dt),role:"dialog",ref:sn},(0,Me.Z)(Qe,{aria:!0}),{"aria-modal":"true"},Gt))},xt=gt,at=le(48736);function Ye(je){return typeof je=="string"&&String(Number(je))===je?((0,at.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(je)):je}function st(je){warning(!("wrapperClassName"in je),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!je.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var We={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function St(je,Qe){var ht,Dt,kt,Gt=je.prefixCls,Zt=je.open,Lt=je.placement,sn=je.inline,Jt=je.push,on=je.forceRender,pt=je.autoFocus,dn=je.keyboard,Rt=je.classNames,Yt=je.rootClassName,an=je.rootStyle,Tn=je.zIndex,bn=je.className,ke=je.id,Ue=je.style,mt=je.motion,zt=je.width,nn=je.height,fn=je.children,$n=je.mask,An=je.maskClosable,pn=je.maskMotion,wn=je.maskClassName,vn=je.maskStyle,Kn=je.afterOpenChange,gn=je.onClose,Dn=je.onMouseEnter,tn=je.onMouseOver,yn=je.onMouseLeave,un=je.onClick,Ln=je.onKeyDown,Yn=je.onKeyUp,zn=je.styles,Bn=je.drawerRender,_n=re.useRef(),Vn=re.useRef(),Qn=re.useRef();re.useImperativeHandle(Qe,function(){return _n.current});var jn=function(ct){var it=ct.keyCode,jt=ct.shiftKey;switch(it){case Be.Z.TAB:{if(it===Be.Z.TAB){if(!jt&&document.activeElement===Qn.current){var hn;(hn=Vn.current)===null||hn===void 0||hn.focus({preventScroll:!0})}else if(jt&&document.activeElement===Vn.current){var ln;(ln=Qn.current)===null||ln===void 0||ln.focus({preventScroll:!0})}}break}case Be.Z.ESC:{gn&&dn&&(ct.stopPropagation(),gn(ct));break}}};re.useEffect(function(){if(Zt&&pt){var Mt;(Mt=_n.current)===null||Mt===void 0||Mt.focus({preventScroll:!0})}},[Zt]);var yt=re.useState(!1),Ht=(0,be.Z)(yt,2),In=Ht[0],Un=Ht[1],Ee=re.useContext(de),He;typeof Jt=="boolean"?He=Jt?{}:{distance:0}:He=Jt||{};var ve=(ht=(Dt=(kt=He)===null||kt===void 0?void 0:kt.distance)!==null&&Dt!==void 0?Dt:Ee==null?void 0:Ee.pushDistance)!==null&&ht!==void 0?ht:180,De=re.useMemo(function(){return{pushDistance:ve,push:function(){Un(!0)},pull:function(){Un(!1)}}},[ve]);re.useEffect(function(){if(Zt){var Mt;Ee==null||(Mt=Ee.push)===null||Mt===void 0||Mt.call(Ee)}else{var ct;Ee==null||(ct=Ee.pull)===null||ct===void 0||ct.call(Ee)}},[Zt]),re.useEffect(function(){return function(){var Mt;Ee==null||(Mt=Ee.pull)===null||Mt===void 0||Mt.call(Ee)}},[]);var ge=$n&&re.createElement(ot.default,(0,xe.Z)({key:"mask"},pn,{visible:Zt}),function(Mt,ct){var it=Mt.className,jt=Mt.style;return re.createElement("div",{className:me()("".concat(Gt,"-mask"),it,Rt==null?void 0:Rt.mask,wn),style:(0,ze.Z)((0,ze.Z)((0,ze.Z)({},jt),vn),zn==null?void 0:zn.mask),onClick:An&&Zt?gn:void 0,ref:ct})}),Pe=typeof mt=="function"?mt(Lt):mt,qe={};if(In&&ve)switch(Lt){case"top":qe.transform="translateY(".concat(ve,"px)");break;case"bottom":qe.transform="translateY(".concat(-ve,"px)");break;case"left":qe.transform="translateX(".concat(ve,"px)");break;default:qe.transform="translateX(".concat(-ve,"px)");break}Lt==="left"||Lt==="right"?qe.width=Ye(zt):qe.height=Ye(nn);var Bt={onMouseEnter:Dn,onMouseOver:tn,onMouseLeave:yn,onClick:un,onKeyDown:Ln,onKeyUp:Yn},Nt=re.createElement(ot.default,(0,xe.Z)({key:"panel"},Pe,{visible:Zt,forceRender:on,onVisibleChanged:function(ct){Kn==null||Kn(ct)},removeOnLeave:!1,leavedClassName:"".concat(Gt,"-content-wrapper-hidden")}),function(Mt,ct){var it=Mt.className,jt=Mt.style,hn=re.createElement(xt,(0,xe.Z)({id:ke,containerRef:ct,prefixCls:Gt,className:me()(bn,Rt==null?void 0:Rt.content),style:(0,ze.Z)((0,ze.Z)({},Ue),zn==null?void 0:zn.content)},(0,Me.Z)(je,{aria:!0}),Bt),fn);return re.createElement("div",(0,xe.Z)({className:me()("".concat(Gt,"-content-wrapper"),Rt==null?void 0:Rt.wrapper,it),style:(0,ze.Z)((0,ze.Z)((0,ze.Z)({},qe),jt),zn==null?void 0:zn.wrapper)},(0,Me.Z)(je,{data:!0})),Bn?Bn(hn):hn)}),Qt=(0,ze.Z)({},an);return Tn&&(Qt.zIndex=Tn),re.createElement(de.Provider,{value:De},re.createElement("div",{className:me()(Gt,"".concat(Gt,"-").concat(Lt),Yt,(0,Ze.Z)((0,Ze.Z)({},"".concat(Gt,"-open"),Zt),"".concat(Gt,"-inline"),sn)),style:Qt,tabIndex:-1,ref:_n,onKeyDown:jn},ge,re.createElement("div",{tabIndex:0,ref:Vn,style:We,"aria-hidden":"true","data-sentinel":"start"}),Nt,re.createElement("div",{tabIndex:0,ref:Qn,style:We,"aria-hidden":"true","data-sentinel":"end"})))}var Xe=re.forwardRef(St),_e=Xe,ft=function(Qe){var ht=Qe.open,Dt=ht===void 0?!1:ht,kt=Qe.prefixCls,Gt=kt===void 0?"rc-drawer":kt,Zt=Qe.placement,Lt=Zt===void 0?"right":Zt,sn=Qe.autoFocus,Jt=sn===void 0?!0:sn,on=Qe.keyboard,pt=on===void 0?!0:on,dn=Qe.width,Rt=dn===void 0?378:dn,Yt=Qe.mask,an=Yt===void 0?!0:Yt,Tn=Qe.maskClosable,bn=Tn===void 0?!0:Tn,ke=Qe.getContainer,Ue=Qe.forceRender,mt=Qe.afterOpenChange,zt=Qe.destroyOnClose,nn=Qe.onMouseEnter,fn=Qe.onMouseOver,$n=Qe.onMouseLeave,An=Qe.onClick,pn=Qe.onKeyDown,wn=Qe.onKeyUp,vn=Qe.panelRef,Kn=re.useState(!1),gn=(0,be.Z)(Kn,2),Dn=gn[0],tn=gn[1],yn=re.useState(!1),un=(0,be.Z)(yn,2),Ln=un[0],Yn=un[1];(0,Ne.Z)(function(){Yn(!0)},[]);var zn=Ln?Dt:!1,Bn=re.useRef(),_n=re.useRef();(0,Ne.Z)(function(){zn&&(_n.current=document.activeElement)},[zn]);var Vn=function(In){var Un;if(tn(In),mt==null||mt(In),!In&&_n.current&&!((Un=Bn.current)!==null&&Un!==void 0&&Un.contains(_n.current))){var Ee;(Ee=_n.current)===null||Ee===void 0||Ee.focus({preventScroll:!0})}},Qn=re.useMemo(function(){return{panel:vn}},[vn]);if(!Ue&&!Dn&&!zn&&zt)return null;var jn={onMouseEnter:nn,onMouseOver:fn,onMouseLeave:$n,onClick:An,onKeyDown:pn,onKeyUp:wn},yt=(0,ze.Z)((0,ze.Z)({},Qe),{},{open:zn,prefixCls:Gt,placement:Lt,autoFocus:Jt,keyboard:pt,width:Rt,mask:an,maskClosable:bn,inline:ke===!1,afterOpenChange:Vn,ref:Bn},jn);return re.createElement(Se.Provider,{value:Qn},re.createElement(Ce.Z,{open:zn||Ue||Dn,autoDestroy:!1,getContainer:ke,autoLock:an&&(zn||Dn)},re.createElement(_e,yt)))},Le=ft,Ke=Le,et=le(62487),pe=le(75030),Ct=le(86641),Ie=le(55743),wt=le(48755),At=le(91190),ye=le(78776),fe=le(458),_t=je=>{var Qe,ht;const{prefixCls:Dt,title:kt,footer:Gt,extra:Zt,loading:Lt,onClose:sn,headerStyle:Jt,bodyStyle:on,footerStyle:pt,children:dn,classNames:Rt,styles:Yt}=je,an=(0,wt.dj)("drawer"),Tn=re.useCallback(zt=>re.createElement("button",{type:"button",onClick:sn,"aria-label":"Close",className:`${Dt}-close`},zt),[sn]),[bn,ke]=(0,ye.Z)((0,ye.w)(je),(0,ye.w)(an),{closable:!0,closeIconRender:Tn}),Ue=re.useMemo(()=>{var zt,nn;return!kt&&!bn?null:re.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(zt=an.styles)===null||zt===void 0?void 0:zt.header),Jt),Yt==null?void 0:Yt.header),className:me()(`${Dt}-header`,{[`${Dt}-header-close-only`]:bn&&!kt&&!Zt},(nn=an.classNames)===null||nn===void 0?void 0:nn.header,Rt==null?void 0:Rt.header)},re.createElement("div",{className:`${Dt}-header-title`},ke,kt&&re.createElement("div",{className:`${Dt}-title`},kt)),Zt&&re.createElement("div",{className:`${Dt}-extra`},Zt))},[bn,ke,Zt,Jt,Dt,kt]),mt=re.useMemo(()=>{var zt,nn;if(!Gt)return null;const fn=`${Dt}-footer`;return re.createElement("div",{className:me()(fn,(zt=an.classNames)===null||zt===void 0?void 0:zt.footer,Rt==null?void 0:Rt.footer),style:Object.assign(Object.assign(Object.assign({},(nn=an.styles)===null||nn===void 0?void 0:nn.footer),pt),Yt==null?void 0:Yt.footer)},Gt)},[Gt,pt,Dt]);return re.createElement(re.Fragment,null,Ue,re.createElement("div",{className:me()(`${Dt}-body`,Rt==null?void 0:Rt.body,(Qe=an.classNames)===null||Qe===void 0?void 0:Qe.body),style:Object.assign(Object.assign(Object.assign({},(ht=an.styles)===null||ht===void 0?void 0:ht.body),on),Yt==null?void 0:Yt.body)},Lt?re.createElement(fe.Z,{active:!0,title:!1,paragraph:{rows:5},className:`${Dt}-body-skeleton`}):dn),mt)},bt=le(36237),Ae=le(63356),nt=le(16931),dt=le(51636);const rn=je=>{const Qe="100%";return{left:`translateX(-${Qe})`,right:`translateX(${Qe})`,top:`translateY(-${Qe})`,bottom:`translateY(${Qe})`}[je]},Et=(je,Qe)=>({"&-enter, &-appear":Object.assign(Object.assign({},je),{"&-active":Qe}),"&-leave":Object.assign(Object.assign({},Qe),{"&-active":je})}),Ut=(je,Qe)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Qe}`}}},Et({opacity:je},{opacity:1})),Ge=(je,Qe)=>[Ut(.7,Qe),Et({transform:rn(je)},{transform:"none"})];var tt=je=>{const{componentCls:Qe,motionDurationSlow:ht}=je;return{[Qe]:{[`${Qe}-mask-motion`]:Ut(0,ht),[`${Qe}-panel-motion`]:["left","right","top","bottom"].reduce((Dt,kt)=>Object.assign(Object.assign({},Dt),{[`&-${kt}`]:Ge(kt,ht)}),{})}}};const ae=je=>{const{borderRadiusSM:Qe,componentCls:ht,zIndexPopup:Dt,colorBgMask:kt,colorBgElevated:Gt,motionDurationSlow:Zt,motionDurationMid:Lt,paddingXS:sn,padding:Jt,paddingLG:on,fontSizeLG:pt,lineHeightLG:dn,lineWidth:Rt,lineType:Yt,colorSplit:an,marginXS:Tn,colorIcon:bn,colorIconHover:ke,colorBgTextHover:Ue,colorBgTextActive:mt,colorText:zt,fontWeightStrong:nn,footerPaddingBlock:fn,footerPaddingInline:$n,calc:An}=je,pn=`${ht}-content-wrapper`;return{[ht]:{position:"fixed",inset:0,zIndex:Dt,pointerEvents:"none",color:zt,"&-pure":{position:"relative",background:Gt,display:"flex",flexDirection:"column",[`&${ht}-left`]:{boxShadow:je.boxShadowDrawerLeft},[`&${ht}-right`]:{boxShadow:je.boxShadowDrawerRight},[`&${ht}-top`]:{boxShadow:je.boxShadowDrawerUp},[`&${ht}-bottom`]:{boxShadow:je.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${ht}-mask`]:{position:"absolute",inset:0,zIndex:Dt,background:kt,pointerEvents:"auto"},[pn]:{position:"absolute",zIndex:Dt,maxWidth:"100vw",transition:`all ${Zt}`,"&-hidden":{display:"none"}},[`&-left > ${pn}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:je.boxShadowDrawerLeft},[`&-right > ${pn}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:je.boxShadowDrawerRight},[`&-top > ${pn}`]:{top:0,insetInline:0,boxShadow:je.boxShadowDrawerUp},[`&-bottom > ${pn}`]:{bottom:0,insetInline:0,boxShadow:je.boxShadowDrawerDown},[`${ht}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:Gt,pointerEvents:"auto"},[`${ht}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,bt.unit)(Jt)} ${(0,bt.unit)(on)}`,fontSize:pt,lineHeight:dn,borderBottom:`${(0,bt.unit)(Rt)} ${Yt} ${an}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${ht}-extra`]:{flex:"none"},[`${ht}-close`]:Object.assign({display:"inline-flex",width:An(pt).add(sn).equal(),height:An(pt).add(sn).equal(),borderRadius:Qe,justifyContent:"center",alignItems:"center",marginInlineEnd:Tn,color:bn,fontWeight:nn,fontSize:pt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${Lt}`,textRendering:"auto","&:hover":{color:ke,backgroundColor:Ue,textDecoration:"none"},"&:active":{backgroundColor:mt}},(0,Ae.Qy)(je)),[`${ht}-title`]:{flex:1,margin:0,fontWeight:je.fontWeightStrong,fontSize:pt,lineHeight:dn},[`${ht}-body`]:{flex:1,minWidth:0,minHeight:0,padding:on,overflow:"auto",[`${ht}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${ht}-footer`]:{flexShrink:0,padding:`${(0,bt.unit)(fn)} ${(0,bt.unit)($n)}`,borderTop:`${(0,bt.unit)(Rt)} ${Yt} ${an}`},"&-rtl":{direction:"rtl"}}}},ee=je=>({zIndexPopup:je.zIndexPopupBase,footerPaddingBlock:je.paddingXS,footerPaddingInline:je.padding});var z=(0,nt.I$)("Drawer",je=>{const Qe=(0,dt.mergeToken)(je,{});return[ae(Qe),tt(Qe)]},ee),ie=function(je,Qe){var ht={};for(var Dt in je)Object.prototype.hasOwnProperty.call(je,Dt)&&Qe.indexOf(Dt)<0&&(ht[Dt]=je[Dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var kt=0,Dt=Object.getOwnPropertySymbols(je);kt<Dt.length;kt++)Qe.indexOf(Dt[kt])<0&&Object.prototype.propertyIsEnumerable.call(je,Dt[kt])&&(ht[Dt[kt]]=je[Dt[kt]]);return ht};const se=null,ne={distance:180},we=je=>{var Qe;const{rootClassName:ht,width:Dt,height:kt,size:Gt="default",mask:Zt=!0,push:Lt=ne,open:sn,afterOpenChange:Jt,onClose:on,prefixCls:pt,getContainer:dn,style:Rt,className:Yt,visible:an,afterVisibleChange:Tn,maskStyle:bn,drawerStyle:ke,contentWrapperStyle:Ue}=je,mt=ie(je,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle"]),{getPopupContainer:zt,getPrefixCls:nn,direction:fn,className:$n,style:An,classNames:pn,styles:wn}=(0,wt.dj)("drawer"),vn=nn("drawer",pt),[Kn,gn,Dn]=z(vn),tn=dn===void 0&&zt?()=>zt(document.body):dn,yn=me()({"no-mask":!Zt,[`${vn}-rtl`]:fn==="rtl"},ht,gn,Dn),un=re.useMemo(()=>Dt!=null?Dt:Gt==="large"?736:378,[Dt,Gt]),Ln=re.useMemo(()=>kt!=null?kt:Gt==="large"?736:378,[kt,Gt]),Yn={motionName:(0,Ct.m)(vn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},zn=yt=>({motionName:(0,Ct.m)(vn,`panel-motion-${yt}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Bn=(0,At.H)(),[_n,Vn]=(0,pe.Cn)("Drawer",mt.zIndex),{classNames:Qn={},styles:jn={}}=mt;return Kn(re.createElement(et.Z,{form:!0,space:!0},re.createElement(Ie.Z.Provider,{value:Vn},re.createElement(Ke,Object.assign({prefixCls:vn,onClose:on,maskMotion:Yn,motion:zn},mt,{classNames:{mask:me()(Qn.mask,pn.mask),content:me()(Qn.content,pn.content),wrapper:me()(Qn.wrapper,pn.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},jn.mask),bn),wn.mask),content:Object.assign(Object.assign(Object.assign({},jn.content),ke),wn.content),wrapper:Object.assign(Object.assign(Object.assign({},jn.wrapper),Ue),wn.wrapper)},open:sn!=null?sn:an,mask:Zt,push:Lt,width:un,height:Ln,style:Object.assign(Object.assign({},An),Rt),className:me()($n,Yt),rootClassName:yn,getContainer:tn,afterOpenChange:Jt!=null?Jt:Tn,panelRef:Bn,zIndex:_n}),re.createElement(_t,Object.assign({prefixCls:vn},mt,{onClose:on}))))))},Ve=je=>{const{prefixCls:Qe,style:ht,className:Dt,placement:kt="right"}=je,Gt=ie(je,["prefixCls","style","className","placement"]),{getPrefixCls:Zt}=re.useContext(wt.E_),Lt=Zt("drawer",Qe),[sn,Jt,on]=z(Lt),pt=me()(Lt,`${Lt}-pure`,`${Lt}-${kt}`,Jt,on,Dt);return sn(re.createElement("div",{className:pt,style:ht},re.createElement(_t,Object.assign({prefixCls:Lt},Gt))))};we._InternalPanelDoNotUseOrYouWillBeFired=Ve;var It=we},584:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return xt}});var re=le(59301),Je=le(92310),me=le.n(Je),ze=le(9017),be=le(17835),Ce=le(57700),$e=()=>{const[,at]=(0,Ce.ZP)(),[Ye]=(0,ze.Z)("Empty"),We=new be.FastColor(at.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return re.createElement("svg",{style:We,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},re.createElement("title",null,(Ye==null?void 0:Ye.description)||"Empty"),re.createElement("g",{fill:"none",fillRule:"evenodd"},re.createElement("g",{transform:"translate(24 31.67)"},re.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),re.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),re.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),re.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),re.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),re.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),re.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},re.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),re.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},de=()=>{const[,at]=(0,Ce.ZP)(),[Ye]=(0,ze.Z)("Empty"),{colorFill:st,colorFillTertiary:We,colorFillQuaternary:St,colorBgContainer:Xe}=at,{borderColor:_e,shadowColor:ft,contentColor:Le}=(0,re.useMemo)(()=>({borderColor:new be.FastColor(st).onBackground(Xe).toHexString(),shadowColor:new be.FastColor(We).onBackground(Xe).toHexString(),contentColor:new be.FastColor(St).onBackground(Xe).toHexString()}),[st,We,St,Xe]);return re.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},re.createElement("title",null,(Ye==null?void 0:Ye.description)||"Empty"),re.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},re.createElement("ellipse",{fill:ft,cx:"32",cy:"33",rx:"32",ry:"7"}),re.createElement("g",{fillRule:"nonzero",stroke:_e},re.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),re.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:Le}))))},Ze=le(16931),xe=le(51636);const ot=at=>{const{componentCls:Ye,margin:st,marginXS:We,marginXL:St,fontSize:Xe,lineHeight:_e}=at;return{[Ye]:{marginInline:We,fontSize:Xe,lineHeight:_e,textAlign:"center",[`${Ye}-image`]:{height:at.emptyImgHeight,marginBottom:We,opacity:at.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ye}-description`]:{color:at.colorTextDescription},[`${Ye}-footer`]:{marginTop:st},"&-normal":{marginBlock:St,color:at.colorTextDescription,[`${Ye}-description`]:{color:at.colorTextDescription},[`${Ye}-image`]:{height:at.emptyImgHeightMD}},"&-small":{marginBlock:We,color:at.colorTextDescription,[`${Ye}-image`]:{height:at.emptyImgHeightSM}}}}};var Be=(0,Ze.I$)("Empty",at=>{const{componentCls:Ye,controlHeightLG:st,calc:We}=at,St=(0,xe.mergeToken)(at,{emptyImgCls:`${Ye}-img`,emptyImgHeight:We(st).mul(2.5).equal(),emptyImgHeightMD:st,emptyImgHeightSM:We(st).mul(.875).equal()});return[ot(St)]}),Me=le(48755),Re=function(at,Ye){var st={};for(var We in at)Object.prototype.hasOwnProperty.call(at,We)&&Ye.indexOf(We)<0&&(st[We]=at[We]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,We=Object.getOwnPropertySymbols(at);St<We.length;St++)Ye.indexOf(We[St])<0&&Object.prototype.propertyIsEnumerable.call(at,We[St])&&(st[We[St]]=at[We[St]]);return st};const Oe=re.createElement($e,null),rt=re.createElement(de,null),gt=at=>{const{className:Ye,rootClassName:st,prefixCls:We,image:St=Oe,description:Xe,children:_e,imageStyle:ft,style:Le,classNames:Ke,styles:et}=at,pe=Re(at,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:Ct,direction:Ie,className:wt,style:At,classNames:ye,styles:fe}=(0,Me.dj)("empty"),ut=Ct("empty",We),[_t,bt,Ae]=Be(ut),[nt]=(0,ze.Z)("Empty"),dt=typeof Xe!="undefined"?Xe:nt==null?void 0:nt.description,rn=typeof dt=="string"?dt:"empty";let Et=null;return typeof St=="string"?Et=re.createElement("img",{alt:rn,src:St}):Et=St,_t(re.createElement("div",Object.assign({className:me()(bt,Ae,ut,wt,{[`${ut}-normal`]:St===rt,[`${ut}-rtl`]:Ie==="rtl"},Ye,st,ye.root,Ke==null?void 0:Ke.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},fe.root),At),et==null?void 0:et.root),Le)},pe),re.createElement("div",{className:me()(`${ut}-image`,ye.image,Ke==null?void 0:Ke.image),style:Object.assign(Object.assign(Object.assign({},ft),fe.image),et==null?void 0:et.image)},Et),dt&&re.createElement("div",{className:me()(`${ut}-description`,ye.description,Ke==null?void 0:Ke.description),style:Object.assign(Object.assign({},fe.description),et==null?void 0:et.description)},dt),_e&&re.createElement("div",{className:me()(`${ut}-footer`,ye.footer,Ke==null?void 0:Ke.footer),style:Object.assign(Object.assign({},fe.footer),et==null?void 0:et.footer)},_e)))};gt.PRESENTED_IMAGE_DEFAULT=Oe,gt.PRESENTED_IMAGE_SIMPLE=rt;var xt=gt},28284:function(Wt,Tt,le){"use strict";le.d(Tt,{default:function(){return He}});var re=le(56553),Je=le(77654),me=le(59301),ze=le(92310),be=le.n(ze),Ce=le(77900),Ne=le(86641),$e=le(83397);function Se(ve){const[De,ge]=me.useState(ve);return me.useEffect(()=>{const Pe=setTimeout(()=>{ge(ve)},ve.length?0:10);return()=>{clearTimeout(Pe)}},[ve]),De}var de=le(36237),Ze=le(63356),xe=le(34925),ot=le(34961),Be=le(51636),Me=le(16931),Oe=ve=>{const{componentCls:De}=ve,ge=`${De}-show-help`,Pe=`${De}-show-help-item`;return{[ge]:{transition:`opacity ${ve.motionDurationFast} ${ve.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Pe]:{overflow:"hidden",transition:`height ${ve.motionDurationFast} ${ve.motionEaseInOut},
opacity ${ve.motionDurationFast} ${ve.motionEaseInOut},
transform ${ve.motionDurationFast} ${ve.motionEaseInOut} !important`,[`&${Pe}-appear, &${Pe}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Pe}-leave-active`]:{transform:"translateY(-5px)"}}}}};const rt=ve=>({legend:{display:"block",width:"100%",marginBottom:ve.marginLG,padding:0,color:ve.colorTextDescription,fontSize:ve.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,de.unit)(ve.lineWidth)} ${ve.lineType} ${ve.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${(0,de.unit)(ve.controlOutlineWidth)} ${ve.controlOutline}`},output:{display:"block",paddingTop:15,color:ve.colorText,fontSize:ve.fontSize,lineHeight:ve.lineHeight}}),gt=(ve,De)=>{const{formItemCls:ge}=ve;return{[ge]:{[`${ge}-label > label`]:{height:De},[`${ge}-control-input`]:{minHeight:De}}}},xt=ve=>{const{componentCls:De}=ve;return{[ve.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Ze.Wf)(ve)),rt(ve)),{[`${De}-text`]:{display:"inline-block",paddingInlineEnd:ve.paddingSM},"&-small":Object.assign({},gt(ve,ve.controlHeightSM)),"&-large":Object.assign({},gt(ve,ve.controlHeightLG))})}},at=ve=>{const{formItemCls:De,iconCls:ge,rootPrefixCls:Pe,antCls:qe,labelRequiredMarkColor:Bt,labelColor:Nt,labelFontSize:Qt,labelHeight:Mt,labelColonMarginInlineStart:ct,labelColonMarginInlineEnd:it,itemMarginBottom:jt}=ve;return{[De]:Object.assign(Object.assign({},(0,Ze.Wf)(ve)),{marginBottom:jt,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden${qe}-row`]:{display:"none"},"&-has-warning":{[`${De}-split`]:{color:ve.colorError}},"&-has-error":{[`${De}-split`]:{color:ve.colorWarning}},[`${De}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:ve.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Mt,color:Nt,fontSize:Qt,[`> ${ge}`]:{fontSize:ve.fontSize,verticalAlign:"top"},[`&${De}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:ve.marginXXS,color:Bt,fontSize:ve.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${De}-required-mark-hidden, &${De}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${De}-optional`]:{display:"inline-block",marginInlineStart:ve.marginXXS,color:ve.colorTextDescription,[`&${De}-required-mark-hidden`]:{display:"none"}},[`${De}-tooltip`]:{color:ve.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:ve.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:ct,marginInlineEnd:it},[`&${De}-no-colon::after`]:{content:'"\\a0"'}}},[`${De}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Pe}-col-'"]):not([class*="' ${Pe}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:ve.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[De]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:ve.colorTextDescription,fontSize:ve.fontSize,lineHeight:ve.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:ve.controlHeightSM,transition:`color ${ve.motionDurationMid} ${ve.motionEaseOut}`},"&-explain":{"&-error":{color:ve.colorError},"&-warning":{color:ve.colorWarning}}},[`&-with-help ${De}-explain`]:{height:"auto",opacity:1},[`${De}-feedback-icon`]:{fontSize:ve.fontSize,textAlign:"center",visibility:"visible",animationName:xe.kr,animationDuration:ve.motionDurationMid,animationTimingFunction:ve.motionEaseOutBack,pointerEvents:"none","&-success":{color:ve.colorSuccess},"&-error":{color:ve.colorError},"&-warning":{color:ve.colorWarning},"&-validating":{color:ve.colorPrimary}}})}},Ye=(ve,De)=>{const{formItemCls:ge}=ve;return{[`${De}-horizontal`]:{[`${ge}-label`]:{flexGrow:0},[`${ge}-control`]:{flex:"1 1 0",minWidth:0},[`${ge}-label[class$='-24'], ${ge}-label[class*='-24 ']`]:{[`& + ${ge}-control`]:{minWidth:"unset"}}}}},st=ve=>{const{componentCls:De,formItemCls:ge,inlineItemMarginBottom:Pe}=ve;return{[`${De}-inline`]:{display:"flex",flexWrap:"wrap",[ge]:{flex:"none",marginInlineEnd:ve.margin,marginBottom:Pe,"&-row":{flexWrap:"nowrap"},[`> ${ge}-label,
> ${ge}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${ge}-label`]:{flex:"none"},[`${De}-text`]:{display:"inline-block"},[`${ge}-has-feedback`]:{display:"inline-block"}}}}},We=ve=>({padding:ve.verticalLabelPadding,margin:ve.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),St=ve=>{const{componentCls:De,formItemCls:ge,rootPrefixCls:Pe}=ve;return{[`${ge} ${ge}-label`]:We(ve),[`${De}:not(${De}-inline)`]:{[ge]:{flexWrap:"wrap",[`${ge}-label, ${ge}-control`]:{[`&:not([class*=" ${Pe}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Xe=ve=>{const{componentCls:De,formItemCls:ge,antCls:Pe}=ve;return{[`${De}-vertical`]:{[`${ge}:not(${ge}-horizontal)`]:{[`${ge}-row`]:{flexDirection:"column"},[`${ge}-label > label`]:{height:"auto"},[`${ge}-control`]:{width:"100%"},[`${ge}-label,
${Pe}-col-24${ge}-label,
${Pe}-col-xl-24${ge}-label`]:We(ve)}},[`@media (max-width: ${(0,de.unit)(ve.screenXSMax)})`]:[St(ve),{[De]:{[`${ge}:not(${ge}-horizontal)`]:{[`${Pe}-col-xs-24${ge}-label`]:We(ve)}}}],[`@media (max-width: ${(0,de.unit)(ve.screenSMMax)})`]:{[De]:{[`${ge}:not(${ge}-horizontal)`]:{[`${Pe}-col-sm-24${ge}-label`]:We(ve)}}},[`@media (max-width: ${(0,de.unit)(ve.screenMDMax)})`]:{[De]:{[`${ge}:not(${ge}-horizontal)`]:{[`${Pe}-col-md-24${ge}-label`]:We(ve)}}},[`@media (max-width: ${(0,de.unit)(ve.screenLGMax)})`]:{[De]:{[`${ge}:not(${ge}-horizontal)`]:{[`${Pe}-col-lg-24${ge}-label`]:We(ve)}}}}},_e=ve=>{const{formItemCls:De,antCls:ge}=ve;return{[`${De}-vertical`]:{[`${De}-row`]:{flexDirection:"column"},[`${De}-label > label`]:{height:"auto"},[`${De}-control`]:{width:"100%"}},[`${De}-vertical ${De}-label,
${ge}-col-24${De}-label,
${ge}-col-xl-24${De}-label`]:We(ve),[`@media (max-width: ${(0,de.unit)(ve.screenXSMax)})`]:[St(ve),{[De]:{[`${ge}-col-xs-24${De}-label`]:We(ve)}}],[`@media (max-width: ${(0,de.unit)(ve.screenSMMax)})`]:{[De]:{[`${ge}-col-sm-24${De}-label`]:We(ve)}},[`@media (max-width: ${(0,de.unit)(ve.screenMDMax)})`]:{[De]:{[`${ge}-col-md-24${De}-label`]:We(ve)}},[`@media (max-width: ${(0,de.unit)(ve.screenLGMax)})`]:{[De]:{[`${ge}-col-lg-24${De}-label`]:We(ve)}}}},ft=ve=>({labelRequiredMarkColor:ve.colorError,labelColor:ve.colorTextHeading,labelFontSize:ve.fontSize,labelHeight:ve.controlHeight,labelColonMarginInlineStart:ve.marginXXS/2,labelColonMarginInlineEnd:ve.marginXS,itemMarginBottom:ve.marginLG,verticalLabelPadding:`0 0 ${ve.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),Le=(ve,De)=>(0,Be.mergeToken)(ve,{formItemCls:`${ve.componentCls}-item`,rootPrefixCls:De});var Ke=(0,Me.I$)("Form",(ve,De)=>{let{rootPrefixCls:ge}=De;const Pe=Le(ve,ge);return[xt(Pe),at(Pe),Oe(Pe),Ye(Pe,Pe.componentCls),Ye(Pe,Pe.formItemCls),st(Pe),Xe(Pe),_e(Pe),(0,ot.Z)(Pe),xe.kr]},ft,{order:-1e3});const et=[];function pe(ve,De,ge){let Pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof ve=="string"?ve:`${De}-${Pe}`,error:ve,errorStatus:ge}}var Ie=ve=>{let{help:De,helpStatus:ge,errors:Pe=et,warnings:qe=et,className:Bt,fieldId:Nt,onVisibleChanged:Qt}=ve;const{prefixCls:Mt}=me.useContext(re.Rk),ct=`${Mt}-item-explain`,it=(0,$e.Z)(Mt),[jt,hn,ln]=Ke(Mt,it),cn=me.useMemo(()=>(0,Ne.Z)(Mt),[Mt]),Zn=Se(Pe),Xn=Se(qe),Jn=me.useMemo(()=>De!=null?[pe(De,"help",ge)]:[].concat((0,Je.Z)(Zn.map((Pn,Hn)=>pe(Pn,"error","error",Hn))),(0,Je.Z)(Xn.map((Pn,Hn)=>pe(Pn,"warning","warning",Hn)))),[De,ge,Zn,Xn]),Nn=me.useMemo(()=>{const Pn={};return Jn.forEach(Hn=>{let{key:ur}=Hn;Pn[ur]=(Pn[ur]||0)+1}),Jn.map((Hn,ur)=>Object.assign(Object.assign({},Hn),{key:Pn[Hn.key]>1?`${Hn.key}-fallback-${ur}`:Hn.key}))},[Jn]),Sn={};return Nt&&(Sn.id=`${Nt}_help`),jt(me.createElement(Ce.default,{motionDeadline:cn.motionDeadline,motionName:`${Mt}-show-help`,visible:!!Nn.length,onVisibleChanged:Qt},Pn=>{const{className:Hn,style:ur}=Pn;return me.createElement("div",Object.assign({},Sn,{className:be()(ct,Hn,ln,it,Bt,hn),style:ur}),me.createElement(Ce.CSSMotionList,Object.assign({keys:Nn},(0,Ne.Z)(Mt),{motionName:`${Mt}-show-help-item`,component:!1}),qn=>{const{key:lr,error:ir,errorStatus:er,className:tr,style:gr}=qn;return me.createElement("div",{key:lr,className:be()(tr,{[`${ct}-${er}`]:er}),style:gr},ir)}))}))},wt=le(69180),At=le(48755),ye=le(2171),fe=le(31756),ut=le(23069),_t=le(76846),bt=le(16722);const Ae=["parentNode"],nt="form_item";function dt(ve){return ve===void 0||ve===!1?[]:Array.isArray(ve)?ve:[ve]}function rn(ve,De){if(!ve.length)return;const ge=ve.join("_");return De?`${De}_${ge}`:Ae.includes(ge)?`${nt}_${ge}`:ge}function Et(ve,De,ge,Pe,qe,Bt){let Nt=Pe;return Bt!==void 0?Nt=Bt:ge.validating?Nt="validating":ve.length?Nt="error":De.length?Nt="warning":(ge.touched||qe&&ge.validated)&&(Nt="success"),Nt}var Ut=function(ve,De){var ge={};for(var Pe in ve)Object.prototype.hasOwnProperty.call(ve,Pe)&&De.indexOf(Pe)<0&&(ge[Pe]=ve[Pe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Pe=Object.getOwnPropertySymbols(ve);qe<Pe.length;qe++)De.indexOf(Pe[qe])<0&&Object.prototype.propertyIsEnumerable.call(ve,Pe[qe])&&(ge[Pe[qe]]=ve[Pe[qe]]);return ge};function Ge(ve){return dt(ve).join("_")}function Pt(ve,De){const ge=De.getFieldInstance(ve),Pe=(0,_t.bn)(ge);if(Pe)return Pe;const qe=rn(dt(ve),De.__INTERNAL__.name);if(qe)return document.getElementById(qe)}function tt(ve){const[De]=(0,wt.useForm)(),ge=me.useRef({}),Pe=me.useMemo(()=>ve!=null?ve:Object.assign(Object.assign({},De),{__INTERNAL__:{itemRef:qe=>Bt=>{const Nt=Ge(qe);Bt?ge.current[Nt]=Bt:delete ge.current[Nt]}},scrollToField:function(qe){let Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:Nt}=Bt,Qt=Ut(Bt,["focus"]),Mt=Pt(qe,Pe);Mt&&((0,bt.Z)(Mt,Object.assign({scrollMode:"if-needed",block:"nearest"},Qt)),Nt&&Pe.focusField(qe))},focusField:qe=>{var Bt,Nt;const Qt=Pe.getFieldInstance(qe);typeof(Qt==null?void 0:Qt.focus)=="function"?Qt.focus():(Nt=(Bt=Pt(qe,Pe))===null||Bt===void 0?void 0:Bt.focus)===null||Nt===void 0||Nt.call(Bt)},getFieldInstance:qe=>{const Bt=Ge(qe);return ge.current[Bt]}}),[ve,De]);return[Pe]}var ae=le(98350),ee=function(ve,De){var ge={};for(var Pe in ve)Object.prototype.hasOwnProperty.call(ve,Pe)&&De.indexOf(Pe)<0&&(ge[Pe]=ve[Pe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Pe=Object.getOwnPropertySymbols(ve);qe<Pe.length;qe++)De.indexOf(Pe[qe])<0&&Object.prototype.propertyIsEnumerable.call(ve,Pe[qe])&&(ge[Pe[qe]]=ve[Pe[qe]]);return ge};const z=(ve,De)=>{const ge=me.useContext(ye.Z),{getPrefixCls:Pe,direction:qe,requiredMark:Bt,colon:Nt,scrollToFirstError:Qt,className:Mt,style:ct}=(0,At.dj)("form"),{prefixCls:it,className:jt,rootClassName:hn,size:ln,disabled:cn=ge,form:Zn,colon:Xn,labelAlign:Jn,labelWrap:Nn,labelCol:Sn,wrapperCol:Pn,hideRequiredMark:Hn,layout:ur="horizontal",scrollToFirstError:qn,requiredMark:lr,onFinishFailed:ir,name:er,style:tr,feedbackIcons:gr,variant:mr}=ve,cr=ee(ve,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),vr=(0,fe.Z)(ln),Cr=me.useContext(ae.Z),or=me.useMemo(()=>lr!==void 0?lr:Hn?!1:Bt!==void 0?Bt:!0,[Hn,lr,Bt]),dr=Xn!=null?Xn:Nt,Fn=Pe("form",it),wr=(0,$e.Z)(Fn),[Rr,jr,Er]=Ke(Fn,wr),Br=be()(Fn,`${Fn}-${ur}`,{[`${Fn}-hide-required-mark`]:or===!1,[`${Fn}-rtl`]:qe==="rtl",[`${Fn}-${vr}`]:vr},Er,wr,jr,Mt,jt,hn),[kr]=tt(Zn),{__INTERNAL__:Tr}=kr;Tr.name=er;const zr=me.useMemo(()=>({name:er,labelAlign:Jn,labelCol:Sn,labelWrap:Nn,wrapperCol:Pn,vertical:ur==="vertical",colon:dr,requiredMark:or,itemRef:Tr.itemRef,form:kr,feedbackIcons:gr}),[er,Jn,Sn,Pn,ur,dr,or,kr,gr]),fr=me.useRef(null);me.useImperativeHandle(De,()=>{var qt;return Object.assign(Object.assign({},kr),{nativeElement:(qt=fr.current)===null||qt===void 0?void 0:qt.nativeElement})});const Gn=(qt,Xt)=>{if(qt){let Ot={block:"nearest"};typeof qt=="object"&&(Ot=Object.assign(Object.assign({},Ot),qt)),kr.scrollToField(Xt,Ot)}},$t=qt=>{if(ir==null||ir(qt),qt.errorFields.length){const Xt=qt.errorFields[0].name;if(qn!==void 0){Gn(qn,Xt);return}Qt!==void 0&&Gn(Qt,Xt)}};return Rr(me.createElement(re.pg.Provider,{value:mr},me.createElement(ye.n,{disabled:cn},me.createElement(ut.Z.Provider,{value:vr},me.createElement(re.RV,{validateMessages:Cr},me.createElement(re.q3.Provider,{value:zr},me.createElement(wt.default,Object.assign({id:er},cr,{name:er,onFinishFailed:$t,form:kr,ref:fr,style:Object.assign(Object.assign({},ct),tr),className:Br}))))))))};var se=me.forwardRef(z),ne=le(41799),we=le(8654),Ve=le(22703),It=le(32383),je=le(11592);function Qe(ve){if(typeof ve=="function")return ve;const De=(0,je.Z)(ve);return De.length<=1?De[0]:De}const ht=()=>{const{status:ve,errors:De=[],warnings:ge=[]}=me.useContext(re.aM);return{status:ve,errors:De,warnings:ge}};ht.Context=re.aM;var Dt=ht,kt=le(16089);function Gt(ve){const[De,ge]=me.useState(ve),Pe=me.useRef(null),qe=me.useRef([]),Bt=me.useRef(!1);me.useEffect(()=>(Bt.current=!1,()=>{Bt.current=!0,kt.Z.cancel(Pe.current),Pe.current=null}),[]);function Nt(Qt){Bt.current||(Pe.current===null&&(qe.current=[],Pe.current=(0,kt.Z)(()=>{Pe.current=null,ge(Mt=>{let ct=Mt;return qe.current.forEach(it=>{ct=it(ct)}),ct})})),qe.current.push(Qt))}return[De,Nt]}function Zt(){const{itemRef:ve}=me.useContext(re.q3),De=me.useRef({});function ge(Pe,qe){const Bt=qe&&typeof qe=="object"&&(0,we.C4)(qe),Nt=Pe.join("_");return(De.current.name!==Nt||De.current.originRef!==Bt)&&(De.current.name=Nt,De.current.originRef=Bt,De.current.ref=(0,we.sQ)(ve(Pe),Bt)),De.current.ref}return ge}var Lt=le(29194),sn=le(34280),Jt=le(2738),on=le(65970),pt=le(70425),dn=le(5472);const Rt=ve=>{const{formItemCls:De}=ve;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${De}-control`]:{display:"flex"}}}};var Yt=(0,Me.bk)(["Form","item-item"],(ve,De)=>{let{rootPrefixCls:ge}=De;const Pe=Le(ve,ge);return[Rt(Pe)]}),an=function(ve,De){var ge={};for(var Pe in ve)Object.prototype.hasOwnProperty.call(ve,Pe)&&De.indexOf(Pe)<0&&(ge[Pe]=ve[Pe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Pe=Object.getOwnPropertySymbols(ve);qe<Pe.length;qe++)De.indexOf(Pe[qe])<0&&Object.prototype.propertyIsEnumerable.call(ve,Pe[qe])&&(ge[Pe[qe]]=ve[Pe[qe]]);return ge};const Tn=24;var ke=ve=>{const{prefixCls:De,status:ge,labelCol:Pe,wrapperCol:qe,children:Bt,errors:Nt,warnings:Qt,_internalItemRender:Mt,extra:ct,help:it,fieldId:jt,marginBottom:hn,onErrorVisibleChanged:ln,label:cn}=ve,Zn=`${De}-item`,Xn=me.useContext(re.q3),Jn=me.useMemo(()=>{let cr=Object.assign({},qe||Xn.wrapperCol||{});return cn===null&&!Pe&&!qe&&Xn.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(Cr=>{const or=Cr?[Cr]:[],dr=(0,pt.U2)(Xn.labelCol,or),Fn=typeof dr=="object"?dr:{},wr=(0,pt.U2)(cr,or),Rr=typeof wr=="object"?wr:{};"span"in Fn&&!("offset"in Rr)&&Fn.span<Tn&&(cr=(0,pt.t8)(cr,[].concat(or,["offset"]),Fn.span))}),cr},[qe,Xn]),Nn=be()(`${Zn}-control`,Jn.className),Sn=me.useMemo(()=>{const{labelCol:cr,wrapperCol:vr}=Xn;return an(Xn,["labelCol","wrapperCol"])},[Xn]),Pn=me.useRef(null),[Hn,ur]=me.useState(0);(0,sn.Z)(()=>{ct&&Pn.current?ur(Pn.current.clientHeight):ur(0)},[ct]);const qn=me.createElement("div",{className:`${Zn}-control-input`},me.createElement("div",{className:`${Zn}-control-input-content`},Bt)),lr=me.useMemo(()=>({prefixCls:De,status:ge}),[De,ge]),ir=hn!==null||Nt.length||Qt.length?me.createElement(re.Rk.Provider,{value:lr},me.createElement(Ie,{fieldId:jt,errors:Nt,warnings:Qt,help:it,helpStatus:ge,className:`${Zn}-explain-connected`,onVisibleChanged:ln})):null,er={};jt&&(er.id=`${jt}_extra`);const tr=ct?me.createElement("div",Object.assign({},er,{className:`${Zn}-extra`,ref:Pn}),ct):null,gr=ir||tr?me.createElement("div",{className:`${Zn}-additional`,style:hn?{minHeight:hn+Hn}:{}},ir,tr):null,mr=Mt&&Mt.mark==="pro_table_render"&&Mt.render?Mt.render(ve,{input:qn,errorList:ir,extra:tr}):me.createElement(me.Fragment,null,qn,gr);return me.createElement(re.q3.Provider,{value:Sn},me.createElement(dn.Z,Object.assign({},Jn,{className:Nn}),mr),me.createElement(Yt,{prefixCls:De}))},Ue=le(61485),mt=le(9017),zt=le(85981),nn=le(25399),fn=function(ve,De){var ge={};for(var Pe in ve)Object.prototype.hasOwnProperty.call(ve,Pe)&&De.indexOf(Pe)<0&&(ge[Pe]=ve[Pe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Pe=Object.getOwnPropertySymbols(ve);qe<Pe.length;qe++)De.indexOf(Pe[qe])<0&&Object.prototype.propertyIsEnumerable.call(ve,Pe[qe])&&(ge[Pe[qe]]=ve[Pe[qe]]);return ge};function $n(ve){return ve?typeof ve=="object"&&!me.isValidElement(ve)?ve:{title:ve}:null}var pn=ve=>{let{prefixCls:De,label:ge,htmlFor:Pe,labelCol:qe,labelAlign:Bt,colon:Nt,required:Qt,requiredMark:Mt,tooltip:ct,vertical:it}=ve;var jt;const[hn]=(0,mt.Z)("Form"),{labelAlign:ln,labelCol:cn,labelWrap:Zn,colon:Xn}=me.useContext(re.q3);if(!ge)return null;const Jn=qe||cn||{},Nn=Bt||ln,Sn=`${De}-item-label`,Pn=be()(Sn,Nn==="left"&&`${Sn}-left`,Jn.className,{[`${Sn}-wrap`]:!!Zn});let Hn=ge;const ur=Nt===!0||Xn!==!1&&Nt!==!1;ur&&!it&&typeof ge=="string"&&ge.trim()&&(Hn=ge.replace(/[:|]\s*$/,""));const lr=$n(ct);if(lr){const{icon:cr=me.createElement(Ue.Z,null)}=lr,vr=fn(lr,["icon"]),Cr=me.createElement(nn.Z,Object.assign({},vr),me.cloneElement(cr,{className:`${De}-item-tooltip`,title:"",onClick:or=>{or.preventDefault()},tabIndex:null}));Hn=me.createElement(me.Fragment,null,Hn,Cr)}const ir=Mt==="optional",er=typeof Mt=="function",tr=Mt===!1;er?Hn=Mt(Hn,{required:!!Qt}):ir&&!Qt&&(Hn=me.createElement(me.Fragment,null,Hn,me.createElement("span",{className:`${De}-item-optional`,title:""},(hn==null?void 0:hn.optional)||((jt=zt.Z.Form)===null||jt===void 0?void 0:jt.optional))));let gr;tr?gr="hidden":(ir||er)&&(gr="optional");const mr=be()({[`${De}-item-required`]:Qt,[`${De}-item-required-mark-${gr}`]:gr,[`${De}-item-no-colon`]:!ur});return me.createElement(dn.Z,Object.assign({},Jn,{className:Pn}),me.createElement("label",{htmlFor:Pe,className:mr,title:typeof ge=="string"?ge:""},Hn))},wn=le(29679),vn=le(19248),Kn=le(96512),gn=le(58617);const Dn={success:wn.Z,warning:Kn.Z,error:vn.Z,validating:gn.Z};function tn(ve){let{children:De,errors:ge,warnings:Pe,hasFeedback:qe,validateStatus:Bt,prefixCls:Nt,meta:Qt,noStyle:Mt}=ve;const ct=`${Nt}-item`,{feedbackIcons:it}=me.useContext(re.q3),jt=Et(ge,Pe,Qt,null,!!qe,Bt),{isFormItemInput:hn,status:ln,hasFeedback:cn,feedbackIcon:Zn}=me.useContext(re.aM),Xn=me.useMemo(()=>{var Jn;let Nn;if(qe){const Pn=qe!==!0&&qe.icons||it,Hn=jt&&((Jn=Pn==null?void 0:Pn({status:jt,errors:ge,warnings:Pe}))===null||Jn===void 0?void 0:Jn[jt]),ur=jt&&Dn[jt];Nn=Hn!==!1&&ur?me.createElement("span",{className:be()(`${ct}-feedback-icon`,`${ct}-feedback-icon-${jt}`)},Hn||me.createElement(ur,null)):null}const Sn={status:jt||"",errors:ge,warnings:Pe,hasFeedback:!!qe,feedbackIcon:Nn,isFormItemInput:!0};return Mt&&(Sn.status=(jt!=null?jt:ln)||"",Sn.isFormItemInput=hn,Sn.hasFeedback=!!(qe!=null?qe:cn),Sn.feedbackIcon=qe!==void 0?Sn.feedbackIcon:Zn),Sn},[jt,qe,Mt,hn,ln]);return me.createElement(re.aM.Provider,{value:Xn},De)}var yn=function(ve,De){var ge={};for(var Pe in ve)Object.prototype.hasOwnProperty.call(ve,Pe)&&De.indexOf(Pe)<0&&(ge[Pe]=ve[Pe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Pe=Object.getOwnPropertySymbols(ve);qe<Pe.length;qe++)De.indexOf(Pe[qe])<0&&Object.prototype.propertyIsEnumerable.call(ve,Pe[qe])&&(ge[Pe[qe]]=ve[Pe[qe]]);return ge};function un(ve){const{prefixCls:De,className:ge,rootClassName:Pe,style:qe,help:Bt,errors:Nt,warnings:Qt,validateStatus:Mt,meta:ct,hasFeedback:it,hidden:jt,children:hn,fieldId:ln,required:cn,isRequired:Zn,onSubItemMetaChange:Xn,layout:Jn}=ve,Nn=yn(ve,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),Sn=`${De}-item`,{requiredMark:Pn,vertical:Hn}=me.useContext(re.q3),ur=Hn||Jn==="vertical",qn=me.useRef(null),lr=Se(Nt),ir=Se(Qt),er=Bt!=null,tr=!!(er||Nt.length||Qt.length),gr=!!qn.current&&(0,Lt.Z)(qn.current),[mr,cr]=me.useState(null);(0,sn.Z)(()=>{if(tr&&qn.current){const Fn=getComputedStyle(qn.current);cr(parseInt(Fn.marginBottom,10))}},[tr,gr]);const vr=Fn=>{Fn||cr(null)},or=function(){let Fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const wr=Fn?lr:ct.errors,Rr=Fn?ir:ct.warnings;return Et(wr,Rr,ct,"",!!it,Mt)}(),dr=be()(Sn,ge,Pe,{[`${Sn}-with-help`]:er||lr.length||ir.length,[`${Sn}-has-feedback`]:or&&it,[`${Sn}-has-success`]:or==="success",[`${Sn}-has-warning`]:or==="warning",[`${Sn}-has-error`]:or==="error",[`${Sn}-is-validating`]:or==="validating",[`${Sn}-hidden`]:jt,[`${Sn}-${Jn}`]:Jn});return me.createElement("div",{className:dr,style:qe,ref:qn},me.createElement(on.Z,Object.assign({className:`${Sn}-row`},(0,Jt.Z)(Nn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),me.createElement(pn,Object.assign({htmlFor:ln},ve,{requiredMark:Pn,required:cn!=null?cn:Zn,prefixCls:De,vertical:ur})),me.createElement(ke,Object.assign({},ve,ct,{errors:lr,warnings:ir,prefixCls:De,status:or,help:Bt,marginBottom:mr,onErrorVisibleChanged:vr}),me.createElement(re.qI.Provider,{value:Xn},me.createElement(tn,{prefixCls:De,meta:ct,errors:ct.errors,warnings:ct.warnings,hasFeedback:it,validateStatus:or},hn)))),!!mr&&me.createElement("div",{className:`${Sn}-margin-offset`,style:{marginBottom:-mr}}))}const Ln="__SPLIT__",Yn=null;function zn(ve,De){const ge=Object.keys(ve),Pe=Object.keys(De);return ge.length===Pe.length&&ge.every(qe=>{const Bt=ve[qe],Nt=De[qe];return Bt===Nt||typeof Bt=="function"||typeof Nt=="function"})}const Bn=me.memo(ve=>{let{children:De}=ve;return De},(ve,De)=>zn(ve.control,De.control)&&ve.update===De.update&&ve.childProps.length===De.childProps.length&&ve.childProps.every((ge,Pe)=>ge===De.childProps[Pe]));function _n(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Vn(ve){const{name:De,noStyle:ge,className:Pe,dependencies:qe,prefixCls:Bt,shouldUpdate:Nt,rules:Qt,children:Mt,required:ct,label:it,messageVariables:jt,trigger:hn="onChange",validateTrigger:ln,hidden:cn,help:Zn,layout:Xn}=ve,{getPrefixCls:Jn}=me.useContext(At.E_),{name:Nn}=me.useContext(re.q3),Sn=Qe(Mt),Pn=typeof Sn=="function",Hn=me.useContext(re.qI),{validateTrigger:ur}=me.useContext(wt.FieldContext),qn=ln!==void 0?ln:ur,lr=De!=null,ir=Jn("form",Bt),er=(0,$e.Z)(ir),[tr,gr,mr]=Ke(ir,er),cr=(0,It.ln)("Form.Item"),vr=me.useContext(wt.ListContext),Cr=me.useRef(null),[or,dr]=Gt({}),[Fn,wr]=(0,ne.Z)(()=>_n()),Rr=fr=>{const Gn=vr==null?void 0:vr.getKey(fr.name);if(wr(fr.destroy?_n():fr,!0),ge&&Zn!==!1&&Hn){let $t=fr.name;if(fr.destroy)$t=Cr.current||$t;else if(Gn!==void 0){const[qt,Xt]=Gn;$t=[qt].concat((0,Je.Z)(Xt)),Cr.current=$t}Hn(fr,$t)}},jr=(fr,Gn)=>{dr($t=>{const qt=Object.assign({},$t),Ot=[].concat((0,Je.Z)(fr.name.slice(0,-1)),(0,Je.Z)(Gn)).join(Ln);return fr.destroy?delete qt[Ot]:qt[Ot]=fr,qt})},[Er,Br]=me.useMemo(()=>{const fr=(0,Je.Z)(Fn.errors),Gn=(0,Je.Z)(Fn.warnings);return Object.values(or).forEach($t=>{fr.push.apply(fr,(0,Je.Z)($t.errors||[])),Gn.push.apply(Gn,(0,Je.Z)($t.warnings||[]))}),[fr,Gn]},[or,Fn.errors,Fn.warnings]),kr=Zt();function Tr(fr,Gn,$t){return ge&&!cn?me.createElement(tn,{prefixCls:ir,hasFeedback:ve.hasFeedback,validateStatus:ve.validateStatus,meta:Fn,errors:Er,warnings:Br,noStyle:!0},fr):me.createElement(un,Object.assign({key:"row"},ve,{className:be()(Pe,mr,er,gr),prefixCls:ir,fieldId:Gn,isRequired:$t,errors:Er,warnings:Br,meta:Fn,onSubItemMetaChange:jr,layout:Xn}),fr)}if(!lr&&!Pn&&!qe)return tr(Tr(Sn));let zr={};return typeof it=="string"?zr.label=it:De&&(zr.label=String(De)),jt&&(zr=Object.assign(Object.assign({},zr),jt)),tr(me.createElement(wt.Field,Object.assign({},ve,{messageVariables:zr,trigger:hn,validateTrigger:qn,onMetaChange:Rr}),(fr,Gn,$t)=>{const qt=dt(De).length&&Gn?Gn.name:[],Xt=rn(qt,Nn),Ot=ct!==void 0?ct:!!(Qt!=null&&Qt.some(Vt=>{if(Vt&&typeof Vt=="object"&&Vt.required&&!Vt.warningOnly)return!0;if(typeof Vt=="function"){const Kt=Vt($t);return(Kt==null?void 0:Kt.required)&&!(Kt!=null&&Kt.warningOnly)}return!1})),En=Object.assign({},fr);let On=null;if(Array.isArray(Sn)&&lr)On=Sn;else if(!(Pn&&(!(Nt||qe)||lr))){if(!(qe&&!Pn&&!lr))if(me.isValidElement(Sn)){const Vt=Object.assign(Object.assign({},Sn.props),En);if(Vt.id||(Vt.id=Xt),Zn||Er.length>0||Br.length>0||ve.extra){const Cn=[];(Zn||Er.length>0)&&Cn.push(`${Xt}_help`),ve.extra&&Cn.push(`${Xt}_extra`),Vt["aria-describedby"]=Cn.join(" ")}Er.length>0&&(Vt["aria-invalid"]="true"),Ot&&(Vt["aria-required"]="true"),(0,we.Yr)(Sn)&&(Vt.ref=kr(qt,Sn)),new Set([].concat((0,Je.Z)(dt(hn)),(0,Je.Z)(dt(qn)))).forEach(Cn=>{Vt[Cn]=function(){for(var rr,Mr,br,Ir,Dr,Lr=arguments.length,Hr=new Array(Lr),Or=0;Or<Lr;Or++)Hr[Or]=arguments[Or];(br=En[Cn])===null||br===void 0||(rr=br).call.apply(rr,[En].concat(Hr)),(Dr=(Ir=Sn.props)[Cn])===null||Dr===void 0||(Mr=Dr).call.apply(Mr,[Ir].concat(Hr))}});const xn=[Vt["aria-required"],Vt["aria-invalid"],Vt["aria-describedby"]];On=me.createElement(Bn,{control:En,update:Sn,childProps:xn},(0,Ve.Tm)(Sn,Vt))}else Pn&&(Nt||qe)&&!lr?On=Sn($t):On=Sn}return Tr(On,Xt,Ot)}))}const Qn=Vn;Qn.useStatus=Dt;var jn=Qn,yt=function(ve,De){var ge={};for(var Pe in ve)Object.prototype.hasOwnProperty.call(ve,Pe)&&De.indexOf(Pe)<0&&(ge[Pe]=ve[Pe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Pe=Object.getOwnPropertySymbols(ve);qe<Pe.length;qe++)De.indexOf(Pe[qe])<0&&Object.prototype.propertyIsEnumerable.call(ve,Pe[qe])&&(ge[Pe[qe]]=ve[Pe[qe]]);return ge},In=ve=>{var{prefixCls:De,children:ge}=ve,Pe=yt(ve,["prefixCls","children"]);const{getPrefixCls:qe}=me.useContext(At.E_),Bt=qe("form",De),Nt=me.useMemo(()=>({prefixCls:Bt,status:"error"}),[Bt]);return me.createElement(wt.List,Object.assign({},Pe),(Qt,Mt,ct)=>me.createElement(re.Rk.Provider,{value:Nt},ge(Qt.map(it=>Object.assign(Object.assign({},it),{fieldKey:it.key})),Mt,{errors:ct.errors,warnings:ct.warnings})))};function Un(){const{form:ve}=me.useContext(re.q3);return ve}const Ee=se;Ee.Item=jn,Ee.List=In,Ee.ErrorList=Ie,Ee.useForm=tt,Ee.useFormInstance=Un,Ee.useWatch=wt.useWatch,Ee.Provider=re.RV,Ee.create=()=>{};var He=Ee},4875:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return bn}});var re=le(59301),Je=le(84105),me=le(87395),ze=le(92310),be=le.n(ze),Ce=le(60499),Ne=le(18642),$e=le(43749),Se=le(72190),de=le(42244),Ze=le(38705),xe=le(17212);function ot(){return typeof BigInt=="function"}function Be(ke){return!ke&&ke!==0&&!Number.isNaN(ke)||!String(ke).trim()}function Me(ke){var Ue=ke.trim(),mt=Ue.startsWith("-");mt&&(Ue=Ue.slice(1)),Ue=Ue.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Ue.startsWith(".")&&(Ue="0".concat(Ue));var zt=Ue||"0",nn=zt.split("."),fn=nn[0]||"0",$n=nn[1]||"0";fn==="0"&&$n==="0"&&(mt=!1);var An=mt?"-":"";return{negative:mt,negativeStr:An,trimStr:zt,integerStr:fn,decimalStr:$n,fullStr:"".concat(An).concat(zt)}}function Re(ke){var Ue=String(ke);return!Number.isNaN(Number(Ue))&&Ue.includes("e")}function Oe(ke){var Ue=String(ke);if(Re(ke)){var mt=Number(Ue.slice(Ue.indexOf("e-")+2)),zt=Ue.match(/\.(\d+)/);return zt!=null&&zt[1]&&(mt+=zt[1].length),mt}return Ue.includes(".")&&gt(Ue)?Ue.length-Ue.indexOf(".")-1:0}function rt(ke){var Ue=String(ke);if(Re(ke)){if(ke>Number.MAX_SAFE_INTEGER)return String(ot()?BigInt(ke).toString():Number.MAX_SAFE_INTEGER);if(ke<Number.MIN_SAFE_INTEGER)return String(ot()?BigInt(ke).toString():Number.MIN_SAFE_INTEGER);Ue=ke.toFixed(Oe(Ue))}return Me(Ue).fullStr}function gt(ke){return typeof ke=="number"?!Number.isNaN(ke):ke?/^\s*-?\d+(\.\d+)?\s*$/.test(ke)||/^\s*-?\d+\.\s*$/.test(ke)||/^\s*-?\.\d+\s*$/.test(ke):!1}var xt=function(){function ke(Ue){if((0,Ze.Z)(this,ke),(0,Ne.Z)(this,"origin",""),(0,Ne.Z)(this,"negative",void 0),(0,Ne.Z)(this,"integer",void 0),(0,Ne.Z)(this,"decimal",void 0),(0,Ne.Z)(this,"decimalLen",void 0),(0,Ne.Z)(this,"empty",void 0),(0,Ne.Z)(this,"nan",void 0),Be(Ue)){this.empty=!0;return}if(this.origin=String(Ue),Ue==="-"||Number.isNaN(Ue)){this.nan=!0;return}var mt=Ue;if(Re(mt)&&(mt=Number(mt)),mt=typeof mt=="string"?mt:rt(mt),gt(mt)){var zt=Me(mt);this.negative=zt.negative;var nn=zt.trimStr.split(".");this.integer=BigInt(nn[0]);var fn=nn[1]||"0";this.decimal=BigInt(fn),this.decimalLen=fn.length}else this.nan=!0}return(0,xe.Z)(ke,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(mt){var zt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(mt,"0"));return BigInt(zt)}},{key:"negate",value:function(){var mt=new ke(this.toString());return mt.negative=!mt.negative,mt}},{key:"cal",value:function(mt,zt,nn){var fn=Math.max(this.getDecimalStr().length,mt.getDecimalStr().length),$n=this.alignDecimal(fn),An=mt.alignDecimal(fn),pn=zt($n,An).toString(),wn=nn(fn),vn=Me(pn),Kn=vn.negativeStr,gn=vn.trimStr,Dn="".concat(Kn).concat(gn.padStart(wn+1,"0"));return new ke("".concat(Dn.slice(0,-wn),".").concat(Dn.slice(-wn)))}},{key:"add",value:function(mt){if(this.isInvalidate())return new ke(mt);var zt=new ke(mt);return zt.isInvalidate()?this:this.cal(zt,function(nn,fn){return nn+fn},function(nn){return nn})}},{key:"multi",value:function(mt){var zt=new ke(mt);return this.isInvalidate()||zt.isInvalidate()?new ke(NaN):this.cal(zt,function(nn,fn){return nn*fn},function(nn){return nn*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(mt){return this.toString()===(mt==null?void 0:mt.toString())}},{key:"lessEquals",value:function(mt){return this.add(mt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return mt?this.isInvalidate()?"":Me("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),ke}(),at=function(){function ke(Ue){if((0,Ze.Z)(this,ke),(0,Ne.Z)(this,"origin",""),(0,Ne.Z)(this,"number",void 0),(0,Ne.Z)(this,"empty",void 0),Be(Ue)){this.empty=!0;return}this.origin=String(Ue),this.number=Number(Ue)}return(0,xe.Z)(ke,[{key:"negate",value:function(){return new ke(-this.toNumber())}},{key:"add",value:function(mt){if(this.isInvalidate())return new ke(mt);var zt=Number(mt);if(Number.isNaN(zt))return this;var nn=this.number+zt;if(nn>Number.MAX_SAFE_INTEGER)return new ke(Number.MAX_SAFE_INTEGER);if(nn<Number.MIN_SAFE_INTEGER)return new ke(Number.MIN_SAFE_INTEGER);var fn=Math.max(Oe(this.number),Oe(zt));return new ke(nn.toFixed(fn))}},{key:"multi",value:function(mt){var zt=Number(mt);if(this.isInvalidate()||Number.isNaN(zt))return new ke(NaN);var nn=this.number*zt;if(nn>Number.MAX_SAFE_INTEGER)return new ke(Number.MAX_SAFE_INTEGER);if(nn<Number.MIN_SAFE_INTEGER)return new ke(Number.MIN_SAFE_INTEGER);var fn=Math.max(Oe(this.number),Oe(zt));return new ke(nn.toFixed(fn))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(mt){return this.toNumber()===(mt==null?void 0:mt.toNumber())}},{key:"lessEquals",value:function(mt){return this.add(mt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return mt?this.isInvalidate()?"":rt(this.number):this.origin}}]),ke}();function Ye(ke){return ot()?new xt(ke):new at(ke)}function st(ke,Ue,mt){var zt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ke==="")return"";var nn=Me(ke),fn=nn.negativeStr,$n=nn.integerStr,An=nn.decimalStr,pn="".concat(Ue).concat(An),wn="".concat(fn).concat($n);if(mt>=0){var vn=Number(An[mt]);if(vn>=5&&!zt){var Kn=Ye(ke).add("".concat(fn,"0.").concat("0".repeat(mt)).concat(10-vn));return st(Kn.toString(),Ue,mt,zt)}return mt===0?wn:"".concat(wn).concat(Ue).concat(An.padEnd(mt,"0").slice(0,mt))}return pn===".0"?wn:"".concat(wn).concat(pn)}var We=Ye,St=le(36901),Xe=le(34280);function _e(ke,Ue){return typeof Proxy!="undefined"&&ke?new Proxy(ke,{get:function(zt,nn){if(Ue[nn])return Ue[nn];var fn=zt[nn];return typeof fn=="function"?fn.bind(zt):fn}}):ke}var ft=le(8654),Le=le(48736);function Ke(ke,Ue){var mt=(0,re.useRef)(null);function zt(){try{var fn=ke.selectionStart,$n=ke.selectionEnd,An=ke.value,pn=An.substring(0,fn),wn=An.substring($n);mt.current={start:fn,end:$n,value:An,beforeTxt:pn,afterTxt:wn}}catch(vn){}}function nn(){if(ke&&mt.current&&Ue)try{var fn=ke.value,$n=mt.current,An=$n.beforeTxt,pn=$n.afterTxt,wn=$n.start,vn=fn.length;if(fn.startsWith(An))vn=An.length;else if(fn.endsWith(pn))vn=fn.length-mt.current.afterTxt.length;else{var Kn=An[wn-1],gn=fn.indexOf(Kn,wn-1);gn!==-1&&(vn=gn+1)}ke.setSelectionRange(vn,vn)}catch(Dn){(0,Le.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Dn.message))}}return[zt,nn]}var et=le(49658),pe=function(){var Ue=(0,re.useState)(!1),mt=(0,Se.Z)(Ue,2),zt=mt[0],nn=mt[1];return(0,Xe.Z)(function(){nn((0,et.Z)())},[]),zt},Ct=pe,Ie=le(16089),wt=200,At=600;function ye(ke){var Ue=ke.prefixCls,mt=ke.upNode,zt=ke.downNode,nn=ke.upDisabled,fn=ke.downDisabled,$n=ke.onStep,An=re.useRef(),pn=re.useRef([]),wn=re.useRef();wn.current=$n;var vn=function(){clearTimeout(An.current)},Kn=function(zn,Bn){zn.preventDefault(),vn(),wn.current(Bn);function _n(){wn.current(Bn),An.current=setTimeout(_n,wt)}An.current=setTimeout(_n,At)};re.useEffect(function(){return function(){vn(),pn.current.forEach(function(Yn){return Ie.Z.cancel(Yn)})}},[]);var gn=Ct();if(gn)return null;var Dn="".concat(Ue,"-handler"),tn=be()(Dn,"".concat(Dn,"-up"),(0,Ne.Z)({},"".concat(Dn,"-up-disabled"),nn)),yn=be()(Dn,"".concat(Dn,"-down"),(0,Ne.Z)({},"".concat(Dn,"-down-disabled"),fn)),un=function(){return pn.current.push((0,Ie.Z)(vn))},Ln={unselectable:"on",role:"button",onMouseUp:un,onMouseLeave:un};return re.createElement("div",{className:"".concat(Dn,"-wrap")},re.createElement("span",(0,Ce.Z)({},Ln,{onMouseDown:function(zn){Kn(zn,!0)},"aria-label":"Increase Value","aria-disabled":nn,className:tn}),mt||re.createElement("span",{unselectable:"on",className:"".concat(Ue,"-handler-up-inner")})),re.createElement("span",(0,Ce.Z)({},Ln,{onMouseDown:function(zn){Kn(zn,!1)},"aria-label":"Decrease Value","aria-disabled":fn,className:yn}),zt||re.createElement("span",{unselectable:"on",className:"".concat(Ue,"-handler-down-inner")})))}function fe(ke){var Ue=typeof ke=="number"?rt(ke):Me(ke).fullStr,mt=Ue.includes(".");return mt?Me(Ue.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:ke+"0"}var ut=le(30292),_t=function(){var ke=(0,re.useRef)(0),Ue=function(){Ie.Z.cancel(ke.current)};return(0,re.useEffect)(function(){return Ue},[]),function(mt){Ue(),ke.current=(0,Ie.Z)(function(){mt()})}},bt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Ae=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],nt=function(Ue,mt){return Ue||mt.isEmpty()?mt.toString():mt.toNumber()},dt=function(Ue){var mt=We(Ue);return mt.isInvalidate()?null:mt},rn=re.forwardRef(function(ke,Ue){var mt=ke.prefixCls,zt=ke.className,nn=ke.style,fn=ke.min,$n=ke.max,An=ke.step,pn=An===void 0?1:An,wn=ke.defaultValue,vn=ke.value,Kn=ke.disabled,gn=ke.readOnly,Dn=ke.upHandler,tn=ke.downHandler,yn=ke.keyboard,un=ke.changeOnWheel,Ln=un===void 0?!1:un,Yn=ke.controls,zn=Yn===void 0?!0:Yn,Bn=ke.classNames,_n=ke.stringMode,Vn=ke.parser,Qn=ke.formatter,jn=ke.precision,yt=ke.decimalSeparator,Ht=ke.onChange,In=ke.onInput,Un=ke.onPressEnter,Ee=ke.onStep,He=ke.changeOnBlur,ve=He===void 0?!0:He,De=ke.domRef,ge=(0,de.Z)(ke,bt),Pe="".concat(mt,"-input"),qe=re.useRef(null),Bt=re.useState(!1),Nt=(0,Se.Z)(Bt,2),Qt=Nt[0],Mt=Nt[1],ct=re.useRef(!1),it=re.useRef(!1),jt=re.useRef(!1),hn=re.useState(function(){return We(vn!=null?vn:wn)}),ln=(0,Se.Z)(hn,2),cn=ln[0],Zn=ln[1];function Xn(Xt){vn===void 0&&Zn(Xt)}var Jn=re.useCallback(function(Xt,Ot){if(!Ot)return jn>=0?jn:Math.max(Oe(Xt),Oe(pn))},[jn,pn]),Nn=re.useCallback(function(Xt){var Ot=String(Xt);if(Vn)return Vn(Ot);var En=Ot;return yt&&(En=En.replace(yt,".")),En.replace(/[^\w.-]+/g,"")},[Vn,yt]),Sn=re.useRef(""),Pn=re.useCallback(function(Xt,Ot){if(Qn)return Qn(Xt,{userTyping:Ot,input:String(Sn.current)});var En=typeof Xt=="number"?rt(Xt):Xt;if(!Ot){var On=Jn(En,Ot);if(gt(En)&&(yt||On>=0)){var Vt=yt||".";En=st(En,Vt,On)}}return En},[Qn,Jn,yt]),Hn=re.useState(function(){var Xt=wn!=null?wn:vn;return cn.isInvalidate()&&["string","number"].includes((0,$e.Z)(Xt))?Number.isNaN(Xt)?"":Xt:Pn(cn.toString(),!1)}),ur=(0,Se.Z)(Hn,2),qn=ur[0],lr=ur[1];Sn.current=qn;function ir(Xt,Ot){lr(Pn(Xt.isInvalidate()?Xt.toString(!1):Xt.toString(!Ot),Ot))}var er=re.useMemo(function(){return dt($n)},[$n,jn]),tr=re.useMemo(function(){return dt(fn)},[fn,jn]),gr=re.useMemo(function(){return!er||!cn||cn.isInvalidate()?!1:er.lessEquals(cn)},[er,cn]),mr=re.useMemo(function(){return!tr||!cn||cn.isInvalidate()?!1:cn.lessEquals(tr)},[tr,cn]),cr=Ke(qe.current,Qt),vr=(0,Se.Z)(cr,2),Cr=vr[0],or=vr[1],dr=function(Ot){return er&&!Ot.lessEquals(er)?er:tr&&!tr.lessEquals(Ot)?tr:null},Fn=function(Ot){return!dr(Ot)},wr=function(Ot,En){var On=Ot,Vt=Fn(On)||On.isEmpty();if(!On.isEmpty()&&!En&&(On=dr(On)||On,Vt=!0),!gn&&!Kn&&Vt){var Kt=On.toString(),xn=Jn(Kt,En);return xn>=0&&(On=We(st(Kt,".",xn)),Fn(On)||(On=We(st(Kt,".",xn,!0)))),On.equals(cn)||(Xn(On),Ht==null||Ht(On.isEmpty()?null:nt(_n,On)),vn===void 0&&ir(On,En)),On}return cn},Rr=_t(),jr=function Xt(Ot){if(Cr(),Sn.current=Ot,lr(Ot),!it.current){var En=Nn(Ot),On=We(En);On.isNaN()||wr(On,!0)}In==null||In(Ot),Rr(function(){var Vt=Ot;Vn||(Vt=Ot.replace(/。/g,".")),Vt!==Ot&&Xt(Vt)})},Er=function(){it.current=!0},Br=function(){it.current=!1,jr(qe.current.value)},kr=function(Ot){jr(Ot.target.value)},Tr=function(Ot){var En;if(!(Ot&&gr||!Ot&&mr)){ct.current=!1;var On=We(jt.current?fe(pn):pn);Ot||(On=On.negate());var Vt=(cn||We(0)).add(On.toString()),Kt=wr(Vt,!1);Ee==null||Ee(nt(_n,Kt),{offset:jt.current?fe(pn):pn,type:Ot?"up":"down"}),(En=qe.current)===null||En===void 0||En.focus()}},zr=function(Ot){var En=We(Nn(qn)),On;En.isNaN()?On=wr(cn,Ot):On=wr(En,Ot),vn!==void 0?ir(cn,!1):On.isNaN()||ir(On,!1)},fr=function(){ct.current=!0},Gn=function(Ot){var En=Ot.key,On=Ot.shiftKey;ct.current=!0,jt.current=On,En==="Enter"&&(it.current||(ct.current=!1),zr(!1),Un==null||Un(Ot)),yn!==!1&&!it.current&&["Up","ArrowUp","Down","ArrowDown"].includes(En)&&(Tr(En==="Up"||En==="ArrowUp"),Ot.preventDefault())},$t=function(){ct.current=!1,jt.current=!1};re.useEffect(function(){if(Ln&&Qt){var Xt=function(On){Tr(On.deltaY<0),On.preventDefault()},Ot=qe.current;if(Ot)return Ot.addEventListener("wheel",Xt,{passive:!1}),function(){return Ot.removeEventListener("wheel",Xt)}}});var qt=function(){ve&&zr(!1),Mt(!1),ct.current=!1};return(0,Xe.o)(function(){cn.isInvalidate()||ir(cn,!1)},[jn,Qn]),(0,Xe.o)(function(){var Xt=We(vn);Zn(Xt);var Ot=We(Nn(qn));(!Xt.equals(Ot)||!ct.current||Qn)&&ir(Xt,ct.current)},[vn]),(0,Xe.o)(function(){Qn&&or()},[qn]),re.createElement("div",{ref:De,className:be()(mt,zt,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(mt,"-focused"),Qt),"".concat(mt,"-disabled"),Kn),"".concat(mt,"-readonly"),gn),"".concat(mt,"-not-a-number"),cn.isNaN()),"".concat(mt,"-out-of-range"),!cn.isInvalidate()&&!Fn(cn))),style:nn,onFocus:function(){Mt(!0)},onBlur:qt,onKeyDown:Gn,onKeyUp:$t,onCompositionStart:Er,onCompositionEnd:Br,onBeforeInput:fr},zn&&re.createElement(ye,{prefixCls:mt,upNode:Dn,downNode:tn,upDisabled:gr,downDisabled:mr,onStep:Tr}),re.createElement("div",{className:"".concat(Pe,"-wrap")},re.createElement("input",(0,Ce.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":fn,"aria-valuemax":$n,"aria-valuenow":cn.isInvalidate()?null:cn.toString(),step:pn},ge,{ref:(0,ft.sQ)(qe,Ue),className:Pe,value:qn,onChange:kr,disabled:Kn,readOnly:gn}))))}),Et=re.forwardRef(function(ke,Ue){var mt=ke.disabled,zt=ke.style,nn=ke.prefixCls,fn=nn===void 0?"rc-input-number":nn,$n=ke.value,An=ke.prefix,pn=ke.suffix,wn=ke.addonBefore,vn=ke.addonAfter,Kn=ke.className,gn=ke.classNames,Dn=(0,de.Z)(ke,Ae),tn=re.useRef(null),yn=re.useRef(null),un=re.useRef(null),Ln=function(zn){un.current&&(0,ut.nH)(un.current,zn)};return re.useImperativeHandle(Ue,function(){return _e(un.current,{focus:Ln,nativeElement:tn.current.nativeElement||yn.current})}),re.createElement(St.BaseInput,{className:Kn,triggerFocus:Ln,prefixCls:fn,value:$n,disabled:mt,style:zt,prefix:An,suffix:pn,addonAfter:vn,addonBefore:wn,classNames:gn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:tn},re.createElement(rn,(0,Ce.Z)({prefixCls:fn,disabled:mt,ref:un,domRef:yn,className:gn==null?void 0:gn.input},Dn)))}),Ut=Et,Ge=Ut,Pt=le(62487),tt=le(82855),ae=le(48755),ee=le(60840),z=le(2171),ie=le(83397),se=le(31756),ne=le(56553),we=le(24971),Ve=le(70045),It=le(36237),je=le(53075),Qe=le(64910),ht=le(39082),Dt=le(63356),kt=le(56119),Gt=le(16931),Zt=le(51636),Lt=le(17835);const sn=ke=>{var Ue;const mt=(Ue=ke.handleVisible)!==null&&Ue!==void 0?Ue:"auto",zt=ke.controlHeightSM-ke.lineWidth*2;return Object.assign(Object.assign({},(0,Qe.T)(ke)),{controlWidth:90,handleWidth:zt,handleFontSize:ke.fontSize/2,handleVisible:mt,handleActiveBg:ke.colorFillAlter,handleBg:ke.colorBgContainer,filledHandleBg:new Lt.FastColor(ke.colorFillSecondary).onBackground(ke.colorBgContainer).toHexString(),handleHoverColor:ke.colorPrimary,handleBorderColor:ke.colorBorder,handleOpacity:mt===!0?1:0,handleVisibleWidth:mt===!0?zt:0})},Jt=(ke,Ue)=>{let{componentCls:mt,borderRadiusSM:zt,borderRadiusLG:nn}=ke;const fn=Ue==="lg"?nn:zt;return{[`&-${Ue}`]:{[`${mt}-handler-wrap`]:{borderStartEndRadius:fn,borderEndEndRadius:fn},[`${mt}-handler-up`]:{borderStartEndRadius:fn},[`${mt}-handler-down`]:{borderEndEndRadius:fn}}}},on=ke=>{const{componentCls:Ue,lineWidth:mt,lineType:zt,borderRadius:nn,inputFontSizeSM:fn,inputFontSizeLG:$n,controlHeightLG:An,controlHeightSM:pn,colorError:wn,paddingInlineSM:vn,paddingBlockSM:Kn,paddingBlockLG:gn,paddingInlineLG:Dn,colorTextDescription:tn,motionDurationMid:yn,handleHoverColor:un,handleOpacity:Ln,paddingInline:Yn,paddingBlock:zn,handleBg:Bn,handleActiveBg:_n,colorTextDisabled:Vn,borderRadiusSM:Qn,borderRadiusLG:jn,controlWidth:yt,handleBorderColor:Ht,filledHandleBg:In,lineHeightLG:Un,calc:Ee}=ke;return[{[Ue]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Dt.Wf)(ke)),(0,je.ik)(ke)),{display:"inline-block",width:yt,margin:0,padding:0,borderRadius:nn}),(0,ht.qG)(ke,{[`${Ue}-handler-wrap`]:{background:Bn,[`${Ue}-handler-down`]:{borderBlockStart:`${(0,It.unit)(mt)} ${zt} ${Ht}`}}})),(0,ht.H8)(ke,{[`${Ue}-handler-wrap`]:{background:In,[`${Ue}-handler-down`]:{borderBlockStart:`${(0,It.unit)(mt)} ${zt} ${Ht}`}},"&:focus-within":{[`${Ue}-handler-wrap`]:{background:Bn}}})),(0,ht.vc)(ke,{[`${Ue}-handler-wrap`]:{background:Bn,[`${Ue}-handler-down`]:{borderBlockStart:`${(0,It.unit)(mt)} ${zt} ${Ht}`}}})),(0,ht.Mu)(ke)),{"&-rtl":{direction:"rtl",[`${Ue}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:$n,lineHeight:Un,borderRadius:jn,[`input${Ue}-input`]:{height:Ee(An).sub(Ee(mt).mul(2)).equal(),padding:`${(0,It.unit)(gn)} ${(0,It.unit)(Dn)}`}},"&-sm":{padding:0,fontSize:fn,borderRadius:Qn,[`input${Ue}-input`]:{height:Ee(pn).sub(Ee(mt).mul(2)).equal(),padding:`${(0,It.unit)(Kn)} ${(0,It.unit)(vn)}`}},"&-out-of-range":{[`${Ue}-input-wrap`]:{input:{color:wn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Dt.Wf)(ke)),(0,je.s7)(ke)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Ue}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Ue}-group-addon`]:{borderRadius:jn,fontSize:ke.fontSizeLG}},"&-sm":{[`${Ue}-group-addon`]:{borderRadius:Qn}}},(0,ht.ir)(ke)),(0,ht.S5)(ke)),{[`&:not(${Ue}-compact-first-item):not(${Ue}-compact-last-item)${Ue}-compact-item`]:{[`${Ue}, ${Ue}-group-addon`]:{borderRadius:0}},[`&:not(${Ue}-compact-last-item)${Ue}-compact-first-item`]:{[`${Ue}, ${Ue}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Ue}-compact-first-item)${Ue}-compact-last-item`]:{[`${Ue}, ${Ue}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${Ue}-input`]:{cursor:"not-allowed"},[Ue]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Dt.Wf)(ke)),{width:"100%",padding:`${(0,It.unit)(zn)} ${(0,It.unit)(Yn)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:nn,outline:0,transition:`all ${yn} linear`,appearance:"textfield",fontSize:"inherit"}),(0,je.nz)(ke.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${Ue}-handler-wrap, &-focused ${Ue}-handler-wrap`]:{width:ke.handleWidth,opacity:1}})},{[Ue]:Object.assign(Object.assign(Object.assign({[`${Ue}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:ke.handleVisibleWidth,opacity:Ln,height:"100%",borderStartStartRadius:0,borderStartEndRadius:nn,borderEndEndRadius:nn,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${yn}`,overflow:"hidden",[`${Ue}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${Ue}-handler-up-inner,
${Ue}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:ke.handleFontSize}}},[`${Ue}-handler`]:{height:"50%",overflow:"hidden",color:tn,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${(0,It.unit)(mt)} ${zt} ${Ht}`,transition:`all ${yn} linear`,"&:active":{background:_n},"&:hover":{height:"60%",[`
${Ue}-handler-up-inner,
${Ue}-handler-down-inner
`]:{color:un}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Dt.Ro)()),{color:tn,transition:`all ${yn} linear`,userSelect:"none"})},[`${Ue}-handler-up`]:{borderStartEndRadius:nn},[`${Ue}-handler-down`]:{borderEndEndRadius:nn}},Jt(ke,"lg")),Jt(ke,"sm")),{"&-disabled, &-readonly":{[`${Ue}-handler-wrap`]:{display:"none"},[`${Ue}-input`]:{color:"inherit"}},[`
${Ue}-handler-up-disabled,
${Ue}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${Ue}-handler-up-disabled:hover &-handler-up-inner,
${Ue}-handler-down-disabled:hover &-handler-down-inner
`]:{color:Vn}})}]},pt=ke=>{const{componentCls:Ue,paddingBlock:mt,paddingInline:zt,inputAffixPadding:nn,controlWidth:fn,borderRadiusLG:$n,borderRadiusSM:An,paddingInlineLG:pn,paddingInlineSM:wn,paddingBlockLG:vn,paddingBlockSM:Kn,motionDurationMid:gn}=ke;return{[`${Ue}-affix-wrapper`]:Object.assign(Object.assign({[`input${Ue}-input`]:{padding:`${(0,It.unit)(mt)} 0`}},(0,je.ik)(ke)),{position:"relative",display:"inline-flex",alignItems:"center",width:fn,padding:0,paddingInlineStart:zt,"&-lg":{borderRadius:$n,paddingInlineStart:pn,[`input${Ue}-input`]:{padding:`${(0,It.unit)(vn)} 0`}},"&-sm":{borderRadius:An,paddingInlineStart:wn,[`input${Ue}-input`]:{padding:`${(0,It.unit)(Kn)} 0`}},[`&:not(${Ue}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Ue}-disabled`]:{background:"transparent"},[`> div${Ue}`]:{width:"100%",border:"none",outline:"none",[`&${Ue}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Ue}-handler-wrap`]:{zIndex:2},[Ue]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:nn},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:zt,marginInlineStart:nn,transition:`margin ${gn}`}},[`&:hover ${Ue}-handler-wrap, &-focused ${Ue}-handler-wrap`]:{width:ke.handleWidth,opacity:1},[`&:not(${Ue}-affix-wrapper-without-controls):hover ${Ue}-suffix`]:{marginInlineEnd:ke.calc(ke.handleWidth).add(zt).equal()}})}};var dn=(0,Gt.I$)("InputNumber",ke=>{const Ue=(0,Zt.mergeToken)(ke,(0,Qe.e)(ke));return[on(Ue),pt(Ue),(0,kt.c)(Ue)]},sn,{unitless:{handleOpacity:!0}}),Rt=function(ke,Ue){var mt={};for(var zt in ke)Object.prototype.hasOwnProperty.call(ke,zt)&&Ue.indexOf(zt)<0&&(mt[zt]=ke[zt]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nn=0,zt=Object.getOwnPropertySymbols(ke);nn<zt.length;nn++)Ue.indexOf(zt[nn])<0&&Object.prototype.propertyIsEnumerable.call(ke,zt[nn])&&(mt[zt[nn]]=ke[zt[nn]]);return mt};const Yt=re.forwardRef((ke,Ue)=>{const{getPrefixCls:mt,direction:zt}=re.useContext(ae.E_),nn=re.useRef(null);re.useImperativeHandle(Ue,()=>nn.current);const{className:fn,rootClassName:$n,size:An,disabled:pn,prefixCls:wn,addonBefore:vn,addonAfter:Kn,prefix:gn,suffix:Dn,bordered:tn,readOnly:yn,status:un,controls:Ln,variant:Yn}=ke,zn=Rt(ke,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),Bn=mt("input-number",wn),_n=(0,ie.Z)(Bn),[Vn,Qn,jn]=dn(Bn,_n),{compactSize:yt,compactItemClassnames:Ht}=(0,Ve.ri)(Bn,zt);let In=re.createElement(me.Z,{className:`${Bn}-handler-up-inner`}),Un=re.createElement(Je.Z,{className:`${Bn}-handler-down-inner`});const Ee=typeof Ln=="boolean"?Ln:void 0;typeof Ln=="object"&&(In=typeof Ln.upIcon=="undefined"?In:re.createElement("span",{className:`${Bn}-handler-up-inner`},Ln.upIcon),Un=typeof Ln.downIcon=="undefined"?Un:re.createElement("span",{className:`${Bn}-handler-down-inner`},Ln.downIcon));const{hasFeedback:He,status:ve,isFormItemInput:De,feedbackIcon:ge}=re.useContext(ne.aM),Pe=(0,tt.F)(ve,un),qe=(0,se.Z)(ln=>{var cn;return(cn=An!=null?An:yt)!==null&&cn!==void 0?cn:ln}),Bt=re.useContext(z.Z),Nt=pn!=null?pn:Bt,[Qt,Mt]=(0,we.Z)("inputNumber",Yn,tn),ct=He&&re.createElement(re.Fragment,null,ge),it=be()({[`${Bn}-lg`]:qe==="large",[`${Bn}-sm`]:qe==="small",[`${Bn}-rtl`]:zt==="rtl",[`${Bn}-in-form-item`]:De},Qn),jt=`${Bn}-group`,hn=re.createElement(Ge,Object.assign({ref:nn,disabled:Nt,className:be()(jn,_n,fn,$n,Ht),upHandler:In,downHandler:Un,prefixCls:Bn,readOnly:yn,controls:Ee,prefix:gn,suffix:ct||Dn,addonBefore:vn&&re.createElement(Pt.Z,{form:!0,space:!0},vn),addonAfter:Kn&&re.createElement(Pt.Z,{form:!0,space:!0},Kn),classNames:{input:it,variant:be()({[`${Bn}-${Qt}`]:Mt},(0,tt.Z)(Bn,Pe,He)),affixWrapper:be()({[`${Bn}-affix-wrapper-sm`]:qe==="small",[`${Bn}-affix-wrapper-lg`]:qe==="large",[`${Bn}-affix-wrapper-rtl`]:zt==="rtl",[`${Bn}-affix-wrapper-without-controls`]:Ln===!1||Nt},Qn),wrapper:be()({[`${jt}-rtl`]:zt==="rtl"},Qn),groupWrapper:be()({[`${Bn}-group-wrapper-sm`]:qe==="small",[`${Bn}-group-wrapper-lg`]:qe==="large",[`${Bn}-group-wrapper-rtl`]:zt==="rtl",[`${Bn}-group-wrapper-${Qt}`]:Mt},(0,tt.Z)(`${Bn}-group-wrapper`,Pe,He),Qn)}},zn));return Vn(hn)}),an=Yt,Tn=ke=>re.createElement(ee.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},re.createElement(Yt,Object.assign({},ke)));an._InternalPanelDoNotUseOrYouWillBeFired=Tn;var bn=an},49397:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return at}});var re=le(59301),Je=le(92310),me=le.n(Je),ze=le(36901),be=le(8654),Ce=le(62487),Ne=le(86013),$e=le(82855),Se=le(48755),de=le(2171),Ze=le(83397),xe=le(31756),ot=le(56553),Be=le(24971),Me=le(70045),Re=le(23826),Oe=le(53075);function rt(Ye){return!!(Ye.prefix||Ye.suffix||Ye.allowClear||Ye.showCount)}var gt=function(Ye,st){var We={};for(var St in Ye)Object.prototype.hasOwnProperty.call(Ye,St)&&st.indexOf(St)<0&&(We[St]=Ye[St]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,St=Object.getOwnPropertySymbols(Ye);Xe<St.length;Xe++)st.indexOf(St[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Ye,St[Xe])&&(We[St[Xe]]=Ye[St[Xe]]);return We},at=(0,re.forwardRef)((Ye,st)=>{const{prefixCls:We,bordered:St=!0,status:Xe,size:_e,disabled:ft,onBlur:Le,onFocus:Ke,suffix:et,allowClear:pe,addonAfter:Ct,addonBefore:Ie,className:wt,style:At,styles:ye,rootClassName:fe,onChange:ut,classNames:_t,variant:bt}=Ye,Ae=gt(Ye,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:nt,direction:dt,allowClear:rn,autoComplete:Et,className:Ut,style:Ge,classNames:Pt,styles:tt}=(0,Se.dj)("input"),ae=nt("input",We),ee=(0,re.useRef)(null),z=(0,Ze.Z)(ae),[ie,se,ne]=(0,Oe.TI)(ae,fe),[we]=(0,Oe.ZP)(ae,z),{compactSize:Ve,compactItemClassnames:It}=(0,Me.ri)(ae,dt),je=(0,xe.Z)(bn=>{var ke;return(ke=_e!=null?_e:Ve)!==null&&ke!==void 0?ke:bn}),Qe=re.useContext(de.Z),ht=ft!=null?ft:Qe,{status:Dt,hasFeedback:kt,feedbackIcon:Gt}=(0,re.useContext)(ot.aM),Zt=(0,$e.F)(Dt,Xe),Lt=rt(Ye)||!!kt,sn=(0,re.useRef)(Lt),Jt=(0,Re.Z)(ee,!0),on=bn=>{Jt(),Le==null||Le(bn)},pt=bn=>{Jt(),Ke==null||Ke(bn)},dn=bn=>{Jt(),ut==null||ut(bn)},Rt=(kt||et)&&re.createElement(re.Fragment,null,et,kt&&Gt),Yt=(0,Ne.Z)(pe!=null?pe:rn),[an,Tn]=(0,Be.Z)("input",bt,St);return ie(we(re.createElement(ze.default,Object.assign({ref:(0,be.sQ)(st,ee),prefixCls:ae,autoComplete:Et},Ae,{disabled:ht,onBlur:on,onFocus:pt,style:Object.assign(Object.assign({},Ge),At),styles:Object.assign(Object.assign({},tt),ye),suffix:Rt,allowClear:Yt,className:me()(wt,fe,ne,z,It,Ut),onChange:dn,addonBefore:Ie&&re.createElement(Ce.Z,{form:!0,space:!0},Ie),addonAfter:Ct&&re.createElement(Ce.Z,{form:!0,space:!0},Ct),classNames:Object.assign(Object.assign(Object.assign({},_t),Pt),{input:me()({[`${ae}-sm`]:je==="small",[`${ae}-lg`]:je==="large",[`${ae}-rtl`]:dt==="rtl"},_t==null?void 0:_t.input,Pt.input,se),variant:me()({[`${ae}-${an}`]:Tn},(0,$e.Z)(ae,Zt)),affixWrapper:me()({[`${ae}-affix-wrapper-sm`]:je==="small",[`${ae}-affix-wrapper-lg`]:je==="large",[`${ae}-affix-wrapper-rtl`]:dt==="rtl"},se),wrapper:me()({[`${ae}-group-rtl`]:dt==="rtl"},se),groupWrapper:me()({[`${ae}-group-wrapper-sm`]:je==="small",[`${ae}-group-wrapper-lg`]:je==="large",[`${ae}-group-wrapper-rtl`]:dt==="rtl",[`${ae}-group-wrapper-${an}`]:Tn},(0,$e.Z)(`${ae}-group-wrapper`,Zt,kt),se)})}))))})},79809:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return st}});var re=le(59301),Je=le(92310),me=le.n(Je),ze=le(22711),be=le(86013),Ce=le(82855),Ne=le(48755),$e=le(2171),Se=le(83397),de=le(31756),Ze=le(56553),xe=le(24971),ot=le(70045),Be=le(30292),Me=le(53075),Re=le(16931),Oe=le(51636),rt=le(64910);const gt=We=>{const{componentCls:St,paddingLG:Xe}=We,_e=`${St}-textarea`;return{[`textarea${St}`]:{maxWidth:"100%",height:"auto",minHeight:We.controlHeight,lineHeight:We.lineHeight,verticalAlign:"bottom",transition:`all ${We.motionDurationSlow}`,resize:"vertical",[`&${St}-mouse-active`]:{transition:`all ${We.motionDurationSlow}, height 0s, width 0s`}},[`${St}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[_e]:{position:"relative","&-show-count":{[`> ${St}`]:{height:"100%"},[`${St}-data-count`]:{position:"absolute",bottom:We.calc(We.fontSize).mul(We.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:We.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${St},
&-affix-wrapper${_e}-has-feedback ${St}
`]:{paddingInlineEnd:Xe},[`&-affix-wrapper${St}-affix-wrapper`]:{padding:0,[`> textarea${St}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:We.calc(We.controlHeight).sub(We.calc(We.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${St}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${St}-clear-icon`]:{position:"absolute",insetInlineEnd:We.paddingInline,insetBlockStart:We.paddingXS},[`${_e}-suffix`]:{position:"absolute",top:0,insetInlineEnd:We.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${St}-affix-wrapper-sm`]:{[`${St}-suffix`]:{[`${St}-clear-icon`]:{insetInlineEnd:We.paddingInlineSM}}}}}};var xt=(0,Re.I$)(["Input","TextArea"],We=>{const St=(0,Oe.mergeToken)(We,(0,rt.e)(We));return[gt(St)]},rt.T,{resetFont:!1}),at=function(We,St){var Xe={};for(var _e in We)Object.prototype.hasOwnProperty.call(We,_e)&&St.indexOf(_e)<0&&(Xe[_e]=We[_e]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,_e=Object.getOwnPropertySymbols(We);ft<_e.length;ft++)St.indexOf(_e[ft])<0&&Object.prototype.propertyIsEnumerable.call(We,_e[ft])&&(Xe[_e[ft]]=We[_e[ft]]);return Xe},st=(0,re.forwardRef)((We,St)=>{var Xe;const{prefixCls:_e,bordered:ft=!0,size:Le,disabled:Ke,status:et,allowClear:pe,classNames:Ct,rootClassName:Ie,className:wt,style:At,styles:ye,variant:fe,showCount:ut,onMouseDown:_t,onResize:bt}=We,Ae=at(We,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:nt,direction:dt,allowClear:rn,autoComplete:Et,className:Ut,style:Ge,classNames:Pt,styles:tt}=(0,Ne.dj)("textArea"),ae=re.useContext($e.Z),ee=Ke!=null?Ke:ae,{status:z,hasFeedback:ie,feedbackIcon:se}=re.useContext(Ze.aM),ne=(0,Ce.F)(z,et),we=re.useRef(null);re.useImperativeHandle(St,()=>{var Tn;return{resizableTextArea:(Tn=we.current)===null||Tn===void 0?void 0:Tn.resizableTextArea,focus:bn=>{var ke,Ue;(0,Be.nH)((Ue=(ke=we.current)===null||ke===void 0?void 0:ke.resizableTextArea)===null||Ue===void 0?void 0:Ue.textArea,bn)},blur:()=>{var bn;return(bn=we.current)===null||bn===void 0?void 0:bn.blur()}}});const Ve=nt("input",_e),It=(0,Se.Z)(Ve),[je,Qe,ht]=(0,Me.TI)(Ve,Ie),[Dt]=xt(Ve,It),{compactSize:kt,compactItemClassnames:Gt}=(0,ot.ri)(Ve,dt),Zt=(0,de.Z)(Tn=>{var bn;return(bn=Le!=null?Le:kt)!==null&&bn!==void 0?bn:Tn}),[Lt,sn]=(0,xe.Z)("textArea",fe,ft),Jt=(0,be.Z)(pe!=null?pe:rn),[on,pt]=re.useState(!1),[dn,Rt]=re.useState(!1),Yt=Tn=>{pt(!0),_t==null||_t(Tn);const bn=()=>{pt(!1),document.removeEventListener("mouseup",bn)};document.addEventListener("mouseup",bn)},an=Tn=>{var bn,ke;if(bt==null||bt(Tn),on&&typeof getComputedStyle=="function"){const Ue=(ke=(bn=we.current)===null||bn===void 0?void 0:bn.nativeElement)===null||ke===void 0?void 0:ke.querySelector("textarea");Ue&&getComputedStyle(Ue).resize==="both"&&Rt(!0)}};return je(Dt(re.createElement(ze.default,Object.assign({autoComplete:Et},Ae,{style:Object.assign(Object.assign({},Ge),At),styles:Object.assign(Object.assign({},tt),ye),disabled:ee,allowClear:Jt,className:me()(ht,It,wt,Ie,Gt,Ut,dn&&`${Ve}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},Ct),Pt),{textarea:me()({[`${Ve}-sm`]:Zt==="small",[`${Ve}-lg`]:Zt==="large"},Qe,Ct==null?void 0:Ct.textarea,Pt.textarea,on&&`${Ve}-mouse-active`),variant:me()({[`${Ve}-${Lt}`]:sn},(0,Ce.Z)(Ve,ne)),affixWrapper:me()(`${Ve}-textarea-affix-wrapper`,{[`${Ve}-affix-wrapper-rtl`]:dt==="rtl",[`${Ve}-affix-wrapper-sm`]:Zt==="small",[`${Ve}-affix-wrapper-lg`]:Zt==="large",[`${Ve}-textarea-show-count`]:ut||((Xe=We.count)===null||Xe===void 0?void 0:Xe.show)},Qe)}),prefixCls:Ve,suffix:ie&&re.createElement("span",{className:`${Ve}-textarea-suffix`},se),showCount:ut,ref:we,onResize:an,onMouseDown:Yt}))))})},23826:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return Je}});var re=le(59301);function Je(me,ze){const be=(0,re.useRef)([]),Ce=()=>{be.current.push(setTimeout(()=>{var Ne,$e,Se,de;!((Ne=me.current)===null||Ne===void 0)&&Ne.input&&(($e=me.current)===null||$e===void 0?void 0:$e.input.getAttribute("type"))==="password"&&(!((Se=me.current)===null||Se===void 0)&&Se.input.hasAttribute("value"))&&((de=me.current)===null||de===void 0||de.input.removeAttribute("value"))}))};return(0,re.useEffect)(()=>(ze&&Ce(),()=>be.current.forEach(Ne=>{Ne&&clearTimeout(Ne)})),[]),Ce}},37568:function(Wt,Tt,le){"use strict";le.d(Tt,{default:function(){return Pt}});var re=le(59301),Je=le(92310),me=le.n(Je),ze=le(48755),be=le(56553),Ce=le(53075),$e=tt=>{const{getPrefixCls:ae,direction:ee}=(0,re.useContext)(ze.E_),{prefixCls:z,className:ie}=tt,se=ae("input-group",z),ne=ae("input"),[we,Ve,It]=(0,Ce.ZP)(ne),je=me()(se,It,{[`${se}-lg`]:tt.size==="large",[`${se}-sm`]:tt.size==="small",[`${se}-compact`]:tt.compact,[`${se}-rtl`]:ee==="rtl"},Ve,ie),Qe=(0,re.useContext)(be.aM),ht=(0,re.useMemo)(()=>Object.assign(Object.assign({},Qe),{isFormItemInput:!1}),[Qe]);return we(re.createElement("span",{className:je,style:tt.style,onMouseEnter:tt.onMouseEnter,onMouseLeave:tt.onMouseLeave,onFocus:tt.onFocus,onBlur:tt.onBlur},re.createElement(be.aM.Provider,{value:ht},tt.children)))},Se=le(49397),de=le(77654),Ze=le(6089),xe=le(26112),ot=le(82855),Be=le(31756),Me=le(16931),Re=le(51636),Oe=le(64910);const rt=tt=>{const{componentCls:ae,paddingXS:ee}=tt;return{[ae]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:ee,"&-rtl":{direction:"rtl"},[`${ae}-input`]:{textAlign:"center",paddingInline:tt.paddingXXS},[`&${ae}-sm ${ae}-input`]:{paddingInline:tt.calc(tt.paddingXXS).div(2).equal()},[`&${ae}-lg ${ae}-input`]:{paddingInline:tt.paddingXS}}}};var gt=(0,Me.I$)(["Input","OTP"],tt=>{const ae=(0,Re.mergeToken)(tt,(0,Oe.e)(tt));return[rt(ae)]},Oe.T),xt=le(16089),at=function(tt,ae){var ee={};for(var z in tt)Object.prototype.hasOwnProperty.call(tt,z)&&ae.indexOf(z)<0&&(ee[z]=tt[z]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,z=Object.getOwnPropertySymbols(tt);ie<z.length;ie++)ae.indexOf(z[ie])<0&&Object.prototype.propertyIsEnumerable.call(tt,z[ie])&&(ee[z[ie]]=tt[z[ie]]);return ee},st=re.forwardRef((tt,ae)=>{const{value:ee,onChange:z,onActiveChange:ie,index:se,mask:ne}=tt,we=at(tt,["value","onChange","onActiveChange","index","mask"]),Ve=ee&&typeof ne=="string"?ne:ee,It=kt=>{z(se,kt.target.value)},je=re.useRef(null);re.useImperativeHandle(ae,()=>je.current);const Qe=()=>{(0,xt.Z)(()=>{var kt;const Gt=(kt=je.current)===null||kt===void 0?void 0:kt.input;document.activeElement===Gt&&Gt&&Gt.select()})},ht=kt=>{const{key:Gt,ctrlKey:Zt,metaKey:Lt}=kt;Gt==="ArrowLeft"?ie(se-1):Gt==="ArrowRight"?ie(se+1):Gt==="z"&&(Zt||Lt)&&kt.preventDefault(),Qe()},Dt=kt=>{kt.key==="Backspace"&&!ee&&ie(se-1),Qe()};return re.createElement(Se.Z,Object.assign({type:ne===!0?"password":"text"},we,{ref:je,value:Ve,onInput:It,onFocus:Qe,onKeyDown:ht,onKeyUp:Dt,onMouseDown:Qe,onMouseUp:Qe}))}),We=function(tt,ae){var ee={};for(var z in tt)Object.prototype.hasOwnProperty.call(tt,z)&&ae.indexOf(z)<0&&(ee[z]=tt[z]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,z=Object.getOwnPropertySymbols(tt);ie<z.length;ie++)ae.indexOf(z[ie])<0&&Object.prototype.propertyIsEnumerable.call(tt,z[ie])&&(ee[z[ie]]=tt[z[ie]]);return ee};function St(tt){return(tt||"").split("")}const Xe=tt=>{const{index:ae,prefixCls:ee,separator:z}=tt,ie=typeof z=="function"?z(ae):z;return ie?re.createElement("span",{className:`${ee}-separator`},ie):null};var ft=re.forwardRef((tt,ae)=>{const{prefixCls:ee,length:z=6,size:ie,defaultValue:se,value:ne,onChange:we,formatter:Ve,separator:It,variant:je,disabled:Qe,status:ht,autoFocus:Dt,mask:kt,type:Gt,onInput:Zt,inputMode:Lt}=tt,sn=We(tt,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:Jt,direction:on}=re.useContext(ze.E_),pt=Jt("otp",ee),dn=(0,xe.Z)(sn,{aria:!0,data:!0,attr:!0}),[Rt,Yt,an]=gt(pt),Tn=(0,Be.Z)(gn=>ie!=null?ie:gn),bn=re.useContext(be.aM),ke=(0,ot.F)(bn.status,ht),Ue=re.useMemo(()=>Object.assign(Object.assign({},bn),{status:ke,hasFeedback:!1,feedbackIcon:null}),[bn,ke]),mt=re.useRef(null),zt=re.useRef({});re.useImperativeHandle(ae,()=>({focus:()=>{var gn;(gn=zt.current[0])===null||gn===void 0||gn.focus()},blur:()=>{var gn;for(let Dn=0;Dn<z;Dn+=1)(gn=zt.current[Dn])===null||gn===void 0||gn.blur()},nativeElement:mt.current}));const nn=gn=>Ve?Ve(gn):gn,[fn,$n]=re.useState(()=>St(nn(se||"")));re.useEffect(()=>{ne!==void 0&&$n(St(ne))},[ne]);const An=(0,Ze.Z)(gn=>{$n(gn),Zt&&Zt(gn),we&&gn.length===z&&gn.every(Dn=>Dn)&&gn.some((Dn,tn)=>fn[tn]!==Dn)&&we(gn.join(""))}),pn=(0,Ze.Z)((gn,Dn)=>{let tn=(0,de.Z)(fn);for(let un=0;un<gn;un+=1)tn[un]||(tn[un]="");Dn.length<=1?tn[gn]=Dn:tn=tn.slice(0,gn).concat(St(Dn)),tn=tn.slice(0,z);for(let un=tn.length-1;un>=0&&!tn[un];un-=1)tn.pop();const yn=nn(tn.map(un=>un||" ").join(""));return tn=St(yn).map((un,Ln)=>un===" "&&!tn[Ln]?tn[Ln]:un),tn}),wn=(gn,Dn)=>{var tn;const yn=pn(gn,Dn),un=Math.min(gn+Dn.length,z-1);un!==gn&&yn[gn]!==void 0&&((tn=zt.current[un])===null||tn===void 0||tn.focus()),An(yn)},vn=gn=>{var Dn;(Dn=zt.current[gn])===null||Dn===void 0||Dn.focus()},Kn={variant:je,disabled:Qe,status:ke,mask:kt,type:Gt,inputMode:Lt};return Rt(re.createElement("div",Object.assign({},dn,{ref:mt,className:me()(pt,{[`${pt}-sm`]:Tn==="small",[`${pt}-lg`]:Tn==="large",[`${pt}-rtl`]:on==="rtl"},an,Yt)}),re.createElement(be.aM.Provider,{value:Ue},Array.from({length:z}).map((gn,Dn)=>{const tn=`otp-${Dn}`,yn=fn[Dn]||"";return re.createElement(re.Fragment,{key:tn},re.createElement(st,Object.assign({ref:un=>{zt.current[Dn]=un},index:Dn,size:Tn,htmlSize:1,className:`${pt}-input`,onChange:wn,value:yn,onActiveChange:vn,autoFocus:Dn===0&&Dt},Kn)),Dn<z-1&&re.createElement(Xe,{separator:It,index:Dn,prefixCls:pt}))}))))}),Le=le(73331),Ke=le(15277),et=le(2738),pe=le(8654),Ct=le(2171),Ie=le(23826),wt=function(tt,ae){var ee={};for(var z in tt)Object.prototype.hasOwnProperty.call(tt,z)&&ae.indexOf(z)<0&&(ee[z]=tt[z]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,z=Object.getOwnPropertySymbols(tt);ie<z.length;ie++)ae.indexOf(z[ie])<0&&Object.prototype.propertyIsEnumerable.call(tt,z[ie])&&(ee[z[ie]]=tt[z[ie]]);return ee};const At=tt=>tt?re.createElement(Ke.Z,null):re.createElement(Le.Z,null),ye={click:"onClick",hover:"onMouseOver"};var ut=re.forwardRef((tt,ae)=>{const{disabled:ee,action:z="click",visibilityToggle:ie=!0,iconRender:se=At}=tt,ne=re.useContext(Ct.Z),we=ee!=null?ee:ne,Ve=typeof ie=="object"&&ie.visible!==void 0,[It,je]=(0,re.useState)(()=>Ve?ie.visible:!1),Qe=(0,re.useRef)(null);re.useEffect(()=>{Ve&&je(ie.visible)},[Ve,ie]);const ht=(0,Ie.Z)(Qe),Dt=()=>{var Tn;if(we)return;It&&ht();const bn=!It;je(bn),typeof ie=="object"&&((Tn=ie.onVisibleChange)===null||Tn===void 0||Tn.call(ie,bn))},kt=Tn=>{const bn=ye[z]||"",ke=se(It),Ue={[bn]:Dt,className:`${Tn}-icon`,key:"passwordIcon",onMouseDown:mt=>{mt.preventDefault()},onMouseUp:mt=>{mt.preventDefault()}};return re.cloneElement(re.isValidElement(ke)?ke:re.createElement("span",null,ke),Ue)},{className:Gt,prefixCls:Zt,inputPrefixCls:Lt,size:sn}=tt,Jt=wt(tt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:on}=re.useContext(ze.E_),pt=on("input",Lt),dn=on("input-password",Zt),Rt=ie&&kt(dn),Yt=me()(dn,Gt,{[`${dn}-${sn}`]:!!sn}),an=Object.assign(Object.assign({},(0,et.Z)(Jt,["suffix","iconRender","visibilityToggle"])),{type:It?"text":"password",className:Yt,prefixCls:pt,suffix:Rt});return sn&&(an.size=sn),re.createElement(Se.Z,Object.assign({ref:(0,pe.sQ)(ae,Qe)},an))}),_t=le(47472),bt=le(22703),Ae=le(7939),nt=le(70045),dt=function(tt,ae){var ee={};for(var z in tt)Object.prototype.hasOwnProperty.call(tt,z)&&ae.indexOf(z)<0&&(ee[z]=tt[z]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,z=Object.getOwnPropertySymbols(tt);ie<z.length;ie++)ae.indexOf(z[ie])<0&&Object.prototype.propertyIsEnumerable.call(tt,z[ie])&&(ee[z[ie]]=tt[z[ie]]);return ee},Et=re.forwardRef((tt,ae)=>{const{prefixCls:ee,inputPrefixCls:z,className:ie,size:se,suffix:ne,enterButton:we=!1,addonAfter:Ve,loading:It,disabled:je,onSearch:Qe,onChange:ht,onCompositionStart:Dt,onCompositionEnd:kt}=tt,Gt=dt(tt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Zt,direction:Lt}=re.useContext(ze.E_),sn=re.useRef(!1),Jt=Zt("input-search",ee),on=Zt("input",z),{compactSize:pt}=(0,nt.ri)(Jt,Lt),dn=(0,Be.Z)(wn=>{var vn;return(vn=se!=null?se:pt)!==null&&vn!==void 0?vn:wn}),Rt=re.useRef(null),Yt=wn=>{wn!=null&&wn.target&&wn.type==="click"&&Qe&&Qe(wn.target.value,wn,{source:"clear"}),ht==null||ht(wn)},an=wn=>{var vn;document.activeElement===((vn=Rt.current)===null||vn===void 0?void 0:vn.input)&&wn.preventDefault()},Tn=wn=>{var vn,Kn;Qe&&Qe((Kn=(vn=Rt.current)===null||vn===void 0?void 0:vn.input)===null||Kn===void 0?void 0:Kn.value,wn,{source:"input"})},bn=wn=>{sn.current||It||Tn(wn)},ke=typeof we=="boolean"?re.createElement(_t.Z,null):null,Ue=`${Jt}-button`;let mt;const zt=we||{},nn=zt.type&&zt.type.__ANT_BUTTON===!0;nn||zt.type==="button"?mt=(0,bt.Tm)(zt,Object.assign({onMouseDown:an,onClick:wn=>{var vn,Kn;(Kn=(vn=zt==null?void 0:zt.props)===null||vn===void 0?void 0:vn.onClick)===null||Kn===void 0||Kn.call(vn,wn),Tn(wn)},key:"enterButton"},nn?{className:Ue,size:dn}:{})):mt=re.createElement(Ae.ZP,{className:Ue,type:we?"primary":void 0,size:dn,disabled:je,key:"enterButton",onMouseDown:an,onClick:Tn,loading:It,icon:ke},we),Ve&&(mt=[mt,(0,bt.Tm)(Ve,{key:"addonAfter"})]);const fn=me()(Jt,{[`${Jt}-rtl`]:Lt==="rtl",[`${Jt}-${dn}`]:!!dn,[`${Jt}-with-button`]:!!we},ie),$n=Object.assign(Object.assign({},Gt),{className:fn,prefixCls:on,type:"search"}),An=wn=>{sn.current=!0,Dt==null||Dt(wn)},pn=wn=>{sn.current=!1,kt==null||kt(wn)};return re.createElement(Se.Z,Object.assign({ref:(0,pe.sQ)(Rt,ae),onPressEnter:bn},$n,{size:dn,onCompositionStart:An,onCompositionEnd:pn,addonAfter:mt,suffix:ne,onChange:Yt,disabled:je}))}),Ut=le(79809);const Ge=Se.Z;Ge.Group=$e,Ge.Search=Et,Ge.TextArea=Ut.Z,Ge.Password=ut,Ge.OTP=ft;var Pt=Ge},82326:function(Wt,Tt,le){"use strict";var re=le(59301),Je=le(92310),me=le.n(Je),ze=le(37463),be=le(2738),Ce=le(75030),Ne=le(86641),$e=le(45915),Se=le(82855),de=le(48755),Ze=le(38406),xe=le(2171),ot=le(83397),Be=le(31756),Me=le(56553),Re=le(24971),Oe=le(70045),rt=le(57700),gt=le(1722),xt=le(90376),at=le(68525),Ye=le(90005),st=function(ft,Le){var Ke={};for(var et in ft)Object.prototype.hasOwnProperty.call(ft,et)&&Le.indexOf(et)<0&&(Ke[et]=ft[et]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,et=Object.getOwnPropertySymbols(ft);pe<et.length;pe++)Le.indexOf(et[pe])<0&&Object.prototype.propertyIsEnumerable.call(ft,et[pe])&&(Ke[et[pe]]=ft[et[pe]]);return Ke};const We="SECRET_COMBOBOX_MODE_DO_NOT_USE",St=(ft,Le)=>{var Ke;const{prefixCls:et,bordered:pe,className:Ct,rootClassName:Ie,getPopupContainer:wt,popupClassName:At,dropdownClassName:ye,listHeight:fe=256,placement:ut,listItemHeight:_t,size:bt,disabled:Ae,notFoundContent:nt,status:dt,builtinPlacements:rn,dropdownMatchSelectWidth:Et,popupMatchSelectWidth:Ut,direction:Ge,style:Pt,allowClear:tt,variant:ae,dropdownStyle:ee,transitionName:z,tagRender:ie,maxCount:se,prefix:ne}=ft,we=st(ft,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:Ve,getPrefixCls:It,renderEmpty:je,direction:Qe,virtual:ht,popupMatchSelectWidth:Dt,popupOverflow:kt}=re.useContext(de.E_),Gt=(0,de.dj)("select"),[,Zt]=(0,rt.ZP)(),Lt=_t!=null?_t:Zt==null?void 0:Zt.controlHeight,sn=It("select",et),Jt=It(),on=Ge!=null?Ge:Qe,{compactSize:pt,compactItemClassnames:dn}=(0,Oe.ri)(sn,on),[Rt,Yt]=(0,Re.Z)("select",ae,pe),an=(0,ot.Z)(sn),[Tn,bn,ke]=(0,xt.Z)(sn,an),Ue=re.useMemo(()=>{const{mode:jn}=ft;if(jn!=="combobox")return jn===We?"combobox":jn},[ft.mode]),mt=Ue==="multiple"||Ue==="tags",zt=(0,Ye.Z)(ft.suffixIcon,ft.showArrow),nn=(Ke=Ut!=null?Ut:Et)!==null&&Ke!==void 0?Ke:Dt,{status:fn,hasFeedback:$n,isFormItemInput:An,feedbackIcon:pn}=re.useContext(Me.aM),wn=(0,Se.F)(fn,dt);let vn;nt!==void 0?vn=nt:Ue==="combobox"?vn=null:vn=(je==null?void 0:je("Select"))||re.createElement(Ze.Z,{componentName:"Select"});const{suffixIcon:Kn,itemIcon:gn,removeIcon:Dn,clearIcon:tn}=(0,at.Z)(Object.assign(Object.assign({},we),{multiple:mt,hasFeedback:$n,feedbackIcon:pn,showSuffixIcon:zt,prefixCls:sn,componentName:"Select"})),yn=tt===!0?{clearIcon:tn}:tt,un=(0,be.Z)(we,["suffixIcon","itemIcon"]),Ln=me()(At||ye,{[`${sn}-dropdown-${on}`]:on==="rtl"},Ie,ke,an,bn),Yn=(0,Be.Z)(jn=>{var yt;return(yt=bt!=null?bt:pt)!==null&&yt!==void 0?yt:jn}),zn=re.useContext(xe.Z),Bn=Ae!=null?Ae:zn,_n=me()({[`${sn}-lg`]:Yn==="large",[`${sn}-sm`]:Yn==="small",[`${sn}-rtl`]:on==="rtl",[`${sn}-${Rt}`]:Yt,[`${sn}-in-form-item`]:An},(0,Se.Z)(sn,wn,$n),dn,Gt.className,Ct,Ie,ke,an,bn),Vn=re.useMemo(()=>ut!==void 0?ut:on==="rtl"?"bottomRight":"bottomLeft",[ut,on]),[Qn]=(0,Ce.Cn)("SelectLike",ee==null?void 0:ee.zIndex);return Tn(re.createElement(ze.ZP,Object.assign({ref:Le,virtual:ht,showSearch:Gt.showSearch},un,{style:Object.assign(Object.assign({},Gt.style),Pt),dropdownMatchSelectWidth:nn,transitionName:(0,Ne.m)(Jt,"slide-up",z),builtinPlacements:(0,gt.Z)(rn,kt),listHeight:fe,listItemHeight:Lt,mode:Ue,prefixCls:sn,placement:Vn,direction:on,prefix:ne,suffixIcon:Kn,menuItemSelectedIcon:gn,removeIcon:Dn,allowClear:yn,notFoundContent:vn,className:_n,getPopupContainer:wt||Ve,dropdownClassName:Ln,disabled:Bn,dropdownStyle:Object.assign(Object.assign({},ee),{zIndex:Qn}),maxCount:mt?se:void 0,tagRender:mt?ie:void 0})))},Xe=re.forwardRef(St),_e=(0,$e.Z)(Xe,"dropdownAlign");Xe.SECRET_COMBOBOX_MODE_DO_NOT_USE=We,Xe.Option=ze.Wx,Xe.OptGroup=ze.Xo,Xe._InternalPanelDoNotUseOrYouWillBeFired=_e,Tt.default=Xe},1722:function(Wt,Tt){"use strict";const le=Je=>{const ze={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Je==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},ze),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ze),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ze),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ze),{points:["br","tr"],offset:[0,-4]})}};function re(Je,me){return Je||le(me)}Tt.Z=re},90376:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return et}});var re=le(63356),Je=le(56119),me=le(16931),ze=le(51636),be=le(46e3),Ce=le(93873);const Ne=pe=>{const{optionHeight:Ct,optionFontSize:Ie,optionLineHeight:wt,optionPadding:At}=pe;return{position:"relative",display:"block",minHeight:Ct,padding:At,color:pe.colorText,fontWeight:"normal",fontSize:Ie,lineHeight:wt,boxSizing:"border-box"}};var Se=pe=>{const{antCls:Ct,componentCls:Ie}=pe,wt=`${Ie}-item`,At=`&${Ct}-slide-up-enter${Ct}-slide-up-enter-active`,ye=`&${Ct}-slide-up-appear${Ct}-slide-up-appear-active`,fe=`&${Ct}-slide-up-leave${Ct}-slide-up-leave-active`,ut=`${Ie}-dropdown-placement-`,_t=`${wt}-option-selected`;return[{[`${Ie}-dropdown`]:Object.assign(Object.assign({},(0,re.Wf)(pe)),{position:"absolute",top:-9999,zIndex:pe.zIndexPopup,boxSizing:"border-box",padding:pe.paddingXXS,overflow:"hidden",fontSize:pe.fontSize,fontVariant:"initial",backgroundColor:pe.colorBgElevated,borderRadius:pe.borderRadiusLG,outline:"none",boxShadow:pe.boxShadowSecondary,[`
${At}${ut}bottomLeft,
${ye}${ut}bottomLeft
`]:{animationName:be.fJ},[`
${At}${ut}topLeft,
${ye}${ut}topLeft,
${At}${ut}topRight,
${ye}${ut}topRight
`]:{animationName:be.Qt},[`${fe}${ut}bottomLeft`]:{animationName:be.Uw},[`
${fe}${ut}topLeft,
${fe}${ut}topRight
`]:{animationName:be.ly},"&-hidden":{display:"none"},[wt]:Object.assign(Object.assign({},Ne(pe)),{cursor:"pointer",transition:`background ${pe.motionDurationSlow} ease`,borderRadius:pe.borderRadiusSM,"&-group":{color:pe.colorTextDescription,fontSize:pe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},re.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${wt}-option-disabled)`]:{backgroundColor:pe.optionActiveBg},[`&-selected:not(${wt}-option-disabled)`]:{color:pe.optionSelectedColor,fontWeight:pe.optionSelectedFontWeight,backgroundColor:pe.optionSelectedBg,[`${wt}-option-state`]:{color:pe.colorPrimary}},"&-disabled":{[`&${wt}-option-selected`]:{backgroundColor:pe.colorBgContainerDisabled},color:pe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:pe.calc(pe.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Ne(pe)),{color:pe.colorTextDisabled})}),[`${_t}:has(+ ${_t})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${_t}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,be.oN)(pe,"slide-up"),(0,be.oN)(pe,"slide-down"),(0,Ce.Fm)(pe,"move-up"),(0,Ce.Fm)(pe,"move-down")]},de=le(26743),Ze=le(36237);function xe(pe,Ct){const{componentCls:Ie,inputPaddingHorizontalBase:wt,borderRadius:At}=pe,ye=pe.calc(pe.controlHeight).sub(pe.calc(pe.lineWidth).mul(2)).equal(),fe=Ct?`${Ie}-${Ct}`:"";return{[`${Ie}-single${fe}`]:{fontSize:pe.fontSize,height:pe.controlHeight,[`${Ie}-selector`]:Object.assign(Object.assign({},(0,re.Wf)(pe,!0)),{display:"flex",borderRadius:At,flex:"1 1 auto",[`${Ie}-selection-wrap:after`]:{lineHeight:(0,Ze.unit)(ye)},[`${Ie}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
${Ie}-selection-item,
${Ie}-selection-placeholder
`]:{display:"block",padding:0,lineHeight:(0,Ze.unit)(ye),transition:`all ${pe.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${Ie}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ie}-selection-item:empty:after`,`${Ie}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${Ie}-show-arrow ${Ie}-selection-item,
&${Ie}-show-arrow ${Ie}-selection-search,
&${Ie}-show-arrow ${Ie}-selection-placeholder
`]:{paddingInlineEnd:pe.showArrowPaddingInlineEnd},[`&${Ie}-open ${Ie}-selection-item`]:{color:pe.colorTextPlaceholder},[`&:not(${Ie}-customize-input)`]:{[`${Ie}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,Ze.unit)(wt)}`,[`${Ie}-selection-search-input`]:{height:ye,fontSize:pe.fontSize},"&:after":{lineHeight:(0,Ze.unit)(ye)}}},[`&${Ie}-customize-input`]:{[`${Ie}-selector`]:{"&:after":{display:"none"},[`${Ie}-selection-search`]:{position:"static",width:"100%"},[`${Ie}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,Ze.unit)(wt)}`,"&:after":{display:"none"}}}}}}}function ot(pe){const{componentCls:Ct}=pe,Ie=pe.calc(pe.controlPaddingHorizontalSM).sub(pe.lineWidth).equal();return[xe(pe),xe((0,ze.mergeToken)(pe,{controlHeight:pe.controlHeightSM,borderRadius:pe.borderRadiusSM}),"sm"),{[`${Ct}-single${Ct}-sm`]:{[`&:not(${Ct}-customize-input)`]:{[`${Ct}-selector`]:{padding:`0 ${(0,Ze.unit)(Ie)}`},[`&${Ct}-show-arrow ${Ct}-selection-search`]:{insetInlineEnd:pe.calc(Ie).add(pe.calc(pe.fontSize).mul(1.5)).equal()},[`
&${Ct}-show-arrow ${Ct}-selection-item,
&${Ct}-show-arrow ${Ct}-selection-placeholder
`]:{paddingInlineEnd:pe.calc(pe.fontSize).mul(1.5).equal()}}}},xe((0,ze.mergeToken)(pe,{controlHeight:pe.singleItemHeightLG,fontSize:pe.fontSizeLG,borderRadius:pe.borderRadiusLG}),"lg")]}const Be=pe=>{const{fontSize:Ct,lineHeight:Ie,lineWidth:wt,controlHeight:At,controlHeightSM:ye,controlHeightLG:fe,paddingXXS:ut,controlPaddingHorizontal:_t,zIndexPopupBase:bt,colorText:Ae,fontWeightStrong:nt,controlItemBgActive:dt,controlItemBgHover:rn,colorBgContainer:Et,colorFillSecondary:Ut,colorBgContainerDisabled:Ge,colorTextDisabled:Pt,colorPrimaryHover:tt,colorPrimary:ae,controlOutline:ee}=pe,z=ut*2,ie=wt*2,se=Math.min(At-z,At-ie),ne=Math.min(ye-z,ye-ie),we=Math.min(fe-z,fe-ie);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(ut/2),zIndexPopup:bt+50,optionSelectedColor:Ae,optionSelectedFontWeight:nt,optionSelectedBg:dt,optionActiveBg:rn,optionPadding:`${(At-Ct*Ie)/2}px ${_t}px`,optionFontSize:Ct,optionLineHeight:Ie,optionHeight:At,selectorBg:Et,clearBg:Et,singleItemHeightLG:fe,multipleItemBg:Ut,multipleItemBorderColor:"transparent",multipleItemHeight:se,multipleItemHeightSM:ne,multipleItemHeightLG:we,multipleSelectorBgDisabled:Ge,multipleItemColorDisabled:Pt,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(pe.fontSize*1.25),hoverBorderColor:tt,activeBorderColor:ae,activeOutlineColor:ee,selectAffixPadding:ut}},Me=(pe,Ct)=>{const{componentCls:Ie,antCls:wt,controlOutlineWidth:At}=pe;return{[`&:not(${Ie}-customize-input) ${Ie}-selector`]:{border:`${(0,Ze.unit)(pe.lineWidth)} ${pe.lineType} ${Ct.borderColor}`,background:pe.selectorBg},[`&:not(${Ie}-disabled):not(${Ie}-customize-input):not(${wt}-pagination-size-changer)`]:{[`&:hover ${Ie}-selector`]:{borderColor:Ct.hoverBorderHover},[`${Ie}-focused& ${Ie}-selector`]:{borderColor:Ct.activeBorderColor,boxShadow:`0 0 0 ${(0,Ze.unit)(At)} ${Ct.activeOutlineColor}`,outline:0},[`${Ie}-prefix`]:{color:Ct.color}}}},Re=(pe,Ct)=>({[`&${pe.componentCls}-status-${Ct.status}`]:Object.assign({},Me(pe,Ct))}),Oe=pe=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Me(pe,{borderColor:pe.colorBorder,hoverBorderHover:pe.hoverBorderColor,activeBorderColor:pe.activeBorderColor,activeOutlineColor:pe.activeOutlineColor,color:pe.colorText})),Re(pe,{status:"error",borderColor:pe.colorError,hoverBorderHover:pe.colorErrorHover,activeBorderColor:pe.colorError,activeOutlineColor:pe.colorErrorOutline,color:pe.colorError})),Re(pe,{status:"warning",borderColor:pe.colorWarning,hoverBorderHover:pe.colorWarningHover,activeBorderColor:pe.colorWarning,activeOutlineColor:pe.colorWarningOutline,color:pe.colorWarning})),{[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{background:pe.colorBgContainerDisabled,color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.multipleItemBg,border:`${(0,Ze.unit)(pe.lineWidth)} ${pe.lineType} ${pe.multipleItemBorderColor}`}})}),rt=(pe,Ct)=>{const{componentCls:Ie,antCls:wt}=pe;return{[`&:not(${Ie}-customize-input) ${Ie}-selector`]:{background:Ct.bg,border:`${(0,Ze.unit)(pe.lineWidth)} ${pe.lineType} transparent`,color:Ct.color},[`&:not(${Ie}-disabled):not(${Ie}-customize-input):not(${wt}-pagination-size-changer)`]:{[`&:hover ${Ie}-selector`]:{background:Ct.hoverBg},[`${Ie}-focused& ${Ie}-selector`]:{background:pe.selectorBg,borderColor:Ct.activeBorderColor,outline:0}}}},gt=(pe,Ct)=>({[`&${pe.componentCls}-status-${Ct.status}`]:Object.assign({},rt(pe,Ct))}),xt=pe=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},rt(pe,{bg:pe.colorFillTertiary,hoverBg:pe.colorFillSecondary,activeBorderColor:pe.activeBorderColor,color:pe.colorText})),gt(pe,{status:"error",bg:pe.colorErrorBg,hoverBg:pe.colorErrorBgHover,activeBorderColor:pe.colorError,color:pe.colorError})),gt(pe,{status:"warning",bg:pe.colorWarningBg,hoverBg:pe.colorWarningBgHover,activeBorderColor:pe.colorWarning,color:pe.colorWarning})),{[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{borderColor:pe.colorBorder,background:pe.colorBgContainerDisabled,color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.colorBgContainer,border:`${(0,Ze.unit)(pe.lineWidth)} ${pe.lineType} ${pe.colorSplit}`}})}),at=pe=>({"&-borderless":{[`${pe.componentCls}-selector`]:{background:"transparent",border:`${(0,Ze.unit)(pe.lineWidth)} ${pe.lineType} transparent`},[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.multipleItemBg,border:`${(0,Ze.unit)(pe.lineWidth)} ${pe.lineType} ${pe.multipleItemBorderColor}`},[`&${pe.componentCls}-status-error`]:{[`${pe.componentCls}-prefix, ${pe.componentCls}-selection-item`]:{color:pe.colorError}},[`&${pe.componentCls}-status-warning`]:{[`${pe.componentCls}-prefix, ${pe.componentCls}-selection-item`]:{color:pe.colorWarning}}}}),Ye=(pe,Ct)=>{const{componentCls:Ie,antCls:wt}=pe;return{[`&:not(${Ie}-customize-input) ${Ie}-selector`]:{borderWidth:`0 0 ${(0,Ze.unit)(pe.lineWidth)} 0`,borderStyle:`none none ${pe.lineType} none`,borderColor:Ct.borderColor,background:pe.selectorBg,borderRadius:0},[`&:not(${Ie}-disabled):not(${Ie}-customize-input):not(${wt}-pagination-size-changer)`]:{[`&:hover ${Ie}-selector`]:{borderColor:Ct.hoverBorderHover},[`${Ie}-focused& ${Ie}-selector`]:{borderColor:Ct.activeBorderColor,outline:0},[`${Ie}-prefix`]:{color:Ct.color}}}},st=(pe,Ct)=>({[`&${pe.componentCls}-status-${Ct.status}`]:Object.assign({},Ye(pe,Ct))}),We=pe=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},Ye(pe,{borderColor:pe.colorBorder,hoverBorderHover:pe.hoverBorderColor,activeBorderColor:pe.activeBorderColor,activeOutlineColor:pe.activeOutlineColor,color:pe.colorText})),st(pe,{status:"error",borderColor:pe.colorError,hoverBorderHover:pe.colorErrorHover,activeBorderColor:pe.colorError,activeOutlineColor:pe.colorErrorOutline,color:pe.colorError})),st(pe,{status:"warning",borderColor:pe.colorWarning,hoverBorderHover:pe.colorWarningHover,activeBorderColor:pe.colorWarning,activeOutlineColor:pe.colorWarningOutline,color:pe.colorWarning})),{[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.multipleItemBg,border:`${(0,Ze.unit)(pe.lineWidth)} ${pe.lineType} ${pe.multipleItemBorderColor}`}})});var Xe=pe=>({[pe.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Oe(pe)),xt(pe)),at(pe)),We(pe))});const _e=pe=>{const{componentCls:Ct}=pe;return{position:"relative",transition:`all ${pe.motionDurationMid} ${pe.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ct}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${Ct}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},ft=pe=>{const{componentCls:Ct}=pe;return{[`${Ct}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Le=pe=>{const{antCls:Ct,componentCls:Ie,inputPaddingHorizontalBase:wt,iconCls:At}=pe;return{[Ie]:Object.assign(Object.assign({},(0,re.Wf)(pe)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${Ie}-customize-input) ${Ie}-selector`]:Object.assign(Object.assign({},_e(pe)),ft(pe)),[`${Ie}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},re.vS),{[`> ${Ct}-typography`]:{display:"inline"}}),[`${Ie}-selection-placeholder`]:Object.assign(Object.assign({},re.vS),{flex:1,color:pe.colorTextPlaceholder,pointerEvents:"none"}),[`${Ie}-arrow`]:Object.assign(Object.assign({},(0,re.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:wt,height:pe.fontSizeIcon,marginTop:pe.calc(pe.fontSizeIcon).mul(-1).div(2).equal(),color:pe.colorTextQuaternary,fontSize:pe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${pe.motionDurationSlow} ease`,[At]:{verticalAlign:"top",transition:`transform ${pe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ie}-suffix)`]:{pointerEvents:"auto"}},[`${Ie}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ie}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${Ie}-prefix`]:{flex:"none",marginInlineEnd:pe.selectAffixPadding},[`${Ie}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:wt,zIndex:1,display:"inline-block",width:pe.fontSizeIcon,height:pe.fontSizeIcon,marginTop:pe.calc(pe.fontSizeIcon).mul(-1).div(2).equal(),color:pe.colorTextQuaternary,fontSize:pe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${pe.motionDurationMid} ease, opacity ${pe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:pe.colorTextTertiary}},[`&:hover ${Ie}-clear`]:{opacity:1,background:pe.colorBgBase,borderRadius:"50%"}}),[`${Ie}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${Ie}-has-feedback`]:{[`${Ie}-clear`]:{insetInlineEnd:pe.calc(wt).add(pe.fontSize).add(pe.paddingXS).equal()}}}}}},Ke=pe=>{const{componentCls:Ct}=pe;return[{[Ct]:{[`&${Ct}-in-form-item`]:{width:"100%"}}},Le(pe),ot(pe),(0,de.ZP)(pe),Se(pe),{[`${Ct}-rtl`]:{direction:"rtl"}},(0,Je.c)(pe,{borderElCls:`${Ct}-selector`,focusElCls:`${Ct}-focused`})]};var et=(0,me.I$)("Select",(pe,Ct)=>{let{rootPrefixCls:Ie}=Ct;const wt=(0,ze.mergeToken)(pe,{rootPrefixCls:Ie,inputPaddingHorizontalBase:pe.calc(pe.paddingSM).sub(1).equal(),multipleSelectItemHeight:pe.multipleItemHeight,selectHeight:pe.controlHeight});return[Ke(wt),Xe(wt)]},Be,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}})},26743:function(Wt,Tt,le){"use strict";le.d(Tt,{_z:function(){return Ce},gp:function(){return ze}});var re=le(36237),Je=le(63356),me=le(51636);const ze=de=>{const{multipleSelectItemHeight:Ze,paddingXXS:xe,lineWidth:ot,INTERNAL_FIXED_ITEM_MARGIN:Be}=de,Me=de.max(de.calc(xe).sub(ot).equal(),0),Re=de.max(de.calc(Me).sub(Be).equal(),0);return{basePadding:Me,containerPadding:Re,itemHeight:(0,re.unit)(Ze),itemLineHeight:(0,re.unit)(de.calc(Ze).sub(de.calc(de.lineWidth).mul(2)).equal())}},be=de=>{const{multipleSelectItemHeight:Ze,selectHeight:xe,lineWidth:ot}=de;return de.calc(xe).sub(Ze).div(2).sub(ot).equal()},Ce=de=>{const{componentCls:Ze,iconCls:xe,borderRadiusSM:ot,motionDurationSlow:Be,paddingXS:Me,multipleItemColorDisabled:Re,multipleItemBorderColorDisabled:Oe,colorIcon:rt,colorIconHover:gt,INTERNAL_FIXED_ITEM_MARGIN:xt}=de;return{[`${Ze}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${Ze}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:xt,borderRadius:ot,cursor:"default",transition:`font-size ${Be}, line-height ${Be}, height ${Be}`,marginInlineEnd:de.calc(xt).mul(2).equal(),paddingInlineStart:Me,paddingInlineEnd:de.calc(Me).div(2).equal(),[`${Ze}-disabled&`]:{color:Re,borderColor:Oe,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:de.calc(Me).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Je.Ro)()),{display:"inline-flex",alignItems:"center",color:rt,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${xe}`]:{verticalAlign:"-0.2em"},"&:hover":{color:gt}})}}}},Ne=(de,Ze)=>{const{componentCls:xe,INTERNAL_FIXED_ITEM_MARGIN:ot}=de,Be=`${xe}-selection-overflow`,Me=de.multipleSelectItemHeight,Re=be(de),Oe=Ze?`${xe}-${Ze}`:"",rt=ze(de);return{[`${xe}-multiple${Oe}`]:Object.assign(Object.assign({},Ce(de)),{[`${xe}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:rt.basePadding,paddingBlock:rt.containerPadding,borderRadius:de.borderRadius,[`${xe}-disabled&`]:{background:de.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,re.unit)(ot)} 0`,lineHeight:(0,re.unit)(Me),visibility:"hidden",content:'"\\a0"'}},[`${xe}-selection-item`]:{height:rt.itemHeight,lineHeight:(0,re.unit)(rt.itemLineHeight)},[`${xe}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,re.unit)(Me),marginBlock:ot}},[`${xe}-prefix`]:{marginInlineStart:de.calc(de.inputPaddingHorizontalBase).sub(rt.basePadding).equal()},[`${Be}-item + ${Be}-item,
${xe}-prefix + ${xe}-selection-wrap
`]:{[`${xe}-selection-search`]:{marginInlineStart:0},[`${xe}-selection-placeholder`]:{insetInlineStart:0}},[`${Be}-item-suffix`]:{minHeight:rt.itemHeight,marginBlock:ot},[`${xe}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:de.calc(de.inputPaddingHorizontalBase).sub(Re).equal(),"\n &-input,\n &-mirror\n ":{height:Me,fontFamily:de.fontFamily,lineHeight:(0,re.unit)(Me),transition:`all ${de.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${xe}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:de.calc(de.inputPaddingHorizontalBase).sub(rt.basePadding).equal(),insetInlineEnd:de.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${de.motionDurationSlow}`}})}};function $e(de,Ze){const{componentCls:xe}=de,ot=Ze?`${xe}-${Ze}`:"",Be={[`${xe}-multiple${ot}`]:{fontSize:de.fontSize,[`${xe}-selector`]:{[`${xe}-show-search&`]:{cursor:"text"}},[`
&${xe}-show-arrow ${xe}-selector,
&${xe}-allow-clear ${xe}-selector
`]:{paddingInlineEnd:de.calc(de.fontSizeIcon).add(de.controlPaddingHorizontal).equal()}}};return[Ne(de,Ze),Be]}const Se=de=>{const{componentCls:Ze}=de,xe=(0,me.mergeToken)(de,{selectHeight:de.controlHeightSM,multipleSelectItemHeight:de.multipleItemHeightSM,borderRadius:de.borderRadiusSM,borderRadiusSM:de.borderRadiusXS}),ot=(0,me.mergeToken)(de,{fontSize:de.fontSizeLG,selectHeight:de.controlHeightLG,multipleSelectItemHeight:de.multipleItemHeightLG,borderRadius:de.borderRadiusLG,borderRadiusSM:de.borderRadius});return[$e(de),$e(xe,"sm"),{[`${Ze}-multiple${Ze}-sm`]:{[`${Ze}-selection-placeholder`]:{insetInline:de.calc(de.controlPaddingHorizontalSM).sub(de.lineWidth).equal()},[`${Ze}-selection-search`]:{marginInlineStart:2}}},$e(ot,"lg")]};Tt.ZP=Se},68525:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});var re=le(59301),Je=le(40001),me=le(19248),ze=le(99267),be=le(84105),Ce=le(58617),Ne=le(47472);function $e(Se){let{suffixIcon:de,clearIcon:Ze,menuItemSelectedIcon:xe,removeIcon:ot,loading:Be,multiple:Me,hasFeedback:Re,prefixCls:Oe,showSuffixIcon:rt,feedbackIcon:gt,showArrow:xt,componentName:at}=Se;const Ye=Ze!=null?Ze:re.createElement(me.Z,null),st=_e=>de===null&&!Re&&!xt?null:re.createElement(re.Fragment,null,rt!==!1&&_e,Re&&gt);let We=null;if(de!==void 0)We=st(de);else if(Be)We=st(re.createElement(Ce.Z,{spin:!0}));else{const _e=`${Oe}-suffix`;We=ft=>{let{open:Le,showSearch:Ke}=ft;return st(Le&&Ke?re.createElement(Ne.Z,{className:_e}):re.createElement(be.Z,{className:_e}))}}let St=null;xe!==void 0?St=xe:Me?St=re.createElement(Je.Z,null):St=null;let Xe=null;return ot!==void 0?Xe=ot:Xe=re.createElement(ze.Z,null),{clearIcon:Ye,suffixIcon:We,itemIcon:St,removeIcon:Xe}}},90005:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return re}});function re(Je,me){return me!==void 0?me:Je!==null}},58755:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return Ct}});var re=le(59301),Je=le(58617),me=le(92310),ze=le.n(me),be=le(60499),Ce=le(18642),Ne=le(72190),$e=le(42244),Se=le(18929),de=le(10228),Ze=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],xe=re.forwardRef(function(Ie,wt){var At,ye=Ie.prefixCls,fe=ye===void 0?"rc-switch":ye,ut=Ie.className,_t=Ie.checked,bt=Ie.defaultChecked,Ae=Ie.disabled,nt=Ie.loadingIcon,dt=Ie.checkedChildren,rn=Ie.unCheckedChildren,Et=Ie.onClick,Ut=Ie.onChange,Ge=Ie.onKeyDown,Pt=(0,$e.Z)(Ie,Ze),tt=(0,Se.Z)(!1,{value:_t,defaultValue:bt}),ae=(0,Ne.Z)(tt,2),ee=ae[0],z=ae[1];function ie(Ve,It){var je=ee;return Ae||(je=Ve,z(je),Ut==null||Ut(je,It)),je}function se(Ve){Ve.which===de.Z.LEFT?ie(!1,Ve):Ve.which===de.Z.RIGHT&&ie(!0,Ve),Ge==null||Ge(Ve)}function ne(Ve){var It=ie(!ee,Ve);Et==null||Et(It,Ve)}var we=ze()(fe,ut,(At={},(0,Ce.Z)(At,"".concat(fe,"-checked"),ee),(0,Ce.Z)(At,"".concat(fe,"-disabled"),Ae),At));return re.createElement("button",(0,be.Z)({},Pt,{type:"button",role:"switch","aria-checked":ee,disabled:Ae,className:we,ref:wt,onKeyDown:se,onClick:ne}),nt,re.createElement("span",{className:"".concat(fe,"-inner")},re.createElement("span",{className:"".concat(fe,"-inner-checked")},dt),re.createElement("span",{className:"".concat(fe,"-inner-unchecked")},rn)))});xe.displayName="Switch";var ot=xe,Be=le(12919),Me=le(48755),Re=le(2171),Oe=le(31756),rt=le(36237),gt=le(17835),xt=le(63356),at=le(16931),Ye=le(51636);const st=Ie=>{const{componentCls:wt,trackHeightSM:At,trackPadding:ye,trackMinWidthSM:fe,innerMinMarginSM:ut,innerMaxMarginSM:_t,handleSizeSM:bt,calc:Ae}=Ie,nt=`${wt}-inner`,dt=(0,rt.unit)(Ae(bt).add(Ae(ye).mul(2)).equal()),rn=(0,rt.unit)(Ae(_t).mul(2).equal());return{[wt]:{[`&${wt}-small`]:{minWidth:fe,height:At,lineHeight:(0,rt.unit)(At),[`${wt}-inner`]:{paddingInlineStart:_t,paddingInlineEnd:ut,[`${nt}-checked, ${nt}-unchecked`]:{minHeight:At},[`${nt}-checked`]:{marginInlineStart:`calc(-100% + ${dt} - ${rn})`,marginInlineEnd:`calc(100% - ${dt} + ${rn})`},[`${nt}-unchecked`]:{marginTop:Ae(At).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${wt}-handle`]:{width:bt,height:bt},[`${wt}-loading-icon`]:{top:Ae(Ae(bt).sub(Ie.switchLoadingIconSize)).div(2).equal(),fontSize:Ie.switchLoadingIconSize},[`&${wt}-checked`]:{[`${wt}-inner`]:{paddingInlineStart:ut,paddingInlineEnd:_t,[`${nt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${nt}-unchecked`]:{marginInlineStart:`calc(100% - ${dt} + ${rn})`,marginInlineEnd:`calc(-100% + ${dt} - ${rn})`}},[`${wt}-handle`]:{insetInlineStart:`calc(100% - ${(0,rt.unit)(Ae(bt).add(ye).equal())})`}},[`&:not(${wt}-disabled):active`]:{[`&:not(${wt}-checked) ${nt}`]:{[`${nt}-unchecked`]:{marginInlineStart:Ae(Ie.marginXXS).div(2).equal(),marginInlineEnd:Ae(Ie.marginXXS).mul(-1).div(2).equal()}},[`&${wt}-checked ${nt}`]:{[`${nt}-checked`]:{marginInlineStart:Ae(Ie.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:Ae(Ie.marginXXS).div(2).equal()}}}}}}},We=Ie=>{const{componentCls:wt,handleSize:At,calc:ye}=Ie;return{[wt]:{[`${wt}-loading-icon${Ie.iconCls}`]:{position:"relative",top:ye(ye(At).sub(Ie.fontSize)).div(2).equal(),color:Ie.switchLoadingIconColor,verticalAlign:"top"},[`&${wt}-checked ${wt}-loading-icon`]:{color:Ie.switchColor}}}},St=Ie=>{const{componentCls:wt,trackPadding:At,handleBg:ye,handleShadow:fe,handleSize:ut,calc:_t}=Ie,bt=`${wt}-handle`;return{[wt]:{[bt]:{position:"absolute",top:At,insetInlineStart:At,width:ut,height:ut,transition:`all ${Ie.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:ye,borderRadius:_t(ut).div(2).equal(),boxShadow:fe,transition:`all ${Ie.switchDuration} ease-in-out`,content:'""'}},[`&${wt}-checked ${bt}`]:{insetInlineStart:`calc(100% - ${(0,rt.unit)(_t(ut).add(At).equal())})`},[`&:not(${wt}-disabled):active`]:{[`${bt}::before`]:{insetInlineEnd:Ie.switchHandleActiveInset,insetInlineStart:0},[`&${wt}-checked ${bt}::before`]:{insetInlineEnd:0,insetInlineStart:Ie.switchHandleActiveInset}}}}},Xe=Ie=>{const{componentCls:wt,trackHeight:At,trackPadding:ye,innerMinMargin:fe,innerMaxMargin:ut,handleSize:_t,calc:bt}=Ie,Ae=`${wt}-inner`,nt=(0,rt.unit)(bt(_t).add(bt(ye).mul(2)).equal()),dt=(0,rt.unit)(bt(ut).mul(2).equal());return{[wt]:{[Ae]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:ut,paddingInlineEnd:fe,transition:`padding-inline-start ${Ie.switchDuration} ease-in-out, padding-inline-end ${Ie.switchDuration} ease-in-out`,[`${Ae}-checked, ${Ae}-unchecked`]:{display:"block",color:Ie.colorTextLightSolid,fontSize:Ie.fontSizeSM,transition:`margin-inline-start ${Ie.switchDuration} ease-in-out, margin-inline-end ${Ie.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:At},[`${Ae}-checked`]:{marginInlineStart:`calc(-100% + ${nt} - ${dt})`,marginInlineEnd:`calc(100% - ${nt} + ${dt})`},[`${Ae}-unchecked`]:{marginTop:bt(At).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${wt}-checked ${Ae}`]:{paddingInlineStart:fe,paddingInlineEnd:ut,[`${Ae}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ae}-unchecked`]:{marginInlineStart:`calc(100% - ${nt} + ${dt})`,marginInlineEnd:`calc(-100% + ${nt} - ${dt})`}},[`&:not(${wt}-disabled):active`]:{[`&:not(${wt}-checked) ${Ae}`]:{[`${Ae}-unchecked`]:{marginInlineStart:bt(ye).mul(2).equal(),marginInlineEnd:bt(ye).mul(-1).mul(2).equal()}},[`&${wt}-checked ${Ae}`]:{[`${Ae}-checked`]:{marginInlineStart:bt(ye).mul(-1).mul(2).equal(),marginInlineEnd:bt(ye).mul(2).equal()}}}}}},_e=Ie=>{const{componentCls:wt,trackHeight:At,trackMinWidth:ye}=Ie;return{[wt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,xt.Wf)(Ie)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:ye,height:At,lineHeight:(0,rt.unit)(At),verticalAlign:"middle",background:Ie.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${Ie.motionDurationMid}`,userSelect:"none",[`&:hover:not(${wt}-disabled)`]:{background:Ie.colorTextTertiary}}),(0,xt.Qy)(Ie)),{[`&${wt}-checked`]:{background:Ie.switchColor,[`&:hover:not(${wt}-disabled)`]:{background:Ie.colorPrimaryHover}},[`&${wt}-loading, &${wt}-disabled`]:{cursor:"not-allowed",opacity:Ie.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${wt}-rtl`]:{direction:"rtl"}})}},ft=Ie=>{const{fontSize:wt,lineHeight:At,controlHeight:ye,colorWhite:fe}=Ie,ut=wt*At,_t=ye/2,bt=2,Ae=ut-bt*2,nt=_t-bt*2;return{trackHeight:ut,trackHeightSM:_t,trackMinWidth:Ae*2+bt*4,trackMinWidthSM:nt*2+bt*2,trackPadding:bt,handleBg:fe,handleSize:Ae,handleSizeSM:nt,handleShadow:`0 2px 4px 0 ${new gt.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:Ae/2,innerMaxMargin:Ae+bt+bt*2,innerMinMarginSM:nt/2,innerMaxMarginSM:nt+bt+bt*2}};var Le=(0,at.I$)("Switch",Ie=>{const wt=(0,Ye.mergeToken)(Ie,{switchDuration:Ie.motionDurationMid,switchColor:Ie.colorPrimary,switchDisabledOpacity:Ie.opacityLoading,switchLoadingIconSize:Ie.calc(Ie.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${Ie.opacityLoading})`,switchHandleActiveInset:"-30%"});return[_e(wt),Xe(wt),St(wt),We(wt),st(wt)]},ft),Ke=function(Ie,wt){var At={};for(var ye in Ie)Object.prototype.hasOwnProperty.call(Ie,ye)&&wt.indexOf(ye)<0&&(At[ye]=Ie[ye]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,ye=Object.getOwnPropertySymbols(Ie);fe<ye.length;fe++)wt.indexOf(ye[fe])<0&&Object.prototype.propertyIsEnumerable.call(Ie,ye[fe])&&(At[ye[fe]]=Ie[ye[fe]]);return At};const pe=re.forwardRef((Ie,wt)=>{const{prefixCls:At,size:ye,disabled:fe,loading:ut,className:_t,rootClassName:bt,style:Ae,checked:nt,value:dt,defaultChecked:rn,defaultValue:Et,onChange:Ut}=Ie,Ge=Ke(Ie,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[Pt,tt]=(0,Se.Z)(!1,{value:nt!=null?nt:dt,defaultValue:rn!=null?rn:Et}),{getPrefixCls:ae,direction:ee,switch:z}=re.useContext(Me.E_),ie=re.useContext(Re.Z),se=(fe!=null?fe:ie)||ut,ne=ae("switch",At),we=re.createElement("div",{className:`${ne}-handle`},ut&&re.createElement(Je.Z,{className:`${ne}-loading-icon`})),[Ve,It,je]=Le(ne),Qe=(0,Oe.Z)(ye),ht=ze()(z==null?void 0:z.className,{[`${ne}-small`]:Qe==="small",[`${ne}-loading`]:ut,[`${ne}-rtl`]:ee==="rtl"},_t,bt,It,je),Dt=Object.assign(Object.assign({},z==null?void 0:z.style),Ae),kt=function(){tt(arguments.length<=0?void 0:arguments[0]),Ut==null||Ut.apply(void 0,arguments)};return Ve(re.createElement(Be.Z,{component:"Switch"},re.createElement(ot,Object.assign({},Ge,{checked:Pt,onChange:kt,prefixCls:ne,className:ht,style:Dt,disabled:se,ref:wt,loadingIcon:we}))))});pe.__ANT_SWITCH=!0;var Ct=pe},99498:function(Wt,Tt,le){(function(re){re(le(89780))})(function(re){re.defineOption("placeholder","",function($e,Se,de){var Ze=de&&de!=re.Init;if(Se&&!Ze)$e.on("blur",be),$e.on("change",Ce),$e.on("swapDoc",Ce),re.on($e.getInputField(),"compositionupdate",$e.state.placeholderCompose=function(){ze($e)}),Ce($e);else if(!Se&&Ze){$e.off("blur",be),$e.off("change",Ce),$e.off("swapDoc",Ce),re.off($e.getInputField(),"compositionupdate",$e.state.placeholderCompose),Je($e);var xe=$e.getWrapperElement();xe.className=xe.className.replace(" CodeMirror-empty","")}Se&&!$e.hasFocus()&&be($e)});function Je($e){$e.state.placeholder&&($e.state.placeholder.parentNode.removeChild($e.state.placeholder),$e.state.placeholder=null)}function me($e){Je($e);var Se=$e.state.placeholder=document.createElement("pre");Se.style.cssText="height: 0; overflow: visible",Se.style.direction=$e.getOption("direction"),Se.className="CodeMirror-placeholder CodeMirror-line-like";var de=$e.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),Se.appendChild(de),$e.display.lineSpace.insertBefore(Se,$e.display.lineSpace.firstChild)}function ze($e){setTimeout(function(){var Se=!1,de=$e.getInputField();de.nodeName=="TEXTAREA"?Se=!de.value:$e.lineCount()==1&&(Se=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),Se?me($e):Je($e)},20)}function be($e){Ne($e)&&me($e)}function Ce($e){var Se=$e.getWrapperElement(),de=Ne($e);Se.className=Se.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?me($e):Je($e)}function Ne($e){return $e.lineCount()===1&&$e.getLine(0)===""}})},25717:function(Wt,Tt,le){(function(re){re(le(89780))})(function(re){var Je={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},me=re.Pos;re.defineOption("autoCloseBrackets",!1,function(Me,Re,Oe){Oe&&Oe!=re.Init&&(Me.removeKeyMap(be),Me.state.closeBrackets=null),Re&&(Ce(ze(Re,"pairs")),Me.state.closeBrackets=Re,Me.addKeyMap(be))});function ze(Me,Re){return Re=="pairs"&&typeof Me=="string"?Me:typeof Me=="object"&&Me[Re]!=null?Me[Re]:Je[Re]}var be={Backspace:Se,Enter:de};function Ce(Me){for(var Re=0;Re<Me.length;Re++){var Oe=Me.charAt(Re),rt="'"+Oe+"'";be[rt]||(be[rt]=Ne(Oe))}}Ce(Je.pairs+"`");function Ne(Me){return function(Re){return xe(Re,Me)}}function $e(Me){var Re=Me.state.closeBrackets;if(!Re||Re.override)return Re;var Oe=Me.getModeAt(Me.getCursor());return Oe.closeBrackets||Re}function Se(Me){var Re=$e(Me);if(!Re||Me.getOption("disableInput"))return re.Pass;for(var Oe=ze(Re,"pairs"),rt=Me.listSelections(),gt=0;gt<rt.length;gt++){if(!rt[gt].empty())return re.Pass;var xt=ot(Me,rt[gt].head);if(!xt||Oe.indexOf(xt)%2!=0)return re.Pass}for(var gt=rt.length-1;gt>=0;gt--){var at=rt[gt].head;Me.replaceRange("",me(at.line,at.ch-1),me(at.line,at.ch+1),"+delete")}}function de(Me){var Re=$e(Me),Oe=Re&&ze(Re,"explode");if(!Oe||Me.getOption("disableInput"))return re.Pass;for(var rt=Me.listSelections(),gt=0;gt<rt.length;gt++){if(!rt[gt].empty())return re.Pass;var xt=ot(Me,rt[gt].head);if(!xt||Oe.indexOf(xt)%2!=0)return re.Pass}Me.operation(function(){var at=Me.lineSeparator()||`
`;Me.replaceSelection(at+at,null),Me.execCommand("goCharLeft"),rt=Me.listSelections();for(var Ye=0;Ye<rt.length;Ye++){var st=rt[Ye].head.line;Me.indentLine(st,null,!0),Me.indentLine(st+1,null,!0)}})}function Ze(Me){var Re=re.cmpPos(Me.anchor,Me.head)>0;return{anchor:new me(Me.anchor.line,Me.anchor.ch+(Re?-1:1)),head:new me(Me.head.line,Me.head.ch+(Re?1:-1))}}function xe(Me,Re){var Oe=$e(Me);if(!Oe||Me.getOption("disableInput"))return re.Pass;var rt=ze(Oe,"pairs"),gt=rt.indexOf(Re);if(gt==-1)return re.Pass;for(var xt=ze(Oe,"closeBefore"),at=ze(Oe,"triples"),Ye=rt.charAt(gt+1)==Re,st=Me.listSelections(),We=gt%2==0,St,Xe=0;Xe<st.length;Xe++){var _e=st[Xe],ft=_e.head,Le,Ke=Me.getRange(ft,me(ft.line,ft.ch+1));if(We&&!_e.empty())Le="surround";else if((Ye||!We)&&Ke==Re)Ye&&Be(Me,ft)?Le="both":at.indexOf(Re)>=0&&Me.getRange(ft,me(ft.line,ft.ch+3))==Re+Re+Re?Le="skipThree":Le="skip";else if(Ye&&ft.ch>1&&at.indexOf(Re)>=0&&Me.getRange(me(ft.line,ft.ch-2),ft)==Re+Re){if(ft.ch>2&&/\bstring/.test(Me.getTokenTypeAt(me(ft.line,ft.ch-2))))return re.Pass;Le="addFour"}else if(Ye){var et=ft.ch==0?" ":Me.getRange(me(ft.line,ft.ch-1),ft);if(!re.isWordChar(Ke)&&et!=Re&&!re.isWordChar(et))Le="both";else return re.Pass}else if(We&&(Ke.length===0||/\s/.test(Ke)||xt.indexOf(Ke)>-1))Le="both";else return re.Pass;if(!St)St=Le;else if(St!=Le)return re.Pass}var pe=gt%2?rt.charAt(gt-1):Re,Ct=gt%2?Re:rt.charAt(gt+1);Me.operation(function(){if(St=="skip")Me.execCommand("goCharRight");else if(St=="skipThree")for(var Ie=0;Ie<3;Ie++)Me.execCommand("goCharRight");else if(St=="surround"){for(var wt=Me.getSelections(),Ie=0;Ie<wt.length;Ie++)wt[Ie]=pe+wt[Ie]+Ct;Me.replaceSelections(wt,"around"),wt=Me.listSelections().slice();for(var Ie=0;Ie<wt.length;Ie++)wt[Ie]=Ze(wt[Ie]);Me.setSelections(wt)}else St=="both"?(Me.replaceSelection(pe+Ct,null),Me.triggerElectric(pe+Ct),Me.execCommand("goCharLeft")):St=="addFour"&&(Me.replaceSelection(pe+pe+pe+pe,"before"),Me.execCommand("goCharRight"))})}function ot(Me,Re){var Oe=Me.getRange(me(Re.line,Re.ch-1),me(Re.line,Re.ch+1));return Oe.length==2?Oe:null}function Be(Me,Re){var Oe=Me.getTokenAt(me(Re.line,Re.ch+1));return/\bstring/.test(Oe.type)&&Oe.start==Re.ch&&(Re.ch==0||!/\bstring/.test(Me.getTokenTypeAt(Re)))}})},6313:function(Wt,Tt,le){(function(re){re(le(89780),le(32855))})(function(re){re.defineOption("autoCloseTags",!1,function(Se,de,Ze){if(Ze!=re.Init&&Ze&&Se.removeKeyMap("autoCloseTags"),!!de){var xe={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(xe["'/'"]=function(ot){return Ce(ot)}),(typeof de!="object"||de.whenOpening!==!1)&&(xe["'>'"]=function(ot){return ze(ot)}),Se.addKeyMap(xe)}});var Je=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],me=["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 ze(Se){if(Se.getOption("disableInput"))return re.Pass;for(var de=Se.listSelections(),Ze=[],xe=Se.getOption("autoCloseTags"),ot=0;ot<de.length;ot++){if(!de[ot].empty())return re.Pass;var Be=de[ot].head,Me=Se.getTokenAt(Be),Re=re.innerMode(Se.getMode(),Me.state),Oe=Re.state,rt=Re.mode.xmlCurrentTag&&Re.mode.xmlCurrentTag(Oe),gt=rt&&rt.name;if(!gt)return re.Pass;var xt=Re.mode.configuration=="html",at=typeof xe=="object"&&xe.dontCloseTags||xt&&Je,Ye=typeof xe=="object"&&xe.indentTags||xt&&me;Me.end>Be.ch&&(gt=gt.slice(0,gt.length-Me.end+Be.ch));var st=gt.toLowerCase();if(!gt||Me.type=="string"&&(Me.end!=Be.ch||!/[\"\']/.test(Me.string.charAt(Me.string.length-1))||Me.string.length==1)||Me.type=="tag"&&rt.close||Me.string.indexOf("/")==Be.ch-Me.start-1||at&&Ne(at,st)>-1||$e(Se,Re.mode.xmlCurrentContext&&Re.mode.xmlCurrentContext(Oe)||[],gt,Be,!0))return re.Pass;var We=typeof xe=="object"&&xe.emptyTags;if(We&&Ne(We,gt)>-1){Ze[ot]={text:"/>",newPos:re.Pos(Be.line,Be.ch+2)};continue}var St=Ye&&Ne(Ye,st)>-1;Ze[ot]={indent:St,text:">"+(St?`
`:"")+"</"+gt+">",newPos:St?re.Pos(Be.line+1,0):re.Pos(Be.line,Be.ch+1)}}for(var Xe=typeof xe=="object"&&xe.dontIndentOnAutoClose,ot=de.length-1;ot>=0;ot--){var _e=Ze[ot];Se.replaceRange(_e.text,de[ot].head,de[ot].anchor,"+insert");var ft=Se.listSelections().slice(0);ft[ot]={head:_e.newPos,anchor:_e.newPos},Se.setSelections(ft),!Xe&&_e.indent&&(Se.indentLine(_e.newPos.line,null,!0),Se.indentLine(_e.newPos.line+1,null,!0))}}function be(Se,de){for(var Ze=Se.listSelections(),xe=[],ot=de?"/":"</",Be=Se.getOption("autoCloseTags"),Me=typeof Be=="object"&&Be.dontIndentOnSlash,Re=0;Re<Ze.length;Re++){if(!Ze[Re].empty())return re.Pass;var Oe=Ze[Re].head,rt=Se.getTokenAt(Oe),gt=re.innerMode(Se.getMode(),rt.state),xt=gt.state;if(de&&(rt.type=="string"||rt.string.charAt(0)!="<"||rt.start!=Oe.ch-1))return re.Pass;var at,Ye=gt.mode.name!="xml"&&Se.getMode().name=="htmlmixed";if(Ye&&gt.mode.name=="javascript")at=ot+"script";else if(Ye&&gt.mode.name=="css")at=ot+"style";else{var st=gt.mode.xmlCurrentContext&&gt.mode.xmlCurrentContext(xt);if(!st||st.length&&$e(Se,st,st[st.length-1],Oe))return re.Pass;at=ot+st[st.length-1]}Se.getLine(Oe.line).charAt(rt.end)!=">"&&(at+=">"),xe[Re]=at}if(Se.replaceSelections(xe),Ze=Se.listSelections(),!Me)for(var Re=0;Re<Ze.length;Re++)(Re==Ze.length-1||Ze[Re].head.line<Ze[Re+1].head.line)&&Se.indentLine(Ze[Re].head.line)}function Ce(Se){return Se.getOption("disableInput")?re.Pass:be(Se,!0)}re.commands.closeTag=function(Se){return be(Se)};function Ne(Se,de){if(Se.indexOf)return Se.indexOf(de);for(var Ze=0,xe=Se.length;Ze<xe;++Ze)if(Se[Ze]==de)return Ze;return-1}function $e(Se,de,Ze,xe,ot){if(!re.scanForClosingTag)return!1;var Be=Math.min(Se.lastLine()+1,xe.line+500),Me=re.scanForClosingTag(Se,xe,null,Be);if(!Me||Me.tag!=Ze)return!1;for(var Re=ot?1:0,Oe=de.length-1;Oe>=0&&de[Oe]==Ze;Oe--)++Re;xe=Me.to;for(var Oe=1;Oe<Re;Oe++){var rt=re.scanForClosingTag(Se,xe,null,Be);if(!rt||rt.tag!=Ze)return!1;xe=rt.to}return!0}})},32855:function(Wt,Tt,le){(function(re){re(le(89780))})(function(re){"use strict";var Je=re.Pos;function me(Oe,rt){return Oe.line-rt.line||Oe.ch-rt.ch}var ze="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",be=ze+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ce=new RegExp("<(/?)(["+ze+"]["+be+"]*)","g");function Ne(Oe,rt,gt,xt){this.line=rt,this.ch=gt,this.cm=Oe,this.text=Oe.getLine(rt),this.min=xt?Math.max(xt.from,Oe.firstLine()):Oe.firstLine(),this.max=xt?Math.min(xt.to-1,Oe.lastLine()):Oe.lastLine()}function $e(Oe,rt){var gt=Oe.cm.getTokenTypeAt(Je(Oe.line,rt));return gt&&/\btag\b/.test(gt)}function Se(Oe){if(!(Oe.line>=Oe.max))return Oe.ch=0,Oe.text=Oe.cm.getLine(++Oe.line),!0}function de(Oe){if(!(Oe.line<=Oe.min))return Oe.text=Oe.cm.getLine(--Oe.line),Oe.ch=Oe.text.length,!0}function Ze(Oe){for(;;){var rt=Oe.text.indexOf(">",Oe.ch);if(rt==-1){if(Se(Oe))continue;return}if(!$e(Oe,rt+1)){Oe.ch=rt+1;continue}var gt=Oe.text.lastIndexOf("/",rt),xt=gt>-1&&!/\S/.test(Oe.text.slice(gt+1,rt));return Oe.ch=rt+1,xt?"selfClose":"regular"}}function xe(Oe){for(;;){var rt=Oe.ch?Oe.text.lastIndexOf("<",Oe.ch-1):-1;if(rt==-1){if(de(Oe))continue;return}if(!$e(Oe,rt+1)){Oe.ch=rt;continue}Ce.lastIndex=rt,Oe.ch=rt;var gt=Ce.exec(Oe.text);if(gt&&gt.index==rt)return gt}}function ot(Oe){for(;;){Ce.lastIndex=Oe.ch;var rt=Ce.exec(Oe.text);if(!rt){if(Se(Oe))continue;return}if(!$e(Oe,rt.index+1)){Oe.ch=rt.index+1;continue}return Oe.ch=rt.index+rt[0].length,rt}}function Be(Oe){for(;;){var rt=Oe.ch?Oe.text.lastIndexOf(">",Oe.ch-1):-1;if(rt==-1){if(de(Oe))continue;return}if(!$e(Oe,rt+1)){Oe.ch=rt;continue}var gt=Oe.text.lastIndexOf("/",rt),xt=gt>-1&&!/\S/.test(Oe.text.slice(gt+1,rt));return Oe.ch=rt+1,xt?"selfClose":"regular"}}function Me(Oe,rt){for(var gt=[];;){var xt=ot(Oe),at,Ye=Oe.line,st=Oe.ch-(xt?xt[0].length:0);if(!xt||!(at=Ze(Oe)))return;if(at!="selfClose")if(xt[1]){for(var We=gt.length-1;We>=0;--We)if(gt[We]==xt[2]){gt.length=We;break}if(We<0&&(!rt||rt==xt[2]))return{tag:xt[2],from:Je(Ye,st),to:Je(Oe.line,Oe.ch)}}else gt.push(xt[2])}}function Re(Oe,rt){for(var gt=[];;){var xt=Be(Oe);if(!xt)return;if(xt=="selfClose"){xe(Oe);continue}var at=Oe.line,Ye=Oe.ch,st=xe(Oe);if(!st)return;if(st[1])gt.push(st[2]);else{for(var We=gt.length-1;We>=0;--We)if(gt[We]==st[2]){gt.length=We;break}if(We<0&&(!rt||rt==st[2]))return{tag:st[2],from:Je(Oe.line,Oe.ch),to:Je(at,Ye)}}}}re.registerHelper("fold","xml",function(Oe,rt){for(var gt=new Ne(Oe,rt.line,0);;){var xt=ot(gt);if(!xt||gt.line!=rt.line)return;var at=Ze(gt);if(!at)return;if(!xt[1]&&at!="selfClose"){var Ye=Je(gt.line,gt.ch),st=Me(gt,xt[2]);return st&&me(st.from,Ye)>0?{from:Ye,to:st.from}:null}}}),re.findMatchingTag=function(Oe,rt,gt){var xt=new Ne(Oe,rt.line,rt.ch,gt);if(!(xt.text.indexOf(">")==-1&&xt.text.indexOf("<")==-1)){var at=Ze(xt),Ye=at&&Je(xt.line,xt.ch),st=at&&xe(xt);if(!(!at||!st||me(xt,rt)>0)){var We={from:Je(xt.line,xt.ch),to:Ye,tag:st[2]};return at=="selfClose"?{open:We,close:null,at:"open"}:st[1]?{open:Re(xt,st[2]),close:We,at:"close"}:(xt=new Ne(Oe,Ye.line,Ye.ch,gt),{open:We,close:Me(xt,st[2]),at:"open"})}}},re.findEnclosingTag=function(Oe,rt,gt,xt){for(var at=new Ne(Oe,rt.line,rt.ch,gt);;){var Ye=Re(at,xt);if(!Ye)break;var st=new Ne(Oe,rt.line,rt.ch,gt),We=Me(st,Ye.tag);if(We)return{open:Ye,close:We}}},re.scanForClosingTag=function(Oe,rt,gt,xt){var at=new Ne(Oe,rt.line,rt.ch,xt?{from:0,to:xt}:null);return Me(at,gt)}})},89780:function(Wt){(function(Tt,le){Wt.exports=le()})(this,function(){"use strict";var Tt=navigator.userAgent,le=navigator.platform,re=/gecko\/\d/i.test(Tt),Je=/MSIE \d/.test(Tt),me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Tt),ze=/Edge\/(\d+)/.exec(Tt),be=Je||me||ze,Ce=be&&(Je?document.documentMode||6:+(ze||me)[1]),Ne=!ze&&/WebKit\//.test(Tt),$e=Ne&&/Qt\/\d+\.\d+/.test(Tt),Se=!ze&&/Chrome\//.test(Tt),de=/Opera\//.test(Tt),Ze=/Apple Computer/.test(navigator.vendor),xe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Tt),ot=/PhantomJS/.test(Tt),Be=!ze&&/AppleWebKit/.test(Tt)&&/Mobile\/\w+/.test(Tt),Me=/Android/.test(Tt),Re=Be||Me||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Tt),Oe=Be||/Mac/.test(le),rt=/\bCrOS\b/.test(Tt),gt=/win/i.test(le),xt=de&&Tt.match(/Version\/(\d*\.\d*)/);xt&&(xt=Number(xt[1])),xt&&xt>=15&&(de=!1,Ne=!0);var at=Oe&&($e||de&&(xt==null||xt<12.11)),Ye=re||be&&Ce>=9;function st(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var We=function(a,y){var x=a.className,b=st(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 St(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Xe(a,y){return St(a).appendChild(y)}function _e(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var te=0;te<y.length;++te)E.appendChild(y[te]);return E}function ft(a,y,x,b){var E=_e(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 Ke(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 et(){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 pe(a,y){var x=a.className;st(y).test(x)||(a.className+=(x?" ":"")+y)}function Ct(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!st(x[b]).test(y)&&(y+=" "+x[b]);return y}var Ie=function(a){a.select()};Be?Ie=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:be&&(Ie=function(a){try{a.select()}catch(y){}});function wt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function At(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 ye(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var te=b||0,oe=E||0;;){var ue=a.indexOf(" ",te);if(ue<0||ue>=y)return oe+(y-te);oe+=ue-te,oe+=x-oe%x,te=ue+1}}var fe=function(){this.id=null,this.f=null,this.time=0,this.handler=wt(this.onTimeout,this)};fe.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},fe.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 ut(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var _t=50,bt={toString:function(){return"CodeMirror.Pass"}},Ae={scroll:!1},nt={origin:"*mouse"},dt={origin:"+move"};function rn(a,y,x){for(var b=0,E=0;;){var te=a.indexOf(" ",b);te==-1&&(te=a.length);var oe=te-b;if(te==a.length||E+oe>=y)return b+Math.min(oe,y-E);if(E+=te-b,E+=x-E%x,b=te+1,E>=y)return b}}var Et=[""];function Ut(a){for(;Et.length<=a;)Et.push(Ge(Et)+" ");return Et[a]}function Ge(a){return a[a.length-1]}function Pt(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function tt(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 ee(a,y){var x;return Object.create?x=Object.create(a):(ae.prototype=a,x=new ae),y&&At(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(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&&ie(a)?!0:y.test(a):ie(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var we=/[\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&&we.test(a)}function It(a,y,x){for(;(x<0?y>0:y<a.length)&&Ve(a.charAt(y));)y+=x;return y}function je(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,te=b<0?Math.ceil(E):Math.floor(E);if(te==y)return a(te)?y:x;a(te)?x=te:y=te+b}}function Qe(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,te=0;te<a.length;++te){var oe=a[te];(oe.from<x&&oe.to>y||y==x&&oe.to==y)&&(b(Math.max(oe.from,y),Math.min(oe.to,x),oe.level==1?"rtl":"ltr",te),E=!0)}E||b(y,x,"ltr")}var ht=null;function Dt(a,y,x){var b;ht=null;for(var E=0;E<a.length;++E){var te=a[E];if(te.from<y&&te.to>y)return E;te.to==y&&(te.from!=te.to&&x=="before"?b=E:ht=E),te.from==y&&(te.from!=te.to&&x!="before"?b=E:ht=E)}return b!=null?b:ht}var kt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,te=/[LRr]/,oe=/[Lb1n]/,ue=/[1n]/;function ce(he,Te,Fe){this.level=he,this.from=Te,this.to=Fe}return function(he,Te){var Fe=Te=="ltr"?"L":"R";if(he.length==0||Te=="ltr"&&!b.test(he))return!1;for(var vt=he.length,lt=[],Ft=0;Ft<vt;++Ft)lt.push(x(he.charCodeAt(Ft)));for(var en=0,mn=Fe;en<vt;++en){var kn=lt[en];kn=="m"?lt[en]=mn:mn=kn}for(var Rn=0,Mn=Fe;Rn<vt;++Rn){var Wn=lt[Rn];Wn=="1"&&Mn=="r"?lt[Rn]="n":te.test(Wn)&&(Mn=Wn,Wn=="r"&&(lt[Rn]="R"))}for(var sr=1,nr=lt[0];sr<vt-1;++sr){var Sr=lt[sr];Sr=="+"&&nr=="1"&&lt[sr+1]=="1"?lt[sr]="1":Sr==","&&nr==lt[sr+1]&&(nr=="1"||nr=="n")&&(lt[sr]=nr),nr=Sr}for(var $r=0;$r<vt;++$r){var li=lt[$r];if(li==",")lt[$r]="N";else if(li=="%"){var Ur=void 0;for(Ur=$r+1;Ur<vt&&lt[Ur]=="%";++Ur);for(var Oi=$r&&lt[$r-1]=="!"||Ur<vt&&lt[Ur]=="1"?"1":"N",Ei=$r;Ei<Ur;++Ei)lt[Ei]=Oi;$r=Ur-1}}for(var qr=0,ki=Fe;qr<vt;++qr){var di=lt[qr];ki=="L"&&di=="1"?lt[qr]="L":te.test(di)&&(ki=di)}for(var ii=0;ii<vt;++ii)if(E.test(lt[ii])){var ei=void 0;for(ei=ii+1;ei<vt&&E.test(lt[ei]);++ei);for(var Kr=(ii?lt[ii-1]:Fe)=="L",Mi=(ei<vt?lt[ei]:Fe)=="L",Go=Kr==Mi?Kr?"L":"R":Fe,bo=ii;bo<ei;++bo)lt[bo]=Go;ii=ei-1}for(var pi=[],eo,si=0;si<vt;)if(oe.test(lt[si])){var bl=si;for(++si;si<vt&&oe.test(lt[si]);++si);pi.push(new ce(0,bl,si))}else{var oo=si,Po=pi.length,Io=Te=="rtl"?1:0;for(++si;si<vt&&lt[si]!="L";++si);for(var bi=oo;bi<si;)if(ue.test(lt[bi])){oo<bi&&(pi.splice(Po,0,new ce(1,oo,bi)),Po+=Io);var Vo=bi;for(++bi;bi<si&&ue.test(lt[bi]);++bi);pi.splice(Po,0,new ce(2,Vo,bi)),Po+=Io,oo=bi}else++bi;oo<si&&pi.splice(Po,0,new ce(1,oo,si))}return Te=="ltr"&&(pi[0].level==1&&(eo=he.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new ce(0,0,eo[0].length))),Ge(pi).level==1&&(eo=he.match(/\s+$/))&&(Ge(pi).to-=eo[0].length,pi.push(new ce(0,vt-eo[0].length,vt)))),Te=="rtl"?pi.reverse():pi}}();function Gt(a,y){var x=a.order;return x==null&&(x=a.order=kt(a.text,y)),x}var Zt=[],Lt=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]||Zt).concat(x)}};function sn(a,y){return a._handlers&&a._handlers[y]||Zt}function Jt(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var te=ut(E,x);te>-1&&(b[y]=E.slice(0,te).concat(E.slice(te+1)))}}}function on(a,y){var x=sn(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function pt(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),on(a,x||y.type,a,y),bn(y)||y.codemirrorIgnore}function dn(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)ut(x,y[b])==-1&&x.push(y[b])}function Rt(a,y){return sn(a,y).length>0}function Yt(a){a.prototype.on=function(y,x){Lt(this,y,x)},a.prototype.off=function(y,x){Jt(this,y,x)}}function an(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Tn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function bn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function ke(a){an(a),Tn(a)}function Ue(a){return a.target||a.srcElement}function mt(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Oe&&a.ctrlKey&&y==1&&(y=3),y}var zt=function(){if(be&&Ce<9)return!1;var a=_e("div");return"draggable"in a||"dragDrop"in a}(),nn;function fn(a){if(nn==null){var y=_e("span","\u200B");Xe(a,_e("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(nn=y.offsetWidth<=1&&y.offsetHeight>2&&!(be&&Ce<8))}var x=nn?_e("span","\u200B"):_e("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var $n;function An(a){if($n!=null)return $n;var y=Xe(a,document.createTextNode("A\u062EA")),x=Le(y,0,1).getBoundingClientRect(),b=Le(y,1,2).getBoundingClientRect();return St(a),!x||x.left==x.right?!1:$n=b.right-x.right<3}var pn=`
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
`,y);E==-1&&(E=a.length);var te=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),oe=te.indexOf("\r");oe!=-1?(x.push(te.slice(0,oe)),y+=oe+1):(x.push(te),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},wn=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},vn=function(){var a=_e("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Kn=null;function gn(a){if(Kn!=null)return Kn;var y=Xe(a,_e("span","x")),x=y.getBoundingClientRect(),b=Le(y,0,1).getBoundingClientRect();return Kn=Math.abs(x.left-b.left)>1}var Dn={},tn={};function yn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Dn[a]=y}function un(a,y){tn[a]=y}function Ln(a){if(typeof a=="string"&&tn.hasOwnProperty(a))a=tn[a];else if(a&&typeof a.name=="string"&&tn.hasOwnProperty(a.name)){var y=tn[a.name];typeof y=="string"&&(y={name:y}),a=ee(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Ln("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Ln("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Yn(a,y){y=Ln(y);var x=Dn[y.name];if(!x)return Yn(a,"text/plain");var b=x(a,y);if(zn.hasOwnProperty(y.name)){var E=zn[y.name];for(var te in E)E.hasOwnProperty(te)&&(b.hasOwnProperty(te)&&(b["_"+te]=b[te]),b[te]=E[te])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var oe in y.modeProps)b[oe]=y.modeProps[oe];return b}var zn={};function Bn(a,y){var x=zn.hasOwnProperty(a)?zn[a]:zn[a]={};At(y,x)}function _n(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Vn(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 Qn(a,y,x){return a.startState?a.startState(y,x):!0}var jn=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};jn.prototype.eol=function(){return this.pos>=this.string.length},jn.prototype.sol=function(){return this.pos==this.lineStart},jn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},jn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},jn.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},jn.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},jn.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},jn.prototype.skipToEnd=function(){this.pos=this.string.length},jn.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},jn.prototype.backUp=function(a){this.pos-=a},jn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ye(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ye(this.string,this.lineStart,this.tabSize):0)},jn.prototype.indentation=function(){return ye(this.string,null,this.tabSize)-(this.lineStart?ye(this.string,this.lineStart,this.tabSize):0)},jn.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(oe){return x?oe.toLowerCase():oe},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var te=this.string.slice(this.pos).match(a);return te&&te.index>0?null:(te&&y!==!1&&(this.pos+=te[0].length),te)}},jn.prototype.current=function(){return this.string.slice(this.start,this.pos)},jn.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},jn.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},jn.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function yt(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],te=E.chunkSize();if(y<te){x=E;break}y-=te}return x.lines[y]}function Ht(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(te){var oe=te.text;E==x.line&&(oe=oe.slice(0,x.ch)),E==y.line&&(oe=oe.slice(y.ch)),b.push(oe),++E}),b}function In(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Un(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Ee(a){if(a.parent==null)return null;for(var y=a.parent,x=ut(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 He(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],te=E.height;if(y<te){a=E;continue e}y-=te,x+=E.chunkSize()}return x}while(!a.lines);for(var oe=0;oe<a.lines.length;++oe){var ue=a.lines[oe],ce=ue.height;if(y<ce)break;y-=ce}return x+oe}function ve(a,y){return y>=a.first&&y<a.first+a.size}function De(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function ge(a,y,x){if(x===void 0&&(x=null),!(this instanceof ge))return new ge(a,y,x);this.line=a,this.ch=y,this.sticky=x}function Pe(a,y){return a.line-y.line||a.ch-y.ch}function qe(a,y){return a.sticky==y.sticky&&Pe(a,y)==0}function Bt(a){return ge(a.line,a.ch)}function Nt(a,y){return Pe(a,y)<0?y:a}function Qt(a,y){return Pe(a,y)<0?a:y}function Mt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function ct(a,y){if(y.line<a.first)return ge(a.first,0);var x=a.first+a.size-1;return y.line>x?ge(x,yt(a,x).text.length):it(y,yt(a,y.line).text.length)}function it(a,y){var x=a.ch;return x==null||x>y?ge(a.line,y):x<0?ge(a.line,0):a}function jt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=ct(a,y[b]);return x}var hn=function(a,y){this.state=a,this.lookAhead=y},ln=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};ln.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},ln.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ln.fromSaved=function(a,y,x){return y instanceof hn?new ln(a,_n(a.mode,y.state),x,y.lookAhead):new ln(a,_n(a.mode,y),x)},ln.prototype.save=function(a){var y=a!==!1?_n(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new hn(y,this.maxLookAhead):y};function cn(a,y,x,b){var E=[a.state.modeGen],te={};qn(a,y.text,a.doc.mode,x,function(he,Te){return E.push(he,Te)},te,b);for(var oe=x.state,ue=function(he){x.baseTokens=E;var Te=a.state.overlays[he],Fe=1,vt=0;x.state=!0,qn(a,y.text,Te.mode,x,function(lt,Ft){for(var en=Fe;vt<lt;){var mn=E[Fe];mn>lt&&E.splice(Fe,1,lt,E[Fe+1],mn),Fe+=2,vt=Math.min(lt,mn)}if(Ft)if(Te.opaque)E.splice(en,Fe-en,lt,"overlay "+Ft),Fe=en+2;else for(;en<Fe;en+=2){var kn=E[en+1];E[en+1]=(kn?kn+" ":"")+"overlay "+Ft}},te),x.state=oe,x.baseTokens=null,x.baseTokenPos=1},ce=0;ce<a.state.overlays.length;++ce)ue(ce);return{styles:E,classes:te.bgClass||te.textClass?te:null}}function Zn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Xn(a,Ee(y)),E=y.text.length>a.options.maxHighlightLength&&_n(a.doc.mode,b.state),te=cn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=te.styles,te.classes?y.styleClasses=te.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Xn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new ln(b,!0,y);var te=lr(a,y,x),oe=te>b.first&&yt(b,te-1).stateAfter,ue=oe?ln.fromSaved(b,oe,te):new ln(b,Qn(b.mode),te);return b.iter(te,y,function(ce){Jn(a,ce.text,ue);var he=ue.line;ce.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?ue.save():null,ue.nextLine()}),x&&(b.modeFrontier=ue.line),ue}function Jn(a,y,x,b){var E=a.doc.mode,te=new jn(y,a.options.tabSize,x);for(te.start=te.pos=b||0,y==""&&Nn(E,x.state);!te.eol();)Sn(E,te,x.state),te.start=te.pos}function Nn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Vn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function Sn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Vn(a,x).mode);var te=a.token(y,x);if(y.pos>y.start)return te}throw new Error("Mode "+a.name+" failed to advance stream.")}var Pn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Hn(a,y,x,b){var E=a.doc,te=E.mode,oe;y=ct(E,y);var ue=yt(E,y.line),ce=Xn(a,y.line,x),he=new jn(ue.text,a.options.tabSize,ce),Te;for(b&&(Te=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,oe=Sn(te,he,ce.state),b&&Te.push(new Pn(he,oe,_n(E.mode,ce.state)));return b?Te:new Pn(he,oe,ce.state)}function ur(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 qn(a,y,x,b,E,te,oe){var ue=x.flattenSpans;ue==null&&(ue=a.options.flattenSpans);var ce=0,he=null,Te=new jn(y,a.options.tabSize,b),Fe,vt=a.options.addModeClass&&[null];for(y==""&&ur(Nn(x,b.state),te);!Te.eol();){if(Te.pos>a.options.maxHighlightLength?(ue=!1,oe&&Jn(a,y,b,Te.pos),Te.pos=y.length,Fe=null):Fe=ur(Sn(x,Te,b.state,vt),te),vt){var lt=vt[0].name;lt&&(Fe="m-"+(Fe?lt+" "+Fe:lt))}if(!ue||he!=Fe){for(;ce<Te.start;)ce=Math.min(Te.start,ce+5e3),E(ce,he);he=Fe}Te.start=Te.pos}for(;ce<Te.pos;){var Ft=Math.min(Te.pos,ce+5e3);E(Ft,he),ce=Ft}}function lr(a,y,x){for(var b,E,te=a.doc,oe=x?-1:y-(a.doc.mode.innerMode?1e3:100),ue=y;ue>oe;--ue){if(ue<=te.first)return te.first;var ce=yt(te,ue-1),he=ce.stateAfter;if(he&&(!x||ue+(he instanceof hn?he.lookAhead:0)<=te.modeFrontier))return ue;var Te=ye(ce.text,null,a.options.tabSize);(E==null||b>Te)&&(E=ue-1,b=Te)}return E}function ir(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=yt(a,b).stateAfter;if(E&&(!(E instanceof hn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var er=!1,tr=!1;function gr(){er=!0}function mr(){tr=!0}function cr(a,y,x){this.marker=a,this.from=y,this.to=x}function vr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Cr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function or(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function dr(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],oe=te.marker,ue=te.from==null||(oe.inclusiveLeft?te.from<=y:te.from<y);if(ue||te.from==y&&oe.type=="bookmark"&&(!x||!te.marker.insertLeft)){var ce=te.to==null||(oe.inclusiveRight?te.to>=y:te.to>y);(b||(b=[])).push(new cr(oe,te.from,ce?null:te.to))}}return b}function Fn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],oe=te.marker,ue=te.to==null||(oe.inclusiveRight?te.to>=y:te.to>y);if(ue||te.from==y&&oe.type=="bookmark"&&(!x||te.marker.insertLeft)){var ce=te.from==null||(oe.inclusiveLeft?te.from<=y:te.from<y);(b||(b=[])).push(new cr(oe,ce?null:te.from-y,te.to==null?null:te.to-y))}}return b}function wr(a,y){if(y.full)return null;var x=ve(a,y.from.line)&&yt(a,y.from.line).markedSpans,b=ve(a,y.to.line)&&yt(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,te=y.to.ch,oe=Pe(y.from,y.to)==0,ue=dr(x,E,oe),ce=Fn(b,te,oe),he=y.text.length==1,Te=Ge(y.text).length+(he?E:0);if(ue)for(var Fe=0;Fe<ue.length;++Fe){var vt=ue[Fe];if(vt.to==null){var lt=vr(ce,vt.marker);lt?he&&(vt.to=lt.to==null?null:lt.to+Te):vt.to=E}}if(ce)for(var Ft=0;Ft<ce.length;++Ft){var en=ce[Ft];if(en.to!=null&&(en.to+=Te),en.from==null){var mn=vr(ue,en.marker);mn||(en.from=Te,he&&(ue||(ue=[])).push(en))}else en.from+=Te,he&&(ue||(ue=[])).push(en)}ue&&(ue=Rr(ue)),ce&&ce!=ue&&(ce=Rr(ce));var kn=[ue];if(!he){var Rn=y.text.length-2,Mn;if(Rn>0&&ue)for(var Wn=0;Wn<ue.length;++Wn)ue[Wn].to==null&&(Mn||(Mn=[])).push(new cr(ue[Wn].marker,null,null));for(var sr=0;sr<Rn;++sr)kn.push(Mn);kn.push(ce)}return kn}function Rr(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(lt){if(lt.markedSpans)for(var Ft=0;Ft<lt.markedSpans.length;++Ft){var en=lt.markedSpans[Ft].marker;en.readOnly&&(!b||ut(b,en)==-1)&&(b||(b=[])).push(en)}}),!b)return null;for(var E=[{from:y,to:x}],te=0;te<b.length;++te)for(var oe=b[te],ue=oe.find(0),ce=0;ce<E.length;++ce){var he=E[ce];if(!(Pe(he.to,ue.from)<0||Pe(he.from,ue.to)>0)){var Te=[ce,1],Fe=Pe(he.from,ue.from),vt=Pe(he.to,ue.to);(Fe<0||!oe.inclusiveLeft&&!Fe)&&Te.push({from:he.from,to:ue.from}),(vt>0||!oe.inclusiveRight&&!vt)&&Te.push({from:ue.to,to:he.to}),E.splice.apply(E,Te),ce+=Te.length-3}}return E}function Er(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Br(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function kr(a){return a.inclusiveLeft?-1:0}function Tr(a){return a.inclusiveRight?1:0}function zr(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),te=Pe(b.from,E.from)||kr(a)-kr(y);if(te)return-te;var oe=Pe(b.to,E.to)||Tr(a)-Tr(y);return oe||y.id-a.id}function fr(a,y){var x=tr&&a.markedSpans,b;if(x)for(var E=void 0,te=0;te<x.length;++te)E=x[te],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||zr(b,E.marker)<0)&&(b=E.marker);return b}function Gn(a){return fr(a,!0)}function $t(a){return fr(a,!1)}function qt(a,y){var x=tr&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var te=x[E];te.marker.collapsed&&(te.from==null||te.from<y)&&(te.to==null||te.to>y)&&(!b||zr(b,te.marker)<0)&&(b=te.marker)}return b}function Xt(a,y,x,b,E){var te=yt(a,y),oe=tr&&te.markedSpans;if(oe)for(var ue=0;ue<oe.length;++ue){var ce=oe[ue];if(ce.marker.collapsed){var he=ce.marker.find(0),Te=Pe(he.from,x)||kr(ce.marker)-kr(E),Fe=Pe(he.to,b)||Tr(ce.marker)-Tr(E);if(!(Te>=0&&Fe<=0||Te<=0&&Fe>=0)&&(Te<=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Pe(he.to,x)>=0:Pe(he.to,x)>0)||Te>=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Pe(he.from,b)<=0:Pe(he.from,b)<0)))return!0}}}function Ot(a){for(var y;y=Gn(a);)a=y.find(-1,!0).line;return a}function En(a){for(var y;y=$t(a);)a=y.find(1,!0).line;return a}function On(a){for(var y,x;y=$t(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Vt(a,y){var x=yt(a,y),b=Ot(x);return x==b?y:Ee(b)}function Kt(a,y){if(y>a.lastLine())return y;var x=yt(a,y),b;if(!xn(a,x))return y;for(;b=$t(x);)x=b.find(1,!0).line;return Ee(x)+1}function xn(a,y){var x=tr&&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&&Cn(a,y,b))return!0}}}function Cn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return Cn(a,b.line,vr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,te=0;te<y.markedSpans.length;++te)if(E=y.markedSpans[te],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&Cn(a,y,E))return!0}function rr(a){a=Ot(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var te=x.parent;te;x=te,te=x.parent)for(var oe=0;oe<te.children.length;++oe){var ue=te.children[oe];if(ue==x)break;y+=ue.height}return y}function Mr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Gn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=$t(b);){var te=x.find(0,!0);y-=b.text.length-te.from.ch,b=te.to.line,y+=b.text.length-te.to.ch}return y}function br(a){var y=a.display,x=a.doc;y.maxLine=yt(x,x.first),y.maxLineLength=Mr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Mr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Ir=function(a,y,x){this.text=a,Br(this,y),this.height=x?x(this):1};Ir.prototype.lineNo=function(){return Ee(this)},Yt(Ir);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),Er(a),Br(a,x);var E=b?b(a):1;E!=a.height&&Un(a,E)}function Lr(a){a.parent=null,Er(a)}var Hr={},Or={};function _r(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Or:Hr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ti(a,y){var x=ft("span",null,null,Ne?"padding-right: .1px":null),b={pre:ft("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var te=E?y.rest[E-1]:y.line,oe=void 0;b.pos=0,b.addToken=Fi,An(a.display.measure)&&(oe=Gt(te,a.doc.direction))&&(b.addToken=mi(b.addToken,oe)),b.map=[];var ue=y!=a.display.externalMeasured&&Ee(te);Ar(te,b,Zn(a,te,ue)),te.styleClasses&&(te.styleClasses.bgClass&&(b.bgClass=Ct(te.styleClasses.bgClass,b.bgClass||"")),te.styleClasses.textClass&&(b.textClass=Ct(te.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(fn(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(Ne){var ce=b.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return on(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Ct(b.pre.className,b.textClass||"")),b}function Di(a){var y=_e("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Fi(a,y,x,b,E,te,oe){if(y){var ue=a.splitSpaces?xi(y,a.trailingSpace):y,ce=a.cm.state.specialChars,he=!1,Te;if(!ce.test(y))a.col+=y.length,Te=document.createTextNode(ue),a.map.push(a.pos,a.pos+y.length,Te),be&&Ce<9&&(he=!0),a.pos+=y.length;else{Te=document.createDocumentFragment();for(var Fe=0;;){ce.lastIndex=Fe;var vt=ce.exec(y),lt=vt?vt.index-Fe:y.length-Fe;if(lt){var Ft=document.createTextNode(ue.slice(Fe,Fe+lt));be&&Ce<9?Te.appendChild(_e("span",[Ft])):Te.appendChild(Ft),a.map.push(a.pos,a.pos+lt,Ft),a.col+=lt,a.pos+=lt}if(!vt)break;Fe+=lt+1;var en=void 0;if(vt[0]==" "){var mn=a.cm.options.tabSize,kn=mn-a.col%mn;en=Te.appendChild(_e("span",Ut(kn),"cm-tab")),en.setAttribute("role","presentation"),en.setAttribute("cm-text"," "),a.col+=kn}else vt[0]=="\r"||vt[0]==`
`?(en=Te.appendChild(_e("span",vt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),en.setAttribute("cm-text",vt[0]),a.col+=1):(en=a.cm.options.specialCharPlaceholder(vt[0]),en.setAttribute("cm-text",vt[0]),be&&Ce<9?Te.appendChild(_e("span",[en])):Te.appendChild(en),a.col+=1);a.map.push(a.pos,a.pos+1,en),a.pos++}}if(a.trailingSpace=ue.charCodeAt(y.length-1)==32,x||b||E||he||te||oe){var Rn=x||"";b&&(Rn+=b),E&&(Rn+=E);var Mn=_e("span",[Te],Rn,te);if(oe)for(var Wn in oe)oe.hasOwnProperty(Wn)&&Wn!="style"&&Wn!="class"&&Mn.setAttribute(Wn,oe[Wn]);return a.content.appendChild(Mn)}a.content.appendChild(Te)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var te=a.charAt(E);te==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(te="\xA0"),b+=te,x=te==" "}return b}function mi(a,y){return function(x,b,E,te,oe,ue,ce){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,Te=he+b.length;;){for(var Fe=void 0,vt=0;vt<y.length&&(Fe=y[vt],!(Fe.to>he&&Fe.from<=he));vt++);if(Fe.to>=Te)return a(x,b,E,te,oe,ue,ce);a(x,b.slice(0,Fe.to-he),E,te,null,ue,ce),te=null,b=b.slice(Fe.to-he),he=Fe.to}}}function Yi(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 Ar(a,y,x){var b=a.markedSpans,E=a.text,te=0;if(!b){for(var oe=1;oe<x.length;oe+=2)y.addToken(y,E.slice(te,te=x[oe]),_r(x[oe+1],y.cm.options));return}for(var ue=E.length,ce=0,he=1,Te="",Fe,vt,lt=0,Ft,en,mn,kn,Rn;;){if(lt==ce){Ft=en=mn=vt="",Rn=null,kn=null,lt=1/0;for(var Mn=[],Wn=void 0,sr=0;sr<b.length;++sr){var nr=b[sr],Sr=nr.marker;if(Sr.type=="bookmark"&&nr.from==ce&&Sr.widgetNode)Mn.push(Sr);else if(nr.from<=ce&&(nr.to==null||nr.to>ce||Sr.collapsed&&nr.to==ce&&nr.from==ce)){if(nr.to!=null&&nr.to!=ce&&lt>nr.to&&(lt=nr.to,en=""),Sr.className&&(Ft+=" "+Sr.className),Sr.css&&(vt=(vt?vt+";":"")+Sr.css),Sr.startStyle&&nr.from==ce&&(mn+=" "+Sr.startStyle),Sr.endStyle&&nr.to==lt&&(Wn||(Wn=[])).push(Sr.endStyle,nr.to),Sr.title&&((Rn||(Rn={})).title=Sr.title),Sr.attributes)for(var $r in Sr.attributes)(Rn||(Rn={}))[$r]=Sr.attributes[$r];Sr.collapsed&&(!kn||zr(kn.marker,Sr)<0)&&(kn=nr)}else nr.from>ce&&lt>nr.from&&(lt=nr.from)}if(Wn)for(var li=0;li<Wn.length;li+=2)Wn[li+1]==lt&&(en+=" "+Wn[li]);if(!kn||kn.from==ce)for(var Ur=0;Ur<Mn.length;++Ur)Yi(y,0,Mn[Ur]);if(kn&&(kn.from||0)==ce){if(Yi(y,(kn.to==null?ue+1:kn.to)-ce,kn.marker,kn.from==null),kn.to==null)return;kn.to==ce&&(kn=!1)}}if(ce>=ue)break;for(var Oi=Math.min(ue,lt);;){if(Te){var Ei=ce+Te.length;if(!kn){var qr=Ei>Oi?Te.slice(0,Oi-ce):Te;y.addToken(y,qr,Fe?Fe+Ft:Ft,mn,ce+qr.length==lt?en:"",vt,Rn)}if(Ei>=Oi){Te=Te.slice(Oi-ce),ce=Oi;break}ce=Ei,mn=""}Te=E.slice(te,te=x[he++]),Fe=_r(x[he++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=On(y),this.size=this.rest?Ee(Ge(this.rest))-x+1:1,this.node=this.text=null,this.hidden=xn(a,y)}function ni(a,y,x){for(var b=[],E,te=y;te<x;te=E){var oe=new to(a.doc,yt(a.doc,te),te);E=te+oe.size,b.push(oe)}return b}var Ai=null;function ao(a){Ai?Ai.ops.push(a):a.ownsGroup=Ai={ops:[a],delayedCallbacks:[]}}function Xi(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 vi(a,y){var x=a.ownsGroup;if(x)try{Xi(x)}finally{Ai=null,y(x)}}var Bi=null;function Gr(a,y){var x=sn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Ai?E=Ai.delayedCallbacks:Bi?E=Bi:(E=Bi=[],setTimeout(zi,0));for(var te=function(ue){E.push(function(){return x[ue].apply(null,b)})},oe=0;oe<x.length;++oe)te(oe)}}function zi(){var a=Bi;Bi=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 te=y.changes[E];te=="text"?so(a,y):te=="gutter"?yr(a,y,x,b):te=="class"?ar(a,y):te=="widget"&&hr(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=_e("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),be&&Ce<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(_e("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ti(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,ar(a,y)):x&&(y.text.className=x)}function ar(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 yr(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=Zi(y);y.gutterBackground=_e("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var te=y.line.gutterMarkers;if(a.options.lineNumbers||te){var oe=Zi(y),ue=y.gutter=_e("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ue),oe.insertBefore(ue,y.text),y.line.gutterClass&&(ue.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(y.lineNumber=ue.appendChild(_e("div",De(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),te)for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var he=a.display.gutterSpecs[ce].className,Te=te.hasOwnProperty(he)&&te[he];Te&&ue.appendChild(_e("div",[Te],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function hr(a,y,x){y.alignable&&(y.alignable=null);for(var b=st("CodeMirror-linewidget"),E=y.node.firstChild,te=void 0;E;E=te)te=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);Nr(a,y,x)}function pr(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),ar(a,y),yr(a,y,x,b),Nr(a,y,b),y.node}function Nr(a,y,x){if(Zr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Zr(a,y.rest[b],y,x,!1)}function Zr(a,y,x,b,E){if(y.widgets)for(var te=Zi(x),oe=0,ue=y.widgets;oe<ue.length;++oe){var ce=ue[oe],he=_e("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),$i(ce,he,x,b),a.display.input.setUneditable(he),E&&ce.above?te.insertBefore(he,x.gutter||x.text):te.appendChild(he),Gr(ce,"redraw")}}function $i(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(!Ke(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;"),Xe(y.display.measure,_e("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=Ue(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 Yr(a){return a.lineSpace.offsetTop}function Hi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Ji(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Xe(a.measure,_e("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Pi(a){return _t-a.display.nativeBarWidth}function Qi(a){return a.display.scroller.clientWidth-Pi(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Pi(a)-a.display.barHeight}function _i(a,y,x){var b=a.options.lineWrapping,E=b&&Qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var te=y.measure.heights=[];if(b){y.measure.width=E;for(var oe=y.text.firstChild.getClientRects(),ue=0;ue<oe.length-1;ue++){var ce=oe[ue],he=oe[ue+1];Math.abs(ce.bottom-he.bottom)>2&&te.push((ce.bottom+he.top)/2-x.top)}}te.push(x.bottom-x.top)}}function To(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;b<a.rest.length;b++)if(a.rest[b]==y)return{map:a.measure.maps[b],cache:a.measure.caches[b]};for(var E=0;E<a.rest.length;E++)if(Ee(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function _a(a,y){y=Ot(y);var x=Ee(y),b=a.display.externalMeasured=new to(a.doc,y,x);b.lineN=x;var E=b.built=ti(a,b);return b.text=E.pre,Xe(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Wi(a,uo(a,y),x,b)}function qi(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[So(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function uo(a,y){var x=Ee(y),b=qi(a,x);b&&!b.text?b=null:b&&b.changes&&(lo(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=_a(a,y));var E=To(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Wi(a,y,x,b,E){y.before&&(x=-1);var te=x+(b||""),oe;return y.cache.hasOwnProperty(te)?oe=y.cache[te]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(_i(a,y.view,y.rect),y.hasHeights=!0),oe=Ca(a,y,x,b),oe.bogus||(y.cache[te]=oe)),{left:oe.left,right:oe.right,top:E?oe.rtop:oe.top,bottom:E?oe.rbottom:oe.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,te,oe,ue,ce,he=0;he<a.length;he+=3)if(ue=a[he],ce=a[he+1],y<ue?(E=0,te=1,oe="left"):y<ce?(E=y-ue,te=E+1):(he==a.length-3||y==ce&&a[he+3]>y)&&(te=ce-ue,E=te-1,y>=ce&&(oe="right")),E!=null){if(b=a[he+2],ue==ce&&x==(b.insertLeft?"left":"right")&&(oe=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],oe="left";if(x=="right"&&E==ce-ue)for(;he<a.length-3&&a[he+3]==a[he+4]&&!a[he+5].insertLeft;)b=a[(he+=3)+2],oe="right";break}return{node:b,start:E,end:te,collapse:oe,coverStart:ue,coverEnd:ce}}function Ga(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 Ca(a,y,x,b){var E=xa(y.map,x,b),te=E.node,oe=E.start,ue=E.end,ce=E.collapse,he;if(te.nodeType==3){for(var Te=0;Te<4;Te++){for(;oe&&Ve(y.line.text.charAt(E.coverStart+oe));)--oe;for(;E.coverStart+ue<E.coverEnd&&Ve(y.line.text.charAt(E.coverStart+ue));)++ue;if(be&&Ce<9&&oe==0&&ue==E.coverEnd-E.coverStart?he=te.parentNode.getBoundingClientRect():he=Ga(Le(te,oe,ue).getClientRects(),b),he.left||he.right||oe==0)break;ue=oe,oe=oe-1,ce="right"}be&&Ce<11&&(he=Va(a.display.measure,he))}else{oe>0&&(ce=b="right");var Fe;a.options.lineWrapping&&(Fe=te.getClientRects()).length>1?he=Fe[b=="right"?Fe.length-1:0]:he=te.getBoundingClientRect()}if(be&&Ce<9&&!oe&&(!he||!he.left&&!he.right)){var vt=te.parentNode.getClientRects()[0];vt?he={left:vt.left,right:vt.left+Vi(a.display),top:vt.top,bottom:vt.bottom}:he=ba}for(var lt=he.top-y.rect.top,Ft=he.bottom-y.rect.top,en=(lt+Ft)/2,mn=y.view.measure.heights,kn=0;kn<mn.length-1&&!(en<mn[kn]);kn++);var Rn=kn?mn[kn-1]:0,Mn=mn[kn],Wn={left:(ce=="right"?he.right:he.left)-y.rect.left,right:(ce=="left"?he.left:he.right)-y.rect.left,top:Rn,bottom:Mn};return!he.left&&!he.right&&(Wn.bogus=!0),a.options.singleCursorHeightPerLine||(Wn.rtop=lt,Wn.rbottom=Ft),Wn}function Va(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!gn(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 Uo(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 Ko(a){a.display.externalMeasure=null,St(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Uo(a.display.view[y])}function Co(a){Ko(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Yo(){return Se&&Me?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wa(){return Se&&Me?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xo(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 Lo(a,y,x,b,E){if(!E){var te=Xo(y);x.top+=te,x.bottom+=te}if(b=="line")return x;b||(b="local");var oe=rr(y);if(b=="local"?oe+=Yr(a.display):oe-=a.display.viewOffset,b=="page"||b=="window"){var ue=a.display.lineSpace.getBoundingClientRect();oe+=ue.top+(b=="window"?0:wa());var ce=ue.left+(b=="window"?0:Yo());x.left+=ce,x.right+=ce}return x.top+=oe,x.bottom+=oe,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Yo(),E-=wa();else if(x=="local"||!x){var te=a.display.sizer.getBoundingClientRect();b+=te.left,E+=te.top}var oe=a.display.lineSpace.getBoundingClientRect();return{left:b-oe.left,top:E-oe.top}}function Oo(a,y,x,b,E){return b||(b=yt(a.doc,y.line)),Lo(a,b,ya(a,b,y.ch,E),x)}function Ci(a,y,x,b,E,te){b=b||yt(a.doc,y.line),E||(E=uo(a,b));function oe(Ft,en){var mn=Wi(a,E,Ft,en?"right":"left",te);return en?mn.left=mn.right:mn.right=mn.left,Lo(a,b,mn,x)}var ue=Gt(b,a.doc.direction),ce=y.ch,he=y.sticky;if(ce>=b.text.length?(ce=b.text.length,he="before"):ce<=0&&(ce=0,he="after"),!ue)return oe(he=="before"?ce-1:ce,he=="before");function Te(Ft,en,mn){var kn=ue[en],Rn=kn.level==1;return oe(mn?Ft-1:Ft,Rn!=mn)}var Fe=Dt(ue,ce,he),vt=ht,lt=Te(ce,Fe,he=="before");return vt!=null&&(lt.other=Te(ce,vt,he!="before")),lt}function Pr(a,y){var x=0;y=ct(a.doc,y),a.options.lineWrapping||(x=Vi(a.display)*y.ch);var b=yt(a.doc,y.line),E=rr(b)+Yr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function xr(a,y,x,b,E){var te=ge(a,y,x);return te.xRel=E,b&&(te.outside=b),te}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return xr(b.first,0,null,-1,-1);var E=He(b,x),te=b.first+b.size-1;if(E>te)return xr(b.first+b.size-1,yt(b,te).text.length,null,1,1);y<0&&(y=0);for(var oe=yt(b,E);;){var ue=Gi(a,oe,E,y,x),ce=qt(oe,ue.ch+(ue.xRel>0||ue.outside>0?1:0));if(!ce)return ue;var he=ce.find(1);if(he.line==E)return he;oe=yt(b,E=he.line)}}function fi(a,y,x,b){b-=Xo(y);var E=y.text.length,te=je(function(oe){return Wi(a,x,oe-1).bottom<=b},E,0);return E=je(function(oe){return Wi(a,x,oe).top>b},te,E),{begin:te,end:E}}function Xr(a,y,x,b){x||(x=uo(a,y));var E=Lo(a,y,Wi(a,x,b),"line").top;return fi(a,y,x,E)}function ri(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Gi(a,y,x,b,E){E-=rr(y);var te=uo(a,y),oe=Xo(y),ue=0,ce=y.text.length,he=!0,Te=Gt(y,a.doc.direction);if(Te){var Fe=(a.options.lineWrapping?ro:ji)(a,y,x,te,Te,b,E);he=Fe.level!=1,ue=he?Fe.from:Fe.to-1,ce=he?Fe.to:Fe.from-1}var vt=null,lt=null,Ft=je(function(sr){var nr=Wi(a,te,sr);return nr.top+=oe,nr.bottom+=oe,ri(nr,b,E,!1)?(nr.top<=E&&nr.left<=b&&(vt=sr,lt=nr),!0):!1},ue,ce),en,mn,kn=!1;if(lt){var Rn=b-lt.left<lt.right-b,Mn=Rn==he;Ft=vt+(Mn?0:1),mn=Mn?"after":"before",en=Rn?lt.left:lt.right}else{!he&&(Ft==ce||Ft==ue)&&Ft++,mn=Ft==0?"after":Ft==y.text.length?"before":Wi(a,te,Ft-(he?1:0)).bottom+oe<=E==he?"after":"before";var Wn=Ci(a,ge(x,Ft,mn),"line",y,te);en=Wn.left,kn=E<Wn.top?-1:E>=Wn.bottom?1:0}return Ft=It(y.text,Ft,1),xr(x,Ft,mn,kn,b-en)}function ji(a,y,x,b,E,te,oe){var ue=je(function(Fe){var vt=E[Fe],lt=vt.level!=1;return ri(Ci(a,ge(x,lt?vt.to:vt.from,lt?"before":"after"),"line",y,b),te,oe,!0)},0,E.length-1),ce=E[ue];if(ue>0){var he=ce.level!=1,Te=Ci(a,ge(x,he?ce.from:ce.to,he?"after":"before"),"line",y,b);ri(Te,te,oe,!0)&&Te.top>oe&&(ce=E[ue-1])}return ce}function ro(a,y,x,b,E,te,oe){var ue=fi(a,y,b,oe),ce=ue.begin,he=ue.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var Te=null,Fe=null,vt=0;vt<E.length;vt++){var lt=E[vt];if(!(lt.from>=he||lt.to<=ce)){var Ft=lt.level!=1,en=Wi(a,b,Ft?Math.min(he,lt.to)-1:Math.max(ce,lt.from)).right,mn=en<te?te-en+1e9:en-te;(!Te||Fe>mn)&&(Te=lt,Fe=mn)}}return Te||(Te=E[E.length-1]),Te.from<ce&&(Te={from:ce,to:Te.to,level:Te.level}),Te.to>he&&(Te={from:Te.from,to:he,level:Te.level}),Te}var Ii;function Ti(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ii==null){Ii=_e("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ii.appendChild(document.createTextNode("x")),Ii.appendChild(_e("br"));Ii.appendChild(document.createTextNode("x"))}Xe(a.measure,Ii);var x=Ii.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),St(a.measure),x||1}function Vi(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=_e("span","xxxxxxxxxx"),x=_e("pre",[y],"CodeMirror-line-like");Xe(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,te=y.gutters.firstChild,oe=0;te;te=te.nextSibling,++oe){var ue=a.display.gutterSpecs[oe].className;x[ue]=te.offsetLeft+te.clientLeft+E,b[ue]=te.clientWidth}return{fixedPos:Ua(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ua(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Cl(a){var y=Ti(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Vi(a.display)-3);return function(E){if(xn(a.doc,E))return 0;var te=0;if(E.widgets)for(var oe=0;oe<E.widgets.length;oe++)E.widgets[oe].height&&(te+=E.widgets[oe].height);return x?te+(Math.ceil(E.text.length/b)||1)*y:te+y}}function Ka(a){var y=a.doc,x=Cl(a);y.iter(function(b){var E=x(b);E!=b.height&&Un(b,E)})}function wo(a,y,x,b){var E=a.display;if(!x&&Ue(y).getAttribute("cm-not-content")=="true")return null;var te,oe,ue=E.lineSpace.getBoundingClientRect();try{te=y.clientX-ue.left,oe=y.clientY-ue.top}catch(Fe){return null}var ce=ci(a,te,oe),he;if(b&&ce.xRel>0&&(he=yt(a.doc,ce.line).text).length==ce.ch){var Te=ye(he,he.length,a.options.tabSize)-he.length;ce=ge(ce.line,Math.max(0,Math.round((te-Ji(a.display).left)/Vi(a.display))-Te))}return ce}function So(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function wi(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)tr&&Vt(a.doc,y)<E.viewTo&&ho(a);else if(x<=E.viewFrom)tr&&Kt(a.doc,x+b)>E.viewFrom?ho(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)ho(a);else if(y<=E.viewFrom){var te=Ea(a,x,x+b,1);te?(E.view=E.view.slice(te.index),E.viewFrom=te.lineN,E.viewTo+=b):ho(a)}else if(x>=E.viewTo){var oe=Ea(a,y,y,-1);oe?(E.view=E.view.slice(0,oe.index),E.viewTo=oe.lineN):ho(a)}else{var ue=Ea(a,y,y,-1),ce=Ea(a,x,x+b,1);ue&&ce?(E.view=E.view.slice(0,ue.index).concat(ni(a,ue.lineN,ce.lineN)).concat(E.view.slice(ce.index)),E.viewTo+=b):ho(a)}var he=E.externalMeasured;he&&(x<he.lineN?he.lineN+=b:y<he.lineN+he.size&&(E.externalMeasured=null))}function fo(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var te=b.view[So(a,y)];if(te.node!=null){var oe=te.changes||(te.changes=[]);ut(oe,x)==-1&&oe.push(x)}}}function ho(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Ea(a,y,x,b){var E=So(a,y),te,oe=a.display.view;if(!tr||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ue=a.display.viewFrom,ce=0;ce<E;ce++)ue+=oe[ce].size;if(ue!=y){if(b>0){if(E==oe.length-1)return null;te=ue+oe[E].size-y,E++}else te=ue-y;y+=te,x+=te}for(;Vt(a.doc,x)!=x;){if(E==(b<0?0:oe.length-1))return null;x+=b*oe[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=ni(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=ni(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(ni(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function wl(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 Jo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Sl(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),te=b.selection=document.createDocumentFragment(),oe=0;oe<x.sel.ranges.length;oe++)if(!(!y&&oe==x.sel.primIndex)){var ue=x.sel.ranges[oe];if(!(ue.from().line>=a.display.viewTo||ue.to().line<a.display.viewFrom)){var ce=ue.empty();(ce||a.options.showCursorWhenSelecting)&&El(a,ue.head,E),ce||Ws(a,ue,te)}}return b}function El(a,y,x){var b=Ci(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(_e("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var te=x.appendChild(_e("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=b.other.left+"px",te.style.top=b.other.top+"px",te.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ka(a,y){return a.top-y.top||a.left-y.left}function Ws(a,y,x){var b=a.display,E=a.doc,te=document.createDocumentFragment(),oe=Ji(a.display),ue=oe.left,ce=Math.max(b.sizerWidth,Qi(a)-b.sizer.offsetLeft)-oe.right,he=E.direction=="ltr";function Te(Mn,Wn,sr,nr){Wn<0&&(Wn=0),Wn=Math.round(Wn),nr=Math.round(nr),te.appendChild(_e("div",null,"CodeMirror-selected","position: absolute; left: "+Mn+`px;
top: `+Wn+"px; width: "+(sr==null?ce-Mn:sr)+`px;
height: `+(nr-Wn)+"px"))}function Fe(Mn,Wn,sr){var nr=yt(E,Mn),Sr=nr.text.length,$r,li;function Ur(qr,ki){return Oo(a,ge(Mn,qr),"div",nr,ki)}function Oi(qr,ki,di){var ii=Xr(a,nr,null,qr),ei=ki=="ltr"==(di=="after")?"left":"right",Kr=di=="after"?ii.begin:ii.end-(/\s/.test(nr.text.charAt(ii.end-1))?2:1);return Ur(Kr,ei)[ei]}var Ei=Gt(nr,E.direction);return Qe(Ei,Wn||0,sr==null?Sr:sr,function(qr,ki,di,ii){var ei=di=="ltr",Kr=Ur(qr,ei?"left":"right"),Mi=Ur(ki-1,ei?"right":"left"),Go=Wn==null&&qr==0,bo=sr==null&&ki==Sr,pi=ii==0,eo=!Ei||ii==Ei.length-1;if(Mi.top-Kr.top<=3){var si=(he?Go:bo)&&pi,bl=(he?bo:Go)&&eo,oo=si?ue:(ei?Kr:Mi).left,Po=bl?ce:(ei?Mi:Kr).right;Te(oo,Kr.top,Po-oo,Kr.bottom)}else{var Io,bi,Vo,xl;ei?(Io=he&&Go&&pi?ue:Kr.left,bi=he?ce:Oi(qr,di,"before"),Vo=he?ue:Oi(ki,di,"after"),xl=he&&bo&&eo?ce:Mi.right):(Io=he?Oi(qr,di,"before"):ue,bi=!he&&Go&&pi?ce:Kr.right,Vo=!he&&bo&&eo?ue:Mi.left,xl=he?Oi(ki,di,"after"):ce),Te(Io,Kr.top,bi-Io,Kr.bottom),Kr.bottom<Mi.top&&Te(ue,Kr.bottom,null,Mi.top),Te(Vo,Mi.top,xl-Vo,Mi.bottom)}(!$r||ka(Kr,$r)<0)&&($r=Kr),ka(Mi,$r)<0&&($r=Mi),(!li||ka(Kr,li)<0)&&(li=Kr),ka(Mi,li)<0&&(li=Mi)}),{start:$r,end:li}}var vt=y.from(),lt=y.to();if(vt.line==lt.line)Fe(vt.line,vt.ch,lt.ch);else{var Ft=yt(E,vt.line),en=yt(E,lt.line),mn=Ot(Ft)==Ot(en),kn=Fe(vt.line,vt.ch,mn?Ft.text.length+1:null).end,Rn=Fe(lt.line,mn?0:null,lt.ch).start;mn&&(kn.top<Rn.top-2?(Te(kn.right,kn.top,null,kn.bottom),Te(ue,Rn.top,Rn.left,Rn.bottom)):Te(kn.right,kn.top,Rn.left-kn.right,kn.bottom)),kn.bottom<Rn.top&&Te(ue,kn.bottom,null,Rn.top)}x.appendChild(te)}function Ya(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()||Ao(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function kl(a){a.state.focused||(a.display.input.focus(),Xa(a))}function Ml(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ao(a))},100)}function Xa(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(on(a,"focus",a,y),a.state.focused=!0,pe(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Ne&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Ya(a))}function Ao(a,y){a.state.delayingBlurEvent||(a.state.focused&&(on(a,"blur",a,y),a.state.focused=!1,We(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Ma(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],te=a.options.lineWrapping,oe=void 0,ue=0;if(!E.hidden){if(be&&Ce<8){var ce=E.node.offsetTop+E.node.offsetHeight;oe=ce-x,x=ce}else{var he=E.node.getBoundingClientRect();oe=he.bottom-he.top,!te&&E.text.firstChild&&(ue=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var Te=E.line.height-oe;if((Te>.005||Te<-.005)&&(Un(E.line,oe),Dl(E.line),E.rest))for(var Fe=0;Fe<E.rest.length;Fe++)Dl(E.rest[Fe]);if(ue>a.display.sizerWidth){var vt=Math.ceil(ue/Vi(a.display));vt>a.display.maxLineLength&&(a.display.maxLineLength=vt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Dl(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var x=a.widgets[y],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function Da(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Yr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,te=He(y,b),oe=He(y,E);if(x&&x.ensure){var ue=x.ensure.from.line,ce=x.ensure.to.line;ue<te?(te=ue,oe=He(y,rr(yt(y,ue))+a.wrapper.clientHeight)):Math.min(ce,y.lastLine())>=oe&&(te=He(y,rr(yt(y,ce))-a.wrapper.clientHeight),oe=ce)}return{from:te,to:Math.max(oe,te+1)}}function js(a,y){if(!pt(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&&!ot){var te=_e("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Yr(a.display))+`px;
height: `+(y.bottom-y.top+Pi(a)+x.barHeight)+`px;
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(te),te.scrollIntoView(E),a.display.lineSpace.removeChild(te)}}}function Zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?ge(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?ge(y.line,y.ch+1,"before"):y);for(var te=0;te<5;te++){var oe=!1,ue=Ci(a,y),ce=!x||x==y?ue:Ci(a,x);E={left:Math.min(ue.left,ce.left),top:Math.min(ue.top,ce.top)-b,right:Math.max(ue.left,ce.left),bottom:Math.max(ue.bottom,ce.bottom)+b};var he=Ja(a,E),Te=a.doc.scrollTop,Fe=a.doc.scrollLeft;if(he.scrollTop!=null&&(qo(a,he.scrollTop),Math.abs(a.doc.scrollTop-Te)>1&&(oe=!0)),he.scrollLeft!=null&&(Eo(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-Fe)>1&&(oe=!0)),!oe)break}return E}function $s(a,y){var x=Ja(a,y);x.scrollTop!=null&&qo(a,x.scrollTop),x.scrollLeft!=null&&Eo(a,x.scrollLeft)}function Ja(a,y){var x=a.display,b=Ti(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,te=no(a),oe={};y.bottom-y.top>te&&(y.bottom=y.top+te);var ue=a.doc.height+Hi(x),ce=y.top<b,he=y.bottom>ue-b;if(y.top<E)oe.scrollTop=ce?0:y.top;else if(y.bottom>E+te){var Te=Math.min(y.top,(he?ue:y.bottom)-te);Te!=E&&(oe.scrollTop=Te)}var Fe=a.options.fixedGutter?0:x.gutters.offsetWidth,vt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Fe,lt=Qi(a)-x.gutters.offsetWidth,Ft=y.right-y.left>lt;return Ft&&(y.right=y.left+lt),y.left<10?oe.scrollLeft=0:y.left<vt?oe.scrollLeft=Math.max(0,y.left+Fe-(Ft?0:10)):y.right>lt+vt-3&&(oe.scrollLeft=y.right+(Ft?0:10)-lt),oe}function Qa(a,y){y!=null&&(Pa(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Bo(a){Pa(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)&&Pa(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function _s(a,y){Pa(a),a.curOp.scrollToPos=y}function Pa(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=Pr(a,y.from),b=Pr(a,y.to);Pl(a,x,b,y.margin)}}function Pl(a,y,x,b){var E=Ja(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 qo(a,y){Math.abs(a.doc.scrollTop-y)<2||(re||el(a,{top:y}),Il(a,y,!0),re&&el(a),na(a,100))}function Il(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function Eo(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Bl(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+Pi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=_e("div",[_e("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=_e("div",[_e("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Lt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Lt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,be&&Ce<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ko.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var te=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},ko.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ko.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ko.prototype.zeroWidthHack=function(){var a=Oe&&!xe?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new fe,this.disableVert=new fe},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),te=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);te!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},ko.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function No(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Tl(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Ma(a),Tl(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Tl(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 Ll={native:ko,null:ta};function Ol(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&We(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ll[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Lt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?Eo(a,y):qo(a,y)},a),a.display.scrollbars.addClass&&pe(a.display.wrapper,a.display.scrollbars.addClass)}var Gs=0;function Mo(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:++Gs},ao(a.curOp)}function Do(a){var y=a.curOp;y&&vi(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Vs(x)})}function Vs(a){for(var y=a.ops,x=0;x<y.length;x++)Us(y[x]);for(var b=0;b<y.length;b++)Ks(y[b]);for(var E=0;E<y.length;E++)Ys(y[E]);for(var te=0;te<y.length;te++)Xs(y[te]);for(var oe=0;oe<y.length;oe++)Js(y[oe])}function Us(a){var y=a.cm,x=y.display;qs(y),a.updateMaxLine&&br(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 Ia(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ks(a){a.updatedDisplay=a.mustUpdate&&qa(a.cm,a.update)}function Ys(a){var y=a.cm,x=y.display;a.updatedDisplay&&Ma(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+Pi(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 Xs(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Eo(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==et();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&&Ya(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&kl(a.cm)}function Js(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Al(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Il(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Eo(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,ct(b,a.scrollToPos.from),ct(b,a.scrollToPos.to),a.scrollToPos.margin);js(y,E)}var te=a.maybeHiddenMarkers,oe=a.maybeUnhiddenMarkers;if(te)for(var ue=0;ue<te.length;++ue)te[ue].lines.length||on(te[ue],"hide");if(oe)for(var ce=0;ce<oe.length;++ce)oe[ce].lines.length&&on(oe[ce],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&on(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Li(a,y){if(a.curOp)return y();Mo(a);try{return y()}finally{Do(a)}}function oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Mo(a);try{return y.apply(a,arguments)}finally{Do(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Mo(this);try{return a.apply(this,arguments)}finally{Do(this)}}}function ai(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Mo(y);try{return a.apply(this,arguments)}finally{Do(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,wt(Qs,a))}function Qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Xn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(te){if(b.line>=a.display.viewFrom){var oe=te.styles,ue=te.text.length>a.options.maxHighlightLength?_n(y.mode,b.state):null,ce=cn(a,te,b,!0);ue&&(b.state=ue),te.styles=ce.styles;var he=te.styleClasses,Te=ce.classes;Te?te.styleClasses=Te:he&&(te.styleClasses=null);for(var Fe=!oe||oe.length!=te.styles.length||he!=Te&&(!he||!Te||he.bgClass!=Te.bgClass||he.textClass!=Te.textClass),vt=0;!Fe&&vt<oe.length;++vt)Fe=oe[vt]!=te.styles[vt];Fe&&E.push(b.line),te.stateAfter=b.save(),b.nextLine()}else te.text.length<=a.options.maxHighlightLength&&Jn(a,te.text,b),te.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Li(a,function(){for(var te=0;te<E.length;te++)fo(a,E[te],"text")})}}var Ia=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Da(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=Qi(a),this.force=x,this.dims=co(a),this.events=[]};Ia.prototype.signal=function(a,y){Rt(a,y)&&this.events.push(arguments)},Ia.prototype.finish=function(){for(var a=0;a<this.events.length;a++)on.apply(null,this.events[a])};function qs(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Pi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Pi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=et();if(!y||!Ke(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Ke(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==et())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ke(document.body,a.anchorNode)&&Ke(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 qa(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return ho(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&wl(a)==0)return!1;Nl(a)&&(ho(a),y.dims=co(a));var E=b.first+b.size,te=Math.max(y.visible.from-a.options.viewportMargin,b.first),oe=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<te&&te-x.viewFrom<20&&(te=Math.max(b.first,x.viewFrom)),x.viewTo>oe&&x.viewTo-oe<20&&(oe=Math.min(E,x.viewTo)),tr&&(te=Vt(a.doc,te),oe=Kt(a.doc,oe));var ue=te!=x.viewFrom||oe!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hs(a,te,oe),x.viewOffset=rr(yt(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ce=wl(a);if(!ue&&ce==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return ce>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ce>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),St(x.cursorDiv),St(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ue&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Al(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=Da(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Da(a.display,a.doc,x));if(!qa(a,y))break;Ma(a);var E=ea(a);Jo(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 Ia(a,y);if(qa(a,x)){Ma(a),Al(a,x);var b=ea(a);Jo(a),No(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,te=b.lineDiv,oe=te.firstChild;function ue(Ft){var en=Ft.nextSibling;return Ne&&Oe&&a.display.currentWheelTarget==Ft?Ft.style.display="none":Ft.parentNode.removeChild(Ft),en}for(var ce=b.view,he=b.viewFrom,Te=0;Te<ce.length;Te++){var Fe=ce[Te];if(!Fe.hidden)if(!Fe.node||Fe.node.parentNode!=te){var vt=pr(a,Fe,he,x);te.insertBefore(vt,oe)}else{for(;oe!=Fe.node;)oe=ue(oe);var lt=E&&y!=null&&y<=he&&Fe.lineNumber;Fe.changes&&(ut(Fe.changes,"gutter")>-1&&(lt=!1),lo(a,Fe,he,x)),lt&&(St(Fe.lineNumber),Fe.lineNumber.appendChild(document.createTextNode(De(a.options,he)))),oe=Fe.node.nextSibling}he+=Fe.size}for(;oe;)oe=ue(oe)}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+Pi(a)+"px"}function Bl(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ua(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,te=b+"px",oe=0;oe<x.length;oe++)if(!x[oe].hidden){a.options.fixedGutter&&(x[oe].gutter&&(x[oe].gutter.style.left=te),x[oe].gutterBackground&&(x[oe].gutterBackground.style.left=te));var ue=x[oe].alignable;if(ue)for(var ce=0;ce<ue.length;ce++)ue[ce].style.left=te}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Nl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=De(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(_e("div",[_e("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=E.firstChild.offsetWidth,oe=E.offsetWidth-te;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(te,b.lineGutter.offsetWidth-oe)+1,b.lineNumWidth=b.lineNumInnerWidth+oe,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function rl(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var te=a[E],oe=null;if(typeof te!="string"&&(oe=te.style,te=te.className),te=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:te,style:oe})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rl(a){var y=a.gutters,x=a.gutterSpecs;St(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],te=E.className,oe=E.style,ue=y.appendChild(_e("div",null,"CodeMirror-gutter "+te));oe&&(ue.style.cssText=oe),te=="CodeMirror-linenumbers"&&(a.lineGutter=ue,ue.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function ra(a){Rl(a.display),wi(a),Bl(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=_e("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=_e("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=ft("div",null,"CodeMirror-code"),E.selectionDiv=_e("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=_e("div",null,"CodeMirror-cursors"),E.measure=_e("div",null,"CodeMirror-measure"),E.lineMeasure=_e("div",null,"CodeMirror-measure"),E.lineSpace=ft("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var te=ft("div",[E.lineSpace],"CodeMirror-lines");E.mover=_e("div",[te],null,"position: relative"),E.sizer=_e("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=_e("div",null,null,"position: absolute; height: "+_t+"px; width: 1px;"),E.gutters=_e("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=_e("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=_e("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),be&&Ce<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Ne&&!(re&&Re)&&(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),Rl(E),x.init(E)}var Ta=0,Ni=null;be?Ni=-.53:re?Ni=15:Se?Ni=-.7:Ze&&(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 zl(a,y){var x=Fl(y),b=x.x,E=x.y,te=a.display,oe=te.scroller,ue=oe.scrollWidth>oe.clientWidth,ce=oe.scrollHeight>oe.clientHeight;if(b&&ue||E&&ce){if(E&&Oe&&Ne){e:for(var he=y.target,Te=te.view;he!=oe;he=he.parentNode)for(var Fe=0;Fe<Te.length;Fe++)if(Te[Fe].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!re&&!de&&Ni!=null){E&&ce&&qo(a,Math.max(0,oe.scrollTop+E*Ni)),Eo(a,Math.max(0,oe.scrollLeft+b*Ni)),(!E||E&&ce)&&an(y),te.wheelStartX=null;return}if(E&&Ni!=null){var vt=E*Ni,lt=a.doc.scrollTop,Ft=lt+te.wrapper.clientHeight;vt<0?lt=Math.max(0,lt+vt-50):Ft=Math.min(a.doc.height,Ft+vt+50),el(a,{top:lt,bottom:Ft})}Ta<20&&(te.wheelStartX==null?(te.wheelStartX=oe.scrollLeft,te.wheelStartY=oe.scrollTop,te.wheelDX=b,te.wheelDY=E,setTimeout(function(){if(te.wheelStartX!=null){var en=oe.scrollLeft-te.wheelStartX,mn=oe.scrollTop-te.wheelStartY,kn=mn&&te.wheelDY&&mn/te.wheelDY||en&&te.wheelDX&&en/te.wheelDX;te.wheelStartX=te.wheelStartY=null,kn&&(Ni=(Ni*Ta+kn)/(Ta+1),++Ta)}},200)):(te.wheelDX+=b,te.wheelDY+=E))}}var Ri=function(a,y){this.ranges=a,this.primIndex=y};Ri.prototype.primary=function(){return this.ranges[this.primIndex]},Ri.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(!qe(x.anchor,b.anchor)||!qe(x.head,b.head))return!1}return!0},Ri.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Fr(Bt(this.ranges[y].anchor),Bt(this.ranges[y].head));return new Ri(a,this.primIndex)},Ri.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ri.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(Pe(y,b.from())>=0&&Pe(a,b.to())<=0)return x}return-1};var Fr=function(a,y){this.anchor=a,this.head=y};Fr.prototype.from=function(){return Qt(this.anchor,this.head)},Fr.prototype.to=function(){return Nt(this.anchor,this.head)},Fr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ui(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(vt,lt){return Pe(vt.from(),lt.from())}),x=ut(y,E);for(var te=1;te<y.length;te++){var oe=y[te],ue=y[te-1],ce=Pe(ue.to(),oe.from());if(b&&!oe.empty()?ce>0:ce>=0){var he=Qt(ue.from(),oe.from()),Te=Nt(ue.to(),oe.to()),Fe=ue.empty()?oe.from()==oe.head:ue.from()==ue.head;te<=x&&--x,y.splice(--te,2,new Fr(Fe?Te:he,Fe?he:Te))}}return new Ri(y,x)}function po(a,y){return new Ri([new Fr(a,y||a)],0)}function mo(a){return a.text?ge(a.from.line+a.text.length-1,Ge(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hl(a,y){if(Pe(a,y.from)<0)return a;if(Pe(a,y.to)<=0)return mo(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=mo(y).ch-y.to.ch),ge(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 Fr(Hl(E.anchor,y),Hl(E.head,y)))}return Ui(a.cm,x,a.sel.primIndex)}function Wl(a,y,x){return a.line==y.line?ge(x.line,a.ch-y.ch+x.ch):ge(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=ge(a.first,0),te=E,oe=0;oe<y.length;oe++){var ue=y[oe],ce=Wl(ue.from,E,te),he=Wl(mo(ue),E,te);if(E=ue.to,te=he,x=="around"){var Te=a.sel.ranges[oe],Fe=Pe(Te.head,Te.anchor)<0;b[oe]=new Fr(Fe?he:ce,Fe?ce:he)}else b[oe]=new Fr(ce,ce)}return new Ri(b,a.sel.primIndex)}function ol(a){a.doc.mode=Yn(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&&wi(a)}function jl(a,y){return y.from.ch==0&&y.to.ch==0&&Ge(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function al(a,y,x,b){function E(Rn){return x?x[Rn]:null}function te(Rn,Mn,Wn){Dr(Rn,Mn,Wn,b),Gr(Rn,"change",Rn,y)}function oe(Rn,Mn){for(var Wn=[],sr=Rn;sr<Mn;++sr)Wn.push(new Ir(he[sr],E(sr),b));return Wn}var ue=y.from,ce=y.to,he=y.text,Te=yt(a,ue.line),Fe=yt(a,ce.line),vt=Ge(he),lt=E(he.length-1),Ft=ce.line-ue.line;if(y.full)a.insert(0,oe(0,he.length)),a.remove(he.length,a.size-he.length);else if(jl(a,y)){var en=oe(0,he.length-1);te(Fe,Fe.text,lt),Ft&&a.remove(ue.line,Ft),en.length&&a.insert(ue.line,en)}else if(Te==Fe)if(he.length==1)te(Te,Te.text.slice(0,ue.ch)+vt+Te.text.slice(ce.ch),lt);else{var mn=oe(1,he.length-1);mn.push(new Ir(vt+Te.text.slice(ce.ch),lt,b)),te(Te,Te.text.slice(0,ue.ch)+he[0],E(0)),a.insert(ue.line+1,mn)}else if(he.length==1)te(Te,Te.text.slice(0,ue.ch)+he[0]+Fe.text.slice(ce.ch),E(0)),a.remove(ue.line+1,Ft);else{te(Te,Te.text.slice(0,ue.ch)+he[0],E(0)),te(Fe,vt+Fe.text.slice(ce.ch),lt);var kn=oe(1,he.length-1);Ft>1&&a.remove(ue.line+1,Ft-1),a.insert(ue.line+1,kn)}Gr(a,"change",a,y)}function vo(a,y,x){function b(E,te,oe){if(E.linked)for(var ue=0;ue<E.linked.length;++ue){var ce=E.linked[ue];if(ce.doc!=te){var he=oe&&ce.sharedHist;x&&!he||(y(ce.doc,he),b(ce.doc,E,he))}}}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,Ka(a),ol(a),$l(a),a.options.lineWrapping||br(a),a.options.mode=y.modeOption,wi(a)}function $l(a){(a.doc.direction=="rtl"?pe:We)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Li(a,function(){$l(a),wi(a)})}function La(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:Bt(y.from),to:mo(y),text:Ht(a,y.from,y.to)};return Vl(a,x,y.from.line,y.to.line+1),vo(a,function(b){return Vl(b,x,y.from.line,y.to.line+1)},!0),x}function _l(a){for(;a.length;){var y=Ge(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return _l(a.done),Ge(a.done);if(a.done.length&&!Ge(a.done).ranges)return Ge(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),Ge(a.done)}function Gl(a,y,x,b){var E=a.history;E.undone.length=0;var te=+new Date,oe,ue;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>te-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(oe=lu(E,E.lastOp==b)))ue=Ge(oe.changes),Pe(y.from,y.to)==0&&Pe(y.from,ue.to)==0?ue.to=mo(y):oe.changes.push(ll(a,y));else{var ce=Ge(E.done);for((!ce||!ce.ranges)&&Oa(a.sel,E.done),oe={changes:[ll(a,y)],generation:E.generation},E.done.push(oe);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=te,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ue||on(a,"historyAdded")}function su(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,te=b&&b.origin;x==E.lastSelOp||te&&E.lastSelOrigin==te&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==te||su(a,te,Ge(E.done),y))?E.done[E.done.length-1]=y:Oa(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=te,E.lastSelOp=x,b&&b.clearRedo!==!1&&_l(E.undone)}function Oa(a,y){var x=Ge(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Vl(a,y,x,b){var E=y["spans_"+a.id],te=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(oe){oe.markedSpans&&((E||(E=y["spans_"+a.id]={}))[te]=oe.markedSpans),++te})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function du(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Ul(a,y){var x=du(a,y),b=wr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var te=x[E],oe=b[E];if(te&&oe)e:for(var ue=0;ue<oe.length;++ue){for(var ce=oe[ue],he=0;he<te.length;++he)if(te[he].marker==ce.marker)continue e;te.push(ce)}else oe&&(x[E]=oe)}return x}function Ro(a,y,x){for(var b=[],E=0;E<a.length;++E){var te=a[E];if(te.ranges){b.push(x?Ri.prototype.deepCopy.call(te):te);continue}var oe=te.changes,ue=[];b.push({changes:ue});for(var ce=0;ce<oe.length;++ce){var he=oe[ce],Te=void 0;if(ue.push({from:he.from,to:he.to,text:he.text}),y)for(var Fe in he)(Te=Fe.match(/^spans_(\d+)$/))&&ut(y,Number(Te[1]))>-1&&(Ge(ue)[Fe]=he[Fe],delete he[Fe])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var te=Pe(y,E)<0;te!=Pe(x,E)<0?(E=y,y=x):te!=Pe(y,x)<0&&(y=x)}return new Fr(E,y)}else return new Fr(x||y,y)}function Aa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),hi(a,new Ri([sl(a.sel.primary(),y,x,E)],0),b)}function Kl(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),te=0;te<a.sel.ranges.length;te++)b[te]=sl(a.sel.ranges[te],y[te],null,E);var oe=Ui(a.cm,b,a.sel.primIndex);hi(a,oe,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,hi(a,Ui(a.cm,E,a.sel.primIndex),b)}function Yl(a,y,x,b){hi(a,po(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var te=0;te<E.length;te++)this.ranges[te]=new Fr(ct(a,E[te].anchor),ct(a,E[te].head))},origin:x&&x.origin};return on(a,"beforeSelectionChange",a,b),a.cm&&on(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ui(a.cm,b.ranges,b.ranges.length-1):y}function Xl(a,y,x){var b=a.history.done,E=Ge(b);E&&E.ranges?(b[b.length-1]=y,Ba(a,y,x)):hi(a,y,x)}function hi(a,y,x){Ba(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ba(a,y,x){(Rt(a,"beforeSelectionChange")||a.cm&&Rt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(Pe(y.primary().head,a.sel.primary().head)<0?-1:1);Jl(a,ql(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Bo(a.cm)}function Jl(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,dn(a.cm)),Gr(a,"cursorActivity",a))}function Ql(a){Jl(a,ql(a,a.sel,null,!1))}function ql(a,y,x,b){for(var E,te=0;te<y.ranges.length;te++){var oe=y.ranges[te],ue=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[te],ce=Na(a,oe.anchor,ue&&ue.anchor,x,b),he=Na(a,oe.head,ue&&ue.head,x,b);(E||ce!=oe.anchor||he!=oe.head)&&(E||(E=y.ranges.slice(0,te)),E[te]=new Fr(ce,he))}return E?Ui(a.cm,E,y.primIndex):y}function Fo(a,y,x,b,E){var te=yt(a,y.line);if(te.markedSpans)for(var oe=0;oe<te.markedSpans.length;++oe){var ue=te.markedSpans[oe],ce=ue.marker,he="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Te="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((ue.from==null||(he?ue.from<=y.ch:ue.from<y.ch))&&(ue.to==null||(Te?ue.to>=y.ch:ue.to>y.ch))){if(E&&(on(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(te.markedSpans){--oe;continue}else break;if(!ce.atomic)continue;if(x){var Fe=ce.find(b<0?1:-1),vt=void 0;if((b<0?Te:he)&&(Fe=es(a,Fe,-b,Fe&&Fe.line==y.line?te:null)),Fe&&Fe.line==y.line&&(vt=Pe(Fe,x))&&(b<0?vt<0:vt>0))return Fo(a,Fe,y,b,E)}var lt=ce.find(b<0?-1:1);return(b<0?he:Te)&&(lt=es(a,lt,b,lt.line==y.line?te:null)),lt?Fo(a,lt,y,b,E):null}}return y}function Na(a,y,x,b,E){var te=b||1,oe=Fo(a,y,x,te,E)||!E&&Fo(a,y,x,te,!0)||Fo(a,y,x,-te,E)||!E&&Fo(a,y,x,-te,!0);return oe||(a.cantEdit=!0,ge(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?ct(a,ge(y.line-1)):null:x>0&&y.ch==(b||yt(a,y.line)).text.length?y.line<a.first+a.size-1?ge(y.line+1,0):null:new ge(y.line,y.ch+x)}function ts(a){a.setSelection(ge(a.firstLine(),0),ge(a.lastLine()),Ae)}function ns(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,te,oe,ue){E&&(b.from=ct(a,E)),te&&(b.to=ct(a,te)),oe&&(b.text=oe),ue!==void 0&&(b.origin=ue)}),on(a,"beforeChange",a,b),a.cm&&on(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 zo(a,y,x){if(a.cm){if(!a.cm.curOp)return oi(a.cm,zo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Rt(a,"beforeChange")||a.cm&&Rt(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=er&&!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]==""&&Pe(y.from,y.to)==0)){var x=il(a,y);Gl(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,wr(a,y));var b=[];vo(a,function(E,te){!te&&ut(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),oa(E,y,null,wr(E,y))})}}function Ra(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,te,oe=a.sel,ue=y=="undo"?E.done:E.undone,ce=y=="undo"?E.undone:E.done,he=0;he<ue.length&&(te=ue[he],!(x?te.ranges&&!te.equals(a.sel):!te.ranges));he++);if(he!=ue.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(te=ue.pop(),te.ranges){if(Oa(te,ce),x&&!te.equals(a.sel)){hi(a,te,{clearRedo:!1});return}oe=te}else if(b){ue.push(te);return}else break;var Te=[];Oa(oe,ce),ce.push({changes:Te,generation:E.generation}),E.generation=te.generation||++E.maxGeneration;for(var Fe=Rt(a,"beforeChange")||a.cm&&Rt(a.cm,"beforeChange"),vt=function(en){var mn=te.changes[en];if(mn.origin=y,Fe&&!ns(a,mn,!1))return ue.length=0,{};Te.push(ll(a,mn));var kn=en?il(a,mn):Ge(ue);oa(a,mn,kn,Ul(a,mn)),!en&&a.cm&&a.cm.scrollIntoView({from:mn.from,to:mo(mn)});var Rn=[];vo(a,function(Mn,Wn){!Wn&&ut(Rn,Mn.history)==-1&&(ls(Mn.history,mn),Rn.push(Mn.history)),oa(Mn,mn,null,Ul(Mn,mn))})},lt=te.changes.length-1;lt>=0;--lt){var Ft=vt(lt);if(Ft)return Ft.v}}}}function is(a,y){if(y!=0&&(a.first+=y,a.sel=new Ri(Pt(a.sel.ranges,function(E){return new Fr(ge(E.anchor.line+y,E.anchor.ch),ge(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){wi(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)fo(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return oi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){is(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);is(a,E),y={from:ge(a.first,0),to:ge(y.to.line+E,y.to.ch),text:[Ge(y.text)],origin:y.origin}}var te=a.lastLine();y.to.line>te&&(y={from:y.from,to:ge(te,yt(a,te).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Ht(a,y.from,y.to),x||(x=il(a,y)),a.cm?hu(a.cm,y,b):al(a,y,b),Ba(a,x,Ae),a.cantEdit&&Na(a,ge(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,te=y.from,oe=y.to,ue=!1,ce=te.line;a.options.lineWrapping||(ce=Ee(Ot(yt(b,te.line))),b.iter(ce,oe.line+1,function(lt){if(lt==E.maxLine)return ue=!0,!0})),b.sel.contains(y.from,y.to)>-1&&dn(a),al(b,y,x,Cl(a)),a.options.lineWrapping||(b.iter(ce,te.line+y.text.length,function(lt){var Ft=Mr(lt);Ft>E.maxLineLength&&(E.maxLine=lt,E.maxLineLength=Ft,E.maxLineChanged=!0,ue=!1)}),ue&&(a.curOp.updateMaxLine=!0)),ir(b,te.line),na(a,400);var he=y.text.length-(oe.line-te.line)-1;y.full?wi(a):te.line==oe.line&&y.text.length==1&&!jl(a.doc,y)?fo(a,te.line,"text"):wi(a,te.line,oe.line+1,he);var Te=Rt(a,"changes"),Fe=Rt(a,"change");if(Fe||Te){var vt={from:te,to:oe,text:y.text,removed:y.removed,origin:y.origin};Fe&&Gr(a,"change",a,vt),Te&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(vt)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var te;b||(b=x),Pe(b,x)<0&&(te=[b,x],x=te[0],b=te[1]),typeof y=="string"&&(y=a.splitLines(y)),zo(a,{from:x,to:b,text:y,origin:E})}function os(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function as(a,y,x,b){for(var E=0;E<a.length;++E){var te=a[E],oe=!0;if(te.ranges){te.copied||(te=a[E]=te.deepCopy(),te.copied=!0);for(var ue=0;ue<te.ranges.length;ue++)os(te.ranges[ue].anchor,y,x,b),os(te.ranges[ue].head,y,x,b);continue}for(var ce=0;ce<te.changes.length;++ce){var he=te.changes[ce];if(x<he.from.line)he.from=ge(he.from.line+b,he.from.ch),he.to=ge(he.to.line+b,he.to.ch);else if(y<=he.to.line){oe=!1;break}}oe||(a.splice(0,E+1),E=0)}}function ls(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;as(a.done,x,b,E),as(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,te=y;return typeof y=="number"?te=yt(a,Mt(a,y)):E=Ee(y),E==null?null:(b(te,E)&&a.cm&&fo(a.cm,E,x),te)}function la(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}la.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Lr(E),Gr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function sa(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}sa.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var te=Math.min(y,E-a),oe=b.height;if(b.removeInner(a,te),this.height-=oe-b.height,E==te&&(this.children.splice(x--,1),b.parent=null),(y-=te)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof la))){var ue=[];this.collapse(ue),this.children=[new la(ue)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],te=E.chunkSize();if(a<=te){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var oe=E.lines.length%25+25,ue=oe;ue<E.lines.length;){var ce=new la(E.lines.slice(ue,ue+=25));E.height-=ce.height,this.children.splice(++b,0,ce),ce.parent=this}E.lines=E.lines.slice(0,oe),this.maybeSpill()}break}a-=te}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new sa(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=ut(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new sa(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],te=E.chunkSize();if(a<te){var oe=Math.min(y,te-a);if(E.iterN(a,oe,x))return!0;if((y-=oe)==0)break;a=0}else a-=te}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Ee(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var te=gi(this);Un(x,Math.max(0,x.height-te)),a&&(Li(a,function(){ss(a,x,-te),fo(a,b,"widget")}),Gr(a,"lineWidgetCleared",a,this,b))}},ua.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=gi(this)-y;E&&(xn(this.doc,b)||Un(b,b.height+E),x&&Li(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Gr(x,"lineWidgetChanged",x,a,Ee(b))}))},Yt(ua);function ss(a,y,x){rr(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),te=a.cm;return te&&E.noHScroll&&(te.display.alignWidgets=!0),aa(a,y,"widget",function(oe){var ue=oe.widgets||(oe.widgets=[]);if(E.insertAt==null?ue.push(E):ue.splice(Math.min(ue.length-1,Math.max(0,E.insertAt)),0,E),E.line=oe,te&&!xn(a,oe)){var ce=rr(oe)<a.scrollTop;Un(oe,oe.height+gi(E)),ce&&Qa(te,E.height),te.curOp.forceUpdate=!0}return!0}),te&&Gr(te,"lineWidgetAdded",te,E,typeof y=="number"?y:Ee(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&&Mo(a),Rt(this,"clear")){var x=this.find();x&&Gr(this,"clear",x.from,x.to)}for(var b=null,E=null,te=0;te<this.lines.length;++te){var oe=this.lines[te],ue=vr(oe.markedSpans,this);a&&!this.collapsed?fo(a,Ee(oe),"text"):a&&(ue.to!=null&&(E=Ee(oe)),ue.from!=null&&(b=Ee(oe))),oe.markedSpans=Cr(oe.markedSpans,ue),ue.from==null&&this.collapsed&&!xn(this.doc,oe)&&a&&Un(oe,Ti(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var he=Ot(this.lines[ce]),Te=Mr(he);Te>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=Te,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&wi(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&&Gr(a,"markerCleared",a,this,b,E),y&&Do(a),this.parent&&this.parent.clear()}},go.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var te=this.lines[E],oe=vr(te.markedSpans,this);if(oe.from!=null&&(x=ge(y?te:Ee(te),oe.from),a==-1))return x;if(oe.to!=null&&(b=ge(y?te:Ee(te),oe.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||Li(b,function(){var E=y.line,te=Ee(y.line),oe=qi(b,te);if(oe&&(Uo(oe),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!xn(x.doc,E)&&x.height!=null){var ue=x.height;x.height=null;var ce=gi(x)-ue;ce&&Un(E,E.height+ce)}Gr(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||ut(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(ut(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Yt(go);function Wo(a,y,x,b,E){if(b&&b.shared)return mu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return oi(a.cm,Wo)(a,y,x,b,E);var te=new go(a,E),oe=Pe(y,x);if(b&&At(b,te,!1),oe>0||oe==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=ft("span",[te.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(Xt(a,y.line,y,x,te)||y.line!=x.line&&Xt(a,x.line,y,x,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");mr()}te.addToHistory&&Gl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ue=y.line,ce=a.cm,he;if(a.iter(ue,x.line+1,function(Fe){ce&&te.collapsed&&!ce.options.lineWrapping&&Ot(Fe)==ce.display.maxLine&&(he=!0),te.collapsed&&ue!=y.line&&Un(Fe,0),or(Fe,new cr(te,ue==y.line?y.ch:null,ue==x.line?x.ch:null)),++ue}),te.collapsed&&a.iter(y.line,x.line+1,function(Fe){xn(a,Fe)&&Un(Fe,0)}),te.clearOnEnter&&Lt(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(gr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),te.collapsed&&(te.id=++us,te.atomic=!0),ce){if(he&&(ce.curOp.updateMaxLine=!0),te.collapsed)wi(ce,y.line,x.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var Te=y.line;Te<=x.line;Te++)fo(ce,Te,"text");te.atomic&&Ql(ce.doc),Gr(ce,"markerAdded",ce,te)}return te}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Gr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Yt(ca);function mu(a,y,x,b,E){b=At(b),b.shared=!1;var te=[Wo(a,y,x,b,E)],oe=te[0],ue=b.widgetNode;return vo(a,function(ce){ue&&(b.widgetNode=ue.cloneNode(!0)),te.push(Wo(ce,ct(ce,y),ct(ce,x),b,E));for(var he=0;he<ce.linked.length;++he)if(ce.linked[he].isParent)return;oe=Ge(te)}),new ca(te,oe)}function cs(a){return a.findMarks(ge(a.first,0),a.clipPos(ge(a.lastLine())),function(y){return y.parent})}function vu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),te=a.clipPos(E.from),oe=a.clipPos(E.to);if(Pe(te,oe)){var ue=Wo(a,te,oe,b.primary,b.primary.type);b.markers.push(ue),ue.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],te=[E.primary.doc];vo(E.primary.doc,function(ce){return te.push(ce)});for(var oe=0;oe<E.markers.length;oe++){var ue=E.markers[oe];ut(te,ue.doc)==-1&&(ue.parent=null,E.markers.splice(oe--,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 Ir("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var te=ge(x,0);this.sel=po(te),this.history=new La(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),al(this,{from:te,to:te,text:a}),hi(this,po(te),Ae)};Si.prototype=ee(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=In(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=ge(this.first,0),x=this.first+this.size-1;zo(this,{from:y,to:ge(x,yt(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qo(this.cm,0,0),hi(this,po(y),Ae)}),replaceRange:function(a,y,x,b){y=ct(this,y),x=x?ct(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Ht(this,ct(this,a),ct(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(ve(this,a))return yt(this,a)},getLineNumber:function(a){return Ee(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=yt(this,a)),Ot(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return ct(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){Yl(this,ct(this,typeof a=="number"?ge(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Yl(this,ct(this,a),ct(this,y||a),x)}),extendSelection:ai(function(a,y,x){Aa(this,ct(this,a),y&&ct(this,y),x)}),extendSelections:ai(function(a,y){Kl(this,jt(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=Pt(this.sel.ranges,a);Kl(this,jt(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Fr(ct(this,a[E].anchor),ct(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),hi(this,Ui(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Fr(ct(this,a),ct(this,y||a))),hi(this,Ui(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=Ht(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=Ht(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:ai(function(a,y,x){for(var b=[],E=this.sel,te=0;te<E.ranges.length;te++){var oe=E.ranges[te];b[te]={from:oe.from(),to:oe.to(),text:this.splitLines(a[te]),origin:x}}for(var ue=y&&y!="end"&&ou(this,b,y),ce=b.length-1;ce>=0;ce--)zo(this,b[ce]);ue?Xl(this,ue):this.cm&&Bo(this.cm)}),undo:ai(function(){Ra(this,"undo")}),redo:ai(function(){Ra(this,"redo")}),undoSelection:ai(function(){Ra(this,"undo",!0)}),redoSelection:ai(function(){Ra(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 La(this.history.maxGeneration),vo(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:Ro(this.history.done),undone:Ro(this.history.undone)}},setHistory:function(a){var y=this.history=new La(this.history.maxGeneration);y.done=Ro(a.done.slice(0),null,!0),y.undone=Ro(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(!ve(this,a)||(y=a,a=yt(this,a),!a))return null}else if(y=Ee(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass: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(st(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ai(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",te=b[E];if(te)if(x==null)b[E]=null;else{var oe=te.match(st(x));if(!oe)return!1;var ue=oe.index+oe[0].length;b[E]=te.slice(0,oe.index)+(!oe.index||ue==te.length?"":" ")+te.slice(ue)||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 Wo(this,ct(this,a),ct(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=ct(this,a),Wo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=ct(this,a);var y=[],x=yt(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=ct(this,a),y=ct(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(te){var oe=te.markedSpans;if(oe)for(var ue=0;ue<oe.length;ue++){var ce=oe[ue];!(ce.to!=null&&E==a.line&&a.ch>=ce.to||ce.from==null&&E!=a.line||ce.from!=null&&E==y.line&&ce.from>=y.ch)&&(!x||x(ce.marker))&&b.push(ce.marker.parent||ce.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var te=E.text.length+b;if(te>a)return y=a,!0;a-=te,++x}),ct(this,ge(x,y))},indexFromPos:function(a){a=ct(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(In(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(In(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}],vu(b,cs(this)),b},unlinkDoc:function(a){if(a instanceof Vr&&(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];vo(a,function(E){return b.push(E.id)},!0),a.history=new La(null),a.history.done=Ro(this.history.done,b),a.history.undone=Ro(this.history.undone,b)}},iterLinkedDocs:function(a){vo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):pn(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(fs(y),!(pt(y,a)||ui(y.display,a))){an(a),be&&(ds=+new Date);var x=wo(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,te=Array(E),oe=0,ue=function(){++oe==E&&oi(y,function(){x=ct(y.doc,x);var lt={from:x,to:x,text:y.doc.splitLines(te.filter(function(Ft){return Ft!=null}).join(y.doc.lineSeparator())),origin:"paste"};zo(y.doc,lt),Xl(y.doc,po(ct(y.doc,x),ct(y.doc,mo(lt))))})()},ce=function(lt,Ft){if(y.options.allowDropFileTypes&&ut(y.options.allowDropFileTypes,lt.type)==-1){ue();return}var en=new FileReader;en.onerror=function(){return ue()},en.onload=function(){var mn=en.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(mn)){ue();return}te[Ft]=mn,ue()},en.readAsText(lt)},he=0;he<b.length;he++)ce(b[he],he);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 Te=a.dataTransfer.getData("Text");if(Te){var Fe;if(y.state.draggingText&&!y.state.draggingText.copy&&(Fe=y.listSelections()),Ba(y.doc,po(x,x)),Fe)for(var vt=0;vt<Fe.length;++vt)Ho(y.doc,"",Fe[vt].anchor,Fe[vt].head,"drag");y.replaceSelection(Te,"around","paste"),y.display.input.focus()}}catch(lt){}}}}function xu(a,y){if(be&&(!a.state.draggingText||+new Date-ds<100)){ke(y);return}if(!(pt(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Ze)){var x=_e("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",de&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),de&&x.parentNode.removeChild(x)}}function Cu(a,y){var x=wo(a,y);if(x){var b=document.createDocumentFragment();El(a,x,b),a.display.dragCursor||(a.display.dragCursor=_e("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Xe(a.display.dragCursor,b)}}function fs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var te=0;te<x.length;te++)a(x[te])})}}var ps=!1;function wu(){ps||(Su(),ps=!0)}function Su(){var a;Lt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hs(Eu)},100))}),Lt(window,"blur",function(){return hs(Ao)})}function Eu(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 fa=1;fa<=12;fa++)yo[fa+111]=yo[fa+63235]="F"+fa;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=Oe?io.macDefault:io.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,te,oe=0;oe<y.length-1;oe++){var ue=y[oe];if(/^(cmd|meta|m)$/i.test(ue))te=!0;else if(/^a(lt)?$/i.test(ue))x=!0;else if(/^(c|ctrl|control)$/i.test(ue))b=!0;else if(/^s(hift)?$/i.test(ue))E=!0;else throw new Error("Unrecognized modifier name: "+ue)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),te&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Mu(a){var y={};for(var x in a)if(a.hasOwnProperty(x)){var b=a[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete a[x];continue}for(var E=Pt(x.split(" "),ku),te=0;te<E.length;te++){var oe=void 0,ue=void 0;te==E.length-1?(ue=E.join(" "),oe=b):(ue=E.slice(0,te+1).join(" "),oe="...");var ce=y[ue];if(!ce)y[ue]=oe;else if(ce!=oe)throw new Error("Inconsistent bindings for "+ue)}delete a[x]}for(var he in y)a[he]=y[he];return a}function jo(a,y,x,b){y=za(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 jo(a,y.fallthrough,x,b);for(var te=0;te<y.fallthrough.length;te++){var oe=jo(a,y.fallthrough[te],x,b);if(oe)return oe}}}function ms(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function vs(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(at?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(at?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(de&&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),vs(x,a,y))}function za(a){return typeof a=="string"?io[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var te=y(x[E]);b.length&&Pe(te.from,Ge(b).to)<=0;){var oe=b.pop();if(Pe(oe.from,te.from)<0){te.from=oe.from;break}}b.push(te)}Li(a,function(){for(var ue=b.length-1;ue>=0;ue--)Ho(a.doc,"",b[ue].from,b[ue].to,"+delete");Bo(a)})}function cl(a,y,x){var b=It(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 ge(y.line,b,x<0?"after":"before")}function fl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var te=Gt(x,y.doc.direction);if(te){var oe=E<0?Ge(te):te[0],ue=E<0==(oe.level==1),ce=ue?"after":"before",he;if(oe.level>0||y.doc.direction=="rtl"){var Te=uo(y,x);he=E<0?x.text.length-1:0;var Fe=Wi(y,Te,he).top;he=je(function(vt){return Wi(y,Te,vt).top==Fe},E<0==(oe.level==1)?oe.from:oe.to-1,he),ce=="before"&&(he=cl(x,he,1))}else he=E<0?oe.to:oe.from;return new ge(b,he,ce)}}return new ge(b,E<0?x.text.length:0,E<0?"before":"after")}function Du(a,y,x,b){var E=Gt(y,a.doc.direction);if(!E)return dl(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var te=Dt(E,x.ch,x.sticky),oe=E[te];if(a.doc.direction=="ltr"&&oe.level%2==0&&(b>0?oe.to>x.ch:oe.from<x.ch))return dl(y,x,b);var ue=function(kn,Rn){return cl(y,kn instanceof ge?kn.ch:kn,Rn)},ce,he=function(kn){return a.options.lineWrapping?(ce=ce||uo(a,y),Xr(a,y,ce,kn)):{begin:0,end:y.text.length}},Te=he(x.sticky=="before"?ue(x,-1):x.ch);if(a.doc.direction=="rtl"||oe.level==1){var Fe=oe.level==1==b<0,vt=ue(x,Fe?1:-1);if(vt!=null&&(Fe?vt<=oe.to&&vt<=Te.end:vt>=oe.from&&vt>=Te.begin)){var lt=Fe?"before":"after";return new ge(x.line,vt,lt)}}var Ft=function(kn,Rn,Mn){for(var Wn=function($r,li){return li?new ge(x.line,ue($r,1),"before"):new ge(x.line,$r,"after")};kn>=0&&kn<E.length;kn+=Rn){var sr=E[kn],nr=Rn>0==(sr.level!=1),Sr=nr?Mn.begin:ue(Mn.end,-1);if(sr.from<=Sr&&Sr<sr.to||(Sr=nr?sr.from:ue(sr.to,-1),Mn.begin<=Sr&&Sr<Mn.end))return Wn(Sr,nr)}},en=Ft(te+b,b,Te);if(en)return en;var mn=b>0?Te.end:ue(Te.begin,-1);return mn!=null&&!(b>0&&mn==y.text.length)&&(en=Ft(b>0?0:E.length-1,b,he(mn)),en)?en:null}var ha={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Ae)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=yt(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:ge(y.head.line+1,0)}:{from:y.head,to:ge(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:ge(y.from().line,0),to:ct(a.doc,ge(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:ge(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(ge(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(ge(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 Pu(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")},dt)},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")},dt)},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},dt)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var te=x[E].from(),oe=ye(a.getLine(te.line),te.ch,b);y.push(Ut(b-oe%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Li(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,te=yt(a.doc,E.line).text;if(te){if(E.ch==te.length&&(E=new ge(E.line,E.ch-1)),E.ch>0)E=new ge(E.line,E.ch+1),a.replaceRange(te.charAt(E.ch-1)+te.charAt(E.ch-2),ge(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var oe=yt(a.doc,E.line-1).text;oe&&(E=new ge(E.line,1),a.replaceRange(te.charAt(0)+a.doc.lineSeparator()+oe.charAt(oe.length-1),ge(E.line-1,oe.length-1),E,"+transpose"))}}x.push(new Fr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Li(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);Bo(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=yt(a.doc,y),b=Ot(x);return b!=x&&(y=Ee(b)),fl(!0,a,b,y,1)}function Pu(a,y){var x=yt(a.doc,y),b=En(x);return b!=x&&(y=Ee(b)),fl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=yt(a.doc,x.line),E=Gt(b,a.doc.direction);if(!E||E[0].level==0){var te=Math.max(x.ch,b.text.search(/\S/)),oe=y.line==x.line&&y.ch<=te&&y.ch;return ge(x.line,oe?0:te,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=ha[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=bt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Iu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=jo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&jo(y,a.options.extraKeys,x,a)||jo(y,a.options.keyMap,x,a)}var Tu=new fe;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(ms(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Tu.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=Iu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Gr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(an(x),Ya(a)),!!E}function Cs(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 Lu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var hl=null;function ws(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=et(),!pt(y,a))){be&&Ce<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=Cs(y,a);de&&(hl=b?x:null,!b&&x==88&&!vn&&(Oe?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),re&&!Oe&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Ou(y)}}function Ou(a){var y=a.display.lineDiv;pe(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(We(y,"CodeMirror-crosshair"),Jt(document,"keyup",x),Jt(document,"mouseover",x))}Lt(document,"keyup",x),Lt(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),pt(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||pt(y,a)||a.ctrlKey&&!a.altKey||Oe&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(de&&x==hl){hl=null,an(a);return}if(!(de&&(!a.which||a.which<10)&&Cs(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Lu(y,a,E)||y.display.input.onKeyPress(a))}}}var Au=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+Au>a&&Pe(y,this.pos)==0&&x==this.button};var ma,va;function Bu(a,y){var x=+new Date;return va&&va.compare(x,a,y)?(ma=va=null,"triple"):ma&&ma.compare(x,a,y)?(va=new pl(x,a,y),ma=null,"double"):(ma=new pl(x,a,y),va=null,"single")}function ks(a){var y=this,x=y.display;if(!(pt(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Ne||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!ml(y,a)){var b=wo(y,a),E=mt(a),te=b?Bu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,te,a))&&(E==1?b?Fu(y,b,te,a):Ue(a)==x.scroller&&an(a):E==2?(b&&Aa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Ye?y.display.input.onContextMenu(a):Ml(y)))}}}function Nu(a,y,x,b,E){var te="Click";return b=="double"?te="Double"+te:b=="triple"&&(te="Triple"+te),te=(y==1?"Left":y==2?"Middle":"Right")+te,pa(a,vs(te,E),E,function(oe){if(typeof oe=="string"&&(oe=ha[oe]),!oe)return!1;var ue=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ue=oe(a,x)!=bt}finally{a.state.suppressEdits=!1}return ue})}function Ru(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var te=rt?x.shiftKey&&x.metaKey:x.altKey;E.unit=te?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=Oe?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Oe?x.altKey:x.ctrlKey)),E}function Fu(a,y,x,b){be?setTimeout(wt(kl,a),0):a.curOp.focus=et();var E=Ru(a,x,b),te=a.doc.sel,oe;a.options.dragDrop&&zt&&!a.isReadOnly()&&x=="single"&&(oe=te.contains(y))>-1&&(Pe((oe=te.ranges[oe]).from(),y)<0||y.xRel>0)&&(Pe(oe.to(),y)>0||y.xRel<0)?zu(a,b,y,E):Hu(a,b,y,E)}function zu(a,y,x,b){var E=a.display,te=!1,oe=oi(a,function(he){Ne&&(E.scroller.draggable=!1),a.state.draggingText=!1,Jt(E.wrapper.ownerDocument,"mouseup",oe),Jt(E.wrapper.ownerDocument,"mousemove",ue),Jt(E.scroller,"dragstart",ce),Jt(E.scroller,"drop",oe),te||(an(he),b.addNew||Aa(a.doc,x,null,null,b.extend),Ne&&!Ze||be&&Ce==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ue=function(he){te=te||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},ce=function(){return te=!0};Ne&&(E.scroller.draggable=!0),a.state.draggingText=oe,oe.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Lt(E.wrapper.ownerDocument,"mouseup",oe),Lt(E.wrapper.ownerDocument,"mousemove",ue),Lt(E.scroller,"dragstart",ce),Lt(E.scroller,"drop",oe),Ml(a),setTimeout(function(){return E.input.focus()},20)}function Ms(a,y,x){if(x=="char")return new Fr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Fr(ge(y.line,0),ct(a.doc,ge(y.line+1,0)));var b=x(a,y);return new Fr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,te=a.doc;an(y);var oe,ue,ce=te.sel,he=ce.ranges;if(b.addNew&&!b.extend?(ue=te.sel.contains(x),ue>-1?oe=he[ue]:oe=new Fr(x,x)):(oe=te.sel.primary(),ue=te.sel.primIndex),b.unit=="rectangle")b.addNew||(oe=new Fr(x,x)),x=wo(a,y,!0,!0),ue=-1;else{var Te=Ms(a,x,b.unit);b.extend?oe=sl(oe,Te.anchor,Te.head,b.extend):oe=Te}b.addNew?ue==-1?(ue=he.length,hi(te,Ui(a,he.concat([oe]),ue),{scroll:!1,origin:"*mouse"})):he.length>1&&he[ue].empty()&&b.unit=="char"&&!b.extend?(hi(te,Ui(a,he.slice(0,ue).concat(he.slice(ue+1)),0),{scroll:!1,origin:"*mouse"}),ce=te.sel):ul(te,ue,oe,nt):(ue=0,hi(te,new Ri([oe],0),nt),ce=te.sel);var Fe=x;function vt(Mn){if(Pe(Fe,Mn)!=0)if(Fe=Mn,b.unit=="rectangle"){for(var Wn=[],sr=a.options.tabSize,nr=ye(yt(te,x.line).text,x.ch,sr),Sr=ye(yt(te,Mn.line).text,Mn.ch,sr),$r=Math.min(nr,Sr),li=Math.max(nr,Sr),Ur=Math.min(x.line,Mn.line),Oi=Math.min(a.lastLine(),Math.max(x.line,Mn.line));Ur<=Oi;Ur++){var Ei=yt(te,Ur).text,qr=rn(Ei,$r,sr);$r==li?Wn.push(new Fr(ge(Ur,qr),ge(Ur,qr))):Ei.length>qr&&Wn.push(new Fr(ge(Ur,qr),ge(Ur,rn(Ei,li,sr))))}Wn.length||Wn.push(new Fr(x,x)),hi(te,Ui(a,ce.ranges.slice(0,ue).concat(Wn),ue),{origin:"*mouse",scroll:!1}),a.scrollIntoView(Mn)}else{var ki=oe,di=Ms(a,Mn,b.unit),ii=ki.anchor,ei;Pe(di.anchor,ii)>0?(ei=di.head,ii=Qt(ki.from(),di.anchor)):(ei=di.anchor,ii=Nt(ki.to(),di.head));var Kr=ce.ranges.slice(0);Kr[ue]=Wu(a,new Fr(ct(te,ii),ei)),hi(te,Ui(a,Kr,ue),nt)}}var lt=E.wrapper.getBoundingClientRect(),Ft=0;function en(Mn){var Wn=++Ft,sr=wo(a,Mn,!0,b.unit=="rectangle");if(sr)if(Pe(sr,Fe)!=0){a.curOp.focus=et(),vt(sr);var nr=Da(E,te);(sr.line>=nr.to||sr.line<nr.from)&&setTimeout(oi(a,function(){Ft==Wn&&en(Mn)}),150)}else{var Sr=Mn.clientY<lt.top?-20:Mn.clientY>lt.bottom?20:0;Sr&&setTimeout(oi(a,function(){Ft==Wn&&(E.scroller.scrollTop+=Sr,en(Mn))}),50)}}function mn(Mn){a.state.selectingText=!1,Ft=1/0,Mn&&(an(Mn),E.input.focus()),Jt(E.wrapper.ownerDocument,"mousemove",kn),Jt(E.wrapper.ownerDocument,"mouseup",Rn),te.history.lastSelOrigin=null}var kn=oi(a,function(Mn){Mn.buttons===0||!mt(Mn)?mn(Mn):en(Mn)}),Rn=oi(a,mn);a.state.selectingText=Rn,Lt(E.wrapper.ownerDocument,"mousemove",kn),Lt(E.wrapper.ownerDocument,"mouseup",Rn)}function Wu(a,y){var x=y.anchor,b=y.head,E=yt(a.doc,x.line);if(Pe(x,b)==0&&x.sticky==b.sticky)return y;var te=Gt(E);if(!te)return y;var oe=Dt(te,x.ch,x.sticky),ue=te[oe];if(ue.from!=x.ch&&ue.to!=x.ch)return y;var ce=oe+(ue.from==x.ch==(ue.level!=1)?0:1);if(ce==0||ce==te.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Te=Dt(te,b.ch,b.sticky),Fe=Te-oe||(b.ch-x.ch)*(ue.level==1?-1:1);Te==ce-1||Te==ce?he=Fe<0:he=Fe>0}var vt=te[ce+(he?-1:0)],lt=he==(vt.level==1),Ft=lt?vt.from:vt.to,en=lt?"after":"before";return x.ch==Ft&&x.sticky==en?y:new Fr(new ge(x.line,Ft,en),b)}function Ds(a,y,x,b){var E,te;if(y.touches)E=y.touches[0].clientX,te=y.touches[0].clientY;else try{E=y.clientX,te=y.clientY}catch(vt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&an(y);var oe=a.display,ue=oe.lineDiv.getBoundingClientRect();if(te>ue.bottom||!Rt(a,x))return bn(y);te-=ue.top-oe.viewOffset;for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var he=oe.gutters.childNodes[ce];if(he&&he.getBoundingClientRect().right>=E){var Te=He(a.doc,te),Fe=a.display.gutterSpecs[ce];return on(a,x,a,Te,Fe.className,y),bn(y)}}}function ml(a,y){return Ds(a,y,"gutterClick",!0)}function Ps(a,y){ui(a.display,y)||ju(a,y)||pt(a,y,"contextmenu")||Ye||a.display.input.onContextMenu(y)}function ju(a,y){return Rt(a,"gutterContextMenu")?Ds(a,y,"gutterContextMenu",!1):!1}function Is(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Co(a)}var $o={toString:function(){return"CodeMirror.Init"}},Ts={},Wa={};function Zu(a){var y=a.optionHandlers;function x(b,E,te,oe){a.defaults[b]=E,te&&(y[b]=oe?function(ue,ce,he){he!=$o&&te(ue,ce,he)}:te)}a.defineOption=x,a.Init=$o,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),Co(b),wi(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var te=[],oe=b.doc.first;b.doc.iter(function(ce){for(var he=0;;){var Te=ce.text.indexOf(E,he);if(Te==-1)break;he=Te+E.length,te.push(ge(oe,Te))}oe++});for(var ue=te.length-1;ue>=0;ue--)Ho(b.doc,E,te[ue],ge(te[ue].line,te[ue].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,te){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),te!=$o&&b.refresh()}),x("specialCharPlaceholder",Di,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Re?"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",!gt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Is(b),ra(b)},!0),x("keyMap","default",function(b,E,te){var oe=za(E),ue=te!=$o&&za(te);ue&&ue.detach&&ue.detach(b,oe),oe.attach&&oe.attach(b,ue||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,_u,!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?Ua(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return No(b)},!0),x("scrollbarStyle","native",function(b){Ol(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,Jo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Ao(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,$u),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Jo,!0),x("singleCursorHeightPerLine",!0,Jo,!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 $u(a,y,x){var b=x&&x!=$o;if(!y!=!b){var E=a.display.dragFunctions,te=y?Lt:Jt;te(a.display.scroller,"dragstart",E.start),te(a.display.scroller,"dragenter",E.enter),te(a.display.scroller,"dragover",E.over),te(a.display.scroller,"dragleave",E.leave),te(a.display.scroller,"drop",E.drop)}}function _u(a){a.options.lineWrapping?(pe(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(We(a.display.wrapper,"CodeMirror-wrap"),br(a)),Ka(a),wi(a),Co(a),setTimeout(function(){return No(a)},100)}function Vr(a,y){var x=this;if(!(this instanceof Vr))return new Vr(a,y);this.options=y=y?At(y):{},At(Ts,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 Vr.inputStyles[y.inputStyle](this),te=this.display=new ru(a,b,E,y);te.wrapper.CodeMirror=this,Is(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ol(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 fe,keySeq:null,specialChars:null},y.autofocus&&!Re&&te.input.focus(),be&&Ce<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Gu(this),wu(),Mo(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Re||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Xa(x)},20):Ao(this);for(var oe in Wa)Wa.hasOwnProperty(oe)&&Wa[oe](this,y[oe],$o);Nl(this),y.finishInit&&y.finishInit(this);for(var ue=0;ue<vl.length;++ue)vl[ue](this);Do(this),Ne&&y.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Vr.defaults=Ts,Vr.optionHandlers=Wa;function Gu(a){var y=a.display;Lt(y.scroller,"mousedown",oi(a,ks)),be&&Ce<11?Lt(y.scroller,"dblclick",oi(a,function(ce){if(!pt(a,ce)){var he=wo(a,ce);if(!(!he||ml(a,ce)||ui(a.display,ce))){an(ce);var Te=a.findWordAt(he);Aa(a.doc,Te.anchor,Te.head)}}})):Lt(y.scroller,"dblclick",function(ce){return pt(a,ce)||an(ce)}),Lt(y.scroller,"contextmenu",function(ce){return Ps(a,ce)}),Lt(y.input.getField(),"contextmenu",function(ce){y.scroller.contains(ce.target)||Ps(a,ce)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function te(ce){if(ce.touches.length!=1)return!1;var he=ce.touches[0];return he.radiusX<=1&&he.radiusY<=1}function oe(ce,he){if(he.left==null)return!0;var Te=he.left-ce.left,Fe=he.top-ce.top;return Te*Te+Fe*Fe>20*20}Lt(y.scroller,"touchstart",function(ce){if(!pt(a,ce)&&!te(ce)&&!ml(a,ce)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},ce.touches.length==1&&(y.activeTouch.left=ce.touches[0].pageX,y.activeTouch.top=ce.touches[0].pageY)}}),Lt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Lt(y.scroller,"touchend",function(ce){var he=y.activeTouch;if(he&&!ui(y,ce)&&he.left!=null&&!he.moved&&new Date-he.start<300){var Te=a.coordsChar(y.activeTouch,"page"),Fe;!he.prev||oe(he,he.prev)?Fe=new Fr(Te,Te):!he.prev.prev||oe(he,he.prev.prev)?Fe=a.findWordAt(Te):Fe=new Fr(ge(Te.line,0),ct(a.doc,ge(Te.line+1,0))),a.setSelection(Fe.anchor,Fe.head),a.focus(),an(ce)}E()}),Lt(y.scroller,"touchcancel",E),Lt(y.scroller,"scroll",function(){y.scroller.clientHeight&&(qo(a,y.scroller.scrollTop),Eo(a,y.scroller.scrollLeft,!0),on(a,"scroll",a))}),Lt(y.scroller,"mousewheel",function(ce){return zl(a,ce)}),Lt(y.scroller,"DOMMouseScroll",function(ce){return zl(a,ce)}),Lt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ce){pt(a,ce)||ke(ce)},over:function(ce){pt(a,ce)||(Cu(a,ce),ke(ce))},start:function(ce){return xu(a,ce)},drop:oi(a,bu),leave:function(ce){pt(a,ce)||fs(a)}};var ue=y.input.getField();Lt(ue,"keyup",function(ce){return Ss.call(a,ce)}),Lt(ue,"keydown",oi(a,ws)),Lt(ue,"keypress",oi(a,Es)),Lt(ue,"focus",function(ce){return Xa(a,ce)}),Lt(ue,"blur",function(ce){return Ao(a,ce)})}var vl=[];Vr.defineInitHook=function(a){return vl.push(a)};function ga(a,y,x,b){var E=a.doc,te;x==null&&(x="add"),x=="smart"&&(E.mode.indent?te=Xn(a,y).state:x="prev");var oe=a.options.tabSize,ue=yt(E,y),ce=ye(ue.text,null,oe);ue.stateAfter&&(ue.stateAfter=null);var he=ue.text.match(/^\s*/)[0],Te;if(!b&&!/\S/.test(ue.text))Te=0,x="not";else if(x=="smart"&&(Te=E.mode.indent(te,ue.text.slice(he.length),ue.text),Te==bt||Te>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?Te=ye(yt(E,y-1).text,null,oe):Te=0:x=="add"?Te=ce+a.options.indentUnit:x=="subtract"?Te=ce-a.options.indentUnit:typeof x=="number"&&(Te=ce+x),Te=Math.max(0,Te);var Fe="",vt=0;if(a.options.indentWithTabs)for(var lt=Math.floor(Te/oe);lt;--lt)vt+=oe,Fe+=" ";if(vt<Te&&(Fe+=Ut(Te-vt)),Fe!=he)return Ho(E,Fe,ge(y,0),ge(y,he.length),"+input"),ue.stateAfter=null,!0;for(var Ft=0;Ft<E.sel.ranges.length;Ft++){var en=E.sel.ranges[Ft];if(en.head.line==y&&en.head.ch<he.length){var mn=ge(y,he.length);ul(E,Ft,new Fr(mn,mn));break}}}var Ki=null;function ja(a){Ki=a}function gl(a,y,x,b,E){var te=a.doc;a.display.shift=!1,b||(b=te.sel);var oe=+new Date-200,ue=E=="paste"||a.state.pasteIncoming>oe,ce=pn(y),he=null;if(ue&&b.ranges.length>1)if(Ki&&Ki.text.join(`
`)==y){if(b.ranges.length%Ki.text.length==0){he=[];for(var Te=0;Te<Ki.text.length;Te++)he.push(te.splitLines(Ki.text[Te]))}}else ce.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=Pt(ce,function(kn){return[kn]}));for(var Fe=a.curOp.updateInput,vt=b.ranges.length-1;vt>=0;vt--){var lt=b.ranges[vt],Ft=lt.from(),en=lt.to();lt.empty()&&(x&&x>0?Ft=ge(Ft.line,Ft.ch-x):a.state.overwrite&&!ue?en=ge(en.line,Math.min(yt(te,en.line).text.length,en.ch+Ge(ce).length)):ue&&Ki&&Ki.lineWise&&Ki.text.join(`
`)==ce.join(`
`)&&(Ft=en=ge(Ft.line,0)));var mn={from:Ft,to:en,text:he?he[vt%he.length]:ce,origin:E||(ue?"paste":a.state.cutIncoming>oe?"cut":"+input")};zo(a.doc,mn),Gr(a,"inputRead",a,mn)}y&&!ue&&Os(a,y),Bo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Fe),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ls(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Li(y,function(){return gl(y,x,0,null,"paste")}),!0}function Os(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var te=a.getModeAt(E.head),oe=!1;if(te.electricChars){for(var ue=0;ue<te.electricChars.length;ue++)if(y.indexOf(te.electricChars.charAt(ue))>-1){oe=ga(a,E.head.line,"smart");break}}else te.electricInput&&te.electricInput.test(yt(a.doc,E.head.line).text.slice(0,E.head.ch))&&(oe=ga(a,E.head.line,"smart"));oe&&Gr(a,"electricInput",a,E.head.line)}}}function As(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,te={anchor:ge(E,0),head:ge(E+1,0)};x.push(te),y.push(a.getRange(te.anchor,te.head))}return{text:y,ranges:x}}function Bs(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Ns(){var a=_e("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=_e("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ne?a.style.width="1000px":a.setAttribute("wrap","off"),Be&&(a.style.border="1px solid black"),Bs(a),y}function Vu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var te=this.options,oe=te[b];te[b]==E&&b!="mode"||(te[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,oe),on(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"](za(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,te=0;te<E.length;++te)if(E[te]==b||E[te].name==b)return E.splice(te,1),!0},addOverlay:yi(function(b,E){var te=b.token?b:a.getMode(this.options,b);if(te.startState)throw new Error("Overlays may not be stateful.");tt(this.state.overlays,{mode:te,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(oe){return oe.priority}),this.state.modeGen++,wi(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,te=0;te<E.length;++te){var oe=E[te].modeSpec;if(oe==b||typeof b=="string"&&oe.name==b){E.splice(te,1),this.state.modeGen++,wi(this);return}}}),indentLine:yi(function(b,E,te){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),ve(this.doc,b)&&ga(this,b,E,te)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,te=-1,oe=0;oe<E.length;oe++){var ue=E[oe];if(ue.empty())ue.head.line>te&&(ga(this,ue.head.line,b,!0),te=ue.head.line,oe==this.doc.sel.primIndex&&Bo(this));else{var ce=ue.from(),he=ue.to(),Te=Math.max(te,ce.line);te=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Fe=Te;Fe<te;++Fe)ga(this,Fe,b);var vt=this.doc.sel.ranges;ce.ch==0&&E.length==vt.length&&vt[oe].from().ch>0&&ul(this.doc,oe,new Fr(ce,vt[oe].to()),Ae)}}}),getTokenAt:function(b,E){return Hn(this,b,E)},getLineTokens:function(b,E){return Hn(this,ge(b),E,!0)},getTokenTypeAt:function(b){b=ct(this.doc,b);var E=Zn(this,yt(this.doc,b.line)),te=0,oe=(E.length-1)/2,ue=b.ch,ce;if(ue==0)ce=E[2];else for(;;){var he=te+oe>>1;if((he?E[he*2-1]:0)>=ue)oe=he;else if(E[he*2+1]<ue)te=he+1;else{ce=E[he*2+2];break}}var Te=ce?ce.indexOf("overlay "):-1;return Te<0?ce:Te==0?null:ce.slice(0,Te-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var te=[];if(!x.hasOwnProperty(E))return te;var oe=x[E],ue=this.getModeAt(b);if(typeof ue[E]=="string")oe[ue[E]]&&te.push(oe[ue[E]]);else if(ue[E])for(var ce=0;ce<ue[E].length;ce++){var he=oe[ue[E][ce]];he&&te.push(he)}else ue.helperType&&oe[ue.helperType]?te.push(oe[ue.helperType]):oe[ue.name]&&te.push(oe[ue.name]);for(var Te=0;Te<oe._global.length;Te++){var Fe=oe._global[Te];Fe.pred(ue,this)&&ut(te,Fe.val)==-1&&te.push(Fe.val)}return te},getStateAfter:function(b,E){var te=this.doc;return b=Mt(te,b==null?te.first+te.size-1:b),Xn(this,b+1,E).state},cursorCoords:function(b,E){var te,oe=this.doc.sel.primary();return b==null?te=oe.head:typeof b=="object"?te=ct(this.doc,b):te=b?oe.from():oe.to(),Ci(this,te,E||"page")},charCoords:function(b,E){return Oo(this,ct(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,He(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,te){var oe=!1,ue;if(typeof b=="number"){var ce=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ce&&(b=ce,oe=!0),ue=yt(this.doc,b)}else ue=b;return Lo(this,ue,{top:0,left:0},E||"page",te||oe).top+(oe?this.doc.height-rr(ue):0)},defaultTextHeight:function(){return Ti(this.display)},defaultCharWidth:function(){return Vi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,te,oe,ue){var ce=this.display;b=Ci(this,ct(this.doc,b));var he=b.bottom,Te=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ce.sizer.appendChild(E),oe=="over")he=b.top;else if(oe=="above"||oe=="near"){var Fe=Math.max(ce.wrapper.clientHeight,this.doc.height),vt=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(oe=="above"||b.bottom+E.offsetHeight>Fe)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Fe&&(he=b.bottom),Te+E.offsetWidth>vt&&(Te=vt-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",ue=="right"?(Te=ce.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ue=="left"?Te=0:ue=="middle"&&(Te=(ce.sizer.clientWidth-E.offsetWidth)/2),E.style.left=Te+"px"),te&&$s(this,{left:Te,top:he,right:Te+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:yi(ws),triggerOnKeyPress:yi(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:yi(ks),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:yi(function(b){Os(this,b)}),findPosH:function(b,E,te,oe){var ue=1;E<0&&(ue=-1,E=-E);for(var ce=ct(this.doc,b),he=0;he<E&&(ce=yl(this.doc,ce,ue,te,oe),!ce.hitSide);++he);return ce},moveH:yi(function(b,E){var te=this;this.extendSelectionsBy(function(oe){return te.display.shift||te.doc.extend||oe.empty()?yl(te.doc,oe.head,b,E,te.options.rtlMoveVisually):b<0?oe.from():oe.to()},dt)}),deleteH:yi(function(b,E){var te=this.doc.sel,oe=this.doc;te.somethingSelected()?oe.replaceSelection("",null,"+delete"):Zo(this,function(ue){var ce=yl(oe,ue.head,b,E,!1);return b<0?{from:ce,to:ue.head}:{from:ue.head,to:ce}})}),findPosV:function(b,E,te,oe){var ue=1,ce=oe;E<0&&(ue=-1,E=-E);for(var he=ct(this.doc,b),Te=0;Te<E;++Te){var Fe=Ci(this,he,"div");if(ce==null?ce=Fe.left:Fe.left=ce,he=Rs(this,Fe,ue,te),he.hitSide)break}return he},moveV:yi(function(b,E){var te=this,oe=this.doc,ue=[],ce=!this.display.shift&&!oe.extend&&oe.sel.somethingSelected();if(oe.extendSelectionsBy(function(Te){if(ce)return b<0?Te.from():Te.to();var Fe=Ci(te,Te.head,"div");Te.goalColumn!=null&&(Fe.left=Te.goalColumn),ue.push(Fe.left);var vt=Rs(te,Fe,b,E);return E=="page"&&Te==oe.sel.primary()&&Qa(te,Oo(te,vt,"div").top-Fe.top),vt},dt),ue.length)for(var he=0;he<oe.sel.ranges.length;he++)oe.sel.ranges[he].goalColumn=ue[he]}),findWordAt:function(b){var E=this.doc,te=yt(E,b.line).text,oe=b.ch,ue=b.ch;if(te){var ce=this.getHelper(b,"wordChars");(b.sticky=="before"||ue==te.length)&&oe?--oe:++ue;for(var he=te.charAt(oe),Te=se(he,ce)?function(Fe){return se(Fe,ce)}:/\s/.test(he)?function(Fe){return/\s/.test(Fe)}:function(Fe){return!/\s/.test(Fe)&&!se(Fe)};oe>0&&Te(te.charAt(oe-1));)--oe;for(;ue<te.length&&Te(te.charAt(ue));)++ue}return new Fr(ge(b.line,oe),ge(b.line,ue))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?pe(this.display.cursorDiv,"CodeMirror-overwrite"):We(this.display.cursorDiv,"CodeMirror-overwrite"),on(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==et()},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-Pi(this)-this.display.barHeight,width:b.scrollWidth-Pi(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:ge(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?_s(this,b):Pl(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var te=this,oe=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};b!=null&&(this.display.wrapper.style.width=oe(b)),E!=null&&(this.display.wrapper.style.height=oe(E)),this.options.lineWrapping&&Ko(this);var ue=this.display.viewFrom;this.doc.iter(ue,this.display.viewTo,function(ce){if(ce.widgets){for(var he=0;he<ce.widgets.length;he++)if(ce.widgets[he].noHScroll){fo(te,ue,"widget");break}}++ue}),this.curOp.forceUpdate=!0,on(this,"refresh",this)}),operation:function(b){return Li(this,b)},startOperation:function(){return Mo(this)},endOperation:function(){return Do(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;wi(this),this.curOp.forceUpdate=!0,Co(this),Qo(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-Ti(this.display))>.5||this.options.lineWrapping)&&Ka(this),on(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),Co(this),this.display.input.reset(),Qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Gr(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}},Yt(a),a.registerHelper=function(b,E,te){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=te},a.registerGlobalHelper=function(b,E,te,oe){a.registerHelper(b,E,oe),x[b]._global.push({pred:te,val:oe})}}function yl(a,y,x,b,E){var te=y,oe=x,ue=yt(a,y.line),ce=E&&a.direction=="rtl"?-x:x;function he(){var Rn=y.line+ce;return Rn<a.first||Rn>=a.first+a.size?!1:(y=new ge(Rn,y.ch,y.sticky),ue=yt(a,Rn))}function Te(Rn){var Mn;if(b=="codepoint"){var Wn=ue.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Wn)?Mn=null:Mn=new ge(y.line,Math.max(0,Math.min(ue.text.length,y.ch+x*(Wn>=55296&&Wn<56320?2:1))),-x)}else E?Mn=Du(a.cm,ue,y,x):Mn=dl(ue,y,x);if(Mn==null)if(!Rn&&he())y=fl(E,a.cm,ue,y.line,ce);else return!1;else y=Mn;return!0}if(b=="char"||b=="codepoint")Te();else if(b=="column")Te(!0);else if(b=="word"||b=="group")for(var Fe=null,vt=b=="group",lt=a.cm&&a.cm.getHelper(y,"wordChars"),Ft=!0;!(x<0&&!Te(!Ft));Ft=!1){var en=ue.text.charAt(y.ch)||`
`,mn=se(en,lt)?"w":vt&&en==`
`?"n":!vt||/\s/.test(en)?null:"p";if(vt&&!Ft&&!mn&&(mn="s"),Fe&&Fe!=mn){x<0&&(x=1,Te(),y.sticky="after");break}if(mn&&(Fe=mn),x>0&&!Te(!Ft))break}var kn=Na(a,y,te,oe,!0);return qe(te,kn)&&(kn.hitSide=!0),kn}function Rs(a,y,x,b){var E=a.doc,te=y.left,oe;if(b=="page"){var ue=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(ue-.5*Ti(a.display),3);oe=(x>0?y.bottom:y.top)+x*ce}else b=="line"&&(oe=x>0?y.bottom+3:y.top-3);for(var he;he=ci(a,te,oe),!!he.outside;){if(x<0?oe<=0:oe>=E.height){he.hitSide=!0;break}oe+=x*5}return he}var Wr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new fe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Wr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Bs(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function te(ue){for(var ce=ue.target;ce;ce=ce.parentNode){if(ce==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Lt(E,"paste",function(ue){!te(ue)||pt(b,ue)||Ls(ue,b)||Ce<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),Lt(E,"compositionstart",function(ue){y.composing={data:ue.data,done:!1}}),Lt(E,"compositionupdate",function(ue){y.composing||(y.composing={data:ue.data,done:!1})}),Lt(E,"compositionend",function(ue){y.composing&&(ue.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Lt(E,"touchstart",function(){return x.forceCompositionEnd()}),Lt(E,"input",function(){y.composing||y.readFromDOMSoon()});function oe(ue){if(!(!te(ue)||pt(b,ue))){if(b.somethingSelected())ja({lineWise:!1,text:b.getSelections()}),ue.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ce=As(b);ja({lineWise:!0,text:ce.text}),ue.type=="cut"&&b.operation(function(){b.setSelections(ce.ranges,0,Ae),b.replaceSelection("",null,"cut")})}else return;if(ue.clipboardData){ue.clipboardData.clearData();var he=Ki.text.join(`
`);if(ue.clipboardData.setData("Text",he),ue.clipboardData.getData("Text")==he){ue.preventDefault();return}}var Te=Ns(),Fe=Te.firstChild;b.display.lineSpace.insertBefore(Te,b.display.lineSpace.firstChild),Fe.value=Ki.text.join(`
`);var vt=document.activeElement;Ie(Fe),setTimeout(function(){b.display.lineSpace.removeChild(Te),vt.focus(),vt==E&&x.showPrimarySelection()},50)}}Lt(E,"copy",oe),Lt(E,"cut",oe)},Wr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Wr.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Wr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Wr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Wr.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var te=Za(y,a.anchorNode,a.anchorOffset),oe=Za(y,a.focusNode,a.focusOffset);if(!(te&&!te.bad&&oe&&!oe.bad&&Pe(Qt(te,oe),b)==0&&Pe(Nt(te,oe),E)==0)){var ue=y.display.view,ce=b.line>=y.display.viewFrom&&Fs(y,b)||{node:ue[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Fs(y,E);if(!he){var Te=ue[ue.length-1].measure,Fe=Te.maps?Te.maps[Te.maps.length-1]:Te.map;he={node:Fe[Fe.length-1],offset:Fe[Fe.length-2]-Fe[Fe.length-3]}}if(!ce||!he){a.removeAllRanges();return}var vt=a.rangeCount&&a.getRangeAt(0),lt;try{lt=Le(ce.node,ce.offset,he.offset,he.node)}catch(Ft){}lt&&(!re&&y.state.focused?(a.collapse(ce.node,ce.offset),lt.collapsed||(a.removeAllRanges(),a.addRange(lt))):(a.removeAllRanges(),a.addRange(lt)),vt&&a.anchorNode==null?a.addRange(vt):re&&this.startGracePeriod()),this.rememberSelection()}},Wr.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)},Wr.prototype.showMultipleSelections=function(a){Xe(this.cm.display.cursorDiv,a.cursors),Xe(this.cm.display.selectionDiv,a.selection)},Wr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Wr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ke(this.div,y)},Wr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Wr.prototype.blur=function(){this.div.blur()},Wr.prototype.getField=function(){return this.div},Wr.prototype.supportsTouch=function(){return!0},Wr.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Li(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)},Wr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Wr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Me&&Se&&this.cm.display.gutterSpecs.length&&Uu(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&&Li(y,function(){hi(y.doc,po(x,b),Ae),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Wr.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=ge(b.line-1,yt(a.doc,b.line-1).length)),E.ch==yt(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=ge(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var te,oe,ue;b.line==y.viewFrom||(te=So(a,b.line))==0?(oe=Ee(y.view[0].line),ue=y.view[0].node):(oe=Ee(y.view[te].line),ue=y.view[te-1].node.nextSibling);var ce=So(a,E.line),he,Te;if(ce==y.view.length-1?(he=y.viewTo-1,Te=y.lineDiv.lastChild):(he=Ee(y.view[ce+1].line)-1,Te=y.view[ce+1].node.previousSibling),!ue)return!1;for(var Fe=a.doc.splitLines(Ku(a,ue,Te,oe,he)),vt=Ht(a.doc,ge(oe,0),ge(he,yt(a.doc,he).text.length));Fe.length>1&&vt.length>1;)if(Ge(Fe)==Ge(vt))Fe.pop(),vt.pop(),he--;else if(Fe[0]==vt[0])Fe.shift(),vt.shift(),oe++;else break;for(var lt=0,Ft=0,en=Fe[0],mn=vt[0],kn=Math.min(en.length,mn.length);lt<kn&&en.charCodeAt(lt)==mn.charCodeAt(lt);)++lt;for(var Rn=Ge(Fe),Mn=Ge(vt),Wn=Math.min(Rn.length-(Fe.length==1?lt:0),Mn.length-(vt.length==1?lt:0));Ft<Wn&&Rn.charCodeAt(Rn.length-Ft-1)==Mn.charCodeAt(Mn.length-Ft-1);)++Ft;if(Fe.length==1&&vt.length==1&&oe==b.line)for(;lt&&lt>b.ch&&Rn.charCodeAt(Rn.length-Ft-1)==Mn.charCodeAt(Mn.length-Ft-1);)lt--,Ft++;Fe[Fe.length-1]=Rn.slice(0,Rn.length-Ft).replace(/^\u200b+/,""),Fe[0]=Fe[0].slice(lt).replace(/\u200b+$/,"");var sr=ge(oe,lt),nr=ge(he,vt.length?Ge(vt).length-Ft:0);if(Fe.length>1||Fe[0]||Pe(sr,nr))return Ho(a.doc,Fe,sr,nr,"+input"),!0},Wr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wr.prototype.reset=function(){this.forceCompositionEnd()},Wr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wr.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))},Wr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Li(this.cm,function(){return wi(a.cm)})},Wr.prototype.setUneditable=function(a){a.contentEditable="false"},Wr.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))},Wr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Wr.prototype.onContextMenu=function(){},Wr.prototype.resetPosition=function(){},Wr.prototype.needsContentAttribute=!0;function Fs(a,y){var x=qi(a,y.line);if(!x||x.hidden)return null;var b=yt(a.doc,y.line),E=To(x,b,y.line),te=Gt(b,a.doc.direction),oe="left";if(te){var ue=Dt(te,y.ch);oe=ue%2?"right":"left"}var ce=xa(E.map,y.ch,oe);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function Uu(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function _o(a,y){return y&&(a.bad=!0),a}function Ku(a,y,x,b,E){var te="",oe=!1,ue=a.doc.lineSeparator(),ce=!1;function he(lt){return function(Ft){return Ft.id==lt}}function Te(){oe&&(te+=ue,ce&&(te+=ue),oe=ce=!1)}function Fe(lt){lt&&(Te(),te+=lt)}function vt(lt){if(lt.nodeType==1){var Ft=lt.getAttribute("cm-text");if(Ft){Fe(Ft);return}var en=lt.getAttribute("cm-marker"),mn;if(en){var kn=a.findMarks(ge(b,0),ge(E+1,0),he(+en));kn.length&&(mn=kn[0].find(0))&&Fe(Ht(a.doc,mn.from,mn.to).join(ue));return}if(lt.getAttribute("contenteditable")=="false")return;var Rn=/^(pre|div|p|li|table|br)$/i.test(lt.nodeName);if(!/^br$/i.test(lt.nodeName)&&lt.textContent.length==0)return;Rn&&Te();for(var Mn=0;Mn<lt.childNodes.length;Mn++)vt(lt.childNodes[Mn]);/^(pre|p)$/i.test(lt.nodeName)&&(ce=!0),Rn&&(oe=!0)}else lt.nodeType==3&&Fe(lt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;vt(y),y!=x;)y=y.nextSibling,ce=!1;return te}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return _o(a.clipPos(ge(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var te=a.display.view[E];if(te.node==b)return Yu(te,y,x)}}function Yu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Ke(b,y))return _o(ge(Ee(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var te=a.rest?Ge(a.rest):a.line;return _o(ge(Ee(te),te.text.length),E)}var oe=y.nodeType==3?y:null,ue=y;for(!oe&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(oe=y.firstChild,x&&(x=oe.nodeValue.length));ue.parentNode!=b;)ue=ue.parentNode;var ce=a.measure,he=ce.maps;function Te(mn,kn,Rn){for(var Mn=-1;Mn<(he?he.length:0);Mn++)for(var Wn=Mn<0?ce.map:he[Mn],sr=0;sr<Wn.length;sr+=3){var nr=Wn[sr+2];if(nr==mn||nr==kn){var Sr=Ee(Mn<0?a.line:a.rest[Mn]),$r=Wn[sr]+Rn;return(Rn<0||nr!=mn)&&($r=Wn[sr+(Rn?1:0)]),ge(Sr,$r)}}}var Fe=Te(oe,ue,x);if(Fe)return _o(Fe,E);for(var vt=ue.nextSibling,lt=oe?oe.nodeValue.length-x:0;vt;vt=vt.nextSibling){if(Fe=Te(vt,vt.firstChild,0),Fe)return _o(ge(Fe.line,Fe.ch-lt),E);lt+=vt.textContent.length}for(var Ft=ue.previousSibling,en=x;Ft;Ft=Ft.previousSibling){if(Fe=Te(Ft,Ft.firstChild,-1),Fe)return _o(ge(Fe.line,Fe.ch+en),E);en+=Ft.textContent.length}}var Jr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new fe,this.hasSelection=!1,this.composing=null};Jr.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),Be&&(E.style.width="0px"),Lt(E,"input",function(){be&&Ce>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Lt(E,"paste",function(oe){pt(b,oe)||Ls(oe,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function te(oe){if(!pt(b,oe)){if(b.somethingSelected())ja({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ue=As(b);ja({lineWise:!0,text:ue.text}),oe.type=="cut"?b.setSelections(ue.ranges,null,Ae):(x.prevInput="",E.value=ue.text.join(`
`),Ie(E))}else return;oe.type=="cut"&&(b.state.cutIncoming=+new Date)}}Lt(E,"cut",te),Lt(E,"copy",te),Lt(a.scroller,"paste",function(oe){if(!(ui(a,oe)||pt(b,oe))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ue=new Event("paste");ue.clipboardData=oe.clipboardData,E.dispatchEvent(ue)}}),Lt(a.lineSpace,"selectstart",function(oe){ui(a,oe)||an(oe)}),Lt(E,"compositionstart",function(){var oe=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:oe,range:b.markText(oe,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Lt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Jr.prototype.createField=function(a){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},Jr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Jr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=Ci(a,x.sel.primary().head,"div"),te=y.wrapper.getBoundingClientRect(),oe=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+oe.top-te.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+oe.left-te.left))}return b},Jr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Xe(x.cursorDiv,a.cursors),Xe(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Jr.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&&Ie(this.textarea),be&&Ce>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",be&&Ce>=9&&(this.hasSelection=null))}},Jr.prototype.getField=function(){return this.textarea},Jr.prototype.supportsTouch=function(){return!1},Jr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Re||et()!=this.textarea))try{this.textarea.focus()}catch(a){}},Jr.prototype.blur=function(){this.textarea.blur()},Jr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Jr.prototype.receivedFocus=function(){this.slowPoll()},Jr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Jr.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)},Jr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||wn(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(be&&Ce>=9&&this.hasSelection===E||Oe&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var te=E.charCodeAt(0);if(te==8203&&!b&&(b="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,ue=Math.min(b.length,E.length);oe<ue&&b.charCodeAt(oe)==E.charCodeAt(oe);)++oe;return Li(y,function(){gl(y,E.slice(oe),b.length-oe,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},Jr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Jr.prototype.onKeyPress=function(){be&&Ce>=9&&(this.hasSelection=null),this.fastPoll()},Jr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var te=wo(x,a),oe=b.scroller.scrollTop;if(!te||de)return;var ue=x.options.resetSelectionOnContextMenu;ue&&x.doc.sel.contains(te)==-1&&oi(x,hi)(x.doc,po(te),Ae);var ce=E.style.cssText,he=y.wrapper.style.cssText,Te=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-Te.top-5)+"px; left: "+(a.clientX-Te.left-5)+`px;
z-index: 1000; background: `+(be?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Fe;Ne&&(Fe=window.scrollY),b.input.focus(),Ne&&window.scrollTo(null,Fe),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=lt,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function vt(){if(E.selectionStart!=null){var en=x.somethingSelected(),mn="\u200B"+(en?E.value:"");E.value="\u21DA",E.value=mn,y.prevInput=en?"":"\u200B",E.selectionStart=1,E.selectionEnd=mn.length,b.selForContextMenu=x.doc.sel}}function lt(){if(y.contextMenuPending==lt&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=ce,be&&Ce<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=oe),E.selectionStart!=null)){(!be||be&&Ce<9)&&vt();var en=0,mn=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,ts)(x):en++<10?b.detectingSelectAll=setTimeout(mn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(mn,200)}}if(be&&Ce>=9&&vt(),Ye){ke(a);var Ft=function(){Jt(window,"mouseup",Ft),setTimeout(lt,20)};Lt(window,"mouseup",Ft)}else setTimeout(lt,50)},Jr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Jr.prototype.setUneditable=function(){},Jr.prototype.needsContentAttribute=!1;function Xu(a,y){if(y=y?At(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=et();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ue.getValue()}var E;if(a.form&&(Lt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var te=a.form;E=te.submit;try{var oe=te.submit=function(){b(),te.submit=E,te.submit(),te.submit=oe}}catch(ce){}}y.finishInit=function(ce){ce.save=b,ce.getTextArea=function(){return a},ce.toTextArea=function(){ce.toTextArea=isNaN,b(),a.parentNode.removeChild(ce.getWrapperElement()),a.style.display="",a.form&&(Jt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ue=Vr(function(ce){return a.parentNode.insertBefore(ce,a.nextSibling)},y);return ue}function Ju(a){a.off=Jt,a.on=Lt,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=pn,a.countColumn=ye,a.findColumn=rn,a.isWordChar=ie,a.Pass=bt,a.signal=on,a.Line=Ir,a.changeEnd=mo,a.scrollbarModel=Ll,a.Pos=ge,a.cmpPos=Pe,a.modes=Dn,a.mimeModes=tn,a.resolveMode=Ln,a.getMode=Yn,a.modeExtensions=zn,a.extendMode=Bn,a.copyState=_n,a.startState=Qn,a.innerMode=Vn,a.commands=ha,a.keyMap=io,a.keyName=gs,a.isModifierKey=ms,a.lookupKey=jo,a.normalizeKeyMap=Mu,a.StringStream=jn,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=an,a.e_stopPropagation=Tn,a.e_stop=ke,a.addClass=pe,a.contains=Ke,a.rmClass=We,a.keyNames=yo}Zu(Vr),Vu(Vr);var Qu="iter insert remove copy getEditor constructor".split(" ");for(var $a in Si.prototype)Si.prototype.hasOwnProperty($a)&&ut(Qu,$a)<0&&(Vr.prototype[$a]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[$a]));return Yt(Si),Vr.inputStyles={textarea:Jr,contenteditable:Wr},Vr.defineMode=function(a){!Vr.defaults.mode&&a!="null"&&(Vr.defaults.mode=a),yn.apply(this,arguments)},Vr.defineMIME=un,Vr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Vr.defineMIME("text/plain","null"),Vr.defineExtension=function(a,y){Vr.prototype[a]=y},Vr.defineDocExtension=function(a,y){Si.prototype[a]=y},Vr.fromTextArea=Xu,Ju(Vr),Vr.version="5.58.2",Vr})},25419:function(Wt,Tt,le){(function(re){re(le(89780),le(15525),le(98101))})(function(re){"use strict";re.defineMode("markdown",function(Je,me){var ze=re.getMode(Je,"text/html"),be=ze.name=="null";function Ce(ye){if(re.findModeByName){var fe=re.findModeByName(ye);fe&&(ye=fe.mime||fe.mimes[0])}var ut=re.getMode(Je,ye);return ut.name=="null"?null:ut}me.highlightFormatting===void 0&&(me.highlightFormatting=!1),me.maxBlockquoteDepth===void 0&&(me.maxBlockquoteDepth=0),me.taskLists===void 0&&(me.taskLists=!1),me.strikethrough===void 0&&(me.strikethrough=!1),me.emoji===void 0&&(me.emoji=!1),me.fencedCodeBlockHighlighting===void 0&&(me.fencedCodeBlockHighlighting=!0),me.fencedCodeBlockDefaultMode===void 0&&(me.fencedCodeBlockDefaultMode="text/plain"),me.xml===void 0&&(me.xml=!0),me.tokenTypeOverrides===void 0&&(me.tokenTypeOverrides={});var Ne={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 Ne)Ne.hasOwnProperty($e)&&me.tokenTypeOverrides[$e]&&(Ne[$e]=me.tokenTypeOverrides[$e]);var Se=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ze=/^\[(x| )\](?=\s)/i,xe=me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ot=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Be=/^[^#!\[\]*_\\<>` "'(~:]+/,Me=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Re=/^\s*\[[^\]]+?\]:.*$/,Oe=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,rt=" ";function gt(ye,fe,ut){return fe.f=fe.inline=ut,ut(ye,fe)}function xt(ye,fe,ut){return fe.f=fe.block=ut,ut(ye,fe)}function at(ye){return!ye||!/\S/.test(ye.string)}function Ye(ye){if(ye.linkTitle=!1,ye.linkHref=!1,ye.linkText=!1,ye.em=!1,ye.strong=!1,ye.strikethrough=!1,ye.quote=0,ye.indentedCode=!1,ye.f==We){var fe=be;if(!fe){var ut=re.innerMode(ze,ye.htmlState);fe=ut.mode.name=="xml"&&ut.state.tagStart===null&&!ut.state.context&&ut.state.tokenize.isInText}fe&&(ye.f=ft,ye.block=st,ye.htmlState=null)}return ye.trailingSpace=0,ye.trailingSpaceNewLine=!1,ye.prevLine=ye.thisLine,ye.thisLine={stream:null},null}function st(ye,fe){var ut=ye.column()===fe.indentation,_t=at(fe.prevLine.stream),bt=fe.indentedCode,Ae=fe.prevLine.hr,nt=fe.list!==!1,dt=(fe.listStack[fe.listStack.length-1]||0)+3;fe.indentedCode=!1;var rn=fe.indentation;if(fe.indentationDiff===null&&(fe.indentationDiff=fe.indentation,nt)){for(fe.list=null;rn<fe.listStack[fe.listStack.length-1];)fe.listStack.pop(),fe.listStack.length?fe.indentation=fe.listStack[fe.listStack.length-1]:fe.list=!1;fe.list!==!1&&(fe.indentationDiff=rn-fe.listStack[fe.listStack.length-1])}var Et=!_t&&!Ae&&!fe.prevLine.header&&(!nt||!bt)&&!fe.prevLine.fencedCodeEnd,Ut=(fe.list===!1||Ae||_t)&&fe.indentation<=dt&&ye.match(Se),Ge=null;if(fe.indentationDiff>=4&&(bt||fe.prevLine.fencedCodeEnd||fe.prevLine.header||_t))return ye.skipToEnd(),fe.indentedCode=!0,Ne.code;if(ye.eatSpace())return null;if(ut&&fe.indentation<=dt&&(Ge=ye.match(xe))&&Ge[1].length<=6)return fe.quote=0,fe.header=Ge[1].length,fe.thisLine.header=!0,me.highlightFormatting&&(fe.formatting="header"),fe.f=fe.inline,Xe(fe);if(fe.indentation<=dt&&ye.eat(">"))return fe.quote=ut?1:fe.quote+1,me.highlightFormatting&&(fe.formatting="quote"),ye.eatSpace(),Xe(fe);if(!Ut&&!fe.setext&&ut&&fe.indentation<=dt&&(Ge=ye.match(de))){var Pt=Ge[1]?"ol":"ul";return fe.indentation=rn+ye.current().length,fe.list=!0,fe.quote=0,fe.listStack.push(fe.indentation),fe.em=!1,fe.strong=!1,fe.code=!1,fe.strikethrough=!1,me.taskLists&&ye.match(Ze,!1)&&(fe.taskList=!0),fe.f=fe.inline,me.highlightFormatting&&(fe.formatting=["list","list-"+Pt]),Xe(fe)}else{if(ut&&fe.indentation<=dt&&(Ge=ye.match(Me,!0)))return fe.quote=0,fe.fencedEndRE=new RegExp(Ge[1]+"+ *$"),fe.localMode=me.fencedCodeBlockHighlighting&&Ce(Ge[2]||me.fencedCodeBlockDefaultMode),fe.localMode&&(fe.localState=re.startState(fe.localMode)),fe.f=fe.block=St,me.highlightFormatting&&(fe.formatting="code-block"),fe.code=-1,Xe(fe);if(fe.setext||(!Et||!nt)&&!fe.quote&&fe.list===!1&&!fe.code&&!Ut&&!Re.test(ye.string)&&(Ge=ye.lookAhead(1))&&(Ge=Ge.match(ot)))return fe.setext?(fe.header=fe.setext,fe.setext=0,ye.skipToEnd(),me.highlightFormatting&&(fe.formatting="header")):(fe.header=Ge[0].charAt(0)=="="?1:2,fe.setext=fe.header),fe.thisLine.header=!0,fe.f=fe.inline,Xe(fe);if(Ut)return ye.skipToEnd(),fe.hr=!0,fe.thisLine.hr=!0,Ne.hr;if(ye.peek()==="[")return gt(ye,fe,Ct)}return gt(ye,fe,fe.inline)}function We(ye,fe){var ut=ze.token(ye,fe.htmlState);if(!be){var _t=re.innerMode(ze,fe.htmlState);(_t.mode.name=="xml"&&_t.state.tagStart===null&&!_t.state.context&&_t.state.tokenize.isInText||fe.md_inside&&ye.current().indexOf(">")>-1)&&(fe.f=ft,fe.block=st,fe.htmlState=null)}return ut}function St(ye,fe){var ut=fe.listStack[fe.listStack.length-1]||0,_t=fe.indentation<ut,bt=ut+3;if(fe.fencedEndRE&&fe.indentation<=bt&&(_t||ye.match(fe.fencedEndRE))){me.highlightFormatting&&(fe.formatting="code-block");var Ae;return _t||(Ae=Xe(fe)),fe.localMode=fe.localState=null,fe.block=st,fe.f=ft,fe.fencedEndRE=null,fe.code=0,fe.thisLine.fencedCodeEnd=!0,_t?xt(ye,fe,fe.block):Ae}else return fe.localMode?fe.localMode.token(ye,fe.localState):(ye.skipToEnd(),Ne.code)}function Xe(ye){var fe=[];if(ye.formatting){fe.push(Ne.formatting),typeof ye.formatting=="string"&&(ye.formatting=[ye.formatting]);for(var ut=0;ut<ye.formatting.length;ut++)fe.push(Ne.formatting+"-"+ye.formatting[ut]),ye.formatting[ut]==="header"&&fe.push(Ne.formatting+"-"+ye.formatting[ut]+"-"+ye.header),ye.formatting[ut]==="quote"&&(!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=ye.quote?fe.push(Ne.formatting+"-"+ye.formatting[ut]+"-"+ye.quote):fe.push("error"))}if(ye.taskOpen)return fe.push("meta"),fe.length?fe.join(" "):null;if(ye.taskClosed)return fe.push("property"),fe.length?fe.join(" "):null;if(ye.linkHref?fe.push(Ne.linkHref,"url"):(ye.strong&&fe.push(Ne.strong),ye.em&&fe.push(Ne.em),ye.strikethrough&&fe.push(Ne.strikethrough),ye.emoji&&fe.push(Ne.emoji),ye.linkText&&fe.push(Ne.linkText),ye.code&&fe.push(Ne.code),ye.image&&fe.push(Ne.image),ye.imageAltText&&fe.push(Ne.imageAltText,"link"),ye.imageMarker&&fe.push(Ne.imageMarker)),ye.header&&fe.push(Ne.header,Ne.header+"-"+ye.header),ye.quote&&(fe.push(Ne.quote),!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=ye.quote?fe.push(Ne.quote+"-"+ye.quote):fe.push(Ne.quote+"-"+me.maxBlockquoteDepth)),ye.list!==!1){var _t=(ye.listStack.length-1)%3;_t?_t===1?fe.push(Ne.list2):fe.push(Ne.list3):fe.push(Ne.list1)}return ye.trailingSpaceNewLine?fe.push("trailing-space-new-line"):ye.trailingSpace&&fe.push("trailing-space-"+(ye.trailingSpace%2?"a":"b")),fe.length?fe.join(" "):null}function _e(ye,fe){if(ye.match(Be,!0))return Xe(fe)}function ft(ye,fe){var ut=fe.text(ye,fe);if(typeof ut!="undefined")return ut;if(fe.list)return fe.list=null,Xe(fe);if(fe.taskList){var _t=ye.match(Ze,!0)[1]===" ";return _t?fe.taskOpen=!0:fe.taskClosed=!0,me.highlightFormatting&&(fe.formatting="task"),fe.taskList=!1,Xe(fe)}if(fe.taskOpen=!1,fe.taskClosed=!1,fe.header&&ye.match(/^#+$/,!0))return me.highlightFormatting&&(fe.formatting="header"),Xe(fe);var bt=ye.next();if(fe.linkTitle){fe.linkTitle=!1;var Ae=bt;bt==="("&&(Ae=")"),Ae=(Ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var nt="^\\s*(?:[^"+Ae+"\\\\]+|\\\\\\\\|\\\\.)"+Ae;if(ye.match(new RegExp(nt),!0))return Ne.linkHref}if(bt==="`"){var dt=fe.formatting;me.highlightFormatting&&(fe.formatting="code"),ye.eatWhile("`");var rn=ye.current().length;if(fe.code==0&&(!fe.quote||rn==1))return fe.code=rn,Xe(fe);if(rn==fe.code){var Et=Xe(fe);return fe.code=0,Et}else return fe.formatting=dt,Xe(fe)}else if(fe.code)return Xe(fe);if(bt==="\\"&&(ye.next(),me.highlightFormatting)){var Ut=Xe(fe),Ge=Ne.formatting+"-escape";return Ut?Ut+" "+Ge:Ge}if(bt==="!"&&ye.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return fe.imageMarker=!0,fe.image=!0,me.highlightFormatting&&(fe.formatting="image"),Xe(fe);if(bt==="["&&fe.imageMarker&&ye.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return fe.imageMarker=!1,fe.imageAltText=!0,me.highlightFormatting&&(fe.formatting="image"),Xe(fe);if(bt==="]"&&fe.imageAltText){me.highlightFormatting&&(fe.formatting="image");var Ut=Xe(fe);return fe.imageAltText=!1,fe.image=!1,fe.inline=fe.f=Ke,Ut}if(bt==="["&&!fe.image)return fe.linkText&&ye.match(/^.*?\]/)||(fe.linkText=!0,me.highlightFormatting&&(fe.formatting="link")),Xe(fe);if(bt==="]"&&fe.linkText){me.highlightFormatting&&(fe.formatting="link");var Ut=Xe(fe);return fe.linkText=!1,fe.inline=fe.f=ye.match(/\(.*?\)| ?\[.*?\]/,!1)?Ke:ft,Ut}if(bt==="<"&&ye.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){fe.f=fe.inline=Le,me.highlightFormatting&&(fe.formatting="link");var Ut=Xe(fe);return Ut?Ut+=" ":Ut="",Ut+Ne.linkInline}if(bt==="<"&&ye.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){fe.f=fe.inline=Le,me.highlightFormatting&&(fe.formatting="link");var Ut=Xe(fe);return Ut?Ut+=" ":Ut="",Ut+Ne.linkEmail}if(me.xml&&bt==="<"&&ye.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Pt=ye.string.indexOf(">",ye.pos);if(Pt!=-1){var tt=ye.string.substring(ye.start,Pt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(fe.md_inside=!0)}return ye.backUp(1),fe.htmlState=re.startState(ze),xt(ye,fe,We)}if(me.xml&&bt==="<"&&ye.match(/^\/\w*?>/))return fe.md_inside=!1,"tag";if(bt==="*"||bt==="_"){for(var ae=1,ee=ye.pos==1?" ":ye.string.charAt(ye.pos-2);ae<3&&ye.eat(bt);)ae++;var z=ye.peek()||" ",ie=!/\s/.test(z)&&(!Oe.test(z)||/\s/.test(ee)||Oe.test(ee)),se=!/\s/.test(ee)&&(!Oe.test(ee)||/\s/.test(z)||Oe.test(z)),ne=null,we=null;if(ae%2&&(!fe.em&&ie&&(bt==="*"||!se||Oe.test(ee))?ne=!0:fe.em==bt&&se&&(bt==="*"||!ie||Oe.test(z))&&(ne=!1)),ae>1&&(!fe.strong&&ie&&(bt==="*"||!se||Oe.test(ee))?we=!0:fe.strong==bt&&se&&(bt==="*"||!ie||Oe.test(z))&&(we=!1)),we!=null||ne!=null){me.highlightFormatting&&(fe.formatting=ne==null?"strong":we==null?"em":"strong em"),ne===!0&&(fe.em=bt),we===!0&&(fe.strong=bt);var Et=Xe(fe);return ne===!1&&(fe.em=!1),we===!1&&(fe.strong=!1),Et}}else if(bt===" "&&(ye.eat("*")||ye.eat("_"))){if(ye.peek()===" ")return Xe(fe);ye.backUp(1)}if(me.strikethrough){if(bt==="~"&&ye.eatWhile(bt)){if(fe.strikethrough){me.highlightFormatting&&(fe.formatting="strikethrough");var Et=Xe(fe);return fe.strikethrough=!1,Et}else if(ye.match(/^[^\s]/,!1))return fe.strikethrough=!0,me.highlightFormatting&&(fe.formatting="strikethrough"),Xe(fe)}else if(bt===" "&&ye.match(/^~~/,!0)){if(ye.peek()===" ")return Xe(fe);ye.backUp(2)}}if(me.emoji&&bt===":"&&ye.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){fe.emoji=!0,me.highlightFormatting&&(fe.formatting="emoji");var Ve=Xe(fe);return fe.emoji=!1,Ve}return bt===" "&&(ye.match(/^ +$/,!1)?fe.trailingSpace++:fe.trailingSpace&&(fe.trailingSpaceNewLine=!0)),Xe(fe)}function Le(ye,fe){var ut=ye.next();if(ut===">"){fe.f=fe.inline=ft,me.highlightFormatting&&(fe.formatting="link");var _t=Xe(fe);return _t?_t+=" ":_t="",_t+Ne.linkInline}return ye.match(/^[^>]+/,!0),Ne.linkInline}function Ke(ye,fe){if(ye.eatSpace())return null;var ut=ye.next();return ut==="("||ut==="["?(fe.f=fe.inline=pe(ut==="("?")":"]"),me.highlightFormatting&&(fe.formatting="link-string"),fe.linkHref=!0,Xe(fe)):"error"}var et={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function pe(ye){return function(fe,ut){var _t=fe.next();if(_t===ye){ut.f=ut.inline=ft,me.highlightFormatting&&(ut.formatting="link-string");var bt=Xe(ut);return ut.linkHref=!1,bt}return fe.match(et[ye]),ut.linkHref=!0,Xe(ut)}}function Ct(ye,fe){return ye.match(/^([^\]\\]|\\.)*\]:/,!1)?(fe.f=Ie,ye.next(),me.highlightFormatting&&(fe.formatting="link"),fe.linkText=!0,Xe(fe)):gt(ye,fe,ft)}function Ie(ye,fe){if(ye.match(/^\]:/,!0)){fe.f=fe.inline=wt,me.highlightFormatting&&(fe.formatting="link");var ut=Xe(fe);return fe.linkText=!1,ut}return ye.match(/^([^\]\\]|\\.)+/,!0),Ne.linkText}function wt(ye,fe){return ye.eatSpace()?null:(ye.match(/^[^\s]+/,!0),ye.peek()===void 0?fe.linkTitle=!0:ye.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),fe.f=fe.inline=ft,Ne.linkHref+" url")}var At={startState:function(){return{f:st,prevLine:{stream:null},thisLine:{stream:null},block:st,htmlState:null,indentation:0,inline:ft,text:_e,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(ye){return{f:ye.f,prevLine:ye.prevLine,thisLine:ye.thisLine,block:ye.block,htmlState:ye.htmlState&&re.copyState(ze,ye.htmlState),indentation:ye.indentation,localMode:ye.localMode,localState:ye.localMode?re.copyState(ye.localMode,ye.localState):null,inline:ye.inline,text:ye.text,formatting:!1,linkText:ye.linkText,linkTitle:ye.linkTitle,linkHref:ye.linkHref,code:ye.code,em:ye.em,strong:ye.strong,strikethrough:ye.strikethrough,emoji:ye.emoji,header:ye.header,setext:ye.setext,hr:ye.hr,taskList:ye.taskList,list:ye.list,listStack:ye.listStack.slice(0),quote:ye.quote,indentedCode:ye.indentedCode,trailingSpace:ye.trailingSpace,trailingSpaceNewLine:ye.trailingSpaceNewLine,md_inside:ye.md_inside,fencedEndRE:ye.fencedEndRE}},token:function(ye,fe){if(fe.formatting=!1,ye!=fe.thisLine.stream){if(fe.header=0,fe.hr=!1,ye.match(/^\s*$/,!0))return Ye(fe),null;if(fe.prevLine=fe.thisLine,fe.thisLine={stream:ye},fe.taskList=!1,fe.trailingSpace=0,fe.trailingSpaceNewLine=!1,!fe.localState&&(fe.f=fe.block,fe.f!=We)){var ut=ye.match(/^\s*/,!0)[0].replace(/\t/g,rt).length;if(fe.indentation=ut,fe.indentationDiff=null,ut>0)return null}}return fe.f(ye,fe)},innerMode:function(ye){return ye.block==We?{state:ye.htmlState,mode:ze}:ye.localState?{state:ye.localState,mode:ye.localMode}:{state:ye,mode:At}},indent:function(ye,fe,ut){return ye.block==We&&ze.indent?ze.indent(ye.htmlState,fe,ut):ye.localState&&ye.localMode.indent?ye.localMode.indent(ye.localState,fe,ut):re.Pass},blankLine:Ye,getType:Xe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return At},"xml"),re.defineMIME("text/markdown","markdown"),re.defineMIME("text/x-markdown","markdown")})},98101:function(Wt,Tt,le){(function(re){re(le(89780))})(function(re){"use strict";re.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 Je=0;Je<re.modeInfo.length;Je++){var me=re.modeInfo[Je];me.mimes&&(me.mime=me.mimes[0])}re.findModeByMIME=function(ze){ze=ze.toLowerCase();for(var be=0;be<re.modeInfo.length;be++){var Ce=re.modeInfo[be];if(Ce.mime==ze)return Ce;if(Ce.mimes){for(var Ne=0;Ne<Ce.mimes.length;Ne++)if(Ce.mimes[Ne]==ze)return Ce}}if(/\+xml$/.test(ze))return re.findModeByMIME("application/xml");if(/\+json$/.test(ze))return re.findModeByMIME("application/json")},re.findModeByExtension=function(ze){ze=ze.toLowerCase();for(var be=0;be<re.modeInfo.length;be++){var Ce=re.modeInfo[be];if(Ce.ext){for(var Ne=0;Ne<Ce.ext.length;Ne++)if(Ce.ext[Ne]==ze)return Ce}}},re.findModeByFileName=function(ze){for(var be=0;be<re.modeInfo.length;be++){var Ce=re.modeInfo[be];if(Ce.file&&Ce.file.test(ze))return Ce}var Ne=ze.lastIndexOf("."),$e=Ne>-1&&ze.substring(Ne+1,ze.length);if($e)return re.findModeByExtension($e)},re.findModeByName=function(ze){ze=ze.toLowerCase();for(var be=0;be<re.modeInfo.length;be++){var Ce=re.modeInfo[be];if(Ce.name.toLowerCase()==ze)return Ce;if(Ce.alias){for(var Ne=0;Ne<Ce.alias.length;Ne++)if(Ce.alias[Ne].toLowerCase()==ze)return Ce}}}})},67549:function(Wt,Tt,le){(function(re){re(le(89780))})(function(re){"use strict";re.defineMode("stex",function(Je,me){"use strict";function ze(Be,Me){Be.cmdState.push(Me)}function be(Be){return Be.cmdState.length>0?Be.cmdState[Be.cmdState.length-1]:null}function Ce(Be){var Me=Be.cmdState.pop();Me&&Me.closeBracket()}function Ne(Be){for(var Me=Be.cmdState,Re=Me.length-1;Re>=0;Re--){var Oe=Me[Re];if(Oe.name!="DEFAULT")return Oe}return{styleIdentifier:function(){return null}}}function $e(Be,Me,Re){return function(){this.name=Be,this.bracketNo=0,this.style=Me,this.styles=Re,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Se={};Se.importmodule=$e("importmodule","tag",["string","builtin"]),Se.documentclass=$e("documentclass","tag",["","atom"]),Se.usepackage=$e("usepackage","tag",["atom"]),Se.begin=$e("begin","tag",["atom"]),Se.end=$e("end","tag",["atom"]),Se.label=$e("label","tag",["atom"]),Se.ref=$e("ref","tag",["atom"]),Se.eqref=$e("eqref","tag",["atom"]),Se.cite=$e("cite","tag",["atom"]),Se.bibitem=$e("bibitem","tag",["atom"]),Se.Bibitem=$e("Bibitem","tag",["atom"]),Se.RBibitem=$e("RBibitem","tag",["atom"]),Se.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(Be,Me){Be.f=Me}function Ze(Be,Me){var Re;if(Be.match(/^\\[a-zA-Z@]+/)){var Oe=Be.current().slice(1);return Re=Se.hasOwnProperty(Oe)?Se[Oe]:Se.DEFAULT,Re=new Re,ze(Me,Re),de(Me,ot),Re.style}if(Be.match(/^\\[$&%#{}_]/)||Be.match(/^\\[,;!\/\\]/))return"tag";if(Be.match("\\["))return de(Me,function(gt,xt){return xe(gt,xt,"\\]")}),"keyword";if(Be.match("\\("))return de(Me,function(gt,xt){return xe(gt,xt,"\\)")}),"keyword";if(Be.match("$$"))return de(Me,function(gt,xt){return xe(gt,xt,"$$")}),"keyword";if(Be.match("$"))return de(Me,function(gt,xt){return xe(gt,xt,"$")}),"keyword";var rt=Be.next();if(rt=="%")return Be.skipToEnd(),"comment";if(rt=="}"||rt=="]"){if(Re=be(Me),Re)Re.closeBracket(rt),de(Me,ot);else return"error";return"bracket"}else return rt=="{"||rt=="["?(Re=Se.DEFAULT,Re=new Re,ze(Me,Re),"bracket"):/\d/.test(rt)?(Be.eatWhile(/[\w.%]/),"atom"):(Be.eatWhile(/[\w\-_]/),Re=Ne(Me),Re.name=="begin"&&(Re.argument=Be.current()),Re.styleIdentifier())}function xe(Be,Me,Re){if(Be.eatSpace())return null;if(Re&&Be.match(Re))return de(Me,Ze),"keyword";if(Be.match(/^\\[a-zA-Z@]+/))return"tag";if(Be.match(/^[a-zA-Z]+/))return"variable-2";if(Be.match(/^\\[$&%#{}_]/)||Be.match(/^\\[,;!\/]/)||Be.match(/^[\^_&]/))return"tag";if(Be.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Be.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Oe=Be.next();return Oe=="{"||Oe=="}"||Oe=="["||Oe=="]"||Oe=="("||Oe==")"?"bracket":Oe=="%"?(Be.skipToEnd(),"comment"):"error"}function ot(Be,Me){var Re=Be.peek(),Oe;return Re=="{"||Re=="["?(Oe=be(Me),Oe.openBracket(Re),Be.eat(Re),de(Me,Ze),"bracket"):/[ \t\r]/.test(Re)?(Be.eat(Re),null):(de(Me,Ze),Ce(Me),Ze(Be,Me))}return{startState:function(){var Be=me.inMathMode?function(Me,Re){return xe(Me,Re)}:Ze;return{cmdState:[],f:Be}},copyState:function(Be){return{cmdState:Be.cmdState.slice(),f:Be.f}},token:function(Be,Me){return Me.f(Be,Me)},blankLine:function(Be){Be.f=Ze,Be.cmdState.length=0},lineComment:"%"}}),re.defineMIME("text/x-stex","stex"),re.defineMIME("text/x-latex","stex")})},15525:function(Wt,Tt,le){(function(re){re(le(89780))})(function(re){"use strict";var Je={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},me={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};re.defineMode("xml",function(ze,be){var Ce=ze.indentUnit,Ne={},$e=be.htmlMode?Je:me;for(var Se in $e)Ne[Se]=$e[Se];for(var Se in be)Ne[Se]=be[Se];var de,Ze;function xe(Le,Ke){function et(Ie){return Ke.tokenize=Ie,Ie(Le,Ke)}var pe=Le.next();if(pe=="<")return Le.eat("!")?Le.eat("[")?Le.match("CDATA[")?et(Me("atom","]]>")):null:Le.match("--")?et(Me("comment","-->")):Le.match("DOCTYPE",!0,!0)?(Le.eatWhile(/[\w\._\-]/),et(Re(1))):null:Le.eat("?")?(Le.eatWhile(/[\w\._\-]/),Ke.tokenize=Me("meta","?>"),"meta"):(de=Le.eat("/")?"closeTag":"openTag",Ke.tokenize=ot,"tag bracket");if(pe=="&"){var Ct;return Le.eat("#")?Le.eat("x")?Ct=Le.eatWhile(/[a-fA-F\d]/)&&Le.eat(";"):Ct=Le.eatWhile(/[\d]/)&&Le.eat(";"):Ct=Le.eatWhile(/[\w\.\-:]/)&&Le.eat(";"),Ct?"atom":"error"}else return Le.eatWhile(/[^&<]/),null}xe.isInText=!0;function ot(Le,Ke){var et=Le.next();if(et==">"||et=="/"&&Le.eat(">"))return Ke.tokenize=xe,de=et==">"?"endTag":"selfcloseTag","tag bracket";if(et=="=")return de="equals",null;if(et=="<"){Ke.tokenize=xe,Ke.state=xt,Ke.tagName=Ke.tagStart=null;var pe=Ke.tokenize(Le,Ke);return pe?pe+" tag error":"tag error"}else return/[\'\"]/.test(et)?(Ke.tokenize=Be(et),Ke.stringStartCol=Le.column(),Ke.tokenize(Le,Ke)):(Le.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Be(Le){var Ke=function(et,pe){for(;!et.eol();)if(et.next()==Le){pe.tokenize=ot;break}return"string"};return Ke.isInAttribute=!0,Ke}function Me(Le,Ke){return function(et,pe){for(;!et.eol();){if(et.match(Ke)){pe.tokenize=xe;break}et.next()}return Le}}function Re(Le){return function(Ke,et){for(var pe;(pe=Ke.next())!=null;){if(pe=="<")return et.tokenize=Re(Le+1),et.tokenize(Ke,et);if(pe==">")if(Le==1){et.tokenize=xe;break}else return et.tokenize=Re(Le-1),et.tokenize(Ke,et)}return"meta"}}function Oe(Le,Ke,et){this.prev=Le.context,this.tagName=Ke,this.indent=Le.indented,this.startOfLine=et,(Ne.doNotIndent.hasOwnProperty(Ke)||Le.context&&Le.context.noIndent)&&(this.noIndent=!0)}function rt(Le){Le.context&&(Le.context=Le.context.prev)}function gt(Le,Ke){for(var et;;){if(!Le.context||(et=Le.context.tagName,!Ne.contextGrabbers.hasOwnProperty(et)||!Ne.contextGrabbers[et].hasOwnProperty(Ke)))return;rt(Le)}}function xt(Le,Ke,et){return Le=="openTag"?(et.tagStart=Ke.column(),at):Le=="closeTag"?Ye:xt}function at(Le,Ke,et){return Le=="word"?(et.tagName=Ke.current(),Ze="tag",St):Ne.allowMissingTagName&&Le=="endTag"?(Ze="tag bracket",St(Le,Ke,et)):(Ze="error",at)}function Ye(Le,Ke,et){if(Le=="word"){var pe=Ke.current();return et.context&&et.context.tagName!=pe&&Ne.implicitlyClosed.hasOwnProperty(et.context.tagName)&&rt(et),et.context&&et.context.tagName==pe||Ne.matchClosing===!1?(Ze="tag",st):(Ze="tag error",We)}else return Ne.allowMissingTagName&&Le=="endTag"?(Ze="tag bracket",st(Le,Ke,et)):(Ze="error",We)}function st(Le,Ke,et){return Le!="endTag"?(Ze="error",st):(rt(et),xt)}function We(Le,Ke,et){return Ze="error",st(Le,Ke,et)}function St(Le,Ke,et){if(Le=="word")return Ze="attribute",Xe;if(Le=="endTag"||Le=="selfcloseTag"){var pe=et.tagName,Ct=et.tagStart;return et.tagName=et.tagStart=null,Le=="selfcloseTag"||Ne.autoSelfClosers.hasOwnProperty(pe)?gt(et,pe):(gt(et,pe),et.context=new Oe(et,pe,Ct==et.indented)),xt}return Ze="error",St}function Xe(Le,Ke,et){return Le=="equals"?_e:(Ne.allowMissing||(Ze="error"),St(Le,Ke,et))}function _e(Le,Ke,et){return Le=="string"?ft:Le=="word"&&Ne.allowUnquoted?(Ze="string",St):(Ze="error",St(Le,Ke,et))}function ft(Le,Ke,et){return Le=="string"?ft:St(Le,Ke,et)}return{startState:function(Le){var Ke={tokenize:xe,state:xt,indented:Le||0,tagName:null,tagStart:null,context:null};return Le!=null&&(Ke.baseIndent=Le),Ke},token:function(Le,Ke){if(!Ke.tagName&&Le.sol()&&(Ke.indented=Le.indentation()),Le.eatSpace())return null;de=null;var et=Ke.tokenize(Le,Ke);return(et||de)&&et!="comment"&&(Ze=null,Ke.state=Ke.state(de||et,Le,Ke),Ze&&(et=Ze=="error"?et+" error":Ze)),et},indent:function(Le,Ke,et){var pe=Le.context;if(Le.tokenize.isInAttribute)return Le.tagStart==Le.indented?Le.stringStartCol+1:Le.indented+Ce;if(pe&&pe.noIndent)return re.Pass;if(Le.tokenize!=ot&&Le.tokenize!=xe)return et?et.match(/^(\s*)/)[0].length:0;if(Le.tagName)return Ne.multilineTagIndentPastTag!==!1?Le.tagStart+Le.tagName.length+2:Le.tagStart+Ce*(Ne.multilineTagIndentFactor||1);if(Ne.alignCDATA&&/<!\[CDATA\[/.test(Ke))return 0;var Ct=Ke&&/^<(\/)?([\w_:\.-]*)/.exec(Ke);if(Ct&&Ct[1])for(;pe;)if(pe.tagName==Ct[2]){pe=pe.prev;break}else if(Ne.implicitlyClosed.hasOwnProperty(pe.tagName))pe=pe.prev;else break;else if(Ct)for(;pe;){var Ie=Ne.contextGrabbers[pe.tagName];if(Ie&&Ie.hasOwnProperty(Ct[2]))pe=pe.prev;else break}for(;pe&&pe.prev&&!pe.startOfLine;)pe=pe.prev;return pe?pe.indent+Ce:Le.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ne.htmlMode?"html":"xml",helperType:Ne.htmlMode?"html":"xml",skipAttribute:function(Le){Le.state==_e&&(Le.state=St)},xmlCurrentTag:function(Le){return Le.tagName?{name:Le.tagName,close:Le.type=="closeTag"}:null},xmlCurrentContext:function(Le){for(var Ke=[],et=Le.context;et;et=et.prev)et.tagName&&Ke.push(et.tagName);return Ke.reverse()}}}),re.defineMIME("text/xml","xml"),re.defineMIME("application/xml","xml"),re.mimeModes.hasOwnProperty("text/html")||re.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(Wt,Tt,le){"use strict";le.d(Tt,{hP:function(){return tt}});var re=function(ae,ee){return(re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,ie){z.__proto__=ie}||function(z,ie){for(var se in ie)Object.prototype.hasOwnProperty.call(ie,se)&&(z[se]=ie[se])})(ae,ee)};function Je(ae,ee){function z(){this.constructor=ae}re(ae,ee),ae.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function me(ae,ee,z,ie){return new(z||(z=Promise))(function(se,ne){function we(je){try{It(ie.next(je))}catch(Qe){ne(Qe)}}function Ve(je){try{It(ie.throw(je))}catch(Qe){ne(Qe)}}function It(je){var Qe;je.done?se(je.value):(Qe=je.value,Qe instanceof z?Qe:new z(function(ht){ht(Qe)})).then(we,Ve)}It((ie=ie.apply(ae,ee||[])).next())})}function ze(ae,ee){var z,ie,se,ne,we={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(It){return function(je){return function(Qe){if(z)throw new TypeError("Generator is already executing.");for(;we;)try{if(z=1,ie&&(se=2&Qe[0]?ie.return:Qe[0]?ie.throw||((se=ie.return)&&se.call(ie),0):ie.next)&&!(se=se.call(ie,Qe[1])).done)return se;switch(ie=0,se&&(Qe=[2&Qe[0],se.value]),Qe[0]){case 0:case 1:se=Qe;break;case 4:return we.label++,{value:Qe[1],done:!1};case 5:we.label++,ie=Qe[1],Qe=[0];continue;case 7:Qe=we.ops.pop(),we.trys.pop();continue;default:if(se=we.trys,!((se=se.length>0&&se[se.length-1])||Qe[0]!==6&&Qe[0]!==2)){we=0;continue}if(Qe[0]===3&&(!se||Qe[1]>se[0]&&Qe[1]<se[3])){we.label=Qe[1];break}if(Qe[0]===6&&we.label<se[1]){we.label=se[1],se=Qe;break}if(se&&we.label<se[2]){we.label=se[2],we.ops.push(Qe);break}se[2]&&we.ops.pop(),we.trys.pop();continue}Qe=ee.call(ae,we)}catch(ht){Qe=[6,ht],ie=0}finally{z=se=0}if(5&Qe[0])throw Qe[1];return{value:Qe[0]?Qe[1]:void 0,done:!0}}([It,je])}}}function be(){for(var ae=0,ee=0,z=arguments.length;ee<z;ee++)ae+=arguments[ee].length;var ie=Array(ae),se=0;for(ee=0;ee<z;ee++)for(var ne=arguments[ee],we=0,Ve=ne.length;we<Ve;we++,se++)ie[se]=ne[we];return ie}var Ce=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(ee,z){for(var ie=0,se=z;ie<se.length;ie++){var ne=se[ie],we=ne[0],Ve=ne[1];ee.setAttribute(we,Ve)}},ae.createRect=function(ee,z,ie){var se=document.createElementNS("http://www.w3.org/2000/svg","rect");return se.setAttribute("width",ee.toString()),se.setAttribute("height",z.toString()),ie&&ae.setAttributes(se,ie),se},ae.createLine=function(ee,z,ie,se,ne){var we=document.createElementNS("http://www.w3.org/2000/svg","line");return we.setAttribute("x1",ee.toString()),we.setAttribute("y1",z.toString()),we.setAttribute("x2",ie.toString()),we.setAttribute("y2",se.toString()),ne&&ae.setAttributes(we,ne),we},ae.createPolygon=function(ee,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",ee),z&&ae.setAttributes(ie,z),ie},ae.createCircle=function(ee,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(ee/2).toString()),ie.setAttribute("cy",(ee/2).toString()),ie.setAttribute("r",ee.toString()),z&&ae.setAttributes(ie,z),ie},ae.createEllipse=function(ee,z,ie){var se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return se.setAttribute("cx",(ee/2).toString()),se.setAttribute("cy",(z/2).toString()),se.setAttribute("rx",(ee/2).toString()),se.setAttribute("ry",(z/2).toString()),ie&&ae.setAttributes(se,ie),se},ae.createGroup=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return ee&&ae.setAttributes(z,ee),z},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(ee,z,ie,se,ne,we,Ve){var It=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(It,[["id",ee],["orient",z],["markerWidth",ie.toString()],["markerHeight",se.toString()],["refX",ne.toString()],["refY",we.toString()]]),It.appendChild(Ve),It},ae.createText=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),ee&&ae.setAttributes(z,ee),z},ae.createTSpan=function(ee,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=ee,z&&ae.setAttributes(ie,z),ie},ae.createImage=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return ee&&ae.setAttributes(z,ee),z},ae.createPoint=function(ee,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=ee,ie.y=z,ie},ae.createPath=function(ee,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",ee),z&&ae.setAttributes(ie,z),ie},ae}(),Ne=function(){function ae(){}return ae.addKey=function(ee){ae.key=ee},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(ee,z,ie){var se=this;return new Promise(function(ne){var we=ie!==void 0?ie:document.createElement("canvas");ee===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=ee.naturalWidth,Ve.height.baseVal.value=ee.naturalHeight):se.width!==void 0&&se.height!==void 0&&(Ve.width.baseVal.value=se.width,Ve.height.baseVal.value=se.height),we.width=Ve.width.baseVal.value,we.height=Ve.height.baseVal.value;var It=Ve.outerHTML,je=we.getContext("2d");se.markersOnly!==!0&&je.drawImage(ee,0,0,we.width,we.height);var Qe=window.URL,ht=new Image(we.width,we.height);ht.setAttribute("crossOrigin","anonymous");var Dt=new Blob([It],{type:"image/svg+xml"}),kt=Qe.createObjectURL(Dt);ht.onload=function(){je.drawImage(ht,0,0),Qe.revokeObjectURL(kt);var Gt=we.toDataURL(se.imageType,se.imageQuality);ne(Gt)},ht.src=kt})},ae}(),Se=function(){},de=function(){function ae(ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ee+"_"}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(ee){return this.styleSheet===void 0&&this.addStyleSheet(),ee.name=""+this.classNamePrefix+ee.localName,this.classes.push(ee),this.styleSheet.sheet.insertRule("."+ee.name+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length),ee},ae.prototype.addRule=function(ee){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ee),this.styleSheet.sheet.insertRule(ee.selector+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length)},ae.prototype.addStyleSheet=function(){var ee;this.styleSheet=document.createElement("style"),((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).appendChild(this.styleSheet),this.addRule(new Ze("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ze("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ze("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new xe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new xe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},ae.prototype.removeStyleSheet=function(){var ee;this.styleSheet&&(((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),Ze=function(ae,ee){this.selector=ae,this.style=ee},xe=function(ae,ee){this.localName=ae,this.style=ee},ot=function(){function ae(ee,z,ie,se,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ee,this.displayMode=z,this.markerItems=ie,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(ee){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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 we=document.createElement("div");we.className=""+z.toolbarButtonStyleClass.name,we.setAttribute("data-type-name",ne.typeName),we.innerHTML=ne.icon,we.addEventListener("click",function(){z.markerToolbarButtonClicked(we,ne)}),z.buttons.push(we),z.markerButtons.push(we)}),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(ee){this.buttonClickListeners.push(ee)},ae.prototype.removeButtonClickListener=function(ee){this.buttonClickListeners.indexOf(ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ee),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ee=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<ee||z===ee&&this.markerButtons.length-1===ee?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===ee&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},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 ee=this;this.buttons.forEach(function(z){z.className=z.className.replace(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ee.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(ee,z,ie){var se=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){se.actionToolbarButtonClicked(ne,ie)}),ie){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}ee.appendChild(ne),this.buttons.push(ne)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new xe("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 xe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new xe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new xe("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 xe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new xe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
padding: `+ee+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new xe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new xe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ze("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ze("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},ae.prototype.markerToolbarButtonClicked=function(ee,z){this.setActiveButton(ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(ee,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(ee){this.resetButtonStyles(),ee.className=ee.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(ee){var z=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===ee});z&&this.setActiveButton(z)},ae.prototype.setCurrentMarker=function(ee){var z=this;this.currentMarker=ee,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){z.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},ae}(),Be=function(){function ae(ee,z,ie,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=ee,this.displayMode=z,this.uiStyleSettings=ie,this.styles=se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var ee;this.toolboxStyleClass=this.styles.addClass(new xe("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 xe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new xe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new xe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new xe("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 xe("toolbox-panel-row_colors",`
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new xe("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 xe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new xe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ze("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ze("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},ae.prototype.show=function(ee){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(ee){var z,ie,se=this;this.panels=ee,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var we;ne.uiStyleSettings=se.uiStyleSettings;var Ve=document.createElement("div");Ve.className=se.toolboxButtonStyleClass.name+" "+((we=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&we!==void 0?we: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(ee){var z=this,ie=-1;if(ee!==this.activePanel){ie=this.panels.indexOf(ee),this.panelRow.innerHTML="";var se=ee.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=ee}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,we){var Ve,It;ne.className=z.toolboxButtonStyleClass.name+" "+(we===ie?""+((Ve=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:z.toolboxActiveButtonStyleColorsClass.name):""+((It=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&It!==void 0?It:z.toolboxButtonStyleColorsClass.name))})},ae}(),Me=function(ae,ee){this.title=ae,this.icon=ee},Re=function(ae){function ee(z,ie,se,ne){var we=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 we.colors=[],we.addTransparent=!1,we.colorBoxes=[],we.colors=ie,we.currentColor=se,we.setCurrentColor=we.setCurrentColor.bind(we),we.getColorBox=we.getColorBox.bind(we),we}return Je(ee,ae),ee.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(se){var ne=z.getColorBox(se);ie.appendChild(ne),z.colorBoxes.push(ne)}),ie},ee.prototype.getColorBox=function(z){var ie=this,se=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-se,we=document.createElement("div");we.style.display="inline-block",we.style.boxSizing="content-box",we.style.width=ne-2+"px",we.style.height=ne-2+"px",we.style.padding="1px",we.style.marginRight="2px",we.style.marginBottom="2px",we.style.borderWidth="2px",we.style.borderStyle="solid",we.style.borderRadius=(ne+2)/2+"px",we.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",we.addEventListener("click",function(){ie.setCurrentColor(z,we)});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>`),we.appendChild(Ve),we},ee.prototype.setCurrentColor=function(z,ie){var se=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ee}(Me),Oe=function(){function ae(ee,z,ie){this._state="new",this._isSelected=!1,this._container=ee,this._overlayContainer=z,this.globalSettings=ie,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(ee){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(ee,z){},ae.prototype.dblClick=function(ee,z){},ae.prototype.manipulate=function(ee){},ae.prototype.pointerUp=function(ee){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(ee){this.container.childNodes.length>0?this.container.insertBefore(ee,this.container.childNodes[0]):this.container.appendChild(ee)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(ee){this._state=ee.state,this.notes=ee.notes},ae.prototype.scale=function(ee,z){},ae.prototype.colorChanged=function(ee){this.onColorChanged&&this.onColorChanged(ee),this.stateChanged()},ae.prototype.fillColorChanged=function(ee){this.onFillColorChanged&&this.onFillColorChanged(ee),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ee=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ee.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ee)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),rt=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(ee){return this.topLeft.ownsTarget(ee)?this.topLeft:this.topCenter.ownsTarget(ee)?this.topCenter:this.topRight.ownsTarget(ee)?this.topRight:this.centerLeft.ownsTarget(ee)?this.centerLeft:this.centerRight.ownsTarget(ee)?this.centerRight:this.bottomLeft.ownsTarget(ee)?this.bottomLeft:this.bottomCenter.ownsTarget(ee)?this.bottomCenter:this.bottomRight.ownsTarget(ee)?this.bottomRight:void 0},ae}(),gt=function(){function ae(){this.GRIP_SIZE=10,this.visual=Ce.createGroup(),this.visual.appendChild(Ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(ee){return ee===this.visual||ee===this.visual.childNodes[0]||ee===this.visual.childNodes[1]},ae}(),xt=function(){function ae(){}return ae.toITransformMatrix=function(ee){return{a:ee.a,b:ee.b,c:ee.c,d:ee.d,e:ee.e,f:ee.f}},ae.toSVGMatrix=function(ee,z){return ee.a=z.a,ee.b=z.b,ee.c=z.c,ee.d=z.d,ee.e=z.e,ee.f=z.f,ee},ae}(),at=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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(Ce.createTransform()),ne.setupControlBox(),ne}return Je(ee,ae),Object.defineProperty(ee.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var ie=Ce.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),ee.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))},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),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(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){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 we=this.container.transform.baseVal.getItem(0);we.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(we,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ee.prototype.pointerUp=function(z){var ie=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",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ee.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},ee.prototype.manipulate=function(z){var ie=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(z)},ee.prototype.resize=function(z){var ie=this.manipulationStartLeft,se=this.manipulationStartWidth,ne=this.manipulationStartTop,we=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+z.x-this.manipulationStartX,se=this.manipulationStartWidth+this.manipulationStartLeft-ie;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,we=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:we=this.manipulationStartHeight+z.y-this.manipulationStartY}se>=0?(this.left=ie,this.width=se):(this.left=ie+se,this.width=-se),we>=0?(this.top=ne,this.height=we):(this.top=ne+we,this.height=-we),this.setSize()},ee.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ee.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var ie=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},ee.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},ee.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM(),se=Ce.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(ie)).x,y:se.y}},ee.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM();ie=ie.inverse();var se=Ce.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(ie)).x,y:se.y}},ee.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=Ce.createGroup();var z=Ce.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=Ce.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=Ce.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new rt,this.addControlGrips(),this.controlBox.style.display="none"},ee.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},ee.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},ee.prototype.createGrip=function(){var z=new gt;return z.visual.transform.baseVal.appendItem(Ce.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,ie=-z/2,se=ie,ne=(this.width+this.CB_DISTANCE)/2-z/2,we=(this.height+this.CB_DISTANCE)/2-z/2,Ve=this.height+this.CB_DISTANCE-z/2,It=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,se),this.positionGrip(this.controlGrips.topCenter.visual,ne,se),this.positionGrip(this.controlGrips.topRight.visual,It,se),this.positionGrip(this.controlGrips.centerLeft.visual,ie,we),this.positionGrip(this.controlGrips.centerRight.visual,It,we),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,Ve),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Ve),this.positionGrip(this.controlGrips.bottomRight.visual,It,Ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,se-3*this.CB_DISTANCE)},ee.prototype.positionGrip=function(z,ie,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,se),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ee.prototype.showControlBox=function(){this.controlBox.style.display=""},ee.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:xt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:xt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},ee.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var ie=z;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(xt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(xt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie);var se=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:se.x*z,y:se.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*ie,this.adjustControlBox()},ee}(Oe),Ye=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Je(ee,ae),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=Ce.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){ae.prototype.setSize.call(this),Ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&Ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},ee.prototype.restoreState=function(z){var ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.setSize()},ee.title="Rectangle marker",ee}(at),st=function(ae){function ee(z,ie,se,ne){var we=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return we.widths=[],we.widthBoxes=[],we.widths=ie,we.currentWidth=se,we.setCurrentWidth=we.setCurrentWidth.bind(we),we}return Je(ee,ae),ee.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.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)}),ie.appendChild(ne);var we=document.createElement("div");we.innerText=se.toString(),we.style.marginRight="5px",ne.appendChild(we);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.display="flex",Ve.style.alignItems="center";var It=document.createElement("hr");It.style.minWidth="20px",It.style.border="0px",It.style.borderTop=se+"px solid "+z.uiStyleSettings.toolboxColor,It.style.flexGrow="2",Ve.appendChild(It),ne.appendChild(Ve),z.widthBoxes.push(ne)}),ie},ee.prototype.setCurrentWidth=function(z,ie){var se=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ee}(Me),We=function(ae){function ee(z,ie,se,ne){var we=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 we.styles=[],we.styleBoxes=[],we.styles=ie,we.currentStyle=se,we.setCurrentStyle=we.setCurrentStyle.bind(we),we}return Je(ee,ae),ee.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.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)}),ie.appendChild(ne);var we=document.createElement("div");we.style.minHeight="20px",we.style.flexGrow="2",we.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>`;we.innerHTML=Ve,ne.appendChild(we),z.styleBoxes.push(ne)}),ie},ee.prototype.setCurrentStyle=function(z,ie){var se=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ee}(Me),St=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.strokeColor=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Re("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new st("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new We("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Je(ee,ae),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="FrameMarker",ee.title="Frame marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ee}(Ye),Xe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},_e=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Je(ee,ae),ee.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),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(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ee.prototype.pointerUp=function(z){var ie=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",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ee.prototype.adjustVisual=function(){},ee.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},ee.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},ee.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=Ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ee.prototype.adjustControlBox=function(){this.positionGrips()},ee.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ee.prototype.createGrip=function(){var z=new gt;return z.visual.transform.baseVal.appendItem(Ce.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},ee.prototype.positionGrip=function(z,ie,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,se),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},ee.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var ie=z;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.x1=this.x1*z,this.y1=this.y1*ie,this.x2=this.x2*z,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},ee}(Oe),ft=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Re("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new st("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new We("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Je(ee,ae),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},ee.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.selectorLine=Ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ee.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var ie=z;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},ee.typeName="LineMarker",ee.title="Line marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ee}(_e),Le=function(ae){function ee(z,ie,se,ne){var we=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 we.fonts=[],we.fontBoxes=[],we.fonts=ie,we.currentFont=se,we.setCurrentFont=we.setCurrentFont.bind(we),we}return Je(ee,ae),ee.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.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)}),ie.appendChild(ne);var we=document.createElement("div");we.style.display="flex",we.style.minHeight="20px",we.style.flexGrow="2",we.style.fontFamily=se,we.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",we.appendChild(Ve),ne.appendChild(we),z.fontBoxes.push(ne)}),ie},ee.prototype.setCurrentFont=function(z,ie){var se=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ee}(Me),Ke=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Re("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 Je(ee,ae),ee.prototype.ownsTarget=function(z){if(ae.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(se){se===z&&(ie=!0)}),ie},ee.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.bgRectangle=Ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ce.createTransform()),this.textElement.transform.baseVal.appendItem(Ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.renderText=function(){var z=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ie){z.textElement.appendChild(Ce.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ee.prototype.getTextScale=function(){var z=this.textElement.getBBox(),ie=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;ie=Math.min(se,ne)}return ie},ee.prototype.getTextPosition=function(z){var ie=this.textElement.getBBox(),se=0,ne=0;return ie.width>0&&ie.height>0&&(se=(this.width-ie.width*z)/2,ne=this.height/2-ie.height*z/2),{x:se,y:ne}},ee.prototype.sizeText=function(){var z=this.textElement.getBBox(),ie=this.getTextScale(),se=this.getTextPosition(ie);se.y-=z.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},ee.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)},ee.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},ee.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ee.prototype.pointerUp=function(z){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,z),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ee.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,z.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var se=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(se)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ee.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),ie=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};ie.x-=ne.x/2,ie.y-=ne.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},ee.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ee.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},ee.prototype.dblClick=function(z,ie){ae.prototype.dblClick.call(this,z,ie),this.showTextEditor()},ee.prototype.setColor=function(z){this.textElement&&Ce.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},ee.prototype.setFont=function(z){this.textElement&&Ce.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ee.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ee.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var ie=z;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},ee.typeName="TextMarker",ee.title="Text marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',ee}(at),et=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Re("Color",se.defaultColorSet,se.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new st("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Je(ee,ae),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},ee.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.drawingImage=Ce.createImage(),this.visual.appendChild(this.drawingImage);var z=Ce.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,ie){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,ie)},ee.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)},ee.prototype.resize=function(z){ae.prototype.resize.call(this,z),Ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,z)},ee.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},ee.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},ee.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],se=ie[0],ne=ie[1],we=ie[2],Ve=ie[3],It=!1,je=0;je<this.canvasElement.height;je++)for(var Qe=0;Qe<this.canvasElement.width;Qe++)z.data[je*this.canvasElement.width*4+4*Qe+3]>0&&(It=!0,je<ne&&(ne=je),Qe<se&&(se=Qe),je>Ve&&(Ve=je),Qe>we&&(we=Qe));if(It){this.left=se/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(we-se)/this.pixelRatio,this.height=(Ve-ne)/this.pixelRatio;var ht=document.createElement("canvas");ht.width=we-se,ht.height=Ve-ne,ht.getContext("2d").putImageData(this.canvasContext.getImageData(se,ne,we-se,Ve-ne),0,0),this.drawingImgUrl=ht.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ee.prototype.setDrawingImage=function(){Ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ee.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},ee.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){this.createVisual(),ae.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.setDrawingImage()},ee.typeName="FreehandMarker",ee.title="Freehand marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',ee}(at),pe=function(ae){function ee(z,ie,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=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Je(ee,ae),ee.prototype.getUi=function(){var z=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var se=function(Ve){var It="both";switch(Ve){case 0:It="both";break;case 1:It="start";break;case 2:It="end";break;case 3:It="none"}var je=document.createElement("div");if(je.style.display="flex",je.style.flexGrow="2",je.style.alignItems="center",je.style.justifyContent="space-between",je.style.padding="5px",je.style.borderWidth="2px",je.style.borderStyle="solid",je.style.borderColor=It===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",je.addEventListener("click",function(){z.setCurrentType(It,je)}),ie.appendChild(je),It==="both"||It==="start"){var Qe=document.createElement("div");Qe.style.display="flex",Qe.style.alignItems="center",Qe.style.minHeight="20px",Qe.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>`,Qe.style.marginLeft="5px",je.appendChild(Qe)}var ht=document.createElement("div");ht.style.display="flex",ht.style.alignItems="center",ht.style.minHeight="20px",ht.style.flexGrow="2";var Dt=document.createElement("hr");if(Dt.style.minWidth="20px",Dt.style.border="0px",Dt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Dt.style.flexGrow="2",ht.appendChild(Dt),je.appendChild(ht),It==="both"||It==="end"){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.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>`,kt.style.marginRight="5px",je.appendChild(kt)}ne.typeBoxes.push(je)},ne=this,we=0;we<4;we++)se(we);return ie},ee.prototype.setCurrentType=function(z,ie){var se=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ee}(Me),Ct=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 pe("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Je(ee,ae),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},ee.prototype.getArrowPoints=function(z,ie){var se=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-se/2+","+(ie+ne/2)+" "+z+","+(ie-ne/2)+" "+(z+se/2)+","+(ie+ne/2)},ee.prototype.createTips=function(){this.arrow1=Ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ce.createTransform()),this.visual.appendChild(this.arrow2)},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.state==="creating"&&this.createTips()},ee.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",Ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ce.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 ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},ee.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var ie=z;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},ee.typeName="ArrowMarker",ee.title="Arrow marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ee}(ft),Ie=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.fillColor=se.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Re("Color",se.defaultColorSet,se.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Je(ee,ae),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="CoverMarker",ee.title="Cover marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ee}(Ye),wt=function(ae){function ee(z,ie,se,ne){var we=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 we.opacities=[],we.opacityBoxes=[],we.opacities=ie,we.currentOpacity=se,we.setCurrentOpacity=we.setCurrentOpacity.bind(we),we}return Je(ee,ae),ee.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.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)}),ie.appendChild(ne);var we=document.createElement("div");we.innerText=100*se+"%",ne.appendChild(we),z.opacityBoxes.push(ne)}),ie},ee.prototype.setCurrentOpacity=function(z,ie){var se=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ee}(Me),At=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=se.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=se.defaultHighlightOpacity,ne.fillPanel=new Re("Color",se.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new wt("Opacity",se.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Je(ee,ae),ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="HighlightMarker",ee.title="Highlight marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',ee}(Ie),ye='<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>',fe='<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>',ut=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Re("Text color",se.defaultColorSet,ne.color,ye),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Re("Fill color",se.defaultColorSet,ne.bgColor,fe),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Le("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new gt,ne.tipGrip.visual.transform.baseVal.appendItem(Ce.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Je(ee,ae),ee.prototype.ownsTarget=function(z){return ae.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},ee.prototype.createTip=function(){Ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ee.prototype.pointerDown=function(z,ie){this.state==="new"&&ae.prototype.pointerDown.call(this,z,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,z,ie)},ee.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,z);else{var ie=this.state==="creating";ae.prototype.pointerUp.call(this,z),this.setTipPoints(ie),this.positionTip()}},ee.prototype.manipulate=function(z){if(this.tipMoving){var ie=this.unrotatePoint(z);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,z)},ee.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(Ce.setAttributes(this.bgRectangle,[["fill",z]]),Ce.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},ee.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},ee.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var ie=Math.min(this.height/2,15),se=this.height/5;z&&(this.tipPosition={x:ie+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,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+se,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+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,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-se,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+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,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-se,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-se},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(se=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+se,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-se})},ee.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.positionTip()},ee.prototype.positionTip=function(){Ce.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.positionTip(),ae.prototype.select.call(this)},ee.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var ie=z;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,ae.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*ie},this.positionTip()},ee.typeName="CalloutMarker",ee.title="Callout marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',ee}(Ke),_t=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Re("Line color",be(se.defaultColorSet,["transparent"]),se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Re("Fill color",be(se.defaultColorSet,["transparent"]),ne.fillColor,fe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new st("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new We("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new wt("Opacity",se.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Je(ee,ae),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=Ce.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){ae.prototype.setSize.call(this),Ce.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ee.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&Ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.setSize()},ee.typeName="EllipseMarker",ee.title="Ellipse marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',ee}(at),bt=function(ae){function ee(z,ie,se){return ae.call(this,z,ie,se)||this}return Je(ee,ae),Object.defineProperty(ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},ee.prototype.createTips=function(){this.tip1=Ce.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(Ce.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ce.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(Ce.createTransform()),this.visual.appendChild(this.tip2)},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ce.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()]]),Ce.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),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,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(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},ee.typeName="MeasurementMarker",ee.title="Measurement marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',ee}(ft),Ae=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,se)||this;return ne.strokePanel.colors=se.defaultColorSet,ne.fillColor="transparent",ne}return Je(ee,ae),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="EllipseFrameMarker",ee.title="Ellipse frame marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',ee}(_t),nt=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(ee){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ee)||(this.undoStack.push(ee),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ee)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ee)},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 ee=this.undoStack.pop();return ee!==void 0&&this.redoStack.push(ee),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}(),dt=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Re("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new st("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new We("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Je(ee,ae),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},ee.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ee.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.selectorCurve=Ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ce.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),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(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},ee.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=Ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ce.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},ee.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},ee.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()))},ee.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)},ee.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)},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},ee.prototype.scale=function(z,ie){this.curveX=this.curveX*z,this.curveY=this.curveY*ie,ae.prototype.scale.call(this,z,ie)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var ie=z;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},ee.typeName="CurveMarker",ee.title="Curve marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',ee}(_e),rn=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,ie,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 Re("Line color",be(se.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Re("Fill color",be(se.defaultColorSet,["transparent"]),ne.fillColor,fe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new st("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new We("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 Re("Text color",se.defaultColorSet,ne.textColor,ye),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Je(ee,ae),ee.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},ee.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ce.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ce.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=Ce.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},ee.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},ee.prototype.pointerDown=function(z,ie){ae.prototype.pointerDown.call(this,z,ie),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){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)},ee.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},ee.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ce.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')"]]),Ce.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},ee.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ie){ie.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ee.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},ee.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ee.prototype.setFont=function(z){this.captionElement&&Ce.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ee.prototype.setTextColor=function(z){this.captionElement&&Ce.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ee.prototype.setSize=function(){ae.prototype.setSize.call(this),Ce.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ee.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},ee.prototype.dblClick=function(z,ie){ae.prototype.dblClick.call(this,z,ie),this.showTextEditor()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&Ce.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&Ce.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&Ce.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&Ce.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},ae.prototype.getState.call(this));return z.typeName=this.typeName,z},ee.prototype.restoreState=function(z){var ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.textColor=ie.textColor,this.fontFamily=ie.fontFamily,this.captionText=ie.captionText,this.fontSize=ie.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,ie){ae.prototype.scale.call(this,z,ie),this.setSize()},ee.typeName="CaptionFrameMarker",ee.title="Caption frame marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',ee}(at),Et=function(){function ae(ee,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ee,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}(),Ut=function(ae){function ee(z,ie,se){var ne=ae.call(this,z,!1)||this;return ne.dataUrl=ie,ne.state=se,ne}return Je(ee,ae),ee}(Et),Ge=function(ae){function ee(z,ie,se){se===void 0&&(se=!1);var ne=ae.call(this,z,se)||this;return ne.marker=ie,ne}return Je(ee,ae),ee}(Et),Pt=function(){function ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ae.prototype.addEventListener=function(ee,z){this[ee].push(z)},ae.prototype.removeEventListener=function(ee,z){var ie=this[ee].indexOf(z);ie>-1&&this[ee].splice(ie,1)},ae}(),tt=function(){function ae(ee){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Xe,this._isOpen=!1,this.undoRedoManager=new nt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Pt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new de(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ee,this.targetRoot=document.body,this.width=ee.clientWidth,this.height=ee.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[St,et,Ct,Ke,Ae,_t,At,ut,bt,Ie,ft,dt,rn]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[St,et,Ct,Ke,_t,At,ut]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[St,et,Ct,Ke,At]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ee){var z=this;this._availableMarkerTypes.splice(0),ee.forEach(function(ie){if(typeof ie=="string"){var se=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});se!==void 0&&z._availableMarkerTypes.push(se)}else z._availableMarkerTypes.push(ie)})},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(ee){this._zoomLevel=ee,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(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(),Ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var ee=this;this.styles.styleSheetRoot===void 0&&Se.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Se.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Et(ee))})},ae.prototype.render=function(){return me(this,void 0,void 0,function(){var ee;return ze(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new $e).naturalSize=this.renderAtNaturalSize,ee.imageType=this.renderImageType,ee.imageQuality=this.renderImageQuality,ee.markersOnly=this.renderMarkersOnly,ee.width=this.renderWidth,ee.height=this.renderHeight,[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},ae.prototype.close=function(ee){var z=this;if(ee===void 0&&(ee=!1),this.isOpen){var ie=!1;ee||this.eventListeners.beforeclose.forEach(function(se){var ne=new Et(z,!0);se(ne),ne.defaultPrevented&&(ie=!0)}),ie||(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 Et(z))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var ee,z=[],ie=0;ie<arguments.length;ie++)z[ie]=arguments[ie];(ee=this._availableMarkerTypes).push.apply(ee,z)},ae.prototype.addRenderEventListener=function(ee){this.addEventListener("render",function(z){ee(z.dataUrl,z.state)})},ae.prototype.removeRenderEventListener=function(ee){},ae.prototype.addCloseEventListener=function(ee){this.addEventListener("close",function(){ee()})},ae.prototype.removeCloseEventListener=function(ee){},ae.prototype.setupResizeObserver=function(){var ee=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ee.resize(ee.target.clientWidth,ee.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ee.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ae.prototype.onPopupTargetResize=function(){var ee=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/ee>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ee:this.editorCanvas.clientWidth,ie=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ee;this.resize(z,ie)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(ee,z){this._isResizing=!0;var ie=ee/this.imageWidth,se=z/this.imageHeight;this.imageWidth=Math.round(ee),this.imageHeight=Math.round(z),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ie,se),this._isResizing=!1},ae.prototype.scaleMarkers=function(ee,z){var ie,se=this;this._currentMarker&&this._currentMarker instanceof Ke?this._currentMarker.scale(ee,z):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==se._currentMarker&&ne.scale(ee,z)}),ie!==void 0&&this.setCurrentMarker(ie)},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 ee=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=ee.left-z.left,this.top=ee.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 ee,z=[],ie=0;ie<arguments.length;ie++)z[ie]=arguments[ie];this.defs=Ce.createDefs(),this.addDefsToImage(),(ee=this.defs).append.apply(ee,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 ee=document.createElement("a");ee.href="https://markerjs.com/",ee.target="_blank",ee.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',ee.title="Powered by marker.js",ee.style.display="grid",ee.style.alignItems="center",ee.style.justifyItems="center",ee.style.padding="3px",ee.style.width="20px",ee.style.height="20px",this.logoUI.appendChild(ee),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},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 ee=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ee+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new ot(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 Be(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(ee){this.markerImage.removeChild(ee.container),this.markers.indexOf(ee)>-1&&this.markers.splice(this.markers.indexOf(ee),1),ee.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(ee,z){if(ee==="marker"&&z!==void 0)this.createNewMarker(z);else if(ee==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ae.prototype.deleteSelectedMarker=function(){var ee=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var ne=new Ge(ee,ee._currentMarker,!0);se(ne),ne.defaultPrevented&&(z=!0)}),!z){var ie=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 Ge(ee,ie))})}}},ae.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(we){var Ve=new Ge(ee,void 0,!0);we(Ve),Ve.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var ie=function(we){var Ve=se.markers[we];se.setCurrentMarker(se.markers[we]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(It){return It(new Ge(ee,Ve))})},se=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var ee;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(ee=this._currentMarker.notes)!==null&&ee!==void 0?ee:"",this.overlayContainer.appendChild(this.notesArea))},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 ee=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===z.width&&ie.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 Et(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new Et(ee))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var ee=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new Et(ee))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var ee=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new Et(ee))}))},ae.prototype.stepZoom=function(){var ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ee<this.zoomSteps.length-1?this.zoomSteps[ee+1]:this.zoomSteps[0]},ae.prototype.panTo=function(ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ee.x,top:this.prevPanPoint.y-ee.y}),this.prevPanPoint=ee},ae.prototype.startRenderAndClose=function(){return me(this,void 0,void 0,function(){var ee,z,ie=this;return ze(this,function(se){switch(se.label){case 0:return[4,this.render()];case 1:return ee=se.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Ut(ie,ee,z))}),this.close(!0),[2]}})})},ae.prototype.getState=function(ee){ee===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return z.markers.push(ie.getState())}),z},ae.prototype.restoreState=function(ee){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ee.markers.forEach(function(ie){var se=z._availableMarkerTypes.find(function(we){return we.typeName===ie.typeName});if(se!==void 0){var ne=z.addNewMarker(se);ne.restoreState(ie),z.markers.push(ne)}}),ee.width&&ee.height&&(ee.width!==this.imageWidth||ee.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ee.width,this.imageHeight/ee.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new Et(z))})},ae.prototype.addNewMarker=function(ee){var z=Ce.createGroup();return this.markerImage.appendChild(z),new ee(z,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(ee){var z,ie=this;(z=typeof ee=="string"?this._availableMarkerTypes.find(function(se){return se.typeName===ee}):ee)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(se){return se(new Ge(ie,ie._currentMarker))}))},ae.prototype.markerCreated=function(ee){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ee),this.setCurrentMarker(ee),ee instanceof et&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(et):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new Ge(z,z._currentMarker))})},ae.prototype.colorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ee,this.settings.defaultStrokeColor=ee)},ae.prototype.fillColorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ee)},ae.prototype.markerStateChanged=function(ee){var z=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new Ge(z,ee))})},ae.prototype.setCurrentMarker=function(ee){var z=this;this._currentMarker!==ee&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ie){return ie(new Ge(z,z._currentMarker))})),this._currentMarker=ee,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ie){return ie(new Ge(z,z._currentMarker))}))},ae.prototype.onPointerDown=function(ee){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ee.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(ie){return ie.ownsTarget(ee.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ee.clientX,y:ee.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY))},ae.prototype.onDblClick=function(ee){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(ie){return ie.ownsTarget(ee.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target):this.setCurrentMarker()}},ae.prototype.onPointerMove=function(ee){this.touchPoints!==1&&ee.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ee.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ee.clientX,ee.clientY)):this.zoomLevel>1&&this.panTo({x:ee.clientX,y:ee.clientY}))},ae.prototype.onPointerUp=function(ee){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ee.clientX,ee.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(ee){this._currentMarker===void 0||this.notesArea!==void 0||ee.key!=="Delete"&&ee.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(ee,z){var ie=this.markerImage.getBoundingClientRect();return{x:(ee-ie.left)/this.zoomLevel,y:(z-ie.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ee=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ee+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ae.prototype.addLicenseKey=function(ee){Ne.addKey(ee)},ae.prototype.addEventListener=function(ee,z){this.eventListeners.addEventListener(ee,z)},ae.prototype.removeEventListener=function(ee,z){this.eventListeners.removeEventListener(ee,z)},ae.prototype.renderState=function(ee){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ee),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var ee=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new Et(ee))}))},ae.prototype.blur=function(){var ee=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new Et(ee))}))},ae.instanceCounter=0,ae}()},6551:function(Wt,Tt,le){"use strict";le.d(Tt,{ZP:function(){return Ne}});var re=le(72190),Je=le(59301),me=le(47273),ze=0,be=(0,me.Z)();function Ce(){var $e;return be?($e=ze,ze+=1):$e="TEST_OR_SSR",$e}function Ne($e){var Se=Je.useState(),de=(0,re.Z)(Se,2),Ze=de[0],xe=de[1];return Je.useEffect(function(){xe("rc_select_".concat(Ce()))},[]),$e||Ze}},37463:function(Wt,Tt,le){"use strict";le.d(Tt,{Ac:function(){return pt},Xo:function(){return Rt},Wx:function(){return an},ZP:function(){return Un},lk:function(){return xt}});var re=le(60499),Je=le(77654),me=le(18642),ze=le(85899),be=le(72190),Ce=le(42244),Ne=le(43749),$e=le(18929),Se=le(48736),de=le(59301),Ze=le(92310),xe=le.n(Ze),ot=le(34280),Be=le(49658),Me=le(8654),Re=function(He){var ve=He.className,De=He.customizeIcon,ge=He.customizeIconProps,Pe=He.children,qe=He.onMouseDown,Bt=He.onClick,Nt=typeof De=="function"?De(ge):De;return de.createElement("span",{className:ve,onMouseDown:function(Mt){Mt.preventDefault(),qe==null||qe(Mt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Bt,"aria-hidden":!0},Nt!==void 0?Nt:de.createElement("span",{className:xe()(ve.split(/\s+/).map(function(Qt){return"".concat(Qt,"-icon")}))},Pe))},Oe=Re,rt=function(He,ve,De,ge,Pe){var qe=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Bt=arguments.length>6?arguments[6]:void 0,Nt=arguments.length>7?arguments[7]:void 0,Qt=de.useMemo(function(){if((0,Ne.Z)(ge)==="object")return ge.clearIcon;if(Pe)return Pe},[ge,Pe]),Mt=de.useMemo(function(){return!!(!qe&&ge&&(De.length||Bt)&&!(Nt==="combobox"&&Bt===""))},[ge,qe,De.length,Bt,Nt]);return{allowClear:Mt,clearIcon:de.createElement(Oe,{className:"".concat(He,"-clear"),onMouseDown:ve,customizeIcon:Qt},"\xD7")}},gt=de.createContext(null);function xt(){return de.useContext(gt)}function at(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,He=de.useState(!1),ve=(0,be.Z)(He,2),De=ve[0],ge=ve[1],Pe=de.useRef(null),qe=function(){window.clearTimeout(Pe.current)};de.useEffect(function(){return qe},[]);var Bt=function(Qt,Mt){qe(),Pe.current=window.setTimeout(function(){ge(Qt),Mt&&Mt()},Ee)};return[De,Bt,qe]}function Ye(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,He=de.useRef(null),ve=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(ve.current)}},[]);function De(ge){(ge||He.current===null)&&(He.current=ge),window.clearTimeout(ve.current),ve.current=window.setTimeout(function(){He.current=null},Ee)}return[function(){return He.current},De]}function st(Ee,He,ve,De){var ge=de.useRef(null);ge.current={open:He,triggerOpen:ve,customizedTrigger:De},de.useEffect(function(){function Pe(qe){var Bt;if(!((Bt=ge.current)!==null&&Bt!==void 0&&Bt.customizedTrigger)){var Nt=qe.target;Nt.shadowRoot&&qe.composed&&(Nt=qe.composedPath()[0]||Nt),ge.current.open&&Ee().filter(function(Qt){return Qt}).every(function(Qt){return!Qt.contains(Nt)&&Qt!==Nt})&&ge.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Pe),function(){return window.removeEventListener("mousedown",Pe)}},[])}var We=le(10228);function St(Ee){return Ee&&![We.Z.ESC,We.Z.SHIFT,We.Z.BACKSPACE,We.Z.TAB,We.Z.WIN_KEY,We.Z.ALT,We.Z.META,We.Z.WIN_KEY_RIGHT,We.Z.CTRL,We.Z.SEMICOLON,We.Z.EQUALS,We.Z.CAPS_LOCK,We.Z.CONTEXT_MENU,We.Z.F1,We.Z.F2,We.Z.F3,We.Z.F4,We.Z.F5,We.Z.F6,We.Z.F7,We.Z.F8,We.Z.F9,We.Z.F10,We.Z.F11,We.Z.F12].includes(Ee)}var Xe=le(26112),_e=le(83836);function ft(Ee,He,ve){var De=(0,ze.Z)((0,ze.Z)({},Ee),ve?He:{});return Object.keys(He).forEach(function(ge){var Pe=He[ge];typeof Pe=="function"&&(De[ge]=function(){for(var qe,Bt=arguments.length,Nt=new Array(Bt),Qt=0;Qt<Bt;Qt++)Nt[Qt]=arguments[Qt];return Pe.apply(void 0,Nt),(qe=Ee[ge])===null||qe===void 0?void 0:qe.call.apply(qe,[Ee].concat(Nt))})}),De}var Le=ft,Ke=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],et=function(He,ve){var De=He.prefixCls,ge=He.id,Pe=He.inputElement,qe=He.autoFocus,Bt=He.autoComplete,Nt=He.editable,Qt=He.activeDescendantId,Mt=He.value,ct=He.open,it=He.attrs,jt=(0,Ce.Z)(He,Ke),hn=Pe||de.createElement("input",null),ln=hn,cn=ln.ref,Zn=ln.props;return(0,Se.Kp)(!("maxLength"in hn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),hn=de.cloneElement(hn,(0,ze.Z)((0,ze.Z)((0,ze.Z)({type:"search"},Le(jt,Zn,!0)),{},{id:ge,ref:(0,Me.sQ)(ve,cn),autoComplete:Bt||"off",autoFocus:qe,className:xe()("".concat(De,"-selection-search-input"),Zn==null?void 0:Zn.className),role:"combobox","aria-expanded":ct||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ge,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ge,"_list"),"aria-activedescendant":ct?Qt:void 0},it),{},{value:Nt?Mt:"",readOnly:!Nt,unselectable:Nt?null:"on",style:(0,ze.Z)((0,ze.Z)({},Zn.style),{},{opacity:Nt?null:0})})),hn},pe=de.forwardRef(et),Ct=pe;function Ie(Ee){return Array.isArray(Ee)?Ee:Ee!==void 0?[Ee]:[]}var wt=typeof window!="undefined"&&window.document&&window.document.documentElement,At=wt;function ye(Ee){return Ee!=null}function fe(Ee){return!Ee&&Ee!==0}function ut(Ee){return["string","number"].includes((0,Ne.Z)(Ee))}function _t(Ee){var He=void 0;return Ee&&(ut(Ee.title)?He=Ee.title.toString():ut(Ee.label)&&(He=Ee.label.toString())),He}function bt(Ee,He){At?de.useLayoutEffect(Ee,He):de.useEffect(Ee,He)}function Ae(Ee){var He;return(He=Ee.key)!==null&&He!==void 0?He:Ee.value}var nt=function(He){He.preventDefault(),He.stopPropagation()},dt=function(He){var ve=He.id,De=He.prefixCls,ge=He.values,Pe=He.open,qe=He.searchValue,Bt=He.autoClearSearchValue,Nt=He.inputRef,Qt=He.placeholder,Mt=He.disabled,ct=He.mode,it=He.showSearch,jt=He.autoFocus,hn=He.autoComplete,ln=He.activeDescendantId,cn=He.tabIndex,Zn=He.removeIcon,Xn=He.maxTagCount,Jn=He.maxTagTextLength,Nn=He.maxTagPlaceholder,Sn=Nn===void 0?function(Xt){return"+ ".concat(Xt.length," ...")}:Nn,Pn=He.tagRender,Hn=He.onToggleOpen,ur=He.onRemove,qn=He.onInputChange,lr=He.onInputPaste,ir=He.onInputKeyDown,er=He.onInputMouseDown,tr=He.onInputCompositionStart,gr=He.onInputCompositionEnd,mr=He.onInputBlur,cr=de.useRef(null),vr=(0,de.useState)(0),Cr=(0,be.Z)(vr,2),or=Cr[0],dr=Cr[1],Fn=(0,de.useState)(!1),wr=(0,be.Z)(Fn,2),Rr=wr[0],jr=wr[1],Er="".concat(De,"-selection"),Br=Pe||ct==="multiple"&&Bt===!1||ct==="tags"?qe:"",kr=ct==="tags"||ct==="multiple"&&Bt===!1||it&&(Pe||Rr);bt(function(){dr(cr.current.scrollWidth)},[Br]);var Tr=function(Ot,En,On,Vt,Kt){return de.createElement("span",{title:_t(Ot),className:xe()("".concat(Er,"-item"),(0,me.Z)({},"".concat(Er,"-item-disabled"),On))},de.createElement("span",{className:"".concat(Er,"-item-content")},En),Vt&&de.createElement(Oe,{className:"".concat(Er,"-item-remove"),onMouseDown:nt,onClick:Kt,customizeIcon:Zn},"\xD7"))},zr=function(Ot,En,On,Vt,Kt,xn){var Cn=function(Mr){nt(Mr),Hn(!Pe)};return de.createElement("span",{onMouseDown:Cn},Pn({label:En,value:Ot,disabled:On,closable:Vt,onClose:Kt,isMaxTag:!!xn}))},fr=function(Ot){var En=Ot.disabled,On=Ot.label,Vt=Ot.value,Kt=!Mt&&!En,xn=On;if(typeof Jn=="number"&&(typeof On=="string"||typeof On=="number")){var Cn=String(xn);Cn.length>Jn&&(xn="".concat(Cn.slice(0,Jn),"..."))}var rr=function(br){br&&br.stopPropagation(),ur(Ot)};return typeof Pn=="function"?zr(Vt,xn,En,Kt,rr):Tr(Ot,xn,En,Kt,rr)},Gn=function(Ot){if(!ge.length)return null;var En=typeof Sn=="function"?Sn(Ot):Sn;return typeof Pn=="function"?zr(void 0,En,!1,!1,void 0,!0):Tr({title:En},En,!1)},$t=de.createElement("div",{className:"".concat(Er,"-search"),style:{width:or},onFocus:function(){jr(!0)},onBlur:function(){jr(!1)}},de.createElement(Ct,{ref:Nt,open:Pe,prefixCls:De,id:ve,inputElement:null,disabled:Mt,autoFocus:jt,autoComplete:hn,editable:kr,activeDescendantId:ln,value:Br,onKeyDown:ir,onMouseDown:er,onChange:qn,onPaste:lr,onCompositionStart:tr,onCompositionEnd:gr,onBlur:mr,tabIndex:cn,attrs:(0,Xe.Z)(He,!0)}),de.createElement("span",{ref:cr,className:"".concat(Er,"-search-mirror"),"aria-hidden":!0},Br,"\xA0")),qt=de.createElement(_e.Z,{prefixCls:"".concat(Er,"-overflow"),data:ge,renderItem:fr,renderRest:Gn,suffix:$t,itemKey:Ae,maxCount:Xn});return de.createElement("span",{className:"".concat(Er,"-wrap")},qt,!ge.length&&!Br&&de.createElement("span",{className:"".concat(Er,"-placeholder")},Qt))},rn=dt,Et=function(He){var ve=He.inputElement,De=He.prefixCls,ge=He.id,Pe=He.inputRef,qe=He.disabled,Bt=He.autoFocus,Nt=He.autoComplete,Qt=He.activeDescendantId,Mt=He.mode,ct=He.open,it=He.values,jt=He.placeholder,hn=He.tabIndex,ln=He.showSearch,cn=He.searchValue,Zn=He.activeValue,Xn=He.maxLength,Jn=He.onInputKeyDown,Nn=He.onInputMouseDown,Sn=He.onInputChange,Pn=He.onInputPaste,Hn=He.onInputCompositionStart,ur=He.onInputCompositionEnd,qn=He.onInputBlur,lr=He.title,ir=de.useState(!1),er=(0,be.Z)(ir,2),tr=er[0],gr=er[1],mr=Mt==="combobox",cr=mr||ln,vr=it[0],Cr=cn||"";mr&&Zn&&!tr&&(Cr=Zn),de.useEffect(function(){mr&&gr(!1)},[mr,Zn]);var or=Mt!=="combobox"&&!ct&&!ln?!1:!!Cr,dr=lr===void 0?_t(vr):lr,Fn=de.useMemo(function(){return vr?null:de.createElement("span",{className:"".concat(De,"-selection-placeholder"),style:or?{visibility:"hidden"}:void 0},jt)},[vr,or,jt,De]);return de.createElement("span",{className:"".concat(De,"-selection-wrap")},de.createElement("span",{className:"".concat(De,"-selection-search")},de.createElement(Ct,{ref:Pe,prefixCls:De,id:ge,open:ct,inputElement:ve,disabled:qe,autoFocus:Bt,autoComplete:Nt,editable:cr,activeDescendantId:Qt,value:Cr,onKeyDown:Jn,onMouseDown:Nn,onChange:function(Rr){gr(!0),Sn(Rr)},onPaste:Pn,onCompositionStart:Hn,onCompositionEnd:ur,onBlur:qn,tabIndex:hn,attrs:(0,Xe.Z)(He,!0),maxLength:mr?Xn:void 0})),!mr&&vr?de.createElement("span",{className:"".concat(De,"-selection-item"),title:dr,style:or?{visibility:"hidden"}:void 0},vr.label):null,Fn)},Ut=Et,Ge=function(He,ve){var De=(0,de.useRef)(null),ge=(0,de.useRef)(!1),Pe=He.prefixCls,qe=He.open,Bt=He.mode,Nt=He.showSearch,Qt=He.tokenWithEnter,Mt=He.disabled,ct=He.prefix,it=He.autoClearSearchValue,jt=He.onSearch,hn=He.onSearchSubmit,ln=He.onToggleOpen,cn=He.onInputKeyDown,Zn=He.onInputBlur,Xn=He.domRef;de.useImperativeHandle(ve,function(){return{focus:function(dr){De.current.focus(dr)},blur:function(){De.current.blur()}}});var Jn=Ye(0),Nn=(0,be.Z)(Jn,2),Sn=Nn[0],Pn=Nn[1],Hn=function(dr){var Fn=dr.which,wr=De.current instanceof HTMLTextAreaElement;!wr&&qe&&(Fn===We.Z.UP||Fn===We.Z.DOWN)&&dr.preventDefault(),cn&&cn(dr),Fn===We.Z.ENTER&&Bt==="tags"&&!ge.current&&!qe&&(hn==null||hn(dr.target.value)),!(wr&&!qe&&~[We.Z.UP,We.Z.DOWN,We.Z.LEFT,We.Z.RIGHT].indexOf(Fn))&&St(Fn)&&ln(!0)},ur=function(){Pn(!0)},qn=(0,de.useRef)(null),lr=function(dr){jt(dr,!0,ge.current)!==!1&&ln(!0)},ir=function(){ge.current=!0},er=function(dr){ge.current=!1,Bt!=="combobox"&&lr(dr.target.value)},tr=function(dr){var Fn=dr.target.value;if(Qt&&qn.current&&/[\r\n]/.test(qn.current)){var wr=qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Fn=Fn.replace(wr,qn.current)}qn.current=null,lr(Fn)},gr=function(dr){var Fn=dr.clipboardData,wr=Fn==null?void 0:Fn.getData("text");qn.current=wr||""},mr=function(dr){var Fn=dr.target;if(Fn!==De.current){var wr=document.body.style.msTouchAction!==void 0;wr?setTimeout(function(){De.current.focus()}):De.current.focus()}},cr=function(dr){var Fn=Sn();dr.target!==De.current&&!Fn&&!(Bt==="combobox"&&Mt)&&dr.preventDefault(),(Bt!=="combobox"&&(!Nt||!Fn)||!qe)&&(qe&&it!==!1&&jt("",!0,!1),ln())},vr={inputRef:De,onInputKeyDown:Hn,onInputMouseDown:ur,onInputChange:tr,onInputPaste:gr,onInputCompositionStart:ir,onInputCompositionEnd:er,onInputBlur:Zn},Cr=Bt==="multiple"||Bt==="tags"?de.createElement(rn,(0,re.Z)({},He,vr)):de.createElement(Ut,(0,re.Z)({},He,vr));return de.createElement("div",{ref:Xn,className:"".concat(Pe,"-selector"),onClick:mr,onMouseDown:cr},ct&&de.createElement("div",{className:"".concat(Pe,"-prefix")},ct),Cr)},Pt=de.forwardRef(Ge),tt=Pt,ae=le(68196),ee=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(He){var ve=He===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"}}},ie=function(He,ve){var De=He.prefixCls,ge=He.disabled,Pe=He.visible,qe=He.children,Bt=He.popupElement,Nt=He.animation,Qt=He.transitionName,Mt=He.dropdownStyle,ct=He.dropdownClassName,it=He.direction,jt=it===void 0?"ltr":it,hn=He.placement,ln=He.builtinPlacements,cn=He.dropdownMatchSelectWidth,Zn=He.dropdownRender,Xn=He.dropdownAlign,Jn=He.getPopupContainer,Nn=He.empty,Sn=He.getTriggerDOMNode,Pn=He.onPopupVisibleChange,Hn=He.onPopupMouseEnter,ur=(0,Ce.Z)(He,ee),qn="".concat(De,"-dropdown"),lr=Bt;Zn&&(lr=Zn(Bt));var ir=de.useMemo(function(){return ln||z(cn)},[ln,cn]),er=Nt?"".concat(qn,"-").concat(Nt):Qt,tr=typeof cn=="number",gr=de.useMemo(function(){return tr?null:cn===!1?"minWidth":"width"},[cn,tr]),mr=Mt;tr&&(mr=(0,ze.Z)((0,ze.Z)({},mr),{},{width:cn}));var cr=de.useRef(null);return de.useImperativeHandle(ve,function(){return{getPopupElement:function(){var Cr;return(Cr=cr.current)===null||Cr===void 0?void 0:Cr.popupElement}}}),de.createElement(ae.Z,(0,re.Z)({},ur,{showAction:Pn?["click"]:[],hideAction:Pn?["click"]:[],popupPlacement:hn||(jt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ir,prefixCls:qn,popupTransitionName:er,popup:de.createElement("div",{onMouseEnter:Hn},lr),ref:cr,stretch:gr,popupAlign:Xn,popupVisible:Pe,getPopupContainer:Jn,popupClassName:xe()(ct,(0,me.Z)({},"".concat(qn,"-empty"),Nn)),popupStyle:mr,getTriggerDOMNode:Sn,onPopupVisibleChange:Pn}),qe)},se=de.forwardRef(ie),ne=se,we=le(48745);function Ve(Ee,He){var ve=Ee.key,De;return"value"in Ee&&(De=Ee.value),ve!=null?ve:De!==void 0?De:"rc-index-key-".concat(He)}function It(Ee){return typeof Ee!="undefined"&&!Number.isNaN(Ee)}function je(Ee,He){var ve=Ee||{},De=ve.label,ge=ve.value,Pe=ve.options,qe=ve.groupLabel,Bt=De||(He?"children":"label");return{label:Bt,value:ge||"value",options:Pe||"options",groupLabel:qe||Bt}}function Qe(Ee){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=He.fieldNames,De=He.childrenAsData,ge=[],Pe=je(ve,!1),qe=Pe.label,Bt=Pe.value,Nt=Pe.options,Qt=Pe.groupLabel;function Mt(ct,it){Array.isArray(ct)&&ct.forEach(function(jt){if(it||!(Nt in jt)){var hn=jt[Bt];ge.push({key:Ve(jt,ge.length),groupOption:it,data:jt,label:jt[qe],value:hn})}else{var ln=jt[Qt];ln===void 0&&De&&(ln=jt.label),ge.push({key:Ve(jt,ge.length),group:!0,data:jt,label:ln}),Mt(jt[Nt],!0)}})}return Mt(Ee,!1),ge}function ht(Ee){var He=(0,ze.Z)({},Ee);return"props"in He||Object.defineProperty(He,"props",{get:function(){return(0,Se.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),He}}),He}var Dt=function(He,ve,De){if(!ve||!ve.length)return null;var ge=!1,Pe=function Bt(Nt,Qt){var Mt=(0,we.Z)(Qt),ct=Mt[0],it=Mt.slice(1);if(!ct)return[Nt];var jt=Nt.split(ct);return ge=ge||jt.length>1,jt.reduce(function(hn,ln){return[].concat((0,Je.Z)(hn),(0,Je.Z)(Bt(ln,it)))},[]).filter(Boolean)},qe=Pe(He,ve);return ge?typeof De!="undefined"?qe.slice(0,De):qe:null},kt=de.createContext(null),Gt=kt;function Zt(Ee){var He=Ee.visible,ve=Ee.values;if(!He)return null;var De=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(ve.slice(0,De).map(function(ge){var Pe=ge.label,qe=ge.value;return["number","string"].includes((0,Ne.Z)(Pe))?Pe:qe}).join(", ")),ve.length>De?", ...":null)}var Lt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],sn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Jt=function(He){return He==="tags"||He==="multiple"},on=de.forwardRef(function(Ee,He){var ve,De=Ee.id,ge=Ee.prefixCls,Pe=Ee.className,qe=Ee.showSearch,Bt=Ee.tagRender,Nt=Ee.direction,Qt=Ee.omitDomProps,Mt=Ee.displayValues,ct=Ee.onDisplayValuesChange,it=Ee.emptyOptions,jt=Ee.notFoundContent,hn=jt===void 0?"Not Found":jt,ln=Ee.onClear,cn=Ee.mode,Zn=Ee.disabled,Xn=Ee.loading,Jn=Ee.getInputElement,Nn=Ee.getRawInputElement,Sn=Ee.open,Pn=Ee.defaultOpen,Hn=Ee.onDropdownVisibleChange,ur=Ee.activeValue,qn=Ee.onActiveValueChange,lr=Ee.activeDescendantId,ir=Ee.searchValue,er=Ee.autoClearSearchValue,tr=Ee.onSearch,gr=Ee.onSearchSplit,mr=Ee.tokenSeparators,cr=Ee.allowClear,vr=Ee.prefix,Cr=Ee.suffixIcon,or=Ee.clearIcon,dr=Ee.OptionList,Fn=Ee.animation,wr=Ee.transitionName,Rr=Ee.dropdownStyle,jr=Ee.dropdownClassName,Er=Ee.dropdownMatchSelectWidth,Br=Ee.dropdownRender,kr=Ee.dropdownAlign,Tr=Ee.placement,zr=Ee.builtinPlacements,fr=Ee.getPopupContainer,Gn=Ee.showAction,$t=Gn===void 0?[]:Gn,qt=Ee.onFocus,Xt=Ee.onBlur,Ot=Ee.onKeyUp,En=Ee.onKeyDown,On=Ee.onMouseDown,Vt=(0,Ce.Z)(Ee,Lt),Kt=Jt(cn),xn=(qe!==void 0?qe:Kt)||cn==="combobox",Cn=(0,ze.Z)({},Vt);sn.forEach(function(Pr){delete Cn[Pr]}),Qt==null||Qt.forEach(function(Pr){delete Cn[Pr]});var rr=de.useState(!1),Mr=(0,be.Z)(rr,2),br=Mr[0],Ir=Mr[1];de.useEffect(function(){Ir((0,Be.Z)())},[]);var Dr=de.useRef(null),Lr=de.useRef(null),Hr=de.useRef(null),Or=de.useRef(null),_r=de.useRef(null),ti=de.useRef(!1),Di=at(),Fi=(0,be.Z)(Di,3),xi=Fi[0],mi=Fi[1],Yi=Fi[2];de.useImperativeHandle(He,function(){var Pr,xr;return{focus:(Pr=Or.current)===null||Pr===void 0?void 0:Pr.focus,blur:(xr=Or.current)===null||xr===void 0?void 0:xr.blur,scrollTo:function(fi){var Xr;return(Xr=_r.current)===null||Xr===void 0?void 0:Xr.scrollTo(fi)},nativeElement:Dr.current||Lr.current}});var Ar=de.useMemo(function(){var Pr;if(cn!=="combobox")return ir;var xr=(Pr=Mt[0])===null||Pr===void 0?void 0:Pr.value;return typeof xr=="string"||typeof xr=="number"?String(xr):""},[ir,cn,Mt]),to=cn==="combobox"&&typeof Jn=="function"&&Jn()||null,ni=typeof Nn=="function"&&Nn(),Ai=(0,Me.x1)(Lr,ni==null||(ve=ni.props)===null||ve===void 0?void 0:ve.ref),ao=de.useState(!1),Xi=(0,be.Z)(ao,2),vi=Xi[0],Bi=Xi[1];(0,ot.Z)(function(){Bi(!0)},[]);var Gr=(0,$e.Z)(!1,{defaultValue:Pn,value:Sn}),zi=(0,be.Z)(Gr,2),lo=zi[0],Zi=zi[1],Qr=vi?lo:!1,xo=!hn&&it;(Zn||xo&&Qr&&cn==="combobox")&&(Qr=!1);var so=xo?!1:Qr,ar=de.useCallback(function(Pr){var xr=Pr!==void 0?Pr:!Qr;Zn||(Zi(xr),Qr!==xr&&(Hn==null||Hn(xr)))},[Zn,Qr,Zi,Hn]),yr=de.useMemo(function(){return(mr||[]).some(function(Pr){return[`
`,`\r
`].includes(Pr)})},[mr]),hr=de.useContext(Gt)||{},pr=hr.maxCount,Nr=hr.rawValues,Zr=function(xr,ci,fi){if(!(Kt&&It(pr)&&(Nr==null?void 0:Nr.size)>=pr)){var Xr=!0,ri=xr;qn==null||qn(null);var Gi=Dt(xr,mr,It(pr)?pr-Nr.size:void 0),ji=fi?null:Gi;return cn!=="combobox"&&ji&&(ri="",gr==null||gr(ji),ar(!1),Xr=!1),tr&&Ar!==ri&&tr(ri,{source:ci?"typing":"effect"}),Xr}},$i=function(xr){!xr||!xr.trim()||tr(xr,{source:"submit"})};de.useEffect(function(){!Qr&&!Kt&&cn!=="combobox"&&Zr("",!1,!1)},[Qr]),de.useEffect(function(){lo&&Zn&&Zi(!1),Zn&&!ti.current&&mi(!1)},[Zn]);var gi=Ye(),ui=(0,be.Z)(gi,2),Yr=ui[0],Hi=ui[1],Ji=de.useRef(!1),Pi=function(xr){var ci=Yr(),fi=xr.key,Xr=fi==="Enter";if(Xr&&(cn!=="combobox"&&xr.preventDefault(),Qr||ar(!0)),Hi(!!Ar),fi==="Backspace"&&!ci&&Kt&&!Ar&&Mt.length){for(var ri=(0,Je.Z)(Mt),Gi=null,ji=ri.length-1;ji>=0;ji-=1){var ro=ri[ji];if(!ro.disabled){ri.splice(ji,1),Gi=ro;break}}Gi&&ct(ri,{type:"remove",values:[Gi]})}for(var Ii=arguments.length,Ti=new Array(Ii>1?Ii-1:0),Vi=1;Vi<Ii;Vi++)Ti[Vi-1]=arguments[Vi];if(Qr&&(!Xr||!Ji.current)){var co;Xr&&(Ji.current=!0),(co=_r.current)===null||co===void 0||co.onKeyDown.apply(co,[xr].concat(Ti))}En==null||En.apply(void 0,[xr].concat(Ti))},Qi=function(xr){for(var ci=arguments.length,fi=new Array(ci>1?ci-1:0),Xr=1;Xr<ci;Xr++)fi[Xr-1]=arguments[Xr];if(Qr){var ri;(ri=_r.current)===null||ri===void 0||ri.onKeyUp.apply(ri,[xr].concat(fi))}xr.key==="Enter"&&(Ji.current=!1),Ot==null||Ot.apply(void 0,[xr].concat(fi))},no=function(xr){var ci=Mt.filter(function(fi){return fi!==xr});ct(ci,{type:"remove",values:[xr]})},_i=function(){Ji.current=!1},To=de.useRef(!1),_a=function(){mi(!0),Zn||(qt&&!To.current&&qt.apply(void 0,arguments),$t.includes("focus")&&ar(!0)),To.current=!0},ya=function(){ti.current=!0,mi(!1,function(){To.current=!1,ti.current=!1,ar(!1)}),!Zn&&(Ar&&(cn==="tags"?tr(Ar,{source:"submit"}):cn==="multiple"&&tr("",{source:"blur"})),Xt&&Xt.apply(void 0,arguments))},qi=[];de.useEffect(function(){return function(){qi.forEach(function(Pr){return clearTimeout(Pr)}),qi.splice(0,qi.length)}},[]);var uo=function(xr){var ci,fi=xr.target,Xr=(ci=Hr.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Xr&&Xr.contains(fi)){var ri=setTimeout(function(){var Ii=qi.indexOf(ri);if(Ii!==-1&&qi.splice(Ii,1),Yi(),!br&&!Xr.contains(document.activeElement)){var Ti;(Ti=Or.current)===null||Ti===void 0||Ti.focus()}});qi.push(ri)}for(var Gi=arguments.length,ji=new Array(Gi>1?Gi-1:0),ro=1;ro<Gi;ro++)ji[ro-1]=arguments[ro];On==null||On.apply(void 0,[xr].concat(ji))},Wi=de.useState({}),ba=(0,be.Z)(Wi,2),xa=ba[1];function Ga(){xa({})}var Ca;ni&&(Ca=function(xr){ar(xr)}),st(function(){var Pr;return[Dr.current,(Pr=Hr.current)===null||Pr===void 0?void 0:Pr.getPopupElement()]},so,ar,!!ni);var Va=de.useMemo(function(){return(0,ze.Z)((0,ze.Z)({},Ee),{},{notFoundContent:hn,open:Qr,triggerOpen:so,id:De,showSearch:xn,multiple:Kt,toggleOpen:ar})},[Ee,hn,so,Qr,De,xn,Kt,ar]),Uo=!!Cr||Xn,Ko;Uo&&(Ko=de.createElement(Oe,{className:xe()("".concat(ge,"-arrow"),(0,me.Z)({},"".concat(ge,"-arrow-loading"),Xn)),customizeIcon:Cr,customizeIconProps:{loading:Xn,searchValue:Ar,open:Qr,focused:xi,showSearch:xn}}));var Co=function(){var xr;ln==null||ln(),(xr=Or.current)===null||xr===void 0||xr.focus(),ct([],{type:"clear",values:Mt}),Zr("",!1,!1)},Yo=rt(ge,Co,Mt,cr,or,Zn,Ar,cn),wa=Yo.allowClear,Xo=Yo.clearIcon,Lo=de.createElement(dr,{ref:_r}),Sa=xe()(ge,Pe,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(ge,"-focused"),xi),"".concat(ge,"-multiple"),Kt),"".concat(ge,"-single"),!Kt),"".concat(ge,"-allow-clear"),cr),"".concat(ge,"-show-arrow"),Uo),"".concat(ge,"-disabled"),Zn),"".concat(ge,"-loading"),Xn),"".concat(ge,"-open"),Qr),"".concat(ge,"-customize-input"),to),"".concat(ge,"-show-search"),xn)),Oo=de.createElement(ne,{ref:Hr,disabled:Zn,prefixCls:ge,visible:so,popupElement:Lo,animation:Fn,transitionName:wr,dropdownStyle:Rr,dropdownClassName:jr,direction:Nt,dropdownMatchSelectWidth:Er,dropdownRender:Br,dropdownAlign:kr,placement:Tr,builtinPlacements:zr,getPopupContainer:fr,empty:it,getTriggerDOMNode:function(xr){return Lr.current||xr},onPopupVisibleChange:Ca,onPopupMouseEnter:Ga},ni?de.cloneElement(ni,{ref:Ai}):de.createElement(tt,(0,re.Z)({},Ee,{domRef:Lr,prefixCls:ge,inputElement:to,ref:Or,id:De,prefix:vr,showSearch:xn,autoClearSearchValue:er,mode:cn,activeDescendantId:lr,tagRender:Bt,values:Mt,open:Qr,onToggleOpen:ar,activeValue:ur,searchValue:Ar,onSearch:Zr,onSearchSubmit:$i,onRemove:no,tokenWithEnter:yr,onInputBlur:_i}))),Ci;return ni?Ci=Oo:Ci=de.createElement("div",(0,re.Z)({className:Sa},Cn,{ref:Dr,onMouseDown:uo,onKeyDown:Pi,onKeyUp:Qi,onFocus:_a,onBlur:ya}),de.createElement(Zt,{visible:xi&&!Qr,values:Mt}),Oo,Ko,wa&&Xo),de.createElement(gt.Provider,{value:Va},Ci)}),pt=on,dn=function(){return null};dn.isSelectOptGroup=!0;var Rt=dn,Yt=function(){return null};Yt.isSelectOption=!0;var an=Yt,Tn=le(80547),bn=le(2738),ke=le(48911);function Ue(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var mt=["disabled","title","children","style","className"];function zt(Ee){return typeof Ee=="string"||typeof Ee=="number"}var nn=function(He,ve){var De=xt(),ge=De.prefixCls,Pe=De.id,qe=De.open,Bt=De.multiple,Nt=De.mode,Qt=De.searchValue,Mt=De.toggleOpen,ct=De.notFoundContent,it=De.onPopupScroll,jt=de.useContext(Gt),hn=jt.maxCount,ln=jt.flattenOptions,cn=jt.onActiveValue,Zn=jt.defaultActiveFirstOption,Xn=jt.onSelect,Jn=jt.menuItemSelectedIcon,Nn=jt.rawValues,Sn=jt.fieldNames,Pn=jt.virtual,Hn=jt.direction,ur=jt.listHeight,qn=jt.listItemHeight,lr=jt.optionRender,ir="".concat(ge,"-item"),er=(0,Tn.Z)(function(){return ln},[qe,ln],function(Gn,$t){return $t[0]&&Gn[1]!==$t[1]}),tr=de.useRef(null),gr=de.useMemo(function(){return Bt&&It(hn)&&(Nn==null?void 0:Nn.size)>=hn},[Bt,hn,Nn==null?void 0:Nn.size]),mr=function($t){$t.preventDefault()},cr=function($t){var qt;(qt=tr.current)===null||qt===void 0||qt.scrollTo(typeof $t=="number"?{index:$t}:$t)},vr=de.useCallback(function(Gn){return Nt==="combobox"?!1:Nn.has(Gn)},[Nt,(0,Je.Z)(Nn).toString(),Nn.size]),Cr=function($t){for(var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Xt=er.length,Ot=0;Ot<Xt;Ot+=1){var En=($t+Ot*qt+Xt)%Xt,On=er[En]||{},Vt=On.group,Kt=On.data;if(!Vt&&!(Kt!=null&&Kt.disabled)&&(vr(Kt.value)||!gr))return En}return-1},or=de.useState(function(){return Cr(0)}),dr=(0,be.Z)(or,2),Fn=dr[0],wr=dr[1],Rr=function($t){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;wr($t);var Xt={source:qt?"keyboard":"mouse"},Ot=er[$t];if(!Ot){cn(null,-1,Xt);return}cn(Ot.value,$t,Xt)};(0,de.useEffect)(function(){Rr(Zn!==!1?Cr(0):-1)},[er.length,Qt]);var jr=de.useCallback(function(Gn){return Nt==="combobox"?String(Gn).toLowerCase()===Qt.toLowerCase():Nn.has(Gn)},[Nt,Qt,(0,Je.Z)(Nn).toString(),Nn.size]);(0,de.useEffect)(function(){var Gn=setTimeout(function(){if(!Bt&&qe&&Nn.size===1){var qt=Array.from(Nn)[0],Xt=er.findIndex(function(Ot){var En=Ot.data;return Qt?String(En.value).startsWith(Qt):En.value===qt});Xt!==-1&&(Rr(Xt),cr(Xt))}});if(qe){var $t;($t=tr.current)===null||$t===void 0||$t.scrollTo(void 0)}return function(){return clearTimeout(Gn)}},[qe,Qt]);var Er=function($t){$t!==void 0&&Xn($t,{selected:!Nn.has($t)}),Bt||Mt(!1)};if(de.useImperativeHandle(ve,function(){return{onKeyDown:function($t){var qt=$t.which,Xt=$t.ctrlKey;switch(qt){case We.Z.N:case We.Z.P:case We.Z.UP:case We.Z.DOWN:{var Ot=0;if(qt===We.Z.UP?Ot=-1:qt===We.Z.DOWN?Ot=1:Ue()&&Xt&&(qt===We.Z.N?Ot=1:qt===We.Z.P&&(Ot=-1)),Ot!==0){var En=Cr(Fn+Ot,Ot);cr(En),Rr(En,!0)}break}case We.Z.TAB:case We.Z.ENTER:{var On,Vt=er[Fn];Vt&&!(Vt!=null&&(On=Vt.data)!==null&&On!==void 0&&On.disabled)&&!gr?Er(Vt.value):Er(void 0),qe&&$t.preventDefault();break}case We.Z.ESC:Mt(!1),qe&&$t.stopPropagation()}},onKeyUp:function(){},scrollTo:function($t){cr($t)}}}),er.length===0)return de.createElement("div",{role:"listbox",id:"".concat(Pe,"_list"),className:"".concat(ir,"-empty"),onMouseDown:mr},ct);var Br=Object.keys(Sn).map(function(Gn){return Sn[Gn]}),kr=function($t){return $t.label};function Tr(Gn,$t){var qt=Gn.group;return{role:qt?"presentation":"option",id:"".concat(Pe,"_list_").concat($t)}}var zr=function($t){var qt=er[$t];if(!qt)return null;var Xt=qt.data||{},Ot=Xt.value,En=qt.group,On=(0,Xe.Z)(Xt,!0),Vt=kr(qt);return qt?de.createElement("div",(0,re.Z)({"aria-label":typeof Vt=="string"&&!En?Vt:null},On,{key:$t},Tr(qt,$t),{"aria-selected":jr(Ot)}),Ot):null},fr={role:"listbox",id:"".concat(Pe,"_list")};return de.createElement(de.Fragment,null,Pn&&de.createElement("div",(0,re.Z)({},fr,{style:{height:0,width:0,overflow:"hidden"}}),zr(Fn-1),zr(Fn),zr(Fn+1)),de.createElement(ke.Z,{itemKey:"key",ref:tr,data:er,height:ur,itemHeight:qn,fullHeight:!1,onMouseDown:mr,onScroll:it,virtual:Pn,direction:Hn,innerProps:Pn?null:fr},function(Gn,$t){var qt=Gn.group,Xt=Gn.groupOption,Ot=Gn.data,En=Gn.label,On=Gn.value,Vt=Ot.key;if(qt){var Kt,xn=(Kt=Ot.title)!==null&&Kt!==void 0?Kt:zt(En)?En.toString():void 0;return de.createElement("div",{className:xe()(ir,"".concat(ir,"-group"),Ot.className),title:xn},En!==void 0?En:Vt)}var Cn=Ot.disabled,rr=Ot.title,Mr=Ot.children,br=Ot.style,Ir=Ot.className,Dr=(0,Ce.Z)(Ot,mt),Lr=(0,bn.Z)(Dr,Br),Hr=vr(On),Or=Cn||!Hr&&gr,_r="".concat(ir,"-option"),ti=xe()(ir,_r,Ir,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(_r,"-grouped"),Xt),"".concat(_r,"-active"),Fn===$t&&!Or),"".concat(_r,"-disabled"),Or),"".concat(_r,"-selected"),Hr)),Di=kr(Gn),Fi=!Jn||typeof Jn=="function"||Hr,xi=typeof Di=="number"?Di:Di||On,mi=zt(xi)?xi.toString():void 0;return rr!==void 0&&(mi=rr),de.createElement("div",(0,re.Z)({},(0,Xe.Z)(Lr),Pn?{}:Tr(Gn,$t),{"aria-selected":jr(On),className:ti,title:mi,onMouseMove:function(){Fn===$t||Or||Rr($t)},onClick:function(){Or||Er(On)},style:br}),de.createElement("div",{className:"".concat(_r,"-content")},typeof lr=="function"?lr(Gn,{index:$t}):xi),de.isValidElement(Jn)||Hr,Fi&&de.createElement(Oe,{className:"".concat(ir,"-option-state"),customizeIcon:Jn,customizeIconProps:{value:On,disabled:Or,isSelected:Hr}},Hr?"\u2713":null))}))},fn=de.forwardRef(nn),$n=fn,An=function(Ee,He){var ve=de.useRef({values:new Map,options:new Map}),De=de.useMemo(function(){var Pe=ve.current,qe=Pe.values,Bt=Pe.options,Nt=Ee.map(function(ct){if(ct.label===void 0){var it;return(0,ze.Z)((0,ze.Z)({},ct),{},{label:(it=qe.get(ct.value))===null||it===void 0?void 0:it.label})}return ct}),Qt=new Map,Mt=new Map;return Nt.forEach(function(ct){Qt.set(ct.value,ct),Mt.set(ct.value,He.get(ct.value)||Bt.get(ct.value))}),ve.current.values=Qt,ve.current.options=Mt,Nt},[Ee,He]),ge=de.useCallback(function(Pe){return He.get(Pe)||ve.current.options.get(Pe)},[He]);return[De,ge]};function pn(Ee,He){return Ie(Ee).join("").toUpperCase().includes(He)}var wn=function(Ee,He,ve,De,ge){return de.useMemo(function(){if(!ve||De===!1)return Ee;var Pe=He.options,qe=He.label,Bt=He.value,Nt=[],Qt=typeof De=="function",Mt=ve.toUpperCase(),ct=Qt?De:function(jt,hn){return ge?pn(hn[ge],Mt):hn[Pe]?pn(hn[qe!=="children"?qe:"label"],Mt):pn(hn[Bt],Mt)},it=Qt?function(jt){return ht(jt)}:function(jt){return jt};return Ee.forEach(function(jt){if(jt[Pe]){var hn=ct(ve,it(jt));if(hn)Nt.push(jt);else{var ln=jt[Pe].filter(function(cn){return ct(ve,it(cn))});ln.length&&Nt.push((0,ze.Z)((0,ze.Z)({},jt),{},(0,me.Z)({},Pe,ln)))}return}ct(ve,it(jt))&&Nt.push(jt)}),Nt},[Ee,De,ge,ve,He])},vn=le(6551),Kn=le(11592),gn=["children","value"],Dn=["children"];function tn(Ee){var He=Ee,ve=He.key,De=He.props,ge=De.children,Pe=De.value,qe=(0,Ce.Z)(De,gn);return(0,ze.Z)({key:ve,value:Pe!==void 0?Pe:ve,children:ge},qe)}function yn(Ee){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Kn.Z)(Ee).map(function(ve,De){if(!de.isValidElement(ve)||!ve.type)return null;var ge=ve,Pe=ge.type.isSelectOptGroup,qe=ge.key,Bt=ge.props,Nt=Bt.children,Qt=(0,Ce.Z)(Bt,Dn);return He||!Pe?tn(ve):(0,ze.Z)((0,ze.Z)({key:"__RC_SELECT_GRP__".concat(qe===null?De:qe,"__"),label:qe},Qt),{},{options:yn(Nt)})}).filter(function(ve){return ve})}var un=function(He,ve,De,ge,Pe){return de.useMemo(function(){var qe=He,Bt=!He;Bt&&(qe=yn(ve));var Nt=new Map,Qt=new Map,Mt=function(jt,hn,ln){ln&&typeof ln=="string"&&jt.set(hn[ln],hn)},ct=function it(jt){for(var hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ln=0;ln<jt.length;ln+=1){var cn=jt[ln];!cn[De.options]||hn?(Nt.set(cn[De.value],cn),Mt(Qt,cn,De.label),Mt(Qt,cn,ge),Mt(Qt,cn,Pe)):it(cn[De.options],!0)}};return ct(qe),{options:qe,valueOptions:Nt,labelOptions:Qt}},[He,ve,De,ge,Pe])},Ln=un;function Yn(Ee){var He=de.useRef();He.current=Ee;var ve=de.useCallback(function(){return He.current.apply(He,arguments)},[]);return ve}function zn(Ee){var He=Ee.mode,ve=Ee.options,De=Ee.children,ge=Ee.backfill,Pe=Ee.allowClear,qe=Ee.placeholder,Bt=Ee.getInputElement,Nt=Ee.showSearch,Qt=Ee.onSearch,Mt=Ee.defaultOpen,ct=Ee.autoFocus,it=Ee.labelInValue,jt=Ee.value,hn=Ee.inputValue,ln=Ee.optionLabelProp,cn=isMultiple(He),Zn=Nt!==void 0?Nt:cn||He==="combobox",Xn=ve||convertChildrenToData(De);if(warning(He!=="tags"||Xn.every(function(Pn){return!Pn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),He==="tags"||He==="combobox"){var Jn=Xn.some(function(Pn){return Pn.options?Pn.options.some(function(Hn){return typeof("value"in Hn?Hn.value:Hn.key)=="number"}):typeof("value"in Pn?Pn.value:Pn.key)=="number"});warning(!Jn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(He!=="combobox"||!ln,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(He==="combobox"||!ge,"`backfill` only works with `combobox` mode."),warning(He==="combobox"||!Bt,"`getInputElement` only work with `combobox` mode."),noteOnce(He!=="combobox"||!Bt||!Pe||!qe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Qt&&!Zn&&He!=="combobox"&&He!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Mt||ct,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),jt!=null){var Nn=toArray(jt);warning(!it||Nn.every(function(Pn){return _typeof(Pn)==="object"&&("key"in Pn||"value"in Pn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!cn||Array.isArray(jt),"`value` should be array when `mode` is `multiple` or `tags`")}if(De){var Sn=null;toNodeArray(De).some(function(Pn){if(!React.isValidElement(Pn)||!Pn.type)return!1;var Hn=Pn,ur=Hn.type;if(ur.isSelectOption)return!1;if(ur.isSelectOptGroup){var qn=toNodeArray(Pn.props.children).every(function(lr){return!React.isValidElement(lr)||!Pn.type||lr.type.isSelectOption?!0:(Sn=lr.type,!1)});return!qn}return Sn=ur,!0}),Sn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Sn.displayName||Sn.name||Sn,"`.")),warning(hn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Bn(Ee,He){if(Ee){var ve=function De(ge){for(var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=0;qe<ge.length;qe++){var Bt=ge[qe];if(Bt[He==null?void 0:He.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Pe&&Array.isArray(Bt[He==null?void 0:He.options])&&De(Bt[He==null?void 0:He.options],!0))break}};ve(Ee)}}var _n=null,Vn=["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"],Qn=["inputValue"];function jn(Ee){return!Ee||(0,Ne.Z)(Ee)!=="object"}var yt=de.forwardRef(function(Ee,He){var ve=Ee.id,De=Ee.mode,ge=Ee.prefixCls,Pe=ge===void 0?"rc-select":ge,qe=Ee.backfill,Bt=Ee.fieldNames,Nt=Ee.inputValue,Qt=Ee.searchValue,Mt=Ee.onSearch,ct=Ee.autoClearSearchValue,it=ct===void 0?!0:ct,jt=Ee.onSelect,hn=Ee.onDeselect,ln=Ee.dropdownMatchSelectWidth,cn=ln===void 0?!0:ln,Zn=Ee.filterOption,Xn=Ee.filterSort,Jn=Ee.optionFilterProp,Nn=Ee.optionLabelProp,Sn=Ee.options,Pn=Ee.optionRender,Hn=Ee.children,ur=Ee.defaultActiveFirstOption,qn=Ee.menuItemSelectedIcon,lr=Ee.virtual,ir=Ee.direction,er=Ee.listHeight,tr=er===void 0?200:er,gr=Ee.listItemHeight,mr=gr===void 0?20:gr,cr=Ee.labelRender,vr=Ee.value,Cr=Ee.defaultValue,or=Ee.labelInValue,dr=Ee.onChange,Fn=Ee.maxCount,wr=(0,Ce.Z)(Ee,Vn),Rr=(0,vn.ZP)(ve),jr=Jt(De),Er=!!(!Sn&&Hn),Br=de.useMemo(function(){return Zn===void 0&&De==="combobox"?!1:Zn},[Zn,De]),kr=de.useMemo(function(){return je(Bt,Er)},[JSON.stringify(Bt),Er]),Tr=(0,$e.Z)("",{value:Qt!==void 0?Qt:Nt,postState:function(yr){return yr||""}}),zr=(0,be.Z)(Tr,2),fr=zr[0],Gn=zr[1],$t=Ln(Sn,Hn,kr,Jn,Nn),qt=$t.valueOptions,Xt=$t.labelOptions,Ot=$t.options,En=de.useCallback(function(ar){var yr=Ie(ar);return yr.map(function(hr){var pr,Nr,Zr,$i,gi;if(jn(hr))pr=hr;else{var ui;Zr=hr.key,Nr=hr.label,pr=(ui=hr.value)!==null&&ui!==void 0?ui:Zr}var Yr=qt.get(pr);if(Yr){var Hi;if(Nr===void 0&&(Nr=Yr==null?void 0:Yr[Nn||kr.label]),Zr===void 0&&(Zr=(Hi=Yr==null?void 0:Yr.key)!==null&&Hi!==void 0?Hi:pr),$i=Yr==null?void 0:Yr.disabled,gi=Yr==null?void 0:Yr.title,0)var Ji}return{label:Nr,value:pr,key:Zr,disabled:$i,title:gi}})},[kr,Nn,qt]),On=(0,$e.Z)(Cr,{value:vr}),Vt=(0,be.Z)(On,2),Kt=Vt[0],xn=Vt[1],Cn=de.useMemo(function(){var ar,yr=jr&&Kt===null?[]:Kt,hr=En(yr);return De==="combobox"&&fe((ar=hr[0])===null||ar===void 0?void 0:ar.value)?[]:hr},[Kt,En,De,jr]),rr=An(Cn,qt),Mr=(0,be.Z)(rr,2),br=Mr[0],Ir=Mr[1],Dr=de.useMemo(function(){if(!De&&br.length===1){var ar=br[0];if(ar.value===null&&(ar.label===null||ar.label===void 0))return[]}return br.map(function(yr){var hr;return(0,ze.Z)((0,ze.Z)({},yr),{},{label:(hr=typeof cr=="function"?cr(yr):yr.label)!==null&&hr!==void 0?hr:yr.value})})},[De,br,cr]),Lr=de.useMemo(function(){return new Set(br.map(function(ar){return ar.value}))},[br]);de.useEffect(function(){if(De==="combobox"){var ar,yr=(ar=br[0])===null||ar===void 0?void 0:ar.value;Gn(ye(yr)?String(yr):"")}},[br]);var Hr=Yn(function(ar,yr){var hr=yr!=null?yr:ar;return(0,me.Z)((0,me.Z)({},kr.value,ar),kr.label,hr)}),Or=de.useMemo(function(){if(De!=="tags")return Ot;var ar=(0,Je.Z)(Ot),yr=function(pr){return qt.has(pr)};return(0,Je.Z)(br).sort(function(hr,pr){return hr.value<pr.value?-1:1}).forEach(function(hr){var pr=hr.value;yr(pr)||ar.push(Hr(pr,hr.label))}),ar},[Hr,Ot,qt,br,De]),_r=wn(Or,kr,fr,Br,Jn),ti=de.useMemo(function(){return De!=="tags"||!fr||_r.some(function(ar){return ar[Jn||"value"]===fr})||_r.some(function(ar){return ar[kr.value]===fr})?_r:[Hr(fr)].concat((0,Je.Z)(_r))},[Hr,Jn,De,_r,fr,kr]),Di=function ar(yr){var hr=(0,Je.Z)(yr).sort(function(pr,Nr){return Xn(pr,Nr,{searchValue:fr})});return hr.map(function(pr){return Array.isArray(pr.options)?(0,ze.Z)((0,ze.Z)({},pr),{},{options:pr.options.length>0?ar(pr.options):pr.options}):pr})},Fi=de.useMemo(function(){return Xn?Di(ti):ti},[ti,Xn,fr]),xi=de.useMemo(function(){return Qe(Fi,{fieldNames:kr,childrenAsData:Er})},[Fi,kr,Er]),mi=function(yr){var hr=En(yr);if(xn(hr),dr&&(hr.length!==br.length||hr.some(function(Zr,$i){var gi;return((gi=br[$i])===null||gi===void 0?void 0:gi.value)!==(Zr==null?void 0:Zr.value)}))){var pr=or?hr:hr.map(function(Zr){return Zr.value}),Nr=hr.map(function(Zr){return ht(Ir(Zr.value))});dr(jr?pr:pr[0],jr?Nr:Nr[0])}},Yi=de.useState(null),Ar=(0,be.Z)(Yi,2),to=Ar[0],ni=Ar[1],Ai=de.useState(0),ao=(0,be.Z)(Ai,2),Xi=ao[0],vi=ao[1],Bi=ur!==void 0?ur:De!=="combobox",Gr=de.useCallback(function(ar,yr){var hr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pr=hr.source,Nr=pr===void 0?"keyboard":pr;vi(yr),qe&&De==="combobox"&&ar!==null&&Nr==="keyboard"&&ni(String(ar))},[qe,De]),zi=function(yr,hr,pr){var Nr=function(){var no,_i=Ir(yr);return[or?{label:_i==null?void 0:_i[kr.label],value:yr,key:(no=_i==null?void 0:_i.key)!==null&&no!==void 0?no:yr}:yr,ht(_i)]};if(hr&&jt){var Zr=Nr(),$i=(0,be.Z)(Zr,2),gi=$i[0],ui=$i[1];jt(gi,ui)}else if(!hr&&hn&&pr!=="clear"){var Yr=Nr(),Hi=(0,be.Z)(Yr,2),Ji=Hi[0],Pi=Hi[1];hn(Ji,Pi)}},lo=Yn(function(ar,yr){var hr,pr=jr?yr.selected:!0;pr?hr=jr?[].concat((0,Je.Z)(br),[ar]):[ar]:hr=br.filter(function(Nr){return Nr.value!==ar}),mi(hr),zi(ar,pr),De==="combobox"?ni(""):(!Jt||it)&&(Gn(""),ni(""))}),Zi=function(yr,hr){mi(yr);var pr=hr.type,Nr=hr.values;(pr==="remove"||pr==="clear")&&Nr.forEach(function(Zr){zi(Zr.value,!1,pr)})},Qr=function(yr,hr){if(Gn(yr),ni(null),hr.source==="submit"){var pr=(yr||"").trim();if(pr){var Nr=Array.from(new Set([].concat((0,Je.Z)(Lr),[pr])));mi(Nr),zi(pr,!0),Gn("")}return}hr.source!=="blur"&&(De==="combobox"&&mi(yr),Mt==null||Mt(yr))},xo=function(yr){var hr=yr;De!=="tags"&&(hr=yr.map(function(Nr){var Zr=Xt.get(Nr);return Zr==null?void 0:Zr.value}).filter(function(Nr){return Nr!==void 0}));var pr=Array.from(new Set([].concat((0,Je.Z)(Lr),(0,Je.Z)(hr))));mi(pr),pr.forEach(function(Nr){zi(Nr,!0)})},so=de.useMemo(function(){var ar=lr!==!1&&cn!==!1;return(0,ze.Z)((0,ze.Z)({},$t),{},{flattenOptions:xi,onActiveValue:Gr,defaultActiveFirstOption:Bi,onSelect:lo,menuItemSelectedIcon:qn,rawValues:Lr,fieldNames:kr,virtual:ar,direction:ir,listHeight:tr,listItemHeight:mr,childrenAsData:Er,maxCount:Fn,optionRender:Pn})},[Fn,$t,xi,Gr,Bi,lo,qn,Lr,kr,lr,cn,ir,tr,mr,Er,Pn]);return de.createElement(Gt.Provider,{value:so},de.createElement(pt,(0,re.Z)({},wr,{id:Rr,prefixCls:Pe,ref:He,omitDomProps:Qn,mode:De,displayValues:Dr,onDisplayValuesChange:Zi,direction:ir,searchValue:fr,onSearch:Qr,autoClearSearchValue:it,onSearchSplit:xo,dropdownMatchSelectWidth:cn,OptionList:$n,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Rr,"_list_").concat(Xi)})))}),Ht=yt;Ht.Option=an,Ht.OptGroup=Rt;var In=Ht,Un=In},22711:function(Wt,Tt,le){"use strict";le.r(Tt),le.d(Tt,{ResizableTextArea:function(){return Le},default:function(){return Ct}});var re=le(60499),Je=le(18642),me=le(85899),ze=le(77654),be=le(72190),Ce=le(42244),Ne=le(92310),$e=le.n(Ne),Se=le(36901),de=le(66003),Ze=le(30292),xe=le(18929),ot=le(59301),Be=le(43749),Me=le(29301),Re=le(34280),Oe=le(16089),rt=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,gt=["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"],xt={},at;function Ye(Ie){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,At=Ie.getAttribute("id")||Ie.getAttribute("data-reactid")||Ie.getAttribute("name");if(wt&&xt[At])return xt[At];var ye=window.getComputedStyle(Ie),fe=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),ut=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),_t=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),bt=gt.map(function(nt){return"".concat(nt,":").concat(ye.getPropertyValue(nt))}).join(";"),Ae={sizingStyle:bt,paddingSize:ut,borderSize:_t,boxSizing:fe};return wt&&At&&(xt[At]=Ae),Ae}function st(Ie){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,At=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;at||(at=document.createElement("textarea"),at.setAttribute("tab-index","-1"),at.setAttribute("aria-hidden","true"),at.setAttribute("name","hiddenTextarea"),document.body.appendChild(at)),Ie.getAttribute("wrap")?at.setAttribute("wrap",Ie.getAttribute("wrap")):at.removeAttribute("wrap");var fe=Ye(Ie,wt),ut=fe.paddingSize,_t=fe.borderSize,bt=fe.boxSizing,Ae=fe.sizingStyle;at.setAttribute("style","".concat(Ae,";").concat(rt)),at.value=Ie.value||Ie.placeholder||"";var nt=void 0,dt=void 0,rn,Et=at.scrollHeight;if(bt==="border-box"?Et+=_t:bt==="content-box"&&(Et-=ut),At!==null||ye!==null){at.value=" ";var Ut=at.scrollHeight-ut;At!==null&&(nt=Ut*At,bt==="border-box"&&(nt=nt+ut+_t),Et=Math.max(nt,Et)),ye!==null&&(dt=Ut*ye,bt==="border-box"&&(dt=dt+ut+_t),rn=Et>dt?"":"hidden",Et=Math.min(dt,Et))}var Ge={height:Et,overflowY:rn,resize:"none"};return nt&&(Ge.minHeight=nt),dt&&(Ge.maxHeight=dt),Ge}var We=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],St=0,Xe=1,_e=2,ft=ot.forwardRef(function(Ie,wt){var At=Ie,ye=At.prefixCls,fe=At.defaultValue,ut=At.value,_t=At.autoSize,bt=At.onResize,Ae=At.className,nt=At.style,dt=At.disabled,rn=At.onChange,Et=At.onInternalAutoSize,Ut=(0,Ce.Z)(At,We),Ge=(0,xe.Z)(fe,{value:ut,postState:function(an){return an!=null?an:""}}),Pt=(0,be.Z)(Ge,2),tt=Pt[0],ae=Pt[1],ee=function(an){ae(an.target.value),rn==null||rn(an)},z=ot.useRef();ot.useImperativeHandle(wt,function(){return{textArea:z.current}});var ie=ot.useMemo(function(){return _t&&(0,Be.Z)(_t)==="object"?[_t.minRows,_t.maxRows]:[]},[_t]),se=(0,be.Z)(ie,2),ne=se[0],we=se[1],Ve=!!_t,It=function(){try{if(document.activeElement===z.current){var an=z.current,Tn=an.selectionStart,bn=an.selectionEnd,ke=an.scrollTop;z.current.setSelectionRange(Tn,bn),z.current.scrollTop=ke}}catch(Ue){}},je=ot.useState(_e),Qe=(0,be.Z)(je,2),ht=Qe[0],Dt=Qe[1],kt=ot.useState(),Gt=(0,be.Z)(kt,2),Zt=Gt[0],Lt=Gt[1],sn=function(){Dt(St)};(0,Re.Z)(function(){Ve&&sn()},[ut,ne,we,Ve]),(0,Re.Z)(function(){if(ht===St)Dt(Xe);else if(ht===Xe){var Yt=st(z.current,!1,ne,we);Dt(_e),Lt(Yt)}else It()},[ht]);var Jt=ot.useRef(),on=function(){Oe.Z.cancel(Jt.current)},pt=function(an){ht===_e&&(bt==null||bt(an),_t&&(on(),Jt.current=(0,Oe.Z)(function(){sn()})))};ot.useEffect(function(){return on},[]);var dn=Ve?Zt:null,Rt=(0,me.Z)((0,me.Z)({},nt),dn);return(ht===St||ht===Xe)&&(Rt.overflowY="hidden",Rt.overflowX="hidden"),ot.createElement(Me.Z,{onResize:pt,disabled:!(_t||bt)},ot.createElement("textarea",(0,re.Z)({},Ut,{ref:z,style:Rt,className:$e()(ye,Ae,(0,Je.Z)({},"".concat(ye,"-disabled"),dt)),disabled:dt,value:tt,onChange:ee})))}),Le=ft,Ke=["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"],et=ot.forwardRef(function(Ie,wt){var At,ye=Ie.defaultValue,fe=Ie.value,ut=Ie.onFocus,_t=Ie.onBlur,bt=Ie.onChange,Ae=Ie.allowClear,nt=Ie.maxLength,dt=Ie.onCompositionStart,rn=Ie.onCompositionEnd,Et=Ie.suffix,Ut=Ie.prefixCls,Ge=Ut===void 0?"rc-textarea":Ut,Pt=Ie.showCount,tt=Ie.count,ae=Ie.className,ee=Ie.style,z=Ie.disabled,ie=Ie.hidden,se=Ie.classNames,ne=Ie.styles,we=Ie.onResize,Ve=Ie.onClear,It=Ie.onPressEnter,je=Ie.readOnly,Qe=Ie.autoSize,ht=Ie.onKeyDown,Dt=(0,Ce.Z)(Ie,Ke),kt=(0,xe.Z)(ye,{value:fe,defaultValue:ye}),Gt=(0,be.Z)(kt,2),Zt=Gt[0],Lt=Gt[1],sn=Zt==null?"":String(Zt),Jt=ot.useState(!1),on=(0,be.Z)(Jt,2),pt=on[0],dn=on[1],Rt=ot.useRef(!1),Yt=ot.useState(null),an=(0,be.Z)(Yt,2),Tn=an[0],bn=an[1],ke=(0,ot.useRef)(null),Ue=(0,ot.useRef)(null),mt=function(){var Ht;return(Ht=Ue.current)===null||Ht===void 0?void 0:Ht.textArea},zt=function(){mt().focus()};(0,ot.useImperativeHandle)(wt,function(){var yt;return{resizableTextArea:Ue.current,focus:zt,blur:function(){mt().blur()},nativeElement:((yt=ke.current)===null||yt===void 0?void 0:yt.nativeElement)||mt()}}),(0,ot.useEffect)(function(){dn(function(yt){return!z&&yt})},[z]);var nn=ot.useState(null),fn=(0,be.Z)(nn,2),$n=fn[0],An=fn[1];ot.useEffect(function(){if($n){var yt;(yt=mt()).setSelectionRange.apply(yt,(0,ze.Z)($n))}},[$n]);var pn=(0,de.Z)(tt,Pt),wn=(At=pn.max)!==null&&At!==void 0?At:nt,vn=Number(wn)>0,Kn=pn.strategy(sn),gn=!!wn&&Kn>wn,Dn=function(Ht,In){var Un=In;!Rt.current&&pn.exceedFormatter&&pn.max&&pn.strategy(In)>pn.max&&(Un=pn.exceedFormatter(In,{max:pn.max}),In!==Un&&An([mt().selectionStart||0,mt().selectionEnd||0])),Lt(Un),(0,Ze.rJ)(Ht.currentTarget,Ht,bt,Un)},tn=function(Ht){Rt.current=!0,dt==null||dt(Ht)},yn=function(Ht){Rt.current=!1,Dn(Ht,Ht.currentTarget.value),rn==null||rn(Ht)},un=function(Ht){Dn(Ht,Ht.target.value)},Ln=function(Ht){Ht.key==="Enter"&&It&&It(Ht),ht==null||ht(Ht)},Yn=function(Ht){dn(!0),ut==null||ut(Ht)},zn=function(Ht){dn(!1),_t==null||_t(Ht)},Bn=function(Ht){Lt(""),zt(),(0,Ze.rJ)(mt(),Ht,bt)},_n=Et,Vn;pn.show&&(pn.showFormatter?Vn=pn.showFormatter({value:sn,count:Kn,maxLength:wn}):Vn="".concat(Kn).concat(vn?" / ".concat(wn):""),_n=ot.createElement(ot.Fragment,null,_n,ot.createElement("span",{className:$e()("".concat(Ge,"-data-count"),se==null?void 0:se.count),style:ne==null?void 0:ne.count},Vn)));var Qn=function(Ht){var In;we==null||we(Ht),(In=mt())!==null&&In!==void 0&&In.style.height&&bn(!0)},jn=!Qe&&!Pt&&!Ae;return ot.createElement(Se.BaseInput,{ref:ke,value:sn,allowClear:Ae,handleReset:Bn,suffix:_n,prefixCls:Ge,classNames:(0,me.Z)((0,me.Z)({},se),{},{affixWrapper:$e()(se==null?void 0:se.affixWrapper,(0,Je.Z)((0,Je.Z)({},"".concat(Ge,"-show-count"),Pt),"".concat(Ge,"-textarea-allow-clear"),Ae))}),disabled:z,focused:pt,className:$e()(ae,gn&&"".concat(Ge,"-out-of-range")),style:(0,me.Z)((0,me.Z)({},ee),Tn&&!jn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Vn=="string"?Vn:void 0}},hidden:ie,readOnly:je,onClear:Ve},ot.createElement(Le,(0,re.Z)({},Dt,{autoSize:Qe,maxLength:nt,onKeyDown:Ln,onChange:un,onFocus:Yn,onBlur:zn,onCompositionStart:tn,onCompositionEnd:yn,className:$e()(se==null?void 0:se.textarea),style:(0,me.Z)((0,me.Z)({},ne==null?void 0:ne.textarea),{},{resize:ee==null?void 0:ee.resize}),disabled:z,prefixCls:Ge,onResize:Qn,ref:Ue,readOnly:je})))}),pe=et,Ct=pe},48911:function(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return tt}});var re=le(60499),Je=le(43749),me=le(85899),ze=le(18642),be=le(72190),Ce=le(42244),Ne=le(92310),$e=le.n(Ne),Se=le(29301),de=le(70425),Ze=le(34280),xe=le(59301),ot=le(4676),Be=xe.forwardRef(function(ae,ee){var z=ae.height,ie=ae.offsetY,se=ae.offsetX,ne=ae.children,we=ae.prefixCls,Ve=ae.onInnerResize,It=ae.innerProps,je=ae.rtl,Qe=ae.extra,ht={},Dt={display:"flex",flexDirection:"column"};return ie!==void 0&&(ht={height:z,position:"relative",overflow:"hidden"},Dt=(0,me.Z)((0,me.Z)({},Dt),{},(0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)({transform:"translateY(".concat(ie,"px)")},je?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),xe.createElement("div",{style:ht},xe.createElement(Se.Z,{onResize:function(Gt){var Zt=Gt.offsetHeight;Zt&&Ve&&Ve()}},xe.createElement("div",(0,re.Z)({style:Dt,className:$e()((0,ze.Z)({},"".concat(we,"-holder-inner"),we)),ref:ee},It),ne,Qe)))});Be.displayName="Filler";var Me=Be;function Re(ae){var ee=ae.children,z=ae.setRef,ie=xe.useCallback(function(se){z(se)},[]);return xe.cloneElement(ee,{ref:ie})}function Oe(ae,ee,z,ie,se,ne,we,Ve){var It=Ve.getKey;return ae.slice(ee,z+1).map(function(je,Qe){var ht=ee+Qe,Dt=we(je,ht,{style:{width:ie},offsetX:se}),kt=It(je);return xe.createElement(Re,{key:kt,setRef:function(Zt){return ne(je,Zt)}},Dt)})}function rt(ae,ee,z,ie){var se=z-ae,ne=ee-z,we=Math.min(se,ne)*2;if(ie<=we){var Ve=Math.floor(ie/2);return ie%2?z+Ve+1:z-Ve}return se>ne?z-(ie-ne):z+(ie-se)}function gt(ae,ee,z){var ie=ae.length,se=ee.length,ne,we;if(ie===0&&se===0)return null;ie<se?(ne=ae,we=ee):(ne=ee,we=ae);var Ve={__EMPTY_ITEM__:!0};function It(Gt){return Gt!==void 0?z(Gt):Ve}for(var je=null,Qe=Math.abs(ie-se)!==1,ht=0;ht<we.length;ht+=1){var Dt=It(ne[ht]),kt=It(we[ht]);if(Dt!==kt){je=ht,Qe=Qe||Dt!==It(we[ht+1]);break}}return je===null?null:{index:je,multiple:Qe}}function xt(ae,ee,z){var ie=xe.useState(ae),se=(0,be.Z)(ie,2),ne=se[0],we=se[1],Ve=xe.useState(null),It=(0,be.Z)(Ve,2),je=It[0],Qe=It[1];return xe.useEffect(function(){var ht=gt(ne||[],ae||[],ee);(ht==null?void 0:ht.index)!==void 0&&(z==null||z(ht.index),Qe(ae[ht.index])),we(ae)},[ae]),[je]}var at=le(16089),Ye=(typeof navigator=="undefined"?"undefined":(0,Je.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),st=Ye,We=function(ae,ee,z,ie){var se=(0,xe.useRef)(!1),ne=(0,xe.useRef)(null);function we(){clearTimeout(ne.current),se.current=!0,ne.current=setTimeout(function(){se.current=!1},50)}var Ve=(0,xe.useRef)({top:ae,bottom:ee,left:z,right:ie});return Ve.current.top=ae,Ve.current.bottom=ee,Ve.current.left=z,Ve.current.right=ie,function(It,je){var Qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ht=It?je<0&&Ve.current.left||je>0&&Ve.current.right:je<0&&Ve.current.top||je>0&&Ve.current.bottom;return Qe&&ht?(clearTimeout(ne.current),se.current=!1):(!ht||se.current)&&we(),!se.current&&ht}};function St(ae,ee,z,ie,se,ne,we){var Ve=(0,xe.useRef)(0),It=(0,xe.useRef)(null),je=(0,xe.useRef)(null),Qe=(0,xe.useRef)(!1),ht=We(ee,z,ie,se);function Dt(Jt,on){if(at.Z.cancel(It.current),!ht(!1,on)){var pt=Jt;if(!pt._virtualHandled)pt._virtualHandled=!0;else return;Ve.current+=on,je.current=on,st||pt.preventDefault(),It.current=(0,at.Z)(function(){var dn=Qe.current?10:1;we(Ve.current*dn,!1),Ve.current=0})}}function kt(Jt,on){we(on,!0),st||Jt.preventDefault()}var Gt=(0,xe.useRef)(null),Zt=(0,xe.useRef)(null);function Lt(Jt){if(ae){at.Z.cancel(Zt.current),Zt.current=(0,at.Z)(function(){Gt.current=null},2);var on=Jt.deltaX,pt=Jt.deltaY,dn=Jt.shiftKey,Rt=on,Yt=pt;(Gt.current==="sx"||!Gt.current&&dn&&pt&&!on)&&(Rt=pt,Yt=0,Gt.current="sx");var an=Math.abs(Rt),Tn=Math.abs(Yt);Gt.current===null&&(Gt.current=ne&&an>Tn?"x":"y"),Gt.current==="y"?Dt(Jt,Yt):kt(Jt,Rt)}}function sn(Jt){ae&&(Qe.current=Jt.detail===je.current)}return[Lt,sn]}function Xe(ae,ee,z,ie){var se=xe.useMemo(function(){return[new Map,[]]},[ae,z.id,ie]),ne=(0,be.Z)(se,2),we=ne[0],Ve=ne[1],It=function(Qe){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qe,Dt=we.get(Qe),kt=we.get(ht);if(Dt===void 0||kt===void 0)for(var Gt=ae.length,Zt=Ve.length;Zt<Gt;Zt+=1){var Lt,sn=ae[Zt],Jt=ee(sn);we.set(Jt,Zt);var on=(Lt=z.get(Jt))!==null&&Lt!==void 0?Lt:ie;if(Ve[Zt]=(Ve[Zt-1]||0)+on,Jt===Qe&&(Dt=Zt),Jt===ht&&(kt=Zt),Dt!==void 0&&kt!==void 0)break}return{top:Ve[Dt-1]||0,bottom:Ve[kt]}};return It}var _e=le(38705),ft=le(17212),Le=function(){function ae(){(0,_e.Z)(this,ae),(0,ze.Z)(this,"maps",void 0),(0,ze.Z)(this,"id",0),(0,ze.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ft.Z)(ae,[{key:"set",value:function(z,ie){this.diffRecords.set(z,this.maps[z]),this.maps[z]=ie,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}(),Ke=Le;function et(ae){var ee=parseFloat(ae);return isNaN(ee)?0:ee}function pe(ae,ee,z){var ie=xe.useState(0),se=(0,be.Z)(ie,2),ne=se[0],we=se[1],Ve=(0,xe.useRef)(new Map),It=(0,xe.useRef)(new Ke),je=(0,xe.useRef)(0);function Qe(){je.current+=1}function ht(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Qe();var Gt=function(){var sn=!1;Ve.current.forEach(function(Jt,on){if(Jt&&Jt.offsetParent){var pt=Jt.offsetHeight,dn=getComputedStyle(Jt),Rt=dn.marginTop,Yt=dn.marginBottom,an=et(Rt),Tn=et(Yt),bn=pt+an+Tn;It.current.get(on)!==bn&&(It.current.set(on,bn),sn=!0)}}),sn&&we(function(Jt){return Jt+1})};if(kt)Gt();else{je.current+=1;var Zt=je.current;Promise.resolve().then(function(){Zt===je.current&&Gt()})}}function Dt(kt,Gt){var Zt=ae(kt),Lt=Ve.current.get(Zt);Gt?(Ve.current.set(Zt,Gt),ht()):Ve.current.delete(Zt),!Lt!=!Gt&&(Gt?ee==null||ee(kt):z==null||z(kt))}return(0,xe.useEffect)(function(){return Qe},[]),[Dt,ht,It.current,ne]}var Ct=14/15;function Ie(ae,ee,z){var ie=(0,xe.useRef)(!1),se=(0,xe.useRef)(0),ne=(0,xe.useRef)(0),we=(0,xe.useRef)(null),Ve=(0,xe.useRef)(null),It,je=function(kt){if(ie.current){var Gt=Math.ceil(kt.touches[0].pageX),Zt=Math.ceil(kt.touches[0].pageY),Lt=se.current-Gt,sn=ne.current-Zt,Jt=Math.abs(Lt)>Math.abs(sn);Jt?se.current=Gt:ne.current=Zt;var on=z(Jt,Jt?Lt:sn,!1,kt);on&&kt.preventDefault(),clearInterval(Ve.current),on&&(Ve.current=setInterval(function(){Jt?Lt*=Ct:sn*=Ct;var pt=Math.floor(Jt?Lt:sn);(!z(Jt,pt,!0)||Math.abs(pt)<=.1)&&clearInterval(Ve.current)},16))}},Qe=function(){ie.current=!1,It()},ht=function(kt){It(),kt.touches.length===1&&!ie.current&&(ie.current=!0,se.current=Math.ceil(kt.touches[0].pageX),ne.current=Math.ceil(kt.touches[0].pageY),we.current=kt.target,we.current.addEventListener("touchmove",je,{passive:!1}),we.current.addEventListener("touchend",Qe,{passive:!0}))};It=function(){we.current&&(we.current.removeEventListener("touchmove",je),we.current.removeEventListener("touchend",Qe))},(0,Ze.Z)(function(){return ae&&ee.current.addEventListener("touchstart",ht,{passive:!0}),function(){var Dt;(Dt=ee.current)===null||Dt===void 0||Dt.removeEventListener("touchstart",ht),It(),clearInterval(Ve.current)}},[ae])}function wt(ae){return Math.floor(Math.pow(ae,.5))}function At(ae,ee){var z="touches"in ae?ae.touches[0]:ae;return z[ee?"pageX":"pageY"]-window[ee?"scrollX":"scrollY"]}function ye(ae,ee,z){xe.useEffect(function(){var ie=ee.current;if(ae&&ie){var se=!1,ne,we,Ve=function(){at.Z.cancel(ne)},It=function Dt(){Ve(),ne=(0,at.Z)(function(){z(we),Dt()})},je=function(){se=!1,Ve()},Qe=function(kt){if(!(kt.target.draggable||kt.button!==0)){var Gt=kt;Gt._virtualHandled||(Gt._virtualHandled=!0,se=!0)}},ht=function(kt){if(se){var Gt=At(kt,!1),Zt=ie.getBoundingClientRect(),Lt=Zt.top,sn=Zt.bottom;if(Gt<=Lt){var Jt=Lt-Gt;we=-wt(Jt),It()}else if(Gt>=sn){var on=Gt-sn;we=wt(on),It()}else Ve()}};return ie.addEventListener("mousedown",Qe),ie.ownerDocument.addEventListener("mouseup",je),ie.ownerDocument.addEventListener("mousemove",ht),ie.ownerDocument.addEventListener("dragend",je),function(){ie.removeEventListener("mousedown",Qe),ie.ownerDocument.removeEventListener("mouseup",je),ie.ownerDocument.removeEventListener("mousemove",ht),ie.ownerDocument.removeEventListener("dragend",je),Ve()}}},[ae])}var fe=10;function ut(ae,ee,z,ie,se,ne,we,Ve){var It=xe.useRef(),je=xe.useState(null),Qe=(0,be.Z)(je,2),ht=Qe[0],Dt=Qe[1];return(0,Ze.Z)(function(){if(ht&&ht.times<fe){if(!ae.current){Dt(function(pn){return(0,me.Z)({},pn)});return}ne();var kt=ht.targetAlign,Gt=ht.originAlign,Zt=ht.index,Lt=ht.offset,sn=ae.current.clientHeight,Jt=!1,on=kt,pt=null;if(sn){for(var dn=kt||Gt,Rt=0,Yt=0,an=0,Tn=Math.min(ee.length-1,Zt),bn=0;bn<=Tn;bn+=1){var ke=se(ee[bn]);Yt=Rt;var Ue=z.get(ke);an=Yt+(Ue===void 0?ie:Ue),Rt=an}for(var mt=dn==="top"?Lt:sn-Lt,zt=Tn;zt>=0;zt-=1){var nn=se(ee[zt]),fn=z.get(nn);if(fn===void 0){Jt=!0;break}if(mt-=fn,mt<=0)break}switch(dn){case"top":pt=Yt-Lt;break;case"bottom":pt=an-sn+Lt;break;default:{var $n=ae.current.scrollTop,An=$n+sn;Yt<$n?on="top":an>An&&(on="bottom")}}pt!==null&&we(pt),pt!==ht.lastTop&&(Jt=!0)}Jt&&Dt((0,me.Z)((0,me.Z)({},ht),{},{times:ht.times+1,targetAlign:on,lastTop:pt}))}},[ht,ae.current]),function(kt){if(kt==null){Ve();return}if(at.Z.cancel(It.current),typeof kt=="number")we(kt);else if(kt&&(0,Je.Z)(kt)==="object"){var Gt,Zt=kt.align;"index"in kt?Gt=kt.index:Gt=ee.findIndex(function(Jt){return se(Jt)===kt.key});var Lt=kt.offset,sn=Lt===void 0?0:Lt;Dt({times:0,index:Gt,offset:sn,originAlign:Zt})}}}var _t=xe.forwardRef(function(ae,ee){var z=ae.prefixCls,ie=ae.rtl,se=ae.scrollOffset,ne=ae.scrollRange,we=ae.onStartMove,Ve=ae.onStopMove,It=ae.onScroll,je=ae.horizontal,Qe=ae.spinSize,ht=ae.containerSize,Dt=ae.style,kt=ae.thumbStyle,Gt=ae.showScrollBar,Zt=xe.useState(!1),Lt=(0,be.Z)(Zt,2),sn=Lt[0],Jt=Lt[1],on=xe.useState(null),pt=(0,be.Z)(on,2),dn=pt[0],Rt=pt[1],Yt=xe.useState(null),an=(0,be.Z)(Yt,2),Tn=an[0],bn=an[1],ke=!ie,Ue=xe.useRef(),mt=xe.useRef(),zt=xe.useState(Gt),nn=(0,be.Z)(zt,2),fn=nn[0],$n=nn[1],An=xe.useRef(),pn=function(){Gt===!0||Gt===!1||(clearTimeout(An.current),$n(!0),An.current=setTimeout(function(){$n(!1)},3e3))},wn=ne-ht||0,vn=ht-Qe||0,Kn=xe.useMemo(function(){if(se===0||wn===0)return 0;var Bn=se/wn;return Bn*vn},[se,wn,vn]),gn=function(_n){_n.stopPropagation(),_n.preventDefault()},Dn=xe.useRef({top:Kn,dragging:sn,pageY:dn,startTop:Tn});Dn.current={top:Kn,dragging:sn,pageY:dn,startTop:Tn};var tn=function(_n){Jt(!0),Rt(At(_n,je)),bn(Dn.current.top),we(),_n.stopPropagation(),_n.preventDefault()};xe.useEffect(function(){var Bn=function(jn){jn.preventDefault()},_n=Ue.current,Vn=mt.current;return _n.addEventListener("touchstart",Bn,{passive:!1}),Vn.addEventListener("touchstart",tn,{passive:!1}),function(){_n.removeEventListener("touchstart",Bn),Vn.removeEventListener("touchstart",tn)}},[]);var yn=xe.useRef();yn.current=wn;var un=xe.useRef();un.current=vn,xe.useEffect(function(){if(sn){var Bn,_n=function(jn){var yt=Dn.current,Ht=yt.dragging,In=yt.pageY,Un=yt.startTop;at.Z.cancel(Bn);var Ee=Ue.current.getBoundingClientRect(),He=ht/(je?Ee.width:Ee.height);if(Ht){var ve=(At(jn,je)-In)*He,De=Un;!ke&&je?De-=ve:De+=ve;var ge=yn.current,Pe=un.current,qe=Pe?De/Pe:0,Bt=Math.ceil(qe*ge);Bt=Math.max(Bt,0),Bt=Math.min(Bt,ge),Bn=(0,at.Z)(function(){It(Bt,je)})}},Vn=function(){Jt(!1),Ve()};return window.addEventListener("mousemove",_n,{passive:!0}),window.addEventListener("touchmove",_n,{passive:!0}),window.addEventListener("mouseup",Vn,{passive:!0}),window.addEventListener("touchend",Vn,{passive:!0}),function(){window.removeEventListener("mousemove",_n),window.removeEventListener("touchmove",_n),window.removeEventListener("mouseup",Vn),window.removeEventListener("touchend",Vn),at.Z.cancel(Bn)}}},[sn]),xe.useEffect(function(){return pn(),function(){clearTimeout(An.current)}},[se]),xe.useImperativeHandle(ee,function(){return{delayHidden:pn}});var Ln="".concat(z,"-scrollbar"),Yn={position:"absolute",visibility:fn?null:"hidden"},zn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return je?(Object.assign(Yn,{height:8,left:0,right:0,bottom:0}),Object.assign(zn,(0,ze.Z)({height:"100%",width:Qe},ke?"left":"right",Kn))):(Object.assign(Yn,(0,ze.Z)({width:8,top:0,bottom:0},ke?"right":"left",0)),Object.assign(zn,{width:"100%",height:Qe,top:Kn})),xe.createElement("div",{ref:Ue,className:$e()(Ln,(0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(Ln,"-horizontal"),je),"".concat(Ln,"-vertical"),!je),"".concat(Ln,"-visible"),fn)),style:(0,me.Z)((0,me.Z)({},Yn),Dt),onMouseDown:gn,onMouseMove:pn},xe.createElement("div",{ref:mt,className:$e()("".concat(Ln,"-thumb"),(0,ze.Z)({},"".concat(Ln,"-thumb-moving"),sn)),style:(0,me.Z)((0,me.Z)({},zn),kt),onMouseDown:tn}))}),bt=_t,Ae=20;function nt(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=ae/ee*ae;return isNaN(z)&&(z=0),z=Math.max(z,Ae),Math.floor(z)}var dt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],rn=[],Et={overflowY:"auto",overflowAnchor:"none"};function Ut(ae,ee){var z=ae.prefixCls,ie=z===void 0?"rc-virtual-list":z,se=ae.className,ne=ae.height,we=ae.itemHeight,Ve=ae.fullHeight,It=Ve===void 0?!0:Ve,je=ae.style,Qe=ae.data,ht=ae.children,Dt=ae.itemKey,kt=ae.virtual,Gt=ae.direction,Zt=ae.scrollWidth,Lt=ae.component,sn=Lt===void 0?"div":Lt,Jt=ae.onScroll,on=ae.onVirtualScroll,pt=ae.onVisibleChange,dn=ae.innerProps,Rt=ae.extraRender,Yt=ae.styles,an=ae.showScrollBar,Tn=an===void 0?"optional":an,bn=(0,Ce.Z)(ae,dt),ke=xe.useCallback(function($t){return typeof Dt=="function"?Dt($t):$t==null?void 0:$t[Dt]},[Dt]),Ue=pe(ke,null,null),mt=(0,be.Z)(Ue,4),zt=mt[0],nn=mt[1],fn=mt[2],$n=mt[3],An=!!(kt!==!1&&ne&&we),pn=xe.useMemo(function(){return Object.values(fn.maps).reduce(function($t,qt){return $t+qt},0)},[fn.id,fn.maps]),wn=An&&Qe&&(Math.max(we*Qe.length,pn)>ne||!!Zt),vn=Gt==="rtl",Kn=$e()(ie,(0,ze.Z)({},"".concat(ie,"-rtl"),vn),se),gn=Qe||rn,Dn=(0,xe.useRef)(),tn=(0,xe.useRef)(),yn=(0,xe.useRef)(),un=(0,xe.useState)(0),Ln=(0,be.Z)(un,2),Yn=Ln[0],zn=Ln[1],Bn=(0,xe.useState)(0),_n=(0,be.Z)(Bn,2),Vn=_n[0],Qn=_n[1],jn=(0,xe.useState)(!1),yt=(0,be.Z)(jn,2),Ht=yt[0],In=yt[1],Un=function(){In(!0)},Ee=function(){In(!1)},He={getKey:ke};function ve($t){zn(function(qt){var Xt;typeof $t=="function"?Xt=$t(qt):Xt=$t;var Ot=ur(Xt);return Dn.current.scrollTop=Ot,Ot})}var De=(0,xe.useRef)({start:0,end:gn.length}),ge=(0,xe.useRef)(),Pe=xt(gn,ke),qe=(0,be.Z)(Pe,1),Bt=qe[0];ge.current=Bt;var Nt=xe.useMemo(function(){if(!An)return{scrollHeight:void 0,start:0,end:gn.length-1,offset:void 0};if(!wn){var $t;return{scrollHeight:(($t=tn.current)===null||$t===void 0?void 0:$t.offsetHeight)||0,start:0,end:gn.length-1,offset:void 0}}for(var qt=0,Xt,Ot,En,On=gn.length,Vt=0;Vt<On;Vt+=1){var Kt=gn[Vt],xn=ke(Kt),Cn=fn.get(xn),rr=qt+(Cn===void 0?we:Cn);rr>=Yn&&Xt===void 0&&(Xt=Vt,Ot=qt),rr>Yn+ne&&En===void 0&&(En=Vt),qt=rr}return Xt===void 0&&(Xt=0,Ot=0,En=Math.ceil(ne/we)),En===void 0&&(En=gn.length-1),En=Math.min(En+1,gn.length-1),{scrollHeight:qt,start:Xt,end:En,offset:Ot}},[wn,An,Yn,gn,$n,ne]),Qt=Nt.scrollHeight,Mt=Nt.start,ct=Nt.end,it=Nt.offset;De.current.start=Mt,De.current.end=ct,xe.useLayoutEffect(function(){var $t=fn.getRecord();if($t.size===1){var qt=Array.from($t.keys())[0],Xt=$t.get(qt),Ot=gn[Mt];if(Ot&&Xt===void 0){var En=ke(Ot);if(En===qt){var On=fn.get(qt),Vt=On-we;ve(function(Kt){return Kt+Vt})}}}fn.resetRecord()},[Qt]);var jt=xe.useState({width:0,height:ne}),hn=(0,be.Z)(jt,2),ln=hn[0],cn=hn[1],Zn=function(qt){cn({width:qt.offsetWidth,height:qt.offsetHeight})},Xn=(0,xe.useRef)(),Jn=(0,xe.useRef)(),Nn=xe.useMemo(function(){return nt(ln.width,Zt)},[ln.width,Zt]),Sn=xe.useMemo(function(){return nt(ln.height,Qt)},[ln.height,Qt]),Pn=Qt-ne,Hn=(0,xe.useRef)(Pn);Hn.current=Pn;function ur($t){var qt=$t;return Number.isNaN(Hn.current)||(qt=Math.min(qt,Hn.current)),qt=Math.max(qt,0),qt}var qn=Yn<=0,lr=Yn>=Pn,ir=Vn<=0,er=Vn>=Zt,tr=We(qn,lr,ir,er),gr=function(){return{x:vn?-Vn:Vn,y:Yn}},mr=(0,xe.useRef)(gr()),cr=(0,de.zX)(function($t){if(on){var qt=(0,me.Z)((0,me.Z)({},gr()),$t);(mr.current.x!==qt.x||mr.current.y!==qt.y)&&(on(qt),mr.current=qt)}});function vr($t,qt){var Xt=$t;qt?((0,ot.flushSync)(function(){Qn(Xt)}),cr()):ve(Xt)}function Cr($t){var qt=$t.currentTarget.scrollTop;qt!==Yn&&ve(qt),Jt==null||Jt($t),cr()}var or=function(qt){var Xt=qt,Ot=Zt?Zt-ln.width:0;return Xt=Math.max(Xt,0),Xt=Math.min(Xt,Ot),Xt},dr=(0,de.zX)(function($t,qt){qt?((0,ot.flushSync)(function(){Qn(function(Xt){var Ot=Xt+(vn?-$t:$t);return or(Ot)})}),cr()):ve(function(Xt){var Ot=Xt+$t;return Ot})}),Fn=St(An,qn,lr,ir,er,!!Zt,dr),wr=(0,be.Z)(Fn,2),Rr=wr[0],jr=wr[1];Ie(An,Dn,function($t,qt,Xt,Ot){var En=Ot;return tr($t,qt,Xt)?!1:!En||!En._virtualHandled?(En&&(En._virtualHandled=!0),Rr({preventDefault:function(){},deltaX:$t?qt:0,deltaY:$t?0:qt}),!0):!1}),ye(wn,Dn,function($t){ve(function(qt){return qt+$t})}),(0,Ze.Z)(function(){function $t(Xt){var Ot=qn&&Xt.detail<0,En=lr&&Xt.detail>0;An&&!Ot&&!En&&Xt.preventDefault()}var qt=Dn.current;return qt.addEventListener("wheel",Rr,{passive:!1}),qt.addEventListener("DOMMouseScroll",jr,{passive:!0}),qt.addEventListener("MozMousePixelScroll",$t,{passive:!1}),function(){qt.removeEventListener("wheel",Rr),qt.removeEventListener("DOMMouseScroll",jr),qt.removeEventListener("MozMousePixelScroll",$t)}},[An,qn,lr]),(0,Ze.Z)(function(){if(Zt){var $t=or(Vn);Qn($t),cr({x:$t})}},[ln.width,Zt]);var Er=function(){var qt,Xt;(qt=Xn.current)===null||qt===void 0||qt.delayHidden(),(Xt=Jn.current)===null||Xt===void 0||Xt.delayHidden()},Br=ut(Dn,gn,fn,we,ke,function(){return nn(!0)},ve,Er);xe.useImperativeHandle(ee,function(){return{nativeElement:yn.current,getScrollInfo:gr,scrollTo:function(qt){function Xt(Ot){return Ot&&(0,Je.Z)(Ot)==="object"&&("left"in Ot||"top"in Ot)}Xt(qt)?(qt.left!==void 0&&Qn(or(qt.left)),Br(qt.top)):Br(qt)}}}),(0,Ze.Z)(function(){if(pt){var $t=gn.slice(Mt,ct+1);pt($t,gn)}},[Mt,ct,gn]);var kr=Xe(gn,ke,fn,we),Tr=Rt==null?void 0:Rt({start:Mt,end:ct,virtual:wn,offsetX:Vn,offsetY:it,rtl:vn,getSize:kr}),zr=Oe(gn,Mt,ct,Zt,Vn,zt,ht,He),fr=null;ne&&(fr=(0,me.Z)((0,ze.Z)({},It?"height":"maxHeight",ne),Et),An&&(fr.overflowY="hidden",Zt&&(fr.overflowX="hidden"),Ht&&(fr.pointerEvents="none")));var Gn={};return vn&&(Gn.dir="rtl"),xe.createElement("div",(0,re.Z)({ref:yn,style:(0,me.Z)((0,me.Z)({},je),{},{position:"relative"}),className:Kn},Gn,bn),xe.createElement(Se.Z,{onResize:Zn},xe.createElement(sn,{className:"".concat(ie,"-holder"),style:fr,ref:Dn,onScroll:Cr,onMouseEnter:Er},xe.createElement(Me,{prefixCls:ie,height:Qt,offsetX:Vn,offsetY:it,scrollWidth:Zt,onInnerResize:nn,ref:tn,innerProps:dn,rtl:vn,extra:Tr},zr))),wn&&Qt>ne&&xe.createElement(bt,{ref:Xn,prefixCls:ie,scrollOffset:Yn,scrollRange:Qt,rtl:vn,onScroll:vr,onStartMove:Un,onStopMove:Ee,spinSize:Sn,containerSize:ln.height,style:Yt==null?void 0:Yt.verticalScrollBar,thumbStyle:Yt==null?void 0:Yt.verticalScrollBarThumb,showScrollBar:Tn}),wn&&Zt>ln.width&&xe.createElement(bt,{ref:Jn,prefixCls:ie,scrollOffset:Vn,scrollRange:Zt,rtl:vn,onScroll:vr,onStartMove:Un,onStopMove:Ee,spinSize:Nn,containerSize:ln.width,horizontal:!0,style:Yt==null?void 0:Yt.horizontalScrollBar,thumbStyle:Yt==null?void 0:Yt.horizontalScrollBarThumb,showScrollBar:Tn}))}var Ge=xe.forwardRef(Ut);Ge.displayName="List";var Pt=Ge,tt=Pt},4977:function(Wt){"use strict";Wt.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(Wt,Tt,le){"use strict";le.d(Tt,{Z:function(){return $e}});const re=Se=>typeof Se=="object"&&Se!=null&&Se.nodeType===1,Je=(Se,de)=>(!de||Se!=="hidden")&&Se!=="visible"&&Se!=="clip",me=(Se,de)=>{if(Se.clientHeight<Se.scrollHeight||Se.clientWidth<Se.scrollWidth){const Ze=getComputedStyle(Se,null);return Je(Ze.overflowY,de)||Je(Ze.overflowX,de)||(xe=>{const ot=(Be=>{if(!Be.ownerDocument||!Be.ownerDocument.defaultView)return null;try{return Be.ownerDocument.defaultView.frameElement}catch(Me){return null}})(xe);return!!ot&&(ot.clientHeight<xe.scrollHeight||ot.clientWidth<xe.scrollWidth)})(Se)}return!1},ze=(Se,de,Ze,xe,ot,Be,Me,Re)=>Be<Se&&Me>de||Be>Se&&Me<de?0:Be<=Se&&Re<=Ze||Me>=de&&Re>=Ze?Be-Se-xe:Me>de&&Re<Ze||Be<Se&&Re>Ze?Me-de+ot:0,be=Se=>{const de=Se.parentElement;return de==null?Se.getRootNode().host||null:de},Ce=(Se,de)=>{var Ze,xe,ot,Be;if(typeof document=="undefined")return[];const{scrollMode:Me,block:Re,inline:Oe,boundary:rt,skipOverflowHiddenElements:gt}=de,xt=typeof rt=="function"?rt:bt=>bt!==rt;if(!re(Se))throw new TypeError("Invalid target");const at=document.scrollingElement||document.documentElement,Ye=[];let st=Se;for(;re(st)&&xt(st);){if(st=be(st),st===at){Ye.push(st);break}st!=null&&st===document.body&&me(st)&&!me(document.documentElement)||st!=null&&me(st,gt)&&Ye.push(st)}const We=(xe=(Ze=window.visualViewport)==null?void 0:Ze.width)!=null?xe:innerWidth,St=(Be=(ot=window.visualViewport)==null?void 0:ot.height)!=null?Be:innerHeight,{scrollX:Xe,scrollY:_e}=window,{height:ft,width:Le,top:Ke,right:et,bottom:pe,left:Ct}=Se.getBoundingClientRect(),{top:Ie,right:wt,bottom:At,left:ye}=(bt=>{const Ae=window.getComputedStyle(bt);return{top:parseFloat(Ae.scrollMarginTop)||0,right:parseFloat(Ae.scrollMarginRight)||0,bottom:parseFloat(Ae.scrollMarginBottom)||0,left:parseFloat(Ae.scrollMarginLeft)||0}})(Se);let fe=Re==="start"||Re==="nearest"?Ke-Ie:Re==="end"?pe+At:Ke+ft/2-Ie+At,ut=Oe==="center"?Ct+Le/2-ye+wt:Oe==="end"?et+wt:Ct-ye;const _t=[];for(let bt=0;bt<Ye.length;bt++){const Ae=Ye[bt],{height:nt,width:dt,top:rn,right:Et,bottom:Ut,left:Ge}=Ae.getBoundingClientRect();if(Me==="if-needed"&&Ke>=0&&Ct>=0&&pe<=St&&et<=We&&(Ae===at&&!me(Ae)||Ke>=rn&&pe<=Ut&&Ct>=Ge&&et<=Et))return _t;const Pt=getComputedStyle(Ae),tt=parseInt(Pt.borderLeftWidth,10),ae=parseInt(Pt.borderTopWidth,10),ee=parseInt(Pt.borderRightWidth,10),z=parseInt(Pt.borderBottomWidth,10);let ie=0,se=0;const ne="offsetWidth"in Ae?Ae.offsetWidth-Ae.clientWidth-tt-ee:0,we="offsetHeight"in Ae?Ae.offsetHeight-Ae.clientHeight-ae-z:0,Ve="offsetWidth"in Ae?Ae.offsetWidth===0?0:dt/Ae.offsetWidth:0,It="offsetHeight"in Ae?Ae.offsetHeight===0?0:nt/Ae.offsetHeight:0;if(at===Ae)ie=Re==="start"?fe:Re==="end"?fe-St:Re==="nearest"?ze(_e,_e+St,St,ae,z,_e+fe,_e+fe+ft,ft):fe-St/2,se=Oe==="start"?ut:Oe==="center"?ut-We/2:Oe==="end"?ut-We:ze(Xe,Xe+We,We,tt,ee,Xe+ut,Xe+ut+Le,Le),ie=Math.max(0,ie+_e),se=Math.max(0,se+Xe);else{ie=Re==="start"?fe-rn-ae:Re==="end"?fe-Ut+z+we:Re==="nearest"?ze(rn,Ut,nt,ae,z+we,fe,fe+ft,ft):fe-(rn+nt/2)+we/2,se=Oe==="start"?ut-Ge-tt:Oe==="center"?ut-(Ge+dt/2)+ne/2:Oe==="end"?ut-Et+ee+ne:ze(Ge,Et,dt,tt,ee+ne,ut,ut+Le,Le);const{scrollLeft:je,scrollTop:Qe}=Ae;ie=It===0?0:Math.max(0,Math.min(Qe+ie/It,Ae.scrollHeight-nt/It+we)),se=Ve===0?0:Math.max(0,Math.min(je+se/Ve,Ae.scrollWidth-dt/Ve+ne)),fe+=Qe-ie,ut+=je-se}_t.push({el:Ae,top:ie,left:se})}return _t},Ne=Se=>Se===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(Se)?Se:{block:"start",inline:"nearest"};function $e(Se,de){if(!Se.isConnected||!(ot=>{let Be=ot;for(;Be&&Be.parentNode;){if(Be.parentNode===document)return!0;Be=Be.parentNode instanceof ShadowRoot?Be.parentNode.host:Be.parentNode}return!1})(Se))return;const Ze=(ot=>{const Be=window.getComputedStyle(ot);return{top:parseFloat(Be.scrollMarginTop)||0,right:parseFloat(Be.scrollMarginRight)||0,bottom:parseFloat(Be.scrollMarginBottom)||0,left:parseFloat(Be.scrollMarginLeft)||0}})(Se);if((ot=>typeof ot=="object"&&typeof ot.behavior=="function")(de))return de.behavior(Ce(Se,de));const xe=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:ot,top:Be,left:Me}of Ce(Se,Ne(de))){const Re=Be-Ze.top+Ze.bottom,Oe=Me-Ze.left+Ze.right;ot.scroll({top:Re,left:Oe,behavior:xe})}}}}]);