|
|
(self.webpackChunk=self.webpackChunk||[]).push([[8319],{40001:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(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"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},26227:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},41464:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},73331:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(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"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},15277:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(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"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},61481:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(59301),me={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},61485:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(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"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},47472:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(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"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},87395:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(60499),ot=ie(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"},Ge=me,xe=ie(7657),Ce=function(fe,Qe){return ot.createElement(xe.Z,(0,te.Z)({},fe,{ref:Qe,icon:Ge}))},ze=ot.forwardRef(Ce),Ke=ze},88319:function(){"use strict"},94896:function(){"use strict"},74501:function(en,Ht){"use strict";Ht.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},42168:function(en,Ht){"use strict";Ht.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n",rateInput:"rateInput___yMSFt",operationWrapper:"operationWrapper___sHATq",add:"add___jcwUR",remove:"remove___nbhui"}},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 en={},Ht="5.0",ie={},te=null,ot=!1,me=!1,Ge=null,xe=!1,Ce=null,ze=null,Ke=0;Ke<arguments.length;Ke++){var ke=arguments[Ke];if(ke!==null)switch(typeof ke){case"number":Ht=ke.toFixed(1);break;case"string":ke.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ht=ke:Ge=ke;break;case"object":typeof ke.is3D!="undefined"?te=ke:ie=ke;break;case"boolean":ot=ke,me=!0;break}}te===null&&(te={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ie.material_id!==void 0&&!me&&(ot=!0)),Ge!==null&&ie.id===void 0&&(ie.id=Ge);var fe="",Qe="",be=!1,xt=null,rt=null,Re=null,He=!1,Ie=null,ut=null,gt=null,yt=null,ft=null;ie.height!==void 0&&(ie.height=Math.round(ie.height)),ie.width!==void 0&&(ie.width=Math.round(ie.width));var nt=function(Be){return parseFloat(Be)>4?parseFloat(Be):5};en.setHTML5Codebase=function(Be,dt){ze=Be,Je(Be,dt)},en.setJavaCodebase=en.setJavaCodebaseVersion=en.isCompiledInstalled=en.setPreCompiledScriptPath=en.setPreCompiledResourcePath=function(){},en.setHTML5CodebaseVersion=function(Be,dt){var bt=parseFloat(Be);if(bt!==NaN&&bt<5){console.log("The GeoGebra HTML5 codebase version "+bt+" is deprecated. Using version latest instead.");return}Ce=Be,de(Be,dt)},en.getHTML5CodebaseVersion=function(){return rt},en.getParameters=function(){return ie},en.setFontsCSSURL=function(Be){yt=Be},en.setGiacJSURL=function(Be){},en.setJNLPFile=function(Be){fe=Be},en.setJNLPBaseDir=function(Be){},en.inject=function(){function Be(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var dt="auto",bt=ie.id,tn,Ot=!1,jt=0;jt<arguments.length;jt++){var it=arguments[jt];typeof it=="string"?(it=it.toLowerCase(),it.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?dt=it:bt=arguments[jt]):typeof it=="boolean"?Ot=it:it instanceof HTMLElement&&(tn=it)}Gt();function Gt(){if(!xe){setTimeout(Gt,200);return}dt=rn(dt);var mt=tn||document.getElementById(bt);if(!mt){console.log("possibly bug on ajax loading? ");return}if(en.removeExistingApplet(mt,!1),ie.width===void 0&&mt.clientWidth&&(ie.width=mt.clientWidth),ie.height===void 0&&mt.clientHeight&&(ie.height=mt.clientHeight),!(ie.width&&ie.height)&&dt==="html5"&&(delete ie.width,delete ie.height),xt=dt,dt==="screenshot")ht(mt,ie);else{var se=!1;ie.hasOwnProperty("playButton")&&ie.playButton||ie.hasOwnProperty("clickToLoad")&&ie.clickToLoad?se=!0:ie.hasOwnProperty("playButtonAutoDecide")&&ie.playButtonAutoDecide&&(se=(!vt()||Be())&&We()),se?(xt="screenshot",Bt(mt,ie,Ot,dt)):pt(mt,ie,Ot)}}};function vt(){try{return window.self!==window.top}catch(Be){return!0}}function We(){return ie.hasOwnProperty("screenshotGenerator")&&ie.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}en.getViews=function(){return te},en.isJavaInstalled=function(){return!1};var At=function(Be){var dt=function(jt){var it=JSON.parse(jt),Gt=function(ee){return ee.type=="G"||ee.type=="E"},mt=it.elements?it.elements.filter(Gt)[0]:it;if(!mt||!mt.url){bt();return}ie.fileName=mt.url,st(mt.settings||{}),te.is3D=!0;var se="https://www.geogebra.org/images/";en.setPreviewImage(Ie||mt.previewUrl,se+"GeoGebra_loading.png",se+"applet_play.png"),Be()},bt=function(){ie.onError&&ie.onError(),wt("Error: Fetching material (id "+ie.material_id+") failed.",ie)},tn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ot="/materials/"+ie.material_id+"?scope=basic";qe("https://"+tn+"/api/proxy.php?path="+encodeURIComponent(Ot),dt,bt)};function st(Be){var dt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(bt){Be[bt]=!!Be[bt]}),dt.forEach(function(bt){ie[bt]===void 0&&Be[bt]!==void 0&&(ie[bt]=Be[bt])}),ie.showToolBarHelp===void 0&&(ie.showToolBarHelp=ie.showToolBar)}function qe(Be,dt,bt){var tn=new XMLHttpRequest;tn.open("GET",Be),tn.onload=function(){dt(tn.responseText)},tn.onerror=bt,tn.send()}en.isHTML5Installed=function(){return!0},en.getLoadedAppletType=function(){return xt},en.setPreviewImage=function(Be,dt,bt){Ie=Be,ut=dt,gt=bt},en.removeExistingApplet=function(Be,dt){var bt;typeof Be=="string"&&(Be=document.getElementById(Be)),xt=null;var tn=null;for(bt=0;bt<Be.childNodes.length;bt++){var Ot=Be.childNodes[bt],jt=Ot.className;jt==="applet_screenshot"?dt?(Ot.style.display="block",xt="screenshot"):Ot.style.display="none":jt!=="applet_scaler prerender"&&(Be.removeChild(Ot),tn=jt&&jt.indexOf("appletParameters")!=-1?Ot.id:null,bt--)}var it=ie.id!==void 0?ie.id:tn,Gt=window[it];Gt&&typeof Gt.getBase64=="function"&&(Gt.remove(),window[it]=null)},en.refreshHitPoints=function(){if(nt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Be=en.getAppletObject();return Be&&typeof Be.recalculateEnvironments=="function"?(Be.recalculateEnvironments(),!0):!1},en.startAnimation=function(){var Be=en.getAppletObject();return Be&&typeof Be.startAnimation=="function"?(Be.startAnimation(),!0):!1},en.stopAnimation=function(){var Be=en.getAppletObject();return Be&&typeof Be.stopAnimation=="function"?(Be.stopAnimation(),!0):!1},en.getAppletObject=function(){var Be=ie.id!==void 0?ie.id:"ggbApplet";return window[Be]},en.resize=function(){};var Mt=function(Be,dt,bt){var tn=document.createElement("param");tn.setAttribute("name",dt),tn.setAttribute("value",bt),Be.appendChild(tn)},Ve=function(Be){return Be&&Be!=="false"},pt=function(Be,dt,bt){nt(rt)<=4.2&&(bt=!0);var tn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==rt||ggbHTML5LoadedCodebaseIsWebSimple&&!He)&&(tn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ot=document.createElement("div");Ot.classList.add("appletParameters","notranslate");var jt=dt.width,it=dt.height;if(dt.disableAutoScale=dt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():dt.disableAutoScale,dt.width!==void 0)if(nt(rt)<=4.4)Ve(dt.showToolBar)&&(dt.height-=7),Ve(dt.showAlgebraInput)&&(dt.height-=37),dt.width<605&&Ve(dt.showToolBar)&&(dt.width=605,jt=605);else{var Gt=100;(Ve(dt.showToolBar)||Ve(dt.showMenuBar))&&(dt.hasOwnProperty("customToolBar")&&(dt.customToolbar=dt.customToolBar),Gt=Ve(dt.showMenuBar)?245:155),jt<Gt&&(dt.width=Gt,jt=Gt)}Ot.style.border="none",Ot.style.display="inline-block";for(var mt in dt)dt.hasOwnProperty(mt)&&mt!=="appletOnLoad"&&Ot.setAttribute("data-param-"+mt,dt[mt]);yt&&Ot.setAttribute("data-param-fontscssurl",yt),en.resize=function(){GGBAppletUtils.responsiveResize(Be,dt)},window.addEventListener("resize",function(Ft){en.resize()});var se=typeof dt.appletOnLoad=="function"?dt.appletOnLoad:function(){};if(!bt&&dt.width!==void 0){dt.hasOwnProperty("showSplash")||Ot.setAttribute("data-param-showSplash","false");var ee=Be.querySelector(".applet_scaler.prerender"),z=ee!==null;if(z)var oe=ee.querySelector(".ggb_preview");else{var oe=Nt(jt,it,dt.borderColor,!1);ee=document.createElement("div"),ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.style.width=jt+"px",ee.style.height=it+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ee,"66%"),nt(rt)>=5?(dt.appletOnLoad=function(Ft){var Pt=Be.querySelector(".ggb_preview");Pt&&Pt.parentNode.removeChild(Pt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ee),window.GGBT_wsf_view&&$(window).trigger("resize"),se(Ft)},z||ee.appendChild(oe)):Ot.appendChild(oe),ee.appendChild(Ot),z||Be.appendChild(ee),setTimeout(function(){en.resize()},1)}else{var le=document.createElement("div");le.className="applet_scaler",le.style.position="relative",le.style.display="block",le.appendChild(Ot),Be.appendChild(le),dt.appletOnLoad=function(Ft){en.resize(),se(Ft)}}function re(Ft,Pt){Pt&&typeof Pt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ft,Pt.appletOnLoad):renderGGBElement(Ft),wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Pt)}function Ee(Ft,Pt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ft,params:Pt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Qt){re(Qt.article,Qt.params)}),html5AppletsToProcess=null)},nt(rt)<5&&(Ft.className+=" geogebraweb")):re(Ft,Pt)}if(tn){scriptLoadStarted=!0;for(var at=0;at<Ot.childNodes.length;at++){var $t=Ot.childNodes[at].tagName;$t==="TABLE"&&(Ot.removeChild(Ot.childNodes[at]),at--)}if(ggbHTML5LoadedScript!==null){var Ye=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ye!=null&&Ye.parentNode.removeChild(Ye)}var ct=document.createElement("script"),St=function(){Ee(Ot,dt)};ct.src=Qe+Re,ggbHTML5LoadedCodebaseIsWebSimple=He,ggbHTML5LoadedCodebaseVersion=rt,ggbHTML5LoadedScript=ct.src,wt("GeoGebra HTML5 codebase loaded: '"+Qe+"'.",dt),!ze&&(!Ce||Ce=="5.0")?(He?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),St()):Qe.requirejs?__webpack_require__.e(4510).then(function(){var Ft=[__webpack_require__(4510)];St.apply(null,Ft)}.bind(this)).catch(__webpack_require__.oe):(ct.onload=St,Be.appendChild(ct))}else Ee(Ot,dt);dt.height=it,dt.width=jt},ht=function(Be,dt,bt){var tn=Nt(dt.width,dt.height,dt.borderColor,bt),Ot=document.createElement("div");Ot.style.position="relative",Ot.style.display="block",Ot.style.width=dt.width+"px",Ot.style.height=dt.height+"px",Ot.className="applet_screenshot applet_scaler"+(bt?" applet_screenshot_play":""),Ot.appendChild(tn);var jt=GGBAppletUtils.getScale(dt,Be,bt);bt?(Be.appendChild(Ae()),window.GGBT_wsf_view||(Be.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ot,"66%"),Be.appendChild(Ot),jt!==1&&!isNaN(jt)&&(GGBAppletUtils.scaleElement(Ot,jt),Ot.style.width=dt.width+"px",Ot.style.height=dt.height+"px",Ot.parentNode.style.width=dt.width*jt+"px",Ot.parentNode.style.height=dt.height*jt+"px"),en.resize=function(){ve(Be,tn,Ot,bt)},window.addEventListener("resize",function(it){en.resize()}),en.resize()};function ve(Be,dt,bt,tn){if(Be.contains(dt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Be.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Be)}var Ot=GGBAppletUtils.getScale(ie,Be,tn);bt.parentNode!==null&&(!isNaN(Ot)&&Ot!==1?(GGBAppletUtils.scaleElement(bt,Ot),bt.parentNode.style.width=ie.width*Ot+"px",bt.parentNode.style.height=ie.height*Ot+"px"):(GGBAppletUtils.scaleElement(bt,1),bt.parentNode.style.width=ie.width+"px",bt.parentNode.style.height=ie.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Be),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}en.onExitFullscreen=function(Be,dt){dt.appendChild(Be)};var Bt=function(Be,dt,bt,tn){ht(Be,dt,!0);for(var Ot=function(){var Gt=[];for(it=0;it<Be.childNodes.length;it++)Gt.push(Be.childNodes[it]);if(window.GGBT_wsf_view){var mt=window.GGBT_wsf_view.renderFullScreen(Be,dt.id),se=document.getElementById("fullscreencontainer"),ee=jQuery(Be).find(".fullscreencontent");ee.length>0?(mt.remove(),ee.attr("id","fullscreencontent").show(),jQuery(se).append(ee),window.dispatchEvent(new Event("resize"))):pt(mt,dt,!1),window.GGBT_wsf_view.launchFullScreen(se)}else xt=tn,pt(Be,dt,!1);if(!window.GGBT_wsf_view)for(it=0;it<Gt.length;it++)Be.removeChild(Gt[it])},jt=Be.getElementsByClassName("ggb_preview_play"),it=0;it<jt.length;it++)jt[it].addEventListener("click",Ot,!1),jt[it].addEventListener("ontouchstart",Ot,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Be),We()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ae=function(){var Be=document.createElement("div");if(Be.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var dt='.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");}',bt=document.createElement("style");bt.styleSheet?bt.styleSheet.cssText=dt:bt.appendChild(document.createTextNode(dt)),document.getElementsByTagName("head")[0].appendChild(bt)}return Be},Nt=function(Be,dt,bt,tn){var Ot=document.createElement("div");Ot.className="ggb_preview",Ot.style.position="absolute",Ot.style.zIndex="90",Ot.style.width=Be-2+"px",Ot.style.height=dt-2+"px",Ot.style.top="0px",Ot.style.left="0px",Ot.style.overflow="hidden",Ot.style.backgroundColor="white";var jt="lightgrey";bt!==void 0&&(bt==="none"?jt="transparent":jt=bt),Ot.style.border="1px solid "+jt;var it=document.createElement("img");if(it.style.position="relative",it.style.zIndex="1000",it.style.top="-1px",it.style.left="-1px",Ie!==null&&it.setAttribute("src",Ie),it.style.opacity=.7,ut!==null){var Gt,mt,se;if(!tn){Gt=document.createElement("img"),Gt.style.position="absolute",Gt.style.zIndex="1001",Gt.style.opacity=1,it.style.opacity=.3,mt=360,mt>Be/4*3&&(mt=Be/4*3),se=mt/5.8,Gt.setAttribute("src",ut),Gt.setAttribute("width",mt),Gt.setAttribute("height",se);var ee=(Be-mt)/2,z=(dt-se)/2;Gt.style.left=ee+"px",Gt.style.top=z+"px",Ot.appendChild(Gt)}}return Ot.appendChild(it),Ot},rn=function(Be){return Be=Be.toLowerCase(),Be==="html5"||Be==="screenshot"?Be:"html5"},we=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Be,dt){if(rt=Be,dt){Je(rt,!0);return}var bt=!ot;if(bt){var tn=nt(rt);!isNaN(tn)&&tn<4.4&&(bt=!1)}var Ot,jt;window.location.protocol.substr(0,4)==="http"?Ot=window.location.protocol:Ot="http:";var it=rt.indexOf("//");it>0?jt=rt:it===0?jt=Ot+rt:jt="https://www.geogebra.org/apps/5.2.814.0/";for(var Gt in we)if(rt.slice(we[Gt].length*-1)===we[Gt]||rt.slice((we[Gt].length+1)*-1)===we[Gt]+"/"){Je(jt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&bt&&!te.is3D&&!te.AV&&!te.SV&&!te.CV&&!te.EV2&&!te.CP&&!te.PC&&!te.DA&&!te.FI&&!te.PV&&!Ve(ie.showToolBar)&&!Ve(ie.showMenuBar)&&!Ve(ie.showAlgebraInput)&&!Ve(ie.enableRightClick)&&(!ie.appName||ie.appName=="classic")?jt+="webSimple/":jt+="web3d/",Je(jt,!1)},Je=function(Be,dt){if(Be.requirejs){Qe=Be;return}Be.slice(-1)!=="/"&&(Be+="/"),Qe=Be,dt===null&&(dt=Be.indexOf("http")===-1),be=dt,Re="web.nocache.js",He=!1;var bt=Qe.split("/");bt.length>1&&(!dt&&bt[bt.length-2]==="webSimple"?(Re="webSimple.nocache.js",He=!0):we.indexOf(bt[bt.length-2])>=0&&(Re=bt[bt.length-2]+".nocache.js")),bt=Be.split("/"),rt=bt[bt.length-3],rt.substr(0,4)==="test"?rt=rt.substr(4,1)+"."+rt.substr(5,1):(rt.substr(0,3)==="war"||rt.substr(0,4)==="beta")&&(rt="5.0");var tn=parseFloat(rt);tn!==NaN&&tn<5&&Be.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+tn+" is deprecated. Using version latest instead."),de("5.0",dt))},wt=function(Be,dt){window.console&&window.console.log&&(!dt||typeof dt.showLogging=="undefined"||dt.showLogging&&dt.showLogging!=="false")&&console.log(Be)};ie.material_id!==void 0?At(Et):Et();function Et(){var Be=Ht;Ce!==null?Be=Ce:parseFloat(Be)<5&&(Be="5.0"),de(Be,!1),ze!==null&&Je(ze,be),xe=!0}return en},GGBAppletUtils=function(){"use strict";function en(){return window.GGBT_wsf_edit!==void 0}function Ht(xe,Ce){Ce!=1?(xe.style.transformOrigin="0% 0% 0px",xe.style.webkitTransformOrigin="0% 0% 0px",xe.style.transform="scale("+Ce+","+Ce+")",xe.style.webkitTransform="scale("+Ce+","+Ce+")",xe.style.maxWidth="initial",xe.querySelector(".ggb_preview")!==null&&(xe.querySelector(".ggb_preview").style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(xe.style.transform="none",xe.style.webkitTransform="none")}function ie(xe,Ce,ze,Ke,ke,fe){var Qe=null;if(fe!=null&&fe!="")for(var be=xe.parentNode;be!=null;)if((" "+be.className+" ").indexOf(" "+fe+" ")>-1){Qe=be;break}else be=be.parentNode;var xt=0,rt=0,Re=0,He=0,Ie=0,ut=0,gt=0;if(Qe)xt=Qe.offsetWidth,rt=Math.max(Ke?Qe.offsetWidth:0,Qe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xt=Math.min(window.innerWidth,document.documentElement.clientWidth),rt=Math.min(window.innerHeight,document.documentElement.clientHeight),Re=xt):(xt=window.innerWidth,rt=window.innerHeight,Re=window.innerWidth),xe){var yt=xe.getBoundingClientRect();yt.left>0&&yt.left<=xt&&(ke===void 0||!ke)&&(document.dir==="rtl"?(Ie=xt-yt.width-yt.left,ut=Re<=480?10:30):(ut=yt.left,Ie=Re<=480?10:30),He=ut+Ie)}if(xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ft=xe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(He=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(He=0,gt=40)}}return xe&&((ze===void 0||!ze)&&Ce>0&&Ce+He<xt?xt=Ce:xt-=He,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ze===void 0||!ze)&&(rt-=gt)),{width:xt,height:rt}}function te(xe,Ce,ze,Ke,ke){if(xe.isScreenshoGenerator)return 1;var fe=Ke!==void 0&&Ke,Qe=xe.noScaleMargin!=null&&xe.noScaleMargin,be=function(ft){return ft&&ft!=="false"},xt=be(xe.autoHeight),rt=ie(Ce,xe.width,ze,xt,fe&&window.GGBT_wsf_view||Qe,ke),Re=parseInt(rt.width),He=xe.width,Ie=xe.height;if(He===void 0){var ut=Ce.querySelector(".appletParameters");ut&&(He=ut.offsetWidth,Ie=ut.offsetHeight)}var gt=Re/He,yt=fe?1:rt.height/Ie;return ze!==void 0&&!ze&&(gt=Math.min(1,gt),yt=Math.min(1,yt)),Math.min(gt,yt)}function ot(xe,Ce,ze){var Ke=1,ke,fe=!1;if(xe.hasOwnProperty("allowUpscale")&&(fe=xe.allowUpscale),xe.hasOwnProperty("scale")&&(Ke=parseFloat(xe.scale),(isNaN(Ke)||Ke===null||Ke===0)&&(Ke=1),Ke>1&&(fe=!0)),Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(xe.hasOwnProperty("disableAutoScale")&&xe.disableAutoScale))ke=te(xe,Ce,fe,ze,xe.scaleContainerClass);else return Ke;return fe&&(!xe.hasOwnProperty("scale")||Ke===1)?ke:Math.min(Ke,ke)}function me(xe){var Ce=Math.min(window.innerWidth,document.documentElement.clientWidth),ze=Math.min(window.innerHeight,document.documentElement.clientHeight),Ke=xe.getBoundingClientRect(),ke=(Ce-Ke.width)/2,fe=(ze-Ke.height)/2;fe<0&&(fe=0),xe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ke<40?xe.style.left="40px":xe.style.left=ke+"px",xe.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?xe.style.top="40px":xe.style.top=fe+"px",xe.style.left=ke+"px")}function Ge(xe,Ce){var ze=xe.querySelector(".appletParameters");if(ze){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ce.id!==ze.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}if(ze.parentElement&&/fullscreen/.test(ze.parentElement.className))return;var Ke=ot(Ce,xe);en()&&ze.setAttribute("data-param-scale",Ke);for(var ke=null,fe=0;fe<xe.childNodes.length;fe++)if(xe.childNodes[fe].className!==void 0&&xe.childNodes[fe].className.match(/^applet_scaler/)){ke=xe.childNodes[fe];break}if(ke!==null&&ke.querySelector(".noscale")!==null)return;var Qe=Ce.id!==void 0?Ce.id:"ggbApplet",be=window[Qe];(be==null||!be.recalculateEnvironments)&&ke!==null&&!ke.className.match(/fullscreen/)&&(ke.parentNode.style.transform="",!isNaN(Ke)&&Ke!==1?(ke.parentNode.style.width=Ce.width*Ke+"px",ke.parentNode.style.height=Ce.height*Ke+"px",Ht(ke,Ke)):(Ht(ke,1),ke.parentNode.style.width=Ce.width+"px",ke.parentNode.style.height=Ce.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&me(xe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ze).parents(".content-added-content"))}}return{responsiveResize:Ge,isFlexibleWorksheetEditor:en,positionCenter:me,getScale:ot,scaleElement:Ht}}();__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 en=n.location.search;return en.indexOf(J)!=-1||en.indexOf(K)!=-1}function q(en,Ht){}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(en){var Ht=s[L].bindings;s[L].bindings=function(){for(var ie=Ht?Ht():{},te=en[webModule.__softPermutationId],ot=O;ot<te.length;ot++){var me=te[ot];ie[me[O]]=me[P]}return ie}};var t;function u(){return v(),t}function v(){if(!t){var en=o.createElement(Q);if(en.id=L,en.style.cssText=R+S,en.tabIndex=-1,o.body.appendChild(en),t=en.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ht=document.compatMode==U?V:W;t.write(Ht+X),t.close()}}}function w(en){function Ht(te){function ot(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var me=ot();if(me){te();return}function Ge(){if(!me){if(!ot())return;me=!0,te(),o.removeEventListener&&o.removeEventListener(Z,Ge,!1),xe&&clearInterval(xe)}}o.addEventListener&&o.addEventListener(Z,Ge,!1);var xe=setInterval(function(){Ge()},$)}function ie(te){var ot=u(),me=ot.body,Ge=ot.createElement(_);Ge.language=ab,Ge.crossOrigin=W,Ge.src=te,webModule.__errFn&&(Ge.onerror=function(){webModule.__errFn(L,new Error(bb+te))}),me.appendChild(Ge)}Ht(function(){ie(en)})}webModule.__startLoadingFragment=function(en){return C(en)},webModule.__installRunAsyncCode=function(en){var Ht=u(),ie=Ht.body,te=Ht.createElement(_);te.language=ab,te.text=en,ie.appendChild(te),ie.removeChild(te)};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(en){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(en){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(en){var Ht=c[en];return Ht==null?null:Ht},r=d,webModule.__errFn=e}function B(){function en(xe){var Ce=xe.lastIndexOf(rb);Ce==-1&&(Ce=xe.length);var ze=xe.indexOf(sb);ze==-1&&(ze=xe.length);var Ke=xe.lastIndexOf(tb,Math.min(ze,Ce));return Ke>=O?xe.substring(O,Ke+P):W}function Ht(xe){if(!xe.match(/^\w+:\/\//)){var Ce=o.createElement(ub);Ce.src=xe+vb,xe=en(Ce.src)}return xe}function ie(){var xe=__gwt_getMetaProperty(wb);return xe!=null?xe:W}function te(){for(var xe=o.getElementsByTagName(_),Ce=O;Ce<xe.length;++Ce)if(xe[Ce].src.indexOf(xb)!=-1)return en(xe[Ce].src);return W}function ot(){var xe=o.getElementsByTagName(yb);return xe.length>O?xe[xe.length-P].href:W}function me(){var xe=o.location;return xe.href==xe.protocol+zb+xe.host+xe.pathname+xe.search+xe.hash}var Ge=ie();return Ge==W&&(Ge=te()),Ge==W&&(Ge=ot()),Ge==W&&me()&&(Ge=en(o.location.href)),Ge=Ht(Ge),Ge}function C(en){return en.match(/^\//)||en.match(/^[a-zA-Z]+:\/\//)?en:webModule.__moduleBase+en}function D(){var en=[],Ht=O,ie=[],te=[];function ot(xe){var Ce=te[xe](),ze=ie[xe];if(Ce in ze)return Ce;var Ke=[];for(var ke in ze)Ke[ze[ke]]=ke;throw r&&r(xe,Ke,Ce),null}if(__gwt_isKnownPropertyValue=function(xe,Ce){return Ce in ie[xe]},webModule.__getPropMap=function(){var xe={};for(var Ce in ie)ie.hasOwnProperty(Ce)&&(xe[Ce]=ot(Ce));return xe},webModule.__computePropValue=ot,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var me;try{me=Cb;var Ge=me.indexOf(Db);Ge!=-1&&(Ht=parseInt(me.substring(Ge+P),$),me=me.substring(O,Ge))}catch(xe){}return webModule.__softPermutationId=Ht,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(en,Ht,ie){"use strict";ie.d(Ht,{Ax:function(){return Ge},Ds:function(){return xe},KI:function(){return ze},SI:function(){return me},f1:function(){return ot}});var te=ie(14185);function ot(Ke){let ke=!0;if(Ke.length>0){for(let fe=0;fe<Ke.length;fe++)if(Ke[fe].compile_success==0||!Ke[fe].compile_success){ke=!1;break}}else ke=!1;return ke}function me(Ke,ke=""){let fe=[];for(let Qe=0;Qe<Ke.length;Qe++){let be=Ke[Qe],xt=ke?`${ke}/${be.name}`:`${be.name}`;fe.push({title:be.name,type:be.type,isLeaf:be.type!=="tree",key:xt})}return fe}function Ge(Ke,ke,fe){for(let Qe=0;Qe<Ke.length;Qe++){let be=Ke[Qe];if(be.key===ke){be.children=fe;break}be.children&&Ge(be.children,ke,fe)}return Ke}function xe(Ke,ke,fe){let Qe;return function(){let be=this,xt=arguments,rt=function(){Qe=null,fe||Ke.apply(be,xt)},Re=fe&&!Qe;clearTimeout(Qe),Qe=setTimeout(rt,ke),Re&&Ke.apply(be,xt)}}const Ce=!0,ze=te.Z.API_SERVER},40254:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Qe}});var te=ie(59301),ot={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},me=ie(92310),Ge=ie.n(me),xe=ie(29787),Ce=ie(2859),ze=ie(49317),Ke=ie(76406),ke=(be,xt,rt)=>new Promise((Re,He)=>{var Ie=yt=>{try{gt(rt.next(yt))}catch(ft){He(ft)}},ut=yt=>{try{gt(rt.throw(yt))}catch(ft){He(ft)}},gt=yt=>yt.done?Re(yt.value):Promise.resolve(yt.value).then(Ie,ut);gt((rt=rt.apply(be,xt)).next())}),Qe=({data:be,className:xt,fullWidth:rt,style:Re={},onClose:He,onOk:Ie,showFullTools:ut,noAssociationId:gt})=>{const yt=(0,te.useRef)(null),ft=(0,te.useRef)(null),nt=(0,te.useRef)(null),vt=(0,te.useRef)(null),[We,At]=(0,te.useState)(!1),[st,qe]=(0,te.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,te.useEffect)(()=>(nt.current||(nt.current=document.createElement("style"),document.head.appendChild(nt.current)),be!=null&&be.visible?(document.body.setAttribute("data-custom","y-hidden"),nt.current.innerHTML=" html { overflow-y: hidden; }",be!=null&&be.src&&Mt()):(document.body.removeAttribute("data-custom"),nt.current&&(document.head.removeChild(nt.current),nt.current=null)),()=>{document.body.removeAttribute("data-custom"),nt.current&&(document.head.removeChild(nt.current),nt.current=null)}),[be==null?void 0:be.visible]);const Mt=()=>ke(void 0,null,function*(){At(!0),qe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ve=yield(0,Ke.ZJ)(be==null?void 0:be.src);yt.current.src="",yt.current.src=ve,yt.current.onload=function(){ht()},At(!1),qe("")}),Ve=ve=>ke(void 0,null,function*(){At(!0),qe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Bt=yield(0,ze.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:be.title,file:ve.dataUrl}});Bt!=null&&Bt.id&&!gt?(yield(0,ze.ZP)(`/api/attachments/${be.id}/add_subitem.json`,{method:"post",body:{subitem_id:Bt==null?void 0:Bt.id,settings:JSON.stringify(ve.state)}})).status===0&&Ie():Bt!=null&&Bt.id&&Ie(Bt),At(!1),qe("")}),pt=()=>{const ve=document.querySelector('a[href="https://markerjs.com/"]');ve&&ve.parentNode&&(ve.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(Ae=>{const Nt=document.querySelector(Ae.name);Nt&&Nt.setAttribute("title",Ae.title)})},ht=()=>{ft.current=new Ce.hP(yt.current),ft.current.targetRoot=vt.current,ft.current.addEventListener("render",Ve),ft.current.addEventListener("beforeclose",He),ut&&(ft.current.availableMarkerTypes=ft.current.ALL_MARKER_TYPES,ft.current.uiStyleSettings.redoButtonVisible=!0,ft.current.uiStyleSettings.notesButtonVisible=!0,ft.current.uiStyleSettings.zoomButtonVisible=!0,ft.current.uiStyleSettings.zoomOutButtonVisible=!0,ft.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ft.current.uiStyleSettings,ft.current.show(),be!=null&&be.snapshotData&&ft.current.restoreState(be.snapshotData),setTimeout(()=>{window.scrollTo(0,0),pt()},300)};return te.createElement(te.Fragment,null,(be==null?void 0:be.visible)&&te.createElement(xe.Z,{spinning:We,tip:st,style:{position:"absolute",width:"100vw"}},te.createElement("div",{ref:vt,className:Ge()(ot.imageDimensions,xt,rt?ot.fullWidth:""),style:Re},te.createElement("img",{className:ot.img,ref:yt}))))}},9057:function(en,Ht,ie){"use strict";var te=ie(59301),ot=ie(77019),me=ie(5269),Ge=ie(31691),xe=ie(7939),Ce=ie(35883),ze=ie(74501),Ke=ie(48136),ke=ie(59301);const fe=(0,te.forwardRef)(({callback:Qe,showSaveButton:be,value:xt=""},rt)=>{const Re=(0,te.useRef)(),He=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Ie=[{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}`}]}]}],ut=ft=>{Re.current.setValue(Re.current.getValue()+" "+ft.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(ot.Z,{className:ze.Z.lists,gutter:[10,10]},He.map((ft,nt)=>ke.createElement(me.Z,{flex:"110px",className:ze.Z.item},ke.createElement("div",null,ke.createElement(Ce.Z,{value:`$$${ft.value}$$`}),ft.name),ke.createElement("div",{className:ze.Z.children},ft.children.map((vt,We)=>ke.createElement("div",{key:We},ke.createElement("h1",null,vt.name),ke.createElement(ot.Z,{gutter:[10,10]},vt.data.map((At,st)=>ke.createElement(me.Z,{key:st,onClick:()=>ut(At),className:ze.Z.diamond},ke.createElement(Ce.Z,{value:"`$$"+At.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(ot.Z,{className:ze.Z.lists,gutter:[10,10]},Ie.map((ft,nt)=>ke.createElement(me.Z,{flex:"110px",className:ze.Z.item},ke.createElement("div",null,ke.createElement(Ce.Z,{value:"`$$"+ft.value+"$$`"}),ft.name),ke.createElement("div",{className:ze.Z.children},ft.children.map((vt,We)=>ke.createElement("div",{key:We},vt.name&&ke.createElement("h1",null,vt.name),ke.createElement(ot.Z,{gutter:[10,10]},vt.data.map((At,st)=>ke.createElement(me.Z,{key:st,onClick:()=>ut(At),className:ze.Z.diamond},ke.createElement(Ce.Z,{value:"`$$"+At.value+"$$`"}))))))))))}],yt=()=>{var ft=document.createElement("div");ft.innerHTML=Re.current.getValue();var nt=ft.innerText;return Qe&&Qe(nt),nt};return(0,te.useImperativeHandle)(rt,()=>({getData:yt})),ke.createElement("div",{className:ze.Z.mathWrap},ke.createElement(Ge.default,{defaultActiveKey:"1",items:gt}),ke.createElement("math-field",{locale:"zh_cn",className:ze.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Re,style:{width:800,marginTop:30,fontSize:18}},xt||""),be&&ke.createElement("div",{className:ze.Z.button},ke.createElement(xe.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ht.Z=fe},57940:function(en,Ht,ie){"use strict";ie.d(Ht,{z:function(){return rn},Z:function(){return we}});var te=ie(59301),ot=ie(94968),me=ie(6767),Ge=ie(62957),xe=ie(7939),Ce=ie(14185),ze=ie(6755),Ke=Object.defineProperty,ke=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,be=(de,Je,wt)=>Je in de?Ke(de,Je,{enumerable:!0,configurable:!0,writable:!0,value:wt}):de[Je]=wt,xt=(de,Je)=>{for(var wt in Je||(Je={}))fe.call(Je,wt)&&be(de,wt,Je[wt]);if(ke)for(var wt of ke(Je))Qe.call(Je,wt)&&be(de,wt,Je[wt]);return de},rt=(de,Je,wt)=>new Promise((Et,Be)=>{var dt=Ot=>{try{tn(wt.next(Ot))}catch(jt){Be(jt)}},bt=Ot=>{try{tn(wt.throw(Ot))}catch(jt){Be(jt)}},tn=Ot=>Ot.done?Et(Ot.value):Promise.resolve(Ot.value).then(dt,bt);tn((wt=wt.apply(de,Je)).next())});const Re="\u3000\u3000";function He(de){var Je=["Bytes","KB","MB","GB","TB"];if(de==0)return"0 Byte";var wt=parseInt(""+Math.floor(Math.log(de)/Math.log(1024)),10);return(de/Math.pow(1024,wt)).toFixed(1)+" "+Je[wt]}var Ie=({value:de=[],action:Je,onChange:wt,className:Et,maxSize:Be=150,title:dt="\u6587\u4EF6\u4E0A\u4F20",accept:bt=null})=>{const tn={multiple:!1,fileList:de,accept:bt,withCredentials:!0,beforeUpload:jt=>jt.size/1024/1024<Be?!0:(message.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${Be}MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20`),Promise.reject()),action:`${ENV.API_SERVER}/api/attachments.json`,onChange(jt){var it,Gt,mt,se;let ee=[...jt.fileList];if(ee=ee.map(z=>(z.name.indexOf(Re)===-1&&(z.name=`${z.name}${Re}${He(z.size)}`),xt({},z))),jt.file.status==="done"&&((Gt=(it=jt.file)==null?void 0:it.response)==null?void 0:Gt.status)===-1){message.error((se=(mt=jt.file)==null?void 0:mt.response)==null?void 0:se.message),wt([]);return}wt(ee)},onRemove:jt=>rt(void 0,null,function*(){const it=jt.size/1024/1024;return jt.status==="uploading"?!0:it<Be&&(jt.response?jt.response.id:jt.uid)?yield removeAttachment(jt.response?jt.response.id:jt.id):!0})};function Ot(jt){jt.preventDefault(),jt.stopPropagation()}return React.createElement("div",{className:`single-upload ${Et||""}`},React.createElement(Upload,xt({},tn),React.createElement(Button,{type:"primary",title:de.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:de.length>0,ghost:!0},dt),React.createElement("span",{onClick:Ot,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",Be,"M)"," ")))},ut=ie(61481),gt=ie(78267),yt=Object.defineProperty,ft=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,We=(de,Je,wt)=>Je in de?yt(de,Je,{enumerable:!0,configurable:!0,writable:!0,value:wt}):de[Je]=wt,At=(de,Je)=>{for(var wt in Je||(Je={}))nt.call(Je,wt)&&We(de,wt,Je[wt]);if(ft)for(var wt of ft(Je))vt.call(Je,wt)&&We(de,wt,Je[wt]);return de};const st=de=>React.createElement("svg",At({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},de),React.createElement("title",null,"\u5F62\u72B6"),React.createElement("path",{d:"M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z",fill:"#3061D0",fillRule:"nonzero"}));var qe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",Mt=Object.defineProperty,Ve=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,ve=(de,Je,wt)=>Je in de?Mt(de,Je,{enumerable:!0,configurable:!0,writable:!0,value:wt}):de[Je]=wt,Bt=(de,Je)=>{for(var wt in Je||(Je={}))pt.call(Je,wt)&&ve(de,wt,Je[wt]);if(Ve)for(var wt of Ve(Je))ht.call(Je,wt)&&ve(de,wt,Je[wt]);return de},Ae=(de,Je,wt)=>new Promise((Et,Be)=>{var dt=Ot=>{try{tn(wt.next(Ot))}catch(jt){Be(jt)}},bt=Ot=>{try{tn(wt.throw(Ot))}catch(jt){Be(jt)}},tn=Ot=>Ot.done?Et(Ot.value):Promise.resolve(Ot.value).then(dt,bt);tn((wt=wt.apply(de,Je)).next())});const{Dragger:Nt}=ot.default;function rn(de){let Je=[];return de&&de.length>0&&(Je=de.map(wt=>({uid:wt.id,id:wt.id,name:wt.title+Re+wt.filesize,url:wt.url,filesize:wt.filesize,status:"done",response:{id:wt.id}}))),Je}var we=({value:de,onChange:Je,action:wt,data:Et,className:Be,maxSize:dt=150,title:bt="\u4E0A\u4F20\u9644\u4EF6",showRemoveModal:tn=!1,accept:Ot="",additionalText:jt,isDragger:it,number:Gt=1e3,aloneClear:mt=!1,realTimeRemove:se=!0,uploadText:ee,setFileProgress:z,showFileProgress:oe})=>{const[le,re]=(0,te.useState)(!1);let[Ee,at]=(0,te.useState)(de||[]),[$t,Ye]=(0,te.useState)(1);(0,te.useEffect)(()=>{de&&($t===1&&at([...de]),Ye(2),Gt===(de==null?void 0:de.length)&&re(!0))},[de]);const ct=()=>{setTimeout(()=>{Ee.pop(),at([...Ee])},500)};oe&&z(Ee.some(Pt=>Pt.status==="uploading"));const St={multiple:!0,disabled:le,accept:Ot,withCredentials:!0,fileList:Ee,beforeUpload:(Pt,Qt)=>{const Jt=Pt.size/1024/1024;return Ee.concat(Qt).length>Gt?(Ee.pop(),at([...Ee]),me.ZP.error(`\u6700\u591A\u53EA\u80FD\u4E0A\u4F20${Gt}\u4E2A\u6587\u4EF6`),mt?Promise.reject():(ct(),!1)):Jt<dt?!0:(me.ZP.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${dt}MB).`),mt?Promise.reject():(ct(),!1))},data:Et,action:wt||`${Ce.Z.API_SERVER}/api/attachments.json`,onChange(Pt){var Qt,Jt,Ut,Sn;if(Pt.file.status==="removed"?Ee=Pt.fileList:Ee=(0,gt.uniqBy)([...Pt.fileList,...Ee],"uid"),Pt.file.status==="done"&&((Jt=(Qt=Pt.file)==null?void 0:Qt.response)==null?void 0:Jt.status)===-1){me.ZP.error((Sn=(Ut=Pt.file)==null?void 0:Ut.response)==null?void 0:Sn.message);return}Ee.length>=Gt?re(!0):re(!1),at([...Ee]),Ee=Ee.map(on=>{var gn,kt;return(gn=on==null?void 0:on.response)!=null&&gn.id&&(on.url=(kt=on==null?void 0:on.response)==null?void 0:kt.url),on.name.indexOf(Re)===-1&&(on.name=`${on.name}${Re}${He(on.size)}`),Bt({},on)}),console.log("info:",Pt,Ee),Je(Ee)},onRemove:Pt=>Ae(void 0,null,function*(){if(!se)return!0;const Qt=()=>Ae(void 0,null,function*(){if(Pt.response?Pt.response.id:Pt.id){let Ut=yield(0,ze.JZ)(Pt.response?Pt.response.id:Pt.uid);return Promise.resolve(Ut)}else return!0});return tn?new Promise((Jt,Ut)=>{Ge.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:te.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:()=>Ae(void 0,null,function*(){const Sn=yield Qt();me.ZP.success("\u5220\u9664\u6210\u529F"),Jt(!0)}),onCancel:()=>Jt(!1)})}):yield Qt()})};function Ft(Pt){Pt.preventDefault(),Pt.stopPropagation()}return te.createElement("div",{className:`multi-upload ${Be||""}`},it&&te.createElement(Nt,Bt({},St),te.createElement("p",{className:"ant-upload-drag-icon"},te.createElement(ut.Z,null)),te.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",te.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",dt,"MB)"," "),jt),!it&&te.createElement(ot.default,Bt({},St),te.createElement(xe.ZP,{disabled:le,className:"upload_button"},te.createElement("img",{className:"aBtn_img",src:qe}),bt),te.createElement("span",{onClick:Ft,className:"upload_text"},ee||`(\u5355\u4E2A\u6587\u4EF6\u6700\u5927${dt}MB)`)))}},90736:function(en,Ht,ie){"use strict";var te=ie(59301),ot=ie(4977),me=ie(7939),Ge=Object.defineProperty,xe=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,ze=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,fe=(rt,Re,He)=>Re in rt?Ge(rt,Re,{enumerable:!0,configurable:!0,writable:!0,value:He}):rt[Re]=He,Qe=(rt,Re)=>{for(var He in Re||(Re={}))Ke.call(Re,He)&&fe(rt,He,Re[He]);if(ze)for(var He of ze(Re))ke.call(Re,He)&&fe(rt,He,Re[He]);return rt},be=(rt,Re)=>xe(rt,Ce(Re));const xt=({img:rt,buttonProps:Re={},styles:He={},customText:Ie,ButtonText:ut,ButtonClick:gt,Buttonclass:yt,ButtonTwo:ft,imgStyles:nt,loading:vt=!1,className:We=""})=>te.createElement("section",{className:`tc animated fadeIn ${We}`,style:Qe({color:"#999",margin:"100px auto",visibility:vt?"hidden":"visible"},He)},te.createElement("img",{src:rt||ot,style:be(Qe({},nt),{pointerEvents:"none",userSelect:"none"})}),te.createElement("p",{className:"mt20 font14"},Ie||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ut&&te.createElement(me.ZP,Qe({className:yt,onClick:gt},Re),ut),ft&&ft);Ht.Z=xt},86974:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return yt}});var te=ie(59301),ot={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},me=ie(7939),Ge=ie(70557),xe=ie(34728),Ce=ie(25399),ze=ie(76406),Ke=ie(84849),ke=ie(90736),fe=ie(14185),Qe=ie(52078),be=ie(59301),xt=Object.defineProperty,rt=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ie=(ft,nt,vt)=>nt in ft?xt(ft,nt,{enumerable:!0,configurable:!0,writable:!0,value:vt}):ft[nt]=vt,ut=(ft,nt)=>{for(var vt in nt||(nt={}))Re.call(nt,vt)&&Ie(ft,vt,nt[vt]);if(rt)for(var vt of rt(nt))He.call(nt,vt)&&Ie(ft,vt,nt[vt]);return ft},gt=(ft,nt,vt)=>new Promise((We,At)=>{var st=Ve=>{try{Mt(vt.next(Ve))}catch(pt){At(pt)}},qe=Ve=>{try{Mt(vt.throw(Ve))}catch(pt){At(pt)}},Mt=Ve=>Ve.done?We(Ve.value):Promise.resolve(Ve.value).then(st,qe);Mt((vt=vt.apply(ft,nt)).next())}),yt=({editOffice:ft="view",data:nt,issaver:vt,onSaver:We,theme:At,type:st,filename:qe,monacoEditor:Mt,className:Ve,style:pt,close:ht,onClose:ve,hasMask:Bt,disabledDownload:Ae,onImgDimensions:Nt,showNodata:rn,recordInfo:we})=>{const[de,Je]=(0,te.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[wt,Et]=(0,te.useState)(""),[Be,dt]=(0,te.useState)(),bt=window.ENV==="build"?"/react/build":"",tn=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,jt=10*(1024*1024),it=(0,te.useRef)();nt!=null&&nt.startsWith("/api")&&st!=="txt"&&(nt=fe.Z.API_SERVER+nt);const Gt=le=>le.substring(le.lastIndexOf("/")+1).split(".").pop();qe&&Mt&&(Mt.filename=qe),(0,te.useEffect)(()=>{var le,re;const Ee=(re=(le=document.cookie)==null?void 0:le.replace(/\s/g,""))==null?void 0:re.split(";");Ee==null||Ee.map(at=>{let $t=at.split("=");$t[0]==="_educoder_session"&&Et($t[1])})},[]),(0,te.useEffect)(()=>{st==="office"&&(nt.indexOf("bigfilescdn.")>-1||nt.indexOf("bigfiles1")>-1?dt({url:nt,fileType:Gt(nt),model:nt.indexOf("model=edit")?"edit":"view"}):nt.indexOf("coze")>-1?dt({url:nt,fileType:"doc",model:"view"}):se())},[st,nt]);function mt(le){return gt(this,null,function*(){le.data.type==="pdfdata"&&(We(le.data.data),window.removeEventListener("message",mt,!1)),console.log("mess---:",le.data)})}const se=()=>gt(void 0,null,function*(){console.log("data:",nt);let le=nt;nt.startsWith("http")||(le=location.origin+le);let re=new URL(le).pathname.split("/").pop();const Ee=yield(0,Ke.gJ)({attachment_id:re});Ee.url=tn+Ee.url,dt(Ee)}),ee=()=>{if(nt.startsWith("http")||nt.startsWith("blob:")){z();return}(0,ze.Sv)(qe||"educoder",nt,qe)},z=()=>{we&&(0,Qe.fc)({id:we==null?void 0:we.id,watch_type:1,course_id:we==null?void 0:we.course_id}),(0,ze.Nd)(qe||"educoder",decodeURIComponent(nt))};(0,te.useEffect)(()=>(window.addEventListener("message",oe),()=>{window.removeEventListener("message",oe)}),[]);const oe=le=>{var re;((re=le==null?void 0:le.data)==null?void 0:re.type)==="closePop"&&ve()};return be.createElement("div",{style:ut({},pt||{}),className:`${Bt&&ot.bgBlack} ${st?ot.wrp:"hide"}`},!!st&&ht&&be.createElement("div",{id:"closePop",className:ot.close,ref:it},!!Nt&&be.createElement(Ce.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>it.current},be.createElement("span",{onClick:()=>{ve(),Nt()}},be.createElement("i",{className:"icon-yulanpizhu"}))),!Ae&&window.parent===window&&be.createElement(Ce.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>it.current},be.createElement("span",{onClick:z},be.createElement("i",{className:"icon-quxiaozhiding"}))),vt&&be.createElement(Ce.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>it.current},be.createElement("span",{className:"",onClick:()=>{const le=document.getElementById("pdfiframe");window.addEventListener("message",mt,!1),setTimeout(()=>{le.contentWindow.postMessage("getData","*")},300)}},be.createElement("i",{className:"icon-baocun"}))),be.createElement(Ce.Z,{title:"\u5173\u95ED",getPopupContainer:()=>it.current},be.createElement("span",{className:"",onClick:()=>{ve()}},be.createElement("i",{className:"icon-guanbi1"})))),be.createElement("div",{className:`${ot[Ve]} ${Ve} ${ot.monaco} ${st==="txt"?"show":"hide"}`},st==="txt"&&be.createElement(be.Fragment,null,be.createElement(xe.ZP,ut({},Mt)))),st==="audio"&&be.createElement("audio",{controls:!0,src:`${(nt==null?void 0:nt.indexOf("http://"))>-1||(nt==null?void 0:nt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${nt}`,autoPlay:!0}),st==="video"&&be.createElement(be.Fragment,null,(nt==null?void 0:nt.indexOf("http"))>-1?be.createElement("video",{controls:!0,src:`${nt}`,autoPlay:!0}):be.createElement("video",{controls:!0,src:`data:video/mp4;base64,${nt}`,autoPlay:!0})),st==="office"&&Be&&be.createElement("iframe",{src:`${bt}/office.html?key=${Be.key}&url=${btoa(Be.url)}&callbackUrl=${tn+(Be.callbackUrl||"")}&fileType=${Be.fileType}&title=${Be.title||""}&model=${ft}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!Ae}`}),st==="html"&&be.createElement("iframe",{src:nt+"&disposition=inline"}),st==="pdf"&&be.createElement("iframe",{id:"pdfiframe",src:`${bt}/js/pdf/index.html?filename=${qe||"educoder.pdf"}&url=${encodeURIComponent(nt)}&disabledDownload=${!!Ae}&model=${ft}`}),st==="image"&&be.createElement("img",{src:`${(nt==null?void 0:nt.indexOf("http://"))>-1||(nt==null?void 0:nt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${nt}`}),(st==="other"||st==="download")&&be.createElement(be.Fragment,null,rn?be.createElement(ke.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:be.createElement(me.ZP,{icon:be.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ee,disabled:Ae},"\u4E0B\u8F7D")}):be.createElement(me.ZP,{type:"primary",size:"middle",onClick:ee,disabled:Ae},be.createElement(Ge.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),st==="flowChart"&&be.createElement("div",{className:"embed"},be.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${nt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},78130:function(en,Ht,ie){"use strict";ie.d(Ht,{h:function(){return Re},x:function(){return He}});var te=ie(39116),ot=ie(42168),me=ie(35883),Ge=ie(59301),xe=Object.defineProperty,Ce=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,Qe=(Ie,ut,gt)=>ut in Ie?xe(Ie,ut,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Ie[ut]=gt,be=(Ie,ut)=>{for(var gt in ut||(ut={}))ke.call(ut,gt)&&Qe(Ie,gt,ut[gt]);if(Ke)for(var gt of Ke(ut))fe.call(ut,gt)&&Qe(Ie,gt,ut[gt]);return Ie},xt=(Ie,ut)=>Ce(Ie,ze(ut)),rt=(Ie,ut)=>{var gt={};for(var yt in Ie)ke.call(Ie,yt)&&ut.indexOf(yt)<0&&(gt[yt]=Ie[yt]);if(Ie!=null&&Ke)for(var yt of Ke(Ie))ut.indexOf(yt)<0&&fe.call(Ie,yt)&&(gt[yt]=Ie[yt]);return gt};const Re=Ie=>{var ut=Ie,{value:gt,onChange:yt,scrollId:ft}=ut,nt=rt(ut,["value","onChange","scrollId"]);return Ge.createElement("div",{id:ft||""},Ge.createElement(te.Z,xt(be({},nt),{defaultValue:gt,onChange:(vt,We)=>{We!=null&&We.length?yt(vt,We):yt(vt)}})))},He=({value:Ie,onChange:ut,placeholder:gt,height:yt=140,isEdit:ft,miniToolbar:nt,watch:vt=!0})=>ft?Ge.createElement(te.Z,{watch:vt,isFocus:!0,height:yt||void 0,placeholder:gt,defaultValue:Ie,onChange:ut,miniToolbar:nt}):Ge.createElement("div",{style:{cursor:"pointer"}},Ie?Ge.createElement(me.Z,{className:ot.Z.inputBorder,value:Ie}):Ge.createElement("div",{className:`${ot.Z.inputBorder} ${ot.Z.placeholder} inputBorderError`},gt))},35883:function(en,Ht,ie){"use strict";ie.d(Ht,{z:function(){return Mt},Z:function(){return Ve}});var te=ie(59301),ot=ie(46214),me=ie(20047),Ge=ie(64018),xe=ie(16471),Ce=ie(14185),ze=ie(76406),Ke=ie(15342),ke=ie(44104),fe=ie(7939),Qe=ie(1012),be=ie(86974),xt=ie(59301),Re=({html:pt})=>{const ht=(0,te.useRef)(null),ve=(0,te.useRef)(null),Bt=`.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,te.useEffect)(()=>{const Ae=ht.current.attachShadow({mode:"open"});ve.current=document.createElement("div"),ve.current.className="markdown-body",ve.current.innerHTML=pt,Ae.appendChild(ve.current);const Nt=document.createElement("style");return Nt.textContent=Bt,Ae.appendChild(Nt),()=>{Ae.innerHTML=""}},[]),(0,te.useEffect)(()=>{ve.current&&(ve.current.innerHTML=pt)},[pt]),xt.createElement("div",{ref:ht})};function He(pt){const ht=["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"],ve=new RegExp(`\\b(${ht.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),Bt=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return pt.replace(ve,"").replace(Bt,"").trim()}var Ie={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ut=Object.defineProperty,gt=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,nt=(pt,ht,ve)=>ht in pt?ut(pt,ht,{enumerable:!0,configurable:!0,writable:!0,value:ve}):pt[ht]=ve,vt=(pt,ht)=>{for(var ve in ht||(ht={}))yt.call(ht,ve)&&nt(pt,ve,ht[ve]);if(gt)for(var ve of gt(ht))ft.call(ht,ve)&&nt(pt,ve,ht[ve]);return pt};const We="@\u2581\u2581@",At="@\u2581@",st=/<pre[^>]*>/g;function qe(pt){let ht=document.createElement("div");return ht.innerHTML=pt,ht.childNodes.length===0?"":ht.childNodes[0].nodeValue}const Mt=(pt,ht)=>{pt=pt||"";const ve=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Bt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ae=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Nt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ht?pt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ve,(rn,we,de,Je,wt,Et,Be)=>{const dt=we||Je||Et,bt=de||wt||Be||"?";return Ce.Z.API_SERVER+"/api/attachments/"+dt+bt+"&t="+(0,ze.Jn)(dt,Date.now())+(rn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(pt=pt.replace(Nt,(rn,we,de,Je,wt,Et,Be)=>{const dt=we||Je||Et,bt=de||wt||Be||"?";return Ce.Z.API_SERVER+"/attachments/download/"+dt+bt+"&t="+(0,ze.Jn)(dt,Date.now())+(rn.indexOf(")")>-1?")":"&")}).replace(ve,(rn,we,de,Je,wt,Et,Be)=>{const dt=we||Je||Et,bt=de||wt||Be||"?";return Ce.Z.API_SERVER+"/api/attachments/"+dt+bt+"&t="+(0,ze.Jn)(dt,Date.now())+(rn.indexOf(")")>-1?")":"&")}).replace(Bt,(rn,we,de,Je,wt)=>{const Et=we||Je,Be=de||wt||"";return'"'+Ce.Z.API_SERVER+"/api/attachments/"+Et+Be+Et+Be+"&t="+(0,ze.Jn)(Et,Date.now())}).replace(Ae,(rn,we,de,Je,wt)=>{const Et=we||Je,Be=de||wt||"";return"("+Ce.Z.API_SERVER+"/files/uploads/"+Et+Be+Et+Be+"&t="+(0,ze.Jn)(Et,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,`
|
|
|
`),pt)};var Ve=({value:pt="",edit:ht=!1,className:ve,showTextOnly:Bt,showLines:Ae,style:Nt={},stylesPrev:rn={},highlightKeywords:we,showProgramFill:de,isProgramFill:Je,disabledFill:wt=!1,programFillValue:Et,openEditor:Be=()=>{},onFillChange:dt=Ot=>{},onFillBlur:bt=()=>{},onFillFocus:tn=()=>{}})=>{let Ot=He(String(pt||""));const jt=(0,te.useRef)(),it=(0,te.useRef)(),[Gt,mt]=(0,te.useState)(""),[se,ee]=(0,te.useState)("office"),[z,oe]=(0,te.useState)([]),le=(0,te.useRef)("a"+(0,Qe.Z)()),re={},Ee=kt=>/<style[\s\S]*?>/i.test(kt||""),at=(kt,Mn,nn)=>{const Me=document.createElement(kt===At?"input":"textarea");Me.style.width="100%",Me.style.height=kt===At?"40px":"151px",Me.rows=5,Me.spellcheck=!1,Me.name="edu-program-fill",Me.placeholder="\u8BF7\u8F93\u5165",Me.dataset.id=Mn;const et=Object.keys(re).length;return re[et]=Me,`<span class="edu-program-fill-wrap ${kt===At?"":"show"}" style="width:${kt===At?"600px":"100%"}" title=${nn||""}><span>${Me.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function $t(kt){return kt=kt.replace(/!\[.*?\]\(.*?\)/g,""),kt=kt.replace(/\[.*?\]\(.*?\)/g,""),kt=kt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),kt=kt.replace(/<embed.*?>/g,""),kt=kt.replace(/<img.*?>/g,""),kt=kt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),kt=kt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),kt=kt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),kt=kt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),kt}const Ye=kt=>!Bt&&Ee(Ot)?kt:kt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Mn,nn){let Me=nn.replace(/(\n|\r)/g,"").split("}"),et=[];return Me.map(Lt=>{Lt!=""&&et.push(`.${le.current} ${Lt}`)}),`<style>${et.join("}")}</style>`}),ct=(0,te.useMemo)(()=>{(0,me.Iy)();try{const Me=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,et=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Lt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Rt=/\(\/attachments\/download\//g;Ot=Ot.replace(Rt,"("+Ce.Z.API_SERVER+"/attachments/download/").replace(Me,"("+Ce.Z.API_SERVER+"/api/attachments/").replace(et,'"'+Ce.Z.API_SERVER+"/api/attachments/").replace(Lt,'"'+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,`
|
|
|
`),jt.current.style.display="none"}catch(Me){}if(de){let Me=-1;return Ot=Ot.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(et,Lt,Rt){var Se;return++Me,at(et,Me,(Se=Et==null?void 0:Et[Me])==null?void 0:Se.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ye(Ot||"")}</pre>`}let kt=Ye(Ot);kt=(0,me.ZP)(kt);const Mn=(0,me.ez)();Ot.match(/\[TOC\]/)&&(kt=kt.replace("<p>[TOC]</p>",(0,me.Qv)()),(0,me.Iy)()),kt=kt.replace(/(__special_katext_id_\d+__)/g,(Me,et)=>{const{type:Lt,expression:Rt}=Mn[et];return(0,Ke.renderToString)(qe(Rt)||"",{displayMode:Lt==="block",throwOnError:!1,output:"html"})}),kt=kt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,me.AL)();const nn=document.createElement("div");if(nn.innerHTML=kt,Bt)return nn.innerText;if(we){const Me=we.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Qt(nn,Me),nn.innerHTML}return setTimeout(()=>Sn(),500),nn.innerHTML},[Ot,we]);(0,te.useEffect)(()=>{Jt.current&&Jt.current.querySelectorAll(["input","textarea"]).forEach(Mn=>{Mn.oninput=St,Mn.onblur=Ft,Mn.onfocus=Pt})},[z]),(0,te.useEffect)(()=>{var kt,Mn,nn,Me,et;if(Et!=null&&Et.length)try{const Lt=Jt.current.querySelectorAll(".edu-program-fill-score"),Rt=Jt.current.querySelectorAll('[name="edu-program-fill"]');for(const[Se,$e]of Rt.entries())$e.value=((kt=Et==null?void 0:Et[Se])==null?void 0:kt.value)||"",((Mn=Et==null?void 0:Et[Se])==null?void 0:Mn.type)==="warning"?$e.className="program-fill-warning":((nn=Et==null?void 0:Et[Se])==null?void 0:nn.type)==="success"?$e.className="program-fill-success":$e.className="";for(const[Se,$e]of Lt.entries())$e.innerHTML=(Me=Et==null?void 0:Et[Se])!=null&&Me.score?`${(et=Et==null?void 0:Et[Se])==null?void 0:et.score}\u5206`:"";oe(Et)}catch(Lt){console.log(Lt,"error")}},[Et]);const St=kt=>{z[kt.target.dataset.id]=z[kt.target.dataset.id]||{},z[kt.target.dataset.id].value=kt.target.value,oe([...z]),dt(z,kt.target.dataset.id)},Ft=kt=>{z[kt.target.dataset.id]=z[kt.target.dataset.id]||{},z[kt.target.dataset.id].value=kt.target.value,oe([...z]),bt(z,kt.target.dataset.id)},Pt=kt=>{z[kt.target.dataset.id]=z[kt.target.dataset.id]||{},z[kt.target.dataset.id].value=kt.target.value,oe([...z]),tn(z,kt.target.dataset.id)};function Qt(kt,Mn){return kt.childNodes.forEach(nn=>{var Me;if(nn.childNodes.length>0)Qt(nn,Mn);else if(nn.nodeName!=="IMG")if(nn.innerHTML)nn.innerHTML=(Me=nn.innerHTML)==null?void 0:Me.replace(new RegExp(Mn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const et=document.createElement("span");et.innerHTML=nn.textContent.replace(new RegExp(Mn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),nn.replaceWith(et)}})}const Jt=(0,te.useRef)();me.jb.WebkitLineClamp=Ae,Ae&&(Nt=vt(vt({},Nt),me.jb));function Ut(kt){let Mn=kt.target;if(Mn.tagName.toUpperCase()==="A"){let nn=Mn.getAttribute("href");if(nn.indexOf("office")>-1)kt.preventDefault(),mt(nn),ee("office");else if(nn.indexOf("application/pdf")>-1)kt.preventDefault(),mt(nn),ee("pdf");else if(nn.indexOf("text/html")>-1)kt.preventDefault(),mt(nn),ee("html");else if(nn.startsWith("#")){kt.preventDefault();let Me=document.getElementById(nn.replace("#",""));Me&&Me.scrollIntoView(!0)}}}const Sn=()=>{var kt;const Mn=(kt=Jt.current)==null?void 0:kt.querySelectorAll("video");Mn==null||Mn.forEach(nn=>{if(nn.oncontextmenu=()=>!1,nn.src.indexOf(".m3u8")>-1&&!nn.canPlayType("application/vnd.apple.mpegurl")){if(xe.ZP.isSupported()){var Me=new xe.ZP;Me.loadSource(nn.src),Me.attachMedia(nn)}}})};(0,te.useEffect)(()=>{if(Jt.current&&ct&&ct.match(st)&&window.PR.prettyPrint(),Jt.current)return Jt.current.addEventListener("click",Ut),()=>{var kt;(kt=Jt.current)==null||kt.removeEventListener("click",Ut),(0,me.AL)(),(0,me.Iy)()}},[ct,Jt.current,Ut]);const on=kt=>{kt.target.nodeName==="IMG"&&kt.target.className.indexOf("draw-flowchart")>-1?(jt.current.style.zIndex=1,jt.current.style.display="flex",jt.current.style.width=kt.target.clientWidth+"px",jt.current.style.height=kt.target.clientHeight+"px",jt.current.style.top=kt.target.offsetTop+"px",jt.current.style.left=kt.target.offsetLeft+"px",kt.target.id&&(it.current=kt.target.id)):jt.current.style.display="none"},gn=()=>{jt.current.style.display="none"};return(0,te.useEffect)(()=>{var kt;const Mn=nn=>{nn.preventDefault(),nn.clipboardData.setData("text",window.getSelection().toString())};return(kt=Jt.current)==null||kt.addEventListener("copy",Mn),()=>{var nn;(nn=Jt.current)==null||nn.removeEventListener("copy",Mn)}},[Jt.current]),te.createElement("div",{style:{position:"relative"},onMouseLeave:gn},Bt&&te.createElement("div",{ref:Jt,className:`${Ie.mdBody} `},ct),!Bt&&!Ee(ct)&&te.createElement("div",{ref:Jt,style:vt({},Nt),onMouseOver:on,className:`${ve||""} ${wt?"disabled-fill":""} markdown-body ${Ie.mdBody} ${le.current}`,dangerouslySetInnerHTML:{__html:ct}}),!Bt&&Ee(ct)&&te.createElement(Re,{html:ct}),te.createElement("div",{ref:jt,className:`${Ie.button} ${ht?"":Ie.previewFlowChart}`},te.createElement(ke.Z,null,te.createElement(fe.ZP,{onClick:()=>{ht?Be(it.current):(mt(it.current),ee("flowChart"))}},ht?"\u7F16\u8F91":"\u9884\u89C8"))),te.createElement(be.Z,{close:!0,data:Gt,type:Gt!=null&&Gt.length?se:"",style:vt({},rn),onClose:()=>mt("")}))}},28267:function(en,Ht,ie){"use strict";ie.d(Ht,{h:function(){return ft}});var te=ie(59301),ot=ie(82326),me=ie(28284),Ge=ie(7939),xe=ie(89780),Ce=ie.n(xe),ze=ie(88319),Ke=ie(94896),ke=Object.defineProperty,fe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Re=(nt,vt,We)=>vt in nt?ke(nt,vt,{enumerable:!0,configurable:!0,writable:!0,value:We}):nt[vt]=We,He=(nt,vt)=>{for(var We in vt||(vt={}))xt.call(vt,We)&&Re(nt,We,vt[We]);if(be)for(var We of be(vt))rt.call(vt,We)&&Re(nt,We,vt[We]);return nt},Ie=(nt,vt)=>fe(nt,Qe(vt));const ut=ot.default.Option,gt={labelCol:{span:4},wrapperCol:{span:20}},yt={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"]};Ht.Z=({callback:nt,onCancel:vt})=>{const[We,At]=(0,te.useState)("python");function st(Mt){At(yt[Mt][1])}function qe(Mt){nt(Mt)}return te.createElement(me.default,Ie(He({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:qe,style:{width:500}}),te.createElement(me.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},te.createElement(ot.default,{getPopupContainer:Mt=>Mt.parentNode,onChange:st},Object.keys(yt).map(Mt=>te.createElement(ut,{key:Mt,value:Mt},yt[Mt][0])))),te.createElement(me.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},te.createElement(ft,{mode:We})),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Ge.ZP,{type:"ghost",onClick:vt},"\u53D6\u6D88")))};function ft({value:nt,onChange:vt,mode:We,options:At={}}){const st=(0,te.useRef)(),[qe,Mt]=(0,te.useState)();return(0,te.useEffect)(()=>{if(qe){let Ve=function(pt){const ht=pt.getValue();vt&&vt(ht)};return qe.on("change",Ve),()=>{qe.off("change",Ve)}}},[qe,vt]),(0,te.useEffect)(()=>{qe&&qe.setOption("mode",We)},[qe,We]),(0,te.useEffect)(()=>{qe&&(nt!==qe.getValue()||nt==="")&&setTimeout(()=>{qe.setValue(nt||"")},300)},[qe,nt]),(0,te.useEffect)(()=>{if(st.current&&!qe){const Ve=Ce().fromTextArea(st.current,He({mode:We,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},At));Mt(Ve)}},[st.current,qe]),te.createElement("div",{className:"my-codemirror-container"},te.createElement("textarea",{ref:st}))}},39116:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return hn}});var te=ie(59301),ot=ie(44283),me=ie(89780),Ge=ie.n(me),xe=ie(76374),Ce=ie(88319),ze=ie(6313),Ke=ie(25717),ke=ie(99498),fe=ie(25419),Qe=ie(67549),be=ie(35883),xt=({value:qt="",className:Pn,showTextOnly:pn,showLines:Ln,style:Gn={}})=>{const jn=(0,te.useMemo)(()=>"",[qt]);return te.createElement(te.Fragment,null,te.createElement("div",{dangerouslySetInnerHTML:{__html:jn}}))},rt=Object.defineProperty,Re=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(qt,Pn,pn)=>Pn in qt?rt(qt,Pn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):qt[Pn]=pn,ft=(qt,Pn)=>{for(var pn in Pn||(Pn={}))ut.call(Pn,pn)&&yt(qt,pn,Pn[pn]);if(Ie)for(var pn of Ie(Pn))gt.call(Pn,pn)&&yt(qt,pn,Pn[pn]);return qt},nt=(qt,Pn)=>Re(qt,He(Pn));let vt=[{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:qt,title:Pn,icon:pn,actionName:Ln,className:Gn="",children:jn}){function Bn(){qt(Ln)}return te.createElement("a",{title:Pn,className:Gn,onClick:Bn},te.createElement("i",{className:`${pn}`}),jn)}var At=({watch:qt,showNullButton:Pn,showNullProgramButton:pn,onActionCallback:Ln,fullScreen:Gn,insertTemp:jn,hidetoolBar:Bn,extraUse:Xn})=>{const Nn=[...vt,{title:`${qt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${qt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return te.createElement("ul",{className:"markdown-toolbar-container"},!Bn&&Nn.map((ar,qn)=>te.createElement("li",{key:qn},ar.actionName?te.createElement(We,nt(ft({},ar),{onActionCallback:Ln})):te.createElement("span",{className:"v-line"}))),Pn?te.createElement("li",null,te.createElement(We,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ln},te.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,pn?te.createElement(te.Fragment,null,te.createElement("li",null,te.createElement(We,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ln},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),te.createElement("li",null,te.createElement(We,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ln},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,jn&&te.createElement("li",null,te.createElement(We,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${jn}`,onActionCallback:Ln},te.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Xn&&te.createElement("li",null,Xn),te.createElement("li",{className:"btn-full-screen"},te.createElement(We,{icon:`${Gn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Gn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ln})))},st=ie(88487),qe=ie(28284),Mt=ie(37568),Ve=ie(7939),pt=Object.defineProperty,ht=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,rn=(qt,Pn,pn)=>Pn in qt?pt(qt,Pn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):qt[Pn]=pn,we=(qt,Pn)=>{for(var pn in Pn||(Pn={}))Ae.call(Pn,pn)&&rn(qt,pn,Pn[pn]);if(Bt)for(var pn of Bt(Pn))Nt.call(Pn,pn)&&rn(qt,pn,Pn[pn]);return qt},de=(qt,Pn)=>ht(qt,ve(Pn));const Je={labelCol:{span:4},wrapperCol:{span:20}};var wt=({callback:qt,onCancel:Pn})=>{function pn(Ln){qt(Ln)}return te.createElement(qe.default,de(we({},Je),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:pn,style:{width:500}}),te.createElement(qe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},te.createElement(Mt.default,null)),te.createElement(qe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},te.createElement(Mt.default,null)),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Ve.ZP,{type:"ghost",onClick:Pn},"\u53D6\u6D88")))},Et=ie(28267),Be=ie(53332),dt=ie(62957),bt=ie(77019),tn=ie(40254),Ot=ie(59301),jt=({callback:qt,onCancel:Pn})=>{const pn=document.createElement("canvas"),Ln=pn.getContext("2d");pn.width=1e3,pn.height=800,Ln.fillStyle="#ffffff",Ln.fillRect(0,0,pn.width,pn.height);const Gn=pn.toDataURL("image/png");return Ot.createElement(dt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ot.createElement(bt.Z,{style:{height:"100vh"}},Ot.createElement(tn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Gn,visible:!0,title:String(Date.now())},onOk:jn=>{qt({src:jn.url})},onClose:Pn})))},it=ie(36207),Gt=ie(5269),mt=ie(6767),se={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ee=ie(59301),oe=(0,te.forwardRef)(({onCancel:qt,editImgId:Pn,callback:pn},Ln)=>{let Gn=(0,te.useRef)(),jn=(0,te.useRef)(),Bn=(0,te.useRef)(),Xn=(0,te.useRef)(!1);const Nn=(0,te.useRef)(!1);console.log("ref:",Ln);const[ar,qn]=(0,te.useState)(0),[It,Xt]=(0,te.useState)("100vh");return(0,te.useEffect)(()=>{qn(1)},[]),(0,te.useImperativeHandle)(Ln,()=>({setHeight:Xt})),ee.createElement("div",{ref:Nn,className:"body-overflow-initial"},ee.createElement(it.Z,{width:"100vw",height:It,footer:null,closable:!0,placement:"bottom",open:!!ar,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${se.drawerWrap}`,onClose:()=>{window.saveDrawData(zn=>{pn({src:`/api/attachments/${zn}`,id:zn})})},title:ee.createElement(bt.Z,{align:"middle"},ee.createElement(Gt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(Gt.Z,{onClick:()=>{Xt(It==="60px"?"100vh":"60px")}},ee.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ee.createElement(Gt.Z,{onClick:()=>{window.saveDrawData(zn=>{if(zn===null){mt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}mt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),pn({src:`/api/attachments/${zn}`,id:zn,disabledClose:!0})})}},ee.createElement(Ve.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ee.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Pn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:jn})))}),le=ie(14185),re=ie(47889),Ee=ie(4875);const at=re.ZP.Group,$t={margin:"0 8px"};var Ye=({callback:qt,onCancel:Pn})=>{function pn(Ln){qt(Ln)}return te.createElement(qe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:pn},te.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},te.createElement("span",{style:$t},"\u5355\u5143\u683C\u6570\uFF1A"),te.createElement("span",{style:$t},"\u884C\u6570"),te.createElement(qe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},te.createElement(Ee.Z,null)),te.createElement("span",{style:$t},"\u5217\u6570"),te.createElement(qe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},te.createElement(Ee.Z,null))),te.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},te.createElement("span",{style:$t},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),te.createElement(qe.default.Item,{name:"align"},te.createElement(at,null,te.createElement(re.ZP,{value:"default"},te.createElement("i",{className:"fa fa-align-justify"})),te.createElement(re.ZP,{value:"left"},te.createElement("i",{className:"fa fa-align-left"})),te.createElement(re.ZP,{value:"center"},te.createElement("i",{className:"fa fa-align-center"})),te.createElement(re.ZP,{value:"right"},te.createElement("i",{className:"fa fa-align-right"}))))),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Ve.ZP,{type:"ghost",onClick:Pn},"\u53D6\u6D88")))},ct=ie(58755),St=ie(84915),Ft=ie.n(St),Qt=(0,te.forwardRef)(({use3d:qt,width:Pn,height:pn,callback:Ln,showSaveButton:Gn},jn)=>{const Bn=(0,te.useRef)(),Xn=(0,te.useRef)(),[Nn,ar]=(0,te.useState)(!1),qn=(0,te.useRef)({id:Bn,appName:"graphing",width:Pn||1e3,height:pn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,te.useEffect)(()=>{Xn.current=new(Ft())(qn.current,!0),window.onload=function(){Xn.current.inject("applet_container")}},[]);const It=()=>{var Xt=window.ggbApplet.getPNGBase64(1,!0,72);return Ln&&Ln(Xt),Xt};return(0,te.useEffect)(()=>{qn.current.appName=Nn?"3D":"graphing",Xn.current.inject("applet_container")},[Nn]),(0,te.useEffect)(()=>{ar(qt)},[qt]),(0,te.useImperativeHandle)(jn,()=>({getImgData:It})),te.createElement(te.Fragment,null,te.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Bn}),te.createElement(bt.Z,{align:"middle"},te.createElement(Gt.Z,{flex:1},te.createElement(ct.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Nn,onChange:Xt=>ar(Xt)})),te.createElement(Gt.Z,null,te.createElement(Ve.ZP,{size:"large",onClick:It,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Jt=ie(9057);const Ut="link",Sn="upload-image",on="add-flowchart",gn="draw-image",kt="add-flowchart",Mn="code-block",nn="add-table",Me="------------",et={default:Me,left:`:${Me}`,center:`:${Me}:`,right:`${Me}:`};var Lt=ie(79006),Rt=ie(76406);function Se(){}let $e=0;const lt=1e4,Tt="\u2581",Wt="@\u2581\u2581@",ln="@\u2581@",Dn=`
|
|
|
**\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`,In=["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 dn(qt){return/^\d+$/.test(qt)?`${qt}px`:qt}const fn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",$n={[fn+"-B"]:"bold",[fn+"-I"]:"italic"},yn={[Ut]:"\u6DFB\u52A0\u94FE\u63A5",[Mn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Sn]:"\u6DFB\u52A0\u56FE\u7247",[gn]:"\u6DFB\u52A0\u753B\u56FE",[on]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[nn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var hn=({defaultValue:qt="",onChange:Pn,width:pn="100%",height:Ln=400,miniToolbar:Gn=!1,isFocus:jn=!1,watch:Bn,insertTemp:Xn,mode:Nn="markdown",id:ar="markdown-editor-id",showResizeBar:qn=!1,noStorage:It=!1,showNullButton:Xt=!1,showNullProgramButton:zn=!1,hidetoolBar:nr=!1,fullScreen:De=!1,onBlur:_e,onCMBeforeChange:ge,onFullScreen:Pe,className:ye="",disablePaste:Oe=!1,disabled:pe=!1,disabledFill:Fe=!1,placeholder:je="",values:tt="",extraUse:Ze,onAddBlank:Le})=>{const[Te,Ue]=(0,te.useState)(null),[Vt,zt]=(0,te.useState)(qt),[Zt,kn]=(0,te.useState)(Bn),[Tn,Hn]=(0,te.useState)(De),[En,mn]=(0,te.useState)(""),[wn,Fn]=(0,te.useState)(0),[Yn,Un]=(0,te.useState)(Ln),[Kn,vn]=(0,te.useState)(!1),[er,Wn]=(0,te.useState)(0),[dr,pr]=(0,te.useState)(0),lr=(0,te.useRef)(),ur=(0,te.useRef)(),yr=(0,te.useRef)(),sr=(0,te.useRef)(),fr=(0,te.useRef)(),Qn=(0,te.useRef)(),mr=(0,ot.useDispatch)();(0,te.useEffect)(()=>{const an=window.scrollY||window.pageYOffset;zt(tt),Te==null||Te.setValue(tt),window.scrollTo(0,an)},[tt]),(0,te.useEffect)(()=>{Pe==null||Pe(Tn)},[Tn]),(0,te.useEffect)(()=>{if(lr.current){let an=function(bn,On){var cr;if(Oe){On.preventDefault();return}const Or=On.clipboardData;if(Or){const Ir=Or.types.toString(),Rr=Or.items;if(Ir==="Files"||Or.types.indexOf("Files")>-1){if(On.preventDefault(),Nn=="stex")return;try{let Br=Rr[1];((cr=Rr[0])==null?void 0:cr.kind)==="file"&&(Br=Rr[0]);const Fr=Br.getAsFile(),Ur=Fr.name.split(".").pop();(0,Be.I)(Fr,Wr=>{var Kr,ti,Ei;Wr.id?((Kr=Fr==null?void 0:Fr.type)==null?void 0:Kr.indexOf("image"))>-1?Kt.replaceSelection(`<img width="100%" src="/api/attachments/${Wr.id}?type=${Wr.content_type})" alt="" />`):((ti=Fr==null?void 0:Fr.type)==null?void 0:ti.indexOf("video"))>-1?Kt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Wr.id}"></video>`):((Ei=Fr==null?void 0:Fr.type)==null?void 0:Ei.indexOf("pdf"))>-1?Kt.replaceSelection(`<a href="/api/attachments/${Wr.id}?type=${Fr.type}&disposition=inline" target="_blank">${Fr.name}</a>`):In.includes(Ur)?Kt.replaceSelection(`<a href="/api/attachments/${Wr.id}?type=office&disposition=inline" target="_blank">${Fr.name}</a>`):Kt.replaceSelection(`[${Fr.name}](/api/attachments/${Wr.id}?type=${Wr.content_type})`):(Wr==null?void 0:Wr.status)===401&&(document.location.href="/user/login")})}catch(Br){mt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Kt=Ge().fromTextArea(lr.current,{mode:Nn,lineNumbers:!Gn,lineWrapping:!0,value:qt,autoCloseTags:!0,autoCloseBrackets:!0});return Kt.on("keyup",function(bn,On){On.keyCode===8&&(bn.getValue()==""?Kt.setOption("placeholder",je):Kt.setOption("placeholder",null))}),Kt.on("keydown",function(bn,On){if(On.keyCode===8){var cr=Hr(bn);cr&&On.preventDefault()}}),jn&&Kt.focus(),Kt.on("paste",an),pe&&Kt.on("beforeChange",function(bn,On){(On.origin==="paste"||On.origin==="+input")&&On.cancel()}),Ue(Kt),()=>{Kt.off("paste",an)}}},[]);const br=(0,te.useCallback)(()=>{if(ur.current)try{}catch(an){console.log(an,"---- to set md editor body height")}},[Yn,ur,Tn]);(0,te.useEffect)(()=>{function an(){let Kt=new xe.Z(bn=>{for(let On of bn)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&(br(),Te.setSize("100%","100%"),Te.refresh())});return Kt.observe(lr.current.parentElement),Kt}if(Te){const Kt=an();return()=>{var bn,On;(bn=lr.current)!=null&&bn.parentElement&&Kt.unobserve((On=lr.current)==null?void 0:On.parentElement)}}},[Te,br]),(0,te.useEffect)(()=>{if(Te){let an=[];for(const[Kt,bn]of Object.entries($n)){let On={[Kt]:()=>{Er(bn)}};an.push(On),Te.addKeyMap(On)}return()=>{for(let Kt of an)Te.removeKeyMap(Kt)}}},[Te]),(0,te.useEffect)(()=>{De!==Tn&&Hn(De)},[De]),(0,Lt.Z)(()=>{if(!It&&wn>0){let an=new Date().getTime(),Kt=window.sessionStorage.getItem(ar);an>=wn+lt&&(!Kt||Kt!==Vt)&&(window.sessionStorage.setItem(ar,Vt),vn(!0))}},lt),(0,te.useEffect)(()=>{kn(Bn)},[Te,Bn]),(0,te.useEffect)(()=>{Te&&jn&&Te.focus()},[Te,jn]),(0,te.useEffect)(()=>{if(Zt&&Te){let an=function(bn){let On=bn.target;if(sr.current){let cr=On.scrollTop/On.scrollHeight;sr.current.scrollTop=sr.current.scrollHeight*cr}};const Kt=Te.getScrollerElement();return Kt.addEventListener("scroll",an),()=>{Kt.removeEventListener("scroll",an)}}},[Te,Zt]),(0,te.useEffect)(()=>{if(Te&&ge){let an=function(Kt,bn){ge(Kt,bn)};return Te.on("beforeChange",an),()=>{Te.off("beforeChange",an)}}},[Te,ge]),(0,te.useEffect)(()=>{if(Te&&_e){let an=function(){_e(Te.getValue())};return Te.on("blur",an),()=>{Te.off("blur",an)}}},[Te,_e]);function Hr(an,Kt){var bn=an.getDoc(),On=bn.getCursor(),cr=bn.getLine(On.line),Or=cr.charAt(On.ch-1),Ir=cr.lastIndexOf("@\u2581@",On.ch),Rr=cr.lastIndexOf("@\u2581\u2581@",On.ch),Br=Ir>Rr?Ir:Rr,Fr=Ir>Rr?3:4;if(Wt.indexOf(Or)===-1)return null;if(console.log("change1:",Kt,an,cr,On,Br,Ir,Rr,Or),Br>=0&&On.ch-Br<5){var Ur=Br+Fr;return bn.replaceRange("",{line:On.line,ch:Br},{line:On.line,ch:Ur}),{line:On.line,ch:Ur}}return null}(0,te.useEffect)(()=>{if(Te){let an=function(Kt,bn){const On=Kt.getValue();zt(On),Fn(new Date().getTime()),Kt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Pn&&(zn?Pn(On,cn(On)):Pn(On))};return Te.on("change",an),()=>{Te.off("change",an)}}},[Te,Pn]),(0,te.useEffect)(()=>{if(Te)if(qt==null)Te.setValue(""),zt("");else{const an=window.scrollY||window.pageYOffset;qt!==Te.getValue()&&(Te.setValue(qt),zt(qt),Te.setCursor(pe?1:Te.lineCount(),0),window.scrollTo(0,an))}},[Te,qt]);const Er=(0,te.useCallback)(an=>{const Kt=Te.getCursor(),bn=Te.getSelection();let On=bn.split(`
|
|
|
`);switch(an){case"bold":return Te.replaceSelection("**"+bn+"**"),bn===""&&Te.setCursor(Kt.line,Kt.ch+2),Te.focus();case"italic":return Te.replaceSelection("*"+bn+"*"),bn===""&&Te.setCursor(Kt.line,Kt.ch+1),Te.focus();case"code":return Te.replaceSelection("`"+bn+"`"),bn===""&&Te.setCursor(Kt.line,Kt.ch+1),Te.focus();case"inline-latex":return(0,Rt.Ye)(mr)?void 0:(mn("inline-latex"),Te.focus());case"latex":return Te.replaceSelection("```latex\n"+bn+"\n```"),Te.setCursor(Kt.line+1,bn.length+1),Te.focus();case"line-break":return Te.replaceSelection(`<br/>
|
|
|
`),Te.focus();case"list-ul":return bn===""?Te.replaceSelection("- "+bn):Te.replaceSelection(On.map(cr=>cr===""?"":`- ${cr}`).join(`
|
|
|
`)),Te.focus();case"list-ol":return bn===""?Te.replaceSelection("1. "+bn):Te.replaceSelection(On.map((cr,Or)=>cr===""?"":`${Or+1}. ${cr}`).join(`
|
|
|
`)),Te.focus();case"add-null-ch":Le==null||Le();return;case"add-signal":return bn===""&&Te.setCursor(Kt.line,Kt.ch),Te.replaceSelection(ln),Te.focus();case"add-multiple":return bn===""&&Te.setCursor(Kt.line,Kt.ch),Te.replaceSelection(Wt),Te.focus();case"inster-template-1":return bn===""&&Te.setCursor(Kt.line,Kt.ch),Te.replaceSelection(Dn),Te.focus();case"eraser":return Te.setValue(""),Te.focus();case"trigger-watch":return kn(!Zt),Te.focus();case"trigger-full-screen":return Hn(!Tn),Te.focus();case Ut:mn(Ut);return;case Mn:mn(Mn);return;case Sn:mn(Sn);return;case gn:mn(gn);return;case"maths-latex":if((0,Rt.Ye)(mr))return;mn("maths-latex");return;case on:fr.current="",sessionStorage.removeItem("file_id"),mn(on);return;case nn:mn(nn);return;default:throw new Error}},[Te,Zt,Tn]),Ar=(0,te.useCallback)((an,Kt)=>{var bn,On,cr,Or,Ir,Rr;an!=null&&an.disabledClose||mn("");const{src:Br,alt:Fr,id:Ur}=an||{};switch(En){case Ut:const{title:Ni,link:xi}=an;return Te.replaceSelection(`[${Ni}](${xi})`),Te.focus();case Mn:const{language:li,content:Ri}=an;return Te.replaceSelection(["```"+li,Ri,"```"].join(`
|
|
|
`)),Te.focus();case"maths-latex":for(var Wr=atob(an),Kr=new Uint8Array(Wr.length),ti=0;ti<Wr.length;ti++)Kr[ti]=Wr.charCodeAt(ti);var Ei=new Blob([Kr],{type:"image/png"});return(0,Be.I)(Ei,wr=>{wr.id?Te.replaceSelection(``):(wr==null?void 0:wr.status)===401&&(document.location.href="/user/login")}),Te.focus();case"inline-latex":return(0,Rt.Ye)(mr)?void 0:(Te.replaceSelection("`$$"+an+"$$`"),Te.focus());case kt:return Ur?(Te.getValue().indexOf(Br)===-1?Te.replaceSelection(`<center><img id="${Ur}" width="80%" src="${Br}" class="draw-flowchart" alt="${Fr||""}" /></center>`):document.getElementById(Ur).src=le.Z.API_SERVER+Br+"?t="+Date.now(),Te.focus()):void 0;case Sn:case gn:const $r=Kt,_i=(cr=(On=(bn=$r==null?void 0:$r.name)==null?void 0:bn.split("."))==null?void 0:On.pop)==null?void 0:cr.call(On);return((Or=$r==null?void 0:$r.type)==null?void 0:Or.indexOf("image"))>-1||!($r!=null&&$r.type)?$r!=null&&$r.align||$r!=null&&$r.width?Te.replaceSelection(`<p style="text-align:${$r.align||"initial"}"><img width="${$r.width?$r.width+"%":"initial"}" src="${Br}" alt="${Fr||""}" /></p>`):Te.replaceSelection(`<img width="100%" src="${Br}" alt="${Fr||""}" />`):((Ir=$r==null?void 0:$r.type)==null?void 0:Ir.indexOf("video"))>-1?Te.replaceSelection(`<video width="100%" controls src="${Br}"></video>`):((Rr=$r==null?void 0:$r.type)==null?void 0:Rr.indexOf("pdf"))>-1?Te.replaceSelection(`<a href="${Br}?type=${$r.type}&disposition=inline" target="_blank">${$r.name}</a>`):In.includes(_i)?Te.replaceSelection(`<a href="${Br}?type=office&disposition=inline" target="_blank">${$r.name}</a>`):Te.replaceSelection(`[${$r.name}](${Br})`),Te.focus();case nn:const{row:qr,col:xr,align:zr}=an;let Gr=`
|
|
|
`;for(let wr=0;wr<qr;wr++){let Nr=[],Lr=[];for(let ui=0;ui<xr;ui++)wr===1&&Lr.push(et[zr]),Nr.push(" ");wr===1&&(Gr+=`| ${Lr.join(" | ")} |
|
|
|
`),Gr+=`| ${Nr.join(xr===1?"":" | ")} |
|
|
|
`}return Te.replaceSelection(Gr+`
|
|
|
`),Te.focus();default:throw new Error}},[Te,En]),kr=(0,te.useMemo)(()=>{switch(En){case Ut:return te.createElement(wt,{callback:Ar,onCancel:Mr});case Mn:return te.createElement(Et.Z,{callback:Ar,onCancel:Mr});case Sn:return te.createElement(Be.Z,{callback:Ar,onCancel:Mr});case on:return te.createElement(oe,{editImgId:fr.current,callback:Ar,onCancel:Mr});case nn:return te.createElement(Ye,{callback:Ar,onCancel:Mr});case"maths-latex":return te.createElement(Qt,{showSaveButton:!0,callback:Ar});case"inline-latex":return te.createElement(Jt.Z,{showSaveButton:!0,callback:Ar});default:return null}},[En]);function Mr(){mn("")}(0,te.useEffect)(()=>{if(yr.current){let an=function(Ir){cr=!0,Or=Ir.pageY},Kt=function(){cr=!1},bn=function(Ir){if(cr){let Rr=Ir.pageY-Or;Rr<0&&(Rr=0),Rr>300&&(Rr=300);let Br=Ln+Rr+"px";Un(Br)}},On=yr.current,cr=!1,Or=0;return On.addEventListener("mousedown",an),document.addEventListener("mousemove",bn),document.addEventListener("mouseup",Kt),()=>{On.removeEventListener("mousedown",an),document.removeEventListener("mousemove",bn),document.removeEventListener("mouseup",Kt)}}},[Te,yr]),(0,te.useEffect)(()=>{Un(Ln)},[Ln]);const ir=dn(pn),rr=dn(Yn),Jn={width:ir,height:rr},Yt=(0,te.useMemo)(()=>{if(wn){let an=new Date(wn),Kt=an.getHours(),bn=an.getMinutes(),On=an.getSeconds();return Kt=Kt<10?"0"+Kt:Kt,bn=bn<10?"0"+bn:bn,On=On<10?"0"+On:On,`${Kt}:${bn}:${On}`}return 0},[wn]),cn=an=>{const Kt=[];if(zn){let bn=-1;an=an.replace(/(@▁▁@|@▁@)/g,function(On,cr,Or){Kt.push({multiLine:On!==ln})})}return Kt};function un(){window.sessionStorage.removeItem(ar),vn(!1),Fn(0)}function _t(){vn(!1),Fn(0),Te.setValue(window.sessionStorage.getItem(ar))}(0,te.useEffect)(()=>{yn[En]&&En!==gn&&En!==on&&setTimeout(()=>{const an=document.getElementsByClassName("markdown-popup-form")[0],Kt=window.innerWidth/2-an.offsetWidth/2,bn=window.innerHeight/2-an.offsetHeight/2;Wn(Kt),pr(bn)},0)},[En]);const An=an=>{an.preventDefault();const Kt=an.clientX-er,bn=an.clientY-dr;document.body.onmousemove=On=>{let cr=On.clientX-Kt,Or=On.clientY-bn;const Ir=document.getElementsByClassName("markdown-popup-form")[0],Rr=window.innerWidth-Ir.offsetWidth,Br=window.innerHeight-Ir.offsetHeight;cr=Math.max(0,Math.min(cr,Rr)),Or=Math.max(0,Math.min(Or,Br)),Zn(On.clientX,On.clientY,Kt,bn)&&(Wn(cr),pr(Or))},document.body.onmouseup=function(){document.body.onmousemove=null}},Zn=(an,Kt,bn,On)=>{const cr=document.body.clientHeight,Or=document.body.clientWidth;return an<20&&bn>an||an>Or-20&&bn<an||Kt<20&&On>Kt||Kt>cr-20&&On<Kt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return te.createElement(te.Fragment,null,te.createElement("div",{className:"markdown-editor-wrapper",ref:ur},te.createElement("div",{className:`markdown-editor-container ${ye} ${Zt?"on-preview":""} ${Gn?"mini":""} ${Tn?"full-screen":""}`,style:Jn},te.createElement(At,{insertTemp:Xn,watch:Zt,fullScreen:Tn,showNullButton:Xt,showNullProgramButton:zn,onActionCallback:Er,hidetoolBar:nr,extraUse:Ze}),te.createElement("div",{className:"markdown-editor-body"},te.createElement("div",{className:"codemirror-container"},te.createElement("textarea",{ref:lr,placeholder:je})),Zt?te.createElement("div",{ref:sr,className:"preview-container"},Nn==="stex"&&te.createElement(xt,{value:Vt}),Nn!=="stex"&&te.createElement(be.Z,{edit:!0,disabledFill:Fe,showProgramFill:zn,value:Vt,openEditor:an=>{var Kt;fr.current=an,(Kt=Qn.current)==null||Kt.setHeight("100vh"),setTimeout(()=>{mn("add-flowchart")},150)}})):null))),qn?te.createElement("a",{ref:yr,className:"editor-resize"}):null,En===gn&&te.createElement(jt,{callback:Ar,onCancel:Mr}),En===on&&te.createElement(oe,{ref:Qn,editImgId:fr.current,callback:Ar,onCancel:Mr}),te.createElement(st.Z,null,yn[En]&&En!==gn&&En!==on?te.createElement(dt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:er,top:dr},title:te.createElement("div",{style:{cursor:"move"},onMouseDown:An},yn[En]),open:!0,onCancel:Mr,footer:null,destroyOnClose:!0,width:En===on?"1200px":null,height:En===on?"80vh":null,className:"markdown-popup-form"},kr):null))}},53332:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return vt},I:function(){return At}});var te=ie(28284),ot=ie(6767),me=ie(37568),Ge=ie(44104),xe=ie(4875),Ce=ie(47889),ze=ie(7939),Ke=ie(23216),ke=ie(59301),fe=ie(59301),Qe=Object.defineProperty,be=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ie=(st,qe,Mt)=>qe in st?Qe(st,qe,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):st[qe]=Mt,ut=(st,qe)=>{for(var Mt in qe||(qe={}))Re.call(qe,Mt)&&Ie(st,Mt,qe[Mt]);if(rt)for(var Mt of rt(qe))He.call(qe,Mt)&&Ie(st,Mt,qe[Mt]);return st},gt=(st,qe)=>be(st,xt(qe));const{useForm:yt}=te.default,ft={width:280,marginRight:10},nt={labelCol:{span:5},wrapperCol:{span:19}};var vt=({callback:st,onCancel:qe})=>{const[Mt]=yt();let Ve=(0,ke.useRef)();function pt(Bt){Ve.current.width=Mt.getFieldValue("width"),Ve.current.align=Mt.getFieldValue("align"),st(Bt,Ve.current)}function ht(Bt,Ae){if(Bt.status===-1){ot.ZP.error(Bt.message);return}Mt.setFieldsValue({src:`/api/attachments/${Bt.id}`,type:Ae.type})}function ve(Bt){let Ae=Bt.target.files[0];Ve.current=Ae,At(Ae,ht)}return fe.createElement(te.default,gt(ut({form:Mt},nt),{className:"upload-image-panel",onFinish:pt,style:{width:470,overflow:"hidden"}}),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(te.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(me.default,{style:ft})),fe.createElement(We,{onFileChange:ve}))),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(me.default,{style:{width:264}})),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(Ge.Z,null,fe.createElement(te.default.Item,{name:"width",style:{margin:0}},fe.createElement(xe.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(te.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.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"}]})),fe.createElement("aside",null,fe.createElement(te.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(ze.ZP,{type:"default",onClick:qe},"\u53D6\u6D88"))))};function We({onFileChange:st}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:st}))}function At(st,qe){if(!st)throw new String("\u6CA1\u6709\u6587\u4EF6");let Mt=new FormData;Mt.append("editormd-image-file",st),Mt.append("file_param_name","editormd-image-file"),Mt.append("byxhr","true");var Ve=new window.XMLHttpRequest;Ve.withCredentials=!0,Ve.addEventListener("load",function(pt){qe(JSON.parse(pt.target.responseText),st)},!1),Ve.addEventListener("error",function(pt){console.error(pt)},!1),Ve.open("POST",`${Ke.KI}/api/attachments.json`),Ve.send(Mt)}},88487:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return me}});var te=ie(59301),ot=ie(4676);class me extends te.Component{constructor(xe){super(xe);const Ce=window.document;this.node=Ce.createElement("div"),Ce.body.appendChild(this.node)}render(){const{children:xe}=this.props;return(0,ot.createPortal)(xe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},34728:function(en,Ht,ie){"use strict";ie.d(Ht,{SV:function(){return jt},ZP:function(){return Ot}});var te=ie(59301),ot=ie(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"]},Ge={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"]},xe={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(`
|
|
|
`)}]},ze={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 Ke=ie(53184),ke=ie.n(Ke),fe=(it,Gt,mt)=>new Promise((se,ee)=>{var z=re=>{try{le(mt.next(re))}catch(Ee){ee(Ee)}},oe=re=>{try{le(mt.throw(re))}catch(Ee){ee(Ee)}},le=re=>re.done?se(re.value):Promise.resolve(re.value).then(z,oe);le((mt=mt.apply(it,Gt)).next())});const Qe={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"]}},be=(it,Gt,mt,se)=>{const ee=Gt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:mt.lineNumber,endColumn:mt.column});return Array.from(new Set(ee.match(/\b\w{2,}\b/g)||[])).map(oe=>({label:oe,kind:it.languages.CompletionItemKind.Text,insertText:oe,range:se}))},xt=(it,Gt,mt,se)=>{it.languages.registerCompletionItemProvider(Gt,{provideCompletionItems(ee,z){const oe=ee.getWordUntilPosition(z),le={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:oe.startColumn,endColumn:oe.endColumn},re=ee.getLineContent(z.lineNumber).substring(oe.startColumn-2,oe.endColumn);return{suggestions:[...be(it,ee,z,le),...mt.map(at=>({label:at,kind:it.languages.CompletionItemKind.Keyword,documentation:at,insertText:at,insertTextRules:it.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le})),...se.map(at=>({label:at.label,kind:it.languages.CompletionItemKind.Snippet,documentation:at.content,insertText:re.startsWith("#")?at.content.replace(/#/,""):at.content,insertTextRules:it.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le}))]}}})};var rt=it=>{Qe.languages.forEach(Gt=>{it.languages.registerDocumentFormattingEditProvider(Gt,{provideDocumentFormattingEdits(mt){return fe(this,null,function*(){const se=ke()(mt.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:mt.getFullModelRange(),text:se}]})}})}),xt(it,"java",Ge.keywords,Ge.quickKey),xt(it,"cpp",xe.keywords,xe.quickKey),xt(it,"c",me.keywords,[]),xt(it,"python",Ce.keywords,Ce.quickKey),xt(it,"scala",ze.keywords,ze.quickKey)};const Re="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var He=Object.defineProperty,Ie=(it,Gt,mt)=>Gt in it?He(it,Gt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):it[Gt]=mt,ut=(it,Gt,mt)=>Ie(it,typeof Gt!="symbol"?Gt+"":Gt,mt);const gt=class zl{constructor(Gt,mt,se){this.placeholder=Gt,this.editor=mt,this.monaco=se,mt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return zl.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)}};ut(gt,"ID","editor.widget.placeholderHint");var ft=gt,nt=ie(96236),vt=ie(6767),We=ie(25399),At=ie(78267),st=ie(33156),qe=ie(56102),Mt=Object.defineProperty,Ve=Object.defineProperties,pt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Ae=(it,Gt,mt)=>Gt in it?Mt(it,Gt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):it[Gt]=mt,Nt=(it,Gt)=>{for(var mt in Gt||(Gt={}))ve.call(Gt,mt)&&Ae(it,mt,Gt[mt]);if(ht)for(var mt of ht(Gt))Bt.call(Gt,mt)&&Ae(it,mt,Gt[mt]);return it},rn=(it,Gt)=>Ve(it,pt(Gt)),we=(it,Gt)=>{var mt={};for(var se in it)ve.call(it,se)&&Gt.indexOf(se)<0&&(mt[se]=it[se]);if(it!=null&&ht)for(var se of ht(it))Gt.indexOf(se)<0&&Bt.call(it,se)&&(mt[se]=it[se]);return mt},de=(it,Gt,mt)=>new Promise((se,ee)=>{var z=re=>{try{le(mt.next(re))}catch(Ee){ee(Ee)}},oe=re=>{try{le(mt.throw(re))}catch(Ee){ee(Ee)}},le=re=>re.done?se(re.value):Promise.resolve(re.value).then(z,oe);le((mt=mt.apply(it,Gt)).next())});function Je(it){return/^\d+$/.test(it)?`${it}px`:it}function wt(){}let Et=!1;const Be={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function dt(it=[]){let Gt=it;if(Array.isArray(it)){for(let mt=0;mt<it.length;mt++){let se=Be[it[mt]];if(se)return se}return Gt[0]}return Be[Gt]||Gt}let bt=null;const tn=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(it){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",it)}});var Ot=it=>{var Gt=it,{width:mt="100%",height:se="100%",value:ee,language:z="javascript",style:oe={},options:le={},overrideServices:re={},theme:Ee="vs-dark",onEditBlur:at,isCopy:$t=!1,onSave:Ye,autoHeight:ct=!1,forbidCopy:St=!1,forbidCopyTips:Ft,onChange:Pt=wt,editorDidMount:Qt=wt,onFocus:Jt=wt,onBreakPoint:Ut=wt,breakPointValue:Sn=[],filename:on="educoder.txt",errorLine:gn,errorContent:kt="",highlightLine:Mn,openBreakPoint:nn=!1,placeholder:Me="",showMiniMap:et=!0}=Gt,Lt=we(Gt,["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 Rt=(0,te.useRef)(),Se=(0,te.useRef)({}),$e=(0,te.useRef)(),lt=(0,te.useRef)(),Tt=(0,te.useRef)([]),Wt=(0,te.useRef)(!1),ln=(0,te.useRef)(),Dn=(0,te.useRef)(),In=(0,te.useRef)(!1),[dn,Cn]=(0,te.useState)(!1);function fn(){let It;return Rt.current&&(It=new ot.Z(Xt=>{for(let zn of Xt)(zn.target.offsetHeight>0||zn.target.offsetWidth>0)&&Se.current.instance.layout()}),It.observe(Rt.current)),It}function $n(){vt.ZP.warning({content:decodeURIComponent(Ft||Re),key:"monaco-editor-tip"})}const yn=()=>{let It=Se.current.instance;if(ee!=null&&It&&dn){const Xt=It.getModel();Xt&&ee!==Xt.getValue()&&(Et=!0,Xt.setValue(ee),It.layout(),Et=!1)}};(0,te.useEffect)(()=>{const It=st.Z.subscribe("formatDocument",Xt=>{var zn;let nr=Se.current.instance;(zn=nr==null?void 0:nr.getAction)==null||zn.call(nr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Xt=>{Pt(Xt)},It},[]),(0,te.useEffect)(()=>{var It;let Xt=Se.current.instance;lt.current&&clearTimeout(lt.current),lt.current=setTimeout(()=>{yn()},500),ee&&(ee!=null&&ee.length)&&((It=Xt==null?void 0:Xt.updateOptions)==null||It.call(Xt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ee.split(/\r\n|\r|\n/g).length))+3,5)}))},[ee,dn,Se.current]),(0,te.useEffect)(()=>{if(gn&&Se.current&&Se.current.instance){let Xt=Se.current.instance;Xt.changeViewZones(function(zn){var nr=document.createElement("div");nr.style.padding="10px 20px",nr.style.width="calc(100% - 20px)",nr.className="my-error-line-wrp",nr.innerHTML=kt,zn.addZone({afterLineNumber:gn||11,heightInLines:3,domNode:nr})});var It={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}};Xt.addOverlayWidget(It),Xt.revealPositionInCenter({lineNumber:20,column:1})}},[gn,Se.current,dn]);const hn=(It="",Xt)=>{if(!It||It.trim()==="")return!0;const nr=Se.current.instance.getModel().getLineTokens(Xt);let De=!1;for(let _e=0;_e<2;_e++)nr.getStandardTokenType(_e)===1&&(De=!0);return De};(0,te.useEffect)(()=>{var It;const Xt=(It=Se.current)==null?void 0:It.instance;if(Xt&&dn&&St){const zn=Xt.onDidBlurEditorWidget(()=>{In.current=!1}),nr=Xt.onDidFocusEditorText(()=>{In.current=!0});return()=>{zn.dispose(),nr.dispose()}}},[Se.current,dn,St]),(0,te.useEffect)(()=>{var It;if((It=Se.current)!=null&&It.instance&&dn&&nn){let Xt=Se.current.instance,zn=Xt.getModel();if(!zn)return;(()=>{var Ze;let Le=[],Te=[];const Ue=zn.getAllDecorations();for(let zt of Ue)zt.options.className==="highlighted-line"&&(Le.push((Ze=zt==null?void 0:zt.range)==null?void 0:Ze.startLineNumber),Te.push(zt==null?void 0:zt.id));if(Mn===Le[0])return;zn.deltaDecorations(Te,[]);const Vt=zn.getLineCount();Mn&&Mn<=Vt&&(Xt.deltaDecorations([],[{range:new bt.Range(Mn,1,Mn,zn.getLineMaxColumn(Mn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Xt.revealLineInCenter(Mn))})();const De=(Ze=!1)=>{var Le;let Te=[],Ue=[];const Vt=zn.getAllDecorations();for(let zt of Vt)zt.options.linesDecorationsClassName==="breakpoints-select"&&(Te.push((Le=zt==null?void 0:zt.range)==null?void 0:Le.startLineNumber),Ue.push(zt==null?void 0:zt.id));if(Ze)return{lines:Te,ids:Ue};Ut(Te)},_e=Ze=>de(void 0,null,function*(){let Le={range:new bt.Range(Ze,1,Ze,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield zn.deltaDecorations([],[Le]),De()}),ge=Ze=>de(void 0,null,function*(){let Le=[];const Te=Xt.getLineDecorations(Ze);for(let Ue of Te)Ue.options.linesDecorationsClassName==="breakpoints-select"&&Le.push(Ue.id);yield zn.deltaDecorations(Le,[]),De()}),Pe=Ze=>{let Le=Xt.getLineDecorations(Ze);for(let Te of Le)if(Te.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,At.isEqual)(Sn,De(!0).lines)){zn.deltaDecorations(De(!0).ids,[]);const Ze=Sn.map(Le=>({range:new bt.Range(Le,1,Le,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));zn.deltaDecorations([],Ze)}const ye=Xt.onDidChangeModelContent(Ze=>{let Le=Xt.getPosition();if(Le){let Te=Le.lineNumber;clearTimeout(Dn.current),Dn.current=setTimeout(()=>{hn(zn.getLineContent(Te),Te)?ge(Te):Pe(Te)?(ge(Te),_e(Te)):De()},100)}}),Oe=Xt.onMouseDown(Ze=>{var Le,Te,Ue;if(Ze.target.detail&&((Ue=(Te=(Le=Ze.target)==null?void 0:Le.element)==null?void 0:Te.className)!=null&&Ue.includes("line-numbers"))){let Vt=Ze.target.position.lineNumber;if(hn(zn.getLineContent(Vt),Vt))return;Pe(Vt)?ge(Vt):_e(Vt)}}),pe=Ze=>{let Le={range:new bt.Range(Ze,1,Ze,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Tt.current=Xt.deltaDecorations(Tt.current,[Le])},Fe=()=>{Tt.current=Xt.deltaDecorations(Tt.current,[])},je=Xt.onMouseMove(Ze=>{var Le,Te,Ue;if(Fe(),Ze.target.detail&&((Ue=(Te=(Le=Ze.target)==null?void 0:Le.element)==null?void 0:Te.className)!=null&&Ue.includes("line-numbers"))){let Vt=Ze.target.position.lineNumber;if(hn(zn.getLineContent(Vt),Vt))return;pe(Vt)}}),tt=Xt.onMouseLeave(()=>{Fe()});return()=>{ye.dispose(),Oe.dispose(),je.dispose(),tt.dispose()}}},[Se.current,dn,Sn,Mn,nn,z]),(0,te.useEffect)(()=>{var It;(It=Se.current)!=null&&It.instance&&nn&&Se.current.instance.setPosition({lineNumber:0,column:0})},[Mn]);function qt(){let It=Se.current.instance;if(It){const Xt=It.getSelection(),zn=Se.current.pastePos||{},nr=new bt.Range(zn.startLineNumber||Xt.endLineNumber,zn.startColumn||Xt.endColumn,zn.endLineNumber||Xt.endLineNumber,zn.endColumn||Xt.endColumn);setTimeout(()=>{It.executeEdits("",[{range:nr,text:""}])},300)}}function Pn(It){(window.navigator.platform.match("Mac")?It.metaKey:It.ctrlKey)&&It.keyCode==83&&(It.preventDefault(),Ye())}const pn=()=>{if(ct&&Se.current.instance){const It=Se.current.instance.getContentHeight();ar(It<se?se:It)}else ar(se)};function Ln(It){var Xt=document.createEvent("MouseEvents");Xt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),It.dispatchEvent(Xt)}const Gn=It=>{if(!In.current)return;const{keyCode:Xt,ctrlKey:zn,metaKey:nr,target:De,type:_e}=It;return(_e==="paste"||(Xt===67||Xt===86)&&(nr||zn))&&De.nodeName==="TEXTAREA"&&($n(),It.preventDefault()),!1};function jn(It,Xt){var zn=window.URL||window.webkitURL||window,nr=new Blob([Xt]),De=document.createElementNS("http://www.w3.org/1999/xhtml","a");De.href=zn.createObjectURL(nr),De.download=It,Ln(De)}(0,te.useEffect)(()=>{pn()},[pn]),(0,te.useEffect)(()=>{Rt.current&&!dn&&Promise.all([ie.e(8909),ie.e(5977)]).then(ie.bind(ie,71448)).then(It=>{try{bt=It,Se.current.instance=bt.editor.create(Rt.current,{value:ee,language:dt(z),theme:Ee,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:et||!1}},re);const Xt=Se.current.instance;let De=[...nt.BH._menuItems].find(ye=>ye[0]._debugName=="EditorContext")[1],_e=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ge=(ye,Oe)=>{var pe,Fe;let je=ye._first;do Oe.includes((Fe=(pe=je.element)==null?void 0:pe.command)==null?void 0:Fe.id)&&ye._remove(je);while(je=je.next)};if(Qt(Xt,bt),setTimeout(()=>{pn(),Se.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{jn(on||"educoder.txt",Xt.getValue())}})},500),Se.current.subscription=Xt.onDidChangeModelContent(ye=>{Wt.current?clearTimeout(ln.current):(pn(),Pt(Xt.getValue(),ye)),ln.current=setTimeout(()=>{Wt.current=!1},500)}),window.Monaco||rt(bt,dt(z)),St&&(ge(De,_e),Rt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Gn),window.removeEventListener("paste",Gn),window.addEventListener("keydown",Gn),window.addEventListener("paste",Gn)),window.Monaco=bt,at&&Xt.onDidBlurEditorWidget(()=>{at(Xt.getValue())}),Jt&&Xt.onDidFocusEditorText(()=>{St&&tn(),Jt(Xt.getValue())}),St){tn();try{Xt.onDidPaste(ye=>{const Oe=Xt.getSelection(),pe=Se.current.pastePos||{},Fe=new bt.Range(pe.startLineNumber||Oe.endLineNumber,pe.startColumn||Oe.endColumn,pe.endLineNumber||Oe.endLineNumber,pe.endColumn||Oe.endColumn);Xt.executeEdits("",[{range:ye.range,text:""}])})}catch(ye){}}let Pe=fn();return Me&&typeof Me=="string"&&new ft(Me,Xt,bt),Cn(!0),()=>{const ye=Se.current.instance;ye.dispose();const Oe=ye.getModel();Oe&&Oe.dispose(),Se.current.subscription&&Se.current.subscription.dispose(),Pe.unobserve(Rt.current)}}catch(Xt){}})},[]),(0,te.useEffect)(()=>{if(Se.current.instance&&dn)return document.addEventListener("keydown",Pn,!1),()=>{document.removeEventListener("keydown",Pn)}},[Ye,dn]),(0,te.useEffect)(()=>{let It=Se.current.instance;if(It&&dn){let Xt=dt(z);bt.editor.setModelLanguage(It.getModel(),Xt)}},[z,dn]),(0,te.useEffect)(()=>{Se.current.instance&&dn&&bt.editor.setTheme(Ee)},[Ee,dn]),(0,te.useEffect)(()=>{let It=Se.current.instance;$e.current=le,It&&dn&&(It.updateOptions(Nt({},le)),setTimeout(()=>{It.getModel().updateOptions(Nt({},le))},200))},[JSON.stringify(le),dn]),(0,te.useEffect)(()=>{let It=Se.current.instance;It&&dn&&It.layout()},[mt,se,dn]);const[Bn,Xn]=(0,te.useState)(Je(mt)),[Nn,ar]=(0,te.useState)(Je(se)),qn=rn(Nt({},oe),{width:Bn,height:Nn,position:"relative"});return te.createElement("div",{className:"my-monaco-editor",ref:Rt,style:qn,onFocus:()=>{St&&tn()}},$t&&te.createElement(qe.CopyToClipboard,{text:ee,onCopy:()=>vt.ZP.success("\u590D\u5236\u6210\u529F")},te.createElement(We.Z,{title:"\u590D\u5236\u4EE3\u7801"},te.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},te.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function jt({width:it="100%",height:Gt="100%",original:mt,modified:se,language:ee,options:z={}}){const oe=(0,te.useRef)(),[le,re]=(0,te.useState)(null);function Ee(ct){let St;return oe.current&&(St=new ot.Z(Ft=>{for(let Pt of Ft)(Pt.target.offsetHeight>0||Pt.target.offsetWidth>0)&&ct.layout()}),St.observe(oe.current)),St}(0,te.useEffect)(()=>(oe.current&&Promise.all([ie.e(8909),ie.e(9404)]).then(ie.bind(ie,2550)).then(ct=>{bt=ct;const St=bt.editor.createDiffEditor(oe.current,rn(Nt({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}));re(St);let Ft=Ee(St);return()=>{St.dispose();const Pt=St.getModel();Pt&&Pt.dispose(),Ft.unobserve(oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,te.useEffect)(()=>{le&&le.setModel({original:bt.editor.createModel(mt,ee),modified:bt.editor.createModel(se,ee)})},[mt,se,ee,le]);const at=Je(it),$t=Je(Gt),Ye={width:at,height:$t};return te.createElement("div",{className:"my-diff-editor",ref:oe,style:Ye})}},79006:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return ot}});var te=ie(59301);function ot(me,Ge){const xe=(0,te.useRef)();(0,te.useEffect)(()=>{xe.current=me}),(0,te.useEffect)(()=>{function Ce(){xe.current()}if(Ge!==null){let ze=setInterval(Ce,Ge);return()=>clearInterval(ze)}},[Ge])}},6755:function(en,Ht,ie){"use strict";ie.d(Ht,{$J:function(){return me},JZ:function(){return xe},bN:function(){return ze},jP:function(){return Ce},rO:function(){return Ge}});var te=ie(49317),ot=(Ke,ke,fe)=>new Promise((Qe,be)=>{var xt=He=>{try{Re(fe.next(He))}catch(Ie){be(Ie)}},rt=He=>{try{Re(fe.throw(He))}catch(Ie){be(Ie)}},Re=He=>He.done?Qe(He.value):Promise.resolve(He.value).then(xt,rt);Re((fe=fe.apply(Ke,ke)).next())});function me(Ke){return(0,te.U2)(`libraries/${Ke}.json`)}function Ge(){return(0,te.U2)("library_tags.json")}function xe(Ke){return ot(this,null,function*(){return(yield(0,te.IV)(`attachments/${Ke}.json`)).status===0})}function Ce(Ke){return(0,te.v_)("libraries.json",Ke)}function ze(Ke,ke){return(0,te.gz)(`libraries/${Ke}.json`,ke)}},54174:function(en,Ht,ie){"use strict";ie.r(Ht);var te=ie(57940),ot=ie(78130),me=ie(28284),Ge=ie(6767),xe=ie(7939),Ce=ie(59301),ze=ie(44283),Ke=ie(49317),ke=Object.defineProperty,fe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Re=(yt,ft,nt)=>ft in yt?ke(yt,ft,{enumerable:!0,configurable:!0,writable:!0,value:nt}):yt[ft]=nt,He=(yt,ft)=>{for(var nt in ft||(ft={}))xt.call(ft,nt)&&Re(yt,nt,ft[nt]);if(be)for(var nt of be(ft))rt.call(ft,nt)&&Re(yt,nt,ft[nt]);return yt},Ie=(yt,ft)=>fe(yt,Qe(ft)),ut=(yt,ft,nt)=>new Promise((vt,We)=>{var At=Mt=>{try{qe(nt.next(Mt))}catch(Ve){We(Ve)}},st=Mt=>{try{qe(nt.throw(Mt))}catch(Ve){We(Ve)}},qe=Mt=>Mt.done?vt(Mt.value):Promise.resolve(Mt.value).then(At,st);qe((nt=nt.apply(yt,ft)).next())});const gt=()=>{const yt=(0,ze.useParams)(),[ft]=me.default.useForm(),[nt]=(0,ze.useSearchParams)();return(0,Ce.useEffect)(()=>{ut(void 0,null,function*(){var vt,We,At,st;let qe=yield(0,Ke.ZP)(`/api/tasks/${yt.taskId}/submission_logs.json`,{method:"get",params:{page:1,limit:10}});(qe==null?void 0:qe.status)===0&&ft.setFieldsValue(Ie(He({},((We=(vt=qe==null?void 0:qe.data)==null?void 0:vt.list)==null?void 0:We[0])||{}),{attachment_ids:(0,te.z)(((st=(At=qe==null?void 0:qe.data)==null?void 0:At.student_work_test_result_info)==null?void 0:st.test_result_files)||[])}))})},[]),Ce.createElement("div",{className:"edu-container py-10px"},Ce.createElement("div",{className:"bg-white py-20px px-30px rounded-4px"},Ce.createElement(me.default,{form:ft,className:"pt-30px",colon:!1,layout:"vertical",onFinish:vt=>ut(void 0,null,function*(){var We;console.log("allValue",vt),vt.attachment_ids=(We=vt.attachment_ids)==null?void 0:We.map(st=>{var qe;return(qe=st==null?void 0:st.response)==null?void 0:qe.id});const At=yield(0,Ke.ZP)("/api/student_work_test_results.json",{method:"post",body:Ie(He({},vt),{game_id:nt.get("challengeid")})});(At==null?void 0:At.status)==0&&(Ge.ZP.success("\u63D0\u4EA4\u6210\u529F"),ze.history.push(`/tasks/${yt.taskId}${localStorage.getItem("tasksurl")}`))})},Ce.createElement(me.default.Item,{label:"\u5B9E\u9A8C\u7ED3\u679C",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u9A8C\u7ED3\u679C"}]},Ce.createElement(ot.h,{scrollId:"",placeholder:"\u8BF7\u8F93\u5165\u5B9E\u9A8C\u7ED3\u679C"})),Ce.createElement(me.default.Item,{name:"attachment_ids"},Ce.createElement(te.Z,{maxSize:300,realTimeRemove:!1,uploadText:"\u652F\u6301\u6269\u5C55\u540D\uFF1A.jpg .png .doc .docx .pdf .mp4\u7B49\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927300MB"})),Ce.createElement("div",{className:"flex item-center gap-20px"},Ce.createElement(xe.ZP,{style:{width:138},type:"primary",size:"large",htmlType:"submit"},"\u4FDD\u5B58"),Ce.createElement(xe.ZP,{style:{width:138},size:"large",onClick:()=>{ze.history.push(`/tasks/${yt.taskId}${localStorage.getItem("tasksurl")}`)}},"\u53D6\u6D88")))))};Ht.default=gt},20047:function(en,Ht,ie){"use strict";ie.d(Ht,{AL:function(){return ft},Iy:function(){return Qe},Qv:function(){return rt},ez:function(){return yt},jb:function(){return be}});var te=ie(32834),ot=ie.n(te),me=ie(11690),Ge=ie.n(me);let xe=1;function Ce(st,qe){const Mt=st.match(/^(\s+)(?:```)/);if(Mt===null)return qe;const Ve=Mt[1];return qe.split(`
|
|
|
`).map(pt=>{const ht=pt.match(/^\s+/);if(ht===null)return pt;const[ve]=ht;return ve.length>=Ve.length?pt.slice(Ve.length):pt}).join(`
|
|
|
`)}let ze=[],Ke=["<ul>"];const ke=new(ot()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Qe(){ze.length=0,Ke=["<ul>"]}const be={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xt(st,qe,Mt,Ve){if(qe>=st.length||st[qe].level<=Mt)return qe;var pt=st[qe];Ve.push("<li><a href='#"+xe+pt.anchor+"'>"+pt.text+"</a>"),qe++;var ht=[];return qe=xt(st,qe,pt.level,ht),ht.length>0&&(Ve.push("<ul>"),ht.forEach(function(ve){Ve.push(ve)}),Ve.push("</ul>")),Ve.push("</li>"),qe=xt(st,qe,Mt,Ve),qe}function rt(){return xt(ze,0,0,Ke),Ke.push("</ul>"),Ke.join("")}const Re={heading(st){const qe=fe.exec(st);if(xe+=1,qe)return{type:"heading",raw:qe[0],depth:qe[1].length,text:qe[2]}},fences(st){const qe=this.rules.block.fences.exec(st);if(qe){const Mt=qe[0];let Ve=Ce(Mt,qe[3]||"");const pt=qe[2]?qe[2].trim():qe[2];if(["latex","katex","math"].indexOf(pt)>=0){const ht=ut(),ve=Ve;Ve=ht,gt[ht]={type:"block",expression:ve}}return{type:"code",raw:Mt,lang:pt,text:Ve}}}},He=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ie=0;const ut=()=>`__special_katext_id_${Ie++}__`;let gt={};function yt(){return gt}function ft(){Ie=0,gt={}}function nt(st){return st=st.replace(He,(qe,Mt)=>{const Ve=ut();return gt[Ve]={type:"inline",expression:Mt},Ve}),st}const vt=ke.listitem;ke.listitem=function(st){return vt(nt(st))};const We=ke.paragraph;ke.paragraph=function(st){return We(nt(st))};const At=ke.tablecell;ke.tablecell=function(st,qe){return At(nt(st),qe)},ke.code=function(st,qe,Mt){const Ve=(qe||"").match(/\S*/)[0];return Ve?["latex","katex","math"].indexOf(Ve)>=0?`<p class='editormd-tex'>${st}</p>`:`<pre class="prettyprint linenums"><code class="language-${qe}">${Mt?st:(0,me.escape)(st,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Mt?st:(0,me.escape)(st,!0))+"</code></pre>"},ke.heading=function(st,qe,Mt){let Ve=this.options.headerPrefix+Mt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ze.push({anchor:Ve,level:qe,text:st}),"<h"+qe+' id="'+xe+Ve+'">'+st+"</h"+qe+">"},ot().setOptions({silent:!0,gfm:!0,pedantic:!1}),ot().use({tokenizer:Re,renderer:ke}),Ht.ZP=ot()},86013:function(en,Ht,ie){"use strict";var te=ie(59301),ot=ie(19248);const me=Ge=>{let xe;return typeof Ge=="object"&&(Ge!=null&&Ge.clearIcon)?xe=Ge:Ge&&(xe={clearIcon:te.createElement(ot.Z,null)}),xe};Ht.Z=me},38406:function(en,Ht,ie){"use strict";var te=ie(59301),ot=ie(48755),me=ie(584);const Ge=xe=>{const{componentName:Ce}=xe,{getPrefixCls:ze}=(0,te.useContext)(ot.E_),Ke=ze("empty");switch(Ce){case"Table":case"List":return te.createElement(me.Z,{image:me.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return te.createElement(me.Z,{image:me.Z.PRESENTED_IMAGE_SIMPLE,className:`${Ke}-small`});case"Table.filter":return null;default:return te.createElement(me.Z,null)}};Ht.Z=Ge},36207:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return $t}});var te=ie(59301),ot=ie(92310),me=ie.n(ot),Ge=ie(85899),xe=ie(72190),Ce=ie(43403),ze=ie(34280),Ke=te.createContext(null),ke=te.createContext({}),fe=Ke,Qe=ie(18642),be=ie(60499),xt=ie(77900),rt=ie(10228),Re=ie(26112),He=ie(42244),Ie=ie(8654),ut=["prefixCls","className","containerRef"],gt=function(ct){var St=ct.prefixCls,Ft=ct.className,Pt=ct.containerRef,Qt=(0,He.Z)(ct,ut),Jt=te.useContext(ke),Ut=Jt.panel,Sn=(0,Ie.x1)(Ut,Pt);return te.createElement("div",(0,be.Z)({className:me()("".concat(St,"-content"),Ft),role:"dialog",ref:Sn},(0,Re.Z)(ct,{aria:!0}),{"aria-modal":"true"},Qt))},yt=gt,ft=ie(48736);function nt(Ye){return typeof Ye=="string"&&String(Number(Ye))===Ye?((0,ft.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ye)):Ye}function vt(Ye){warning(!("wrapperClassName"in Ye),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ye.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 At(Ye,ct){var St,Ft,Pt,Qt=Ye.prefixCls,Jt=Ye.open,Ut=Ye.placement,Sn=Ye.inline,on=Ye.push,gn=Ye.forceRender,kt=Ye.autoFocus,Mn=Ye.keyboard,nn=Ye.classNames,Me=Ye.rootClassName,et=Ye.rootStyle,Lt=Ye.zIndex,Rt=Ye.className,Se=Ye.id,$e=Ye.style,lt=Ye.motion,Tt=Ye.width,Wt=Ye.height,ln=Ye.children,Dn=Ye.mask,In=Ye.maskClosable,dn=Ye.maskMotion,Cn=Ye.maskClassName,fn=Ye.maskStyle,$n=Ye.afterOpenChange,yn=Ye.onClose,hn=Ye.onMouseEnter,qt=Ye.onMouseOver,Pn=Ye.onMouseLeave,pn=Ye.onClick,Ln=Ye.onKeyDown,Gn=Ye.onKeyUp,jn=Ye.styles,Bn=Ye.drawerRender,Xn=te.useRef(),Nn=te.useRef(),ar=te.useRef();te.useImperativeHandle(ct,function(){return Xn.current});var qn=function(Le){var Te=Le.keyCode,Ue=Le.shiftKey;switch(Te){case rt.Z.TAB:{if(Te===rt.Z.TAB){if(!Ue&&document.activeElement===ar.current){var Vt;(Vt=Nn.current)===null||Vt===void 0||Vt.focus({preventScroll:!0})}else if(Ue&&document.activeElement===Nn.current){var zt;(zt=ar.current)===null||zt===void 0||zt.focus({preventScroll:!0})}}break}case rt.Z.ESC:{yn&&Mn&&(Le.stopPropagation(),yn(Le));break}}};te.useEffect(function(){if(Jt&&kt){var Ze;(Ze=Xn.current)===null||Ze===void 0||Ze.focus({preventScroll:!0})}},[Jt]);var It=te.useState(!1),Xt=(0,xe.Z)(It,2),zn=Xt[0],nr=Xt[1],De=te.useContext(fe),_e;typeof on=="boolean"?_e=on?{}:{distance:0}:_e=on||{};var ge=(St=(Ft=(Pt=_e)===null||Pt===void 0?void 0:Pt.distance)!==null&&Ft!==void 0?Ft:De==null?void 0:De.pushDistance)!==null&&St!==void 0?St:180,Pe=te.useMemo(function(){return{pushDistance:ge,push:function(){nr(!0)},pull:function(){nr(!1)}}},[ge]);te.useEffect(function(){if(Jt){var Ze;De==null||(Ze=De.push)===null||Ze===void 0||Ze.call(De)}else{var Le;De==null||(Le=De.pull)===null||Le===void 0||Le.call(De)}},[Jt]),te.useEffect(function(){return function(){var Ze;De==null||(Ze=De.pull)===null||Ze===void 0||Ze.call(De)}},[]);var ye=Dn&&te.createElement(xt.default,(0,be.Z)({key:"mask"},dn,{visible:Jt}),function(Ze,Le){var Te=Ze.className,Ue=Ze.style;return te.createElement("div",{className:me()("".concat(Qt,"-mask"),Te,nn==null?void 0:nn.mask,Cn),style:(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({},Ue),fn),jn==null?void 0:jn.mask),onClick:In&&Jt?yn:void 0,ref:Le})}),Oe=typeof lt=="function"?lt(Ut):lt,pe={};if(zn&&ge)switch(Ut){case"top":pe.transform="translateY(".concat(ge,"px)");break;case"bottom":pe.transform="translateY(".concat(-ge,"px)");break;case"left":pe.transform="translateX(".concat(ge,"px)");break;default:pe.transform="translateX(".concat(-ge,"px)");break}Ut==="left"||Ut==="right"?pe.width=nt(Tt):pe.height=nt(Wt);var Fe={onMouseEnter:hn,onMouseOver:qt,onMouseLeave:Pn,onClick:pn,onKeyDown:Ln,onKeyUp:Gn},je=te.createElement(xt.default,(0,be.Z)({key:"panel"},Oe,{visible:Jt,forceRender:gn,onVisibleChanged:function(Le){$n==null||$n(Le)},removeOnLeave:!1,leavedClassName:"".concat(Qt,"-content-wrapper-hidden")}),function(Ze,Le){var Te=Ze.className,Ue=Ze.style,Vt=te.createElement(yt,(0,be.Z)({id:Se,containerRef:Le,prefixCls:Qt,className:me()(Rt,nn==null?void 0:nn.content),style:(0,Ge.Z)((0,Ge.Z)({},$e),jn==null?void 0:jn.content)},(0,Re.Z)(Ye,{aria:!0}),Fe),ln);return te.createElement("div",(0,be.Z)({className:me()("".concat(Qt,"-content-wrapper"),nn==null?void 0:nn.wrapper,Te),style:(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({},pe),Ue),jn==null?void 0:jn.wrapper)},(0,Re.Z)(Ye,{data:!0})),Bn?Bn(Vt):Vt)}),tt=(0,Ge.Z)({},et);return Lt&&(tt.zIndex=Lt),te.createElement(fe.Provider,{value:Pe},te.createElement("div",{className:me()(Qt,"".concat(Qt,"-").concat(Ut),Me,(0,Qe.Z)((0,Qe.Z)({},"".concat(Qt,"-open"),Jt),"".concat(Qt,"-inline"),Sn)),style:tt,tabIndex:-1,ref:Xn,onKeyDown:qn},ye,te.createElement("div",{tabIndex:0,ref:Nn,style:We,"aria-hidden":"true","data-sentinel":"start"}),je,te.createElement("div",{tabIndex:0,ref:ar,style:We,"aria-hidden":"true","data-sentinel":"end"})))}var st=te.forwardRef(At),qe=st,Mt=function(ct){var St=ct.open,Ft=St===void 0?!1:St,Pt=ct.prefixCls,Qt=Pt===void 0?"rc-drawer":Pt,Jt=ct.placement,Ut=Jt===void 0?"right":Jt,Sn=ct.autoFocus,on=Sn===void 0?!0:Sn,gn=ct.keyboard,kt=gn===void 0?!0:gn,Mn=ct.width,nn=Mn===void 0?378:Mn,Me=ct.mask,et=Me===void 0?!0:Me,Lt=ct.maskClosable,Rt=Lt===void 0?!0:Lt,Se=ct.getContainer,$e=ct.forceRender,lt=ct.afterOpenChange,Tt=ct.destroyOnClose,Wt=ct.onMouseEnter,ln=ct.onMouseOver,Dn=ct.onMouseLeave,In=ct.onClick,dn=ct.onKeyDown,Cn=ct.onKeyUp,fn=ct.panelRef,$n=te.useState(!1),yn=(0,xe.Z)($n,2),hn=yn[0],qt=yn[1],Pn=te.useState(!1),pn=(0,xe.Z)(Pn,2),Ln=pn[0],Gn=pn[1];(0,ze.Z)(function(){Gn(!0)},[]);var jn=Ln?Ft:!1,Bn=te.useRef(),Xn=te.useRef();(0,ze.Z)(function(){jn&&(Xn.current=document.activeElement)},[jn]);var Nn=function(zn){var nr;if(qt(zn),lt==null||lt(zn),!zn&&Xn.current&&!((nr=Bn.current)!==null&&nr!==void 0&&nr.contains(Xn.current))){var De;(De=Xn.current)===null||De===void 0||De.focus({preventScroll:!0})}},ar=te.useMemo(function(){return{panel:fn}},[fn]);if(!$e&&!hn&&!jn&&Tt)return null;var qn={onMouseEnter:Wt,onMouseOver:ln,onMouseLeave:Dn,onClick:In,onKeyDown:dn,onKeyUp:Cn},It=(0,Ge.Z)((0,Ge.Z)({},ct),{},{open:jn,prefixCls:Qt,placement:Ut,autoFocus:on,keyboard:kt,width:nn,mask:et,maskClosable:Rt,inline:Se===!1,afterOpenChange:Nn,ref:Bn},qn);return te.createElement(ke.Provider,{value:ar},te.createElement(Ce.Z,{open:jn||$e||hn,autoDestroy:!1,getContainer:Se,autoLock:et&&(jn||hn)},te.createElement(qe,It)))},Ve=Mt,pt=Ve,ht=ie(62487),ve=ie(75030),Bt=ie(86641),Ae=ie(55743),Nt=ie(48755),rn=ie(91190),we=ie(78776),de=ie(458),wt=Ye=>{var ct,St;const{prefixCls:Ft,title:Pt,footer:Qt,extra:Jt,loading:Ut,onClose:Sn,headerStyle:on,bodyStyle:gn,footerStyle:kt,children:Mn,classNames:nn,styles:Me}=Ye,et=(0,Nt.dj)("drawer"),Lt=te.useCallback(Tt=>te.createElement("button",{type:"button",onClick:Sn,"aria-label":"Close",className:`${Ft}-close`},Tt),[Sn]),[Rt,Se]=(0,we.Z)((0,we.w)(Ye),(0,we.w)(et),{closable:!0,closeIconRender:Lt}),$e=te.useMemo(()=>{var Tt,Wt;return!Pt&&!Rt?null:te.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(Tt=et.styles)===null||Tt===void 0?void 0:Tt.header),on),Me==null?void 0:Me.header),className:me()(`${Ft}-header`,{[`${Ft}-header-close-only`]:Rt&&!Pt&&!Jt},(Wt=et.classNames)===null||Wt===void 0?void 0:Wt.header,nn==null?void 0:nn.header)},te.createElement("div",{className:`${Ft}-header-title`},Se,Pt&&te.createElement("div",{className:`${Ft}-title`},Pt)),Jt&&te.createElement("div",{className:`${Ft}-extra`},Jt))},[Rt,Se,Jt,on,Ft,Pt]),lt=te.useMemo(()=>{var Tt,Wt;if(!Qt)return null;const ln=`${Ft}-footer`;return te.createElement("div",{className:me()(ln,(Tt=et.classNames)===null||Tt===void 0?void 0:Tt.footer,nn==null?void 0:nn.footer),style:Object.assign(Object.assign(Object.assign({},(Wt=et.styles)===null||Wt===void 0?void 0:Wt.footer),kt),Me==null?void 0:Me.footer)},Qt)},[Qt,kt,Ft]);return te.createElement(te.Fragment,null,$e,te.createElement("div",{className:me()(`${Ft}-body`,nn==null?void 0:nn.body,(ct=et.classNames)===null||ct===void 0?void 0:ct.body),style:Object.assign(Object.assign(Object.assign({},(St=et.styles)===null||St===void 0?void 0:St.body),gn),Me==null?void 0:Me.body)},Ut?te.createElement(de.Z,{active:!0,title:!1,paragraph:{rows:5},className:`${Ft}-body-skeleton`}):Mn),lt)},Et=ie(36237),Be=ie(63356),dt=ie(16931),bt=ie(51636);const tn=Ye=>{const ct="100%";return{left:`translateX(-${ct})`,right:`translateX(${ct})`,top:`translateY(-${ct})`,bottom:`translateY(${ct})`}[Ye]},Ot=(Ye,ct)=>({"&-enter, &-appear":Object.assign(Object.assign({},Ye),{"&-active":ct}),"&-leave":Object.assign(Object.assign({},ct),{"&-active":Ye})}),jt=(Ye,ct)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${ct}`}}},Ot({opacity:Ye},{opacity:1})),it=(Ye,ct)=>[jt(.7,ct),Ot({transform:tn(Ye)},{transform:"none"})];var mt=Ye=>{const{componentCls:ct,motionDurationSlow:St}=Ye;return{[ct]:{[`${ct}-mask-motion`]:jt(0,St),[`${ct}-panel-motion`]:["left","right","top","bottom"].reduce((Ft,Pt)=>Object.assign(Object.assign({},Ft),{[`&-${Pt}`]:it(Pt,St)}),{})}}};const se=Ye=>{const{borderRadiusSM:ct,componentCls:St,zIndexPopup:Ft,colorBgMask:Pt,colorBgElevated:Qt,motionDurationSlow:Jt,motionDurationMid:Ut,paddingXS:Sn,padding:on,paddingLG:gn,fontSizeLG:kt,lineHeightLG:Mn,lineWidth:nn,lineType:Me,colorSplit:et,marginXS:Lt,colorIcon:Rt,colorIconHover:Se,colorBgTextHover:$e,colorBgTextActive:lt,colorText:Tt,fontWeightStrong:Wt,footerPaddingBlock:ln,footerPaddingInline:Dn,calc:In}=Ye,dn=`${St}-content-wrapper`;return{[St]:{position:"fixed",inset:0,zIndex:Ft,pointerEvents:"none",color:Tt,"&-pure":{position:"relative",background:Qt,display:"flex",flexDirection:"column",[`&${St}-left`]:{boxShadow:Ye.boxShadowDrawerLeft},[`&${St}-right`]:{boxShadow:Ye.boxShadowDrawerRight},[`&${St}-top`]:{boxShadow:Ye.boxShadowDrawerUp},[`&${St}-bottom`]:{boxShadow:Ye.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${St}-mask`]:{position:"absolute",inset:0,zIndex:Ft,background:Pt,pointerEvents:"auto"},[dn]:{position:"absolute",zIndex:Ft,maxWidth:"100vw",transition:`all ${Jt}`,"&-hidden":{display:"none"}},[`&-left > ${dn}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Ye.boxShadowDrawerLeft},[`&-right > ${dn}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Ye.boxShadowDrawerRight},[`&-top > ${dn}`]:{top:0,insetInline:0,boxShadow:Ye.boxShadowDrawerUp},[`&-bottom > ${dn}`]:{bottom:0,insetInline:0,boxShadow:Ye.boxShadowDrawerDown},[`${St}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:Qt,pointerEvents:"auto"},[`${St}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,Et.unit)(on)} ${(0,Et.unit)(gn)}`,fontSize:kt,lineHeight:Mn,borderBottom:`${(0,Et.unit)(nn)} ${Me} ${et}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${St}-extra`]:{flex:"none"},[`${St}-close`]:Object.assign({display:"inline-flex",width:In(kt).add(Sn).equal(),height:In(kt).add(Sn).equal(),borderRadius:ct,justifyContent:"center",alignItems:"center",marginInlineEnd:Lt,color:Rt,fontWeight:Wt,fontSize:kt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${Ut}`,textRendering:"auto","&:hover":{color:Se,backgroundColor:$e,textDecoration:"none"},"&:active":{backgroundColor:lt}},(0,Be.Qy)(Ye)),[`${St}-title`]:{flex:1,margin:0,fontWeight:Ye.fontWeightStrong,fontSize:kt,lineHeight:Mn},[`${St}-body`]:{flex:1,minWidth:0,minHeight:0,padding:gn,overflow:"auto",[`${St}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${St}-footer`]:{flexShrink:0,padding:`${(0,Et.unit)(ln)} ${(0,Et.unit)(Dn)}`,borderTop:`${(0,Et.unit)(nn)} ${Me} ${et}`},"&-rtl":{direction:"rtl"}}}},ee=Ye=>({zIndexPopup:Ye.zIndexPopupBase,footerPaddingBlock:Ye.paddingXS,footerPaddingInline:Ye.padding});var z=(0,dt.I$)("Drawer",Ye=>{const ct=(0,bt.mergeToken)(Ye,{});return[se(ct),mt(ct)]},ee),oe=function(Ye,ct){var St={};for(var Ft in Ye)Object.prototype.hasOwnProperty.call(Ye,Ft)&&ct.indexOf(Ft)<0&&(St[Ft]=Ye[Ft]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,Ft=Object.getOwnPropertySymbols(Ye);Pt<Ft.length;Pt++)ct.indexOf(Ft[Pt])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Ft[Pt])&&(St[Ft[Pt]]=Ye[Ft[Pt]]);return St};const le=null,re={distance:180},Ee=Ye=>{var ct;const{rootClassName:St,width:Ft,height:Pt,size:Qt="default",mask:Jt=!0,push:Ut=re,open:Sn,afterOpenChange:on,onClose:gn,prefixCls:kt,getContainer:Mn,style:nn,className:Me,visible:et,afterVisibleChange:Lt,maskStyle:Rt,drawerStyle:Se,contentWrapperStyle:$e}=Ye,lt=oe(Ye,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle"]),{getPopupContainer:Tt,getPrefixCls:Wt,direction:ln,className:Dn,style:In,classNames:dn,styles:Cn}=(0,Nt.dj)("drawer"),fn=Wt("drawer",kt),[$n,yn,hn]=z(fn),qt=Mn===void 0&&Tt?()=>Tt(document.body):Mn,Pn=me()({"no-mask":!Jt,[`${fn}-rtl`]:ln==="rtl"},St,yn,hn),pn=te.useMemo(()=>Ft!=null?Ft:Qt==="large"?736:378,[Ft,Qt]),Ln=te.useMemo(()=>Pt!=null?Pt:Qt==="large"?736:378,[Pt,Qt]),Gn={motionName:(0,Bt.m)(fn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},jn=It=>({motionName:(0,Bt.m)(fn,`panel-motion-${It}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Bn=(0,rn.H)(),[Xn,Nn]=(0,ve.Cn)("Drawer",lt.zIndex),{classNames:ar={},styles:qn={}}=lt;return $n(te.createElement(ht.Z,{form:!0,space:!0},te.createElement(Ae.Z.Provider,{value:Nn},te.createElement(pt,Object.assign({prefixCls:fn,onClose:gn,maskMotion:Gn,motion:jn},lt,{classNames:{mask:me()(ar.mask,dn.mask),content:me()(ar.content,dn.content),wrapper:me()(ar.wrapper,dn.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},qn.mask),Rt),Cn.mask),content:Object.assign(Object.assign(Object.assign({},qn.content),Se),Cn.content),wrapper:Object.assign(Object.assign(Object.assign({},qn.wrapper),$e),Cn.wrapper)},open:Sn!=null?Sn:et,mask:Jt,push:Ut,width:pn,height:Ln,style:Object.assign(Object.assign({},In),nn),className:me()(Dn,Me),rootClassName:Pn,getContainer:qt,afterOpenChange:on!=null?on:Lt,panelRef:Bn,zIndex:Xn}),te.createElement(wt,Object.assign({prefixCls:fn},lt,{onClose:gn}))))))},at=Ye=>{const{prefixCls:ct,style:St,className:Ft,placement:Pt="right"}=Ye,Qt=oe(Ye,["prefixCls","style","className","placement"]),{getPrefixCls:Jt}=te.useContext(Nt.E_),Ut=Jt("drawer",ct),[Sn,on,gn]=z(Ut),kt=me()(Ut,`${Ut}-pure`,`${Ut}-${Pt}`,on,gn,Ft);return Sn(te.createElement("div",{className:kt,style:St},te.createElement(wt,Object.assign({prefixCls:Ut},Qt))))};Ee._InternalPanelDoNotUseOrYouWillBeFired=at;var $t=Ee},584:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return yt}});var te=ie(59301),ot=ie(92310),me=ie.n(ot),Ge=ie(9017),xe=ie(17835),Ce=ie(57700),Ke=()=>{const[,ft]=(0,Ce.ZP)(),[nt]=(0,Ge.Z)("Empty"),We=new xe.FastColor(ft.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return te.createElement("svg",{style:We,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},te.createElement("title",null,(nt==null?void 0:nt.description)||"Empty"),te.createElement("g",{fill:"none",fillRule:"evenodd"},te.createElement("g",{transform:"translate(24 31.67)"},te.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),te.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"}),te.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)"}),te.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"}),te.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"})),te.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"}),te.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},te.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),te.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},fe=()=>{const[,ft]=(0,Ce.ZP)(),[nt]=(0,Ge.Z)("Empty"),{colorFill:vt,colorFillTertiary:We,colorFillQuaternary:At,colorBgContainer:st}=ft,{borderColor:qe,shadowColor:Mt,contentColor:Ve}=(0,te.useMemo)(()=>({borderColor:new xe.FastColor(vt).onBackground(st).toHexString(),shadowColor:new xe.FastColor(We).onBackground(st).toHexString(),contentColor:new xe.FastColor(At).onBackground(st).toHexString()}),[vt,We,At,st]);return te.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},te.createElement("title",null,(nt==null?void 0:nt.description)||"Empty"),te.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},te.createElement("ellipse",{fill:Mt,cx:"32",cy:"33",rx:"32",ry:"7"}),te.createElement("g",{fillRule:"nonzero",stroke:qe},te.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"}),te.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:Ve}))))},Qe=ie(16931),be=ie(51636);const xt=ft=>{const{componentCls:nt,margin:vt,marginXS:We,marginXL:At,fontSize:st,lineHeight:qe}=ft;return{[nt]:{marginInline:We,fontSize:st,lineHeight:qe,textAlign:"center",[`${nt}-image`]:{height:ft.emptyImgHeight,marginBottom:We,opacity:ft.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${nt}-description`]:{color:ft.colorTextDescription},[`${nt}-footer`]:{marginTop:vt},"&-normal":{marginBlock:At,color:ft.colorTextDescription,[`${nt}-description`]:{color:ft.colorTextDescription},[`${nt}-image`]:{height:ft.emptyImgHeightMD}},"&-small":{marginBlock:We,color:ft.colorTextDescription,[`${nt}-image`]:{height:ft.emptyImgHeightSM}}}}};var rt=(0,Qe.I$)("Empty",ft=>{const{componentCls:nt,controlHeightLG:vt,calc:We}=ft,At=(0,be.mergeToken)(ft,{emptyImgCls:`${nt}-img`,emptyImgHeight:We(vt).mul(2.5).equal(),emptyImgHeightMD:vt,emptyImgHeightSM:We(vt).mul(.875).equal()});return[xt(At)]}),Re=ie(48755),He=function(ft,nt){var vt={};for(var We in ft)Object.prototype.hasOwnProperty.call(ft,We)&&nt.indexOf(We)<0&&(vt[We]=ft[We]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,We=Object.getOwnPropertySymbols(ft);At<We.length;At++)nt.indexOf(We[At])<0&&Object.prototype.propertyIsEnumerable.call(ft,We[At])&&(vt[We[At]]=ft[We[At]]);return vt};const Ie=te.createElement(Ke,null),ut=te.createElement(fe,null),gt=ft=>{const{className:nt,rootClassName:vt,prefixCls:We,image:At=Ie,description:st,children:qe,imageStyle:Mt,style:Ve,classNames:pt,styles:ht}=ft,ve=He(ft,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:Bt,direction:Ae,className:Nt,style:rn,classNames:we,styles:de}=(0,Re.dj)("empty"),Je=Bt("empty",We),[wt,Et,Be]=rt(Je),[dt]=(0,Ge.Z)("Empty"),bt=typeof st!="undefined"?st:dt==null?void 0:dt.description,tn=typeof bt=="string"?bt:"empty";let Ot=null;return typeof At=="string"?Ot=te.createElement("img",{alt:tn,src:At}):Ot=At,wt(te.createElement("div",Object.assign({className:me()(Et,Be,Je,Nt,{[`${Je}-normal`]:At===ut,[`${Je}-rtl`]:Ae==="rtl"},nt,vt,we.root,pt==null?void 0:pt.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},de.root),rn),ht==null?void 0:ht.root),Ve)},ve),te.createElement("div",{className:me()(`${Je}-image`,we.image,pt==null?void 0:pt.image),style:Object.assign(Object.assign(Object.assign({},Mt),de.image),ht==null?void 0:ht.image)},Ot),bt&&te.createElement("div",{className:me()(`${Je}-description`,we.description,pt==null?void 0:pt.description),style:Object.assign(Object.assign({},de.description),ht==null?void 0:ht.description)},bt),qe&&te.createElement("div",{className:me()(`${Je}-footer`,we.footer,pt==null?void 0:pt.footer),style:Object.assign(Object.assign({},de.footer),ht==null?void 0:ht.footer)},qe)))};gt.PRESENTED_IMAGE_DEFAULT=Ie,gt.PRESENTED_IMAGE_SIMPLE=ut;var yt=gt},28284:function(en,Ht,ie){"use strict";ie.d(Ht,{default:function(){return _e}});var te=ie(56553),ot=ie(77654),me=ie(59301),Ge=ie(92310),xe=ie.n(Ge),Ce=ie(77900),ze=ie(86641),Ke=ie(83397);function ke(ge){const[Pe,ye]=me.useState(ge);return me.useEffect(()=>{const Oe=setTimeout(()=>{ye(ge)},ge.length?0:10);return()=>{clearTimeout(Oe)}},[ge]),Pe}var fe=ie(36237),Qe=ie(63356),be=ie(34925),xt=ie(34961),rt=ie(51636),Re=ie(16931),Ie=ge=>{const{componentCls:Pe}=ge,ye=`${Pe}-show-help`,Oe=`${Pe}-show-help-item`;return{[ye]:{transition:`opacity ${ge.motionDurationFast} ${ge.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Oe]:{overflow:"hidden",transition:`height ${ge.motionDurationFast} ${ge.motionEaseInOut},
|
|
|
opacity ${ge.motionDurationFast} ${ge.motionEaseInOut},
|
|
|
transform ${ge.motionDurationFast} ${ge.motionEaseInOut} !important`,[`&${Oe}-appear, &${Oe}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Oe}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ut=ge=>({legend:{display:"block",width:"100%",marginBottom:ge.marginLG,padding:0,color:ge.colorTextDescription,fontSize:ge.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,fe.unit)(ge.lineWidth)} ${ge.lineType} ${ge.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,fe.unit)(ge.controlOutlineWidth)} ${ge.controlOutline}`},output:{display:"block",paddingTop:15,color:ge.colorText,fontSize:ge.fontSize,lineHeight:ge.lineHeight}}),gt=(ge,Pe)=>{const{formItemCls:ye}=ge;return{[ye]:{[`${ye}-label > label`]:{height:Pe},[`${ye}-control-input`]:{minHeight:Pe}}}},yt=ge=>{const{componentCls:Pe}=ge;return{[ge.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Qe.Wf)(ge)),ut(ge)),{[`${Pe}-text`]:{display:"inline-block",paddingInlineEnd:ge.paddingSM},"&-small":Object.assign({},gt(ge,ge.controlHeightSM)),"&-large":Object.assign({},gt(ge,ge.controlHeightLG))})}},ft=ge=>{const{formItemCls:Pe,iconCls:ye,rootPrefixCls:Oe,antCls:pe,labelRequiredMarkColor:Fe,labelColor:je,labelFontSize:tt,labelHeight:Ze,labelColonMarginInlineStart:Le,labelColonMarginInlineEnd:Te,itemMarginBottom:Ue}=ge;return{[Pe]:Object.assign(Object.assign({},(0,Qe.Wf)(ge)),{marginBottom:Ue,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden${pe}-row`]:{display:"none"},"&-has-warning":{[`${Pe}-split`]:{color:ge.colorError}},"&-has-error":{[`${Pe}-split`]:{color:ge.colorWarning}},[`${Pe}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:ge.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Ze,color:je,fontSize:tt,[`> ${ye}`]:{fontSize:ge.fontSize,verticalAlign:"top"},[`&${Pe}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:ge.marginXXS,color:Fe,fontSize:ge.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${Pe}-required-mark-hidden, &${Pe}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${Pe}-optional`]:{display:"inline-block",marginInlineStart:ge.marginXXS,color:ge.colorTextDescription,[`&${Pe}-required-mark-hidden`]:{display:"none"}},[`${Pe}-tooltip`]:{color:ge.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:ge.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Le,marginInlineEnd:Te},[`&${Pe}-no-colon::after`]:{content:'"\\a0"'}}},[`${Pe}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Oe}-col-'"]):not([class*="' ${Oe}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:ge.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Pe]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:ge.colorTextDescription,fontSize:ge.fontSize,lineHeight:ge.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:ge.controlHeightSM,transition:`color ${ge.motionDurationMid} ${ge.motionEaseOut}`},"&-explain":{"&-error":{color:ge.colorError},"&-warning":{color:ge.colorWarning}}},[`&-with-help ${Pe}-explain`]:{height:"auto",opacity:1},[`${Pe}-feedback-icon`]:{fontSize:ge.fontSize,textAlign:"center",visibility:"visible",animationName:be.kr,animationDuration:ge.motionDurationMid,animationTimingFunction:ge.motionEaseOutBack,pointerEvents:"none","&-success":{color:ge.colorSuccess},"&-error":{color:ge.colorError},"&-warning":{color:ge.colorWarning},"&-validating":{color:ge.colorPrimary}}})}},nt=(ge,Pe)=>{const{formItemCls:ye}=ge;return{[`${Pe}-horizontal`]:{[`${ye}-label`]:{flexGrow:0},[`${ye}-control`]:{flex:"1 1 0",minWidth:0},[`${ye}-label[class$='-24'], ${ye}-label[class*='-24 ']`]:{[`& + ${ye}-control`]:{minWidth:"unset"}}}}},vt=ge=>{const{componentCls:Pe,formItemCls:ye,inlineItemMarginBottom:Oe}=ge;return{[`${Pe}-inline`]:{display:"flex",flexWrap:"wrap",[ye]:{flex:"none",marginInlineEnd:ge.margin,marginBottom:Oe,"&-row":{flexWrap:"nowrap"},[`> ${ye}-label,
|
|
|
> ${ye}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${ye}-label`]:{flex:"none"},[`${Pe}-text`]:{display:"inline-block"},[`${ye}-has-feedback`]:{display:"inline-block"}}}}},We=ge=>({padding:ge.verticalLabelPadding,margin:ge.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),At=ge=>{const{componentCls:Pe,formItemCls:ye,rootPrefixCls:Oe}=ge;return{[`${ye} ${ye}-label`]:We(ge),[`${Pe}:not(${Pe}-inline)`]:{[ye]:{flexWrap:"wrap",[`${ye}-label, ${ye}-control`]:{[`&:not([class*=" ${Oe}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},st=ge=>{const{componentCls:Pe,formItemCls:ye,antCls:Oe}=ge;return{[`${Pe}-vertical`]:{[`${ye}:not(${ye}-horizontal)`]:{[`${ye}-row`]:{flexDirection:"column"},[`${ye}-label > label`]:{height:"auto"},[`${ye}-control`]:{width:"100%"},[`${ye}-label,
|
|
|
${Oe}-col-24${ye}-label,
|
|
|
${Oe}-col-xl-24${ye}-label`]:We(ge)}},[`@media (max-width: ${(0,fe.unit)(ge.screenXSMax)})`]:[At(ge),{[Pe]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Oe}-col-xs-24${ye}-label`]:We(ge)}}}],[`@media (max-width: ${(0,fe.unit)(ge.screenSMMax)})`]:{[Pe]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Oe}-col-sm-24${ye}-label`]:We(ge)}}},[`@media (max-width: ${(0,fe.unit)(ge.screenMDMax)})`]:{[Pe]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Oe}-col-md-24${ye}-label`]:We(ge)}}},[`@media (max-width: ${(0,fe.unit)(ge.screenLGMax)})`]:{[Pe]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Oe}-col-lg-24${ye}-label`]:We(ge)}}}}},qe=ge=>{const{formItemCls:Pe,antCls:ye}=ge;return{[`${Pe}-vertical`]:{[`${Pe}-row`]:{flexDirection:"column"},[`${Pe}-label > label`]:{height:"auto"},[`${Pe}-control`]:{width:"100%"}},[`${Pe}-vertical ${Pe}-label,
|
|
|
${ye}-col-24${Pe}-label,
|
|
|
${ye}-col-xl-24${Pe}-label`]:We(ge),[`@media (max-width: ${(0,fe.unit)(ge.screenXSMax)})`]:[At(ge),{[Pe]:{[`${ye}-col-xs-24${Pe}-label`]:We(ge)}}],[`@media (max-width: ${(0,fe.unit)(ge.screenSMMax)})`]:{[Pe]:{[`${ye}-col-sm-24${Pe}-label`]:We(ge)}},[`@media (max-width: ${(0,fe.unit)(ge.screenMDMax)})`]:{[Pe]:{[`${ye}-col-md-24${Pe}-label`]:We(ge)}},[`@media (max-width: ${(0,fe.unit)(ge.screenLGMax)})`]:{[Pe]:{[`${ye}-col-lg-24${Pe}-label`]:We(ge)}}}},Mt=ge=>({labelRequiredMarkColor:ge.colorError,labelColor:ge.colorTextHeading,labelFontSize:ge.fontSize,labelHeight:ge.controlHeight,labelColonMarginInlineStart:ge.marginXXS/2,labelColonMarginInlineEnd:ge.marginXS,itemMarginBottom:ge.marginLG,verticalLabelPadding:`0 0 ${ge.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),Ve=(ge,Pe)=>(0,rt.mergeToken)(ge,{formItemCls:`${ge.componentCls}-item`,rootPrefixCls:Pe});var pt=(0,Re.I$)("Form",(ge,Pe)=>{let{rootPrefixCls:ye}=Pe;const Oe=Ve(ge,ye);return[yt(Oe),ft(Oe),Ie(Oe),nt(Oe,Oe.componentCls),nt(Oe,Oe.formItemCls),vt(Oe),st(Oe),qe(Oe),(0,xt.Z)(Oe),be.kr]},Mt,{order:-1e3});const ht=[];function ve(ge,Pe,ye){let Oe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof ge=="string"?ge:`${Pe}-${Oe}`,error:ge,errorStatus:ye}}var Ae=ge=>{let{help:Pe,helpStatus:ye,errors:Oe=ht,warnings:pe=ht,className:Fe,fieldId:je,onVisibleChanged:tt}=ge;const{prefixCls:Ze}=me.useContext(te.Rk),Le=`${Ze}-item-explain`,Te=(0,Ke.Z)(Ze),[Ue,Vt,zt]=pt(Ze,Te),Zt=me.useMemo(()=>(0,ze.Z)(Ze),[Ze]),kn=ke(Oe),Tn=ke(pe),Hn=me.useMemo(()=>Pe!=null?[ve(Pe,"help",ye)]:[].concat((0,ot.Z)(kn.map((wn,Fn)=>ve(wn,"error","error",Fn))),(0,ot.Z)(Tn.map((wn,Fn)=>ve(wn,"warning","warning",Fn)))),[Pe,ye,kn,Tn]),En=me.useMemo(()=>{const wn={};return Hn.forEach(Fn=>{let{key:Yn}=Fn;wn[Yn]=(wn[Yn]||0)+1}),Hn.map((Fn,Yn)=>Object.assign(Object.assign({},Fn),{key:wn[Fn.key]>1?`${Fn.key}-fallback-${Yn}`:Fn.key}))},[Hn]),mn={};return je&&(mn.id=`${je}_help`),Ue(me.createElement(Ce.default,{motionDeadline:Zt.motionDeadline,motionName:`${Ze}-show-help`,visible:!!En.length,onVisibleChanged:tt},wn=>{const{className:Fn,style:Yn}=wn;return me.createElement("div",Object.assign({},mn,{className:xe()(Le,Fn,zt,Te,Fe,Vt),style:Yn}),me.createElement(Ce.CSSMotionList,Object.assign({keys:En},(0,ze.Z)(Ze),{motionName:`${Ze}-show-help-item`,component:!1}),Un=>{const{key:Kn,error:vn,errorStatus:er,className:Wn,style:dr}=Un;return me.createElement("div",{key:Kn,className:xe()(Wn,{[`${Le}-${er}`]:er}),style:dr},vn)}))}))},Nt=ie(69180),rn=ie(48755),we=ie(2171),de=ie(31756),Je=ie(23069),wt=ie(76846),Et=ie(16722);const Be=["parentNode"],dt="form_item";function bt(ge){return ge===void 0||ge===!1?[]:Array.isArray(ge)?ge:[ge]}function tn(ge,Pe){if(!ge.length)return;const ye=ge.join("_");return Pe?`${Pe}_${ye}`:Be.includes(ye)?`${dt}_${ye}`:ye}function Ot(ge,Pe,ye,Oe,pe,Fe){let je=Oe;return Fe!==void 0?je=Fe:ye.validating?je="validating":ge.length?je="error":Pe.length?je="warning":(ye.touched||pe&&ye.validated)&&(je="success"),je}var jt=function(ge,Pe){var ye={};for(var Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&Pe.indexOf(Oe)<0&&(ye[Oe]=ge[Oe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Oe=Object.getOwnPropertySymbols(ge);pe<Oe.length;pe++)Pe.indexOf(Oe[pe])<0&&Object.prototype.propertyIsEnumerable.call(ge,Oe[pe])&&(ye[Oe[pe]]=ge[Oe[pe]]);return ye};function it(ge){return bt(ge).join("_")}function Gt(ge,Pe){const ye=Pe.getFieldInstance(ge),Oe=(0,wt.bn)(ye);if(Oe)return Oe;const pe=tn(bt(ge),Pe.__INTERNAL__.name);if(pe)return document.getElementById(pe)}function mt(ge){const[Pe]=(0,Nt.useForm)(),ye=me.useRef({}),Oe=me.useMemo(()=>ge!=null?ge:Object.assign(Object.assign({},Pe),{__INTERNAL__:{itemRef:pe=>Fe=>{const je=it(pe);Fe?ye.current[je]=Fe:delete ye.current[je]}},scrollToField:function(pe){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:je}=Fe,tt=jt(Fe,["focus"]),Ze=Gt(pe,Oe);Ze&&((0,Et.Z)(Ze,Object.assign({scrollMode:"if-needed",block:"nearest"},tt)),je&&Oe.focusField(pe))},focusField:pe=>{var Fe,je;const tt=Oe.getFieldInstance(pe);typeof(tt==null?void 0:tt.focus)=="function"?tt.focus():(je=(Fe=Gt(pe,Oe))===null||Fe===void 0?void 0:Fe.focus)===null||je===void 0||je.call(Fe)},getFieldInstance:pe=>{const Fe=it(pe);return ye.current[Fe]}}),[ge,Pe]);return[Oe]}var se=ie(98350),ee=function(ge,Pe){var ye={};for(var Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&Pe.indexOf(Oe)<0&&(ye[Oe]=ge[Oe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Oe=Object.getOwnPropertySymbols(ge);pe<Oe.length;pe++)Pe.indexOf(Oe[pe])<0&&Object.prototype.propertyIsEnumerable.call(ge,Oe[pe])&&(ye[Oe[pe]]=ge[Oe[pe]]);return ye};const z=(ge,Pe)=>{const ye=me.useContext(we.Z),{getPrefixCls:Oe,direction:pe,requiredMark:Fe,colon:je,scrollToFirstError:tt,className:Ze,style:Le}=(0,rn.dj)("form"),{prefixCls:Te,className:Ue,rootClassName:Vt,size:zt,disabled:Zt=ye,form:kn,colon:Tn,labelAlign:Hn,labelWrap:En,labelCol:mn,wrapperCol:wn,hideRequiredMark:Fn,layout:Yn="horizontal",scrollToFirstError:Un,requiredMark:Kn,onFinishFailed:vn,name:er,style:Wn,feedbackIcons:dr,variant:pr}=ge,lr=ee(ge,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),ur=(0,de.Z)(zt),yr=me.useContext(se.Z),sr=me.useMemo(()=>Kn!==void 0?Kn:Fn?!1:Fe!==void 0?Fe:!0,[Fn,Kn,Fe]),fr=Tn!=null?Tn:je,Qn=Oe("form",Te),mr=(0,Ke.Z)(Qn),[br,Hr,Er]=pt(Qn,mr),Ar=xe()(Qn,`${Qn}-${Yn}`,{[`${Qn}-hide-required-mark`]:sr===!1,[`${Qn}-rtl`]:pe==="rtl",[`${Qn}-${ur}`]:ur},Er,mr,Hr,Ze,Ue,Vt),[kr]=mt(kn),{__INTERNAL__:Mr}=kr;Mr.name=er;const ir=me.useMemo(()=>({name:er,labelAlign:Hn,labelCol:mn,labelWrap:En,wrapperCol:wn,vertical:Yn==="vertical",colon:fr,requiredMark:sr,itemRef:Mr.itemRef,form:kr,feedbackIcons:dr}),[er,Hn,mn,wn,Yn,fr,sr,kr,dr]),rr=me.useRef(null);me.useImperativeHandle(Pe,()=>{var cn;return Object.assign(Object.assign({},kr),{nativeElement:(cn=rr.current)===null||cn===void 0?void 0:cn.nativeElement})});const Jn=(cn,un)=>{if(cn){let _t={block:"nearest"};typeof cn=="object"&&(_t=Object.assign(Object.assign({},_t),cn)),kr.scrollToField(un,_t)}},Yt=cn=>{if(vn==null||vn(cn),cn.errorFields.length){const un=cn.errorFields[0].name;if(Un!==void 0){Jn(Un,un);return}tt!==void 0&&Jn(tt,un)}};return br(me.createElement(te.pg.Provider,{value:pr},me.createElement(we.n,{disabled:Zt},me.createElement(Je.Z.Provider,{value:ur},me.createElement(te.RV,{validateMessages:yr},me.createElement(te.q3.Provider,{value:ir},me.createElement(Nt.default,Object.assign({id:er},lr,{name:er,onFinishFailed:Yt,form:kr,ref:rr,style:Object.assign(Object.assign({},Le),Wn),className:Ar}))))))))};var le=me.forwardRef(z),re=ie(41799),Ee=ie(8654),at=ie(22703),$t=ie(32383),Ye=ie(11592);function ct(ge){if(typeof ge=="function")return ge;const Pe=(0,Ye.Z)(ge);return Pe.length<=1?Pe[0]:Pe}const St=()=>{const{status:ge,errors:Pe=[],warnings:ye=[]}=me.useContext(te.aM);return{status:ge,errors:Pe,warnings:ye}};St.Context=te.aM;var Ft=St,Pt=ie(16089);function Qt(ge){const[Pe,ye]=me.useState(ge),Oe=me.useRef(null),pe=me.useRef([]),Fe=me.useRef(!1);me.useEffect(()=>(Fe.current=!1,()=>{Fe.current=!0,Pt.Z.cancel(Oe.current),Oe.current=null}),[]);function je(tt){Fe.current||(Oe.current===null&&(pe.current=[],Oe.current=(0,Pt.Z)(()=>{Oe.current=null,ye(Ze=>{let Le=Ze;return pe.current.forEach(Te=>{Le=Te(Le)}),Le})})),pe.current.push(tt))}return[Pe,je]}function Jt(){const{itemRef:ge}=me.useContext(te.q3),Pe=me.useRef({});function ye(Oe,pe){const Fe=pe&&typeof pe=="object"&&(0,Ee.C4)(pe),je=Oe.join("_");return(Pe.current.name!==je||Pe.current.originRef!==Fe)&&(Pe.current.name=je,Pe.current.originRef=Fe,Pe.current.ref=(0,Ee.sQ)(ge(Oe),Fe)),Pe.current.ref}return ye}var Ut=ie(29194),Sn=ie(34280),on=ie(2738),gn=ie(65970),kt=ie(70425),Mn=ie(5472);const nn=ge=>{const{formItemCls:Pe}=ge;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Pe}-control`]:{display:"flex"}}}};var Me=(0,Re.bk)(["Form","item-item"],(ge,Pe)=>{let{rootPrefixCls:ye}=Pe;const Oe=Ve(ge,ye);return[nn(Oe)]}),et=function(ge,Pe){var ye={};for(var Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&Pe.indexOf(Oe)<0&&(ye[Oe]=ge[Oe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Oe=Object.getOwnPropertySymbols(ge);pe<Oe.length;pe++)Pe.indexOf(Oe[pe])<0&&Object.prototype.propertyIsEnumerable.call(ge,Oe[pe])&&(ye[Oe[pe]]=ge[Oe[pe]]);return ye};const Lt=24;var Se=ge=>{const{prefixCls:Pe,status:ye,labelCol:Oe,wrapperCol:pe,children:Fe,errors:je,warnings:tt,_internalItemRender:Ze,extra:Le,help:Te,fieldId:Ue,marginBottom:Vt,onErrorVisibleChanged:zt,label:Zt}=ge,kn=`${Pe}-item`,Tn=me.useContext(te.q3),Hn=me.useMemo(()=>{let lr=Object.assign({},pe||Tn.wrapperCol||{});return Zt===null&&!Oe&&!pe&&Tn.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(yr=>{const sr=yr?[yr]:[],fr=(0,kt.U2)(Tn.labelCol,sr),Qn=typeof fr=="object"?fr:{},mr=(0,kt.U2)(lr,sr),br=typeof mr=="object"?mr:{};"span"in Qn&&!("offset"in br)&&Qn.span<Lt&&(lr=(0,kt.t8)(lr,[].concat(sr,["offset"]),Qn.span))}),lr},[pe,Tn]),En=xe()(`${kn}-control`,Hn.className),mn=me.useMemo(()=>{const{labelCol:lr,wrapperCol:ur}=Tn;return et(Tn,["labelCol","wrapperCol"])},[Tn]),wn=me.useRef(null),[Fn,Yn]=me.useState(0);(0,Sn.Z)(()=>{Le&&wn.current?Yn(wn.current.clientHeight):Yn(0)},[Le]);const Un=me.createElement("div",{className:`${kn}-control-input`},me.createElement("div",{className:`${kn}-control-input-content`},Fe)),Kn=me.useMemo(()=>({prefixCls:Pe,status:ye}),[Pe,ye]),vn=Vt!==null||je.length||tt.length?me.createElement(te.Rk.Provider,{value:Kn},me.createElement(Ae,{fieldId:Ue,errors:je,warnings:tt,help:Te,helpStatus:ye,className:`${kn}-explain-connected`,onVisibleChanged:zt})):null,er={};Ue&&(er.id=`${Ue}_extra`);const Wn=Le?me.createElement("div",Object.assign({},er,{className:`${kn}-extra`,ref:wn}),Le):null,dr=vn||Wn?me.createElement("div",{className:`${kn}-additional`,style:Vt?{minHeight:Vt+Fn}:{}},vn,Wn):null,pr=Ze&&Ze.mark==="pro_table_render"&&Ze.render?Ze.render(ge,{input:Un,errorList:vn,extra:Wn}):me.createElement(me.Fragment,null,Un,dr);return me.createElement(te.q3.Provider,{value:mn},me.createElement(Mn.Z,Object.assign({},Hn,{className:En}),pr),me.createElement(Me,{prefixCls:Pe}))},$e=ie(61485),lt=ie(9017),Tt=ie(85981),Wt=ie(25399),ln=function(ge,Pe){var ye={};for(var Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&Pe.indexOf(Oe)<0&&(ye[Oe]=ge[Oe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Oe=Object.getOwnPropertySymbols(ge);pe<Oe.length;pe++)Pe.indexOf(Oe[pe])<0&&Object.prototype.propertyIsEnumerable.call(ge,Oe[pe])&&(ye[Oe[pe]]=ge[Oe[pe]]);return ye};function Dn(ge){return ge?typeof ge=="object"&&!me.isValidElement(ge)?ge:{title:ge}:null}var dn=ge=>{let{prefixCls:Pe,label:ye,htmlFor:Oe,labelCol:pe,labelAlign:Fe,colon:je,required:tt,requiredMark:Ze,tooltip:Le,vertical:Te}=ge;var Ue;const[Vt]=(0,lt.Z)("Form"),{labelAlign:zt,labelCol:Zt,labelWrap:kn,colon:Tn}=me.useContext(te.q3);if(!ye)return null;const Hn=pe||Zt||{},En=Fe||zt,mn=`${Pe}-item-label`,wn=xe()(mn,En==="left"&&`${mn}-left`,Hn.className,{[`${mn}-wrap`]:!!kn});let Fn=ye;const Yn=je===!0||Tn!==!1&&je!==!1;Yn&&!Te&&typeof ye=="string"&&ye.trim()&&(Fn=ye.replace(/[:|:]\s*$/,""));const Kn=Dn(Le);if(Kn){const{icon:lr=me.createElement($e.Z,null)}=Kn,ur=ln(Kn,["icon"]),yr=me.createElement(Wt.Z,Object.assign({},ur),me.cloneElement(lr,{className:`${Pe}-item-tooltip`,title:"",onClick:sr=>{sr.preventDefault()},tabIndex:null}));Fn=me.createElement(me.Fragment,null,Fn,yr)}const vn=Ze==="optional",er=typeof Ze=="function",Wn=Ze===!1;er?Fn=Ze(Fn,{required:!!tt}):vn&&!tt&&(Fn=me.createElement(me.Fragment,null,Fn,me.createElement("span",{className:`${Pe}-item-optional`,title:""},(Vt==null?void 0:Vt.optional)||((Ue=Tt.Z.Form)===null||Ue===void 0?void 0:Ue.optional))));let dr;Wn?dr="hidden":(vn||er)&&(dr="optional");const pr=xe()({[`${Pe}-item-required`]:tt,[`${Pe}-item-required-mark-${dr}`]:dr,[`${Pe}-item-no-colon`]:!Yn});return me.createElement(Mn.Z,Object.assign({},Hn,{className:wn}),me.createElement("label",{htmlFor:Oe,className:pr,title:typeof ye=="string"?ye:""},Fn))},Cn=ie(29679),fn=ie(19248),$n=ie(96512),yn=ie(58617);const hn={success:Cn.Z,warning:$n.Z,error:fn.Z,validating:yn.Z};function qt(ge){let{children:Pe,errors:ye,warnings:Oe,hasFeedback:pe,validateStatus:Fe,prefixCls:je,meta:tt,noStyle:Ze}=ge;const Le=`${je}-item`,{feedbackIcons:Te}=me.useContext(te.q3),Ue=Ot(ye,Oe,tt,null,!!pe,Fe),{isFormItemInput:Vt,status:zt,hasFeedback:Zt,feedbackIcon:kn}=me.useContext(te.aM),Tn=me.useMemo(()=>{var Hn;let En;if(pe){const wn=pe!==!0&&pe.icons||Te,Fn=Ue&&((Hn=wn==null?void 0:wn({status:Ue,errors:ye,warnings:Oe}))===null||Hn===void 0?void 0:Hn[Ue]),Yn=Ue&&hn[Ue];En=Fn!==!1&&Yn?me.createElement("span",{className:xe()(`${Le}-feedback-icon`,`${Le}-feedback-icon-${Ue}`)},Fn||me.createElement(Yn,null)):null}const mn={status:Ue||"",errors:ye,warnings:Oe,hasFeedback:!!pe,feedbackIcon:En,isFormItemInput:!0};return Ze&&(mn.status=(Ue!=null?Ue:zt)||"",mn.isFormItemInput=Vt,mn.hasFeedback=!!(pe!=null?pe:Zt),mn.feedbackIcon=pe!==void 0?mn.feedbackIcon:kn),mn},[Ue,pe,Ze,Vt,zt]);return me.createElement(te.aM.Provider,{value:Tn},Pe)}var Pn=function(ge,Pe){var ye={};for(var Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&Pe.indexOf(Oe)<0&&(ye[Oe]=ge[Oe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Oe=Object.getOwnPropertySymbols(ge);pe<Oe.length;pe++)Pe.indexOf(Oe[pe])<0&&Object.prototype.propertyIsEnumerable.call(ge,Oe[pe])&&(ye[Oe[pe]]=ge[Oe[pe]]);return ye};function pn(ge){const{prefixCls:Pe,className:ye,rootClassName:Oe,style:pe,help:Fe,errors:je,warnings:tt,validateStatus:Ze,meta:Le,hasFeedback:Te,hidden:Ue,children:Vt,fieldId:zt,required:Zt,isRequired:kn,onSubItemMetaChange:Tn,layout:Hn}=ge,En=Pn(ge,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),mn=`${Pe}-item`,{requiredMark:wn,vertical:Fn}=me.useContext(te.q3),Yn=Fn||Hn==="vertical",Un=me.useRef(null),Kn=ke(je),vn=ke(tt),er=Fe!=null,Wn=!!(er||je.length||tt.length),dr=!!Un.current&&(0,Ut.Z)(Un.current),[pr,lr]=me.useState(null);(0,Sn.Z)(()=>{if(Wn&&Un.current){const Qn=getComputedStyle(Un.current);lr(parseInt(Qn.marginBottom,10))}},[Wn,dr]);const ur=Qn=>{Qn||lr(null)},sr=function(){let Qn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const mr=Qn?Kn:Le.errors,br=Qn?vn:Le.warnings;return Ot(mr,br,Le,"",!!Te,Ze)}(),fr=xe()(mn,ye,Oe,{[`${mn}-with-help`]:er||Kn.length||vn.length,[`${mn}-has-feedback`]:sr&&Te,[`${mn}-has-success`]:sr==="success",[`${mn}-has-warning`]:sr==="warning",[`${mn}-has-error`]:sr==="error",[`${mn}-is-validating`]:sr==="validating",[`${mn}-hidden`]:Ue,[`${mn}-${Hn}`]:Hn});return me.createElement("div",{className:fr,style:pe,ref:Un},me.createElement(gn.Z,Object.assign({className:`${mn}-row`},(0,on.Z)(En,["_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(dn,Object.assign({htmlFor:zt},ge,{requiredMark:wn,required:Zt!=null?Zt:kn,prefixCls:Pe,vertical:Yn})),me.createElement(Se,Object.assign({},ge,Le,{errors:Kn,warnings:vn,prefixCls:Pe,status:sr,help:Fe,marginBottom:pr,onErrorVisibleChanged:ur}),me.createElement(te.qI.Provider,{value:Tn},me.createElement(qt,{prefixCls:Pe,meta:Le,errors:Le.errors,warnings:Le.warnings,hasFeedback:Te,validateStatus:sr},Vt)))),!!pr&&me.createElement("div",{className:`${mn}-margin-offset`,style:{marginBottom:-pr}}))}const Ln="__SPLIT__",Gn=null;function jn(ge,Pe){const ye=Object.keys(ge),Oe=Object.keys(Pe);return ye.length===Oe.length&&ye.every(pe=>{const Fe=ge[pe],je=Pe[pe];return Fe===je||typeof Fe=="function"||typeof je=="function"})}const Bn=me.memo(ge=>{let{children:Pe}=ge;return Pe},(ge,Pe)=>jn(ge.control,Pe.control)&&ge.update===Pe.update&&ge.childProps.length===Pe.childProps.length&&ge.childProps.every((ye,Oe)=>ye===Pe.childProps[Oe]));function Xn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Nn(ge){const{name:Pe,noStyle:ye,className:Oe,dependencies:pe,prefixCls:Fe,shouldUpdate:je,rules:tt,children:Ze,required:Le,label:Te,messageVariables:Ue,trigger:Vt="onChange",validateTrigger:zt,hidden:Zt,help:kn,layout:Tn}=ge,{getPrefixCls:Hn}=me.useContext(rn.E_),{name:En}=me.useContext(te.q3),mn=ct(Ze),wn=typeof mn=="function",Fn=me.useContext(te.qI),{validateTrigger:Yn}=me.useContext(Nt.FieldContext),Un=zt!==void 0?zt:Yn,Kn=Pe!=null,vn=Hn("form",Fe),er=(0,Ke.Z)(vn),[Wn,dr,pr]=pt(vn,er),lr=(0,$t.ln)("Form.Item"),ur=me.useContext(Nt.ListContext),yr=me.useRef(null),[sr,fr]=Qt({}),[Qn,mr]=(0,re.Z)(()=>Xn()),br=rr=>{const Jn=ur==null?void 0:ur.getKey(rr.name);if(mr(rr.destroy?Xn():rr,!0),ye&&kn!==!1&&Fn){let Yt=rr.name;if(rr.destroy)Yt=yr.current||Yt;else if(Jn!==void 0){const[cn,un]=Jn;Yt=[cn].concat((0,ot.Z)(un)),yr.current=Yt}Fn(rr,Yt)}},Hr=(rr,Jn)=>{fr(Yt=>{const cn=Object.assign({},Yt),_t=[].concat((0,ot.Z)(rr.name.slice(0,-1)),(0,ot.Z)(Jn)).join(Ln);return rr.destroy?delete cn[_t]:cn[_t]=rr,cn})},[Er,Ar]=me.useMemo(()=>{const rr=(0,ot.Z)(Qn.errors),Jn=(0,ot.Z)(Qn.warnings);return Object.values(sr).forEach(Yt=>{rr.push.apply(rr,(0,ot.Z)(Yt.errors||[])),Jn.push.apply(Jn,(0,ot.Z)(Yt.warnings||[]))}),[rr,Jn]},[sr,Qn.errors,Qn.warnings]),kr=Jt();function Mr(rr,Jn,Yt){return ye&&!Zt?me.createElement(qt,{prefixCls:vn,hasFeedback:ge.hasFeedback,validateStatus:ge.validateStatus,meta:Qn,errors:Er,warnings:Ar,noStyle:!0},rr):me.createElement(pn,Object.assign({key:"row"},ge,{className:xe()(Oe,pr,er,dr),prefixCls:vn,fieldId:Jn,isRequired:Yt,errors:Er,warnings:Ar,meta:Qn,onSubItemMetaChange:Hr,layout:Tn}),rr)}if(!Kn&&!wn&&!pe)return Wn(Mr(mn));let ir={};return typeof Te=="string"?ir.label=Te:Pe&&(ir.label=String(Pe)),Ue&&(ir=Object.assign(Object.assign({},ir),Ue)),Wn(me.createElement(Nt.Field,Object.assign({},ge,{messageVariables:ir,trigger:Vt,validateTrigger:Un,onMetaChange:br}),(rr,Jn,Yt)=>{const cn=bt(Pe).length&&Jn?Jn.name:[],un=tn(cn,En),_t=Le!==void 0?Le:!!(tt!=null&&tt.some(an=>{if(an&&typeof an=="object"&&an.required&&!an.warningOnly)return!0;if(typeof an=="function"){const Kt=an(Yt);return(Kt==null?void 0:Kt.required)&&!(Kt!=null&&Kt.warningOnly)}return!1})),An=Object.assign({},rr);let Zn=null;if(Array.isArray(mn)&&Kn)Zn=mn;else if(!(wn&&(!(je||pe)||Kn))){if(!(pe&&!wn&&!Kn))if(me.isValidElement(mn)){const an=Object.assign(Object.assign({},mn.props),An);if(an.id||(an.id=un),kn||Er.length>0||Ar.length>0||ge.extra){const On=[];(kn||Er.length>0)&&On.push(`${un}_help`),ge.extra&&On.push(`${un}_extra`),an["aria-describedby"]=On.join(" ")}Er.length>0&&(an["aria-invalid"]="true"),_t&&(an["aria-required"]="true"),(0,Ee.Yr)(mn)&&(an.ref=kr(cn,mn)),new Set([].concat((0,ot.Z)(bt(Vt)),(0,ot.Z)(bt(Un)))).forEach(On=>{an[On]=function(){for(var cr,Or,Ir,Rr,Br,Fr=arguments.length,Ur=new Array(Fr),Wr=0;Wr<Fr;Wr++)Ur[Wr]=arguments[Wr];(Ir=An[On])===null||Ir===void 0||(cr=Ir).call.apply(cr,[An].concat(Ur)),(Br=(Rr=mn.props)[On])===null||Br===void 0||(Or=Br).call.apply(Or,[Rr].concat(Ur))}});const bn=[an["aria-required"],an["aria-invalid"],an["aria-describedby"]];Zn=me.createElement(Bn,{control:An,update:mn,childProps:bn},(0,at.Tm)(mn,an))}else wn&&(je||pe)&&!Kn?Zn=mn(Yt):Zn=mn}return Mr(Zn,un,_t)}))}const ar=Nn;ar.useStatus=Ft;var qn=ar,It=function(ge,Pe){var ye={};for(var Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&Pe.indexOf(Oe)<0&&(ye[Oe]=ge[Oe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Oe=Object.getOwnPropertySymbols(ge);pe<Oe.length;pe++)Pe.indexOf(Oe[pe])<0&&Object.prototype.propertyIsEnumerable.call(ge,Oe[pe])&&(ye[Oe[pe]]=ge[Oe[pe]]);return ye},zn=ge=>{var{prefixCls:Pe,children:ye}=ge,Oe=It(ge,["prefixCls","children"]);const{getPrefixCls:pe}=me.useContext(rn.E_),Fe=pe("form",Pe),je=me.useMemo(()=>({prefixCls:Fe,status:"error"}),[Fe]);return me.createElement(Nt.List,Object.assign({},Oe),(tt,Ze,Le)=>me.createElement(te.Rk.Provider,{value:je},ye(tt.map(Te=>Object.assign(Object.assign({},Te),{fieldKey:Te.key})),Ze,{errors:Le.errors,warnings:Le.warnings})))};function nr(){const{form:ge}=me.useContext(te.q3);return ge}const De=le;De.Item=qn,De.List=zn,De.ErrorList=Ae,De.useForm=mt,De.useFormInstance=nr,De.useWatch=Nt.useWatch,De.Provider=te.RV,De.create=()=>{};var _e=De},4875:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Rt}});var te=ie(59301),ot=ie(84105),me=ie(87395),Ge=ie(92310),xe=ie.n(Ge),Ce=ie(60499),ze=ie(18642),Ke=ie(43749),ke=ie(72190),fe=ie(42244),Qe=ie(38705),be=ie(17212);function xt(){return typeof BigInt=="function"}function rt(Se){return!Se&&Se!==0&&!Number.isNaN(Se)||!String(Se).trim()}function Re(Se){var $e=Se.trim(),lt=$e.startsWith("-");lt&&($e=$e.slice(1)),$e=$e.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),$e.startsWith(".")&&($e="0".concat($e));var Tt=$e||"0",Wt=Tt.split("."),ln=Wt[0]||"0",Dn=Wt[1]||"0";ln==="0"&&Dn==="0"&&(lt=!1);var In=lt?"-":"";return{negative:lt,negativeStr:In,trimStr:Tt,integerStr:ln,decimalStr:Dn,fullStr:"".concat(In).concat(Tt)}}function He(Se){var $e=String(Se);return!Number.isNaN(Number($e))&&$e.includes("e")}function Ie(Se){var $e=String(Se);if(He(Se)){var lt=Number($e.slice($e.indexOf("e-")+2)),Tt=$e.match(/\.(\d+)/);return Tt!=null&&Tt[1]&&(lt+=Tt[1].length),lt}return $e.includes(".")&>($e)?$e.length-$e.indexOf(".")-1:0}function ut(Se){var $e=String(Se);if(He(Se)){if(Se>Number.MAX_SAFE_INTEGER)return String(xt()?BigInt(Se).toString():Number.MAX_SAFE_INTEGER);if(Se<Number.MIN_SAFE_INTEGER)return String(xt()?BigInt(Se).toString():Number.MIN_SAFE_INTEGER);$e=Se.toFixed(Ie($e))}return Re($e).fullStr}function gt(Se){return typeof Se=="number"?!Number.isNaN(Se):Se?/^\s*-?\d+(\.\d+)?\s*$/.test(Se)||/^\s*-?\d+\.\s*$/.test(Se)||/^\s*-?\.\d+\s*$/.test(Se):!1}var yt=function(){function Se($e){if((0,Qe.Z)(this,Se),(0,ze.Z)(this,"origin",""),(0,ze.Z)(this,"negative",void 0),(0,ze.Z)(this,"integer",void 0),(0,ze.Z)(this,"decimal",void 0),(0,ze.Z)(this,"decimalLen",void 0),(0,ze.Z)(this,"empty",void 0),(0,ze.Z)(this,"nan",void 0),rt($e)){this.empty=!0;return}if(this.origin=String($e),$e==="-"||Number.isNaN($e)){this.nan=!0;return}var lt=$e;if(He(lt)&&(lt=Number(lt)),lt=typeof lt=="string"?lt:ut(lt),gt(lt)){var Tt=Re(lt);this.negative=Tt.negative;var Wt=Tt.trimStr.split(".");this.integer=BigInt(Wt[0]);var ln=Wt[1]||"0";this.decimal=BigInt(ln),this.decimalLen=ln.length}else this.nan=!0}return(0,be.Z)(Se,[{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(lt){var Tt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(lt,"0"));return BigInt(Tt)}},{key:"negate",value:function(){var lt=new Se(this.toString());return lt.negative=!lt.negative,lt}},{key:"cal",value:function(lt,Tt,Wt){var ln=Math.max(this.getDecimalStr().length,lt.getDecimalStr().length),Dn=this.alignDecimal(ln),In=lt.alignDecimal(ln),dn=Tt(Dn,In).toString(),Cn=Wt(ln),fn=Re(dn),$n=fn.negativeStr,yn=fn.trimStr,hn="".concat($n).concat(yn.padStart(Cn+1,"0"));return new Se("".concat(hn.slice(0,-Cn),".").concat(hn.slice(-Cn)))}},{key:"add",value:function(lt){if(this.isInvalidate())return new Se(lt);var Tt=new Se(lt);return Tt.isInvalidate()?this:this.cal(Tt,function(Wt,ln){return Wt+ln},function(Wt){return Wt})}},{key:"multi",value:function(lt){var Tt=new Se(lt);return this.isInvalidate()||Tt.isInvalidate()?new Se(NaN):this.cal(Tt,function(Wt,ln){return Wt*ln},function(Wt){return Wt*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(lt){return this.toString()===(lt==null?void 0:lt.toString())}},{key:"lessEquals",value:function(lt){return this.add(lt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return lt?this.isInvalidate()?"":Re("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Se}(),ft=function(){function Se($e){if((0,Qe.Z)(this,Se),(0,ze.Z)(this,"origin",""),(0,ze.Z)(this,"number",void 0),(0,ze.Z)(this,"empty",void 0),rt($e)){this.empty=!0;return}this.origin=String($e),this.number=Number($e)}return(0,be.Z)(Se,[{key:"negate",value:function(){return new Se(-this.toNumber())}},{key:"add",value:function(lt){if(this.isInvalidate())return new Se(lt);var Tt=Number(lt);if(Number.isNaN(Tt))return this;var Wt=this.number+Tt;if(Wt>Number.MAX_SAFE_INTEGER)return new Se(Number.MAX_SAFE_INTEGER);if(Wt<Number.MIN_SAFE_INTEGER)return new Se(Number.MIN_SAFE_INTEGER);var ln=Math.max(Ie(this.number),Ie(Tt));return new Se(Wt.toFixed(ln))}},{key:"multi",value:function(lt){var Tt=Number(lt);if(this.isInvalidate()||Number.isNaN(Tt))return new Se(NaN);var Wt=this.number*Tt;if(Wt>Number.MAX_SAFE_INTEGER)return new Se(Number.MAX_SAFE_INTEGER);if(Wt<Number.MIN_SAFE_INTEGER)return new Se(Number.MIN_SAFE_INTEGER);var ln=Math.max(Ie(this.number),Ie(Tt));return new Se(Wt.toFixed(ln))}},{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(lt){return this.toNumber()===(lt==null?void 0:lt.toNumber())}},{key:"lessEquals",value:function(lt){return this.add(lt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return lt?this.isInvalidate()?"":ut(this.number):this.origin}}]),Se}();function nt(Se){return xt()?new yt(Se):new ft(Se)}function vt(Se,$e,lt){var Tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Se==="")return"";var Wt=Re(Se),ln=Wt.negativeStr,Dn=Wt.integerStr,In=Wt.decimalStr,dn="".concat($e).concat(In),Cn="".concat(ln).concat(Dn);if(lt>=0){var fn=Number(In[lt]);if(fn>=5&&!Tt){var $n=nt(Se).add("".concat(ln,"0.").concat("0".repeat(lt)).concat(10-fn));return vt($n.toString(),$e,lt,Tt)}return lt===0?Cn:"".concat(Cn).concat($e).concat(In.padEnd(lt,"0").slice(0,lt))}return dn===".0"?Cn:"".concat(Cn).concat(dn)}var We=nt,At=ie(36901),st=ie(34280);function qe(Se,$e){return typeof Proxy!="undefined"&&Se?new Proxy(Se,{get:function(Tt,Wt){if($e[Wt])return $e[Wt];var ln=Tt[Wt];return typeof ln=="function"?ln.bind(Tt):ln}}):Se}var Mt=ie(8654),Ve=ie(48736);function pt(Se,$e){var lt=(0,te.useRef)(null);function Tt(){try{var ln=Se.selectionStart,Dn=Se.selectionEnd,In=Se.value,dn=In.substring(0,ln),Cn=In.substring(Dn);lt.current={start:ln,end:Dn,value:In,beforeTxt:dn,afterTxt:Cn}}catch(fn){}}function Wt(){if(Se&<.current&&$e)try{var ln=Se.value,Dn=lt.current,In=Dn.beforeTxt,dn=Dn.afterTxt,Cn=Dn.start,fn=ln.length;if(ln.startsWith(In))fn=In.length;else if(ln.endsWith(dn))fn=ln.length-lt.current.afterTxt.length;else{var $n=In[Cn-1],yn=ln.indexOf($n,Cn-1);yn!==-1&&(fn=yn+1)}Se.setSelectionRange(fn,fn)}catch(hn){(0,Ve.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(hn.message))}}return[Tt,Wt]}var ht=ie(49658),ve=function(){var $e=(0,te.useState)(!1),lt=(0,ke.Z)($e,2),Tt=lt[0],Wt=lt[1];return(0,st.Z)(function(){Wt((0,ht.Z)())},[]),Tt},Bt=ve,Ae=ie(16089),Nt=200,rn=600;function we(Se){var $e=Se.prefixCls,lt=Se.upNode,Tt=Se.downNode,Wt=Se.upDisabled,ln=Se.downDisabled,Dn=Se.onStep,In=te.useRef(),dn=te.useRef([]),Cn=te.useRef();Cn.current=Dn;var fn=function(){clearTimeout(In.current)},$n=function(jn,Bn){jn.preventDefault(),fn(),Cn.current(Bn);function Xn(){Cn.current(Bn),In.current=setTimeout(Xn,Nt)}In.current=setTimeout(Xn,rn)};te.useEffect(function(){return function(){fn(),dn.current.forEach(function(Gn){return Ae.Z.cancel(Gn)})}},[]);var yn=Bt();if(yn)return null;var hn="".concat($e,"-handler"),qt=xe()(hn,"".concat(hn,"-up"),(0,ze.Z)({},"".concat(hn,"-up-disabled"),Wt)),Pn=xe()(hn,"".concat(hn,"-down"),(0,ze.Z)({},"".concat(hn,"-down-disabled"),ln)),pn=function(){return dn.current.push((0,Ae.Z)(fn))},Ln={unselectable:"on",role:"button",onMouseUp:pn,onMouseLeave:pn};return te.createElement("div",{className:"".concat(hn,"-wrap")},te.createElement("span",(0,Ce.Z)({},Ln,{onMouseDown:function(jn){$n(jn,!0)},"aria-label":"Increase Value","aria-disabled":Wt,className:qt}),lt||te.createElement("span",{unselectable:"on",className:"".concat($e,"-handler-up-inner")})),te.createElement("span",(0,Ce.Z)({},Ln,{onMouseDown:function(jn){$n(jn,!1)},"aria-label":"Decrease Value","aria-disabled":ln,className:Pn}),Tt||te.createElement("span",{unselectable:"on",className:"".concat($e,"-handler-down-inner")})))}function de(Se){var $e=typeof Se=="number"?ut(Se):Re(Se).fullStr,lt=$e.includes(".");return lt?Re($e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Se+"0"}var Je=ie(30292),wt=function(){var Se=(0,te.useRef)(0),$e=function(){Ae.Z.cancel(Se.current)};return(0,te.useEffect)(function(){return $e},[]),function(lt){$e(),Se.current=(0,Ae.Z)(function(){lt()})}},Et=["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"],Be=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],dt=function($e,lt){return $e||lt.isEmpty()?lt.toString():lt.toNumber()},bt=function($e){var lt=We($e);return lt.isInvalidate()?null:lt},tn=te.forwardRef(function(Se,$e){var lt=Se.prefixCls,Tt=Se.className,Wt=Se.style,ln=Se.min,Dn=Se.max,In=Se.step,dn=In===void 0?1:In,Cn=Se.defaultValue,fn=Se.value,$n=Se.disabled,yn=Se.readOnly,hn=Se.upHandler,qt=Se.downHandler,Pn=Se.keyboard,pn=Se.changeOnWheel,Ln=pn===void 0?!1:pn,Gn=Se.controls,jn=Gn===void 0?!0:Gn,Bn=Se.classNames,Xn=Se.stringMode,Nn=Se.parser,ar=Se.formatter,qn=Se.precision,It=Se.decimalSeparator,Xt=Se.onChange,zn=Se.onInput,nr=Se.onPressEnter,De=Se.onStep,_e=Se.changeOnBlur,ge=_e===void 0?!0:_e,Pe=Se.domRef,ye=(0,fe.Z)(Se,Et),Oe="".concat(lt,"-input"),pe=te.useRef(null),Fe=te.useState(!1),je=(0,ke.Z)(Fe,2),tt=je[0],Ze=je[1],Le=te.useRef(!1),Te=te.useRef(!1),Ue=te.useRef(!1),Vt=te.useState(function(){return We(fn!=null?fn:Cn)}),zt=(0,ke.Z)(Vt,2),Zt=zt[0],kn=zt[1];function Tn(un){fn===void 0&&kn(un)}var Hn=te.useCallback(function(un,_t){if(!_t)return qn>=0?qn:Math.max(Ie(un),Ie(dn))},[qn,dn]),En=te.useCallback(function(un){var _t=String(un);if(Nn)return Nn(_t);var An=_t;return It&&(An=An.replace(It,".")),An.replace(/[^\w.-]+/g,"")},[Nn,It]),mn=te.useRef(""),wn=te.useCallback(function(un,_t){if(ar)return ar(un,{userTyping:_t,input:String(mn.current)});var An=typeof un=="number"?ut(un):un;if(!_t){var Zn=Hn(An,_t);if(gt(An)&&(It||Zn>=0)){var an=It||".";An=vt(An,an,Zn)}}return An},[ar,Hn,It]),Fn=te.useState(function(){var un=Cn!=null?Cn:fn;return Zt.isInvalidate()&&["string","number"].includes((0,Ke.Z)(un))?Number.isNaN(un)?"":un:wn(Zt.toString(),!1)}),Yn=(0,ke.Z)(Fn,2),Un=Yn[0],Kn=Yn[1];mn.current=Un;function vn(un,_t){Kn(wn(un.isInvalidate()?un.toString(!1):un.toString(!_t),_t))}var er=te.useMemo(function(){return bt(Dn)},[Dn,qn]),Wn=te.useMemo(function(){return bt(ln)},[ln,qn]),dr=te.useMemo(function(){return!er||!Zt||Zt.isInvalidate()?!1:er.lessEquals(Zt)},[er,Zt]),pr=te.useMemo(function(){return!Wn||!Zt||Zt.isInvalidate()?!1:Zt.lessEquals(Wn)},[Wn,Zt]),lr=pt(pe.current,tt),ur=(0,ke.Z)(lr,2),yr=ur[0],sr=ur[1],fr=function(_t){return er&&!_t.lessEquals(er)?er:Wn&&!Wn.lessEquals(_t)?Wn:null},Qn=function(_t){return!fr(_t)},mr=function(_t,An){var Zn=_t,an=Qn(Zn)||Zn.isEmpty();if(!Zn.isEmpty()&&!An&&(Zn=fr(Zn)||Zn,an=!0),!yn&&!$n&&an){var Kt=Zn.toString(),bn=Hn(Kt,An);return bn>=0&&(Zn=We(vt(Kt,".",bn)),Qn(Zn)||(Zn=We(vt(Kt,".",bn,!0)))),Zn.equals(Zt)||(Tn(Zn),Xt==null||Xt(Zn.isEmpty()?null:dt(Xn,Zn)),fn===void 0&&vn(Zn,An)),Zn}return Zt},br=wt(),Hr=function un(_t){if(yr(),mn.current=_t,Kn(_t),!Te.current){var An=En(_t),Zn=We(An);Zn.isNaN()||mr(Zn,!0)}zn==null||zn(_t),br(function(){var an=_t;Nn||(an=_t.replace(/。/g,".")),an!==_t&&un(an)})},Er=function(){Te.current=!0},Ar=function(){Te.current=!1,Hr(pe.current.value)},kr=function(_t){Hr(_t.target.value)},Mr=function(_t){var An;if(!(_t&&dr||!_t&&pr)){Le.current=!1;var Zn=We(Ue.current?de(dn):dn);_t||(Zn=Zn.negate());var an=(Zt||We(0)).add(Zn.toString()),Kt=mr(an,!1);De==null||De(dt(Xn,Kt),{offset:Ue.current?de(dn):dn,type:_t?"up":"down"}),(An=pe.current)===null||An===void 0||An.focus()}},ir=function(_t){var An=We(En(Un)),Zn;An.isNaN()?Zn=mr(Zt,_t):Zn=mr(An,_t),fn!==void 0?vn(Zt,!1):Zn.isNaN()||vn(Zn,!1)},rr=function(){Le.current=!0},Jn=function(_t){var An=_t.key,Zn=_t.shiftKey;Le.current=!0,Ue.current=Zn,An==="Enter"&&(Te.current||(Le.current=!1),ir(!1),nr==null||nr(_t)),Pn!==!1&&!Te.current&&["Up","ArrowUp","Down","ArrowDown"].includes(An)&&(Mr(An==="Up"||An==="ArrowUp"),_t.preventDefault())},Yt=function(){Le.current=!1,Ue.current=!1};te.useEffect(function(){if(Ln&&tt){var un=function(Zn){Mr(Zn.deltaY<0),Zn.preventDefault()},_t=pe.current;if(_t)return _t.addEventListener("wheel",un,{passive:!1}),function(){return _t.removeEventListener("wheel",un)}}});var cn=function(){ge&&ir(!1),Ze(!1),Le.current=!1};return(0,st.o)(function(){Zt.isInvalidate()||vn(Zt,!1)},[qn,ar]),(0,st.o)(function(){var un=We(fn);kn(un);var _t=We(En(Un));(!un.equals(_t)||!Le.current||ar)&&vn(un,Le.current)},[fn]),(0,st.o)(function(){ar&&sr()},[Un]),te.createElement("div",{ref:Pe,className:xe()(lt,Tt,(0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(lt,"-focused"),tt),"".concat(lt,"-disabled"),$n),"".concat(lt,"-readonly"),yn),"".concat(lt,"-not-a-number"),Zt.isNaN()),"".concat(lt,"-out-of-range"),!Zt.isInvalidate()&&!Qn(Zt))),style:Wt,onFocus:function(){Ze(!0)},onBlur:cn,onKeyDown:Jn,onKeyUp:Yt,onCompositionStart:Er,onCompositionEnd:Ar,onBeforeInput:rr},jn&&te.createElement(we,{prefixCls:lt,upNode:hn,downNode:qt,upDisabled:dr,downDisabled:pr,onStep:Mr}),te.createElement("div",{className:"".concat(Oe,"-wrap")},te.createElement("input",(0,Ce.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":ln,"aria-valuemax":Dn,"aria-valuenow":Zt.isInvalidate()?null:Zt.toString(),step:dn},ye,{ref:(0,Mt.sQ)(pe,$e),className:Oe,value:Un,onChange:kr,disabled:$n,readOnly:yn}))))}),Ot=te.forwardRef(function(Se,$e){var lt=Se.disabled,Tt=Se.style,Wt=Se.prefixCls,ln=Wt===void 0?"rc-input-number":Wt,Dn=Se.value,In=Se.prefix,dn=Se.suffix,Cn=Se.addonBefore,fn=Se.addonAfter,$n=Se.className,yn=Se.classNames,hn=(0,fe.Z)(Se,Be),qt=te.useRef(null),Pn=te.useRef(null),pn=te.useRef(null),Ln=function(jn){pn.current&&(0,Je.nH)(pn.current,jn)};return te.useImperativeHandle($e,function(){return qe(pn.current,{focus:Ln,nativeElement:qt.current.nativeElement||Pn.current})}),te.createElement(At.BaseInput,{className:$n,triggerFocus:Ln,prefixCls:ln,value:Dn,disabled:lt,style:Tt,prefix:In,suffix:dn,addonAfter:fn,addonBefore:Cn,classNames:yn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:qt},te.createElement(tn,(0,Ce.Z)({prefixCls:ln,disabled:lt,ref:pn,domRef:Pn,className:yn==null?void 0:yn.input},hn)))}),jt=Ot,it=jt,Gt=ie(62487),mt=ie(82855),se=ie(48755),ee=ie(60840),z=ie(2171),oe=ie(83397),le=ie(31756),re=ie(56553),Ee=ie(24971),at=ie(70045),$t=ie(36237),Ye=ie(53075),ct=ie(64910),St=ie(39082),Ft=ie(63356),Pt=ie(56119),Qt=ie(16931),Jt=ie(51636),Ut=ie(17835);const Sn=Se=>{var $e;const lt=($e=Se.handleVisible)!==null&&$e!==void 0?$e:"auto",Tt=Se.controlHeightSM-Se.lineWidth*2;return Object.assign(Object.assign({},(0,ct.T)(Se)),{controlWidth:90,handleWidth:Tt,handleFontSize:Se.fontSize/2,handleVisible:lt,handleActiveBg:Se.colorFillAlter,handleBg:Se.colorBgContainer,filledHandleBg:new Ut.FastColor(Se.colorFillSecondary).onBackground(Se.colorBgContainer).toHexString(),handleHoverColor:Se.colorPrimary,handleBorderColor:Se.colorBorder,handleOpacity:lt===!0?1:0,handleVisibleWidth:lt===!0?Tt:0})},on=(Se,$e)=>{let{componentCls:lt,borderRadiusSM:Tt,borderRadiusLG:Wt}=Se;const ln=$e==="lg"?Wt:Tt;return{[`&-${$e}`]:{[`${lt}-handler-wrap`]:{borderStartEndRadius:ln,borderEndEndRadius:ln},[`${lt}-handler-up`]:{borderStartEndRadius:ln},[`${lt}-handler-down`]:{borderEndEndRadius:ln}}}},gn=Se=>{const{componentCls:$e,lineWidth:lt,lineType:Tt,borderRadius:Wt,inputFontSizeSM:ln,inputFontSizeLG:Dn,controlHeightLG:In,controlHeightSM:dn,colorError:Cn,paddingInlineSM:fn,paddingBlockSM:$n,paddingBlockLG:yn,paddingInlineLG:hn,colorTextDescription:qt,motionDurationMid:Pn,handleHoverColor:pn,handleOpacity:Ln,paddingInline:Gn,paddingBlock:jn,handleBg:Bn,handleActiveBg:Xn,colorTextDisabled:Nn,borderRadiusSM:ar,borderRadiusLG:qn,controlWidth:It,handleBorderColor:Xt,filledHandleBg:zn,lineHeightLG:nr,calc:De}=Se;return[{[$e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ft.Wf)(Se)),(0,Ye.ik)(Se)),{display:"inline-block",width:It,margin:0,padding:0,borderRadius:Wt}),(0,St.qG)(Se,{[`${$e}-handler-wrap`]:{background:Bn,[`${$e}-handler-down`]:{borderBlockStart:`${(0,$t.unit)(lt)} ${Tt} ${Xt}`}}})),(0,St.H8)(Se,{[`${$e}-handler-wrap`]:{background:zn,[`${$e}-handler-down`]:{borderBlockStart:`${(0,$t.unit)(lt)} ${Tt} ${Xt}`}},"&:focus-within":{[`${$e}-handler-wrap`]:{background:Bn}}})),(0,St.vc)(Se,{[`${$e}-handler-wrap`]:{background:Bn,[`${$e}-handler-down`]:{borderBlockStart:`${(0,$t.unit)(lt)} ${Tt} ${Xt}`}}})),(0,St.Mu)(Se)),{"&-rtl":{direction:"rtl",[`${$e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Dn,lineHeight:nr,borderRadius:qn,[`input${$e}-input`]:{height:De(In).sub(De(lt).mul(2)).equal(),padding:`${(0,$t.unit)(yn)} ${(0,$t.unit)(hn)}`}},"&-sm":{padding:0,fontSize:ln,borderRadius:ar,[`input${$e}-input`]:{height:De(dn).sub(De(lt).mul(2)).equal(),padding:`${(0,$t.unit)($n)} ${(0,$t.unit)(fn)}`}},"&-out-of-range":{[`${$e}-input-wrap`]:{input:{color:Cn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Ft.Wf)(Se)),(0,Ye.s7)(Se)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${$e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${$e}-group-addon`]:{borderRadius:qn,fontSize:Se.fontSizeLG}},"&-sm":{[`${$e}-group-addon`]:{borderRadius:ar}}},(0,St.ir)(Se)),(0,St.S5)(Se)),{[`&:not(${$e}-compact-first-item):not(${$e}-compact-last-item)${$e}-compact-item`]:{[`${$e}, ${$e}-group-addon`]:{borderRadius:0}},[`&:not(${$e}-compact-last-item)${$e}-compact-first-item`]:{[`${$e}, ${$e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${$e}-compact-first-item)${$e}-compact-last-item`]:{[`${$e}, ${$e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${$e}-input`]:{cursor:"not-allowed"},[$e]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ft.Wf)(Se)),{width:"100%",padding:`${(0,$t.unit)(jn)} ${(0,$t.unit)(Gn)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Wt,outline:0,transition:`all ${Pn} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Ye.nz)(Se.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${$e}-handler-wrap, &-focused ${$e}-handler-wrap`]:{width:Se.handleWidth,opacity:1}})},{[$e]:Object.assign(Object.assign(Object.assign({[`${$e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:Se.handleVisibleWidth,opacity:Ln,height:"100%",borderStartStartRadius:0,borderStartEndRadius:Wt,borderEndEndRadius:Wt,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${Pn}`,overflow:"hidden",[`${$e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${$e}-handler-up-inner,
|
|
|
${$e}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:Se.handleFontSize}}},[`${$e}-handler`]:{height:"50%",overflow:"hidden",color:qt,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${(0,$t.unit)(lt)} ${Tt} ${Xt}`,transition:`all ${Pn} linear`,"&:active":{background:Xn},"&:hover":{height:"60%",[`
|
|
|
${$e}-handler-up-inner,
|
|
|
${$e}-handler-down-inner
|
|
|
`]:{color:pn}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Ft.Ro)()),{color:qt,transition:`all ${Pn} linear`,userSelect:"none"})},[`${$e}-handler-up`]:{borderStartEndRadius:Wt},[`${$e}-handler-down`]:{borderEndEndRadius:Wt}},on(Se,"lg")),on(Se,"sm")),{"&-disabled, &-readonly":{[`${$e}-handler-wrap`]:{display:"none"},[`${$e}-input`]:{color:"inherit"}},[`
|
|
|
${$e}-handler-up-disabled,
|
|
|
${$e}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${$e}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${$e}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Nn}})}]},kt=Se=>{const{componentCls:$e,paddingBlock:lt,paddingInline:Tt,inputAffixPadding:Wt,controlWidth:ln,borderRadiusLG:Dn,borderRadiusSM:In,paddingInlineLG:dn,paddingInlineSM:Cn,paddingBlockLG:fn,paddingBlockSM:$n,motionDurationMid:yn}=Se;return{[`${$e}-affix-wrapper`]:Object.assign(Object.assign({[`input${$e}-input`]:{padding:`${(0,$t.unit)(lt)} 0`}},(0,Ye.ik)(Se)),{position:"relative",display:"inline-flex",alignItems:"center",width:ln,padding:0,paddingInlineStart:Tt,"&-lg":{borderRadius:Dn,paddingInlineStart:dn,[`input${$e}-input`]:{padding:`${(0,$t.unit)(fn)} 0`}},"&-sm":{borderRadius:In,paddingInlineStart:Cn,[`input${$e}-input`]:{padding:`${(0,$t.unit)($n)} 0`}},[`&:not(${$e}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${$e}-disabled`]:{background:"transparent"},[`> div${$e}`]:{width:"100%",border:"none",outline:"none",[`&${$e}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${$e}-handler-wrap`]:{zIndex:2},[$e]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Wt},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:Tt,marginInlineStart:Wt,transition:`margin ${yn}`}},[`&:hover ${$e}-handler-wrap, &-focused ${$e}-handler-wrap`]:{width:Se.handleWidth,opacity:1},[`&:not(${$e}-affix-wrapper-without-controls):hover ${$e}-suffix`]:{marginInlineEnd:Se.calc(Se.handleWidth).add(Tt).equal()}})}};var Mn=(0,Qt.I$)("InputNumber",Se=>{const $e=(0,Jt.mergeToken)(Se,(0,ct.e)(Se));return[gn($e),kt($e),(0,Pt.c)($e)]},Sn,{unitless:{handleOpacity:!0}}),nn=function(Se,$e){var lt={};for(var Tt in Se)Object.prototype.hasOwnProperty.call(Se,Tt)&&$e.indexOf(Tt)<0&&(lt[Tt]=Se[Tt]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Tt=Object.getOwnPropertySymbols(Se);Wt<Tt.length;Wt++)$e.indexOf(Tt[Wt])<0&&Object.prototype.propertyIsEnumerable.call(Se,Tt[Wt])&&(lt[Tt[Wt]]=Se[Tt[Wt]]);return lt};const Me=te.forwardRef((Se,$e)=>{const{getPrefixCls:lt,direction:Tt}=te.useContext(se.E_),Wt=te.useRef(null);te.useImperativeHandle($e,()=>Wt.current);const{className:ln,rootClassName:Dn,size:In,disabled:dn,prefixCls:Cn,addonBefore:fn,addonAfter:$n,prefix:yn,suffix:hn,bordered:qt,readOnly:Pn,status:pn,controls:Ln,variant:Gn}=Se,jn=nn(Se,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),Bn=lt("input-number",Cn),Xn=(0,oe.Z)(Bn),[Nn,ar,qn]=Mn(Bn,Xn),{compactSize:It,compactItemClassnames:Xt}=(0,at.ri)(Bn,Tt);let zn=te.createElement(me.Z,{className:`${Bn}-handler-up-inner`}),nr=te.createElement(ot.Z,{className:`${Bn}-handler-down-inner`});const De=typeof Ln=="boolean"?Ln:void 0;typeof Ln=="object"&&(zn=typeof Ln.upIcon=="undefined"?zn:te.createElement("span",{className:`${Bn}-handler-up-inner`},Ln.upIcon),nr=typeof Ln.downIcon=="undefined"?nr:te.createElement("span",{className:`${Bn}-handler-down-inner`},Ln.downIcon));const{hasFeedback:_e,status:ge,isFormItemInput:Pe,feedbackIcon:ye}=te.useContext(re.aM),Oe=(0,mt.F)(ge,pn),pe=(0,le.Z)(zt=>{var Zt;return(Zt=In!=null?In:It)!==null&&Zt!==void 0?Zt:zt}),Fe=te.useContext(z.Z),je=dn!=null?dn:Fe,[tt,Ze]=(0,Ee.Z)("inputNumber",Gn,qt),Le=_e&&te.createElement(te.Fragment,null,ye),Te=xe()({[`${Bn}-lg`]:pe==="large",[`${Bn}-sm`]:pe==="small",[`${Bn}-rtl`]:Tt==="rtl",[`${Bn}-in-form-item`]:Pe},ar),Ue=`${Bn}-group`,Vt=te.createElement(it,Object.assign({ref:Wt,disabled:je,className:xe()(qn,Xn,ln,Dn,Xt),upHandler:zn,downHandler:nr,prefixCls:Bn,readOnly:Pn,controls:De,prefix:yn,suffix:Le||hn,addonBefore:fn&&te.createElement(Gt.Z,{form:!0,space:!0},fn),addonAfter:$n&&te.createElement(Gt.Z,{form:!0,space:!0},$n),classNames:{input:Te,variant:xe()({[`${Bn}-${tt}`]:Ze},(0,mt.Z)(Bn,Oe,_e)),affixWrapper:xe()({[`${Bn}-affix-wrapper-sm`]:pe==="small",[`${Bn}-affix-wrapper-lg`]:pe==="large",[`${Bn}-affix-wrapper-rtl`]:Tt==="rtl",[`${Bn}-affix-wrapper-without-controls`]:Ln===!1||je},ar),wrapper:xe()({[`${Ue}-rtl`]:Tt==="rtl"},ar),groupWrapper:xe()({[`${Bn}-group-wrapper-sm`]:pe==="small",[`${Bn}-group-wrapper-lg`]:pe==="large",[`${Bn}-group-wrapper-rtl`]:Tt==="rtl",[`${Bn}-group-wrapper-${tt}`]:Ze},(0,mt.Z)(`${Bn}-group-wrapper`,Oe,_e),ar)}},jn));return Nn(Vt)}),et=Me,Lt=Se=>te.createElement(ee.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},te.createElement(Me,Object.assign({},Se)));et._InternalPanelDoNotUseOrYouWillBeFired=Lt;var Rt=et},49397:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return ft}});var te=ie(59301),ot=ie(92310),me=ie.n(ot),Ge=ie(36901),xe=ie(8654),Ce=ie(62487),ze=ie(86013),Ke=ie(82855),ke=ie(48755),fe=ie(2171),Qe=ie(83397),be=ie(31756),xt=ie(56553),rt=ie(24971),Re=ie(70045),He=ie(23826),Ie=ie(53075);function ut(nt){return!!(nt.prefix||nt.suffix||nt.allowClear||nt.showCount)}var gt=function(nt,vt){var We={};for(var At in nt)Object.prototype.hasOwnProperty.call(nt,At)&&vt.indexOf(At)<0&&(We[At]=nt[At]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,At=Object.getOwnPropertySymbols(nt);st<At.length;st++)vt.indexOf(At[st])<0&&Object.prototype.propertyIsEnumerable.call(nt,At[st])&&(We[At[st]]=nt[At[st]]);return We},ft=(0,te.forwardRef)((nt,vt)=>{const{prefixCls:We,bordered:At=!0,status:st,size:qe,disabled:Mt,onBlur:Ve,onFocus:pt,suffix:ht,allowClear:ve,addonAfter:Bt,addonBefore:Ae,className:Nt,style:rn,styles:we,rootClassName:de,onChange:Je,classNames:wt,variant:Et}=nt,Be=gt(nt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:dt,direction:bt,allowClear:tn,autoComplete:Ot,className:jt,style:it,classNames:Gt,styles:mt}=(0,ke.dj)("input"),se=dt("input",We),ee=(0,te.useRef)(null),z=(0,Qe.Z)(se),[oe,le,re]=(0,Ie.TI)(se,de),[Ee]=(0,Ie.ZP)(se,z),{compactSize:at,compactItemClassnames:$t}=(0,Re.ri)(se,bt),Ye=(0,be.Z)(Rt=>{var Se;return(Se=qe!=null?qe:at)!==null&&Se!==void 0?Se:Rt}),ct=te.useContext(fe.Z),St=Mt!=null?Mt:ct,{status:Ft,hasFeedback:Pt,feedbackIcon:Qt}=(0,te.useContext)(xt.aM),Jt=(0,Ke.F)(Ft,st),Ut=ut(nt)||!!Pt,Sn=(0,te.useRef)(Ut),on=(0,He.Z)(ee,!0),gn=Rt=>{on(),Ve==null||Ve(Rt)},kt=Rt=>{on(),pt==null||pt(Rt)},Mn=Rt=>{on(),Je==null||Je(Rt)},nn=(Pt||ht)&&te.createElement(te.Fragment,null,ht,Pt&&Qt),Me=(0,ze.Z)(ve!=null?ve:tn),[et,Lt]=(0,rt.Z)("input",Et,At);return oe(Ee(te.createElement(Ge.default,Object.assign({ref:(0,xe.sQ)(vt,ee),prefixCls:se,autoComplete:Ot},Be,{disabled:St,onBlur:gn,onFocus:kt,style:Object.assign(Object.assign({},it),rn),styles:Object.assign(Object.assign({},mt),we),suffix:nn,allowClear:Me,className:me()(Nt,de,re,z,$t,jt),onChange:Mn,addonBefore:Ae&&te.createElement(Ce.Z,{form:!0,space:!0},Ae),addonAfter:Bt&&te.createElement(Ce.Z,{form:!0,space:!0},Bt),classNames:Object.assign(Object.assign(Object.assign({},wt),Gt),{input:me()({[`${se}-sm`]:Ye==="small",[`${se}-lg`]:Ye==="large",[`${se}-rtl`]:bt==="rtl"},wt==null?void 0:wt.input,Gt.input,le),variant:me()({[`${se}-${et}`]:Lt},(0,Ke.Z)(se,Jt)),affixWrapper:me()({[`${se}-affix-wrapper-sm`]:Ye==="small",[`${se}-affix-wrapper-lg`]:Ye==="large",[`${se}-affix-wrapper-rtl`]:bt==="rtl"},le),wrapper:me()({[`${se}-group-rtl`]:bt==="rtl"},le),groupWrapper:me()({[`${se}-group-wrapper-sm`]:Ye==="small",[`${se}-group-wrapper-lg`]:Ye==="large",[`${se}-group-wrapper-rtl`]:bt==="rtl",[`${se}-group-wrapper-${et}`]:Lt},(0,Ke.Z)(`${se}-group-wrapper`,Jt,Pt),le)})}))))})},79809:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return vt}});var te=ie(59301),ot=ie(92310),me=ie.n(ot),Ge=ie(22711),xe=ie(86013),Ce=ie(82855),ze=ie(48755),Ke=ie(2171),ke=ie(83397),fe=ie(31756),Qe=ie(56553),be=ie(24971),xt=ie(70045),rt=ie(30292),Re=ie(53075),He=ie(16931),Ie=ie(51636),ut=ie(64910);const gt=We=>{const{componentCls:At,paddingLG:st}=We,qe=`${At}-textarea`;return{[`textarea${At}`]:{maxWidth:"100%",height:"auto",minHeight:We.controlHeight,lineHeight:We.lineHeight,verticalAlign:"bottom",transition:`all ${We.motionDurationSlow}`,resize:"vertical",[`&${At}-mouse-active`]:{transition:`all ${We.motionDurationSlow}, height 0s, width 0s`}},[`${At}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[qe]:{position:"relative","&-show-count":{[`> ${At}`]:{height:"100%"},[`${At}-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 > ${At},
|
|
|
&-affix-wrapper${qe}-has-feedback ${At}
|
|
|
`]:{paddingInlineEnd:st},[`&-affix-wrapper${At}-affix-wrapper`]:{padding:0,[`> textarea${At}`]:{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"}},[`${At}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${At}-clear-icon`]:{position:"absolute",insetInlineEnd:We.paddingInline,insetBlockStart:We.paddingXS},[`${qe}-suffix`]:{position:"absolute",top:0,insetInlineEnd:We.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${At}-affix-wrapper-sm`]:{[`${At}-suffix`]:{[`${At}-clear-icon`]:{insetInlineEnd:We.paddingInlineSM}}}}}};var yt=(0,He.I$)(["Input","TextArea"],We=>{const At=(0,Ie.mergeToken)(We,(0,ut.e)(We));return[gt(At)]},ut.T,{resetFont:!1}),ft=function(We,At){var st={};for(var qe in We)Object.prototype.hasOwnProperty.call(We,qe)&&At.indexOf(qe)<0&&(st[qe]=We[qe]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mt=0,qe=Object.getOwnPropertySymbols(We);Mt<qe.length;Mt++)At.indexOf(qe[Mt])<0&&Object.prototype.propertyIsEnumerable.call(We,qe[Mt])&&(st[qe[Mt]]=We[qe[Mt]]);return st},vt=(0,te.forwardRef)((We,At)=>{var st;const{prefixCls:qe,bordered:Mt=!0,size:Ve,disabled:pt,status:ht,allowClear:ve,classNames:Bt,rootClassName:Ae,className:Nt,style:rn,styles:we,variant:de,showCount:Je,onMouseDown:wt,onResize:Et}=We,Be=ft(We,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:dt,direction:bt,allowClear:tn,autoComplete:Ot,className:jt,style:it,classNames:Gt,styles:mt}=(0,ze.dj)("textArea"),se=te.useContext(Ke.Z),ee=pt!=null?pt:se,{status:z,hasFeedback:oe,feedbackIcon:le}=te.useContext(Qe.aM),re=(0,Ce.F)(z,ht),Ee=te.useRef(null);te.useImperativeHandle(At,()=>{var Lt;return{resizableTextArea:(Lt=Ee.current)===null||Lt===void 0?void 0:Lt.resizableTextArea,focus:Rt=>{var Se,$e;(0,rt.nH)(($e=(Se=Ee.current)===null||Se===void 0?void 0:Se.resizableTextArea)===null||$e===void 0?void 0:$e.textArea,Rt)},blur:()=>{var Rt;return(Rt=Ee.current)===null||Rt===void 0?void 0:Rt.blur()}}});const at=dt("input",qe),$t=(0,ke.Z)(at),[Ye,ct,St]=(0,Re.TI)(at,Ae),[Ft]=yt(at,$t),{compactSize:Pt,compactItemClassnames:Qt}=(0,xt.ri)(at,bt),Jt=(0,fe.Z)(Lt=>{var Rt;return(Rt=Ve!=null?Ve:Pt)!==null&&Rt!==void 0?Rt:Lt}),[Ut,Sn]=(0,be.Z)("textArea",de,Mt),on=(0,xe.Z)(ve!=null?ve:tn),[gn,kt]=te.useState(!1),[Mn,nn]=te.useState(!1),Me=Lt=>{kt(!0),wt==null||wt(Lt);const Rt=()=>{kt(!1),document.removeEventListener("mouseup",Rt)};document.addEventListener("mouseup",Rt)},et=Lt=>{var Rt,Se;if(Et==null||Et(Lt),gn&&typeof getComputedStyle=="function"){const $e=(Se=(Rt=Ee.current)===null||Rt===void 0?void 0:Rt.nativeElement)===null||Se===void 0?void 0:Se.querySelector("textarea");$e&&getComputedStyle($e).resize==="both"&&nn(!0)}};return Ye(Ft(te.createElement(Ge.default,Object.assign({autoComplete:Ot},Be,{style:Object.assign(Object.assign({},it),rn),styles:Object.assign(Object.assign({},mt),we),disabled:ee,allowClear:on,className:me()(St,$t,Nt,Ae,Qt,jt,Mn&&`${at}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},Bt),Gt),{textarea:me()({[`${at}-sm`]:Jt==="small",[`${at}-lg`]:Jt==="large"},ct,Bt==null?void 0:Bt.textarea,Gt.textarea,gn&&`${at}-mouse-active`),variant:me()({[`${at}-${Ut}`]:Sn},(0,Ce.Z)(at,re)),affixWrapper:me()(`${at}-textarea-affix-wrapper`,{[`${at}-affix-wrapper-rtl`]:bt==="rtl",[`${at}-affix-wrapper-sm`]:Jt==="small",[`${at}-affix-wrapper-lg`]:Jt==="large",[`${at}-textarea-show-count`]:Je||((st=We.count)===null||st===void 0?void 0:st.show)},ct)}),prefixCls:at,suffix:oe&&te.createElement("span",{className:`${at}-textarea-suffix`},le),showCount:Je,ref:Ee,onResize:et,onMouseDown:Me}))))})},23826:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return ot}});var te=ie(59301);function ot(me,Ge){const xe=(0,te.useRef)([]),Ce=()=>{xe.current.push(setTimeout(()=>{var ze,Ke,ke,fe;!((ze=me.current)===null||ze===void 0)&&ze.input&&((Ke=me.current)===null||Ke===void 0?void 0:Ke.input.getAttribute("type"))==="password"&&(!((ke=me.current)===null||ke===void 0)&&ke.input.hasAttribute("value"))&&((fe=me.current)===null||fe===void 0||fe.input.removeAttribute("value"))}))};return(0,te.useEffect)(()=>(Ge&&Ce(),()=>xe.current.forEach(ze=>{ze&&clearTimeout(ze)})),[]),Ce}},37568:function(en,Ht,ie){"use strict";ie.d(Ht,{default:function(){return Gt}});var te=ie(59301),ot=ie(92310),me=ie.n(ot),Ge=ie(48755),xe=ie(56553),Ce=ie(53075),Ke=mt=>{const{getPrefixCls:se,direction:ee}=(0,te.useContext)(Ge.E_),{prefixCls:z,className:oe}=mt,le=se("input-group",z),re=se("input"),[Ee,at,$t]=(0,Ce.ZP)(re),Ye=me()(le,$t,{[`${le}-lg`]:mt.size==="large",[`${le}-sm`]:mt.size==="small",[`${le}-compact`]:mt.compact,[`${le}-rtl`]:ee==="rtl"},at,oe),ct=(0,te.useContext)(xe.aM),St=(0,te.useMemo)(()=>Object.assign(Object.assign({},ct),{isFormItemInput:!1}),[ct]);return Ee(te.createElement("span",{className:Ye,style:mt.style,onMouseEnter:mt.onMouseEnter,onMouseLeave:mt.onMouseLeave,onFocus:mt.onFocus,onBlur:mt.onBlur},te.createElement(xe.aM.Provider,{value:St},mt.children)))},ke=ie(49397),fe=ie(77654),Qe=ie(6089),be=ie(26112),xt=ie(82855),rt=ie(31756),Re=ie(16931),He=ie(51636),Ie=ie(64910);const ut=mt=>{const{componentCls:se,paddingXS:ee}=mt;return{[se]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:ee,"&-rtl":{direction:"rtl"},[`${se}-input`]:{textAlign:"center",paddingInline:mt.paddingXXS},[`&${se}-sm ${se}-input`]:{paddingInline:mt.calc(mt.paddingXXS).div(2).equal()},[`&${se}-lg ${se}-input`]:{paddingInline:mt.paddingXS}}}};var gt=(0,Re.I$)(["Input","OTP"],mt=>{const se=(0,He.mergeToken)(mt,(0,Ie.e)(mt));return[ut(se)]},Ie.T),yt=ie(16089),ft=function(mt,se){var ee={};for(var z in mt)Object.prototype.hasOwnProperty.call(mt,z)&&se.indexOf(z)<0&&(ee[z]=mt[z]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(mt);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(mt,z[oe])&&(ee[z[oe]]=mt[z[oe]]);return ee},vt=te.forwardRef((mt,se)=>{const{value:ee,onChange:z,onActiveChange:oe,index:le,mask:re}=mt,Ee=ft(mt,["value","onChange","onActiveChange","index","mask"]),at=ee&&typeof re=="string"?re:ee,$t=Pt=>{z(le,Pt.target.value)},Ye=te.useRef(null);te.useImperativeHandle(se,()=>Ye.current);const ct=()=>{(0,yt.Z)(()=>{var Pt;const Qt=(Pt=Ye.current)===null||Pt===void 0?void 0:Pt.input;document.activeElement===Qt&&Qt&&Qt.select()})},St=Pt=>{const{key:Qt,ctrlKey:Jt,metaKey:Ut}=Pt;Qt==="ArrowLeft"?oe(le-1):Qt==="ArrowRight"?oe(le+1):Qt==="z"&&(Jt||Ut)&&Pt.preventDefault(),ct()},Ft=Pt=>{Pt.key==="Backspace"&&!ee&&oe(le-1),ct()};return te.createElement(ke.Z,Object.assign({type:re===!0?"password":"text"},Ee,{ref:Ye,value:at,onInput:$t,onFocus:ct,onKeyDown:St,onKeyUp:Ft,onMouseDown:ct,onMouseUp:ct}))}),We=function(mt,se){var ee={};for(var z in mt)Object.prototype.hasOwnProperty.call(mt,z)&&se.indexOf(z)<0&&(ee[z]=mt[z]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(mt);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(mt,z[oe])&&(ee[z[oe]]=mt[z[oe]]);return ee};function At(mt){return(mt||"").split("")}const st=mt=>{const{index:se,prefixCls:ee,separator:z}=mt,oe=typeof z=="function"?z(se):z;return oe?te.createElement("span",{className:`${ee}-separator`},oe):null};var Mt=te.forwardRef((mt,se)=>{const{prefixCls:ee,length:z=6,size:oe,defaultValue:le,value:re,onChange:Ee,formatter:at,separator:$t,variant:Ye,disabled:ct,status:St,autoFocus:Ft,mask:Pt,type:Qt,onInput:Jt,inputMode:Ut}=mt,Sn=We(mt,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:on,direction:gn}=te.useContext(Ge.E_),kt=on("otp",ee),Mn=(0,be.Z)(Sn,{aria:!0,data:!0,attr:!0}),[nn,Me,et]=gt(kt),Lt=(0,rt.Z)(yn=>oe!=null?oe:yn),Rt=te.useContext(xe.aM),Se=(0,xt.F)(Rt.status,St),$e=te.useMemo(()=>Object.assign(Object.assign({},Rt),{status:Se,hasFeedback:!1,feedbackIcon:null}),[Rt,Se]),lt=te.useRef(null),Tt=te.useRef({});te.useImperativeHandle(se,()=>({focus:()=>{var yn;(yn=Tt.current[0])===null||yn===void 0||yn.focus()},blur:()=>{var yn;for(let hn=0;hn<z;hn+=1)(yn=Tt.current[hn])===null||yn===void 0||yn.blur()},nativeElement:lt.current}));const Wt=yn=>at?at(yn):yn,[ln,Dn]=te.useState(()=>At(Wt(le||"")));te.useEffect(()=>{re!==void 0&&Dn(At(re))},[re]);const In=(0,Qe.Z)(yn=>{Dn(yn),Jt&&Jt(yn),Ee&&yn.length===z&&yn.every(hn=>hn)&&yn.some((hn,qt)=>ln[qt]!==hn)&&Ee(yn.join(""))}),dn=(0,Qe.Z)((yn,hn)=>{let qt=(0,fe.Z)(ln);for(let pn=0;pn<yn;pn+=1)qt[pn]||(qt[pn]="");hn.length<=1?qt[yn]=hn:qt=qt.slice(0,yn).concat(At(hn)),qt=qt.slice(0,z);for(let pn=qt.length-1;pn>=0&&!qt[pn];pn-=1)qt.pop();const Pn=Wt(qt.map(pn=>pn||" ").join(""));return qt=At(Pn).map((pn,Ln)=>pn===" "&&!qt[Ln]?qt[Ln]:pn),qt}),Cn=(yn,hn)=>{var qt;const Pn=dn(yn,hn),pn=Math.min(yn+hn.length,z-1);pn!==yn&&Pn[yn]!==void 0&&((qt=Tt.current[pn])===null||qt===void 0||qt.focus()),In(Pn)},fn=yn=>{var hn;(hn=Tt.current[yn])===null||hn===void 0||hn.focus()},$n={variant:Ye,disabled:ct,status:Se,mask:Pt,type:Qt,inputMode:Ut};return nn(te.createElement("div",Object.assign({},Mn,{ref:lt,className:me()(kt,{[`${kt}-sm`]:Lt==="small",[`${kt}-lg`]:Lt==="large",[`${kt}-rtl`]:gn==="rtl"},et,Me)}),te.createElement(xe.aM.Provider,{value:$e},Array.from({length:z}).map((yn,hn)=>{const qt=`otp-${hn}`,Pn=ln[hn]||"";return te.createElement(te.Fragment,{key:qt},te.createElement(vt,Object.assign({ref:pn=>{Tt.current[hn]=pn},index:hn,size:Lt,htmlSize:1,className:`${kt}-input`,onChange:Cn,value:Pn,onActiveChange:fn,autoFocus:hn===0&&Ft},$n)),hn<z-1&&te.createElement(st,{separator:$t,index:hn,prefixCls:kt}))}))))}),Ve=ie(73331),pt=ie(15277),ht=ie(2738),ve=ie(8654),Bt=ie(2171),Ae=ie(23826),Nt=function(mt,se){var ee={};for(var z in mt)Object.prototype.hasOwnProperty.call(mt,z)&&se.indexOf(z)<0&&(ee[z]=mt[z]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(mt);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(mt,z[oe])&&(ee[z[oe]]=mt[z[oe]]);return ee};const rn=mt=>mt?te.createElement(pt.Z,null):te.createElement(Ve.Z,null),we={click:"onClick",hover:"onMouseOver"};var Je=te.forwardRef((mt,se)=>{const{disabled:ee,action:z="click",visibilityToggle:oe=!0,iconRender:le=rn}=mt,re=te.useContext(Bt.Z),Ee=ee!=null?ee:re,at=typeof oe=="object"&&oe.visible!==void 0,[$t,Ye]=(0,te.useState)(()=>at?oe.visible:!1),ct=(0,te.useRef)(null);te.useEffect(()=>{at&&Ye(oe.visible)},[at,oe]);const St=(0,Ae.Z)(ct),Ft=()=>{var Lt;if(Ee)return;$t&&St();const Rt=!$t;Ye(Rt),typeof oe=="object"&&((Lt=oe.onVisibleChange)===null||Lt===void 0||Lt.call(oe,Rt))},Pt=Lt=>{const Rt=we[z]||"",Se=le($t),$e={[Rt]:Ft,className:`${Lt}-icon`,key:"passwordIcon",onMouseDown:lt=>{lt.preventDefault()},onMouseUp:lt=>{lt.preventDefault()}};return te.cloneElement(te.isValidElement(Se)?Se:te.createElement("span",null,Se),$e)},{className:Qt,prefixCls:Jt,inputPrefixCls:Ut,size:Sn}=mt,on=Nt(mt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:gn}=te.useContext(Ge.E_),kt=gn("input",Ut),Mn=gn("input-password",Jt),nn=oe&&Pt(Mn),Me=me()(Mn,Qt,{[`${Mn}-${Sn}`]:!!Sn}),et=Object.assign(Object.assign({},(0,ht.Z)(on,["suffix","iconRender","visibilityToggle"])),{type:$t?"text":"password",className:Me,prefixCls:kt,suffix:nn});return Sn&&(et.size=Sn),te.createElement(ke.Z,Object.assign({ref:(0,ve.sQ)(se,ct)},et))}),wt=ie(47472),Et=ie(22703),Be=ie(7939),dt=ie(70045),bt=function(mt,se){var ee={};for(var z in mt)Object.prototype.hasOwnProperty.call(mt,z)&&se.indexOf(z)<0&&(ee[z]=mt[z]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(mt);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(mt,z[oe])&&(ee[z[oe]]=mt[z[oe]]);return ee},Ot=te.forwardRef((mt,se)=>{const{prefixCls:ee,inputPrefixCls:z,className:oe,size:le,suffix:re,enterButton:Ee=!1,addonAfter:at,loading:$t,disabled:Ye,onSearch:ct,onChange:St,onCompositionStart:Ft,onCompositionEnd:Pt}=mt,Qt=bt(mt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Jt,direction:Ut}=te.useContext(Ge.E_),Sn=te.useRef(!1),on=Jt("input-search",ee),gn=Jt("input",z),{compactSize:kt}=(0,dt.ri)(on,Ut),Mn=(0,rt.Z)(Cn=>{var fn;return(fn=le!=null?le:kt)!==null&&fn!==void 0?fn:Cn}),nn=te.useRef(null),Me=Cn=>{Cn!=null&&Cn.target&&Cn.type==="click"&&ct&&ct(Cn.target.value,Cn,{source:"clear"}),St==null||St(Cn)},et=Cn=>{var fn;document.activeElement===((fn=nn.current)===null||fn===void 0?void 0:fn.input)&&Cn.preventDefault()},Lt=Cn=>{var fn,$n;ct&&ct(($n=(fn=nn.current)===null||fn===void 0?void 0:fn.input)===null||$n===void 0?void 0:$n.value,Cn,{source:"input"})},Rt=Cn=>{Sn.current||$t||Lt(Cn)},Se=typeof Ee=="boolean"?te.createElement(wt.Z,null):null,$e=`${on}-button`;let lt;const Tt=Ee||{},Wt=Tt.type&&Tt.type.__ANT_BUTTON===!0;Wt||Tt.type==="button"?lt=(0,Et.Tm)(Tt,Object.assign({onMouseDown:et,onClick:Cn=>{var fn,$n;($n=(fn=Tt==null?void 0:Tt.props)===null||fn===void 0?void 0:fn.onClick)===null||$n===void 0||$n.call(fn,Cn),Lt(Cn)},key:"enterButton"},Wt?{className:$e,size:Mn}:{})):lt=te.createElement(Be.ZP,{className:$e,type:Ee?"primary":void 0,size:Mn,disabled:Ye,key:"enterButton",onMouseDown:et,onClick:Lt,loading:$t,icon:Se},Ee),at&&(lt=[lt,(0,Et.Tm)(at,{key:"addonAfter"})]);const ln=me()(on,{[`${on}-rtl`]:Ut==="rtl",[`${on}-${Mn}`]:!!Mn,[`${on}-with-button`]:!!Ee},oe),Dn=Object.assign(Object.assign({},Qt),{className:ln,prefixCls:gn,type:"search"}),In=Cn=>{Sn.current=!0,Ft==null||Ft(Cn)},dn=Cn=>{Sn.current=!1,Pt==null||Pt(Cn)};return te.createElement(ke.Z,Object.assign({ref:(0,ve.sQ)(nn,se),onPressEnter:Rt},Dn,{size:Mn,onCompositionStart:In,onCompositionEnd:dn,addonAfter:lt,suffix:re,onChange:Me,disabled:Ye}))}),jt=ie(79809);const it=ke.Z;it.Group=Ke,it.Search=Ot,it.TextArea=jt.Z,it.Password=Je,it.OTP=Mt;var Gt=it},89787:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return nn}});var te=ie(59301),ot=ie(17835),me=ie(29679),Ge=ie(40001),xe=ie(19248),Ce=ie(99267),ze=ie(92310),Ke=ie.n(ze),ke=ie(2738),fe=ie(48755),Qe=ie(60499),be=ie(85899),xt=ie(42244),rt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Re=function(){var et=(0,te.useRef)([]),Lt=(0,te.useRef)(null);return(0,te.useEffect)(function(){var Rt=Date.now(),Se=!1;et.current.forEach(function($e){if($e){Se=!0;var lt=$e.style;lt.transitionDuration=".3s, .3s, .3s, .06s",Lt.current&&Rt-Lt.current<100&&(lt.transitionDuration="0s, 0s")}}),Se&&(Lt.current=Date.now())}),et.current},He=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Ie=function(et){var Lt=(0,be.Z)((0,be.Z)({},rt),et),Rt=Lt.className,Se=Lt.percent,$e=Lt.prefixCls,lt=Lt.strokeColor,Tt=Lt.strokeLinecap,Wt=Lt.strokeWidth,ln=Lt.style,Dn=Lt.trailColor,In=Lt.trailWidth,dn=Lt.transition,Cn=(0,xt.Z)(Lt,He);delete Cn.gapPosition;var fn=Array.isArray(Se)?Se:[Se],$n=Array.isArray(lt)?lt:[lt],yn=Re(),hn=Wt/2,qt=100-Wt/2,Pn="M ".concat(Tt==="round"?hn:0,",").concat(hn,`
|
|
|
L `).concat(Tt==="round"?qt:100,",").concat(hn),pn="0 0 100 ".concat(Wt),Ln=0;return te.createElement("svg",(0,Qe.Z)({className:Ke()("".concat($e,"-line"),Rt),viewBox:pn,preserveAspectRatio:"none",style:ln},Cn),te.createElement("path",{className:"".concat($e,"-line-trail"),d:Pn,strokeLinecap:Tt,stroke:Dn,strokeWidth:In||Wt,fillOpacity:"0"}),fn.map(function(Gn,jn){var Bn=1;switch(Tt){case"round":Bn=1-Wt/100;break;case"square":Bn=1-Wt/2/100;break;default:Bn=1;break}var Xn={strokeDasharray:"".concat(Gn*Bn,"px, 100px"),strokeDashoffset:"-".concat(Ln,"px"),transition:dn||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Nn=$n[jn]||$n[$n.length-1];return Ln+=Gn,te.createElement("path",{key:jn,className:"".concat($e,"-line-path"),d:Pn,strokeLinecap:Tt,stroke:Nn,strokeWidth:Wt,fillOpacity:"0",ref:function(qn){yn[jn]=qn},style:Xn})}))},ut=Ie,gt=ie(43749),yt=ie(72190),ft=ie(47273),nt=0,vt=(0,ft.Z)();function We(){var Me;return vt?(Me=nt,nt+=1):Me="TEST_OR_SSR",Me}var At=function(Me){var et=te.useState(),Lt=(0,yt.Z)(et,2),Rt=Lt[0],Se=Lt[1];return te.useEffect(function(){Se("rc_progress_".concat(We()))},[]),Me||Rt},st=function(et){var Lt=et.bg,Rt=et.children;return te.createElement("div",{style:{width:"100%",height:"100%",background:Lt}},Rt)};function qe(Me,et){return Object.keys(Me).map(function(Lt){var Rt=parseFloat(Lt),Se="".concat(Math.floor(Rt*et),"%");return"".concat(Me[Lt]," ").concat(Se)})}var Mt=te.forwardRef(function(Me,et){var Lt=Me.prefixCls,Rt=Me.color,Se=Me.gradientId,$e=Me.radius,lt=Me.style,Tt=Me.ptg,Wt=Me.strokeLinecap,ln=Me.strokeWidth,Dn=Me.size,In=Me.gapDegree,dn=Rt&&(0,gt.Z)(Rt)==="object",Cn=dn?"#FFF":void 0,fn=Dn/2,$n=te.createElement("circle",{className:"".concat(Lt,"-circle-path"),r:$e,cx:fn,cy:fn,stroke:Cn,strokeLinecap:Wt,strokeWidth:ln,opacity:Tt===0?0:1,style:lt,ref:et});if(!dn)return $n;var yn="".concat(Se,"-conic"),hn=In?"".concat(180+In/2,"deg"):"0deg",qt=qe(Rt,(360-In)/360),Pn=qe(Rt,1),pn="conic-gradient(from ".concat(hn,", ").concat(qt.join(", "),")"),Ln="linear-gradient(to ".concat(In?"bottom":"top",", ").concat(Pn.join(", "),")");return te.createElement(te.Fragment,null,te.createElement("mask",{id:yn},$n),te.createElement("foreignObject",{x:0,y:0,width:Dn,height:Dn,mask:"url(#".concat(yn,")")},te.createElement(st,{bg:Ln},te.createElement(st,{bg:pn}))))}),Ve=Mt,pt=100,ht=function(et,Lt,Rt,Se,$e,lt,Tt,Wt,ln,Dn){var In=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,dn=Rt/100*360*((360-lt)/360),Cn=lt===0?0:{bottom:0,top:180,left:90,right:-90}[Tt],fn=(100-Se)/100*Lt;ln==="round"&&Se!==100&&(fn+=Dn/2,fn>=Lt&&(fn=Lt-.01));var $n=pt/2;return{stroke:typeof Wt=="string"?Wt:void 0,strokeDasharray:"".concat(Lt,"px ").concat(et),strokeDashoffset:fn+In,transform:"rotate(".concat($e+dn+Cn,"deg)"),transformOrigin:"".concat($n,"px ").concat($n,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},ve=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Bt(Me){var et=Me!=null?Me:[];return Array.isArray(et)?et:[et]}var Ae=function(et){var Lt=(0,be.Z)((0,be.Z)({},rt),et),Rt=Lt.id,Se=Lt.prefixCls,$e=Lt.steps,lt=Lt.strokeWidth,Tt=Lt.trailWidth,Wt=Lt.gapDegree,ln=Wt===void 0?0:Wt,Dn=Lt.gapPosition,In=Lt.trailColor,dn=Lt.strokeLinecap,Cn=Lt.style,fn=Lt.className,$n=Lt.strokeColor,yn=Lt.percent,hn=(0,xt.Z)(Lt,ve),qt=pt/2,Pn=At(Rt),pn="".concat(Pn,"-gradient"),Ln=qt-lt/2,Gn=Math.PI*2*Ln,jn=ln>0?90+ln/2:-90,Bn=Gn*((360-ln)/360),Xn=(0,gt.Z)($e)==="object"?$e:{count:$e,gap:2},Nn=Xn.count,ar=Xn.gap,qn=Bt(yn),It=Bt($n),Xt=It.find(function(ye){return ye&&(0,gt.Z)(ye)==="object"}),zn=Xt&&(0,gt.Z)(Xt)==="object",nr=zn?"butt":dn,De=ht(Gn,Bn,0,100,jn,ln,Dn,In,nr,lt),_e=Re(),ge=function(){var Oe=0;return qn.map(function(pe,Fe){var je=It[Fe]||It[It.length-1],tt=ht(Gn,Bn,Oe,pe,jn,ln,Dn,je,nr,lt);return Oe+=pe,te.createElement(Ve,{key:Fe,color:je,ptg:pe,radius:Ln,prefixCls:Se,gradientId:pn,style:tt,strokeLinecap:nr,strokeWidth:lt,gapDegree:ln,ref:function(Le){_e[Fe]=Le},size:pt})}).reverse()},Pe=function(){var Oe=Math.round(Nn*(qn[0]/100)),pe=100/Nn,Fe=0;return new Array(Nn).fill(null).map(function(je,tt){var Ze=tt<=Oe-1?It[0]:In,Le=Ze&&(0,gt.Z)(Ze)==="object"?"url(#".concat(pn,")"):void 0,Te=ht(Gn,Bn,Fe,pe,jn,ln,Dn,Ze,"butt",lt,ar);return Fe+=(Bn-Te.strokeDashoffset+ar)*100/Bn,te.createElement("circle",{key:tt,className:"".concat(Se,"-circle-path"),r:Ln,cx:qt,cy:qt,stroke:Le,strokeWidth:lt,opacity:1,style:Te,ref:function(Vt){_e[tt]=Vt}})})};return te.createElement("svg",(0,Qe.Z)({className:Ke()("".concat(Se,"-circle"),fn),viewBox:"0 0 ".concat(pt," ").concat(pt),style:Cn,id:Rt,role:"presentation"},hn),!Nn&&te.createElement("circle",{className:"".concat(Se,"-circle-trail"),r:Ln,cx:qt,cy:qt,stroke:In,strokeLinecap:nr,strokeWidth:Tt||lt,style:De}),Nn?Pe():ge())},Nt=Ae,rn={Line:ut,Circle:Nt},we=ie(25399),de=ie(68361);function Je(Me){return!Me||Me<0?0:Me>100?100:Me}function wt(Me){let{success:et,successPercent:Lt}=Me,Rt=Lt;return et&&"progress"in et&&(Rt=et.progress),et&&"percent"in et&&(Rt=et.percent),Rt}const Et=Me=>{let{percent:et,success:Lt,successPercent:Rt}=Me;const Se=Je(wt({success:Lt,successPercent:Rt}));return[Se,Je(Je(et)-Se)]},Be=Me=>{let{success:et={},strokeColor:Lt}=Me;const{strokeColor:Rt}=et;return[Rt||de.presetPrimaryColors.green,Lt||null]},dt=(Me,et,Lt)=>{var Rt,Se,$e,lt;let Tt=-1,Wt=-1;if(et==="step"){const ln=Lt.steps,Dn=Lt.strokeWidth;typeof Me=="string"||typeof Me=="undefined"?(Tt=Me==="small"?2:14,Wt=Dn!=null?Dn:8):typeof Me=="number"?[Tt,Wt]=[Me,Me]:[Tt=14,Wt=8]=Array.isArray(Me)?Me:[Me.width,Me.height],Tt*=ln}else if(et==="line"){const ln=Lt==null?void 0:Lt.strokeWidth;typeof Me=="string"||typeof Me=="undefined"?Wt=ln||(Me==="small"?6:8):typeof Me=="number"?[Tt,Wt]=[Me,Me]:[Tt=-1,Wt=8]=Array.isArray(Me)?Me:[Me.width,Me.height]}else(et==="circle"||et==="dashboard")&&(typeof Me=="string"||typeof Me=="undefined"?[Tt,Wt]=Me==="small"?[60,60]:[120,120]:typeof Me=="number"?[Tt,Wt]=[Me,Me]:Array.isArray(Me)&&(Tt=(Se=(Rt=Me[0])!==null&&Rt!==void 0?Rt:Me[1])!==null&&Se!==void 0?Se:120,Wt=(lt=($e=Me[0])!==null&&$e!==void 0?$e:Me[1])!==null&<!==void 0?lt:120));return[Tt,Wt]},bt=3,tn=Me=>bt/Me*100;var jt=Me=>{const{prefixCls:et,trailColor:Lt=null,strokeLinecap:Rt="round",gapPosition:Se,gapDegree:$e,width:lt=120,type:Tt,children:Wt,success:ln,size:Dn=lt,steps:In}=Me,[dn,Cn]=dt(Dn,"circle");let{strokeWidth:fn}=Me;fn===void 0&&(fn=Math.max(tn(dn),6));const $n={width:dn,height:Cn,fontSize:dn*.15+6},yn=te.useMemo(()=>{if($e||$e===0)return $e;if(Tt==="dashboard")return 75},[$e,Tt]),hn=Et(Me),qt=Se||Tt==="dashboard"&&"bottom"||void 0,Pn=Object.prototype.toString.call(Me.strokeColor)==="[object Object]",pn=Be({success:ln,strokeColor:Me.strokeColor}),Ln=Ke()(`${et}-inner`,{[`${et}-circle-gradient`]:Pn}),Gn=te.createElement(Nt,{steps:In,percent:In?hn[1]:hn,strokeWidth:fn,trailWidth:fn,strokeColor:In?pn[1]:pn,strokeLinecap:Rt,trailColor:Lt,prefixCls:et,gapDegree:yn,gapPosition:qt}),jn=dn<=20,Bn=te.createElement("div",{className:Ln,style:$n},Gn,!jn&&Wt);return jn?te.createElement(we.Z,{title:Wt},Bn):Bn},it=ie(36237),Gt=ie(63356),mt=ie(16931),se=ie(51636);const ee="--progress-line-stroke-color",z="--progress-percent",oe=Me=>{const et=Me?"100%":"-100%";return new it.Keyframes(`antProgress${Me?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${et}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${et}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},le=Me=>{const{componentCls:et,iconCls:Lt}=Me;return{[et]:Object.assign(Object.assign({},(0,Gt.Wf)(Me)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:Me.fontSize},[`${et}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${et}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:Me.remainingColor,borderRadius:Me.lineBorderRadius},[`${et}-inner:not(${et}-circle-gradient)`]:{[`${et}-circle-path`]:{stroke:Me.defaultColor}},[`${et}-success-bg, ${et}-bg`]:{position:"relative",background:Me.defaultColor,borderRadius:Me.lineBorderRadius,transition:`all ${Me.motionDurationSlow} ${Me.motionEaseInOutCirc}`},[`${et}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${et}-text`]:{width:"max-content",marginInlineStart:0,marginTop:Me.marginXXS}},[`${et}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${ee})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${et}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${et}-text-inner`]:{color:Me.colorWhite,[`&${et}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${et}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:Me.colorSuccess},[`${et}-text`]:{display:"inline-block",marginInlineStart:Me.marginXS,color:Me.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Lt]:{fontSize:Me.fontSize},[`&${et}-text-outer`]:{width:"max-content"},[`&${et}-text-outer${et}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:Me.marginXS}},[`${et}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,it.unit)(Me.paddingXXS)}`,[`&${et}-text-start`]:{justifyContent:"start"},[`&${et}-text-end`]:{justifyContent:"end"}},[`&${et}-status-active`]:{[`${et}-bg::before`]:{position:"absolute",inset:0,backgroundColor:Me.colorBgContainer,borderRadius:Me.lineBorderRadius,opacity:0,animationName:oe(),animationDuration:Me.progressActiveMotionDuration,animationTimingFunction:Me.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${et}-rtl${et}-status-active`]:{[`${et}-bg::before`]:{animationName:oe(!0)}},[`&${et}-status-exception`]:{[`${et}-bg`]:{backgroundColor:Me.colorError},[`${et}-text`]:{color:Me.colorError}},[`&${et}-status-exception ${et}-inner:not(${et}-circle-gradient)`]:{[`${et}-circle-path`]:{stroke:Me.colorError}},[`&${et}-status-success`]:{[`${et}-bg`]:{backgroundColor:Me.colorSuccess},[`${et}-text`]:{color:Me.colorSuccess}},[`&${et}-status-success ${et}-inner:not(${et}-circle-gradient)`]:{[`${et}-circle-path`]:{stroke:Me.colorSuccess}}})}},re=Me=>{const{componentCls:et,iconCls:Lt}=Me;return{[et]:{[`${et}-circle-trail`]:{stroke:Me.remainingColor},[`&${et}-circle ${et}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${et}-circle ${et}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:Me.circleTextColor,fontSize:Me.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Lt]:{fontSize:Me.circleIconFontSize}},[`${et}-circle&-status-exception`]:{[`${et}-text`]:{color:Me.colorError}},[`${et}-circle&-status-success`]:{[`${et}-text`]:{color:Me.colorSuccess}}},[`${et}-inline-circle`]:{lineHeight:1,[`${et}-inner`]:{verticalAlign:"bottom"}}}},Ee=Me=>{const{componentCls:et}=Me;return{[et]:{[`${et}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:Me.progressStepMinWidth,marginInlineEnd:Me.progressStepMarginInlineEnd,backgroundColor:Me.remainingColor,transition:`all ${Me.motionDurationSlow}`,"&-active":{backgroundColor:Me.defaultColor}}}}}},at=Me=>{const{componentCls:et,iconCls:Lt}=Me;return{[et]:{[`${et}-small&-line, ${et}-small&-line ${et}-text ${Lt}`]:{fontSize:Me.fontSizeSM}}}},$t=Me=>({circleTextColor:Me.colorText,defaultColor:Me.colorInfo,remainingColor:Me.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${Me.fontSize/Me.fontSizeSM}em`});var Ye=(0,mt.I$)("Progress",Me=>{const et=Me.calc(Me.marginXXS).div(2).equal(),Lt=(0,se.mergeToken)(Me,{progressStepMarginInlineEnd:et,progressStepMinWidth:et,progressActiveMotionDuration:"2.4s"});return[le(Lt),re(Lt),Ee(Lt),at(Lt)]},$t),ct=function(Me,et){var Lt={};for(var Rt in Me)Object.prototype.hasOwnProperty.call(Me,Rt)&&et.indexOf(Rt)<0&&(Lt[Rt]=Me[Rt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,Rt=Object.getOwnPropertySymbols(Me);Se<Rt.length;Se++)et.indexOf(Rt[Se])<0&&Object.prototype.propertyIsEnumerable.call(Me,Rt[Se])&&(Lt[Rt[Se]]=Me[Rt[Se]]);return Lt};const St=Me=>{let et=[];return Object.keys(Me).forEach(Lt=>{const Rt=parseFloat(Lt.replace(/%/g,""));Number.isNaN(Rt)||et.push({key:Rt,value:Me[Lt]})}),et=et.sort((Lt,Rt)=>Lt.key-Rt.key),et.map(Lt=>{let{key:Rt,value:Se}=Lt;return`${Se} ${Rt}%`}).join(", ")},Ft=(Me,et)=>{const{from:Lt=de.presetPrimaryColors.blue,to:Rt=de.presetPrimaryColors.blue,direction:Se=et==="rtl"?"to left":"to right"}=Me,$e=ct(Me,["from","to","direction"]);if(Object.keys($e).length!==0){const Tt=St($e),Wt=`linear-gradient(${Se}, ${Tt})`;return{background:Wt,[ee]:Wt}}const lt=`linear-gradient(${Se}, ${Lt}, ${Rt})`;return{background:lt,[ee]:lt}};var Qt=Me=>{const{prefixCls:et,direction:Lt,percent:Rt,size:Se,strokeWidth:$e,strokeColor:lt,strokeLinecap:Tt="round",children:Wt,trailColor:ln=null,percentPosition:Dn,success:In}=Me,{align:dn,type:Cn}=Dn,fn=lt&&typeof lt!="string"?Ft(lt,Lt):{[ee]:lt,background:lt},$n=Tt==="square"||Tt==="butt"?0:void 0,yn=Se!=null?Se:[-1,$e||(Se==="small"?6:8)],[hn,qt]=dt(yn,"line",{strokeWidth:$e}),Pn={backgroundColor:ln||void 0,borderRadius:$n},pn=Object.assign(Object.assign({width:`${Je(Rt)}%`,height:qt,borderRadius:$n},fn),{[z]:Je(Rt)/100}),Ln=wt(Me),Gn={width:`${Je(Ln)}%`,height:qt,borderRadius:$n,backgroundColor:In==null?void 0:In.strokeColor},jn={width:hn<0?"100%":hn},Bn=te.createElement("div",{className:`${et}-inner`,style:Pn},te.createElement("div",{className:Ke()(`${et}-bg`,`${et}-bg-${Cn}`),style:pn},Cn==="inner"&&Wt),Ln!==void 0&&te.createElement("div",{className:`${et}-success-bg`,style:Gn})),Xn=Cn==="outer"&&dn==="start",Nn=Cn==="outer"&&dn==="end";return Cn==="outer"&&dn==="center"?te.createElement("div",{className:`${et}-layout-bottom`},Bn,Wt):te.createElement("div",{className:`${et}-outer`,style:jn},Xn&&Wt,Bn,Nn&&Wt)},Ut=Me=>{const{size:et,steps:Lt,rounding:Rt=Math.round,percent:Se=0,strokeWidth:$e=8,strokeColor:lt,trailColor:Tt=null,prefixCls:Wt,children:ln}=Me,Dn=Rt(Lt*(Se/100)),In=et==="small"?2:14,dn=et!=null?et:[In,$e],[Cn,fn]=dt(dn,"step",{steps:Lt,strokeWidth:$e}),$n=Cn/Lt,yn=Array.from({length:Lt});for(let hn=0;hn<Lt;hn++){const qt=Array.isArray(lt)?lt[hn]:lt;yn[hn]=te.createElement("div",{key:hn,className:Ke()(`${Wt}-steps-item`,{[`${Wt}-steps-item-active`]:hn<=Dn-1}),style:{backgroundColor:hn<=Dn-1?qt:Tt,width:$n,height:fn}})}return te.createElement("div",{className:`${Wt}-steps-outer`},yn,ln)},Sn=function(Me,et){var Lt={};for(var Rt in Me)Object.prototype.hasOwnProperty.call(Me,Rt)&&et.indexOf(Rt)<0&&(Lt[Rt]=Me[Rt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,Rt=Object.getOwnPropertySymbols(Me);Se<Rt.length;Se++)et.indexOf(Rt[Se])<0&&Object.prototype.propertyIsEnumerable.call(Me,Rt[Se])&&(Lt[Rt[Se]]=Me[Rt[Se]]);return Lt};const on=null,gn=["normal","exception","active","success"];var Mn=te.forwardRef((Me,et)=>{const{prefixCls:Lt,className:Rt,rootClassName:Se,steps:$e,strokeColor:lt,percent:Tt=0,size:Wt="default",showInfo:ln=!0,type:Dn="line",status:In,format:dn,style:Cn,percentPosition:fn={}}=Me,$n=Sn(Me,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:yn="end",type:hn="outer"}=fn,qt=Array.isArray(lt)?lt[0]:lt,Pn=typeof lt=="string"||Array.isArray(lt)?lt:void 0,pn=te.useMemo(()=>{if(qt){const ge=typeof qt=="string"?qt:Object.values(qt)[0];return new ot.FastColor(ge).isLight()}return!1},[lt]),Ln=te.useMemo(()=>{var ge,Pe;const ye=wt(Me);return parseInt(ye!==void 0?(ge=ye!=null?ye:0)===null||ge===void 0?void 0:ge.toString():(Pe=Tt!=null?Tt:0)===null||Pe===void 0?void 0:Pe.toString(),10)},[Tt,Me.success,Me.successPercent]),Gn=te.useMemo(()=>!gn.includes(In)&&Ln>=100?"success":In||"normal",[In,Ln]),{getPrefixCls:jn,direction:Bn,progress:Xn}=te.useContext(fe.E_),Nn=jn("progress",Lt),[ar,qn,It]=Ye(Nn),Xt=Dn==="line",zn=Xt&&!$e,nr=te.useMemo(()=>{if(!ln)return null;const ge=wt(Me);let Pe;const ye=dn||(pe=>`${pe}%`),Oe=Xt&&pn&&hn==="inner";return hn==="inner"||dn||Gn!=="exception"&&Gn!=="success"?Pe=ye(Je(Tt),Je(ge)):Gn==="exception"?Pe=Xt?te.createElement(xe.Z,null):te.createElement(Ce.Z,null):Gn==="success"&&(Pe=Xt?te.createElement(me.Z,null):te.createElement(Ge.Z,null)),te.createElement("span",{className:Ke()(`${Nn}-text`,{[`${Nn}-text-bright`]:Oe,[`${Nn}-text-${yn}`]:zn,[`${Nn}-text-${hn}`]:zn}),title:typeof Pe=="string"?Pe:void 0},Pe)},[ln,Tt,Ln,Gn,Dn,Nn,dn]);let De;Dn==="line"?De=$e?te.createElement(Ut,Object.assign({},Me,{strokeColor:Pn,prefixCls:Nn,steps:typeof $e=="object"?$e.count:$e}),nr):te.createElement(Qt,Object.assign({},Me,{strokeColor:qt,prefixCls:Nn,direction:Bn,percentPosition:{align:yn,type:hn}}),nr):(Dn==="circle"||Dn==="dashboard")&&(De=te.createElement(jt,Object.assign({},Me,{strokeColor:qt,prefixCls:Nn,progressStatus:Gn}),nr));const _e=Ke()(Nn,`${Nn}-status-${Gn}`,{[`${Nn}-${Dn==="dashboard"&&"circle"||Dn}`]:Dn!=="line",[`${Nn}-inline-circle`]:Dn==="circle"&&dt(Wt,"circle")[0]<=20,[`${Nn}-line`]:zn,[`${Nn}-line-align-${yn}`]:zn,[`${Nn}-line-position-${hn}`]:zn,[`${Nn}-steps`]:$e,[`${Nn}-show-info`]:ln,[`${Nn}-${Wt}`]:typeof Wt=="string",[`${Nn}-rtl`]:Bn==="rtl"},Xn==null?void 0:Xn.className,Rt,Se,qn,It);return ar(te.createElement("div",Object.assign({ref:et,style:Object.assign(Object.assign({},Xn==null?void 0:Xn.style),Cn),className:_e,role:"progressbar","aria-valuenow":Ln,"aria-valuemin":0,"aria-valuemax":100},(0,ke.Z)($n,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),De))}),nn=Mn},82326:function(en,Ht,ie){"use strict";var te=ie(59301),ot=ie(92310),me=ie.n(ot),Ge=ie(37463),xe=ie(2738),Ce=ie(75030),ze=ie(86641),Ke=ie(45915),ke=ie(82855),fe=ie(48755),Qe=ie(38406),be=ie(2171),xt=ie(83397),rt=ie(31756),Re=ie(56553),He=ie(24971),Ie=ie(70045),ut=ie(57700),gt=ie(1722),yt=ie(90376),ft=ie(68525),nt=ie(90005),vt=function(Mt,Ve){var pt={};for(var ht in Mt)Object.prototype.hasOwnProperty.call(Mt,ht)&&Ve.indexOf(ht)<0&&(pt[ht]=Mt[ht]);if(Mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,ht=Object.getOwnPropertySymbols(Mt);ve<ht.length;ve++)Ve.indexOf(ht[ve])<0&&Object.prototype.propertyIsEnumerable.call(Mt,ht[ve])&&(pt[ht[ve]]=Mt[ht[ve]]);return pt};const We="SECRET_COMBOBOX_MODE_DO_NOT_USE",At=(Mt,Ve)=>{var pt;const{prefixCls:ht,bordered:ve,className:Bt,rootClassName:Ae,getPopupContainer:Nt,popupClassName:rn,dropdownClassName:we,listHeight:de=256,placement:Je,listItemHeight:wt,size:Et,disabled:Be,notFoundContent:dt,status:bt,builtinPlacements:tn,dropdownMatchSelectWidth:Ot,popupMatchSelectWidth:jt,direction:it,style:Gt,allowClear:mt,variant:se,dropdownStyle:ee,transitionName:z,tagRender:oe,maxCount:le,prefix:re}=Mt,Ee=vt(Mt,["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:at,getPrefixCls:$t,renderEmpty:Ye,direction:ct,virtual:St,popupMatchSelectWidth:Ft,popupOverflow:Pt}=te.useContext(fe.E_),Qt=(0,fe.dj)("select"),[,Jt]=(0,ut.ZP)(),Ut=wt!=null?wt:Jt==null?void 0:Jt.controlHeight,Sn=$t("select",ht),on=$t(),gn=it!=null?it:ct,{compactSize:kt,compactItemClassnames:Mn}=(0,Ie.ri)(Sn,gn),[nn,Me]=(0,He.Z)("select",se,ve),et=(0,xt.Z)(Sn),[Lt,Rt,Se]=(0,yt.Z)(Sn,et),$e=te.useMemo(()=>{const{mode:qn}=Mt;if(qn!=="combobox")return qn===We?"combobox":qn},[Mt.mode]),lt=$e==="multiple"||$e==="tags",Tt=(0,nt.Z)(Mt.suffixIcon,Mt.showArrow),Wt=(pt=jt!=null?jt:Ot)!==null&&pt!==void 0?pt:Ft,{status:ln,hasFeedback:Dn,isFormItemInput:In,feedbackIcon:dn}=te.useContext(Re.aM),Cn=(0,ke.F)(ln,bt);let fn;dt!==void 0?fn=dt:$e==="combobox"?fn=null:fn=(Ye==null?void 0:Ye("Select"))||te.createElement(Qe.Z,{componentName:"Select"});const{suffixIcon:$n,itemIcon:yn,removeIcon:hn,clearIcon:qt}=(0,ft.Z)(Object.assign(Object.assign({},Ee),{multiple:lt,hasFeedback:Dn,feedbackIcon:dn,showSuffixIcon:Tt,prefixCls:Sn,componentName:"Select"})),Pn=mt===!0?{clearIcon:qt}:mt,pn=(0,xe.Z)(Ee,["suffixIcon","itemIcon"]),Ln=me()(rn||we,{[`${Sn}-dropdown-${gn}`]:gn==="rtl"},Ae,Se,et,Rt),Gn=(0,rt.Z)(qn=>{var It;return(It=Et!=null?Et:kt)!==null&&It!==void 0?It:qn}),jn=te.useContext(be.Z),Bn=Be!=null?Be:jn,Xn=me()({[`${Sn}-lg`]:Gn==="large",[`${Sn}-sm`]:Gn==="small",[`${Sn}-rtl`]:gn==="rtl",[`${Sn}-${nn}`]:Me,[`${Sn}-in-form-item`]:In},(0,ke.Z)(Sn,Cn,Dn),Mn,Qt.className,Bt,Ae,Se,et,Rt),Nn=te.useMemo(()=>Je!==void 0?Je:gn==="rtl"?"bottomRight":"bottomLeft",[Je,gn]),[ar]=(0,Ce.Cn)("SelectLike",ee==null?void 0:ee.zIndex);return Lt(te.createElement(Ge.ZP,Object.assign({ref:Ve,virtual:St,showSearch:Qt.showSearch},pn,{style:Object.assign(Object.assign({},Qt.style),Gt),dropdownMatchSelectWidth:Wt,transitionName:(0,ze.m)(on,"slide-up",z),builtinPlacements:(0,gt.Z)(tn,Pt),listHeight:de,listItemHeight:Ut,mode:$e,prefixCls:Sn,placement:Nn,direction:gn,prefix:re,suffixIcon:$n,menuItemSelectedIcon:yn,removeIcon:hn,allowClear:Pn,notFoundContent:fn,className:Xn,getPopupContainer:Nt||at,dropdownClassName:Ln,disabled:Bn,dropdownStyle:Object.assign(Object.assign({},ee),{zIndex:ar}),maxCount:lt?le:void 0,tagRender:lt?oe:void 0})))},st=te.forwardRef(At),qe=(0,Ke.Z)(st,"dropdownAlign");st.SECRET_COMBOBOX_MODE_DO_NOT_USE=We,st.Option=Ge.Wx,st.OptGroup=Ge.Xo,st._InternalPanelDoNotUseOrYouWillBeFired=qe,Ht.default=st},1722:function(en,Ht){"use strict";const ie=ot=>{const Ge={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ot==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},Ge),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ge),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ge),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ge),{points:["br","tr"],offset:[0,-4]})}};function te(ot,me){return ot||ie(me)}Ht.Z=te},90376:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return ht}});var te=ie(63356),ot=ie(56119),me=ie(16931),Ge=ie(51636),xe=ie(46e3),Ce=ie(93873);const ze=ve=>{const{optionHeight:Bt,optionFontSize:Ae,optionLineHeight:Nt,optionPadding:rn}=ve;return{position:"relative",display:"block",minHeight:Bt,padding:rn,color:ve.colorText,fontWeight:"normal",fontSize:Ae,lineHeight:Nt,boxSizing:"border-box"}};var ke=ve=>{const{antCls:Bt,componentCls:Ae}=ve,Nt=`${Ae}-item`,rn=`&${Bt}-slide-up-enter${Bt}-slide-up-enter-active`,we=`&${Bt}-slide-up-appear${Bt}-slide-up-appear-active`,de=`&${Bt}-slide-up-leave${Bt}-slide-up-leave-active`,Je=`${Ae}-dropdown-placement-`,wt=`${Nt}-option-selected`;return[{[`${Ae}-dropdown`]:Object.assign(Object.assign({},(0,te.Wf)(ve)),{position:"absolute",top:-9999,zIndex:ve.zIndexPopup,boxSizing:"border-box",padding:ve.paddingXXS,overflow:"hidden",fontSize:ve.fontSize,fontVariant:"initial",backgroundColor:ve.colorBgElevated,borderRadius:ve.borderRadiusLG,outline:"none",boxShadow:ve.boxShadowSecondary,[`
|
|
|
${rn}${Je}bottomLeft,
|
|
|
${we}${Je}bottomLeft
|
|
|
`]:{animationName:xe.fJ},[`
|
|
|
${rn}${Je}topLeft,
|
|
|
${we}${Je}topLeft,
|
|
|
${rn}${Je}topRight,
|
|
|
${we}${Je}topRight
|
|
|
`]:{animationName:xe.Qt},[`${de}${Je}bottomLeft`]:{animationName:xe.Uw},[`
|
|
|
${de}${Je}topLeft,
|
|
|
${de}${Je}topRight
|
|
|
`]:{animationName:xe.ly},"&-hidden":{display:"none"},[Nt]:Object.assign(Object.assign({},ze(ve)),{cursor:"pointer",transition:`background ${ve.motionDurationSlow} ease`,borderRadius:ve.borderRadiusSM,"&-group":{color:ve.colorTextDescription,fontSize:ve.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},te.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Nt}-option-disabled)`]:{backgroundColor:ve.optionActiveBg},[`&-selected:not(${Nt}-option-disabled)`]:{color:ve.optionSelectedColor,fontWeight:ve.optionSelectedFontWeight,backgroundColor:ve.optionSelectedBg,[`${Nt}-option-state`]:{color:ve.colorPrimary}},"&-disabled":{[`&${Nt}-option-selected`]:{backgroundColor:ve.colorBgContainerDisabled},color:ve.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:ve.calc(ve.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},ze(ve)),{color:ve.colorTextDisabled})}),[`${wt}:has(+ ${wt})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${wt}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,xe.oN)(ve,"slide-up"),(0,xe.oN)(ve,"slide-down"),(0,Ce.Fm)(ve,"move-up"),(0,Ce.Fm)(ve,"move-down")]},fe=ie(26743),Qe=ie(36237);function be(ve,Bt){const{componentCls:Ae,inputPaddingHorizontalBase:Nt,borderRadius:rn}=ve,we=ve.calc(ve.controlHeight).sub(ve.calc(ve.lineWidth).mul(2)).equal(),de=Bt?`${Ae}-${Bt}`:"";return{[`${Ae}-single${de}`]:{fontSize:ve.fontSize,height:ve.controlHeight,[`${Ae}-selector`]:Object.assign(Object.assign({},(0,te.Wf)(ve,!0)),{display:"flex",borderRadius:rn,flex:"1 1 auto",[`${Ae}-selection-wrap:after`]:{lineHeight:(0,Qe.unit)(we)},[`${Ae}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
|
${Ae}-selection-item,
|
|
|
${Ae}-selection-placeholder
|
|
|
`]:{display:"block",padding:0,lineHeight:(0,Qe.unit)(we),transition:`all ${ve.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${Ae}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ae}-selection-item:empty:after`,`${Ae}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ae}-show-arrow ${Ae}-selection-item,
|
|
|
&${Ae}-show-arrow ${Ae}-selection-search,
|
|
|
&${Ae}-show-arrow ${Ae}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ve.showArrowPaddingInlineEnd},[`&${Ae}-open ${Ae}-selection-item`]:{color:ve.colorTextPlaceholder},[`&:not(${Ae}-customize-input)`]:{[`${Ae}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,Qe.unit)(Nt)}`,[`${Ae}-selection-search-input`]:{height:we,fontSize:ve.fontSize},"&:after":{lineHeight:(0,Qe.unit)(we)}}},[`&${Ae}-customize-input`]:{[`${Ae}-selector`]:{"&:after":{display:"none"},[`${Ae}-selection-search`]:{position:"static",width:"100%"},[`${Ae}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,Qe.unit)(Nt)}`,"&:after":{display:"none"}}}}}}}function xt(ve){const{componentCls:Bt}=ve,Ae=ve.calc(ve.controlPaddingHorizontalSM).sub(ve.lineWidth).equal();return[be(ve),be((0,Ge.mergeToken)(ve,{controlHeight:ve.controlHeightSM,borderRadius:ve.borderRadiusSM}),"sm"),{[`${Bt}-single${Bt}-sm`]:{[`&:not(${Bt}-customize-input)`]:{[`${Bt}-selector`]:{padding:`0 ${(0,Qe.unit)(Ae)}`},[`&${Bt}-show-arrow ${Bt}-selection-search`]:{insetInlineEnd:ve.calc(Ae).add(ve.calc(ve.fontSize).mul(1.5)).equal()},[`
|
|
|
&${Bt}-show-arrow ${Bt}-selection-item,
|
|
|
&${Bt}-show-arrow ${Bt}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ve.calc(ve.fontSize).mul(1.5).equal()}}}},be((0,Ge.mergeToken)(ve,{controlHeight:ve.singleItemHeightLG,fontSize:ve.fontSizeLG,borderRadius:ve.borderRadiusLG}),"lg")]}const rt=ve=>{const{fontSize:Bt,lineHeight:Ae,lineWidth:Nt,controlHeight:rn,controlHeightSM:we,controlHeightLG:de,paddingXXS:Je,controlPaddingHorizontal:wt,zIndexPopupBase:Et,colorText:Be,fontWeightStrong:dt,controlItemBgActive:bt,controlItemBgHover:tn,colorBgContainer:Ot,colorFillSecondary:jt,colorBgContainerDisabled:it,colorTextDisabled:Gt,colorPrimaryHover:mt,colorPrimary:se,controlOutline:ee}=ve,z=Je*2,oe=Nt*2,le=Math.min(rn-z,rn-oe),re=Math.min(we-z,we-oe),Ee=Math.min(de-z,de-oe);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(Je/2),zIndexPopup:Et+50,optionSelectedColor:Be,optionSelectedFontWeight:dt,optionSelectedBg:bt,optionActiveBg:tn,optionPadding:`${(rn-Bt*Ae)/2}px ${wt}px`,optionFontSize:Bt,optionLineHeight:Ae,optionHeight:rn,selectorBg:Ot,clearBg:Ot,singleItemHeightLG:de,multipleItemBg:jt,multipleItemBorderColor:"transparent",multipleItemHeight:le,multipleItemHeightSM:re,multipleItemHeightLG:Ee,multipleSelectorBgDisabled:it,multipleItemColorDisabled:Gt,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(ve.fontSize*1.25),hoverBorderColor:mt,activeBorderColor:se,activeOutlineColor:ee,selectAffixPadding:Je}},Re=(ve,Bt)=>{const{componentCls:Ae,antCls:Nt,controlOutlineWidth:rn}=ve;return{[`&:not(${Ae}-customize-input) ${Ae}-selector`]:{border:`${(0,Qe.unit)(ve.lineWidth)} ${ve.lineType} ${Bt.borderColor}`,background:ve.selectorBg},[`&:not(${Ae}-disabled):not(${Ae}-customize-input):not(${Nt}-pagination-size-changer)`]:{[`&:hover ${Ae}-selector`]:{borderColor:Bt.hoverBorderHover},[`${Ae}-focused& ${Ae}-selector`]:{borderColor:Bt.activeBorderColor,boxShadow:`0 0 0 ${(0,Qe.unit)(rn)} ${Bt.activeOutlineColor}`,outline:0},[`${Ae}-prefix`]:{color:Bt.color}}}},He=(ve,Bt)=>({[`&${ve.componentCls}-status-${Bt.status}`]:Object.assign({},Re(ve,Bt))}),Ie=ve=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Re(ve,{borderColor:ve.colorBorder,hoverBorderHover:ve.hoverBorderColor,activeBorderColor:ve.activeBorderColor,activeOutlineColor:ve.activeOutlineColor,color:ve.colorText})),He(ve,{status:"error",borderColor:ve.colorError,hoverBorderHover:ve.colorErrorHover,activeBorderColor:ve.colorError,activeOutlineColor:ve.colorErrorOutline,color:ve.colorError})),He(ve,{status:"warning",borderColor:ve.colorWarning,hoverBorderHover:ve.colorWarningHover,activeBorderColor:ve.colorWarning,activeOutlineColor:ve.colorWarningOutline,color:ve.colorWarning})),{[`&${ve.componentCls}-disabled`]:{[`&:not(${ve.componentCls}-customize-input) ${ve.componentCls}-selector`]:{background:ve.colorBgContainerDisabled,color:ve.colorTextDisabled}},[`&${ve.componentCls}-multiple ${ve.componentCls}-selection-item`]:{background:ve.multipleItemBg,border:`${(0,Qe.unit)(ve.lineWidth)} ${ve.lineType} ${ve.multipleItemBorderColor}`}})}),ut=(ve,Bt)=>{const{componentCls:Ae,antCls:Nt}=ve;return{[`&:not(${Ae}-customize-input) ${Ae}-selector`]:{background:Bt.bg,border:`${(0,Qe.unit)(ve.lineWidth)} ${ve.lineType} transparent`,color:Bt.color},[`&:not(${Ae}-disabled):not(${Ae}-customize-input):not(${Nt}-pagination-size-changer)`]:{[`&:hover ${Ae}-selector`]:{background:Bt.hoverBg},[`${Ae}-focused& ${Ae}-selector`]:{background:ve.selectorBg,borderColor:Bt.activeBorderColor,outline:0}}}},gt=(ve,Bt)=>({[`&${ve.componentCls}-status-${Bt.status}`]:Object.assign({},ut(ve,Bt))}),yt=ve=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},ut(ve,{bg:ve.colorFillTertiary,hoverBg:ve.colorFillSecondary,activeBorderColor:ve.activeBorderColor,color:ve.colorText})),gt(ve,{status:"error",bg:ve.colorErrorBg,hoverBg:ve.colorErrorBgHover,activeBorderColor:ve.colorError,color:ve.colorError})),gt(ve,{status:"warning",bg:ve.colorWarningBg,hoverBg:ve.colorWarningBgHover,activeBorderColor:ve.colorWarning,color:ve.colorWarning})),{[`&${ve.componentCls}-disabled`]:{[`&:not(${ve.componentCls}-customize-input) ${ve.componentCls}-selector`]:{borderColor:ve.colorBorder,background:ve.colorBgContainerDisabled,color:ve.colorTextDisabled}},[`&${ve.componentCls}-multiple ${ve.componentCls}-selection-item`]:{background:ve.colorBgContainer,border:`${(0,Qe.unit)(ve.lineWidth)} ${ve.lineType} ${ve.colorSplit}`}})}),ft=ve=>({"&-borderless":{[`${ve.componentCls}-selector`]:{background:"transparent",border:`${(0,Qe.unit)(ve.lineWidth)} ${ve.lineType} transparent`},[`&${ve.componentCls}-disabled`]:{[`&:not(${ve.componentCls}-customize-input) ${ve.componentCls}-selector`]:{color:ve.colorTextDisabled}},[`&${ve.componentCls}-multiple ${ve.componentCls}-selection-item`]:{background:ve.multipleItemBg,border:`${(0,Qe.unit)(ve.lineWidth)} ${ve.lineType} ${ve.multipleItemBorderColor}`},[`&${ve.componentCls}-status-error`]:{[`${ve.componentCls}-prefix, ${ve.componentCls}-selection-item`]:{color:ve.colorError}},[`&${ve.componentCls}-status-warning`]:{[`${ve.componentCls}-prefix, ${ve.componentCls}-selection-item`]:{color:ve.colorWarning}}}}),nt=(ve,Bt)=>{const{componentCls:Ae,antCls:Nt}=ve;return{[`&:not(${Ae}-customize-input) ${Ae}-selector`]:{borderWidth:`0 0 ${(0,Qe.unit)(ve.lineWidth)} 0`,borderStyle:`none none ${ve.lineType} none`,borderColor:Bt.borderColor,background:ve.selectorBg,borderRadius:0},[`&:not(${Ae}-disabled):not(${Ae}-customize-input):not(${Nt}-pagination-size-changer)`]:{[`&:hover ${Ae}-selector`]:{borderColor:Bt.hoverBorderHover},[`${Ae}-focused& ${Ae}-selector`]:{borderColor:Bt.activeBorderColor,outline:0},[`${Ae}-prefix`]:{color:Bt.color}}}},vt=(ve,Bt)=>({[`&${ve.componentCls}-status-${Bt.status}`]:Object.assign({},nt(ve,Bt))}),We=ve=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},nt(ve,{borderColor:ve.colorBorder,hoverBorderHover:ve.hoverBorderColor,activeBorderColor:ve.activeBorderColor,activeOutlineColor:ve.activeOutlineColor,color:ve.colorText})),vt(ve,{status:"error",borderColor:ve.colorError,hoverBorderHover:ve.colorErrorHover,activeBorderColor:ve.colorError,activeOutlineColor:ve.colorErrorOutline,color:ve.colorError})),vt(ve,{status:"warning",borderColor:ve.colorWarning,hoverBorderHover:ve.colorWarningHover,activeBorderColor:ve.colorWarning,activeOutlineColor:ve.colorWarningOutline,color:ve.colorWarning})),{[`&${ve.componentCls}-disabled`]:{[`&:not(${ve.componentCls}-customize-input) ${ve.componentCls}-selector`]:{color:ve.colorTextDisabled}},[`&${ve.componentCls}-multiple ${ve.componentCls}-selection-item`]:{background:ve.multipleItemBg,border:`${(0,Qe.unit)(ve.lineWidth)} ${ve.lineType} ${ve.multipleItemBorderColor}`}})});var st=ve=>({[ve.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Ie(ve)),yt(ve)),ft(ve)),We(ve))});const qe=ve=>{const{componentCls:Bt}=ve;return{position:"relative",transition:`all ${ve.motionDurationMid} ${ve.motionEaseInOut}`,input:{cursor:"pointer"},[`${Bt}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${Bt}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Mt=ve=>{const{componentCls:Bt}=ve;return{[`${Bt}-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"}}}},Ve=ve=>{const{antCls:Bt,componentCls:Ae,inputPaddingHorizontalBase:Nt,iconCls:rn}=ve;return{[Ae]:Object.assign(Object.assign({},(0,te.Wf)(ve)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${Ae}-customize-input) ${Ae}-selector`]:Object.assign(Object.assign({},qe(ve)),Mt(ve)),[`${Ae}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},te.vS),{[`> ${Bt}-typography`]:{display:"inline"}}),[`${Ae}-selection-placeholder`]:Object.assign(Object.assign({},te.vS),{flex:1,color:ve.colorTextPlaceholder,pointerEvents:"none"}),[`${Ae}-arrow`]:Object.assign(Object.assign({},(0,te.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Nt,height:ve.fontSizeIcon,marginTop:ve.calc(ve.fontSizeIcon).mul(-1).div(2).equal(),color:ve.colorTextQuaternary,fontSize:ve.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${ve.motionDurationSlow} ease`,[rn]:{verticalAlign:"top",transition:`transform ${ve.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ae}-suffix)`]:{pointerEvents:"auto"}},[`${Ae}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ae}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${Ae}-prefix`]:{flex:"none",marginInlineEnd:ve.selectAffixPadding},[`${Ae}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Nt,zIndex:1,display:"inline-block",width:ve.fontSizeIcon,height:ve.fontSizeIcon,marginTop:ve.calc(ve.fontSizeIcon).mul(-1).div(2).equal(),color:ve.colorTextQuaternary,fontSize:ve.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${ve.motionDurationMid} ease, opacity ${ve.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:ve.colorTextTertiary}},[`&:hover ${Ae}-clear`]:{opacity:1,background:ve.colorBgBase,borderRadius:"50%"}}),[`${Ae}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${Ae}-has-feedback`]:{[`${Ae}-clear`]:{insetInlineEnd:ve.calc(Nt).add(ve.fontSize).add(ve.paddingXS).equal()}}}}}},pt=ve=>{const{componentCls:Bt}=ve;return[{[Bt]:{[`&${Bt}-in-form-item`]:{width:"100%"}}},Ve(ve),xt(ve),(0,fe.ZP)(ve),ke(ve),{[`${Bt}-rtl`]:{direction:"rtl"}},(0,ot.c)(ve,{borderElCls:`${Bt}-selector`,focusElCls:`${Bt}-focused`})]};var ht=(0,me.I$)("Select",(ve,Bt)=>{let{rootPrefixCls:Ae}=Bt;const Nt=(0,Ge.mergeToken)(ve,{rootPrefixCls:Ae,inputPaddingHorizontalBase:ve.calc(ve.paddingSM).sub(1).equal(),multipleSelectItemHeight:ve.multipleItemHeight,selectHeight:ve.controlHeight});return[pt(Nt),st(Nt)]},rt,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}})},26743:function(en,Ht,ie){"use strict";ie.d(Ht,{_z:function(){return Ce},gp:function(){return Ge}});var te=ie(36237),ot=ie(63356),me=ie(51636);const Ge=fe=>{const{multipleSelectItemHeight:Qe,paddingXXS:be,lineWidth:xt,INTERNAL_FIXED_ITEM_MARGIN:rt}=fe,Re=fe.max(fe.calc(be).sub(xt).equal(),0),He=fe.max(fe.calc(Re).sub(rt).equal(),0);return{basePadding:Re,containerPadding:He,itemHeight:(0,te.unit)(Qe),itemLineHeight:(0,te.unit)(fe.calc(Qe).sub(fe.calc(fe.lineWidth).mul(2)).equal())}},xe=fe=>{const{multipleSelectItemHeight:Qe,selectHeight:be,lineWidth:xt}=fe;return fe.calc(be).sub(Qe).div(2).sub(xt).equal()},Ce=fe=>{const{componentCls:Qe,iconCls:be,borderRadiusSM:xt,motionDurationSlow:rt,paddingXS:Re,multipleItemColorDisabled:He,multipleItemBorderColorDisabled:Ie,colorIcon:ut,colorIconHover:gt,INTERNAL_FIXED_ITEM_MARGIN:yt}=fe;return{[`${Qe}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${Qe}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:yt,borderRadius:xt,cursor:"default",transition:`font-size ${rt}, line-height ${rt}, height ${rt}`,marginInlineEnd:fe.calc(yt).mul(2).equal(),paddingInlineStart:Re,paddingInlineEnd:fe.calc(Re).div(2).equal(),[`${Qe}-disabled&`]:{color:He,borderColor:Ie,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:fe.calc(Re).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ot.Ro)()),{display:"inline-flex",alignItems:"center",color:ut,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${be}`]:{verticalAlign:"-0.2em"},"&:hover":{color:gt}})}}}},ze=(fe,Qe)=>{const{componentCls:be,INTERNAL_FIXED_ITEM_MARGIN:xt}=fe,rt=`${be}-selection-overflow`,Re=fe.multipleSelectItemHeight,He=xe(fe),Ie=Qe?`${be}-${Qe}`:"",ut=Ge(fe);return{[`${be}-multiple${Ie}`]:Object.assign(Object.assign({},Ce(fe)),{[`${be}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:ut.basePadding,paddingBlock:ut.containerPadding,borderRadius:fe.borderRadius,[`${be}-disabled&`]:{background:fe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,te.unit)(xt)} 0`,lineHeight:(0,te.unit)(Re),visibility:"hidden",content:'"\\a0"'}},[`${be}-selection-item`]:{height:ut.itemHeight,lineHeight:(0,te.unit)(ut.itemLineHeight)},[`${be}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,te.unit)(Re),marginBlock:xt}},[`${be}-prefix`]:{marginInlineStart:fe.calc(fe.inputPaddingHorizontalBase).sub(ut.basePadding).equal()},[`${rt}-item + ${rt}-item,
|
|
|
${be}-prefix + ${be}-selection-wrap
|
|
|
`]:{[`${be}-selection-search`]:{marginInlineStart:0},[`${be}-selection-placeholder`]:{insetInlineStart:0}},[`${rt}-item-suffix`]:{minHeight:ut.itemHeight,marginBlock:xt},[`${be}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:fe.calc(fe.inputPaddingHorizontalBase).sub(He).equal(),"\n &-input,\n &-mirror\n ":{height:Re,fontFamily:fe.fontFamily,lineHeight:(0,te.unit)(Re),transition:`all ${fe.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${be}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:fe.calc(fe.inputPaddingHorizontalBase).sub(ut.basePadding).equal(),insetInlineEnd:fe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${fe.motionDurationSlow}`}})}};function Ke(fe,Qe){const{componentCls:be}=fe,xt=Qe?`${be}-${Qe}`:"",rt={[`${be}-multiple${xt}`]:{fontSize:fe.fontSize,[`${be}-selector`]:{[`${be}-show-search&`]:{cursor:"text"}},[`
|
|
|
&${be}-show-arrow ${be}-selector,
|
|
|
&${be}-allow-clear ${be}-selector
|
|
|
`]:{paddingInlineEnd:fe.calc(fe.fontSizeIcon).add(fe.controlPaddingHorizontal).equal()}}};return[ze(fe,Qe),rt]}const ke=fe=>{const{componentCls:Qe}=fe,be=(0,me.mergeToken)(fe,{selectHeight:fe.controlHeightSM,multipleSelectItemHeight:fe.multipleItemHeightSM,borderRadius:fe.borderRadiusSM,borderRadiusSM:fe.borderRadiusXS}),xt=(0,me.mergeToken)(fe,{fontSize:fe.fontSizeLG,selectHeight:fe.controlHeightLG,multipleSelectItemHeight:fe.multipleItemHeightLG,borderRadius:fe.borderRadiusLG,borderRadiusSM:fe.borderRadius});return[Ke(fe),Ke(be,"sm"),{[`${Qe}-multiple${Qe}-sm`]:{[`${Qe}-selection-placeholder`]:{insetInline:fe.calc(fe.controlPaddingHorizontalSM).sub(fe.lineWidth).equal()},[`${Qe}-selection-search`]:{marginInlineStart:2}}},Ke(xt,"lg")]};Ht.ZP=ke},68525:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});var te=ie(59301),ot=ie(40001),me=ie(19248),Ge=ie(99267),xe=ie(84105),Ce=ie(58617),ze=ie(47472);function Ke(ke){let{suffixIcon:fe,clearIcon:Qe,menuItemSelectedIcon:be,removeIcon:xt,loading:rt,multiple:Re,hasFeedback:He,prefixCls:Ie,showSuffixIcon:ut,feedbackIcon:gt,showArrow:yt,componentName:ft}=ke;const nt=Qe!=null?Qe:te.createElement(me.Z,null),vt=qe=>fe===null&&!He&&!yt?null:te.createElement(te.Fragment,null,ut!==!1&&qe,He&>);let We=null;if(fe!==void 0)We=vt(fe);else if(rt)We=vt(te.createElement(Ce.Z,{spin:!0}));else{const qe=`${Ie}-suffix`;We=Mt=>{let{open:Ve,showSearch:pt}=Mt;return vt(Ve&&pt?te.createElement(ze.Z,{className:qe}):te.createElement(xe.Z,{className:qe}))}}let At=null;be!==void 0?At=be:Re?At=te.createElement(ot.Z,null):At=null;let st=null;return xt!==void 0?st=xt:st=te.createElement(Ge.Z,null),{clearIcon:nt,suffixIcon:We,itemIcon:At,removeIcon:st}}},90005:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return te}});function te(ot,me){return me!==void 0?me:ot!==null}},58755:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Bt}});var te=ie(59301),ot=ie(58617),me=ie(92310),Ge=ie.n(me),xe=ie(60499),Ce=ie(18642),ze=ie(72190),Ke=ie(42244),ke=ie(18929),fe=ie(10228),Qe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],be=te.forwardRef(function(Ae,Nt){var rn,we=Ae.prefixCls,de=we===void 0?"rc-switch":we,Je=Ae.className,wt=Ae.checked,Et=Ae.defaultChecked,Be=Ae.disabled,dt=Ae.loadingIcon,bt=Ae.checkedChildren,tn=Ae.unCheckedChildren,Ot=Ae.onClick,jt=Ae.onChange,it=Ae.onKeyDown,Gt=(0,Ke.Z)(Ae,Qe),mt=(0,ke.Z)(!1,{value:wt,defaultValue:Et}),se=(0,ze.Z)(mt,2),ee=se[0],z=se[1];function oe(at,$t){var Ye=ee;return Be||(Ye=at,z(Ye),jt==null||jt(Ye,$t)),Ye}function le(at){at.which===fe.Z.LEFT?oe(!1,at):at.which===fe.Z.RIGHT&&oe(!0,at),it==null||it(at)}function re(at){var $t=oe(!ee,at);Ot==null||Ot($t,at)}var Ee=Ge()(de,Je,(rn={},(0,Ce.Z)(rn,"".concat(de,"-checked"),ee),(0,Ce.Z)(rn,"".concat(de,"-disabled"),Be),rn));return te.createElement("button",(0,xe.Z)({},Gt,{type:"button",role:"switch","aria-checked":ee,disabled:Be,className:Ee,ref:Nt,onKeyDown:le,onClick:re}),dt,te.createElement("span",{className:"".concat(de,"-inner")},te.createElement("span",{className:"".concat(de,"-inner-checked")},bt),te.createElement("span",{className:"".concat(de,"-inner-unchecked")},tn)))});be.displayName="Switch";var xt=be,rt=ie(12919),Re=ie(48755),He=ie(2171),Ie=ie(31756),ut=ie(36237),gt=ie(17835),yt=ie(63356),ft=ie(16931),nt=ie(51636);const vt=Ae=>{const{componentCls:Nt,trackHeightSM:rn,trackPadding:we,trackMinWidthSM:de,innerMinMarginSM:Je,innerMaxMarginSM:wt,handleSizeSM:Et,calc:Be}=Ae,dt=`${Nt}-inner`,bt=(0,ut.unit)(Be(Et).add(Be(we).mul(2)).equal()),tn=(0,ut.unit)(Be(wt).mul(2).equal());return{[Nt]:{[`&${Nt}-small`]:{minWidth:de,height:rn,lineHeight:(0,ut.unit)(rn),[`${Nt}-inner`]:{paddingInlineStart:wt,paddingInlineEnd:Je,[`${dt}-checked, ${dt}-unchecked`]:{minHeight:rn},[`${dt}-checked`]:{marginInlineStart:`calc(-100% + ${bt} - ${tn})`,marginInlineEnd:`calc(100% - ${bt} + ${tn})`},[`${dt}-unchecked`]:{marginTop:Be(rn).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${Nt}-handle`]:{width:Et,height:Et},[`${Nt}-loading-icon`]:{top:Be(Be(Et).sub(Ae.switchLoadingIconSize)).div(2).equal(),fontSize:Ae.switchLoadingIconSize},[`&${Nt}-checked`]:{[`${Nt}-inner`]:{paddingInlineStart:Je,paddingInlineEnd:wt,[`${dt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${dt}-unchecked`]:{marginInlineStart:`calc(100% - ${bt} + ${tn})`,marginInlineEnd:`calc(-100% + ${bt} - ${tn})`}},[`${Nt}-handle`]:{insetInlineStart:`calc(100% - ${(0,ut.unit)(Be(Et).add(we).equal())})`}},[`&:not(${Nt}-disabled):active`]:{[`&:not(${Nt}-checked) ${dt}`]:{[`${dt}-unchecked`]:{marginInlineStart:Be(Ae.marginXXS).div(2).equal(),marginInlineEnd:Be(Ae.marginXXS).mul(-1).div(2).equal()}},[`&${Nt}-checked ${dt}`]:{[`${dt}-checked`]:{marginInlineStart:Be(Ae.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:Be(Ae.marginXXS).div(2).equal()}}}}}}},We=Ae=>{const{componentCls:Nt,handleSize:rn,calc:we}=Ae;return{[Nt]:{[`${Nt}-loading-icon${Ae.iconCls}`]:{position:"relative",top:we(we(rn).sub(Ae.fontSize)).div(2).equal(),color:Ae.switchLoadingIconColor,verticalAlign:"top"},[`&${Nt}-checked ${Nt}-loading-icon`]:{color:Ae.switchColor}}}},At=Ae=>{const{componentCls:Nt,trackPadding:rn,handleBg:we,handleShadow:de,handleSize:Je,calc:wt}=Ae,Et=`${Nt}-handle`;return{[Nt]:{[Et]:{position:"absolute",top:rn,insetInlineStart:rn,width:Je,height:Je,transition:`all ${Ae.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:we,borderRadius:wt(Je).div(2).equal(),boxShadow:de,transition:`all ${Ae.switchDuration} ease-in-out`,content:'""'}},[`&${Nt}-checked ${Et}`]:{insetInlineStart:`calc(100% - ${(0,ut.unit)(wt(Je).add(rn).equal())})`},[`&:not(${Nt}-disabled):active`]:{[`${Et}::before`]:{insetInlineEnd:Ae.switchHandleActiveInset,insetInlineStart:0},[`&${Nt}-checked ${Et}::before`]:{insetInlineEnd:0,insetInlineStart:Ae.switchHandleActiveInset}}}}},st=Ae=>{const{componentCls:Nt,trackHeight:rn,trackPadding:we,innerMinMargin:de,innerMaxMargin:Je,handleSize:wt,calc:Et}=Ae,Be=`${Nt}-inner`,dt=(0,ut.unit)(Et(wt).add(Et(we).mul(2)).equal()),bt=(0,ut.unit)(Et(Je).mul(2).equal());return{[Nt]:{[Be]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Je,paddingInlineEnd:de,transition:`padding-inline-start ${Ae.switchDuration} ease-in-out, padding-inline-end ${Ae.switchDuration} ease-in-out`,[`${Be}-checked, ${Be}-unchecked`]:{display:"block",color:Ae.colorTextLightSolid,fontSize:Ae.fontSizeSM,transition:`margin-inline-start ${Ae.switchDuration} ease-in-out, margin-inline-end ${Ae.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:rn},[`${Be}-checked`]:{marginInlineStart:`calc(-100% + ${dt} - ${bt})`,marginInlineEnd:`calc(100% - ${dt} + ${bt})`},[`${Be}-unchecked`]:{marginTop:Et(rn).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${Nt}-checked ${Be}`]:{paddingInlineStart:de,paddingInlineEnd:Je,[`${Be}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Be}-unchecked`]:{marginInlineStart:`calc(100% - ${dt} + ${bt})`,marginInlineEnd:`calc(-100% + ${dt} - ${bt})`}},[`&:not(${Nt}-disabled):active`]:{[`&:not(${Nt}-checked) ${Be}`]:{[`${Be}-unchecked`]:{marginInlineStart:Et(we).mul(2).equal(),marginInlineEnd:Et(we).mul(-1).mul(2).equal()}},[`&${Nt}-checked ${Be}`]:{[`${Be}-checked`]:{marginInlineStart:Et(we).mul(-1).mul(2).equal(),marginInlineEnd:Et(we).mul(2).equal()}}}}}},qe=Ae=>{const{componentCls:Nt,trackHeight:rn,trackMinWidth:we}=Ae;return{[Nt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,yt.Wf)(Ae)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:we,height:rn,lineHeight:(0,ut.unit)(rn),verticalAlign:"middle",background:Ae.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${Ae.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Nt}-disabled)`]:{background:Ae.colorTextTertiary}}),(0,yt.Qy)(Ae)),{[`&${Nt}-checked`]:{background:Ae.switchColor,[`&:hover:not(${Nt}-disabled)`]:{background:Ae.colorPrimaryHover}},[`&${Nt}-loading, &${Nt}-disabled`]:{cursor:"not-allowed",opacity:Ae.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Nt}-rtl`]:{direction:"rtl"}})}},Mt=Ae=>{const{fontSize:Nt,lineHeight:rn,controlHeight:we,colorWhite:de}=Ae,Je=Nt*rn,wt=we/2,Et=2,Be=Je-Et*2,dt=wt-Et*2;return{trackHeight:Je,trackHeightSM:wt,trackMinWidth:Be*2+Et*4,trackMinWidthSM:dt*2+Et*2,trackPadding:Et,handleBg:de,handleSize:Be,handleSizeSM:dt,handleShadow:`0 2px 4px 0 ${new gt.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:Be/2,innerMaxMargin:Be+Et+Et*2,innerMinMarginSM:dt/2,innerMaxMarginSM:dt+Et+Et*2}};var Ve=(0,ft.I$)("Switch",Ae=>{const Nt=(0,nt.mergeToken)(Ae,{switchDuration:Ae.motionDurationMid,switchColor:Ae.colorPrimary,switchDisabledOpacity:Ae.opacityLoading,switchLoadingIconSize:Ae.calc(Ae.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${Ae.opacityLoading})`,switchHandleActiveInset:"-30%"});return[qe(Nt),st(Nt),At(Nt),We(Nt),vt(Nt)]},Mt),pt=function(Ae,Nt){var rn={};for(var we in Ae)Object.prototype.hasOwnProperty.call(Ae,we)&&Nt.indexOf(we)<0&&(rn[we]=Ae[we]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,we=Object.getOwnPropertySymbols(Ae);de<we.length;de++)Nt.indexOf(we[de])<0&&Object.prototype.propertyIsEnumerable.call(Ae,we[de])&&(rn[we[de]]=Ae[we[de]]);return rn};const ve=te.forwardRef((Ae,Nt)=>{const{prefixCls:rn,size:we,disabled:de,loading:Je,className:wt,rootClassName:Et,style:Be,checked:dt,value:bt,defaultChecked:tn,defaultValue:Ot,onChange:jt}=Ae,it=pt(Ae,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[Gt,mt]=(0,ke.Z)(!1,{value:dt!=null?dt:bt,defaultValue:tn!=null?tn:Ot}),{getPrefixCls:se,direction:ee,switch:z}=te.useContext(Re.E_),oe=te.useContext(He.Z),le=(de!=null?de:oe)||Je,re=se("switch",rn),Ee=te.createElement("div",{className:`${re}-handle`},Je&&te.createElement(ot.Z,{className:`${re}-loading-icon`})),[at,$t,Ye]=Ve(re),ct=(0,Ie.Z)(we),St=Ge()(z==null?void 0:z.className,{[`${re}-small`]:ct==="small",[`${re}-loading`]:Je,[`${re}-rtl`]:ee==="rtl"},wt,Et,$t,Ye),Ft=Object.assign(Object.assign({},z==null?void 0:z.style),Be),Pt=function(){mt(arguments.length<=0?void 0:arguments[0]),jt==null||jt.apply(void 0,arguments)};return at(te.createElement(rt.Z,{component:"Switch"},te.createElement(xt,Object.assign({},it,{checked:Gt,onChange:Pt,prefixCls:re,className:St,style:Ft,disabled:le,ref:Nt,loadingIcon:Ee}))))});ve.__ANT_SWITCH=!0;var Bt=ve},94968:function(en,Ht,ie){"use strict";ie.d(Ht,{default:function(){return Oe}});var te=ie(59301),ot=ie(77654),me=ie(4676),Ge=ie(92310),xe=ie.n(Ge),Ce=ie(60499),ze=ie(38705),Ke=ie(17212),ke=ie(15793),fe=ie(39153),Qe=ie(55401),be=ie(18642),xt=ie(85899),rt=ie(42244),Re=ie(43749),He=ie(73001),Ie=ie(11576),ut=ie(26112),gt=ie(48736),yt=function(pe,Fe){if(pe&&Fe){var je=Array.isArray(Fe)?Fe:Fe.split(","),tt=pe.name||"",Ze=pe.type||"",Le=Ze.replace(/\/.*$/,"");return je.some(function(Te){var Ue=Te.trim();if(/^\*(\/\*)?$/.test(Te))return!0;if(Ue.charAt(0)==="."){var Vt=tt.toLowerCase(),zt=Ue.toLowerCase(),Zt=[zt];return(zt===".jpg"||zt===".jpeg")&&(Zt=[".jpg",".jpeg"]),Zt.some(function(kn){return Vt.endsWith(kn)})}return/\/\*$/.test(Ue)?Le===Ue.replace(/\/.*$/,""):Ze===Ue?!0:/^\w+$/.test(Ue)?((0,gt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Ue,"'.Skip for check.")),!0):!1})}return!0};function ft(pe,Fe){var je="cannot ".concat(pe.method," ").concat(pe.action," ").concat(Fe.status,"'"),tt=new Error(je);return tt.status=Fe.status,tt.method=pe.method,tt.url=pe.action,tt}function nt(pe){var Fe=pe.responseText||pe.response;if(!Fe)return Fe;try{return JSON.parse(Fe)}catch(je){return Fe}}function vt(pe){var Fe=new XMLHttpRequest;pe.onProgress&&Fe.upload&&(Fe.upload.onprogress=function(Le){Le.total>0&&(Le.percent=Le.loaded/Le.total*100),pe.onProgress(Le)});var je=new FormData;pe.data&&Object.keys(pe.data).forEach(function(Ze){var Le=pe.data[Ze];if(Array.isArray(Le)){Le.forEach(function(Te){je.append("".concat(Ze,"[]"),Te)});return}je.append(Ze,Le)}),pe.file instanceof Blob?je.append(pe.filename,pe.file,pe.file.name):je.append(pe.filename,pe.file),Fe.onerror=function(Le){pe.onError(Le)},Fe.onload=function(){return Fe.status<200||Fe.status>=300?pe.onError(ft(pe,Fe),nt(Fe)):pe.onSuccess(nt(Fe),Fe)},Fe.open(pe.method,pe.action,!0),pe.withCredentials&&"withCredentials"in Fe&&(Fe.withCredentials=!0);var tt=pe.headers||{};return tt["X-Requested-With"]!==null&&Fe.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(tt).forEach(function(Ze){tt[Ze]!==null&&Fe.setRequestHeader(Ze,tt[Ze])}),Fe.send(je),{abort:function(){Fe.abort()}}}var We=function(){var pe=(0,Ie.Z)((0,He.Z)().mark(function Fe(je,tt){var Ze,Le,Te,Ue,Vt,zt,Zt,kn;return(0,He.Z)().wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:zt=function(){return zt=(0,Ie.Z)((0,He.Z)().mark(function mn(wn){return(0,He.Z)().wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return Yn.abrupt("return",new Promise(function(Un){wn.file(function(Kn){tt(Kn)?(wn.fullPath&&!Kn.webkitRelativePath&&(Object.defineProperties(Kn,{webkitRelativePath:{writable:!0}}),Kn.webkitRelativePath=wn.fullPath.replace(/^\//,""),Object.defineProperties(Kn,{webkitRelativePath:{writable:!1}})),Un(Kn)):Un(null)})}));case 1:case"end":return Yn.stop()}},mn)})),zt.apply(this,arguments)},Vt=function(mn){return zt.apply(this,arguments)},Ue=function(){return Ue=(0,Ie.Z)((0,He.Z)().mark(function mn(wn){var Fn,Yn,Un,Kn,vn;return(0,He.Z)().wrap(function(Wn){for(;;)switch(Wn.prev=Wn.next){case 0:Fn=wn.createReader(),Yn=[];case 2:return Wn.next=5,new Promise(function(dr){Fn.readEntries(dr,function(){return dr([])})});case 5:if(Un=Wn.sent,Kn=Un.length,Kn){Wn.next=9;break}return Wn.abrupt("break",12);case 9:for(vn=0;vn<Kn;vn++)Yn.push(Un[vn]);Wn.next=2;break;case 12:return Wn.abrupt("return",Yn);case 13:case"end":return Wn.stop()}},mn)})),Ue.apply(this,arguments)},Te=function(mn){return Ue.apply(this,arguments)},Ze=[],Le=[],je.forEach(function(En){return Le.push(En.webkitGetAsEntry())}),Zt=function(){var En=(0,Ie.Z)((0,He.Z)().mark(function mn(wn,Fn){var Yn,Un;return(0,He.Z)().wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(wn){vn.next=2;break}return vn.abrupt("return");case 2:if(wn.path=Fn||"",!wn.isFile){vn.next=10;break}return vn.next=6,Vt(wn);case 6:Yn=vn.sent,Yn&&Ze.push(Yn),vn.next=15;break;case 10:if(!wn.isDirectory){vn.next=15;break}return vn.next=13,Te(wn);case 13:Un=vn.sent,Le.push.apply(Le,(0,ot.Z)(Un));case 15:case"end":return vn.stop()}},mn)}));return function(wn,Fn){return En.apply(this,arguments)}}(),kn=0;case 9:if(!(kn<Le.length)){Hn.next=15;break}return Hn.next=12,Zt(Le[kn]);case 12:kn++,Hn.next=9;break;case 15:return Hn.abrupt("return",Ze);case 16:case"end":return Hn.stop()}},Fe)}));return function(je,tt){return pe.apply(this,arguments)}}(),At=We,st=+new Date,qe=0;function Mt(){return"rc-upload-".concat(st,"-").concat(++qe)}var Ve=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],pt=function(pe){(0,fe.Z)(je,pe);var Fe=(0,Qe.Z)(je);function je(){var tt;(0,ze.Z)(this,je);for(var Ze=arguments.length,Le=new Array(Ze),Te=0;Te<Ze;Te++)Le[Te]=arguments[Te];return tt=Fe.call.apply(Fe,[this].concat(Le)),(0,be.Z)((0,ke.Z)(tt),"state",{uid:Mt()}),(0,be.Z)((0,ke.Z)(tt),"reqs",{}),(0,be.Z)((0,ke.Z)(tt),"fileInput",void 0),(0,be.Z)((0,ke.Z)(tt),"_isMounted",void 0),(0,be.Z)((0,ke.Z)(tt),"onChange",function(Ue){var Vt=tt.props,zt=Vt.accept,Zt=Vt.directory,kn=Ue.target.files,Tn=(0,ot.Z)(kn).filter(function(Hn){return!Zt||yt(Hn,zt)});tt.uploadFiles(Tn),tt.reset()}),(0,be.Z)((0,ke.Z)(tt),"onClick",function(Ue){var Vt=tt.fileInput;if(Vt){var zt=Ue.target,Zt=tt.props.onClick;if(zt&&zt.tagName==="BUTTON"){var kn=Vt.parentNode;kn.focus(),zt.blur()}Vt.click(),Zt&&Zt(Ue)}}),(0,be.Z)((0,ke.Z)(tt),"onKeyDown",function(Ue){Ue.key==="Enter"&&tt.onClick(Ue)}),(0,be.Z)((0,ke.Z)(tt),"onFileDrop",function(){var Ue=(0,Ie.Z)((0,He.Z)().mark(function Vt(zt){var Zt,kn,Tn;return(0,He.Z)().wrap(function(En){for(;;)switch(En.prev=En.next){case 0:if(Zt=tt.props.multiple,zt.preventDefault(),zt.type!=="dragover"){En.next=4;break}return En.abrupt("return");case 4:if(!tt.props.directory){En.next=11;break}return En.next=7,At(Array.prototype.slice.call(zt.dataTransfer.items),function(mn){return yt(mn,tt.props.accept)});case 7:kn=En.sent,tt.uploadFiles(kn),En.next=14;break;case 11:Tn=(0,ot.Z)(zt.dataTransfer.files).filter(function(mn){return yt(mn,tt.props.accept)}),Zt===!1&&(Tn=Tn.slice(0,1)),tt.uploadFiles(Tn);case 14:case"end":return En.stop()}},Vt)}));return function(Vt){return Ue.apply(this,arguments)}}()),(0,be.Z)((0,ke.Z)(tt),"uploadFiles",function(Ue){var Vt=(0,ot.Z)(Ue),zt=Vt.map(function(Zt){return Zt.uid=Mt(),tt.processFile(Zt,Vt)});Promise.all(zt).then(function(Zt){var kn=tt.props.onBatchStart;kn==null||kn(Zt.map(function(Tn){var Hn=Tn.origin,En=Tn.parsedFile;return{file:Hn,parsedFile:En}})),Zt.filter(function(Tn){return Tn.parsedFile!==null}).forEach(function(Tn){tt.post(Tn)})})}),(0,be.Z)((0,ke.Z)(tt),"processFile",function(){var Ue=(0,Ie.Z)((0,He.Z)().mark(function Vt(zt,Zt){var kn,Tn,Hn,En,mn,wn,Fn,Yn,Un;return(0,He.Z)().wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(kn=tt.props.beforeUpload,Tn=zt,!kn){vn.next=14;break}return vn.prev=3,vn.next=6,kn(zt,Zt);case 6:Tn=vn.sent,vn.next=12;break;case 9:vn.prev=9,vn.t0=vn.catch(3),Tn=!1;case 12:if(Tn!==!1){vn.next=14;break}return vn.abrupt("return",{origin:zt,parsedFile:null,action:null,data:null});case 14:if(Hn=tt.props.action,typeof Hn!="function"){vn.next=21;break}return vn.next=18,Hn(zt);case 18:En=vn.sent,vn.next=22;break;case 21:En=Hn;case 22:if(mn=tt.props.data,typeof mn!="function"){vn.next=29;break}return vn.next=26,mn(zt);case 26:wn=vn.sent,vn.next=30;break;case 29:wn=mn;case 30:return Fn=((0,Re.Z)(Tn)==="object"||typeof Tn=="string")&&Tn?Tn:zt,Fn instanceof File?Yn=Fn:Yn=new File([Fn],zt.name,{type:zt.type}),Un=Yn,Un.uid=zt.uid,vn.abrupt("return",{origin:zt,data:wn,parsedFile:Un,action:En});case 35:case"end":return vn.stop()}},Vt,null,[[3,9]])}));return function(Vt,zt){return Ue.apply(this,arguments)}}()),(0,be.Z)((0,ke.Z)(tt),"saveFileInput",function(Ue){tt.fileInput=Ue}),tt}return(0,Ke.Z)(je,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Ze){var Le=this,Te=Ze.data,Ue=Ze.origin,Vt=Ze.action,zt=Ze.parsedFile;if(this._isMounted){var Zt=this.props,kn=Zt.onStart,Tn=Zt.customRequest,Hn=Zt.name,En=Zt.headers,mn=Zt.withCredentials,wn=Zt.method,Fn=Ue.uid,Yn=Tn||vt,Un={action:Vt,filename:Hn,data:Te,file:zt,headers:En,withCredentials:mn,method:wn||"post",onProgress:function(vn){var er=Le.props.onProgress;er==null||er(vn,zt)},onSuccess:function(vn,er){var Wn=Le.props.onSuccess;Wn==null||Wn(vn,zt,er),delete Le.reqs[Fn]},onError:function(vn,er){var Wn=Le.props.onError;Wn==null||Wn(vn,er,zt),delete Le.reqs[Fn]}};kn(Ue),this.reqs[Fn]=Yn(Un)}}},{key:"reset",value:function(){this.setState({uid:Mt()})}},{key:"abort",value:function(Ze){var Le=this.reqs;if(Ze){var Te=Ze.uid?Ze.uid:Ze;Le[Te]&&Le[Te].abort&&Le[Te].abort(),delete Le[Te]}else Object.keys(Le).forEach(function(Ue){Le[Ue]&&Le[Ue].abort&&Le[Ue].abort(),delete Le[Ue]})}},{key:"render",value:function(){var Ze=this.props,Le=Ze.component,Te=Ze.prefixCls,Ue=Ze.className,Vt=Ze.classNames,zt=Vt===void 0?{}:Vt,Zt=Ze.disabled,kn=Ze.id,Tn=Ze.name,Hn=Ze.style,En=Ze.styles,mn=En===void 0?{}:En,wn=Ze.multiple,Fn=Ze.accept,Yn=Ze.capture,Un=Ze.children,Kn=Ze.directory,vn=Ze.openFileDialogOnClick,er=Ze.onMouseEnter,Wn=Ze.onMouseLeave,dr=Ze.hasControlInside,pr=(0,rt.Z)(Ze,Ve),lr=xe()((0,be.Z)((0,be.Z)((0,be.Z)({},Te,!0),"".concat(Te,"-disabled"),Zt),Ue,Ue)),ur=Kn?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},yr=Zt?{}:{onClick:vn?this.onClick:function(){},onKeyDown:vn?this.onKeyDown:function(){},onMouseEnter:er,onMouseLeave:Wn,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:dr?void 0:"0"};return te.createElement(Le,(0,Ce.Z)({},yr,{className:lr,role:dr?void 0:"button",style:Hn}),te.createElement("input",(0,Ce.Z)({},(0,ut.Z)(pr,{aria:!0,data:!0}),{id:kn,name:Tn,disabled:Zt,type:"file",ref:this.saveFileInput,onClick:function(fr){return fr.stopPropagation()},key:this.state.uid,style:(0,xt.Z)({display:"none"},mn.input),className:zt.input,accept:Fn},ur,{multiple:wn,onChange:this.onChange},Yn!=null?{capture:Yn}:{})),Un)}}]),je}(te.Component),ht=pt;function ve(){}var Bt=function(pe){(0,fe.Z)(je,pe);var Fe=(0,Qe.Z)(je);function je(){var tt;(0,ze.Z)(this,je);for(var Ze=arguments.length,Le=new Array(Ze),Te=0;Te<Ze;Te++)Le[Te]=arguments[Te];return tt=Fe.call.apply(Fe,[this].concat(Le)),(0,be.Z)((0,ke.Z)(tt),"uploader",void 0),(0,be.Z)((0,ke.Z)(tt),"saveUploader",function(Ue){tt.uploader=Ue}),tt}return(0,Ke.Z)(je,[{key:"abort",value:function(Ze){this.uploader.abort(Ze)}},{key:"render",value:function(){return te.createElement(ht,(0,Ce.Z)({},this.props,{ref:this.saveUploader}))}}]),je}(te.Component);(0,be.Z)(Bt,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:ve,onError:ve,onSuccess:ve,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Ae=Bt,Nt=Ae,rn=ie(18929),we=ie(48755),de=ie(2171),Je=ie(9017),wt=ie(85981),Et=ie(63356),Be=ie(34961),dt=ie(16931),bt=ie(51636),tn=ie(36237),jt=pe=>{const{componentCls:Fe,iconCls:je}=pe;return{[`${Fe}-wrapper`]:{[`${Fe}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:pe.colorFillAlter,border:`${(0,tn.unit)(pe.lineWidth)} dashed ${pe.colorBorder}`,borderRadius:pe.borderRadiusLG,cursor:"pointer",transition:`border-color ${pe.motionDurationSlow}`,[Fe]:{padding:pe.padding},[`${Fe}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:pe.borderRadiusLG,"&:focus-visible":{outline:`${(0,tn.unit)(pe.lineWidthFocus)} solid ${pe.colorPrimaryBorder}`}},[`${Fe}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
|
|
|
&:not(${Fe}-disabled):hover,
|
|
|
&-hover:not(${Fe}-disabled)
|
|
|
`]:{borderColor:pe.colorPrimaryHover},[`p${Fe}-drag-icon`]:{marginBottom:pe.margin,[je]:{color:pe.colorPrimary,fontSize:pe.uploadThumbnailSize}},[`p${Fe}-text`]:{margin:`0 0 ${(0,tn.unit)(pe.marginXXS)}`,color:pe.colorTextHeading,fontSize:pe.fontSizeLG},[`p${Fe}-hint`]:{color:pe.colorTextDescription,fontSize:pe.fontSize},[`&${Fe}-disabled`]:{[`p${Fe}-drag-icon ${je},
|
|
|
p${Fe}-text,
|
|
|
p${Fe}-hint
|
|
|
`]:{color:pe.colorTextDisabled}}}}}},Gt=pe=>{const{componentCls:Fe,iconCls:je,fontSize:tt,lineHeight:Ze,calc:Le}=pe,Te=`${Fe}-list-item`,Ue=`${Te}-actions`,Vt=`${Te}-action`;return{[`${Fe}-wrapper`]:{[`${Fe}-list`]:Object.assign(Object.assign({},(0,Et.dF)()),{lineHeight:pe.lineHeight,[Te]:{position:"relative",height:Le(pe.lineHeight).mul(tt).equal(),marginTop:pe.marginXS,fontSize:tt,display:"flex",alignItems:"center",transition:`background-color ${pe.motionDurationSlow}`,borderRadius:pe.borderRadiusSM,"&:hover":{backgroundColor:pe.controlItemBgHover},[`${Te}-name`]:Object.assign(Object.assign({},Et.vS),{padding:`0 ${(0,tn.unit)(pe.paddingXS)}`,lineHeight:Ze,flex:"auto",transition:`all ${pe.motionDurationSlow}`}),[Ue]:{whiteSpace:"nowrap",[Vt]:{opacity:0},[je]:{color:pe.actionsColor,transition:`all ${pe.motionDurationSlow}`},[`
|
|
|
${Vt}:focus-visible,
|
|
|
&.picture ${Vt}
|
|
|
`]:{opacity:1}},[`${Fe}-icon ${je}`]:{color:pe.colorTextDescription,fontSize:tt},[`${Te}-progress`]:{position:"absolute",bottom:pe.calc(pe.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:Le(tt).add(pe.paddingXS).equal(),fontSize:tt,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Te}:hover ${Vt}`]:{opacity:1},[`${Te}-error`]:{color:pe.colorError,[`${Te}-name, ${Fe}-icon ${je}`]:{color:pe.colorError},[Ue]:{[`${je}, ${je}:hover`]:{color:pe.colorError},[Vt]:{opacity:1}}},[`${Fe}-list-item-container`]:{transition:`opacity ${pe.motionDurationSlow}, height ${pe.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},mt=ie(99495),ee=pe=>{const{componentCls:Fe}=pe,je=new tn.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:pe.calc(pe.marginXS).div(-2).equal()}}),tt=new tn.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:pe.calc(pe.marginXS).div(-2).equal()}}),Ze=`${Fe}-animate-inline`;return[{[`${Fe}-wrapper`]:{[`${Ze}-appear, ${Ze}-enter, ${Ze}-leave`]:{animationDuration:pe.motionDurationSlow,animationTimingFunction:pe.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Ze}-appear, ${Ze}-enter`]:{animationName:je},[`${Ze}-leave`]:{animationName:tt}}},{[`${Fe}-wrapper`]:(0,mt.J$)(pe)},je,tt]},z=ie(68361);const oe=pe=>{const{componentCls:Fe,iconCls:je,uploadThumbnailSize:tt,uploadProgressOffset:Ze,calc:Le}=pe,Te=`${Fe}-list`,Ue=`${Te}-item`;return{[`${Fe}-wrapper`]:{[`
|
|
|
${Te}${Te}-picture,
|
|
|
${Te}${Te}-picture-card,
|
|
|
${Te}${Te}-picture-circle
|
|
|
`]:{[Ue]:{position:"relative",height:Le(tt).add(Le(pe.lineWidth).mul(2)).add(Le(pe.paddingXS).mul(2)).equal(),padding:pe.paddingXS,border:`${(0,tn.unit)(pe.lineWidth)} ${pe.lineType} ${pe.colorBorder}`,borderRadius:pe.borderRadiusLG,"&:hover":{background:"transparent"},[`${Ue}-thumbnail`]:Object.assign(Object.assign({},Et.vS),{width:tt,height:tt,lineHeight:(0,tn.unit)(Le(tt).add(pe.paddingSM).equal()),textAlign:"center",flex:"none",[je]:{fontSize:pe.fontSizeHeading2,color:pe.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Ue}-progress`]:{bottom:Ze,width:`calc(100% - ${(0,tn.unit)(Le(pe.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:Le(tt).add(pe.paddingXS).equal()}},[`${Ue}-error`]:{borderColor:pe.colorError,[`${Ue}-thumbnail ${je}`]:{[`svg path[fill='${z.blue[0]}']`]:{fill:pe.colorErrorBg},[`svg path[fill='${z.blue.primary}']`]:{fill:pe.colorError}}},[`${Ue}-uploading`]:{borderStyle:"dashed",[`${Ue}-name`]:{marginBottom:Ze}}},[`${Te}${Te}-picture-circle ${Ue}`]:{[`&, &::before, ${Ue}-thumbnail`]:{borderRadius:"50%"}}}}},le=pe=>{const{componentCls:Fe,iconCls:je,fontSizeLG:tt,colorTextLightSolid:Ze,calc:Le}=pe,Te=`${Fe}-list`,Ue=`${Te}-item`,Vt=pe.uploadPicCardSize;return{[`
|
|
|
${Fe}-wrapper${Fe}-picture-card-wrapper,
|
|
|
${Fe}-wrapper${Fe}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Et.dF)()),{display:"block",[`${Fe}${Fe}-select`]:{width:Vt,height:Vt,textAlign:"center",verticalAlign:"top",backgroundColor:pe.colorFillAlter,border:`${(0,tn.unit)(pe.lineWidth)} dashed ${pe.colorBorder}`,borderRadius:pe.borderRadiusLG,cursor:"pointer",transition:`border-color ${pe.motionDurationSlow}`,[`> ${Fe}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${Fe}-disabled):hover`]:{borderColor:pe.colorPrimary}},[`${Te}${Te}-picture-card, ${Te}${Te}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:pe.marginXS,marginInlineEnd:pe.marginXS}},"@supports (gap: 1px)":{gap:pe.marginXS},[`${Te}-item-container`]:{display:"inline-block",width:Vt,height:Vt,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[Ue]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${(0,tn.unit)(Le(pe.paddingXS).mul(2).equal())})`,height:`calc(100% - ${(0,tn.unit)(Le(pe.paddingXS).mul(2).equal())})`,backgroundColor:pe.colorBgMask,opacity:0,transition:`all ${pe.motionDurationSlow}`,content:'" "'}},[`${Ue}:hover`]:{[`&::before, ${Ue}-actions`]:{opacity:1}},[`${Ue}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${pe.motionDurationSlow}`,[`
|
|
|
${je}-eye,
|
|
|
${je}-download,
|
|
|
${je}-delete
|
|
|
`]:{zIndex:10,width:tt,margin:`0 ${(0,tn.unit)(pe.marginXXS)}`,fontSize:tt,cursor:"pointer",transition:`all ${pe.motionDurationSlow}`,color:Ze,"&:hover":{color:Ze},svg:{verticalAlign:"baseline"}}},[`${Ue}-thumbnail, ${Ue}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Ue}-name`]:{display:"none",textAlign:"center"},[`${Ue}-file + ${Ue}-name`]:{position:"absolute",bottom:pe.margin,display:"block",width:`calc(100% - ${(0,tn.unit)(Le(pe.paddingXS).mul(2).equal())})`},[`${Ue}-uploading`]:{[`&${Ue}`]:{backgroundColor:pe.colorFillAlter},[`&::before, ${je}-eye, ${je}-download, ${je}-delete`]:{display:"none"}},[`${Ue}-progress`]:{bottom:pe.marginXL,width:`calc(100% - ${(0,tn.unit)(Le(pe.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${Fe}-wrapper${Fe}-picture-circle-wrapper`]:{[`${Fe}${Fe}-select`]:{borderRadius:"50%"}}}};var Ee=pe=>{const{componentCls:Fe}=pe;return{[`${Fe}-rtl`]:{direction:"rtl"}}};const at=pe=>{const{componentCls:Fe,colorTextDisabled:je}=pe;return{[`${Fe}-wrapper`]:Object.assign(Object.assign({},(0,Et.Wf)(pe)),{[Fe]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${Fe}-select`]:{display:"inline-block"},[`${Fe}-hidden`]:{display:"none"},[`${Fe}-disabled`]:{color:je,cursor:"not-allowed"}})}},$t=pe=>({actionsColor:pe.colorTextDescription});var Ye=(0,dt.I$)("Upload",pe=>{const{fontSizeHeading3:Fe,fontHeight:je,lineWidth:tt,controlHeightLG:Ze,calc:Le}=pe,Te=(0,bt.mergeToken)(pe,{uploadThumbnailSize:Le(Fe).mul(2).equal(),uploadProgressOffset:Le(Le(je).div(2)).add(tt).equal(),uploadPicCardSize:Le(Ze).mul(2.55).equal()});return[at(Te),jt(Te),oe(Te),le(Te),Gt(Te),ee(Te),Ee(Te),(0,Be.Z)(Te)]},$t),ct={icon:function(Fe,je){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:je}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:Fe}}]}},name:"file",theme:"twotone"},St=ct,Ft=ie(7657),Pt=function(Fe,je){return te.createElement(Ft.Z,(0,Ce.Z)({},Fe,{ref:je,icon:St}))},Qt=te.forwardRef(Pt),Jt=Qt,Ut=ie(58617),Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},on=Sn,gn=function(Fe,je){return te.createElement(Ft.Z,(0,Ce.Z)({},Fe,{ref:je,icon:on}))},kt=te.forwardRef(gn),Mn=kt,nn={icon:function(Fe,je){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:Fe}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:je}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:je}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:je}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:Fe}}]}},name:"picture",theme:"twotone"},Me=nn,et=function(Fe,je){return te.createElement(Ft.Z,(0,Ce.Z)({},Fe,{ref:je,icon:Me}))},Lt=te.forwardRef(et),Rt=Lt,Se=ie(77900),$e=ie(2738),lt=ie(40192),Tt=ie(86641),Wt=ie(22703),ln=ie(7939);function Dn(pe){return Object.assign(Object.assign({},pe),{lastModified:pe.lastModified,lastModifiedDate:pe.lastModifiedDate,name:pe.name,size:pe.size,type:pe.type,uid:pe.uid,percent:0,originFileObj:pe})}function In(pe,Fe){const je=(0,ot.Z)(Fe),tt=je.findIndex(Ze=>{let{uid:Le}=Ze;return Le===pe.uid});return tt===-1?je.push(pe):je[tt]=pe,je}function dn(pe,Fe){const je=pe.uid!==void 0?"uid":"name";return Fe.filter(tt=>tt[je]===pe[je])[0]}function Cn(pe,Fe){const je=pe.uid!==void 0?"uid":"name",tt=Fe.filter(Ze=>Ze[je]!==pe[je]);return tt.length===Fe.length?null:tt}const fn=function(){const Fe=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),tt=Fe[Fe.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(tt)||[""])[0]},$n=pe=>pe.indexOf("image/")===0,yn=pe=>{if(pe.type&&!pe.thumbUrl)return $n(pe.type);const Fe=pe.thumbUrl||pe.url||"",je=fn(Fe);return/^data:image\//.test(Fe)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(je)?!0:!(/^data:/.test(Fe)||je)},hn=200;function qt(pe){return new Promise(Fe=>{if(!pe.type||!$n(pe.type)){Fe("");return}const je=document.createElement("canvas");je.width=hn,je.height=hn,je.style.cssText=`position: fixed; left: 0; top: 0; width: ${hn}px; height: ${hn}px; z-index: 9999; display: none;`,document.body.appendChild(je);const tt=je.getContext("2d"),Ze=new Image;if(Ze.onload=()=>{const{width:Le,height:Te}=Ze;let Ue=hn,Vt=hn,zt=0,Zt=0;Le>Te?(Vt=Te*(hn/Le),Zt=-(Vt-Ue)/2):(Ue=Le*(hn/Te),zt=-(Ue-Vt)/2),tt.drawImage(Ze,zt,Zt,Ue,Vt);const kn=je.toDataURL();document.body.removeChild(je),window.URL.revokeObjectURL(Ze.src),Fe(kn)},Ze.crossOrigin="anonymous",pe.type.startsWith("image/svg+xml")){const Le=new FileReader;Le.onload=()=>{Le.result&&typeof Le.result=="string"&&(Ze.src=Le.result)},Le.readAsDataURL(pe)}else if(pe.type.startsWith("image/gif")){const Le=new FileReader;Le.onload=()=>{Le.result&&Fe(Le.result)},Le.readAsDataURL(pe)}else Ze.src=window.URL.createObjectURL(pe)})}var Pn=ie(26227),pn=ie(41464),Ln=ie(15277),Gn=ie(89787),jn=ie(25399),Xn=te.forwardRef((pe,Fe)=>{let{prefixCls:je,className:tt,style:Ze,locale:Le,listType:Te,file:Ue,items:Vt,progress:zt,iconRender:Zt,actionIconRender:kn,itemRender:Tn,isImgUrl:Hn,showPreviewIcon:En,showRemoveIcon:mn,showDownloadIcon:wn,previewIcon:Fn,removeIcon:Yn,downloadIcon:Un,extra:Kn,onPreview:vn,onDownload:er,onClose:Wn}=pe;var dr,pr;const{status:lr}=Ue,[ur,yr]=te.useState(lr);te.useEffect(()=>{lr!=="removed"&&yr(lr)},[lr]);const[sr,fr]=te.useState(!1);te.useEffect(()=>{const Kt=setTimeout(()=>{fr(!0)},300);return()=>{clearTimeout(Kt)}},[]);const Qn=Zt(Ue);let mr=te.createElement("div",{className:`${je}-icon`},Qn);if(Te==="picture"||Te==="picture-card"||Te==="picture-circle")if(ur==="uploading"||!Ue.thumbUrl&&!Ue.url){const Kt=xe()(`${je}-list-item-thumbnail`,{[`${je}-list-item-file`]:ur!=="uploading"});mr=te.createElement("div",{className:Kt},Qn)}else{const Kt=Hn!=null&&Hn(Ue)?te.createElement("img",{src:Ue.thumbUrl||Ue.url,alt:Ue.name,className:`${je}-list-item-image`,crossOrigin:Ue.crossOrigin}):Qn,bn=xe()(`${je}-list-item-thumbnail`,{[`${je}-list-item-file`]:Hn&&!Hn(Ue)});mr=te.createElement("a",{className:bn,onClick:On=>vn(Ue,On),href:Ue.url||Ue.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Kt)}const br=xe()(`${je}-list-item`,`${je}-list-item-${ur}`),Hr=typeof Ue.linkProps=="string"?JSON.parse(Ue.linkProps):Ue.linkProps,Er=(typeof mn=="function"?mn(Ue):mn)?kn((typeof Yn=="function"?Yn(Ue):Yn)||te.createElement(Pn.Z,null),()=>Wn(Ue),je,Le.removeFile,!0):null,Ar=(typeof wn=="function"?wn(Ue):wn)&&ur==="done"?kn((typeof Un=="function"?Un(Ue):Un)||te.createElement(pn.Z,null),()=>er(Ue),je,Le.downloadFile):null,kr=Te!=="picture-card"&&Te!=="picture-circle"&&te.createElement("span",{key:"download-delete",className:xe()(`${je}-list-item-actions`,{picture:Te==="picture"})},Ar,Er),Mr=typeof Kn=="function"?Kn(Ue):Kn,ir=Mr&&te.createElement("span",{className:`${je}-list-item-extra`},Mr),rr=xe()(`${je}-list-item-name`),Jn=Ue.url?te.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:rr,title:Ue.name},Hr,{href:Ue.url,onClick:Kt=>vn(Ue,Kt)}),Ue.name,ir):te.createElement("span",{key:"view",className:rr,onClick:Kt=>vn(Ue,Kt),title:Ue.name},Ue.name,ir),Yt=(typeof En=="function"?En(Ue):En)&&(Ue.url||Ue.thumbUrl)?te.createElement("a",{href:Ue.url||Ue.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Kt=>vn(Ue,Kt),title:Le.previewFile},typeof Fn=="function"?Fn(Ue):Fn||te.createElement(Ln.Z,null)):null,cn=(Te==="picture-card"||Te==="picture-circle")&&ur!=="uploading"&&te.createElement("span",{className:`${je}-list-item-actions`},Yt,ur==="done"&&Ar,Er),{getPrefixCls:un}=te.useContext(we.E_),_t=un(),An=te.createElement("div",{className:br},mr,Jn,kr,cn,sr&&te.createElement(Se.default,{motionName:`${_t}-fade`,visible:ur==="uploading",motionDeadline:2e3},Kt=>{let{className:bn}=Kt;const On="percent"in Ue?te.createElement(Gn.Z,Object.assign({},zt,{type:"line",percent:Ue.percent,"aria-label":Ue["aria-label"],"aria-labelledby":Ue["aria-labelledby"]})):null;return te.createElement("div",{className:xe()(`${je}-list-item-progress`,bn)},On)})),Zn=Ue.response&&typeof Ue.response=="string"?Ue.response:((dr=Ue.error)===null||dr===void 0?void 0:dr.statusText)||((pr=Ue.error)===null||pr===void 0?void 0:pr.message)||Le.uploadError,an=ur==="error"?te.createElement(jn.Z,{title:Zn,getPopupContainer:Kt=>Kt.parentNode},An):An;return te.createElement("div",{className:xe()(`${je}-list-item-container`,tt),style:Ze,ref:Fe},Tn?Tn(an,Ue,Vt,{download:er.bind(null,Ue),preview:vn.bind(null,Ue),remove:Wn.bind(null,Ue)}):an)});const Nn=(pe,Fe)=>{const{listType:je="text",previewFile:tt=qt,onPreview:Ze,onDownload:Le,onRemove:Te,locale:Ue,iconRender:Vt,isImageUrl:zt=yn,prefixCls:Zt,items:kn=[],showPreviewIcon:Tn=!0,showRemoveIcon:Hn=!0,showDownloadIcon:En=!1,removeIcon:mn,previewIcon:wn,downloadIcon:Fn,extra:Yn,progress:Un={size:[-1,2],showInfo:!1},appendAction:Kn,appendActionVisible:vn=!0,itemRender:er,disabled:Wn}=pe,dr=(0,lt.Z)(),[pr,lr]=te.useState(!1),ur=["picture-card","picture-circle"].includes(je);te.useEffect(()=>{je.startsWith("picture")&&(kn||[]).forEach(ir=>{!(ir.originFileObj instanceof File||ir.originFileObj instanceof Blob)||ir.thumbUrl!==void 0||(ir.thumbUrl="",tt==null||tt(ir.originFileObj).then(rr=>{ir.thumbUrl=rr||"",dr()}))})},[je,kn,tt]),te.useEffect(()=>{lr(!0)},[]);const yr=(ir,rr)=>{if(Ze)return rr==null||rr.preventDefault(),Ze(ir)},sr=ir=>{typeof Le=="function"?Le(ir):ir.url&&window.open(ir.url)},fr=ir=>{Te==null||Te(ir)},Qn=ir=>{if(Vt)return Vt(ir,je);const rr=ir.status==="uploading";if(je.startsWith("picture")){const Jn=je==="picture"?te.createElement(Ut.Z,null):Ue.uploading,Yt=zt!=null&&zt(ir)?te.createElement(Rt,null):te.createElement(Jt,null);return rr?Jn:Yt}return rr?te.createElement(Ut.Z,null):te.createElement(Mn,null)},mr=(ir,rr,Jn,Yt,cn)=>{const un={type:"text",size:"small",title:Yt,onClick:_t=>{var An,Zn;rr(),te.isValidElement(ir)&&((Zn=(An=ir.props).onClick)===null||Zn===void 0||Zn.call(An,_t))},className:`${Jn}-list-item-action`};return cn&&(un.disabled=Wn),te.isValidElement(ir)?te.createElement(ln.ZP,Object.assign({},un,{icon:(0,Wt.Tm)(ir,Object.assign(Object.assign({},ir.props),{onClick:()=>{}}))})):te.createElement(ln.ZP,Object.assign({},un),te.createElement("span",null,ir))};te.useImperativeHandle(Fe,()=>({handlePreview:yr,handleDownload:sr}));const{getPrefixCls:br}=te.useContext(we.E_),Hr=br("upload",Zt),Er=br(),Ar=xe()(`${Hr}-list`,`${Hr}-list-${je}`),kr=te.useMemo(()=>(0,$e.Z)((0,Tt.Z)(Er),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[Er]),Mr=Object.assign(Object.assign({},ur?{}:kr),{motionDeadline:2e3,motionName:`${Hr}-${ur?"animate-inline":"animate"}`,keys:(0,ot.Z)(kn.map(ir=>({key:ir.uid,file:ir}))),motionAppear:pr});return te.createElement("div",{className:Ar},te.createElement(Se.CSSMotionList,Object.assign({},Mr,{component:!1}),ir=>{let{key:rr,file:Jn,className:Yt,style:cn}=ir;return te.createElement(Xn,{key:rr,locale:Ue,prefixCls:Hr,className:Yt,style:cn,file:Jn,items:kn,progress:Un,listType:je,isImgUrl:zt,showPreviewIcon:Tn,showRemoveIcon:Hn,showDownloadIcon:En,removeIcon:mn,previewIcon:wn,downloadIcon:Fn,extra:Yn,iconRender:Qn,actionIconRender:mr,itemRender:er,onPreview:yr,onDownload:sr,onClose:fr})}),Kn&&te.createElement(Se.default,Object.assign({},Mr,{visible:vn,forceRender:!0}),ir=>{let{className:rr,style:Jn}=ir;return(0,Wt.Tm)(Kn,Yt=>({className:xe()(Yt.className,rr),style:Object.assign(Object.assign(Object.assign({},Jn),{pointerEvents:rr?"none":void 0}),Yt.style)}))}))};var qn=te.forwardRef(Nn),It=function(pe,Fe,je,tt){function Ze(Le){return Le instanceof je?Le:new je(function(Te){Te(Le)})}return new(je||(je=Promise))(function(Le,Te){function Ue(Zt){try{zt(tt.next(Zt))}catch(kn){Te(kn)}}function Vt(Zt){try{zt(tt.throw(Zt))}catch(kn){Te(kn)}}function zt(Zt){Zt.done?Le(Zt.value):Ze(Zt.value).then(Ue,Vt)}zt((tt=tt.apply(pe,Fe||[])).next())})};const Xt=`__LIST_IGNORE_${Date.now()}__`,zn=(pe,Fe)=>{const{fileList:je,defaultFileList:tt,onRemove:Ze,showUploadList:Le=!0,listType:Te="text",onPreview:Ue,onDownload:Vt,onChange:zt,onDrop:Zt,previewFile:kn,disabled:Tn,locale:Hn,iconRender:En,isImageUrl:mn,progress:wn,prefixCls:Fn,className:Yn,type:Un="select",children:Kn,style:vn,itemRender:er,maxCount:Wn,data:dr={},multiple:pr=!1,hasControlInside:lr=!0,action:ur="",accept:yr="",supportServerRender:sr=!0,rootClassName:fr}=pe,Qn=te.useContext(de.Z),mr=Tn!=null?Tn:Qn,[br,Hr]=(0,rn.Z)(tt||[],{value:je,postState:xr=>xr!=null?xr:[]}),[Er,Ar]=te.useState("drop"),kr=te.useRef(null),Mr=te.useRef(null);te.useMemo(()=>{const xr=Date.now();(je||[]).forEach((zr,Gr)=>{!zr.uid&&!Object.isFrozen(zr)&&(zr.uid=`__AUTO__${xr}_${Gr}__`)})},[je]);const ir=(xr,zr,Gr)=>{let wr=(0,ot.Z)(zr),Nr=!1;Wn===1?wr=wr.slice(-1):Wn&&(Nr=wr.length>Wn,wr=wr.slice(0,Wn)),(0,me.flushSync)(()=>{Hr(wr)});const Lr={file:xr,fileList:wr};Gr&&(Lr.event=Gr),(!Nr||xr.status==="removed"||wr.some(ui=>ui.uid===xr.uid))&&(0,me.flushSync)(()=>{zt==null||zt(Lr)})},rr=(xr,zr)=>It(void 0,void 0,void 0,function*(){const{beforeUpload:Gr,transformFile:wr}=pe;let Nr=xr;if(Gr){const Lr=yield Gr(xr,zr);if(Lr===!1)return!1;if(delete xr[Xt],Lr===Xt)return Object.defineProperty(xr,Xt,{value:!0,configurable:!0}),!1;typeof Lr=="object"&&Lr&&(Nr=Lr)}return wr&&(Nr=yield wr(Nr)),Nr}),Jn=xr=>{const zr=xr.filter(Nr=>!Nr.file[Xt]);if(!zr.length)return;const Gr=zr.map(Nr=>Dn(Nr.file));let wr=(0,ot.Z)(br);Gr.forEach(Nr=>{wr=In(Nr,wr)}),Gr.forEach((Nr,Lr)=>{let ui=Nr;if(zr[Lr].parsedFile)Nr.status="uploading";else{const{originFileObj:Mi}=Nr;let fi;try{fi=new File([Mi],Mi.name,{type:Mi.type})}catch(ni){fi=new Blob([Mi],{type:Mi.type}),fi.name=Mi.name,fi.lastModifiedDate=new Date,fi.lastModified=new Date().getTime()}fi.uid=Nr.uid,ui=fi}ir(ui,wr)})},Yt=(xr,zr,Gr)=>{try{typeof xr=="string"&&(xr=JSON.parse(xr))}catch(Lr){}if(!dn(zr,br))return;const wr=Dn(zr);wr.status="done",wr.percent=100,wr.response=xr,wr.xhr=Gr;const Nr=In(wr,br);ir(wr,Nr)},cn=(xr,zr)=>{if(!dn(zr,br))return;const Gr=Dn(zr);Gr.status="uploading",Gr.percent=xr.percent;const wr=In(Gr,br);ir(Gr,wr,xr)},un=(xr,zr,Gr)=>{if(!dn(Gr,br))return;const wr=Dn(Gr);wr.error=xr,wr.response=zr,wr.status="error";const Nr=In(wr,br);ir(wr,Nr)},_t=xr=>{let zr;Promise.resolve(typeof Ze=="function"?Ze(xr):Ze).then(Gr=>{var wr;if(Gr===!1)return;const Nr=Cn(xr,br);Nr&&(zr=Object.assign(Object.assign({},xr),{status:"removed"}),br==null||br.forEach(Lr=>{const ui=zr.uid!==void 0?"uid":"name";Lr[ui]===zr[ui]&&!Object.isFrozen(Lr)&&(Lr.status="removed")}),(wr=kr.current)===null||wr===void 0||wr.abort(zr),ir(zr,Nr))})},An=xr=>{Ar(xr.type),xr.type==="drop"&&(Zt==null||Zt(xr))};te.useImperativeHandle(Fe,()=>({onBatchStart:Jn,onSuccess:Yt,onProgress:cn,onError:un,fileList:br,upload:kr.current,nativeElement:Mr.current}));const{getPrefixCls:Zn,direction:an,upload:Kt}=te.useContext(we.E_),bn=Zn("upload",Fn),On=Object.assign(Object.assign({onBatchStart:Jn,onError:un,onProgress:cn,onSuccess:Yt},pe),{data:dr,multiple:pr,action:ur,accept:yr,supportServerRender:sr,prefixCls:bn,disabled:mr,beforeUpload:rr,onChange:void 0,hasControlInside:lr});delete On.className,delete On.style,(!Kn||mr)&&delete On.id;const cr=`${bn}-wrapper`,[Or,Ir,Rr]=Ye(bn,cr),[Br]=(0,Je.Z)("Upload",wt.Z.Upload),{showRemoveIcon:Fr,showPreviewIcon:Ur,showDownloadIcon:Wr,removeIcon:Kr,previewIcon:ti,downloadIcon:Ei,extra:Ni}=typeof Le=="boolean"?{}:Le,xi=typeof Fr=="undefined"?!mr:Fr,li=(xr,zr)=>Le?te.createElement(qn,{prefixCls:bn,listType:Te,items:br,previewFile:kn,onPreview:Ue,onDownload:Vt,onRemove:_t,showRemoveIcon:xi,showPreviewIcon:Ur,showDownloadIcon:Wr,removeIcon:Kr,previewIcon:ti,downloadIcon:Ei,iconRender:En,extra:Ni,locale:Object.assign(Object.assign({},Br),Hn),isImageUrl:mn,progress:wn,appendAction:xr,appendActionVisible:zr,itemRender:er,disabled:mr}):xr,Ri=xe()(cr,Yn,fr,Ir,Rr,Kt==null?void 0:Kt.className,{[`${bn}-rtl`]:an==="rtl",[`${bn}-picture-card-wrapper`]:Te==="picture-card",[`${bn}-picture-circle-wrapper`]:Te==="picture-circle"}),$r=Object.assign(Object.assign({},Kt==null?void 0:Kt.style),vn);if(Un==="drag"){const xr=xe()(Ir,bn,`${bn}-drag`,{[`${bn}-drag-uploading`]:br.some(zr=>zr.status==="uploading"),[`${bn}-drag-hover`]:Er==="dragover",[`${bn}-disabled`]:mr,[`${bn}-rtl`]:an==="rtl"});return Or(te.createElement("span",{className:Ri,ref:Mr},te.createElement("div",{className:xr,style:$r,onDrop:An,onDragOver:An,onDragLeave:An},te.createElement(Nt,Object.assign({},On,{ref:kr,className:`${bn}-btn`}),te.createElement("div",{className:`${bn}-drag-container`},Kn))),li()))}const _i=xe()(bn,`${bn}-select`,{[`${bn}-disabled`]:mr,[`${bn}-hidden`]:!Kn}),qr=te.createElement("div",{className:_i},te.createElement(Nt,Object.assign({},On,{ref:kr})));return Or(Te==="picture-card"||Te==="picture-circle"?te.createElement("span",{className:Ri,ref:Mr},li(qr,!!Kn)):te.createElement("span",{className:Ri,ref:Mr},qr,li()))};var De=te.forwardRef(zn),_e=function(pe,Fe){var je={};for(var tt in pe)Object.prototype.hasOwnProperty.call(pe,tt)&&Fe.indexOf(tt)<0&&(je[tt]=pe[tt]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,tt=Object.getOwnPropertySymbols(pe);Ze<tt.length;Ze++)Fe.indexOf(tt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(pe,tt[Ze])&&(je[tt[Ze]]=pe[tt[Ze]]);return je},Pe=te.forwardRef((pe,Fe)=>{var{style:je,height:tt,hasControlInside:Ze=!1}=pe,Le=_e(pe,["style","height","hasControlInside"]);return te.createElement(De,Object.assign({ref:Fe,hasControlInside:Ze},Le,{type:"drag",style:Object.assign(Object.assign({},je),{height:tt})}))});const ye=De;ye.Dragger=Pe,ye.LIST_IGNORE=Xt;var Oe=ye},99498:function(en,Ht,ie){(function(te){te(ie(89780))})(function(te){te.defineOption("placeholder","",function(Ke,ke,fe){var Qe=fe&&fe!=te.Init;if(ke&&!Qe)Ke.on("blur",xe),Ke.on("change",Ce),Ke.on("swapDoc",Ce),te.on(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose=function(){Ge(Ke)}),Ce(Ke);else if(!ke&&Qe){Ke.off("blur",xe),Ke.off("change",Ce),Ke.off("swapDoc",Ce),te.off(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose),ot(Ke);var be=Ke.getWrapperElement();be.className=be.className.replace(" CodeMirror-empty","")}ke&&!Ke.hasFocus()&&xe(Ke)});function ot(Ke){Ke.state.placeholder&&(Ke.state.placeholder.parentNode.removeChild(Ke.state.placeholder),Ke.state.placeholder=null)}function me(Ke){ot(Ke);var ke=Ke.state.placeholder=document.createElement("pre");ke.style.cssText="height: 0; overflow: visible",ke.style.direction=Ke.getOption("direction"),ke.className="CodeMirror-placeholder CodeMirror-line-like";var fe=Ke.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),ke.appendChild(fe),Ke.display.lineSpace.insertBefore(ke,Ke.display.lineSpace.firstChild)}function Ge(Ke){setTimeout(function(){var ke=!1,fe=Ke.getInputField();fe.nodeName=="TEXTAREA"?ke=!fe.value:Ke.lineCount()==1&&(ke=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),ke?me(Ke):ot(Ke)},20)}function xe(Ke){ze(Ke)&&me(Ke)}function Ce(Ke){var ke=Ke.getWrapperElement(),fe=ze(Ke);ke.className=ke.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?me(Ke):ot(Ke)}function ze(Ke){return Ke.lineCount()===1&&Ke.getLine(0)===""}})},25717:function(en,Ht,ie){(function(te){te(ie(89780))})(function(te){var ot={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},me=te.Pos;te.defineOption("autoCloseBrackets",!1,function(Re,He,Ie){Ie&&Ie!=te.Init&&(Re.removeKeyMap(xe),Re.state.closeBrackets=null),He&&(Ce(Ge(He,"pairs")),Re.state.closeBrackets=He,Re.addKeyMap(xe))});function Ge(Re,He){return He=="pairs"&&typeof Re=="string"?Re:typeof Re=="object"&&Re[He]!=null?Re[He]:ot[He]}var xe={Backspace:ke,Enter:fe};function Ce(Re){for(var He=0;He<Re.length;He++){var Ie=Re.charAt(He),ut="'"+Ie+"'";xe[ut]||(xe[ut]=ze(Ie))}}Ce(ot.pairs+"`");function ze(Re){return function(He){return be(He,Re)}}function Ke(Re){var He=Re.state.closeBrackets;if(!He||He.override)return He;var Ie=Re.getModeAt(Re.getCursor());return Ie.closeBrackets||He}function ke(Re){var He=Ke(Re);if(!He||Re.getOption("disableInput"))return te.Pass;for(var Ie=Ge(He,"pairs"),ut=Re.listSelections(),gt=0;gt<ut.length;gt++){if(!ut[gt].empty())return te.Pass;var yt=xt(Re,ut[gt].head);if(!yt||Ie.indexOf(yt)%2!=0)return te.Pass}for(var gt=ut.length-1;gt>=0;gt--){var ft=ut[gt].head;Re.replaceRange("",me(ft.line,ft.ch-1),me(ft.line,ft.ch+1),"+delete")}}function fe(Re){var He=Ke(Re),Ie=He&&Ge(He,"explode");if(!Ie||Re.getOption("disableInput"))return te.Pass;for(var ut=Re.listSelections(),gt=0;gt<ut.length;gt++){if(!ut[gt].empty())return te.Pass;var yt=xt(Re,ut[gt].head);if(!yt||Ie.indexOf(yt)%2!=0)return te.Pass}Re.operation(function(){var ft=Re.lineSeparator()||`
|
|
|
`;Re.replaceSelection(ft+ft,null),Re.execCommand("goCharLeft"),ut=Re.listSelections();for(var nt=0;nt<ut.length;nt++){var vt=ut[nt].head.line;Re.indentLine(vt,null,!0),Re.indentLine(vt+1,null,!0)}})}function Qe(Re){var He=te.cmpPos(Re.anchor,Re.head)>0;return{anchor:new me(Re.anchor.line,Re.anchor.ch+(He?-1:1)),head:new me(Re.head.line,Re.head.ch+(He?1:-1))}}function be(Re,He){var Ie=Ke(Re);if(!Ie||Re.getOption("disableInput"))return te.Pass;var ut=Ge(Ie,"pairs"),gt=ut.indexOf(He);if(gt==-1)return te.Pass;for(var yt=Ge(Ie,"closeBefore"),ft=Ge(Ie,"triples"),nt=ut.charAt(gt+1)==He,vt=Re.listSelections(),We=gt%2==0,At,st=0;st<vt.length;st++){var qe=vt[st],Mt=qe.head,Ve,pt=Re.getRange(Mt,me(Mt.line,Mt.ch+1));if(We&&!qe.empty())Ve="surround";else if((nt||!We)&&pt==He)nt&&rt(Re,Mt)?Ve="both":ft.indexOf(He)>=0&&Re.getRange(Mt,me(Mt.line,Mt.ch+3))==He+He+He?Ve="skipThree":Ve="skip";else if(nt&&Mt.ch>1&&ft.indexOf(He)>=0&&Re.getRange(me(Mt.line,Mt.ch-2),Mt)==He+He){if(Mt.ch>2&&/\bstring/.test(Re.getTokenTypeAt(me(Mt.line,Mt.ch-2))))return te.Pass;Ve="addFour"}else if(nt){var ht=Mt.ch==0?" ":Re.getRange(me(Mt.line,Mt.ch-1),Mt);if(!te.isWordChar(pt)&&ht!=He&&!te.isWordChar(ht))Ve="both";else return te.Pass}else if(We&&(pt.length===0||/\s/.test(pt)||yt.indexOf(pt)>-1))Ve="both";else return te.Pass;if(!At)At=Ve;else if(At!=Ve)return te.Pass}var ve=gt%2?ut.charAt(gt-1):He,Bt=gt%2?He:ut.charAt(gt+1);Re.operation(function(){if(At=="skip")Re.execCommand("goCharRight");else if(At=="skipThree")for(var Ae=0;Ae<3;Ae++)Re.execCommand("goCharRight");else if(At=="surround"){for(var Nt=Re.getSelections(),Ae=0;Ae<Nt.length;Ae++)Nt[Ae]=ve+Nt[Ae]+Bt;Re.replaceSelections(Nt,"around"),Nt=Re.listSelections().slice();for(var Ae=0;Ae<Nt.length;Ae++)Nt[Ae]=Qe(Nt[Ae]);Re.setSelections(Nt)}else At=="both"?(Re.replaceSelection(ve+Bt,null),Re.triggerElectric(ve+Bt),Re.execCommand("goCharLeft")):At=="addFour"&&(Re.replaceSelection(ve+ve+ve+ve,"before"),Re.execCommand("goCharRight"))})}function xt(Re,He){var Ie=Re.getRange(me(He.line,He.ch-1),me(He.line,He.ch+1));return Ie.length==2?Ie:null}function rt(Re,He){var Ie=Re.getTokenAt(me(He.line,He.ch+1));return/\bstring/.test(Ie.type)&&Ie.start==He.ch&&(He.ch==0||!/\bstring/.test(Re.getTokenTypeAt(He)))}})},6313:function(en,Ht,ie){(function(te){te(ie(89780),ie(32855))})(function(te){te.defineOption("autoCloseTags",!1,function(ke,fe,Qe){if(Qe!=te.Init&&Qe&&ke.removeKeyMap("autoCloseTags"),!!fe){var be={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(be["'/'"]=function(xt){return Ce(xt)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(be["'>'"]=function(xt){return Ge(xt)}),ke.addKeyMap(be)}});var ot=["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 Ge(ke){if(ke.getOption("disableInput"))return te.Pass;for(var fe=ke.listSelections(),Qe=[],be=ke.getOption("autoCloseTags"),xt=0;xt<fe.length;xt++){if(!fe[xt].empty())return te.Pass;var rt=fe[xt].head,Re=ke.getTokenAt(rt),He=te.innerMode(ke.getMode(),Re.state),Ie=He.state,ut=He.mode.xmlCurrentTag&&He.mode.xmlCurrentTag(Ie),gt=ut&&ut.name;if(!gt)return te.Pass;var yt=He.mode.configuration=="html",ft=typeof be=="object"&&be.dontCloseTags||yt&&ot,nt=typeof be=="object"&&be.indentTags||yt&&me;Re.end>rt.ch&&(gt=gt.slice(0,gt.length-Re.end+rt.ch));var vt=gt.toLowerCase();if(!gt||Re.type=="string"&&(Re.end!=rt.ch||!/[\"\']/.test(Re.string.charAt(Re.string.length-1))||Re.string.length==1)||Re.type=="tag"&&ut.close||Re.string.indexOf("/")==rt.ch-Re.start-1||ft&&ze(ft,vt)>-1||Ke(ke,He.mode.xmlCurrentContext&&He.mode.xmlCurrentContext(Ie)||[],gt,rt,!0))return te.Pass;var We=typeof be=="object"&&be.emptyTags;if(We&&ze(We,gt)>-1){Qe[xt]={text:"/>",newPos:te.Pos(rt.line,rt.ch+2)};continue}var At=nt&&ze(nt,vt)>-1;Qe[xt]={indent:At,text:">"+(At?`
|
|
|
|
|
|
`:"")+"</"+gt+">",newPos:At?te.Pos(rt.line+1,0):te.Pos(rt.line,rt.ch+1)}}for(var st=typeof be=="object"&&be.dontIndentOnAutoClose,xt=fe.length-1;xt>=0;xt--){var qe=Qe[xt];ke.replaceRange(qe.text,fe[xt].head,fe[xt].anchor,"+insert");var Mt=ke.listSelections().slice(0);Mt[xt]={head:qe.newPos,anchor:qe.newPos},ke.setSelections(Mt),!st&&qe.indent&&(ke.indentLine(qe.newPos.line,null,!0),ke.indentLine(qe.newPos.line+1,null,!0))}}function xe(ke,fe){for(var Qe=ke.listSelections(),be=[],xt=fe?"/":"</",rt=ke.getOption("autoCloseTags"),Re=typeof rt=="object"&&rt.dontIndentOnSlash,He=0;He<Qe.length;He++){if(!Qe[He].empty())return te.Pass;var Ie=Qe[He].head,ut=ke.getTokenAt(Ie),gt=te.innerMode(ke.getMode(),ut.state),yt=gt.state;if(fe&&(ut.type=="string"||ut.string.charAt(0)!="<"||ut.start!=Ie.ch-1))return te.Pass;var ft,nt=gt.mode.name!="xml"&&ke.getMode().name=="htmlmixed";if(nt&>.mode.name=="javascript")ft=xt+"script";else if(nt&>.mode.name=="css")ft=xt+"style";else{var vt=gt.mode.xmlCurrentContext&>.mode.xmlCurrentContext(yt);if(!vt||vt.length&&Ke(ke,vt,vt[vt.length-1],Ie))return te.Pass;ft=xt+vt[vt.length-1]}ke.getLine(Ie.line).charAt(ut.end)!=">"&&(ft+=">"),be[He]=ft}if(ke.replaceSelections(be),Qe=ke.listSelections(),!Re)for(var He=0;He<Qe.length;He++)(He==Qe.length-1||Qe[He].head.line<Qe[He+1].head.line)&&ke.indentLine(Qe[He].head.line)}function Ce(ke){return ke.getOption("disableInput")?te.Pass:xe(ke,!0)}te.commands.closeTag=function(ke){return xe(ke)};function ze(ke,fe){if(ke.indexOf)return ke.indexOf(fe);for(var Qe=0,be=ke.length;Qe<be;++Qe)if(ke[Qe]==fe)return Qe;return-1}function Ke(ke,fe,Qe,be,xt){if(!te.scanForClosingTag)return!1;var rt=Math.min(ke.lastLine()+1,be.line+500),Re=te.scanForClosingTag(ke,be,null,rt);if(!Re||Re.tag!=Qe)return!1;for(var He=xt?1:0,Ie=fe.length-1;Ie>=0&&fe[Ie]==Qe;Ie--)++He;be=Re.to;for(var Ie=1;Ie<He;Ie++){var ut=te.scanForClosingTag(ke,be,null,rt);if(!ut||ut.tag!=Qe)return!1;be=ut.to}return!0}})},32855:function(en,Ht,ie){(function(te){te(ie(89780))})(function(te){"use strict";var ot=te.Pos;function me(Ie,ut){return Ie.line-ut.line||Ie.ch-ut.ch}var Ge="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",xe=Ge+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ce=new RegExp("<(/?)(["+Ge+"]["+xe+"]*)","g");function ze(Ie,ut,gt,yt){this.line=ut,this.ch=gt,this.cm=Ie,this.text=Ie.getLine(ut),this.min=yt?Math.max(yt.from,Ie.firstLine()):Ie.firstLine(),this.max=yt?Math.min(yt.to-1,Ie.lastLine()):Ie.lastLine()}function Ke(Ie,ut){var gt=Ie.cm.getTokenTypeAt(ot(Ie.line,ut));return gt&&/\btag\b/.test(gt)}function ke(Ie){if(!(Ie.line>=Ie.max))return Ie.ch=0,Ie.text=Ie.cm.getLine(++Ie.line),!0}function fe(Ie){if(!(Ie.line<=Ie.min))return Ie.text=Ie.cm.getLine(--Ie.line),Ie.ch=Ie.text.length,!0}function Qe(Ie){for(;;){var ut=Ie.text.indexOf(">",Ie.ch);if(ut==-1){if(ke(Ie))continue;return}if(!Ke(Ie,ut+1)){Ie.ch=ut+1;continue}var gt=Ie.text.lastIndexOf("/",ut),yt=gt>-1&&!/\S/.test(Ie.text.slice(gt+1,ut));return Ie.ch=ut+1,yt?"selfClose":"regular"}}function be(Ie){for(;;){var ut=Ie.ch?Ie.text.lastIndexOf("<",Ie.ch-1):-1;if(ut==-1){if(fe(Ie))continue;return}if(!Ke(Ie,ut+1)){Ie.ch=ut;continue}Ce.lastIndex=ut,Ie.ch=ut;var gt=Ce.exec(Ie.text);if(gt&>.index==ut)return gt}}function xt(Ie){for(;;){Ce.lastIndex=Ie.ch;var ut=Ce.exec(Ie.text);if(!ut){if(ke(Ie))continue;return}if(!Ke(Ie,ut.index+1)){Ie.ch=ut.index+1;continue}return Ie.ch=ut.index+ut[0].length,ut}}function rt(Ie){for(;;){var ut=Ie.ch?Ie.text.lastIndexOf(">",Ie.ch-1):-1;if(ut==-1){if(fe(Ie))continue;return}if(!Ke(Ie,ut+1)){Ie.ch=ut;continue}var gt=Ie.text.lastIndexOf("/",ut),yt=gt>-1&&!/\S/.test(Ie.text.slice(gt+1,ut));return Ie.ch=ut+1,yt?"selfClose":"regular"}}function Re(Ie,ut){for(var gt=[];;){var yt=xt(Ie),ft,nt=Ie.line,vt=Ie.ch-(yt?yt[0].length:0);if(!yt||!(ft=Qe(Ie)))return;if(ft!="selfClose")if(yt[1]){for(var We=gt.length-1;We>=0;--We)if(gt[We]==yt[2]){gt.length=We;break}if(We<0&&(!ut||ut==yt[2]))return{tag:yt[2],from:ot(nt,vt),to:ot(Ie.line,Ie.ch)}}else gt.push(yt[2])}}function He(Ie,ut){for(var gt=[];;){var yt=rt(Ie);if(!yt)return;if(yt=="selfClose"){be(Ie);continue}var ft=Ie.line,nt=Ie.ch,vt=be(Ie);if(!vt)return;if(vt[1])gt.push(vt[2]);else{for(var We=gt.length-1;We>=0;--We)if(gt[We]==vt[2]){gt.length=We;break}if(We<0&&(!ut||ut==vt[2]))return{tag:vt[2],from:ot(Ie.line,Ie.ch),to:ot(ft,nt)}}}}te.registerHelper("fold","xml",function(Ie,ut){for(var gt=new ze(Ie,ut.line,0);;){var yt=xt(gt);if(!yt||gt.line!=ut.line)return;var ft=Qe(gt);if(!ft)return;if(!yt[1]&&ft!="selfClose"){var nt=ot(gt.line,gt.ch),vt=Re(gt,yt[2]);return vt&&me(vt.from,nt)>0?{from:nt,to:vt.from}:null}}}),te.findMatchingTag=function(Ie,ut,gt){var yt=new ze(Ie,ut.line,ut.ch,gt);if(!(yt.text.indexOf(">")==-1&&yt.text.indexOf("<")==-1)){var ft=Qe(yt),nt=ft&&ot(yt.line,yt.ch),vt=ft&&be(yt);if(!(!ft||!vt||me(yt,ut)>0)){var We={from:ot(yt.line,yt.ch),to:nt,tag:vt[2]};return ft=="selfClose"?{open:We,close:null,at:"open"}:vt[1]?{open:He(yt,vt[2]),close:We,at:"close"}:(yt=new ze(Ie,nt.line,nt.ch,gt),{open:We,close:Re(yt,vt[2]),at:"open"})}}},te.findEnclosingTag=function(Ie,ut,gt,yt){for(var ft=new ze(Ie,ut.line,ut.ch,gt);;){var nt=He(ft,yt);if(!nt)break;var vt=new ze(Ie,ut.line,ut.ch,gt),We=Re(vt,nt.tag);if(We)return{open:nt,close:We}}},te.scanForClosingTag=function(Ie,ut,gt,yt){var ft=new ze(Ie,ut.line,ut.ch,yt?{from:0,to:yt}:null);return Re(ft,gt)}})},89780:function(en){(function(Ht,ie){en.exports=ie()})(this,function(){"use strict";var Ht=navigator.userAgent,ie=navigator.platform,te=/gecko\/\d/i.test(Ht),ot=/MSIE \d/.test(Ht),me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ht),Ge=/Edge\/(\d+)/.exec(Ht),xe=ot||me||Ge,Ce=xe&&(ot?document.documentMode||6:+(Ge||me)[1]),ze=!Ge&&/WebKit\//.test(Ht),Ke=ze&&/Qt\/\d+\.\d+/.test(Ht),ke=!Ge&&/Chrome\//.test(Ht),fe=/Opera\//.test(Ht),Qe=/Apple Computer/.test(navigator.vendor),be=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ht),xt=/PhantomJS/.test(Ht),rt=!Ge&&/AppleWebKit/.test(Ht)&&/Mobile\/\w+/.test(Ht),Re=/Android/.test(Ht),He=rt||Re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ht),Ie=rt||/Mac/.test(ie),ut=/\bCrOS\b/.test(Ht),gt=/win/i.test(ie),yt=fe&&Ht.match(/Version\/(\d*\.\d*)/);yt&&(yt=Number(yt[1])),yt&&yt>=15&&(fe=!1,ze=!0);var ft=Ie&&(Ke||fe&&(yt==null||yt<12.11)),nt=te||xe&&Ce>=9;function vt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var We=function(a,y){var x=a.className,b=vt(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 At(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function st(a,y){return At(a).appendChild(y)}function qe(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ne=0;ne<y.length;++ne)E.appendChild(y[ne]);return E}function Mt(a,y,x,b){var E=qe(a,y,x,b);return E.setAttribute("role","presentation"),E}var Ve;document.createRange?Ve=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Ve=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 pt(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 ht(){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 ve(a,y){var x=a.className;vt(y).test(x)||(a.className+=(x?" ":"")+y)}function Bt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!vt(x[b]).test(y)&&(y+=" "+x[b]);return y}var Ae=function(a){a.select()};rt?Ae=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:xe&&(Ae=function(a){try{a.select()}catch(y){}});function Nt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function rn(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 we(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ne=b||0,ae=E||0;;){var ue=a.indexOf(" ",ne);if(ue<0||ue>=y)return ae+(y-ne);ae+=ue-ne,ae+=x-ae%x,ne=ue+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=Nt(this.onTimeout,this)};de.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},de.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function Je(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var wt=50,Et={toString:function(){return"CodeMirror.Pass"}},Be={scroll:!1},dt={origin:"*mouse"},bt={origin:"+move"};function tn(a,y,x){for(var b=0,E=0;;){var ne=a.indexOf(" ",b);ne==-1&&(ne=a.length);var ae=ne-b;if(ne==a.length||E+ae>=y)return b+Math.min(ae,y-E);if(E+=ne-b,E+=x-E%x,b=ne+1,E>=y)return b}}var Ot=[""];function jt(a){for(;Ot.length<=a;)Ot.push(it(Ot)+" ");return Ot[a]}function it(a){return a[a.length-1]}function Gt(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function mt(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function se(){}function ee(a,y){var x;return Object.create?x=Object.create(a):(se.prototype=a,x=new se),y&&rn(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function le(a,y){return y?y.source.indexOf("\\w")>-1&&oe(a)?!0:y.test(a):oe(a)}function re(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var Ee=/[\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 at(a){return a.charCodeAt(0)>=768&&Ee.test(a)}function $t(a,y,x){for(;(x<0?y>0:y<a.length)&&at(a.charAt(y));)y+=x;return y}function Ye(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ne=b<0?Math.ceil(E):Math.floor(E);if(ne==y)return a(ne)?y:x;a(ne)?x=ne:y=ne+b}}function ct(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ne=0;ne<a.length;++ne){var ae=a[ne];(ae.from<x&&ae.to>y||y==x&&ae.to==y)&&(b(Math.max(ae.from,y),Math.min(ae.to,x),ae.level==1?"rtl":"ltr",ne),E=!0)}E||b(y,x,"ltr")}var St=null;function Ft(a,y,x){var b;St=null;for(var E=0;E<a.length;++E){var ne=a[E];if(ne.from<y&&ne.to>y)return E;ne.to==y&&(ne.from!=ne.to&&x=="before"?b=E:St=E),ne.from==y&&(ne.from!=ne.to&&x!="before"?b=E:St=E)}return b!=null?b:St}var Pt=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]/,ne=/[LRr]/,ae=/[Lb1n]/,ue=/[1n]/;function ce(he,Ne,Xe){this.level=he,this.from=Ne,this.to=Xe}return function(he,Ne){var Xe=Ne=="ltr"?"L":"R";if(he.length==0||Ne=="ltr"&&!b.test(he))return!1;for(var Dt=he.length,Ct=[],sn=0;sn<Dt;++sn)Ct.push(x(he.charCodeAt(sn)));for(var xn=0,Rn=Xe;xn<Dt;++xn){var Vn=Ct[xn];Vn=="m"?Ct[xn]=Rn:Rn=Vn}for(var tr=0,_n=Xe;tr<Dt;++tr){var or=Ct[tr];or=="1"&&_n=="r"?Ct[tr]="n":ne.test(or)&&(_n=or,or=="r"&&(Ct[tr]="R"))}for(var gr=1,hr=Ct[0];gr<Dt-1;++gr){var Tr=Ct[gr];Tr=="+"&&hr=="1"&&Ct[gr+1]=="1"?Ct[gr]="1":Tr==","&&hr==Ct[gr+1]&&(hr=="1"||hr=="n")&&(Ct[gr]=hr),hr=Tr}for(var Yr=0;Yr<Dt;++Yr){var mi=Ct[Yr];if(mi==",")Ct[Yr]="N";else if(mi=="%"){var Qr=void 0;for(Qr=Yr+1;Qr<Dt&&Ct[Qr]=="%";++Qr);for(var $i=Yr&&Ct[Yr-1]=="!"||Qr<Dt&&Ct[Qr]=="1"?"1":"N",Ti=Yr;Ti<Qr;++Ti)Ct[Ti]=$i;Yr=Qr-1}}for(var ai=0,Ai=Xe;ai<Dt;++ai){var bi=Ct[ai];Ai=="L"&&bi=="1"?Ct[ai]="L":ne.test(bi)&&(Ai=bi)}for(var di=0;di<Dt;++di)if(E.test(Ct[di])){var si=void 0;for(si=di+1;si<Dt&&E.test(Ct[si]);++si);for(var ei=(di?Ct[di-1]:Xe)=="L",Bi=(si<Dt?Ct[si]:Xe)=="L",Uo=ei==Bi?ei?"L":"R":Xe,bo=di;bo<si;++bo)Ct[bo]=Uo;di=si-1}for(var Si=[],ro,vi=0;vi<Dt;)if(ae.test(Ct[vi])){var bs=vi;for(++vi;vi<Dt&&ae.test(Ct[vi]);++vi);Si.push(new ce(0,bs,vi))}else{var so=vi,Mo=Si.length,Do=Ne=="rtl"?1:0;for(++vi;vi<Dt&&Ct[vi]!="L";++vi);for(var Pi=so;Pi<vi;)if(ue.test(Ct[Pi])){so<Pi&&(Si.splice(Mo,0,new ce(1,so,Pi)),Mo+=Do);var Vo=Pi;for(++Pi;Pi<vi&&ue.test(Ct[Pi]);++Pi);Si.splice(Mo,0,new ce(2,Vo,Pi)),Mo+=Do,so=Pi}else++Pi;so<vi&&Si.splice(Mo,0,new ce(1,so,vi))}return Ne=="ltr"&&(Si[0].level==1&&(ro=he.match(/^\s+/))&&(Si[0].from=ro[0].length,Si.unshift(new ce(0,0,ro[0].length))),it(Si).level==1&&(ro=he.match(/\s+$/))&&(it(Si).to-=ro[0].length,Si.push(new ce(0,Dt-ro[0].length,Dt)))),Ne=="rtl"?Si.reverse():Si}}();function Qt(a,y){var x=a.order;return x==null&&(x=a.order=Pt(a.text,y)),x}var Jt=[],Ut=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]||Jt).concat(x)}};function Sn(a,y){return a._handlers&&a._handlers[y]||Jt}function on(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 ne=Je(E,x);ne>-1&&(b[y]=E.slice(0,ne).concat(E.slice(ne+1)))}}}function gn(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 kt(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),gn(a,x||y.type,a,y),Rt(y)||y.codemirrorIgnore}function Mn(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)Je(x,y[b])==-1&&x.push(y[b])}function nn(a,y){return Sn(a,y).length>0}function Me(a){a.prototype.on=function(y,x){Ut(this,y,x)},a.prototype.off=function(y,x){on(this,y,x)}}function et(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Lt(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Rt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Se(a){et(a),Lt(a)}function $e(a){return a.target||a.srcElement}function lt(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ie&&a.ctrlKey&&y==1&&(y=3),y}var Tt=function(){if(xe&&Ce<9)return!1;var a=qe("div");return"draggable"in a||"dragDrop"in a}(),Wt;function ln(a){if(Wt==null){var y=qe("span","\u200B");st(a,qe("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Wt=y.offsetWidth<=1&&y.offsetHeight>2&&!(xe&&Ce<8))}var x=Wt?qe("span","\u200B"):qe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Dn;function In(a){if(Dn!=null)return Dn;var y=st(a,document.createTextNode("A\u062EA")),x=Ve(y,0,1).getBoundingClientRect(),b=Ve(y,1,2).getBoundingClientRect();return At(a),!x||x.left==x.right?!1:Dn=b.right-x.right<3}var dn=`
|
|
|
|
|
|
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 ne=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ae=ne.indexOf("\r");ae!=-1?(x.push(ne.slice(0,ae)),y+=ae+1):(x.push(ne),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Cn=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},fn=function(){var a=qe("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),$n=null;function yn(a){if($n!=null)return $n;var y=st(a,qe("span","x")),x=y.getBoundingClientRect(),b=Ve(y,0,1).getBoundingClientRect();return $n=Math.abs(x.left-b.left)>1}var hn={},qt={};function Pn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),hn[a]=y}function pn(a,y){qt[a]=y}function Ln(a){if(typeof a=="string"&&qt.hasOwnProperty(a))a=qt[a];else if(a&&typeof a.name=="string"&&qt.hasOwnProperty(a.name)){var y=qt[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 Gn(a,y){y=Ln(y);var x=hn[y.name];if(!x)return Gn(a,"text/plain");var b=x(a,y);if(jn.hasOwnProperty(y.name)){var E=jn[y.name];for(var ne in E)E.hasOwnProperty(ne)&&(b.hasOwnProperty(ne)&&(b["_"+ne]=b[ne]),b[ne]=E[ne])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var ae in y.modeProps)b[ae]=y.modeProps[ae];return b}var jn={};function Bn(a,y){var x=jn.hasOwnProperty(a)?jn[a]:jn[a]={};rn(y,x)}function Xn(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Nn(a,y){for(var x;a.innerMode&&(x=a.innerMode(y),!(!x||x.mode==a));)y=x.state,a=x.mode;return x||{mode:a,state:y}}function ar(a,y,x){return a.startState?a.startState(y,x):!0}var qn=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};qn.prototype.eol=function(){return this.pos>=this.string.length},qn.prototype.sol=function(){return this.pos==this.lineStart},qn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qn.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},qn.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},qn.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},qn.prototype.skipToEnd=function(){this.pos=this.string.length},qn.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},qn.prototype.backUp=function(a){this.pos-=a},qn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=we(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},qn.prototype.indentation=function(){return we(this.string,null,this.tabSize)-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},qn.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(ae){return x?ae.toLowerCase():ae},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var ne=this.string.slice(this.pos).match(a);return ne&&ne.index>0?null:(ne&&y!==!1&&(this.pos+=ne[0].length),ne)}},qn.prototype.current=function(){return this.string.slice(this.start,this.pos)},qn.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},qn.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},qn.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function It(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],ne=E.chunkSize();if(y<ne){x=E;break}y-=ne}return x.lines[y]}function Xt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ne){var ae=ne.text;E==x.line&&(ae=ae.slice(0,x.ch)),E==y.line&&(ae=ae.slice(y.ch)),b.push(ae),++E}),b}function zn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function nr(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function De(a){if(a.parent==null)return null;for(var y=a.parent,x=Je(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 _e(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],ne=E.height;if(y<ne){a=E;continue e}y-=ne,x+=E.chunkSize()}return x}while(!a.lines);for(var ae=0;ae<a.lines.length;++ae){var ue=a.lines[ae],ce=ue.height;if(y<ce)break;y-=ce}return x+ae}function ge(a,y){return y>=a.first&&y<a.first+a.size}function Pe(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function ye(a,y,x){if(x===void 0&&(x=null),!(this instanceof ye))return new ye(a,y,x);this.line=a,this.ch=y,this.sticky=x}function Oe(a,y){return a.line-y.line||a.ch-y.ch}function pe(a,y){return a.sticky==y.sticky&&Oe(a,y)==0}function Fe(a){return ye(a.line,a.ch)}function je(a,y){return Oe(a,y)<0?y:a}function tt(a,y){return Oe(a,y)<0?a:y}function Ze(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Le(a,y){if(y.line<a.first)return ye(a.first,0);var x=a.first+a.size-1;return y.line>x?ye(x,It(a,x).text.length):Te(y,It(a,y.line).text.length)}function Te(a,y){var x=a.ch;return x==null||x>y?ye(a.line,y):x<0?ye(a.line,0):a}function Ue(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Le(a,y[b]);return x}var Vt=function(a,y){this.state=a,this.lookAhead=y},zt=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};zt.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},zt.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}},zt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},zt.fromSaved=function(a,y,x){return y instanceof Vt?new zt(a,Xn(a.mode,y.state),x,y.lookAhead):new zt(a,Xn(a.mode,y),x)},zt.prototype.save=function(a){var y=a!==!1?Xn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Vt(y,this.maxLookAhead):y};function Zt(a,y,x,b){var E=[a.state.modeGen],ne={};Un(a,y.text,a.doc.mode,x,function(he,Ne){return E.push(he,Ne)},ne,b);for(var ae=x.state,ue=function(he){x.baseTokens=E;var Ne=a.state.overlays[he],Xe=1,Dt=0;x.state=!0,Un(a,y.text,Ne.mode,x,function(Ct,sn){for(var xn=Xe;Dt<Ct;){var Rn=E[Xe];Rn>Ct&&E.splice(Xe,1,Ct,E[Xe+1],Rn),Xe+=2,Dt=Math.min(Ct,Rn)}if(sn)if(Ne.opaque)E.splice(xn,Xe-xn,Ct,"overlay "+sn),Xe=xn+2;else for(;xn<Xe;xn+=2){var Vn=E[xn+1];E[xn+1]=(Vn?Vn+" ":"")+"overlay "+sn}},ne),x.state=ae,x.baseTokens=null,x.baseTokenPos=1},ce=0;ce<a.state.overlays.length;++ce)ue(ce);return{styles:E,classes:ne.bgClass||ne.textClass?ne:null}}function kn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Tn(a,De(y)),E=y.text.length>a.options.maxHighlightLength&&Xn(a.doc.mode,b.state),ne=Zt(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ne.styles,ne.classes?y.styleClasses=ne.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 Tn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new zt(b,!0,y);var ne=Kn(a,y,x),ae=ne>b.first&&It(b,ne-1).stateAfter,ue=ae?zt.fromSaved(b,ae,ne):new zt(b,ar(b.mode),ne);return b.iter(ne,y,function(ce){Hn(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 Hn(a,y,x,b){var E=a.doc.mode,ne=new qn(y,a.options.tabSize,x);for(ne.start=ne.pos=b||0,y==""&&En(E,x.state);!ne.eol();)mn(E,ne,x.state),ne.start=ne.pos}function En(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Nn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function mn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Nn(a,x).mode);var ne=a.token(y,x);if(y.pos>y.start)return ne}throw new Error("Mode "+a.name+" failed to advance stream.")}var wn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Fn(a,y,x,b){var E=a.doc,ne=E.mode,ae;y=Le(E,y);var ue=It(E,y.line),ce=Tn(a,y.line,x),he=new qn(ue.text,a.options.tabSize,ce),Ne;for(b&&(Ne=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,ae=mn(ne,he,ce.state),b&&Ne.push(new wn(he,ae,Xn(E.mode,ce.state)));return b?Ne:new wn(he,ae,ce.state)}function Yn(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 Un(a,y,x,b,E,ne,ae){var ue=x.flattenSpans;ue==null&&(ue=a.options.flattenSpans);var ce=0,he=null,Ne=new qn(y,a.options.tabSize,b),Xe,Dt=a.options.addModeClass&&[null];for(y==""&&Yn(En(x,b.state),ne);!Ne.eol();){if(Ne.pos>a.options.maxHighlightLength?(ue=!1,ae&&Hn(a,y,b,Ne.pos),Ne.pos=y.length,Xe=null):Xe=Yn(mn(x,Ne,b.state,Dt),ne),Dt){var Ct=Dt[0].name;Ct&&(Xe="m-"+(Xe?Ct+" "+Xe:Ct))}if(!ue||he!=Xe){for(;ce<Ne.start;)ce=Math.min(Ne.start,ce+5e3),E(ce,he);he=Xe}Ne.start=Ne.pos}for(;ce<Ne.pos;){var sn=Math.min(Ne.pos,ce+5e3);E(sn,he),ce=sn}}function Kn(a,y,x){for(var b,E,ne=a.doc,ae=x?-1:y-(a.doc.mode.innerMode?1e3:100),ue=y;ue>ae;--ue){if(ue<=ne.first)return ne.first;var ce=It(ne,ue-1),he=ce.stateAfter;if(he&&(!x||ue+(he instanceof Vt?he.lookAhead:0)<=ne.modeFrontier))return ue;var Ne=we(ce.text,null,a.options.tabSize);(E==null||b>Ne)&&(E=ue-1,b=Ne)}return E}function vn(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=It(a,b).stateAfter;if(E&&(!(E instanceof Vt)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var er=!1,Wn=!1;function dr(){er=!0}function pr(){Wn=!0}function lr(a,y,x){this.marker=a,this.from=y,this.to=x}function ur(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function yr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function sr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function fr(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ne=a[E],ae=ne.marker,ue=ne.from==null||(ae.inclusiveLeft?ne.from<=y:ne.from<y);if(ue||ne.from==y&&ae.type=="bookmark"&&(!x||!ne.marker.insertLeft)){var ce=ne.to==null||(ae.inclusiveRight?ne.to>=y:ne.to>y);(b||(b=[])).push(new lr(ae,ne.from,ce?null:ne.to))}}return b}function Qn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ne=a[E],ae=ne.marker,ue=ne.to==null||(ae.inclusiveRight?ne.to>=y:ne.to>y);if(ue||ne.from==y&&ae.type=="bookmark"&&(!x||ne.marker.insertLeft)){var ce=ne.from==null||(ae.inclusiveLeft?ne.from<=y:ne.from<y);(b||(b=[])).push(new lr(ae,ce?null:ne.from-y,ne.to==null?null:ne.to-y))}}return b}function mr(a,y){if(y.full)return null;var x=ge(a,y.from.line)&&It(a,y.from.line).markedSpans,b=ge(a,y.to.line)&&It(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ne=y.to.ch,ae=Oe(y.from,y.to)==0,ue=fr(x,E,ae),ce=Qn(b,ne,ae),he=y.text.length==1,Ne=it(y.text).length+(he?E:0);if(ue)for(var Xe=0;Xe<ue.length;++Xe){var Dt=ue[Xe];if(Dt.to==null){var Ct=ur(ce,Dt.marker);Ct?he&&(Dt.to=Ct.to==null?null:Ct.to+Ne):Dt.to=E}}if(ce)for(var sn=0;sn<ce.length;++sn){var xn=ce[sn];if(xn.to!=null&&(xn.to+=Ne),xn.from==null){var Rn=ur(ue,xn.marker);Rn||(xn.from=Ne,he&&(ue||(ue=[])).push(xn))}else xn.from+=Ne,he&&(ue||(ue=[])).push(xn)}ue&&(ue=br(ue)),ce&&ce!=ue&&(ce=br(ce));var Vn=[ue];if(!he){var tr=y.text.length-2,_n;if(tr>0&&ue)for(var or=0;or<ue.length;++or)ue[or].to==null&&(_n||(_n=[])).push(new lr(ue[or].marker,null,null));for(var gr=0;gr<tr;++gr)Vn.push(_n);Vn.push(ce)}return Vn}function br(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 Hr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Ct){if(Ct.markedSpans)for(var sn=0;sn<Ct.markedSpans.length;++sn){var xn=Ct.markedSpans[sn].marker;xn.readOnly&&(!b||Je(b,xn)==-1)&&(b||(b=[])).push(xn)}}),!b)return null;for(var E=[{from:y,to:x}],ne=0;ne<b.length;++ne)for(var ae=b[ne],ue=ae.find(0),ce=0;ce<E.length;++ce){var he=E[ce];if(!(Oe(he.to,ue.from)<0||Oe(he.from,ue.to)>0)){var Ne=[ce,1],Xe=Oe(he.from,ue.from),Dt=Oe(he.to,ue.to);(Xe<0||!ae.inclusiveLeft&&!Xe)&&Ne.push({from:he.from,to:ue.from}),(Dt>0||!ae.inclusiveRight&&!Dt)&&Ne.push({from:ue.to,to:he.to}),E.splice.apply(E,Ne),ce+=Ne.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 Ar(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 Mr(a){return a.inclusiveRight?1:0}function ir(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ne=Oe(b.from,E.from)||kr(a)-kr(y);if(ne)return-ne;var ae=Oe(b.to,E.to)||Mr(a)-Mr(y);return ae||y.id-a.id}function rr(a,y){var x=Wn&&a.markedSpans,b;if(x)for(var E=void 0,ne=0;ne<x.length;++ne)E=x[ne],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ir(b,E.marker)<0)&&(b=E.marker);return b}function Jn(a){return rr(a,!0)}function Yt(a){return rr(a,!1)}function cn(a,y){var x=Wn&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ne=x[E];ne.marker.collapsed&&(ne.from==null||ne.from<y)&&(ne.to==null||ne.to>y)&&(!b||ir(b,ne.marker)<0)&&(b=ne.marker)}return b}function un(a,y,x,b,E){var ne=It(a,y),ae=Wn&&ne.markedSpans;if(ae)for(var ue=0;ue<ae.length;++ue){var ce=ae[ue];if(ce.marker.collapsed){var he=ce.marker.find(0),Ne=Oe(he.from,x)||kr(ce.marker)-kr(E),Xe=Oe(he.to,b)||Mr(ce.marker)-Mr(E);if(!(Ne>=0&&Xe<=0||Ne<=0&&Xe>=0)&&(Ne<=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Oe(he.to,x)>=0:Oe(he.to,x)>0)||Ne>=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Oe(he.from,b)<=0:Oe(he.from,b)<0)))return!0}}}function _t(a){for(var y;y=Jn(a);)a=y.find(-1,!0).line;return a}function An(a){for(var y;y=Yt(a);)a=y.find(1,!0).line;return a}function Zn(a){for(var y,x;y=Yt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function an(a,y){var x=It(a,y),b=_t(x);return x==b?y:De(b)}function Kt(a,y){if(y>a.lastLine())return y;var x=It(a,y),b;if(!bn(a,x))return y;for(;b=Yt(x);)x=b.find(1,!0).line;return De(x)+1}function bn(a,y){var x=Wn&&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&&On(a,y,b))return!0}}}function On(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return On(a,b.line,ur(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,ne=0;ne<y.markedSpans.length;++ne)if(E=y.markedSpans[ne],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&On(a,y,E))return!0}function cr(a){a=_t(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 ne=x.parent;ne;x=ne,ne=x.parent)for(var ae=0;ae<ne.children.length;++ae){var ue=ne.children[ae];if(ue==x)break;y+=ue.height}return y}function Or(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Jn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Yt(b);){var ne=x.find(0,!0);y-=b.text.length-ne.from.ch,b=ne.to.line,y+=b.text.length-ne.to.ch}return y}function Ir(a){var y=a.display,x=a.doc;y.maxLine=It(x,x.first),y.maxLineLength=Or(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Or(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Rr=function(a,y,x){this.text=a,Ar(this,y),this.height=x?x(this):1};Rr.prototype.lineNo=function(){return De(this)},Me(Rr);function Br(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),Ar(a,x);var E=b?b(a):1;E!=a.height&&nr(a,E)}function Fr(a){a.parent=null,Er(a)}var Ur={},Wr={};function Kr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Wr:Ur;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ti(a,y){var x=Mt("span",null,null,ze?"padding-right: .1px":null),b={pre:Mt("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 ne=E?y.rest[E-1]:y.line,ae=void 0;b.pos=0,b.addToken=Ni,In(a.display.measure)&&(ae=Qt(ne,a.doc.direction))&&(b.addToken=li(b.addToken,ae)),b.map=[];var ue=y!=a.display.externalMeasured&&De(ne);$r(ne,b,kn(a,ne,ue)),ne.styleClasses&&(ne.styleClasses.bgClass&&(b.bgClass=Bt(ne.styleClasses.bgClass,b.bgClass||"")),ne.styleClasses.textClass&&(b.textClass=Bt(ne.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(ln(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(ze){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 gn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Bt(b.pre.className,b.textClass||"")),b}function Ei(a){var y=qe("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Ni(a,y,x,b,E,ne,ae){if(y){var ue=a.splitSpaces?xi(y,a.trailingSpace):y,ce=a.cm.state.specialChars,he=!1,Ne;if(!ce.test(y))a.col+=y.length,Ne=document.createTextNode(ue),a.map.push(a.pos,a.pos+y.length,Ne),xe&&Ce<9&&(he=!0),a.pos+=y.length;else{Ne=document.createDocumentFragment();for(var Xe=0;;){ce.lastIndex=Xe;var Dt=ce.exec(y),Ct=Dt?Dt.index-Xe:y.length-Xe;if(Ct){var sn=document.createTextNode(ue.slice(Xe,Xe+Ct));xe&&Ce<9?Ne.appendChild(qe("span",[sn])):Ne.appendChild(sn),a.map.push(a.pos,a.pos+Ct,sn),a.col+=Ct,a.pos+=Ct}if(!Dt)break;Xe+=Ct+1;var xn=void 0;if(Dt[0]==" "){var Rn=a.cm.options.tabSize,Vn=Rn-a.col%Rn;xn=Ne.appendChild(qe("span",jt(Vn),"cm-tab")),xn.setAttribute("role","presentation"),xn.setAttribute("cm-text"," "),a.col+=Vn}else Dt[0]=="\r"||Dt[0]==`
|
|
|
`?(xn=Ne.appendChild(qe("span",Dt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),xn.setAttribute("cm-text",Dt[0]),a.col+=1):(xn=a.cm.options.specialCharPlaceholder(Dt[0]),xn.setAttribute("cm-text",Dt[0]),xe&&Ce<9?Ne.appendChild(qe("span",[xn])):Ne.appendChild(xn),a.col+=1);a.map.push(a.pos,a.pos+1,xn),a.pos++}}if(a.trailingSpace=ue.charCodeAt(y.length-1)==32,x||b||E||he||ne||ae){var tr=x||"";b&&(tr+=b),E&&(tr+=E);var _n=qe("span",[Ne],tr,ne);if(ae)for(var or in ae)ae.hasOwnProperty(or)&&or!="style"&&or!="class"&&_n.setAttribute(or,ae[or]);return a.content.appendChild(_n)}a.content.appendChild(Ne)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ne=a.charAt(E);ne==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ne="\xA0"),b+=ne,x=ne==" "}return b}function li(a,y){return function(x,b,E,ne,ae,ue,ce){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,Ne=he+b.length;;){for(var Xe=void 0,Dt=0;Dt<y.length&&(Xe=y[Dt],!(Xe.to>he&&Xe.from<=he));Dt++);if(Xe.to>=Ne)return a(x,b,E,ne,ae,ue,ce);a(x,b.slice(0,Xe.to-he),E,ne,null,ue,ce),ne=null,b=b.slice(Xe.to-he),he=Xe.to}}}function Ri(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 $r(a,y,x){var b=a.markedSpans,E=a.text,ne=0;if(!b){for(var ae=1;ae<x.length;ae+=2)y.addToken(y,E.slice(ne,ne=x[ae]),Kr(x[ae+1],y.cm.options));return}for(var ue=E.length,ce=0,he=1,Ne="",Xe,Dt,Ct=0,sn,xn,Rn,Vn,tr;;){if(Ct==ce){sn=xn=Rn=Dt="",tr=null,Vn=null,Ct=1/0;for(var _n=[],or=void 0,gr=0;gr<b.length;++gr){var hr=b[gr],Tr=hr.marker;if(Tr.type=="bookmark"&&hr.from==ce&&Tr.widgetNode)_n.push(Tr);else if(hr.from<=ce&&(hr.to==null||hr.to>ce||Tr.collapsed&&hr.to==ce&&hr.from==ce)){if(hr.to!=null&&hr.to!=ce&&Ct>hr.to&&(Ct=hr.to,xn=""),Tr.className&&(sn+=" "+Tr.className),Tr.css&&(Dt=(Dt?Dt+";":"")+Tr.css),Tr.startStyle&&hr.from==ce&&(Rn+=" "+Tr.startStyle),Tr.endStyle&&hr.to==Ct&&(or||(or=[])).push(Tr.endStyle,hr.to),Tr.title&&((tr||(tr={})).title=Tr.title),Tr.attributes)for(var Yr in Tr.attributes)(tr||(tr={}))[Yr]=Tr.attributes[Yr];Tr.collapsed&&(!Vn||ir(Vn.marker,Tr)<0)&&(Vn=hr)}else hr.from>ce&&Ct>hr.from&&(Ct=hr.from)}if(or)for(var mi=0;mi<or.length;mi+=2)or[mi+1]==Ct&&(xn+=" "+or[mi]);if(!Vn||Vn.from==ce)for(var Qr=0;Qr<_n.length;++Qr)Ri(y,0,_n[Qr]);if(Vn&&(Vn.from||0)==ce){if(Ri(y,(Vn.to==null?ue+1:Vn.to)-ce,Vn.marker,Vn.from==null),Vn.to==null)return;Vn.to==ce&&(Vn=!1)}}if(ce>=ue)break;for(var $i=Math.min(ue,Ct);;){if(Ne){var Ti=ce+Ne.length;if(!Vn){var ai=Ti>$i?Ne.slice(0,$i-ce):Ne;y.addToken(y,ai,Xe?Xe+sn:sn,Rn,ce+ai.length==Ct?xn:"",Dt,tr)}if(Ti>=$i){Ne=Ne.slice($i-ce),ce=$i;break}ce=Ti,Rn=""}Ne=E.slice(ne,ne=x[he++]),Xe=Kr(x[he++],y.cm.options)}}}function _i(a,y,x){this.line=y,this.rest=Zn(y),this.size=this.rest?De(it(this.rest))-x+1:1,this.node=this.text=null,this.hidden=bn(a,y)}function qr(a,y,x){for(var b=[],E,ne=y;ne<x;ne=E){var ae=new _i(a.doc,It(a.doc,ne),ne);E=ne+ae.size,b.push(ae)}return b}var xr=null;function zr(a){xr?xr.ops.push(a):a.ownsGroup=xr={ops:[a],delayedCallbacks:[]}}function Gr(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 wr(a,y){var x=a.ownsGroup;if(x)try{Gr(x)}finally{xr=null,y(x)}}var Nr=null;function Lr(a,y){var x=Sn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;xr?E=xr.delayedCallbacks:Nr?E=Nr:(E=Nr=[],setTimeout(ui,0));for(var ne=function(ue){E.push(function(){return x[ue].apply(null,b)})},ae=0;ae<x.length;++ae)ne(ae)}}function ui(){var a=Nr;Nr=null;for(var y=0;y<a.length;++y)a[y]()}function Mi(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ne=y.changes[E];ne=="text"?lo(a,y):ne=="gutter"?Pr(a,y,x,b):ne=="class"?vr(a,y):ne=="widget"&&Cr(a,y,b)}y.changes=null}function fi(a){return a.node==a.text&&(a.node=qe("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),xe&&Ce<8&&(a.node.style.zIndex=2)),a.node}function ni(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=fi(y);y.background=b.insertBefore(qe("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ti(a,y)}function lo(a,y){var x=y.text.className,b=xo(a,y);y.text==y.node&&(y.node=b.pre),y.text.parentNode.replaceChild(b.pre,y.text),y.text=b.pre,b.bgClass!=y.bgClass||b.textClass!=y.textClass?(y.bgClass=b.bgClass,y.textClass=b.textClass,vr(a,y)):x&&(y.text.className=x)}function vr(a,y){ni(a,y),y.line.wrapClass?fi(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 Pr(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=fi(y);y.gutterBackground=qe("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var ne=y.line.gutterMarkers;if(a.options.lineNumbers||ne){var ae=fi(y),ue=y.gutter=qe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ue),ae.insertBefore(ue,y.text),y.line.gutterClass&&(ue.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ne||!ne["CodeMirror-linenumbers"])&&(y.lineNumber=ue.appendChild(qe("div",Pe(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ne)for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var he=a.display.gutterSpecs[ce].className,Ne=ne.hasOwnProperty(he)&&ne[he];Ne&&ue.appendChild(qe("div",[Ne],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function Cr(a,y,x){y.alignable&&(y.alignable=null);for(var b=vt("CodeMirror-linewidget"),E=y.node.firstChild,ne=void 0;E;E=ne)ne=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);Zr(a,y,x)}function Sr(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),vr(a,y),Pr(a,y,x,b),Zr(a,y,b),y.node}function Zr(a,y,x){if(Xr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Xr(a,y.rest[b],y,x,!1)}function Xr(a,y,x,b,E){if(y.widgets)for(var ne=fi(x),ae=0,ue=y.widgets;ae<ue.length;++ae){var ce=ue[ae],he=qe("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),Ki(ce,he,x,b),a.display.input.setUneditable(he),E&&ce.above?ne.insertBefore(he,x.gutter||x.text):ne.appendChild(he),Lr(ce,"redraw")}}function Ki(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 ki(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!pt(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;"),st(y.display.measure,qe("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function gi(a,y){for(var x=$e(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 ri(a){return a.lineSpace.offsetTop}function Gi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function eo(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=st(a.measure,qe("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Fi(a){return wt-a.display.nativeBarWidth}function to(a){return a.display.scroller.clientWidth-Fi(a)-a.display.barWidth}function io(a){return a.display.scroller.clientHeight-Fi(a)-a.display.barHeight}function Xi(a,y,x){var b=a.options.lineWrapping,E=b&&to(a);if(!y.measure.heights||b&&y.measure.width!=E){var ne=y.measure.heights=[];if(b){y.measure.width=E;for(var ae=y.text.firstChild.getClientRects(),ue=0;ue<ae.length-1;ue++){var ce=ae[ue],he=ae[ue+1];Math.abs(ce.bottom-he.bottom)>2&&ne.push((ce.bottom+he.top)/2-x.top)}}ne.push(x.bottom-x.top)}}function Oo(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(De(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=_t(y);var x=De(y),b=a.display.externalMeasured=new _i(a.doc,y,x);b.lineN=x;var E=b.built=ti(a,b);return b.text=E.pre,st(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Ui(a,uo(a,y),x,b)}function no(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=De(y),b=no(a,x);b&&!b.text?b=null:b&&b.changes&&(Mi(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=Ga(a,y));var E=Oo(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Ui(a,y,x,b,E){y.before&&(x=-1);var ne=x+(b||""),ae;return y.cache.hasOwnProperty(ne)?ae=y.cache[ne]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Xi(a,y.view,y.rect),y.hasHeights=!0),ae=Ca(a,y,x,b),ae.bogus||(y.cache[ne]=ae)),{left:ae.left,right:ae.right,top:E?ae.rtop:ae.top,bottom:E?ae.rbottom:ae.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,ne,ae,ue,ce,he=0;he<a.length;he+=3)if(ue=a[he],ce=a[he+1],y<ue?(E=0,ne=1,ae="left"):y<ce?(E=y-ue,ne=E+1):(he==a.length-3||y==ce&&a[he+3]>y)&&(ne=ce-ue,E=ne-1,y>=ce&&(ae="right")),E!=null){if(b=a[he+2],ue==ce&&x==(b.insertLeft?"left":"right")&&(ae=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],ae="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],ae="right";break}return{node:b,start:E,end:ne,collapse:ae,coverStart:ue,coverEnd:ce}}function Ua(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function Ca(a,y,x,b){var E=xa(y.map,x,b),ne=E.node,ae=E.start,ue=E.end,ce=E.collapse,he;if(ne.nodeType==3){for(var Ne=0;Ne<4;Ne++){for(;ae&&at(y.line.text.charAt(E.coverStart+ae));)--ae;for(;E.coverStart+ue<E.coverEnd&&at(y.line.text.charAt(E.coverStart+ue));)++ue;if(xe&&Ce<9&&ae==0&&ue==E.coverEnd-E.coverStart?he=ne.parentNode.getBoundingClientRect():he=Ua(Ve(ne,ae,ue).getClientRects(),b),he.left||he.right||ae==0)break;ue=ae,ae=ae-1,ce="right"}xe&&Ce<11&&(he=Va(a.display.measure,he))}else{ae>0&&(ce=b="right");var Xe;a.options.lineWrapping&&(Xe=ne.getClientRects()).length>1?he=Xe[b=="right"?Xe.length-1:0]:he=ne.getBoundingClientRect()}if(xe&&Ce<9&&!ae&&(!he||!he.left&&!he.right)){var Dt=ne.parentNode.getClientRects()[0];Dt?he={left:Dt.left,right:Dt.left+Ji(a.display),top:Dt.top,bottom:Dt.bottom}:he=ba}for(var Ct=he.top-y.rect.top,sn=he.bottom-y.rect.top,xn=(Ct+sn)/2,Rn=y.view.measure.heights,Vn=0;Vn<Rn.length-1&&!(xn<Rn[Vn]);Vn++);var tr=Vn?Rn[Vn-1]:0,_n=Rn[Vn],or={left:(ce=="right"?he.right:he.left)-y.rect.left,right:(ce=="left"?he.left:he.right)-y.rect.left,top:tr,bottom:_n};return!he.left&&!he.right&&(or.bogus=!0),a.options.singleCursorHeightPerLine||(or.rtop=Ct,or.rbottom=sn),or}function Va(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yn(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 _o(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,At(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)_o(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 Xo(){return ke&&Re?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wa(){return ke&&Re?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Yo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=ki(a.widgets[x]));return y}function Lo(a,y,x,b,E){if(!E){var ne=Yo(y);x.top+=ne,x.bottom+=ne}if(b=="line")return x;b||(b="local");var ae=cr(y);if(b=="local"?ae+=ri(a.display):ae-=a.display.viewOffset,b=="page"||b=="window"){var ue=a.display.lineSpace.getBoundingClientRect();ae+=ue.top+(b=="window"?0:wa());var ce=ue.left+(b=="window"?0:Xo());x.left+=ce,x.right+=ce}return x.top+=ae,x.bottom+=ae,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=wa();else if(x=="local"||!x){var ne=a.display.sizer.getBoundingClientRect();b+=ne.left,E+=ne.top}var ae=a.display.lineSpace.getBoundingClientRect();return{left:b-ae.left,top:E-ae.top}}function To(a,y,x,b,E){return b||(b=It(a.doc,y.line)),Lo(a,b,ya(a,b,y.ch,E),x)}function Di(a,y,x,b,E,ne){b=b||It(a.doc,y.line),E||(E=uo(a,b));function ae(sn,xn){var Rn=Ui(a,E,sn,xn?"right":"left",ne);return xn?Rn.left=Rn.right:Rn.right=Rn.left,Lo(a,b,Rn,x)}var ue=Qt(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 ae(he=="before"?ce-1:ce,he=="before");function Ne(sn,xn,Rn){var Vn=ue[xn],tr=Vn.level==1;return ae(Rn?sn-1:sn,tr!=Rn)}var Xe=Ft(ue,ce,he),Dt=St,Ct=Ne(ce,Xe,he=="before");return Dt!=null&&(Ct.other=Ne(ce,Dt,he!="before")),Ct}function jr(a,y){var x=0;y=Le(a.doc,y),a.options.lineWrapping||(x=Ji(a.display)*y.ch);var b=It(a.doc,y.line),E=cr(b)+ri(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Dr(a,y,x,b,E){var ne=ye(a,y,x);return ne.xRel=E,b&&(ne.outside=b),ne}function yi(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Dr(b.first,0,null,-1,-1);var E=_e(b,x),ne=b.first+b.size-1;if(E>ne)return Dr(b.first+b.size-1,It(b,ne).text.length,null,1,1);y<0&&(y=0);for(var ae=It(b,E);;){var ue=Yi(a,ae,E,y,x),ce=cn(ae,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;ae=It(b,E=he.line)}}function Ci(a,y,x,b){b-=Yo(y);var E=y.text.length,ne=Ye(function(ae){return Ui(a,x,ae-1).bottom<=b},E,0);return E=Ye(function(ae){return Ui(a,x,ae).top>b},ne,E),{begin:ne,end:E}}function ii(a,y,x,b){x||(x=uo(a,y));var E=Lo(a,y,Ui(a,x,b),"line").top;return Ci(a,y,x,E)}function ci(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Yi(a,y,x,b,E){E-=cr(y);var ne=uo(a,y),ae=Yo(y),ue=0,ce=y.text.length,he=!0,Ne=Qt(y,a.doc.direction);if(Ne){var Xe=(a.options.lineWrapping?oo:Vi)(a,y,x,ne,Ne,b,E);he=Xe.level!=1,ue=he?Xe.from:Xe.to-1,ce=he?Xe.to:Xe.from-1}var Dt=null,Ct=null,sn=Ye(function(gr){var hr=Ui(a,ne,gr);return hr.top+=ae,hr.bottom+=ae,ci(hr,b,E,!1)?(hr.top<=E&&hr.left<=b&&(Dt=gr,Ct=hr),!0):!1},ue,ce),xn,Rn,Vn=!1;if(Ct){var tr=b-Ct.left<Ct.right-b,_n=tr==he;sn=Dt+(_n?0:1),Rn=_n?"after":"before",xn=tr?Ct.left:Ct.right}else{!he&&(sn==ce||sn==ue)&&sn++,Rn=sn==0?"after":sn==y.text.length?"before":Ui(a,ne,sn-(he?1:0)).bottom+ae<=E==he?"after":"before";var or=Di(a,ye(x,sn,Rn),"line",y,ne);xn=or.left,Vn=E<or.top?-1:E>=or.bottom?1:0}return sn=$t(y.text,sn,1),Dr(x,sn,Rn,Vn,b-xn)}function Vi(a,y,x,b,E,ne,ae){var ue=Ye(function(Xe){var Dt=E[Xe],Ct=Dt.level!=1;return ci(Di(a,ye(x,Ct?Dt.to:Dt.from,Ct?"before":"after"),"line",y,b),ne,ae,!0)},0,E.length-1),ce=E[ue];if(ue>0){var he=ce.level!=1,Ne=Di(a,ye(x,he?ce.from:ce.to,he?"after":"before"),"line",y,b);ci(Ne,ne,ae,!0)&&Ne.top>ae&&(ce=E[ue-1])}return ce}function oo(a,y,x,b,E,ne,ae){var ue=Ci(a,y,b,ae),ce=ue.begin,he=ue.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var Ne=null,Xe=null,Dt=0;Dt<E.length;Dt++){var Ct=E[Dt];if(!(Ct.from>=he||Ct.to<=ce)){var sn=Ct.level!=1,xn=Ui(a,b,sn?Math.min(he,Ct.to)-1:Math.max(ce,Ct.from)).right,Rn=xn<ne?ne-xn+1e9:xn-ne;(!Ne||Xe>Rn)&&(Ne=Ct,Xe=Rn)}}return Ne||(Ne=E[E.length-1]),Ne.from<ce&&(Ne={from:ce,to:Ne.to,level:Ne.level}),Ne.to>he&&(Ne={from:Ne.from,to:he,level:Ne.level}),Ne}var zi;function Hi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(zi==null){zi=qe("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)zi.appendChild(document.createTextNode("x")),zi.appendChild(qe("br"));zi.appendChild(document.createTextNode("x"))}st(a.measure,zi);var x=zi.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),At(a.measure),x||1}function Ji(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=qe("span","xxxxxxxxxx"),x=qe("pre",[y],"CodeMirror-line-like");st(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,ne=y.gutters.firstChild,ae=0;ne;ne=ne.nextSibling,++ae){var ue=a.display.gutterSpecs[ae].className;x[ue]=ne.offsetLeft+ne.clientLeft+E,b[ue]=ne.clientWidth}return{fixedPos:_a(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function _a(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Cs(a){var y=Hi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ji(a.display)-3);return function(E){if(bn(a.doc,E))return 0;var ne=0;if(E.widgets)for(var ae=0;ae<E.widgets.length;ae++)E.widgets[ae].height&&(ne+=E.widgets[ae].height);return x?ne+(Math.ceil(E.text.length/b)||1)*y:ne+y}}function Ka(a){var y=a.doc,x=Cs(a);y.iter(function(b){var E=x(b);E!=b.height&&nr(b,E)})}function wo(a,y,x,b){var E=a.display;if(!x&&$e(y).getAttribute("cm-not-content")=="true")return null;var ne,ae,ue=E.lineSpace.getBoundingClientRect();try{ne=y.clientX-ue.left,ae=y.clientY-ue.top}catch(Xe){return null}var ce=yi(a,ne,ae),he;if(b&&ce.xRel>0&&(he=It(a.doc,ce.line).text).length==ce.ch){var Ne=we(he,he.length,a.options.tabSize)-he.length;ce=ye(ce.line,Math.max(0,Math.round((ne-eo(a.display).left)/Ji(a.display))-Ne))}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 Oi(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)Wn&&an(a.doc,y)<E.viewTo&&ho(a);else if(x<=E.viewFrom)Wn&&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 ne=Ea(a,x,x+b,1);ne?(E.view=E.view.slice(ne.index),E.viewFrom=ne.lineN,E.viewTo+=b):ho(a)}else if(x>=E.viewTo){var ae=Ea(a,y,y,-1);ae?(E.view=E.view.slice(0,ae.index),E.viewTo=ae.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(qr(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 ne=b.view[So(a,y)];if(ne.node!=null){var ae=ne.changes||(ne.changes=[]);Je(ae,x)==-1&&ae.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),ne,ae=a.display.view;if(!Wn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ue=a.display.viewFrom,ce=0;ce<E;ce++)ue+=ae[ce].size;if(ue!=y){if(b>0){if(E==ae.length-1)return null;ne=ue+ae[E].size-y,E++}else ne=ue-y;y+=ne,x+=ne}for(;an(a.doc,x)!=x;){if(E==(b<0?0:ae.length-1))return null;x+=b*ae[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=qr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=qr(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(qr(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function ws(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 Ss(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),ne=b.selection=document.createDocumentFragment(),ae=0;ae<x.sel.ranges.length;ae++)if(!(!y&&ae==x.sel.primIndex)){var ue=x.sel.ranges[ae];if(!(ue.from().line>=a.display.viewTo||ue.to().line<a.display.viewFrom)){var ce=ue.empty();(ce||a.options.showCursorWhenSelecting)&&Es(a,ue.head,E),ce||Wl(a,ue,ne)}}return b}function Es(a,y,x){var b=Di(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(qe("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var ne=x.appendChild(qe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ne.style.display="",ne.style.left=b.other.left+"px",ne.style.top=b.other.top+"px",ne.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ka(a,y){return a.top-y.top||a.left-y.left}function Wl(a,y,x){var b=a.display,E=a.doc,ne=document.createDocumentFragment(),ae=eo(a.display),ue=ae.left,ce=Math.max(b.sizerWidth,to(a)-b.sizer.offsetLeft)-ae.right,he=E.direction=="ltr";function Ne(_n,or,gr,hr){or<0&&(or=0),or=Math.round(or),hr=Math.round(hr),ne.appendChild(qe("div",null,"CodeMirror-selected","position: absolute; left: "+_n+`px;
|
|
|
top: `+or+"px; width: "+(gr==null?ce-_n:gr)+`px;
|
|
|
height: `+(hr-or)+"px"))}function Xe(_n,or,gr){var hr=It(E,_n),Tr=hr.text.length,Yr,mi;function Qr(ai,Ai){return To(a,ye(_n,ai),"div",hr,Ai)}function $i(ai,Ai,bi){var di=ii(a,hr,null,ai),si=Ai=="ltr"==(bi=="after")?"left":"right",ei=bi=="after"?di.begin:di.end-(/\s/.test(hr.text.charAt(di.end-1))?2:1);return Qr(ei,si)[si]}var Ti=Qt(hr,E.direction);return ct(Ti,or||0,gr==null?Tr:gr,function(ai,Ai,bi,di){var si=bi=="ltr",ei=Qr(ai,si?"left":"right"),Bi=Qr(Ai-1,si?"right":"left"),Uo=or==null&&ai==0,bo=gr==null&&Ai==Tr,Si=di==0,ro=!Ti||di==Ti.length-1;if(Bi.top-ei.top<=3){var vi=(he?Uo:bo)&&Si,bs=(he?bo:Uo)&&ro,so=vi?ue:(si?ei:Bi).left,Mo=bs?ce:(si?Bi:ei).right;Ne(so,ei.top,Mo-so,ei.bottom)}else{var Do,Pi,Vo,xs;si?(Do=he&&Uo&&Si?ue:ei.left,Pi=he?ce:$i(ai,bi,"before"),Vo=he?ue:$i(Ai,bi,"after"),xs=he&&bo&&ro?ce:Bi.right):(Do=he?$i(ai,bi,"before"):ue,Pi=!he&&Uo&&Si?ce:ei.right,Vo=!he&&bo&&ro?ue:Bi.left,xs=he?$i(Ai,bi,"after"):ce),Ne(Do,ei.top,Pi-Do,ei.bottom),ei.bottom<Bi.top&&Ne(ue,ei.bottom,null,Bi.top),Ne(Vo,Bi.top,xs-Vo,Bi.bottom)}(!Yr||ka(ei,Yr)<0)&&(Yr=ei),ka(Bi,Yr)<0&&(Yr=Bi),(!mi||ka(ei,mi)<0)&&(mi=ei),ka(Bi,mi)<0&&(mi=Bi)}),{start:Yr,end:mi}}var Dt=y.from(),Ct=y.to();if(Dt.line==Ct.line)Xe(Dt.line,Dt.ch,Ct.ch);else{var sn=It(E,Dt.line),xn=It(E,Ct.line),Rn=_t(sn)==_t(xn),Vn=Xe(Dt.line,Dt.ch,Rn?sn.text.length+1:null).end,tr=Xe(Ct.line,Rn?0:null,Ct.ch).start;Rn&&(Vn.top<tr.top-2?(Ne(Vn.right,Vn.top,null,Vn.bottom),Ne(ue,tr.top,tr.left,tr.bottom)):Ne(Vn.right,Vn.top,tr.left-Vn.right,Vn.bottom)),Vn.bottom<tr.top&&Ne(ue,Vn.bottom,null,tr.top)}x.appendChild(ne)}function Xa(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Ao(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function ks(a){a.state.focused||(a.display.input.focus(),Ya(a))}function Is(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ao(a))},100)}function Ya(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(gn(a,"focus",a,y),a.state.focused=!0,ve(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),ze&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Ao(a,y){a.state.delayingBlurEvent||(a.state.focused&&(gn(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 Ia(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],ne=a.options.lineWrapping,ae=void 0,ue=0;if(!E.hidden){if(xe&&Ce<8){var ce=E.node.offsetTop+E.node.offsetHeight;ae=ce-x,x=ce}else{var he=E.node.getBoundingClientRect();ae=he.bottom-he.top,!ne&&E.text.firstChild&&(ue=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var Ne=E.line.height-ae;if((Ne>.005||Ne<-.005)&&(nr(E.line,ae),Ps(E.line),E.rest))for(var Xe=0;Xe<E.rest.length;Xe++)Ps(E.rest[Xe]);if(ue>a.display.sizerWidth){var Dt=Math.ceil(ue/Ji(a.display));Dt>a.display.maxLineLength&&(a.display.maxLineLength=Dt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ps(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 Pa(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-ri(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ne=_e(y,b),ae=_e(y,E);if(x&&x.ensure){var ue=x.ensure.from.line,ce=x.ensure.to.line;ue<ne?(ne=ue,ae=_e(y,cr(It(y,ue))+a.wrapper.clientHeight)):Math.min(ce,y.lastLine())>=ae&&(ne=_e(y,cr(It(y,ce))-a.wrapper.clientHeight),ae=ce)}return{from:ne,to:Math.max(ae,ne+1)}}function $l(a,y){if(!kt(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&&!xt){var ne=qe("div","\u200B",null,`position: absolute;
|
|
|
top: `+(y.top-x.viewOffset-ri(a.display))+`px;
|
|
|
height: `+(y.bottom-y.top+Fi(a)+x.barHeight)+`px;
|
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ne),ne.scrollIntoView(E),a.display.lineSpace.removeChild(ne)}}}function jl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?ye(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?ye(y.line,y.ch+1,"before"):y);for(var ne=0;ne<5;ne++){var ae=!1,ue=Di(a,y),ce=!x||x==y?ue:Di(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),Ne=a.doc.scrollTop,Xe=a.doc.scrollLeft;if(he.scrollTop!=null&&(qo(a,he.scrollTop),Math.abs(a.doc.scrollTop-Ne)>1&&(ae=!0)),he.scrollLeft!=null&&(Eo(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-Xe)>1&&(ae=!0)),!ae)break}return E}function Zl(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=Hi(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ne=io(a),ae={};y.bottom-y.top>ne&&(y.bottom=y.top+ne);var ue=a.doc.height+Gi(x),ce=y.top<b,he=y.bottom>ue-b;if(y.top<E)ae.scrollTop=ce?0:y.top;else if(y.bottom>E+ne){var Ne=Math.min(y.top,(he?ue:y.bottom)-ne);Ne!=E&&(ae.scrollTop=Ne)}var Xe=a.options.fixedGutter?0:x.gutters.offsetWidth,Dt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Xe,Ct=to(a)-x.gutters.offsetWidth,sn=y.right-y.left>Ct;return sn&&(y.right=y.left+Ct),y.left<10?ae.scrollLeft=0:y.left<Dt?ae.scrollLeft=Math.max(0,y.left+Xe-(sn?0:10)):y.right>Ct+Dt-3&&(ae.scrollLeft=y.right+(sn?0:10)-Ct),ae}function Qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Bo(a){Ma(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function Qo(a,y,x){(y!=null||x!=null)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function Gl(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=jr(a,y.from),b=jr(a,y.to);Ms(a,x,b,y.margin)}}function Ms(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||(te||es(a,{top:y}),Ds(a,y,!0),te&&es(a),na(a,100))}function Ds(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,Bs(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+Gi(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+Fi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=qe("div",[qe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=qe("div",[qe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Ut(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Ut(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xe&&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 ne=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ne)+"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=Ie&&!be?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ne=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ne!=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;Os(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Ia(a),Os(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Os(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 Ls={native:ko,null:ta};function Ts(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&We(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ls[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Ut(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&&ve(a.display.wrapper,a.display.scrollbars.addClass)}var Ul=0;function Io(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ul},zr(a.curOp)}function Po(a){var y=a.curOp;y&&wr(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Vl(x)})}function Vl(a){for(var y=a.ops,x=0;x<y.length;x++)_l(y[x]);for(var b=0;b<y.length;b++)Kl(y[b]);for(var E=0;E<y.length;E++)Xl(y[E]);for(var ne=0;ne<y.length;ne++)Yl(y[ne]);for(var ae=0;ae<y.length;ae++)Jl(y[ae])}function _l(a){var y=a.cm,x=y.display;ql(y),a.updateMaxLine&&Ir(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 Da(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Kl(a){a.updatedDisplay=a.mustUpdate&&qa(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&Ia(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+Fi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-to(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Yl(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==ht();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&No(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&ks(a.cm)}function Jl(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&As(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ds(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Eo(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=jl(y,Le(b,a.scrollToPos.from),Le(b,a.scrollToPos.to),a.scrollToPos.margin);$l(y,E)}var ne=a.maybeHiddenMarkers,ae=a.maybeUnhiddenMarkers;if(ne)for(var ue=0;ue<ne.length;++ue)ne[ue].lines.length||gn(ne[ue],"hide");if(ae)for(var ce=0;ce<ae.length;++ce)ae[ce].lines.length&&gn(ae[ce],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&gn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Wi(a,y){if(a.curOp)return y();Io(a);try{return y()}finally{Po(a)}}function hi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Io(a);try{return y.apply(a,arguments)}finally{Po(a)}}}function Ii(a){return function(){if(this.curOp)return a.apply(this,arguments);Io(this);try{return a.apply(this,arguments)}finally{Po(this)}}}function pi(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Io(y);try{return a.apply(this,arguments)}finally{Po(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Nt(Ql,a))}function Ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Tn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ne){if(b.line>=a.display.viewFrom){var ae=ne.styles,ue=ne.text.length>a.options.maxHighlightLength?Xn(y.mode,b.state):null,ce=Zt(a,ne,b,!0);ue&&(b.state=ue),ne.styles=ce.styles;var he=ne.styleClasses,Ne=ce.classes;Ne?ne.styleClasses=Ne:he&&(ne.styleClasses=null);for(var Xe=!ae||ae.length!=ne.styles.length||he!=Ne&&(!he||!Ne||he.bgClass!=Ne.bgClass||he.textClass!=Ne.textClass),Dt=0;!Xe&&Dt<ae.length;++Dt)Xe=ae[Dt]!=ne.styles[Dt];Xe&&E.push(b.line),ne.stateAfter=b.save(),b.nextLine()}else ne.text.length<=a.options.maxHighlightLength&&Hn(a,ne.text,b),ne.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&&Wi(a,function(){for(var ne=0;ne<E.length;ne++)fo(a,E[ne],"text")})}}var Da=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Pa(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=to(a),this.force=x,this.dims=co(a),this.events=[]};Da.prototype.signal=function(a,y){nn(a,y)&&this.events.push(arguments)},Da.prototype.finish=function(){for(var a=0;a<this.events.length;a++)gn.apply(null,this.events[a])};function ql(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Fi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Fi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=ht();if(!y||!pt(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&pt(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==ht())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&pt(document.body,a.anchorNode)&&pt(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&&ws(a)==0)return!1;Ns(a)&&(ho(a),y.dims=co(a));var E=b.first+b.size,ne=Math.max(y.visible.from-a.options.viewportMargin,b.first),ae=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ne&&ne-x.viewFrom<20&&(ne=Math.max(b.first,x.viewFrom)),x.viewTo>ae&&x.viewTo-ae<20&&(ae=Math.min(E,x.viewTo)),Wn&&(ne=an(a.doc,ne),ae=Kt(a.doc,ae));var ue=ne!=x.viewFrom||ae!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,ne,ae),x.viewOffset=cr(It(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ce=ws(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),At(x.cursorDiv),At(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 As(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==to(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Gi(a.display)-io(a),x.top)}),y.visible=Pa(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Pa(a.display,a.doc,x));if(!qa(a,y))break;Ia(a);var E=ea(a);Jo(a),No(a,E),ns(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function es(a,y){var x=new Da(a,y);if(qa(a,x)){Ia(a),As(a,x);var b=ea(a);Jo(a),No(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ne=b.lineDiv,ae=ne.firstChild;function ue(sn){var xn=sn.nextSibling;return ze&&Ie&&a.display.currentWheelTarget==sn?sn.style.display="none":sn.parentNode.removeChild(sn),xn}for(var ce=b.view,he=b.viewFrom,Ne=0;Ne<ce.length;Ne++){var Xe=ce[Ne];if(!Xe.hidden)if(!Xe.node||Xe.node.parentNode!=ne){var Dt=Sr(a,Xe,he,x);ne.insertBefore(Dt,ae)}else{for(;ae!=Xe.node;)ae=ue(ae);var Ct=E&&y!=null&&y<=he&&Xe.lineNumber;Xe.changes&&(Je(Xe.changes,"gutter")>-1&&(Ct=!1),Mi(a,Xe,he,x)),Ct&&(At(Xe.lineNumber),Xe.lineNumber.appendChild(document.createTextNode(Pe(a.options,he)))),ae=Xe.node.nextSibling}he+=Xe.size}for(;ae;)ae=ue(ae)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Fi(a)+"px"}function Bs(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=_a(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ne=b+"px",ae=0;ae<x.length;ae++)if(!x[ae].hidden){a.options.fixedGutter&&(x[ae].gutter&&(x[ae].gutter.style.left=ne),x[ae].gutterBackground&&(x[ae].gutterBackground.style.left=ne));var ue=x[ae].alignable;if(ue)for(var ce=0;ce<ue.length;ce++)ue[ce].style.left=ne}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Ns(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Pe(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(qe("div",[qe("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ne=E.firstChild.offsetWidth,ae=E.offsetWidth-ne;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ne,b.lineGutter.offsetWidth-ae)+1,b.lineNumWidth=b.lineNumInnerWidth+ae,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",ts(a.display),!0}return!1}function rs(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ne=a[E],ae=null;if(typeof ne!="string"&&(ae=ne.style,ne=ne.className),ne=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ne,style:ae})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rs(a){var y=a.gutters,x=a.gutterSpecs;At(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ne=E.className,ae=E.style,ue=y.appendChild(qe("div",null,"CodeMirror-gutter "+ne));ae&&(ue.style.cssText=ae),ne=="CodeMirror-linenumbers"&&(a.lineGutter=ue,ue.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Rs(a.display),Oi(a),Bs(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=qe("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=qe("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Mt("div",null,"CodeMirror-code"),E.selectionDiv=qe("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=qe("div",null,"CodeMirror-cursors"),E.measure=qe("div",null,"CodeMirror-measure"),E.lineMeasure=qe("div",null,"CodeMirror-measure"),E.lineSpace=Mt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ne=Mt("div",[E.lineSpace],"CodeMirror-lines");E.mover=qe("div",[ne],null,"position: relative"),E.sizer=qe("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=qe("div",null,null,"position: absolute; height: "+wt+"px; width: 1px;"),E.gutters=qe("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=qe("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=qe("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),xe&&Ce<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!ze&&!(te&&He)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rs(b.gutters,b.lineNumbers),Rs(E),x.init(E)}var Oa=0,ji=null;xe?ji=-.53:te?ji=15:ke?ji=-.7:Qe&&(ji=-1/3);function Fs(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=Fs(a);return y.x*=ji,y.y*=ji,y}function zs(a,y){var x=Fs(y),b=x.x,E=x.y,ne=a.display,ae=ne.scroller,ue=ae.scrollWidth>ae.clientWidth,ce=ae.scrollHeight>ae.clientHeight;if(b&&ue||E&&ce){if(E&&Ie&&ze){e:for(var he=y.target,Ne=ne.view;he!=ae;he=he.parentNode)for(var Xe=0;Xe<Ne.length;Xe++)if(Ne[Xe].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!te&&!fe&&ji!=null){E&&ce&&qo(a,Math.max(0,ae.scrollTop+E*ji)),Eo(a,Math.max(0,ae.scrollLeft+b*ji)),(!E||E&&ce)&&et(y),ne.wheelStartX=null;return}if(E&&ji!=null){var Dt=E*ji,Ct=a.doc.scrollTop,sn=Ct+ne.wrapper.clientHeight;Dt<0?Ct=Math.max(0,Ct+Dt-50):sn=Math.min(a.doc.height,sn+Dt+50),es(a,{top:Ct,bottom:sn})}Oa<20&&(ne.wheelStartX==null?(ne.wheelStartX=ae.scrollLeft,ne.wheelStartY=ae.scrollTop,ne.wheelDX=b,ne.wheelDY=E,setTimeout(function(){if(ne.wheelStartX!=null){var xn=ae.scrollLeft-ne.wheelStartX,Rn=ae.scrollTop-ne.wheelStartY,Vn=Rn&&ne.wheelDY&&Rn/ne.wheelDY||xn&&ne.wheelDX&&xn/ne.wheelDX;ne.wheelStartX=ne.wheelStartY=null,Vn&&(ji=(ji*Oa+Vn)/(Oa+1),++Oa)}},200)):(ne.wheelDX+=b,ne.wheelDY+=E))}}var Zi=function(a,y){this.ranges=a,this.primIndex=y};Zi.prototype.primary=function(){return this.ranges[this.primIndex]},Zi.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(!pe(x.anchor,b.anchor)||!pe(x.head,b.head))return!1}return!0},Zi.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Vr(Fe(this.ranges[y].anchor),Fe(this.ranges[y].head));return new Zi(a,this.primIndex)},Zi.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Zi.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(Oe(y,b.from())>=0&&Oe(a,b.to())<=0)return x}return-1};var Vr=function(a,y){this.anchor=a,this.head=y};Vr.prototype.from=function(){return tt(this.anchor,this.head)},Vr.prototype.to=function(){return je(this.anchor,this.head)},Vr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Qi(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Dt,Ct){return Oe(Dt.from(),Ct.from())}),x=Je(y,E);for(var ne=1;ne<y.length;ne++){var ae=y[ne],ue=y[ne-1],ce=Oe(ue.to(),ae.from());if(b&&!ae.empty()?ce>0:ce>=0){var he=tt(ue.from(),ae.from()),Ne=je(ue.to(),ae.to()),Xe=ue.empty()?ae.from()==ae.head:ue.from()==ue.head;ne<=x&&--x,y.splice(--ne,2,new Vr(Xe?Ne:he,Xe?he:Ne))}}return new Zi(y,x)}function po(a,y){return new Zi([new Vr(a,y||a)],0)}function mo(a){return a.text?ye(a.from.line+a.text.length-1,it(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(Oe(a,y.from)<0)return a;if(Oe(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),ye(x,b)}function is(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Vr(Hs(E.anchor,y),Hs(E.head,y)))}return Qi(a.cm,x,a.sel.primIndex)}function Ws(a,y,x){return a.line==y.line?ye(x.line,a.ch-y.ch+x.ch):ye(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=ye(a.first,0),ne=E,ae=0;ae<y.length;ae++){var ue=y[ae],ce=Ws(ue.from,E,ne),he=Ws(mo(ue),E,ne);if(E=ue.to,ne=he,x=="around"){var Ne=a.sel.ranges[ae],Xe=Oe(Ne.head,Ne.anchor)<0;b[ae]=new Vr(Xe?he:ce,Xe?ce:he)}else b[ae]=new Vr(ce,ce)}return new Zi(b,a.sel.primIndex)}function os(a){a.doc.mode=Gn(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&&Oi(a)}function $s(a,y){return y.from.ch==0&&y.to.ch==0&&it(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(tr){return x?x[tr]:null}function ne(tr,_n,or){Br(tr,_n,or,b),Lr(tr,"change",tr,y)}function ae(tr,_n){for(var or=[],gr=tr;gr<_n;++gr)or.push(new Rr(he[gr],E(gr),b));return or}var ue=y.from,ce=y.to,he=y.text,Ne=It(a,ue.line),Xe=It(a,ce.line),Dt=it(he),Ct=E(he.length-1),sn=ce.line-ue.line;if(y.full)a.insert(0,ae(0,he.length)),a.remove(he.length,a.size-he.length);else if($s(a,y)){var xn=ae(0,he.length-1);ne(Xe,Xe.text,Ct),sn&&a.remove(ue.line,sn),xn.length&&a.insert(ue.line,xn)}else if(Ne==Xe)if(he.length==1)ne(Ne,Ne.text.slice(0,ue.ch)+Dt+Ne.text.slice(ce.ch),Ct);else{var Rn=ae(1,he.length-1);Rn.push(new Rr(Dt+Ne.text.slice(ce.ch),Ct,b)),ne(Ne,Ne.text.slice(0,ue.ch)+he[0],E(0)),a.insert(ue.line+1,Rn)}else if(he.length==1)ne(Ne,Ne.text.slice(0,ue.ch)+he[0]+Xe.text.slice(ce.ch),E(0)),a.remove(ue.line+1,sn);else{ne(Ne,Ne.text.slice(0,ue.ch)+he[0],E(0)),ne(Xe,Dt+Xe.text.slice(ce.ch),Ct);var Vn=ae(1,he.length-1);sn>1&&a.remove(ue.line+1,sn-1),a.insert(ue.line+1,Vn)}Lr(a,"change",a,y)}function vo(a,y,x){function b(E,ne,ae){if(E.linked)for(var ue=0;ue<E.linked.length;++ue){var ce=E.linked[ue];if(ce.doc!=ne){var he=ae&&ce.sharedHist;x&&!he||(y(ce.doc,he),b(ce.doc,E,he))}}}b(a,null,!0)}function js(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ka(a),os(a),Zs(a),a.options.lineWrapping||Ir(a),a.options.mode=y.modeOption,Oi(a)}function Zs(a){(a.doc.direction=="rtl"?ve:We)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Wi(a,function(){Zs(a),Oi(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 ss(a,y){var x={from:Fe(y.from),to:mo(y),text:Xt(a,y.from,y.to)};return Vs(a,x,y.from.line,y.to.line+1),vo(a,function(b){return Vs(b,x,y.from.line,y.to.line+1)},!0),x}function Gs(a){for(;a.length;){var y=it(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return Gs(a.done),it(a.done);if(a.done.length&&!it(a.done).ranges)return it(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),it(a.done)}function Us(a,y,x,b){var E=a.history;E.undone.length=0;var ne=+new Date,ae,ue;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ne-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ae=su(E,E.lastOp==b)))ue=it(ae.changes),Oe(y.from,y.to)==0&&Oe(y.from,ue.to)==0?ue.to=mo(y):ae.changes.push(ss(a,y));else{var ce=it(E.done);for((!ce||!ce.ranges)&&Ta(a.sel,E.done),ae={changes:[ss(a,y)],generation:E.generation},E.done.push(ae);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=ne,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ue||gn(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ne=b&&b.origin;x==E.lastSelOp||ne&&E.lastSelOrigin==ne&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ne||lu(a,ne,it(E.done),y))?E.done[E.done.length-1]=y:Ta(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ne,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gs(E.undone)}function Ta(a,y){var x=it(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Vs(a,y,x,b){var E=y["spans_"+a.id],ne=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(ae){ae.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ne]=ae.markedSpans),++ne})}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 _s(a,y){var x=du(a,y),b=mr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ne=x[E],ae=b[E];if(ne&&ae)e:for(var ue=0;ue<ae.length;++ue){for(var ce=ae[ue],he=0;he<ne.length;++he)if(ne[he].marker==ce.marker)continue e;ne.push(ce)}else ae&&(x[E]=ae)}return x}function Ro(a,y,x){for(var b=[],E=0;E<a.length;++E){var ne=a[E];if(ne.ranges){b.push(x?Zi.prototype.deepCopy.call(ne):ne);continue}var ae=ne.changes,ue=[];b.push({changes:ue});for(var ce=0;ce<ae.length;++ce){var he=ae[ce],Ne=void 0;if(ue.push({from:he.from,to:he.to,text:he.text}),y)for(var Xe in he)(Ne=Xe.match(/^spans_(\d+)$/))&&Je(y,Number(Ne[1]))>-1&&(it(ue)[Xe]=he[Xe],delete he[Xe])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var ne=Oe(y,E)<0;ne!=Oe(x,E)<0?(E=y,y=x):ne!=Oe(y,x)<0&&(y=x)}return new Vr(E,y)}else return new Vr(x||y,y)}function Aa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),wi(a,new Zi([ls(a.sel.primary(),y,x,E)],0),b)}function Ks(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ne=0;ne<a.sel.ranges.length;ne++)b[ne]=ls(a.sel.ranges[ne],y[ne],null,E);var ae=Qi(a.cm,b,a.sel.primIndex);wi(a,ae,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,wi(a,Qi(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){wi(a,po(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ne=0;ne<E.length;ne++)this.ranges[ne]=new Vr(Le(a,E[ne].anchor),Le(a,E[ne].head))},origin:x&&x.origin};return gn(a,"beforeSelectionChange",a,b),a.cm&&gn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Qi(a.cm,b.ranges,b.ranges.length-1):y}function Ys(a,y,x){var b=a.history.done,E=it(b);E&&E.ranges?(b[b.length-1]=y,Ba(a,y,x)):wi(a,y,x)}function wi(a,y,x){Ba(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ba(a,y,x){(nn(a,"beforeSelectionChange")||a.cm&&nn(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(Oe(y.primary().head,a.sel.primary().head)<0?-1:1);Js(a,qs(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Bo(a.cm)}function Js(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Mn(a.cm)),Lr(a,"cursorActivity",a))}function Qs(a){Js(a,qs(a,a.sel,null,!1))}function qs(a,y,x,b){for(var E,ne=0;ne<y.ranges.length;ne++){var ae=y.ranges[ne],ue=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ne],ce=Na(a,ae.anchor,ue&&ue.anchor,x,b),he=Na(a,ae.head,ue&&ue.head,x,b);(E||ce!=ae.anchor||he!=ae.head)&&(E||(E=y.ranges.slice(0,ne)),E[ne]=new Vr(ce,he))}return E?Qi(a.cm,E,y.primIndex):y}function Fo(a,y,x,b,E){var ne=It(a,y.line);if(ne.markedSpans)for(var ae=0;ae<ne.markedSpans.length;++ae){var ue=ne.markedSpans[ae],ce=ue.marker,he="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Ne="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((ue.from==null||(he?ue.from<=y.ch:ue.from<y.ch))&&(ue.to==null||(Ne?ue.to>=y.ch:ue.to>y.ch))){if(E&&(gn(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(ne.markedSpans){--ae;continue}else break;if(!ce.atomic)continue;if(x){var Xe=ce.find(b<0?1:-1),Dt=void 0;if((b<0?Ne:he)&&(Xe=el(a,Xe,-b,Xe&&Xe.line==y.line?ne:null)),Xe&&Xe.line==y.line&&(Dt=Oe(Xe,x))&&(b<0?Dt<0:Dt>0))return Fo(a,Xe,y,b,E)}var Ct=ce.find(b<0?-1:1);return(b<0?he:Ne)&&(Ct=el(a,Ct,b,Ct.line==y.line?ne:null)),Ct?Fo(a,Ct,y,b,E):null}}return y}function Na(a,y,x,b,E){var ne=b||1,ae=Fo(a,y,x,ne,E)||!E&&Fo(a,y,x,ne,!0)||Fo(a,y,x,-ne,E)||!E&&Fo(a,y,x,-ne,!0);return ae||(a.cantEdit=!0,ye(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Le(a,ye(y.line-1)):null:x>0&&y.ch==(b||It(a,y.line)).text.length?y.line<a.first+a.size-1?ye(y.line+1,0):null:new ye(y.line,y.ch+x)}function tl(a){a.setSelection(ye(a.firstLine(),0),ye(a.lastLine()),Be)}function nl(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,ne,ae,ue){E&&(b.from=Le(a,E)),ne&&(b.to=Le(a,ne)),ae&&(b.text=ae),ue!==void 0&&(b.origin=ue)}),gn(a,"beforeChange",a,b),a.cm&&gn(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 hi(a.cm,zo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((nn(a,"beforeChange")||a.cm&&nn(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=er&&!x&&Hr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&Oe(y.from,y.to)==0)){var x=is(a,y);Us(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,mr(a,y));var b=[];vo(a,function(E,ne){!ne&&Je(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,mr(E,y))})}}function Ra(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ne,ae=a.sel,ue=y=="undo"?E.done:E.undone,ce=y=="undo"?E.undone:E.done,he=0;he<ue.length&&(ne=ue[he],!(x?ne.ranges&&!ne.equals(a.sel):!ne.ranges));he++);if(he!=ue.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ne=ue.pop(),ne.ranges){if(Ta(ne,ce),x&&!ne.equals(a.sel)){wi(a,ne,{clearRedo:!1});return}ae=ne}else if(b){ue.push(ne);return}else break;var Ne=[];Ta(ae,ce),ce.push({changes:Ne,generation:E.generation}),E.generation=ne.generation||++E.maxGeneration;for(var Xe=nn(a,"beforeChange")||a.cm&&nn(a.cm,"beforeChange"),Dt=function(xn){var Rn=ne.changes[xn];if(Rn.origin=y,Xe&&!nl(a,Rn,!1))return ue.length=0,{};Ne.push(ss(a,Rn));var Vn=xn?is(a,Rn):it(ue);oa(a,Rn,Vn,_s(a,Rn)),!xn&&a.cm&&a.cm.scrollIntoView({from:Rn.from,to:mo(Rn)});var tr=[];vo(a,function(_n,or){!or&&Je(tr,_n.history)==-1&&(sl(_n.history,Rn),tr.push(_n.history)),oa(_n,Rn,null,_s(_n,Rn))})},Ct=ne.changes.length-1;Ct>=0;--Ct){var sn=Dt(Ct);if(sn)return sn.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Zi(Gt(a.sel.ranges,function(E){return new Vr(ye(E.anchor.line+y,E.anchor.ch),ye(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Oi(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 hi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){il(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);il(a,E),y={from:ye(a.first,0),to:ye(y.to.line+E,y.to.ch),text:[it(y.text)],origin:y.origin}}var ne=a.lastLine();y.to.line>ne&&(y={from:y.from,to:ye(ne,It(a,ne).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Xt(a,y.from,y.to),x||(x=is(a,y)),a.cm?hu(a.cm,y,b):as(a,y,b),Ba(a,x,Be),a.cantEdit&&Na(a,ye(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,ne=y.from,ae=y.to,ue=!1,ce=ne.line;a.options.lineWrapping||(ce=De(_t(It(b,ne.line))),b.iter(ce,ae.line+1,function(Ct){if(Ct==E.maxLine)return ue=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Mn(a),as(b,y,x,Cs(a)),a.options.lineWrapping||(b.iter(ce,ne.line+y.text.length,function(Ct){var sn=Or(Ct);sn>E.maxLineLength&&(E.maxLine=Ct,E.maxLineLength=sn,E.maxLineChanged=!0,ue=!1)}),ue&&(a.curOp.updateMaxLine=!0)),vn(b,ne.line),na(a,400);var he=y.text.length-(ae.line-ne.line)-1;y.full?Oi(a):ne.line==ae.line&&y.text.length==1&&!$s(a.doc,y)?fo(a,ne.line,"text"):Oi(a,ne.line,ae.line+1,he);var Ne=nn(a,"changes"),Xe=nn(a,"change");if(Xe||Ne){var Dt={from:ne,to:ae,text:y.text,removed:y.removed,origin:y.origin};Xe&&Lr(a,"change",a,Dt),Ne&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Dt)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var ne;b||(b=x),Oe(b,x)<0&&(ne=[b,x],x=ne[0],b=ne[1]),typeof y=="string"&&(y=a.splitLines(y)),zo(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function al(a,y,x,b){for(var E=0;E<a.length;++E){var ne=a[E],ae=!0;if(ne.ranges){ne.copied||(ne=a[E]=ne.deepCopy(),ne.copied=!0);for(var ue=0;ue<ne.ranges.length;ue++)ol(ne.ranges[ue].anchor,y,x,b),ol(ne.ranges[ue].head,y,x,b);continue}for(var ce=0;ce<ne.changes.length;++ce){var he=ne.changes[ce];if(x<he.from.line)he.from=ye(he.from.line+b,he.from.ch),he.to=ye(he.to.line+b,he.to.ch);else if(y<=he.to.line){ae=!1;break}}ae||(a.splice(0,E+1),E=0)}}function sl(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;al(a.done,x,b,E),al(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ne=y;return typeof y=="number"?ne=It(a,Ze(a,y)):E=De(y),E==null?null:(b(ne,E)&&a.cm&&fo(a.cm,E,x),ne)}function sa(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Fr(E),Lr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function la(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}la.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var ne=Math.min(y,E-a),ae=b.height;if(b.removeInner(a,ne),this.height-=ae-b.height,E==ne&&(this.children.splice(x--,1),b.parent=null),(y-=ne)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var ue=[];this.collapse(ue),this.children=[new sa(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],ne=E.chunkSize();if(a<=ne){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var ae=E.lines.length%25+25,ue=ae;ue<E.lines.length;){var ce=new sa(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,ae),this.maybeSpill()}break}a-=ne}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=Je(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new la(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],ne=E.chunkSize();if(a<ne){var ae=Math.min(y,ne-a);if(E.iterN(a,ae,x))return!0;if((y-=ae)==0)break;a=0}else a-=ne}}};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=De(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 ne=ki(this);nr(x,Math.max(0,x.height-ne)),a&&(Wi(a,function(){ll(a,x,-ne),fo(a,b,"widget")}),Lr(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=ki(this)-y;E&&(bn(this.doc,b)||nr(b,b.height+E),x&&Wi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Lr(x,"lineWidgetChanged",x,a,De(b))}))},Me(ua);function ll(a,y,x){cr(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),ne=a.cm;return ne&&E.noHScroll&&(ne.display.alignWidgets=!0),aa(a,y,"widget",function(ae){var ue=ae.widgets||(ae.widgets=[]);if(E.insertAt==null?ue.push(E):ue.splice(Math.min(ue.length-1,Math.max(0,E.insertAt)),0,E),E.line=ae,ne&&!bn(a,ae)){var ce=cr(ae)<a.scrollTop;nr(ae,ae.height+ki(E)),ce&&Qa(ne,E.height),ne.curOp.forceUpdate=!0}return!0}),ne&&Lr(ne,"lineWidgetAdded",ne,E,typeof y=="number"?y:De(y)),E}var ul=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Io(a),nn(this,"clear")){var x=this.find();x&&Lr(this,"clear",x.from,x.to)}for(var b=null,E=null,ne=0;ne<this.lines.length;++ne){var ae=this.lines[ne],ue=ur(ae.markedSpans,this);a&&!this.collapsed?fo(a,De(ae),"text"):a&&(ue.to!=null&&(E=De(ae)),ue.from!=null&&(b=De(ae))),ae.markedSpans=yr(ae.markedSpans,ue),ue.from==null&&this.collapsed&&!bn(this.doc,ae)&&a&&nr(ae,Hi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var he=_t(this.lines[ce]),Ne=Or(he);Ne>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=Ne,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Oi(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Qs(a.doc)),a&&Lr(a,"markerCleared",a,this,b,E),y&&Po(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 ne=this.lines[E],ae=ur(ne.markedSpans,this);if(ae.from!=null&&(x=ye(y?ne:De(ne),ae.from),a==-1))return x;if(ae.to!=null&&(b=ye(y?ne:De(ne),ae.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||Wi(b,function(){var E=y.line,ne=De(y.line),ae=no(b,ne);if(ae&&(_o(ae),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!bn(x.doc,E)&&x.height!=null){var ue=x.height;x.height=null;var ce=ki(x)-ue;ce&&nr(E,E.height+ce)}Lr(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Je(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(Je(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Me(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 hi(a.cm,Wo)(a,y,x,b,E);var ne=new go(a,E),ae=Oe(y,x);if(b&&rn(b,ne,!1),ae>0||ae==0&&ne.clearWhenEmpty!==!1)return ne;if(ne.replacedWith&&(ne.collapsed=!0,ne.widgetNode=Mt("span",[ne.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ne.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ne.widgetNode.insertLeft=!0)),ne.collapsed){if(un(a,y.line,y,x,ne)||y.line!=x.line&&un(a,x.line,y,x,ne))throw new Error("Inserting collapsed marker partially overlapping an existing one");pr()}ne.addToHistory&&Us(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(Xe){ce&&ne.collapsed&&!ce.options.lineWrapping&&_t(Xe)==ce.display.maxLine&&(he=!0),ne.collapsed&&ue!=y.line&&nr(Xe,0),sr(Xe,new lr(ne,ue==y.line?y.ch:null,ue==x.line?x.ch:null)),++ue}),ne.collapsed&&a.iter(y.line,x.line+1,function(Xe){bn(a,Xe)&&nr(Xe,0)}),ne.clearOnEnter&&Ut(ne,"beforeCursorEnter",function(){return ne.clear()}),ne.readOnly&&(dr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ne.collapsed&&(ne.id=++ul,ne.atomic=!0),ce){if(he&&(ce.curOp.updateMaxLine=!0),ne.collapsed)Oi(ce,y.line,x.line+1);else if(ne.className||ne.startStyle||ne.endStyle||ne.css||ne.attributes||ne.title)for(var Ne=y.line;Ne<=x.line;Ne++)fo(ce,Ne,"text");ne.atomic&&Qs(ce.doc),Lr(ce,"markerAdded",ce,ne)}return ne}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();Lr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Me(ca);function mu(a,y,x,b,E){b=rn(b),b.shared=!1;var ne=[Wo(a,y,x,b,E)],ae=ne[0],ue=b.widgetNode;return vo(a,function(ce){ue&&(b.widgetNode=ue.cloneNode(!0)),ne.push(Wo(ce,Le(ce,y),Le(ce,x),b,E));for(var he=0;he<ce.linked.length;++he)if(ce.linked[he].isParent)return;ae=it(ne)}),new ca(ne,ae)}function cl(a){return a.findMarks(ye(a.first,0),a.clipPos(ye(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(),ne=a.clipPos(E.from),ae=a.clipPos(E.to);if(Oe(ne,ae)){var ue=Wo(a,ne,ae,b.primary,b.primary.type);b.markers.push(ue),ue.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ne=[E.primary.doc];vo(E.primary.doc,function(ce){return ne.push(ce)});for(var ae=0;ae<E.markers.length;ae++){var ue=E.markers[ae];Je(ne,ue.doc)==-1&&(ue.parent=null,E.markers.splice(ae--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Li=function(a,y,x,b,E){if(!(this instanceof Li))return new Li(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new Rr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ne=ye(x,0);this.sel=po(ne),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)),as(this,{from:ne,to:ne,text:a}),wi(this,po(ne),Be)};Li.prototype=ee(la.prototype,{constructor:Li,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=zn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:pi(function(a){var y=ye(this.first,0),x=this.first+this.size-1;zo(this,{from:y,to:ye(x,It(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qo(this.cm,0,0),wi(this,po(y),Be)}),replaceRange:function(a,y,x,b){y=Le(this,y),x=x?Le(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Xt(this,Le(this,a),Le(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(ge(this,a))return It(this,a)},getLineNumber:function(a){return De(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=It(this,a)),_t(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Le(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:pi(function(a,y,x){Xs(this,Le(this,typeof a=="number"?ye(a,y||0):a),null,x)}),setSelection:pi(function(a,y,x){Xs(this,Le(this,a),Le(this,y||a),x)}),extendSelection:pi(function(a,y,x){Aa(this,Le(this,a),y&&Le(this,y),x)}),extendSelections:pi(function(a,y){Ks(this,Ue(this,a),y)}),extendSelectionsBy:pi(function(a,y){var x=Gt(this.sel.ranges,a);Ks(this,Ue(this,x),y)}),setSelections:pi(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Vr(Le(this,a[E].anchor),Le(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),wi(this,Qi(this.cm,b,y),x)}}),addSelection:pi(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Vr(Le(this,a),Le(this,y||a))),wi(this,Qi(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=Xt(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=Xt(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:pi(function(a,y,x){for(var b=[],E=this.sel,ne=0;ne<E.ranges.length;ne++){var ae=E.ranges[ne];b[ne]={from:ae.from(),to:ae.to(),text:this.splitLines(a[ne]),origin:x}}for(var ue=y&&y!="end"&&ou(this,b,y),ce=b.length-1;ce>=0;ce--)zo(this,b[ce]);ue?Ys(this,ue):this.cm&&Bo(this.cm)}),undo:pi(function(){Ra(this,"undo")}),redo:pi(function(){Ra(this,"redo")}),undoSelection:pi(function(){Ra(this,"undo",!0)}),redoSelection:pi(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:pi(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&re(E)&&(b.gutterMarkers=null),!0})}),clearGutter:pi(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,re(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!ge(this,a)||(y=a,a=It(this,a),!a))return null}else if(y=De(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:pi(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(vt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:pi(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",ne=b[E];if(ne)if(x==null)b[E]=null;else{var ae=ne.match(vt(x));if(!ae)return!1;var ue=ae.index+ae[0].length;b[E]=ne.slice(0,ae.index)+(!ae.index||ue==ne.length?"":" ")+ne.slice(ue)||null}else return!1;return!0})}),addLineWidget:pi(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Wo(this,Le(this,a),Le(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=Le(this,a),Wo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Le(this,a);var y=[],x=It(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=Le(this,a),y=Le(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ne){var ae=ne.markedSpans;if(ae)for(var ue=0;ue<ae.length;ue++){var ce=ae[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 ne=E.text.length+b;if(ne>a)return y=a,!0;a-=ne,++x}),Le(this,ye(x,y))},indexFromPos:function(a){a=Le(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 Li(zn(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 Li(zn(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,cl(this)),b},unlinkDoc:function(a){if(a instanceof Jr&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cl(this));break}}if(a.history==this.history){var b=[a.id];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):dn(a)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:pi(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))})}),Li.prototype.eachLine=Li.prototype.iter;var dl=0;function bu(a){var y=this;if(fl(y),!(kt(y,a)||gi(y.display,a))){et(a),xe&&(dl=+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,ne=Array(E),ae=0,ue=function(){++ae==E&&hi(y,function(){x=Le(y.doc,x);var Ct={from:x,to:x,text:y.doc.splitLines(ne.filter(function(sn){return sn!=null}).join(y.doc.lineSeparator())),origin:"paste"};zo(y.doc,Ct),Ys(y.doc,po(Le(y.doc,x),Le(y.doc,mo(Ct))))})()},ce=function(Ct,sn){if(y.options.allowDropFileTypes&&Je(y.options.allowDropFileTypes,Ct.type)==-1){ue();return}var xn=new FileReader;xn.onerror=function(){return ue()},xn.onload=function(){var Rn=xn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Rn)){ue();return}ne[sn]=Rn,ue()},xn.readAsText(Ct)},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 Ne=a.dataTransfer.getData("Text");if(Ne){var Xe;if(y.state.draggingText&&!y.state.draggingText.copy&&(Xe=y.listSelections()),Ba(y.doc,po(x,x)),Xe)for(var Dt=0;Dt<Xe.length;++Dt)Ho(y.doc,"",Xe[Dt].anchor,Xe[Dt].head,"drag");y.replaceSelection(Ne,"around","paste"),y.display.input.focus()}}catch(Ct){}}}}function xu(a,y){if(xe&&(!a.state.draggingText||+new Date-dl<100)){Se(y);return}if(!(kt(a,y)||gi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Qe)){var x=qe("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&x.parentNode.removeChild(x)}}function Cu(a,y){var x=wo(a,y);if(x){var b=document.createDocumentFragment();Es(a,x,b),a.display.dragCursor||(a.display.dragCursor=qe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),st(a.display.dragCursor,b)}}function fl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hl(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 ne=0;ne<x.length;ne++)a(x[ne])})}}var pl=!1;function wu(){pl||(Su(),pl=!0)}function Su(){var a;Ut(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hl(Eu)},100))}),Ut(window,"blur",function(){return hl(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 ao={};ao.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"},ao.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"},ao.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"},ao.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"]},ao.default=Ie?ao.macDefault:ao.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ne,ae=0;ae<y.length-1;ae++){var ue=y[ae];if(/^(cmd|meta|m)$/i.test(ue))ne=!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),ne&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Iu(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=Gt(x.split(" "),ku),ne=0;ne<E.length;ne++){var ae=void 0,ue=void 0;ne==E.length-1?(ue=E.join(" "),ae=b):(ue=E.slice(0,ne+1).join(" "),ae="...");var ce=y[ue];if(!ce)y[ue]=ae;else if(ce!=ae)throw new Error("Inconsistent bindings for "+ue)}delete a[x]}for(var he in y)a[he]=y[he];return a}function $o(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 $o(a,y.fallthrough,x,b);for(var ne=0;ne<y.fallthrough.length;ne++){var ae=$o(a,y.fallthrough[ne],x,b);if(ae)return ae}}}function ml(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function vl(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(ft?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(ft?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(fe&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),vl(x,a,y))}function za(a){return typeof a=="string"?ao[a]:a}function jo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ne=y(x[E]);b.length&&Oe(ne.from,it(b).to)<=0;){var ae=b.pop();if(Oe(ae.from,ne.from)<0){ne.from=ae.from;break}}b.push(ne)}Wi(a,function(){for(var ue=b.length-1;ue>=0;ue--)Ho(a.doc,"",b[ue].from,b[ue].to,"+delete");Bo(a)})}function cs(a,y,x){var b=$t(a.text,y+x,x);return b<0||b>a.text.length?null:b}function ds(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new ye(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ne=Qt(x,y.doc.direction);if(ne){var ae=E<0?it(ne):ne[0],ue=E<0==(ae.level==1),ce=ue?"after":"before",he;if(ae.level>0||y.doc.direction=="rtl"){var Ne=uo(y,x);he=E<0?x.text.length-1:0;var Xe=Ui(y,Ne,he).top;he=Ye(function(Dt){return Ui(y,Ne,Dt).top==Xe},E<0==(ae.level==1)?ae.from:ae.to-1,he),ce=="before"&&(he=cs(x,he,1))}else he=E<0?ae.to:ae.from;return new ye(b,he,ce)}}return new ye(b,E<0?x.text.length:0,E<0?"before":"after")}function Pu(a,y,x,b){var E=Qt(y,a.doc.direction);if(!E)return ds(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ne=Ft(E,x.ch,x.sticky),ae=E[ne];if(a.doc.direction=="ltr"&&ae.level%2==0&&(b>0?ae.to>x.ch:ae.from<x.ch))return ds(y,x,b);var ue=function(Vn,tr){return cs(y,Vn instanceof ye?Vn.ch:Vn,tr)},ce,he=function(Vn){return a.options.lineWrapping?(ce=ce||uo(a,y),ii(a,y,ce,Vn)):{begin:0,end:y.text.length}},Ne=he(x.sticky=="before"?ue(x,-1):x.ch);if(a.doc.direction=="rtl"||ae.level==1){var Xe=ae.level==1==b<0,Dt=ue(x,Xe?1:-1);if(Dt!=null&&(Xe?Dt<=ae.to&&Dt<=Ne.end:Dt>=ae.from&&Dt>=Ne.begin)){var Ct=Xe?"before":"after";return new ye(x.line,Dt,Ct)}}var sn=function(Vn,tr,_n){for(var or=function(Yr,mi){return mi?new ye(x.line,ue(Yr,1),"before"):new ye(x.line,Yr,"after")};Vn>=0&&Vn<E.length;Vn+=tr){var gr=E[Vn],hr=tr>0==(gr.level!=1),Tr=hr?_n.begin:ue(_n.end,-1);if(gr.from<=Tr&&Tr<gr.to||(Tr=hr?gr.from:ue(gr.to,-1),_n.begin<=Tr&&Tr<_n.end))return or(Tr,hr)}},xn=sn(ne+b,b,Ne);if(xn)return xn;var Rn=b>0?Ne.end:ue(Ne.begin,-1);return Rn!=null&&!(b>0&&Rn==y.text.length)&&(xn=sn(b>0?0:E.length-1,b,he(Rn)),xn)?xn:null}var ha={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Be)},killLine:function(a){return jo(a,function(y){if(y.empty()){var x=It(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:ye(y.head.line+1,0)}:{from:y.head,to:ye(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return jo(a,function(y){return{from:ye(y.from().line,0),to:Le(a.doc,ye(y.to().line+1,0))}})},delLineLeft:function(a){return jo(a,function(y){return{from:ye(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return jo(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 jo(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(ye(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(ye(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return yl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Mu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},bt)},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")},bt)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bl(a,y.head):b},bt)},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 ne=x[E].from(),ae=we(a.getLine(ne.line),ne.ch,b);y.push(jt(b-ae%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Wi(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ne=It(a.doc,E.line).text;if(ne){if(E.ch==ne.length&&(E=new ye(E.line,E.ch-1)),E.ch>0)E=new ye(E.line,E.ch+1),a.replaceRange(ne.charAt(E.ch-1)+ne.charAt(E.ch-2),ye(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ae=It(a.doc,E.line-1).text;ae&&(E=new ye(E.line,1),a.replaceRange(ne.charAt(0)+a.doc.lineSeparator()+ae.charAt(ae.length-1),ye(E.line-1,ae.length-1),E,"+transpose"))}}x.push(new Vr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Wi(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 yl(a,y){var x=It(a.doc,y),b=_t(x);return b!=x&&(y=De(b)),fs(!0,a,b,y,1)}function Mu(a,y){var x=It(a.doc,y),b=An(x);return b!=x&&(y=De(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=It(a.doc,x.line),E=Qt(b,a.doc.direction);if(!E||E[0].level==0){var ne=Math.max(x.ch,b.text.search(/\S/)),ae=y.line==x.line&&y.ch<=ne&&y.ch;return ye(x.line,ae?0:ne,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)!=Et}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Du(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=$o(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&$o(y,a.options.extraKeys,x,a)||$o(y,a.options.keyMap,x,a)}var Ou=new de;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(ml(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Ou.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Du(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Lr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(et(x),Xa(a)),!!E}function Cl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Lu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var hs=null;function wl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=ht(),!kt(y,a))){xe&&Ce<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=Cl(y,a);fe&&(hs=b?x:null,!b&&x==88&&!fn&&(Ie?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),te&&!Ie&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Tu(y)}}function Tu(a){var y=a.display.lineDiv;ve(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(We(y,"CodeMirror-crosshair"),on(document,"keyup",x),on(document,"mouseover",x))}Ut(document,"keyup",x),Ut(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),kt(this,a)}function El(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(gi(y.display,a)||kt(y,a)||a.ctrlKey&&!a.altKey||Ie&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==hs){hs=null,et(a);return}if(!(fe&&(!a.which||a.which<10)&&Cl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Lu(y,a,E)||y.display.input.onKeyPress(a))}}}var Au=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Au>a&&Oe(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 ps(x,a,y),ma=null,"double"):(ma=new ps(x,a,y),va=null,"single")}function kl(a){var y=this,x=y.display;if(!(kt(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,gi(x,a)){ze||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!ms(y,a)){var b=wo(y,a),E=lt(a),ne=b?Bu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,ne,a))&&(E==1?b?Fu(y,b,ne,a):$e(a)==x.scroller&&et(a):E==2?(b&&Aa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(nt?y.display.input.onContextMenu(a):Is(y)))}}}function Nu(a,y,x,b,E){var ne="Click";return b=="double"?ne="Double"+ne:b=="triple"&&(ne="Triple"+ne),ne=(y==1?"Left":y==2?"Middle":"Right")+ne,pa(a,vl(ne,E),E,function(ae){if(typeof ae=="string"&&(ae=ha[ae]),!ae)return!1;var ue=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ue=ae(a,x)!=Et}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 ne=ut?x.shiftKey&&x.metaKey:x.altKey;E.unit=ne?"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=Ie?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ie?x.altKey:x.ctrlKey)),E}function Fu(a,y,x,b){xe?setTimeout(Nt(ks,a),0):a.curOp.focus=ht();var E=Ru(a,x,b),ne=a.doc.sel,ae;a.options.dragDrop&&Tt&&!a.isReadOnly()&&x=="single"&&(ae=ne.contains(y))>-1&&(Oe((ae=ne.ranges[ae]).from(),y)<0||y.xRel>0)&&(Oe(ae.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,ne=!1,ae=hi(a,function(he){ze&&(E.scroller.draggable=!1),a.state.draggingText=!1,on(E.wrapper.ownerDocument,"mouseup",ae),on(E.wrapper.ownerDocument,"mousemove",ue),on(E.scroller,"dragstart",ce),on(E.scroller,"drop",ae),ne||(et(he),b.addNew||Aa(a.doc,x,null,null,b.extend),ze&&!Qe||xe&&Ce==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ue=function(he){ne=ne||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},ce=function(){return ne=!0};ze&&(E.scroller.draggable=!0),a.state.draggingText=ae,ae.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Ut(E.wrapper.ownerDocument,"mouseup",ae),Ut(E.wrapper.ownerDocument,"mousemove",ue),Ut(E.scroller,"dragstart",ce),Ut(E.scroller,"drop",ae),Is(a),setTimeout(function(){return E.input.focus()},20)}function Il(a,y,x){if(x=="char")return new Vr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Vr(ye(y.line,0),Le(a.doc,ye(y.line+1,0)));var b=x(a,y);return new Vr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ne=a.doc;et(y);var ae,ue,ce=ne.sel,he=ce.ranges;if(b.addNew&&!b.extend?(ue=ne.sel.contains(x),ue>-1?ae=he[ue]:ae=new Vr(x,x)):(ae=ne.sel.primary(),ue=ne.sel.primIndex),b.unit=="rectangle")b.addNew||(ae=new Vr(x,x)),x=wo(a,y,!0,!0),ue=-1;else{var Ne=Il(a,x,b.unit);b.extend?ae=ls(ae,Ne.anchor,Ne.head,b.extend):ae=Ne}b.addNew?ue==-1?(ue=he.length,wi(ne,Qi(a,he.concat([ae]),ue),{scroll:!1,origin:"*mouse"})):he.length>1&&he[ue].empty()&&b.unit=="char"&&!b.extend?(wi(ne,Qi(a,he.slice(0,ue).concat(he.slice(ue+1)),0),{scroll:!1,origin:"*mouse"}),ce=ne.sel):us(ne,ue,ae,dt):(ue=0,wi(ne,new Zi([ae],0),dt),ce=ne.sel);var Xe=x;function Dt(_n){if(Oe(Xe,_n)!=0)if(Xe=_n,b.unit=="rectangle"){for(var or=[],gr=a.options.tabSize,hr=we(It(ne,x.line).text,x.ch,gr),Tr=we(It(ne,_n.line).text,_n.ch,gr),Yr=Math.min(hr,Tr),mi=Math.max(hr,Tr),Qr=Math.min(x.line,_n.line),$i=Math.min(a.lastLine(),Math.max(x.line,_n.line));Qr<=$i;Qr++){var Ti=It(ne,Qr).text,ai=tn(Ti,Yr,gr);Yr==mi?or.push(new Vr(ye(Qr,ai),ye(Qr,ai))):Ti.length>ai&&or.push(new Vr(ye(Qr,ai),ye(Qr,tn(Ti,mi,gr))))}or.length||or.push(new Vr(x,x)),wi(ne,Qi(a,ce.ranges.slice(0,ue).concat(or),ue),{origin:"*mouse",scroll:!1}),a.scrollIntoView(_n)}else{var Ai=ae,bi=Il(a,_n,b.unit),di=Ai.anchor,si;Oe(bi.anchor,di)>0?(si=bi.head,di=tt(Ai.from(),bi.anchor)):(si=bi.anchor,di=je(Ai.to(),bi.head));var ei=ce.ranges.slice(0);ei[ue]=Wu(a,new Vr(Le(ne,di),si)),wi(ne,Qi(a,ei,ue),dt)}}var Ct=E.wrapper.getBoundingClientRect(),sn=0;function xn(_n){var or=++sn,gr=wo(a,_n,!0,b.unit=="rectangle");if(gr)if(Oe(gr,Xe)!=0){a.curOp.focus=ht(),Dt(gr);var hr=Pa(E,ne);(gr.line>=hr.to||gr.line<hr.from)&&setTimeout(hi(a,function(){sn==or&&xn(_n)}),150)}else{var Tr=_n.clientY<Ct.top?-20:_n.clientY>Ct.bottom?20:0;Tr&&setTimeout(hi(a,function(){sn==or&&(E.scroller.scrollTop+=Tr,xn(_n))}),50)}}function Rn(_n){a.state.selectingText=!1,sn=1/0,_n&&(et(_n),E.input.focus()),on(E.wrapper.ownerDocument,"mousemove",Vn),on(E.wrapper.ownerDocument,"mouseup",tr),ne.history.lastSelOrigin=null}var Vn=hi(a,function(_n){_n.buttons===0||!lt(_n)?Rn(_n):xn(_n)}),tr=hi(a,Rn);a.state.selectingText=tr,Ut(E.wrapper.ownerDocument,"mousemove",Vn),Ut(E.wrapper.ownerDocument,"mouseup",tr)}function Wu(a,y){var x=y.anchor,b=y.head,E=It(a.doc,x.line);if(Oe(x,b)==0&&x.sticky==b.sticky)return y;var ne=Qt(E);if(!ne)return y;var ae=Ft(ne,x.ch,x.sticky),ue=ne[ae];if(ue.from!=x.ch&&ue.to!=x.ch)return y;var ce=ae+(ue.from==x.ch==(ue.level!=1)?0:1);if(ce==0||ce==ne.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Ne=Ft(ne,b.ch,b.sticky),Xe=Ne-ae||(b.ch-x.ch)*(ue.level==1?-1:1);Ne==ce-1||Ne==ce?he=Xe<0:he=Xe>0}var Dt=ne[ce+(he?-1:0)],Ct=he==(Dt.level==1),sn=Ct?Dt.from:Dt.to,xn=Ct?"after":"before";return x.ch==sn&&x.sticky==xn?y:new Vr(new ye(x.line,sn,xn),b)}function Pl(a,y,x,b){var E,ne;if(y.touches)E=y.touches[0].clientX,ne=y.touches[0].clientY;else try{E=y.clientX,ne=y.clientY}catch(Dt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&et(y);var ae=a.display,ue=ae.lineDiv.getBoundingClientRect();if(ne>ue.bottom||!nn(a,x))return Rt(y);ne-=ue.top-ae.viewOffset;for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var he=ae.gutters.childNodes[ce];if(he&&he.getBoundingClientRect().right>=E){var Ne=_e(a.doc,ne),Xe=a.display.gutterSpecs[ce];return gn(a,x,a,Ne,Xe.className,y),Rt(y)}}}function ms(a,y){return Pl(a,y,"gutterClick",!0)}function Ml(a,y){gi(a.display,y)||$u(a,y)||kt(a,y,"contextmenu")||nt||a.display.input.onContextMenu(y)}function $u(a,y){return nn(a,"gutterContextMenu")?Pl(a,y,"gutterContextMenu",!1):!1}function Dl(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 Zo={toString:function(){return"CodeMirror.Init"}},Ol={},Wa={};function ju(a){var y=a.optionHandlers;function x(b,E,ne,ae){a.defaults[b]=E,ne&&(y[b]=ae?function(ue,ce,he){he!=Zo&&ne(ue,ce,he)}:ne)}a.defineOption=x,a.Init=Zo,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),Co(b),Oi(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ne=[],ae=b.doc.first;b.doc.iter(function(ce){for(var he=0;;){var Ne=ce.text.indexOf(E,he);if(Ne==-1)break;he=Ne+E.length,ne.push(ye(ae,Ne))}ae++});for(var ue=ne.length-1;ue>=0;ue--)Ho(b.doc,E,ne[ue],ye(ne[ue].line,ne[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,ne){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ne!=Zo&&b.refresh()}),x("specialCharPlaceholder",Ei,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",He?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!gt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Dl(b),ra(b)},!0),x("keyMap","default",function(b,E,ne){var ae=za(E),ue=ne!=Zo&&za(ne);ue&&ue.detach&&ue.detach(b,ae),ae.attach&&ae.attach(b,ue||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?_a(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return No(b)},!0),x("scrollbarStyle","native",function(b){Ts(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=rs(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,Zu),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 Zu(a,y,x){var b=x&&x!=Zo;if(!y!=!b){var E=a.display.dragFunctions,ne=y?Ut:on;ne(a.display.scroller,"dragstart",E.start),ne(a.display.scroller,"dragenter",E.enter),ne(a.display.scroller,"dragover",E.over),ne(a.display.scroller,"dragleave",E.leave),ne(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(ve(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(We(a.display.wrapper,"CodeMirror-wrap"),Ir(a)),Ka(a),Oi(a),Co(a),setTimeout(function(){return No(a)},100)}function Jr(a,y){var x=this;if(!(this instanceof Jr))return new Jr(a,y);this.options=y=y?rn(y):{},rn(Ol,y,!1);var b=y.value;typeof b=="string"?b=new Li(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Jr.inputStyles[y.inputStyle](this),ne=this.display=new ru(a,b,E,y);ne.wrapper.CodeMirror=this,Dl(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ts(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new de,keySeq:null,specialChars:null},y.autofocus&&!He&&ne.input.focus(),xe&&Ce<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Uu(this),wu(),Io(this),this.curOp.forceUpdate=!0,js(this,b),y.autofocus&&!He||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ya(x)},20):Ao(this);for(var ae in Wa)Wa.hasOwnProperty(ae)&&Wa[ae](this,y[ae],Zo);Ns(this),y.finishInit&&y.finishInit(this);for(var ue=0;ue<vs.length;++ue)vs[ue](this);Po(this),ze&&y.lineWrapping&&getComputedStyle(ne.lineDiv).textRendering=="optimizelegibility"&&(ne.lineDiv.style.textRendering="auto")}Jr.defaults=Ol,Jr.optionHandlers=Wa;function Uu(a){var y=a.display;Ut(y.scroller,"mousedown",hi(a,kl)),xe&&Ce<11?Ut(y.scroller,"dblclick",hi(a,function(ce){if(!kt(a,ce)){var he=wo(a,ce);if(!(!he||ms(a,ce)||gi(a.display,ce))){et(ce);var Ne=a.findWordAt(he);Aa(a.doc,Ne.anchor,Ne.head)}}})):Ut(y.scroller,"dblclick",function(ce){return kt(a,ce)||et(ce)}),Ut(y.scroller,"contextmenu",function(ce){return Ml(a,ce)}),Ut(y.input.getField(),"contextmenu",function(ce){y.scroller.contains(ce.target)||Ml(a,ce)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function ne(ce){if(ce.touches.length!=1)return!1;var he=ce.touches[0];return he.radiusX<=1&&he.radiusY<=1}function ae(ce,he){if(he.left==null)return!0;var Ne=he.left-ce.left,Xe=he.top-ce.top;return Ne*Ne+Xe*Xe>20*20}Ut(y.scroller,"touchstart",function(ce){if(!kt(a,ce)&&!ne(ce)&&!ms(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)}}),Ut(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Ut(y.scroller,"touchend",function(ce){var he=y.activeTouch;if(he&&!gi(y,ce)&&he.left!=null&&!he.moved&&new Date-he.start<300){var Ne=a.coordsChar(y.activeTouch,"page"),Xe;!he.prev||ae(he,he.prev)?Xe=new Vr(Ne,Ne):!he.prev.prev||ae(he,he.prev.prev)?Xe=a.findWordAt(Ne):Xe=new Vr(ye(Ne.line,0),Le(a.doc,ye(Ne.line+1,0))),a.setSelection(Xe.anchor,Xe.head),a.focus(),et(ce)}E()}),Ut(y.scroller,"touchcancel",E),Ut(y.scroller,"scroll",function(){y.scroller.clientHeight&&(qo(a,y.scroller.scrollTop),Eo(a,y.scroller.scrollLeft,!0),gn(a,"scroll",a))}),Ut(y.scroller,"mousewheel",function(ce){return zs(a,ce)}),Ut(y.scroller,"DOMMouseScroll",function(ce){return zs(a,ce)}),Ut(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ce){kt(a,ce)||Se(ce)},over:function(ce){kt(a,ce)||(Cu(a,ce),Se(ce))},start:function(ce){return xu(a,ce)},drop:hi(a,bu),leave:function(ce){kt(a,ce)||fl(a)}};var ue=y.input.getField();Ut(ue,"keyup",function(ce){return Sl.call(a,ce)}),Ut(ue,"keydown",hi(a,wl)),Ut(ue,"keypress",hi(a,El)),Ut(ue,"focus",function(ce){return Ya(a,ce)}),Ut(ue,"blur",function(ce){return Ao(a,ce)})}var vs=[];Jr.defineInitHook=function(a){return vs.push(a)};function ga(a,y,x,b){var E=a.doc,ne;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ne=Tn(a,y).state:x="prev");var ae=a.options.tabSize,ue=It(E,y),ce=we(ue.text,null,ae);ue.stateAfter&&(ue.stateAfter=null);var he=ue.text.match(/^\s*/)[0],Ne;if(!b&&!/\S/.test(ue.text))Ne=0,x="not";else if(x=="smart"&&(Ne=E.mode.indent(ne,ue.text.slice(he.length),ue.text),Ne==Et||Ne>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?Ne=we(It(E,y-1).text,null,ae):Ne=0:x=="add"?Ne=ce+a.options.indentUnit:x=="subtract"?Ne=ce-a.options.indentUnit:typeof x=="number"&&(Ne=ce+x),Ne=Math.max(0,Ne);var Xe="",Dt=0;if(a.options.indentWithTabs)for(var Ct=Math.floor(Ne/ae);Ct;--Ct)Dt+=ae,Xe+=" ";if(Dt<Ne&&(Xe+=jt(Ne-Dt)),Xe!=he)return Ho(E,Xe,ye(y,0),ye(y,he.length),"+input"),ue.stateAfter=null,!0;for(var sn=0;sn<E.sel.ranges.length;sn++){var xn=E.sel.ranges[sn];if(xn.head.line==y&&xn.head.ch<he.length){var Rn=ye(y,he.length);us(E,sn,new Vr(Rn,Rn));break}}}var qi=null;function $a(a){qi=a}function gs(a,y,x,b,E){var ne=a.doc;a.display.shift=!1,b||(b=ne.sel);var ae=+new Date-200,ue=E=="paste"||a.state.pasteIncoming>ae,ce=dn(y),he=null;if(ue&&b.ranges.length>1)if(qi&&qi.text.join(`
|
|
|
`)==y){if(b.ranges.length%qi.text.length==0){he=[];for(var Ne=0;Ne<qi.text.length;Ne++)he.push(ne.splitLines(qi.text[Ne]))}}else ce.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=Gt(ce,function(Vn){return[Vn]}));for(var Xe=a.curOp.updateInput,Dt=b.ranges.length-1;Dt>=0;Dt--){var Ct=b.ranges[Dt],sn=Ct.from(),xn=Ct.to();Ct.empty()&&(x&&x>0?sn=ye(sn.line,sn.ch-x):a.state.overwrite&&!ue?xn=ye(xn.line,Math.min(It(ne,xn.line).text.length,xn.ch+it(ce).length)):ue&&qi&&qi.lineWise&&qi.text.join(`
|
|
|
`)==ce.join(`
|
|
|
`)&&(sn=xn=ye(sn.line,0)));var Rn={from:sn,to:xn,text:he?he[Dt%he.length]:ce,origin:E||(ue?"paste":a.state.cutIncoming>ae?"cut":"+input")};zo(a.doc,Rn),Lr(a,"inputRead",a,Rn)}y&&!ue&&Tl(a,y),Bo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Xe),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ll(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Wi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Tl(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 ne=a.getModeAt(E.head),ae=!1;if(ne.electricChars){for(var ue=0;ue<ne.electricChars.length;ue++)if(y.indexOf(ne.electricChars.charAt(ue))>-1){ae=ga(a,E.head.line,"smart");break}}else ne.electricInput&&ne.electricInput.test(It(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ae=ga(a,E.head.line,"smart"));ae&&Lr(a,"electricInput",a,E.head.line)}}}function Al(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ne={anchor:ye(E,0),head:ye(E+1,0)};x.push(ne),y.push(a.getRange(ne.anchor,ne.head))}return{text:y,ranges:x}}function Bl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Nl(){var a=qe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=qe("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ze?a.style.width="1000px":a.setAttribute("wrap","off"),rt&&(a.style.border="1px solid black"),Bl(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 ne=this.options,ae=ne[b];ne[b]==E&&b!="mode"||(ne[b]=E,y.hasOwnProperty(b)&&hi(this,y[b])(this,E,ae),gn(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,ne=0;ne<E.length;++ne)if(E[ne]==b||E[ne].name==b)return E.splice(ne,1),!0},addOverlay:Ii(function(b,E){var ne=b.token?b:a.getMode(this.options,b);if(ne.startState)throw new Error("Overlays may not be stateful.");mt(this.state.overlays,{mode:ne,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Oi(this)}),removeOverlay:Ii(function(b){for(var E=this.state.overlays,ne=0;ne<E.length;++ne){var ae=E[ne].modeSpec;if(ae==b||typeof b=="string"&&ae.name==b){E.splice(ne,1),this.state.modeGen++,Oi(this);return}}}),indentLine:Ii(function(b,E,ne){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),ge(this.doc,b)&&ga(this,b,E,ne)}),indentSelection:Ii(function(b){for(var E=this.doc.sel.ranges,ne=-1,ae=0;ae<E.length;ae++){var ue=E[ae];if(ue.empty())ue.head.line>ne&&(ga(this,ue.head.line,b,!0),ne=ue.head.line,ae==this.doc.sel.primIndex&&Bo(this));else{var ce=ue.from(),he=ue.to(),Ne=Math.max(ne,ce.line);ne=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Xe=Ne;Xe<ne;++Xe)ga(this,Xe,b);var Dt=this.doc.sel.ranges;ce.ch==0&&E.length==Dt.length&&Dt[ae].from().ch>0&&us(this.doc,ae,new Vr(ce,Dt[ae].to()),Be)}}}),getTokenAt:function(b,E){return Fn(this,b,E)},getLineTokens:function(b,E){return Fn(this,ye(b),E,!0)},getTokenTypeAt:function(b){b=Le(this.doc,b);var E=kn(this,It(this.doc,b.line)),ne=0,ae=(E.length-1)/2,ue=b.ch,ce;if(ue==0)ce=E[2];else for(;;){var he=ne+ae>>1;if((he?E[he*2-1]:0)>=ue)ae=he;else if(E[he*2+1]<ue)ne=he+1;else{ce=E[he*2+2];break}}var Ne=ce?ce.indexOf("overlay "):-1;return Ne<0?ce:Ne==0?null:ce.slice(0,Ne-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 ne=[];if(!x.hasOwnProperty(E))return ne;var ae=x[E],ue=this.getModeAt(b);if(typeof ue[E]=="string")ae[ue[E]]&&ne.push(ae[ue[E]]);else if(ue[E])for(var ce=0;ce<ue[E].length;ce++){var he=ae[ue[E][ce]];he&&ne.push(he)}else ue.helperType&&ae[ue.helperType]?ne.push(ae[ue.helperType]):ae[ue.name]&&ne.push(ae[ue.name]);for(var Ne=0;Ne<ae._global.length;Ne++){var Xe=ae._global[Ne];Xe.pred(ue,this)&&Je(ne,Xe.val)==-1&&ne.push(Xe.val)}return ne},getStateAfter:function(b,E){var ne=this.doc;return b=Ze(ne,b==null?ne.first+ne.size-1:b),Tn(this,b+1,E).state},cursorCoords:function(b,E){var ne,ae=this.doc.sel.primary();return b==null?ne=ae.head:typeof b=="object"?ne=Le(this.doc,b):ne=b?ae.from():ae.to(),Di(this,ne,E||"page")},charCoords:function(b,E){return To(this,Le(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),yi(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,_e(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ne){var ae=!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,ae=!0),ue=It(this.doc,b)}else ue=b;return Lo(this,ue,{top:0,left:0},E||"page",ne||ae).top+(ae?this.doc.height-cr(ue):0)},defaultTextHeight:function(){return Hi(this.display)},defaultCharWidth:function(){return Ji(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ne,ae,ue){var ce=this.display;b=Di(this,Le(this.doc,b));var he=b.bottom,Ne=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ce.sizer.appendChild(E),ae=="over")he=b.top;else if(ae=="above"||ae=="near"){var Xe=Math.max(ce.wrapper.clientHeight,this.doc.height),Dt=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(ae=="above"||b.bottom+E.offsetHeight>Xe)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Xe&&(he=b.bottom),Ne+E.offsetWidth>Dt&&(Ne=Dt-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",ue=="right"?(Ne=ce.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ue=="left"?Ne=0:ue=="middle"&&(Ne=(ce.sizer.clientWidth-E.offsetWidth)/2),E.style.left=Ne+"px"),ne&&Zl(this,{left:Ne,top:he,right:Ne+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:Ii(wl),triggerOnKeyPress:Ii(El),triggerOnKeyUp:Sl,triggerOnMouseDown:Ii(kl),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:Ii(function(b){Tl(this,b)}),findPosH:function(b,E,ne,ae){var ue=1;E<0&&(ue=-1,E=-E);for(var ce=Le(this.doc,b),he=0;he<E&&(ce=ys(this.doc,ce,ue,ne,ae),!ce.hitSide);++he);return ce},moveH:Ii(function(b,E){var ne=this;this.extendSelectionsBy(function(ae){return ne.display.shift||ne.doc.extend||ae.empty()?ys(ne.doc,ae.head,b,E,ne.options.rtlMoveVisually):b<0?ae.from():ae.to()},bt)}),deleteH:Ii(function(b,E){var ne=this.doc.sel,ae=this.doc;ne.somethingSelected()?ae.replaceSelection("",null,"+delete"):jo(this,function(ue){var ce=ys(ae,ue.head,b,E,!1);return b<0?{from:ce,to:ue.head}:{from:ue.head,to:ce}})}),findPosV:function(b,E,ne,ae){var ue=1,ce=ae;E<0&&(ue=-1,E=-E);for(var he=Le(this.doc,b),Ne=0;Ne<E;++Ne){var Xe=Di(this,he,"div");if(ce==null?ce=Xe.left:Xe.left=ce,he=Rl(this,Xe,ue,ne),he.hitSide)break}return he},moveV:Ii(function(b,E){var ne=this,ae=this.doc,ue=[],ce=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(Ne){if(ce)return b<0?Ne.from():Ne.to();var Xe=Di(ne,Ne.head,"div");Ne.goalColumn!=null&&(Xe.left=Ne.goalColumn),ue.push(Xe.left);var Dt=Rl(ne,Xe,b,E);return E=="page"&&Ne==ae.sel.primary()&&Qa(ne,To(ne,Dt,"div").top-Xe.top),Dt},bt),ue.length)for(var he=0;he<ae.sel.ranges.length;he++)ae.sel.ranges[he].goalColumn=ue[he]}),findWordAt:function(b){var E=this.doc,ne=It(E,b.line).text,ae=b.ch,ue=b.ch;if(ne){var ce=this.getHelper(b,"wordChars");(b.sticky=="before"||ue==ne.length)&&ae?--ae:++ue;for(var he=ne.charAt(ae),Ne=le(he,ce)?function(Xe){return le(Xe,ce)}:/\s/.test(he)?function(Xe){return/\s/.test(Xe)}:function(Xe){return!/\s/.test(Xe)&&!le(Xe)};ae>0&&Ne(ne.charAt(ae-1));)--ae;for(;ue<ne.length&&Ne(ne.charAt(ue));)++ue}return new Vr(ye(b.line,ae),ye(b.line,ue))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ve(this.display.cursorDiv,"CodeMirror-overwrite"):We(this.display.cursorDiv,"CodeMirror-overwrite"),gn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ht()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ii(function(b,E){Qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Fi(this)-this.display.barHeight,width:b.scrollWidth-Fi(this)-this.display.barWidth,clientHeight:io(this),clientWidth:to(this)}},scrollIntoView:Ii(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:ye(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?Gl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:Ii(function(b,E){var ne=this,ae=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};b!=null&&(this.display.wrapper.style.width=ae(b)),E!=null&&(this.display.wrapper.style.height=ae(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(ne,ue,"widget");break}}++ue}),this.curOp.forceUpdate=!0,gn(this,"refresh",this)}),operation:function(b){return Wi(this,b)},startOperation:function(){return Io(this)},endOperation:function(){return Po(this)},refresh:Ii(function(){var b=this.display.cachedTextHeight;Oi(this),this.curOp.forceUpdate=!0,Co(this),Qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Hi(this.display))>.5||this.options.lineWrapping)&&Ka(this),gn(this,"refresh",this)}),swapDoc:Ii(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),js(this,b),Co(this),this.display.input.reset(),Qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Lr(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}},Me(a),a.registerHelper=function(b,E,ne){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ne},a.registerGlobalHelper=function(b,E,ne,ae){a.registerHelper(b,E,ae),x[b]._global.push({pred:ne,val:ae})}}function ys(a,y,x,b,E){var ne=y,ae=x,ue=It(a,y.line),ce=E&&a.direction=="rtl"?-x:x;function he(){var tr=y.line+ce;return tr<a.first||tr>=a.first+a.size?!1:(y=new ye(tr,y.ch,y.sticky),ue=It(a,tr))}function Ne(tr){var _n;if(b=="codepoint"){var or=ue.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(or)?_n=null:_n=new ye(y.line,Math.max(0,Math.min(ue.text.length,y.ch+x*(or>=55296&&or<56320?2:1))),-x)}else E?_n=Pu(a.cm,ue,y,x):_n=ds(ue,y,x);if(_n==null)if(!tr&&he())y=fs(E,a.cm,ue,y.line,ce);else return!1;else y=_n;return!0}if(b=="char"||b=="codepoint")Ne();else if(b=="column")Ne(!0);else if(b=="word"||b=="group")for(var Xe=null,Dt=b=="group",Ct=a.cm&&a.cm.getHelper(y,"wordChars"),sn=!0;!(x<0&&!Ne(!sn));sn=!1){var xn=ue.text.charAt(y.ch)||`
|
|
|
`,Rn=le(xn,Ct)?"w":Dt&&xn==`
|
|
|
`?"n":!Dt||/\s/.test(xn)?null:"p";if(Dt&&!sn&&!Rn&&(Rn="s"),Xe&&Xe!=Rn){x<0&&(x=1,Ne(),y.sticky="after");break}if(Rn&&(Xe=Rn),x>0&&!Ne(!sn))break}var Vn=Na(a,y,ne,ae,!0);return pe(ne,Vn)&&(Vn.hitSide=!0),Vn}function Rl(a,y,x,b){var E=a.doc,ne=y.left,ae;if(b=="page"){var ue=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(ue-.5*Hi(a.display),3);ae=(x>0?y.bottom:y.top)+x*ce}else b=="line"&&(ae=x>0?y.bottom+3:y.top-3);for(var he;he=yi(a,ne,ae),!!he.outside;){if(x<0?ae<=0:ae>=E.height){he.hitSide=!0;break}ae+=x*5}return he}var _r=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};_r.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Bl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ne(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}Ut(E,"paste",function(ue){!ne(ue)||kt(b,ue)||Ll(ue,b)||Ce<=11&&setTimeout(hi(b,function(){return y.updateFromDOM()}),20)}),Ut(E,"compositionstart",function(ue){y.composing={data:ue.data,done:!1}}),Ut(E,"compositionupdate",function(ue){y.composing||(y.composing={data:ue.data,done:!1})}),Ut(E,"compositionend",function(ue){y.composing&&(ue.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Ut(E,"touchstart",function(){return x.forceCompositionEnd()}),Ut(E,"input",function(){y.composing||y.readFromDOMSoon()});function ae(ue){if(!(!ne(ue)||kt(b,ue))){if(b.somethingSelected())$a({lineWise:!1,text:b.getSelections()}),ue.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ce=Al(b);$a({lineWise:!0,text:ce.text}),ue.type=="cut"&&b.operation(function(){b.setSelections(ce.ranges,0,Be),b.replaceSelection("",null,"cut")})}else return;if(ue.clipboardData){ue.clipboardData.clearData();var he=qi.text.join(`
|
|
|
`);if(ue.clipboardData.setData("Text",he),ue.clipboardData.getData("Text")==he){ue.preventDefault();return}}var Ne=Nl(),Xe=Ne.firstChild;b.display.lineSpace.insertBefore(Ne,b.display.lineSpace.firstChild),Xe.value=qi.text.join(`
|
|
|
`);var Dt=document.activeElement;Ae(Xe),setTimeout(function(){b.display.lineSpace.removeChild(Ne),Dt.focus(),Dt==E&&x.showPrimarySelection()},50)}}Ut(E,"copy",ae),Ut(E,"cut",ae)},_r.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},_r.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},_r.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},_r.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},_r.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 ne=ja(y,a.anchorNode,a.anchorOffset),ae=ja(y,a.focusNode,a.focusOffset);if(!(ne&&!ne.bad&&ae&&!ae.bad&&Oe(tt(ne,ae),b)==0&&Oe(je(ne,ae),E)==0)){var ue=y.display.view,ce=b.line>=y.display.viewFrom&&Fl(y,b)||{node:ue[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Fl(y,E);if(!he){var Ne=ue[ue.length-1].measure,Xe=Ne.maps?Ne.maps[Ne.maps.length-1]:Ne.map;he={node:Xe[Xe.length-1],offset:Xe[Xe.length-2]-Xe[Xe.length-3]}}if(!ce||!he){a.removeAllRanges();return}var Dt=a.rangeCount&&a.getRangeAt(0),Ct;try{Ct=Ve(ce.node,ce.offset,he.offset,he.node)}catch(sn){}Ct&&(!te&&y.state.focused?(a.collapse(ce.node,ce.offset),Ct.collapsed||(a.removeAllRanges(),a.addRange(Ct))):(a.removeAllRanges(),a.addRange(Ct)),Dt&&a.anchorNode==null?a.addRange(Dt):te&&this.startGracePeriod()),this.rememberSelection()}},_r.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)},_r.prototype.showMultipleSelections=function(a){st(this.cm.display.cursorDiv,a.cursors),st(this.cm.display.selectionDiv,a.selection)},_r.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},_r.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return pt(this.div,y)},_r.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},_r.prototype.blur=function(){this.div.blur()},_r.prototype.getField=function(){return this.div},_r.prototype.supportsTouch=function(){return!0},_r.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Wi(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)},_r.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},_r.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Re&&ke&&this.cm.display.gutterSpecs.length&&_u(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=ja(y,a.anchorNode,a.anchorOffset),b=ja(y,a.focusNode,a.focusOffset);x&&b&&Wi(y,function(){wi(y.doc,po(x,b),Be),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},_r.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=ye(b.line-1,It(a.doc,b.line-1).length)),E.ch==It(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=ye(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ne,ae,ue;b.line==y.viewFrom||(ne=So(a,b.line))==0?(ae=De(y.view[0].line),ue=y.view[0].node):(ae=De(y.view[ne].line),ue=y.view[ne-1].node.nextSibling);var ce=So(a,E.line),he,Ne;if(ce==y.view.length-1?(he=y.viewTo-1,Ne=y.lineDiv.lastChild):(he=De(y.view[ce+1].line)-1,Ne=y.view[ce+1].node.previousSibling),!ue)return!1;for(var Xe=a.doc.splitLines(Ku(a,ue,Ne,ae,he)),Dt=Xt(a.doc,ye(ae,0),ye(he,It(a.doc,he).text.length));Xe.length>1&&Dt.length>1;)if(it(Xe)==it(Dt))Xe.pop(),Dt.pop(),he--;else if(Xe[0]==Dt[0])Xe.shift(),Dt.shift(),ae++;else break;for(var Ct=0,sn=0,xn=Xe[0],Rn=Dt[0],Vn=Math.min(xn.length,Rn.length);Ct<Vn&&xn.charCodeAt(Ct)==Rn.charCodeAt(Ct);)++Ct;for(var tr=it(Xe),_n=it(Dt),or=Math.min(tr.length-(Xe.length==1?Ct:0),_n.length-(Dt.length==1?Ct:0));sn<or&&tr.charCodeAt(tr.length-sn-1)==_n.charCodeAt(_n.length-sn-1);)++sn;if(Xe.length==1&&Dt.length==1&&ae==b.line)for(;Ct&&Ct>b.ch&&tr.charCodeAt(tr.length-sn-1)==_n.charCodeAt(_n.length-sn-1);)Ct--,sn++;Xe[Xe.length-1]=tr.slice(0,tr.length-sn).replace(/^\u200b+/,""),Xe[0]=Xe[0].slice(Ct).replace(/\u200b+$/,"");var gr=ye(ae,Ct),hr=ye(he,Dt.length?it(Dt).length-sn:0);if(Xe.length>1||Xe[0]||Oe(gr,hr))return Ho(a.doc,Xe,gr,hr,"+input"),!0},_r.prototype.ensurePolled=function(){this.forceCompositionEnd()},_r.prototype.reset=function(){this.forceCompositionEnd()},_r.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},_r.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))},_r.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return Oi(a.cm)})},_r.prototype.setUneditable=function(a){a.contentEditable="false"},_r.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||hi(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},_r.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},_r.prototype.onContextMenu=function(){},_r.prototype.resetPosition=function(){},_r.prototype.needsContentAttribute=!0;function Fl(a,y){var x=no(a,y.line);if(!x||x.hidden)return null;var b=It(a.doc,y.line),E=Oo(x,b,y.line),ne=Qt(b,a.doc.direction),ae="left";if(ne){var ue=Ft(ne,y.ch);ae=ue%2?"right":"left"}var ce=xa(E.map,y.ch,ae);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function _u(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Go(a,y){return y&&(a.bad=!0),a}function Ku(a,y,x,b,E){var ne="",ae=!1,ue=a.doc.lineSeparator(),ce=!1;function he(Ct){return function(sn){return sn.id==Ct}}function Ne(){ae&&(ne+=ue,ce&&(ne+=ue),ae=ce=!1)}function Xe(Ct){Ct&&(Ne(),ne+=Ct)}function Dt(Ct){if(Ct.nodeType==1){var sn=Ct.getAttribute("cm-text");if(sn){Xe(sn);return}var xn=Ct.getAttribute("cm-marker"),Rn;if(xn){var Vn=a.findMarks(ye(b,0),ye(E+1,0),he(+xn));Vn.length&&(Rn=Vn[0].find(0))&&Xe(Xt(a.doc,Rn.from,Rn.to).join(ue));return}if(Ct.getAttribute("contenteditable")=="false")return;var tr=/^(pre|div|p|li|table|br)$/i.test(Ct.nodeName);if(!/^br$/i.test(Ct.nodeName)&&Ct.textContent.length==0)return;tr&&Ne();for(var _n=0;_n<Ct.childNodes.length;_n++)Dt(Ct.childNodes[_n]);/^(pre|p)$/i.test(Ct.nodeName)&&(ce=!0),tr&&(ae=!0)}else Ct.nodeType==3&&Xe(Ct.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Dt(y),y!=x;)y=y.nextSibling,ce=!1;return ne}function ja(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(ye(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 ne=a.display.view[E];if(ne.node==b)return Xu(ne,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!pt(b,y))return Go(ye(De(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ne=a.rest?it(a.rest):a.line;return Go(ye(De(ne),ne.text.length),E)}var ae=y.nodeType==3?y:null,ue=y;for(!ae&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ae=y.firstChild,x&&(x=ae.nodeValue.length));ue.parentNode!=b;)ue=ue.parentNode;var ce=a.measure,he=ce.maps;function Ne(Rn,Vn,tr){for(var _n=-1;_n<(he?he.length:0);_n++)for(var or=_n<0?ce.map:he[_n],gr=0;gr<or.length;gr+=3){var hr=or[gr+2];if(hr==Rn||hr==Vn){var Tr=De(_n<0?a.line:a.rest[_n]),Yr=or[gr]+tr;return(tr<0||hr!=Rn)&&(Yr=or[gr+(tr?1:0)]),ye(Tr,Yr)}}}var Xe=Ne(ae,ue,x);if(Xe)return Go(Xe,E);for(var Dt=ue.nextSibling,Ct=ae?ae.nodeValue.length-x:0;Dt;Dt=Dt.nextSibling){if(Xe=Ne(Dt,Dt.firstChild,0),Xe)return Go(ye(Xe.line,Xe.ch-Ct),E);Ct+=Dt.textContent.length}for(var sn=ue.previousSibling,xn=x;sn;sn=sn.previousSibling){if(Xe=Ne(sn,sn.firstChild,-1),Xe)return Go(ye(Xe.line,Xe.ch+xn),E);xn+=sn.textContent.length}}var oi=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};oi.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),rt&&(E.style.width="0px"),Ut(E,"input",function(){xe&&Ce>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Ut(E,"paste",function(ae){kt(b,ae)||Ll(ae,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ne(ae){if(!kt(b,ae)){if(b.somethingSelected())$a({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ue=Al(b);$a({lineWise:!0,text:ue.text}),ae.type=="cut"?b.setSelections(ue.ranges,null,Be):(x.prevInput="",E.value=ue.text.join(`
|
|
|
`),Ae(E))}else return;ae.type=="cut"&&(b.state.cutIncoming=+new Date)}}Ut(E,"cut",ne),Ut(E,"copy",ne),Ut(a.scroller,"paste",function(ae){if(!(gi(a,ae)||kt(b,ae))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ue=new Event("paste");ue.clipboardData=ae.clipboardData,E.dispatchEvent(ue)}}),Ut(a.lineSpace,"selectstart",function(ae){gi(a,ae)||et(ae)}),Ut(E,"compositionstart",function(){var ae=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:ae,range:b.markText(ae,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Ut(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},oi.prototype.createField=function(a){this.wrapper=Nl(),this.textarea=this.wrapper.firstChild},oi.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},oi.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=Di(a,x.sel.primary().head,"div"),ne=y.wrapper.getBoundingClientRect(),ae=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ae.top-ne.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ae.left-ne.left))}return b},oi.prototype.showSelection=function(a){var y=this.cm,x=y.display;st(x.cursorDiv,a.cursors),st(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},oi.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&&Ae(this.textarea),xe&&Ce>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",xe&&Ce>=9&&(this.hasSelection=null))}},oi.prototype.getField=function(){return this.textarea},oi.prototype.supportsTouch=function(){return!1},oi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!He||ht()!=this.textarea))try{this.textarea.focus()}catch(a){}},oi.prototype.blur=function(){this.textarea.blur()},oi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},oi.prototype.receivedFocus=function(){this.slowPoll()},oi.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},oi.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)},oi.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Cn(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(xe&&Ce>=9&&this.hasSelection===E||Ie&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ne=E.charCodeAt(0);if(ne==8203&&!b&&(b="\u200B"),ne==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,ue=Math.min(b.length,E.length);ae<ue&&b.charCodeAt(ae)==E.charCodeAt(ae);)++ae;return Wi(y,function(){gs(y,E.slice(ae),b.length-ae,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},oi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},oi.prototype.onKeyPress=function(){xe&&Ce>=9&&(this.hasSelection=null),this.fastPoll()},oi.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ne=wo(x,a),ae=b.scroller.scrollTop;if(!ne||fe)return;var ue=x.options.resetSelectionOnContextMenu;ue&&x.doc.sel.contains(ne)==-1&&hi(x,wi)(x.doc,po(ne),Be);var ce=E.style.cssText,he=y.wrapper.style.cssText,Ne=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(a.clientY-Ne.top-5)+"px; left: "+(a.clientX-Ne.left-5)+`px;
|
|
|
z-index: 1000; background: `+(xe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Xe;ze&&(Xe=window.scrollY),b.input.focus(),ze&&window.scrollTo(null,Xe),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Ct,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Dt(){if(E.selectionStart!=null){var xn=x.somethingSelected(),Rn="\u200B"+(xn?E.value:"");E.value="\u21DA",E.value=Rn,y.prevInput=xn?"":"\u200B",E.selectionStart=1,E.selectionEnd=Rn.length,b.selForContextMenu=x.doc.sel}}function Ct(){if(y.contextMenuPending==Ct&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=ce,xe&&Ce<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=ae),E.selectionStart!=null)){(!xe||xe&&Ce<9)&&Dt();var xn=0,Rn=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?hi(x,tl)(x):xn++<10?b.detectingSelectAll=setTimeout(Rn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Rn,200)}}if(xe&&Ce>=9&&Dt(),nt){Se(a);var sn=function(){on(window,"mouseup",sn),setTimeout(Ct,20)};Ut(window,"mouseup",sn)}else setTimeout(Ct,50)},oi.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},oi.prototype.setUneditable=function(){},oi.prototype.needsContentAttribute=!1;function Yu(a,y){if(y=y?rn(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=ht();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ue.getValue()}var E;if(a.form&&(Ut(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ne=a.form;E=ne.submit;try{var ae=ne.submit=function(){b(),ne.submit=E,ne.submit(),ne.submit=ae}}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&&(on(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ue=Jr(function(ce){return a.parentNode.insertBefore(ce,a.nextSibling)},y);return ue}function Ju(a){a.off=on,a.on=Ut,a.wheelEventPixels=iu,a.Doc=Li,a.splitLines=dn,a.countColumn=we,a.findColumn=tn,a.isWordChar=oe,a.Pass=Et,a.signal=gn,a.Line=Rr,a.changeEnd=mo,a.scrollbarModel=Ls,a.Pos=ye,a.cmpPos=Oe,a.modes=hn,a.mimeModes=qt,a.resolveMode=Ln,a.getMode=Gn,a.modeExtensions=jn,a.extendMode=Bn,a.copyState=Xn,a.startState=ar,a.innerMode=Nn,a.commands=ha,a.keyMap=ao,a.keyName=gl,a.isModifierKey=ml,a.lookupKey=$o,a.normalizeKeyMap=Iu,a.StringStream=qn,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=et,a.e_stopPropagation=Lt,a.e_stop=Se,a.addClass=ve,a.contains=pt,a.rmClass=We,a.keyNames=yo}ju(Jr),Vu(Jr);var Qu="iter insert remove copy getEditor constructor".split(" ");for(var Za in Li.prototype)Li.prototype.hasOwnProperty(Za)&&Je(Qu,Za)<0&&(Jr.prototype[Za]=function(a){return function(){return a.apply(this.doc,arguments)}}(Li.prototype[Za]));return Me(Li),Jr.inputStyles={textarea:oi,contenteditable:_r},Jr.defineMode=function(a){!Jr.defaults.mode&&a!="null"&&(Jr.defaults.mode=a),Pn.apply(this,arguments)},Jr.defineMIME=pn,Jr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Jr.defineMIME("text/plain","null"),Jr.defineExtension=function(a,y){Jr.prototype[a]=y},Jr.defineDocExtension=function(a,y){Li.prototype[a]=y},Jr.fromTextArea=Yu,Ju(Jr),Jr.version="5.58.2",Jr})},25419:function(en,Ht,ie){(function(te){te(ie(89780),ie(15525),ie(98101))})(function(te){"use strict";te.defineMode("markdown",function(ot,me){var Ge=te.getMode(ot,"text/html"),xe=Ge.name=="null";function Ce(we){if(te.findModeByName){var de=te.findModeByName(we);de&&(we=de.mime||de.mimes[0])}var Je=te.getMode(ot,we);return Je.name=="null"?null:Je}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 ze={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 Ke in ze)ze.hasOwnProperty(Ke)&&me.tokenTypeOverrides[Ke]&&(ze[Ke]=me.tokenTypeOverrides[Ke]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Qe=/^\[(x| )\](?=\s)/i,be=me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,xt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,rt=/^[^#!\[\]*_\\<>` "'(~:]+/,Re=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,He=/^\s*\[[^\]]+?\]:.*$/,Ie=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ut=" ";function gt(we,de,Je){return de.f=de.inline=Je,Je(we,de)}function yt(we,de,Je){return de.f=de.block=Je,Je(we,de)}function ft(we){return!we||!/\S/.test(we.string)}function nt(we){if(we.linkTitle=!1,we.linkHref=!1,we.linkText=!1,we.em=!1,we.strong=!1,we.strikethrough=!1,we.quote=0,we.indentedCode=!1,we.f==We){var de=xe;if(!de){var Je=te.innerMode(Ge,we.htmlState);de=Je.mode.name=="xml"&&Je.state.tagStart===null&&!Je.state.context&&Je.state.tokenize.isInText}de&&(we.f=Mt,we.block=vt,we.htmlState=null)}return we.trailingSpace=0,we.trailingSpaceNewLine=!1,we.prevLine=we.thisLine,we.thisLine={stream:null},null}function vt(we,de){var Je=we.column()===de.indentation,wt=ft(de.prevLine.stream),Et=de.indentedCode,Be=de.prevLine.hr,dt=de.list!==!1,bt=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var tn=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,dt)){for(de.list=null;tn<de.listStack[de.listStack.length-1];)de.listStack.pop(),de.listStack.length?de.indentation=de.listStack[de.listStack.length-1]:de.list=!1;de.list!==!1&&(de.indentationDiff=tn-de.listStack[de.listStack.length-1])}var Ot=!wt&&!Be&&!de.prevLine.header&&(!dt||!Et)&&!de.prevLine.fencedCodeEnd,jt=(de.list===!1||Be||wt)&&de.indentation<=bt&&we.match(ke),it=null;if(de.indentationDiff>=4&&(Et||de.prevLine.fencedCodeEnd||de.prevLine.header||wt))return we.skipToEnd(),de.indentedCode=!0,ze.code;if(we.eatSpace())return null;if(Je&&de.indentation<=bt&&(it=we.match(be))&&it[1].length<=6)return de.quote=0,de.header=it[1].length,de.thisLine.header=!0,me.highlightFormatting&&(de.formatting="header"),de.f=de.inline,st(de);if(de.indentation<=bt&&we.eat(">"))return de.quote=Je?1:de.quote+1,me.highlightFormatting&&(de.formatting="quote"),we.eatSpace(),st(de);if(!jt&&!de.setext&&Je&&de.indentation<=bt&&(it=we.match(fe))){var Gt=it[1]?"ol":"ul";return de.indentation=tn+we.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,me.taskLists&&we.match(Qe,!1)&&(de.taskList=!0),de.f=de.inline,me.highlightFormatting&&(de.formatting=["list","list-"+Gt]),st(de)}else{if(Je&&de.indentation<=bt&&(it=we.match(Re,!0)))return de.quote=0,de.fencedEndRE=new RegExp(it[1]+"+ *$"),de.localMode=me.fencedCodeBlockHighlighting&&Ce(it[2]||me.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=te.startState(de.localMode)),de.f=de.block=At,me.highlightFormatting&&(de.formatting="code-block"),de.code=-1,st(de);if(de.setext||(!Ot||!dt)&&!de.quote&&de.list===!1&&!de.code&&!jt&&!He.test(we.string)&&(it=we.lookAhead(1))&&(it=it.match(xt)))return de.setext?(de.header=de.setext,de.setext=0,we.skipToEnd(),me.highlightFormatting&&(de.formatting="header")):(de.header=it[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,st(de);if(jt)return we.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,ze.hr;if(we.peek()==="[")return gt(we,de,Bt)}return gt(we,de,de.inline)}function We(we,de){var Je=Ge.token(we,de.htmlState);if(!xe){var wt=te.innerMode(Ge,de.htmlState);(wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText||de.md_inside&&we.current().indexOf(">")>-1)&&(de.f=Mt,de.block=vt,de.htmlState=null)}return Je}function At(we,de){var Je=de.listStack[de.listStack.length-1]||0,wt=de.indentation<Je,Et=Je+3;if(de.fencedEndRE&&de.indentation<=Et&&(wt||we.match(de.fencedEndRE))){me.highlightFormatting&&(de.formatting="code-block");var Be;return wt||(Be=st(de)),de.localMode=de.localState=null,de.block=vt,de.f=Mt,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,wt?yt(we,de,de.block):Be}else return de.localMode?de.localMode.token(we,de.localState):(we.skipToEnd(),ze.code)}function st(we){var de=[];if(we.formatting){de.push(ze.formatting),typeof we.formatting=="string"&&(we.formatting=[we.formatting]);for(var Je=0;Je<we.formatting.length;Je++)de.push(ze.formatting+"-"+we.formatting[Je]),we.formatting[Je]==="header"&&de.push(ze.formatting+"-"+we.formatting[Je]+"-"+we.header),we.formatting[Je]==="quote"&&(!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=we.quote?de.push(ze.formatting+"-"+we.formatting[Je]+"-"+we.quote):de.push("error"))}if(we.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(we.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(we.linkHref?de.push(ze.linkHref,"url"):(we.strong&&de.push(ze.strong),we.em&&de.push(ze.em),we.strikethrough&&de.push(ze.strikethrough),we.emoji&&de.push(ze.emoji),we.linkText&&de.push(ze.linkText),we.code&&de.push(ze.code),we.image&&de.push(ze.image),we.imageAltText&&de.push(ze.imageAltText,"link"),we.imageMarker&&de.push(ze.imageMarker)),we.header&&de.push(ze.header,ze.header+"-"+we.header),we.quote&&(de.push(ze.quote),!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=we.quote?de.push(ze.quote+"-"+we.quote):de.push(ze.quote+"-"+me.maxBlockquoteDepth)),we.list!==!1){var wt=(we.listStack.length-1)%3;wt?wt===1?de.push(ze.list2):de.push(ze.list3):de.push(ze.list1)}return we.trailingSpaceNewLine?de.push("trailing-space-new-line"):we.trailingSpace&&de.push("trailing-space-"+(we.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function qe(we,de){if(we.match(rt,!0))return st(de)}function Mt(we,de){var Je=de.text(we,de);if(typeof Je!="undefined")return Je;if(de.list)return de.list=null,st(de);if(de.taskList){var wt=we.match(Qe,!0)[1]===" ";return wt?de.taskOpen=!0:de.taskClosed=!0,me.highlightFormatting&&(de.formatting="task"),de.taskList=!1,st(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&we.match(/^#+$/,!0))return me.highlightFormatting&&(de.formatting="header"),st(de);var Et=we.next();if(de.linkTitle){de.linkTitle=!1;var Be=Et;Et==="("&&(Be=")"),Be=(Be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var dt="^\\s*(?:[^"+Be+"\\\\]+|\\\\\\\\|\\\\.)"+Be;if(we.match(new RegExp(dt),!0))return ze.linkHref}if(Et==="`"){var bt=de.formatting;me.highlightFormatting&&(de.formatting="code"),we.eatWhile("`");var tn=we.current().length;if(de.code==0&&(!de.quote||tn==1))return de.code=tn,st(de);if(tn==de.code){var Ot=st(de);return de.code=0,Ot}else return de.formatting=bt,st(de)}else if(de.code)return st(de);if(Et==="\\"&&(we.next(),me.highlightFormatting)){var jt=st(de),it=ze.formatting+"-escape";return jt?jt+" "+it:it}if(Et==="!"&&we.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,me.highlightFormatting&&(de.formatting="image"),st(de);if(Et==="["&&de.imageMarker&&we.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,me.highlightFormatting&&(de.formatting="image"),st(de);if(Et==="]"&&de.imageAltText){me.highlightFormatting&&(de.formatting="image");var jt=st(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=pt,jt}if(Et==="["&&!de.image)return de.linkText&&we.match(/^.*?\]/)||(de.linkText=!0,me.highlightFormatting&&(de.formatting="link")),st(de);if(Et==="]"&&de.linkText){me.highlightFormatting&&(de.formatting="link");var jt=st(de);return de.linkText=!1,de.inline=de.f=we.match(/\(.*?\)| ?\[.*?\]/,!1)?pt:Mt,jt}if(Et==="<"&&we.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Ve,me.highlightFormatting&&(de.formatting="link");var jt=st(de);return jt?jt+=" ":jt="",jt+ze.linkInline}if(Et==="<"&&we.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Ve,me.highlightFormatting&&(de.formatting="link");var jt=st(de);return jt?jt+=" ":jt="",jt+ze.linkEmail}if(me.xml&&Et==="<"&&we.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Gt=we.string.indexOf(">",we.pos);if(Gt!=-1){var mt=we.string.substring(we.start,Gt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(mt)&&(de.md_inside=!0)}return we.backUp(1),de.htmlState=te.startState(Ge),yt(we,de,We)}if(me.xml&&Et==="<"&&we.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(Et==="*"||Et==="_"){for(var se=1,ee=we.pos==1?" ":we.string.charAt(we.pos-2);se<3&&we.eat(Et);)se++;var z=we.peek()||" ",oe=!/\s/.test(z)&&(!Ie.test(z)||/\s/.test(ee)||Ie.test(ee)),le=!/\s/.test(ee)&&(!Ie.test(ee)||/\s/.test(z)||Ie.test(z)),re=null,Ee=null;if(se%2&&(!de.em&&oe&&(Et==="*"||!le||Ie.test(ee))?re=!0:de.em==Et&&le&&(Et==="*"||!oe||Ie.test(z))&&(re=!1)),se>1&&(!de.strong&&oe&&(Et==="*"||!le||Ie.test(ee))?Ee=!0:de.strong==Et&&le&&(Et==="*"||!oe||Ie.test(z))&&(Ee=!1)),Ee!=null||re!=null){me.highlightFormatting&&(de.formatting=re==null?"strong":Ee==null?"em":"strong em"),re===!0&&(de.em=Et),Ee===!0&&(de.strong=Et);var Ot=st(de);return re===!1&&(de.em=!1),Ee===!1&&(de.strong=!1),Ot}}else if(Et===" "&&(we.eat("*")||we.eat("_"))){if(we.peek()===" ")return st(de);we.backUp(1)}if(me.strikethrough){if(Et==="~"&&we.eatWhile(Et)){if(de.strikethrough){me.highlightFormatting&&(de.formatting="strikethrough");var Ot=st(de);return de.strikethrough=!1,Ot}else if(we.match(/^[^\s]/,!1))return de.strikethrough=!0,me.highlightFormatting&&(de.formatting="strikethrough"),st(de)}else if(Et===" "&&we.match(/^~~/,!0)){if(we.peek()===" ")return st(de);we.backUp(2)}}if(me.emoji&&Et===":"&&we.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,me.highlightFormatting&&(de.formatting="emoji");var at=st(de);return de.emoji=!1,at}return Et===" "&&(we.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),st(de)}function Ve(we,de){var Je=we.next();if(Je===">"){de.f=de.inline=Mt,me.highlightFormatting&&(de.formatting="link");var wt=st(de);return wt?wt+=" ":wt="",wt+ze.linkInline}return we.match(/^[^>]+/,!0),ze.linkInline}function pt(we,de){if(we.eatSpace())return null;var Je=we.next();return Je==="("||Je==="["?(de.f=de.inline=ve(Je==="("?")":"]"),me.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,st(de)):"error"}var ht={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ve(we){return function(de,Je){var wt=de.next();if(wt===we){Je.f=Je.inline=Mt,me.highlightFormatting&&(Je.formatting="link-string");var Et=st(Je);return Je.linkHref=!1,Et}return de.match(ht[we]),Je.linkHref=!0,st(Je)}}function Bt(we,de){return we.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=Ae,we.next(),me.highlightFormatting&&(de.formatting="link"),de.linkText=!0,st(de)):gt(we,de,Mt)}function Ae(we,de){if(we.match(/^\]:/,!0)){de.f=de.inline=Nt,me.highlightFormatting&&(de.formatting="link");var Je=st(de);return de.linkText=!1,Je}return we.match(/^([^\]\\]|\\.)+/,!0),ze.linkText}function Nt(we,de){return we.eatSpace()?null:(we.match(/^[^\s]+/,!0),we.peek()===void 0?de.linkTitle=!0:we.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=Mt,ze.linkHref+" url")}var rn={startState:function(){return{f:vt,prevLine:{stream:null},thisLine:{stream:null},block:vt,htmlState:null,indentation:0,inline:Mt,text:qe,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(we){return{f:we.f,prevLine:we.prevLine,thisLine:we.thisLine,block:we.block,htmlState:we.htmlState&&te.copyState(Ge,we.htmlState),indentation:we.indentation,localMode:we.localMode,localState:we.localMode?te.copyState(we.localMode,we.localState):null,inline:we.inline,text:we.text,formatting:!1,linkText:we.linkText,linkTitle:we.linkTitle,linkHref:we.linkHref,code:we.code,em:we.em,strong:we.strong,strikethrough:we.strikethrough,emoji:we.emoji,header:we.header,setext:we.setext,hr:we.hr,taskList:we.taskList,list:we.list,listStack:we.listStack.slice(0),quote:we.quote,indentedCode:we.indentedCode,trailingSpace:we.trailingSpace,trailingSpaceNewLine:we.trailingSpaceNewLine,md_inside:we.md_inside,fencedEndRE:we.fencedEndRE}},token:function(we,de){if(de.formatting=!1,we!=de.thisLine.stream){if(de.header=0,de.hr=!1,we.match(/^\s*$/,!0))return nt(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:we},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=We)){var Je=we.match(/^\s*/,!0)[0].replace(/\t/g,ut).length;if(de.indentation=Je,de.indentationDiff=null,Je>0)return null}}return de.f(we,de)},innerMode:function(we){return we.block==We?{state:we.htmlState,mode:Ge}:we.localState?{state:we.localState,mode:we.localMode}:{state:we,mode:rn}},indent:function(we,de,Je){return we.block==We&&Ge.indent?Ge.indent(we.htmlState,de,Je):we.localState&&we.localMode.indent?we.localMode.indent(we.localState,de,Je):te.Pass},blankLine:nt,getType:st,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return rn},"xml"),te.defineMIME("text/markdown","markdown"),te.defineMIME("text/x-markdown","markdown")})},98101:function(en,Ht,ie){(function(te){te(ie(89780))})(function(te){"use strict";te.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 ot=0;ot<te.modeInfo.length;ot++){var me=te.modeInfo[ot];me.mimes&&(me.mime=me.mimes[0])}te.findModeByMIME=function(Ge){Ge=Ge.toLowerCase();for(var xe=0;xe<te.modeInfo.length;xe++){var Ce=te.modeInfo[xe];if(Ce.mime==Ge)return Ce;if(Ce.mimes){for(var ze=0;ze<Ce.mimes.length;ze++)if(Ce.mimes[ze]==Ge)return Ce}}if(/\+xml$/.test(Ge))return te.findModeByMIME("application/xml");if(/\+json$/.test(Ge))return te.findModeByMIME("application/json")},te.findModeByExtension=function(Ge){Ge=Ge.toLowerCase();for(var xe=0;xe<te.modeInfo.length;xe++){var Ce=te.modeInfo[xe];if(Ce.ext){for(var ze=0;ze<Ce.ext.length;ze++)if(Ce.ext[ze]==Ge)return Ce}}},te.findModeByFileName=function(Ge){for(var xe=0;xe<te.modeInfo.length;xe++){var Ce=te.modeInfo[xe];if(Ce.file&&Ce.file.test(Ge))return Ce}var ze=Ge.lastIndexOf("."),Ke=ze>-1&&Ge.substring(ze+1,Ge.length);if(Ke)return te.findModeByExtension(Ke)},te.findModeByName=function(Ge){Ge=Ge.toLowerCase();for(var xe=0;xe<te.modeInfo.length;xe++){var Ce=te.modeInfo[xe];if(Ce.name.toLowerCase()==Ge)return Ce;if(Ce.alias){for(var ze=0;ze<Ce.alias.length;ze++)if(Ce.alias[ze].toLowerCase()==Ge)return Ce}}}})},67549:function(en,Ht,ie){(function(te){te(ie(89780))})(function(te){"use strict";te.defineMode("stex",function(ot,me){"use strict";function Ge(rt,Re){rt.cmdState.push(Re)}function xe(rt){return rt.cmdState.length>0?rt.cmdState[rt.cmdState.length-1]:null}function Ce(rt){var Re=rt.cmdState.pop();Re&&Re.closeBracket()}function ze(rt){for(var Re=rt.cmdState,He=Re.length-1;He>=0;He--){var Ie=Re[He];if(Ie.name!="DEFAULT")return Ie}return{styleIdentifier:function(){return null}}}function Ke(rt,Re,He){return function(){this.name=rt,this.bracketNo=0,this.style=Re,this.styles=He,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ke={};ke.importmodule=Ke("importmodule","tag",["string","builtin"]),ke.documentclass=Ke("documentclass","tag",["","atom"]),ke.usepackage=Ke("usepackage","tag",["atom"]),ke.begin=Ke("begin","tag",["atom"]),ke.end=Ke("end","tag",["atom"]),ke.label=Ke("label","tag",["atom"]),ke.ref=Ke("ref","tag",["atom"]),ke.eqref=Ke("eqref","tag",["atom"]),ke.cite=Ke("cite","tag",["atom"]),ke.bibitem=Ke("bibitem","tag",["atom"]),ke.Bibitem=Ke("Bibitem","tag",["atom"]),ke.RBibitem=Ke("RBibitem","tag",["atom"]),ke.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(rt,Re){rt.f=Re}function Qe(rt,Re){var He;if(rt.match(/^\\[a-zA-Z@]+/)){var Ie=rt.current().slice(1);return He=ke.hasOwnProperty(Ie)?ke[Ie]:ke.DEFAULT,He=new He,Ge(Re,He),fe(Re,xt),He.style}if(rt.match(/^\\[$&%#{}_]/)||rt.match(/^\\[,;!\/\\]/))return"tag";if(rt.match("\\["))return fe(Re,function(gt,yt){return be(gt,yt,"\\]")}),"keyword";if(rt.match("\\("))return fe(Re,function(gt,yt){return be(gt,yt,"\\)")}),"keyword";if(rt.match("$$"))return fe(Re,function(gt,yt){return be(gt,yt,"$$")}),"keyword";if(rt.match("$"))return fe(Re,function(gt,yt){return be(gt,yt,"$")}),"keyword";var ut=rt.next();if(ut=="%")return rt.skipToEnd(),"comment";if(ut=="}"||ut=="]"){if(He=xe(Re),He)He.closeBracket(ut),fe(Re,xt);else return"error";return"bracket"}else return ut=="{"||ut=="["?(He=ke.DEFAULT,He=new He,Ge(Re,He),"bracket"):/\d/.test(ut)?(rt.eatWhile(/[\w.%]/),"atom"):(rt.eatWhile(/[\w\-_]/),He=ze(Re),He.name=="begin"&&(He.argument=rt.current()),He.styleIdentifier())}function be(rt,Re,He){if(rt.eatSpace())return null;if(He&&rt.match(He))return fe(Re,Qe),"keyword";if(rt.match(/^\\[a-zA-Z@]+/))return"tag";if(rt.match(/^[a-zA-Z]+/))return"variable-2";if(rt.match(/^\\[$&%#{}_]/)||rt.match(/^\\[,;!\/]/)||rt.match(/^[\^_&]/))return"tag";if(rt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(rt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ie=rt.next();return Ie=="{"||Ie=="}"||Ie=="["||Ie=="]"||Ie=="("||Ie==")"?"bracket":Ie=="%"?(rt.skipToEnd(),"comment"):"error"}function xt(rt,Re){var He=rt.peek(),Ie;return He=="{"||He=="["?(Ie=xe(Re),Ie.openBracket(He),rt.eat(He),fe(Re,Qe),"bracket"):/[ \t\r]/.test(He)?(rt.eat(He),null):(fe(Re,Qe),Ce(Re),Qe(rt,Re))}return{startState:function(){var rt=me.inMathMode?function(Re,He){return be(Re,He)}:Qe;return{cmdState:[],f:rt}},copyState:function(rt){return{cmdState:rt.cmdState.slice(),f:rt.f}},token:function(rt,Re){return Re.f(rt,Re)},blankLine:function(rt){rt.f=Qe,rt.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},15525:function(en,Ht,ie){(function(te){te(ie(89780))})(function(te){"use strict";var ot={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};te.defineMode("xml",function(Ge,xe){var Ce=Ge.indentUnit,ze={},Ke=xe.htmlMode?ot:me;for(var ke in Ke)ze[ke]=Ke[ke];for(var ke in xe)ze[ke]=xe[ke];var fe,Qe;function be(Ve,pt){function ht(Ae){return pt.tokenize=Ae,Ae(Ve,pt)}var ve=Ve.next();if(ve=="<")return Ve.eat("!")?Ve.eat("[")?Ve.match("CDATA[")?ht(Re("atom","]]>")):null:Ve.match("--")?ht(Re("comment","-->")):Ve.match("DOCTYPE",!0,!0)?(Ve.eatWhile(/[\w\._\-]/),ht(He(1))):null:Ve.eat("?")?(Ve.eatWhile(/[\w\._\-]/),pt.tokenize=Re("meta","?>"),"meta"):(fe=Ve.eat("/")?"closeTag":"openTag",pt.tokenize=xt,"tag bracket");if(ve=="&"){var Bt;return Ve.eat("#")?Ve.eat("x")?Bt=Ve.eatWhile(/[a-fA-F\d]/)&&Ve.eat(";"):Bt=Ve.eatWhile(/[\d]/)&&Ve.eat(";"):Bt=Ve.eatWhile(/[\w\.\-:]/)&&Ve.eat(";"),Bt?"atom":"error"}else return Ve.eatWhile(/[^&<]/),null}be.isInText=!0;function xt(Ve,pt){var ht=Ve.next();if(ht==">"||ht=="/"&&Ve.eat(">"))return pt.tokenize=be,fe=ht==">"?"endTag":"selfcloseTag","tag bracket";if(ht=="=")return fe="equals",null;if(ht=="<"){pt.tokenize=be,pt.state=yt,pt.tagName=pt.tagStart=null;var ve=pt.tokenize(Ve,pt);return ve?ve+" tag error":"tag error"}else return/[\'\"]/.test(ht)?(pt.tokenize=rt(ht),pt.stringStartCol=Ve.column(),pt.tokenize(Ve,pt)):(Ve.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function rt(Ve){var pt=function(ht,ve){for(;!ht.eol();)if(ht.next()==Ve){ve.tokenize=xt;break}return"string"};return pt.isInAttribute=!0,pt}function Re(Ve,pt){return function(ht,ve){for(;!ht.eol();){if(ht.match(pt)){ve.tokenize=be;break}ht.next()}return Ve}}function He(Ve){return function(pt,ht){for(var ve;(ve=pt.next())!=null;){if(ve=="<")return ht.tokenize=He(Ve+1),ht.tokenize(pt,ht);if(ve==">")if(Ve==1){ht.tokenize=be;break}else return ht.tokenize=He(Ve-1),ht.tokenize(pt,ht)}return"meta"}}function Ie(Ve,pt,ht){this.prev=Ve.context,this.tagName=pt,this.indent=Ve.indented,this.startOfLine=ht,(ze.doNotIndent.hasOwnProperty(pt)||Ve.context&&Ve.context.noIndent)&&(this.noIndent=!0)}function ut(Ve){Ve.context&&(Ve.context=Ve.context.prev)}function gt(Ve,pt){for(var ht;;){if(!Ve.context||(ht=Ve.context.tagName,!ze.contextGrabbers.hasOwnProperty(ht)||!ze.contextGrabbers[ht].hasOwnProperty(pt)))return;ut(Ve)}}function yt(Ve,pt,ht){return Ve=="openTag"?(ht.tagStart=pt.column(),ft):Ve=="closeTag"?nt:yt}function ft(Ve,pt,ht){return Ve=="word"?(ht.tagName=pt.current(),Qe="tag",At):ze.allowMissingTagName&&Ve=="endTag"?(Qe="tag bracket",At(Ve,pt,ht)):(Qe="error",ft)}function nt(Ve,pt,ht){if(Ve=="word"){var ve=pt.current();return ht.context&&ht.context.tagName!=ve&&ze.implicitlyClosed.hasOwnProperty(ht.context.tagName)&&ut(ht),ht.context&&ht.context.tagName==ve||ze.matchClosing===!1?(Qe="tag",vt):(Qe="tag error",We)}else return ze.allowMissingTagName&&Ve=="endTag"?(Qe="tag bracket",vt(Ve,pt,ht)):(Qe="error",We)}function vt(Ve,pt,ht){return Ve!="endTag"?(Qe="error",vt):(ut(ht),yt)}function We(Ve,pt,ht){return Qe="error",vt(Ve,pt,ht)}function At(Ve,pt,ht){if(Ve=="word")return Qe="attribute",st;if(Ve=="endTag"||Ve=="selfcloseTag"){var ve=ht.tagName,Bt=ht.tagStart;return ht.tagName=ht.tagStart=null,Ve=="selfcloseTag"||ze.autoSelfClosers.hasOwnProperty(ve)?gt(ht,ve):(gt(ht,ve),ht.context=new Ie(ht,ve,Bt==ht.indented)),yt}return Qe="error",At}function st(Ve,pt,ht){return Ve=="equals"?qe:(ze.allowMissing||(Qe="error"),At(Ve,pt,ht))}function qe(Ve,pt,ht){return Ve=="string"?Mt:Ve=="word"&&ze.allowUnquoted?(Qe="string",At):(Qe="error",At(Ve,pt,ht))}function Mt(Ve,pt,ht){return Ve=="string"?Mt:At(Ve,pt,ht)}return{startState:function(Ve){var pt={tokenize:be,state:yt,indented:Ve||0,tagName:null,tagStart:null,context:null};return Ve!=null&&(pt.baseIndent=Ve),pt},token:function(Ve,pt){if(!pt.tagName&&Ve.sol()&&(pt.indented=Ve.indentation()),Ve.eatSpace())return null;fe=null;var ht=pt.tokenize(Ve,pt);return(ht||fe)&&ht!="comment"&&(Qe=null,pt.state=pt.state(fe||ht,Ve,pt),Qe&&(ht=Qe=="error"?ht+" error":Qe)),ht},indent:function(Ve,pt,ht){var ve=Ve.context;if(Ve.tokenize.isInAttribute)return Ve.tagStart==Ve.indented?Ve.stringStartCol+1:Ve.indented+Ce;if(ve&&ve.noIndent)return te.Pass;if(Ve.tokenize!=xt&&Ve.tokenize!=be)return ht?ht.match(/^(\s*)/)[0].length:0;if(Ve.tagName)return ze.multilineTagIndentPastTag!==!1?Ve.tagStart+Ve.tagName.length+2:Ve.tagStart+Ce*(ze.multilineTagIndentFactor||1);if(ze.alignCDATA&&/<!\[CDATA\[/.test(pt))return 0;var Bt=pt&&/^<(\/)?([\w_:\.-]*)/.exec(pt);if(Bt&&Bt[1])for(;ve;)if(ve.tagName==Bt[2]){ve=ve.prev;break}else if(ze.implicitlyClosed.hasOwnProperty(ve.tagName))ve=ve.prev;else break;else if(Bt)for(;ve;){var Ae=ze.contextGrabbers[ve.tagName];if(Ae&&Ae.hasOwnProperty(Bt[2]))ve=ve.prev;else break}for(;ve&&ve.prev&&!ve.startOfLine;)ve=ve.prev;return ve?ve.indent+Ce:Ve.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ze.htmlMode?"html":"xml",helperType:ze.htmlMode?"html":"xml",skipAttribute:function(Ve){Ve.state==qe&&(Ve.state=At)},xmlCurrentTag:function(Ve){return Ve.tagName?{name:Ve.tagName,close:Ve.type=="closeTag"}:null},xmlCurrentContext:function(Ve){for(var pt=[],ht=Ve.context;ht;ht=ht.prev)ht.tagName&&pt.push(ht.tagName);return pt.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(en,Ht,ie){"use strict";ie.d(Ht,{hP:function(){return mt}});var te=function(se,ee){return(te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&(z[le]=oe[le])})(se,ee)};function ot(se,ee){function z(){this.constructor=se}te(se,ee),se.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function me(se,ee,z,oe){return new(z||(z=Promise))(function(le,re){function Ee(Ye){try{$t(oe.next(Ye))}catch(ct){re(ct)}}function at(Ye){try{$t(oe.throw(Ye))}catch(ct){re(ct)}}function $t(Ye){var ct;Ye.done?le(Ye.value):(ct=Ye.value,ct instanceof z?ct:new z(function(St){St(ct)})).then(Ee,at)}$t((oe=oe.apply(se,ee||[])).next())})}function Ge(se,ee){var z,oe,le,re,Ee={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return re={next:at(0),throw:at(1),return:at(2)},typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;function at($t){return function(Ye){return function(ct){if(z)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(z=1,oe&&(le=2&ct[0]?oe.return:ct[0]?oe.throw||((le=oe.return)&&le.call(oe),0):oe.next)&&!(le=le.call(oe,ct[1])).done)return le;switch(oe=0,le&&(ct=[2&ct[0],le.value]),ct[0]){case 0:case 1:le=ct;break;case 4:return Ee.label++,{value:ct[1],done:!1};case 5:Ee.label++,oe=ct[1],ct=[0];continue;case 7:ct=Ee.ops.pop(),Ee.trys.pop();continue;default:if(le=Ee.trys,!((le=le.length>0&&le[le.length-1])||ct[0]!==6&&ct[0]!==2)){Ee=0;continue}if(ct[0]===3&&(!le||ct[1]>le[0]&&ct[1]<le[3])){Ee.label=ct[1];break}if(ct[0]===6&&Ee.label<le[1]){Ee.label=le[1],le=ct;break}if(le&&Ee.label<le[2]){Ee.label=le[2],Ee.ops.push(ct);break}le[2]&&Ee.ops.pop(),Ee.trys.pop();continue}ct=ee.call(se,Ee)}catch(St){ct=[6,St],oe=0}finally{z=le=0}if(5&ct[0])throw ct[1];return{value:ct[0]?ct[1]:void 0,done:!0}}([$t,Ye])}}}function xe(){for(var se=0,ee=0,z=arguments.length;ee<z;ee++)se+=arguments[ee].length;var oe=Array(se),le=0;for(ee=0;ee<z;ee++)for(var re=arguments[ee],Ee=0,at=re.length;Ee<at;Ee++,le++)oe[le]=re[Ee];return oe}var Ce=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(ee,z){for(var oe=0,le=z;oe<le.length;oe++){var re=le[oe],Ee=re[0],at=re[1];ee.setAttribute(Ee,at)}},se.createRect=function(ee,z,oe){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",ee.toString()),le.setAttribute("height",z.toString()),oe&&se.setAttributes(le,oe),le},se.createLine=function(ee,z,oe,le,re){var Ee=document.createElementNS("http://www.w3.org/2000/svg","line");return Ee.setAttribute("x1",ee.toString()),Ee.setAttribute("y1",z.toString()),Ee.setAttribute("x2",oe.toString()),Ee.setAttribute("y2",le.toString()),re&&se.setAttributes(Ee,re),Ee},se.createPolygon=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",ee),z&&se.setAttributes(oe,z),oe},se.createCircle=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(ee/2).toString()),oe.setAttribute("cy",(ee/2).toString()),oe.setAttribute("r",ee.toString()),z&&se.setAttributes(oe,z),oe},se.createEllipse=function(ee,z,oe){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(ee/2).toString()),le.setAttribute("cy",(z/2).toString()),le.setAttribute("rx",(ee/2).toString()),le.setAttribute("ry",(z/2).toString()),oe&&se.setAttributes(le,oe),le},se.createGroup=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return ee&&se.setAttributes(z,ee),z},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(ee,z,oe,le,re,Ee,at){var $t=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes($t,[["id",ee],["orient",z],["markerWidth",oe.toString()],["markerHeight",le.toString()],["refX",re.toString()],["refY",Ee.toString()]]),$t.appendChild(at),$t},se.createText=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),ee&&se.setAttributes(z,ee),z},se.createTSpan=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=ee,z&&se.setAttributes(oe,z),oe},se.createImage=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return ee&&se.setAttributes(z,ee),z},se.createPoint=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=ee,oe.y=z,oe},se.createPath=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",ee),z&&se.setAttributes(oe,z),oe},se}(),ze=function(){function se(){}return se.addKey=function(ee){se.key=ee},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),Ke=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(ee,z,oe){var le=this;return new Promise(function(re){var Ee=oe!==void 0?oe:document.createElement("canvas");ee===null&&(le.markersOnly=!0,le.naturalSize=!1);var at=document.createElementNS("http://www.w3.org/2000/svg","svg");at.setAttribute("xmlns","http://www.w3.org/2000/svg"),at.setAttribute("width",z.width.baseVal.valueAsString),at.setAttribute("height",z.height.baseVal.valueAsString),at.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),at.innerHTML=z.innerHTML,le.naturalSize===!0?(at.width.baseVal.value=ee.naturalWidth,at.height.baseVal.value=ee.naturalHeight):le.width!==void 0&&le.height!==void 0&&(at.width.baseVal.value=le.width,at.height.baseVal.value=le.height),Ee.width=at.width.baseVal.value,Ee.height=at.height.baseVal.value;var $t=at.outerHTML,Ye=Ee.getContext("2d");le.markersOnly!==!0&&Ye.drawImage(ee,0,0,Ee.width,Ee.height);var ct=window.URL,St=new Image(Ee.width,Ee.height);St.setAttribute("crossOrigin","anonymous");var Ft=new Blob([$t],{type:"image/svg+xml"}),Pt=ct.createObjectURL(Ft);St.onload=function(){Ye.drawImage(St,0,0),ct.revokeObjectURL(Pt);var Qt=Ee.toDataURL(le.imageType,le.imageQuality);re(Qt)},St.src=Pt})},se}(),ke=function(){},fe=function(){function se(ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ee+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.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(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.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},se.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)},se.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 Qe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Qe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Qe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new be("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new be("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},se.prototype.removeStyleSheet=function(){var ee;this.styleSheet&&(((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),Qe=function(se,ee){this.selector=se,this.style=ee},be=function(se,ee){this.localName=se,this.style=ee},xt=function(){function se(ee,z,oe,le,re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ee,this.displayMode=z,this.markerItems=oe,this.uiStyleSettings=le,this.styles=re,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.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 oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(re){var Ee=document.createElement("div");Ee.className=""+z.toolbarButtonStyleClass.name,Ee.setAttribute("data-type-name",re.typeName),Ee.innerHTML=re.icon,Ee.addEventListener("click",function(){z.markerToolbarButtonClicked(Ee,re)}),z.buttons.push(Ee),z.markerButtons.push(Ee)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},se.prototype.addButtonClickListener=function(ee){this.buttonClickListeners.push(ee)},se.prototype.removeButtonClickListener=function(ee){this.buttonClickListeners.indexOf(ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ee),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.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]))}},se.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")},se.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)})},se.prototype.addActionButton=function(ee,z,oe){var le=this,re=document.createElement("div");switch(re.className=""+this.toolbarButtonStyleClass.name,re.innerHTML=z,re.setAttribute("data-action",oe),re.addEventListener("click",function(){le.actionToolbarButtonClicked(re,oe)}),oe){case"select":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":re.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":re.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":re.style.fill=this.uiStyleSettings.closeButtonColor}ee.appendChild(re),this.buttons.push(re)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new be("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 be("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new be("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new be("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 be("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new be("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 be("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new be("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Qe("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Qe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},se.prototype.markerToolbarButtonClicked=function(ee,z){this.setActiveButton(ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(ee,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.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)},se.prototype.setActiveMarkerButton=function(ee){var z=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===ee});z&&this.setActiveButton(z)},se.prototype.setCurrentMarker=function(ee){var z=this;this.currentMarker=ee,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){z.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},se}(),rt=function(){function se(ee,z,oe,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=ee,this.displayMode=z,this.uiStyleSettings=oe,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var ee;this.toolboxStyleClass=this.styles.addClass(new be("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 be("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new be("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new be("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new be("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 be("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new be("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 be("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new be("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Qe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Qe("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},se.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)},se.prototype.setPanelButtons=function(ee){var z,oe,le=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+" "+((oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(re){var Ee;re.uiStyleSettings=le.uiStyleSettings;var at=document.createElement("div");at.className=le.toolboxButtonStyleClass.name+" "+((Ee=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ee!==void 0?Ee:le.toolboxButtonStyleColorsClass.name),at.innerHTML=re.icon,at.title=re.title,at.addEventListener("click",function(){le.panelButtonClick(re)}),le.panelButtons.push(at),le.buttonRow.appendChild(at)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(ee){var z=this,oe=-1;if(ee!==this.activePanel){oe=this.panels.indexOf(ee),this.panelRow.innerHTML="";var le=ee.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=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(re,Ee){var at,$t;re.className=z.toolboxButtonStyleClass.name+" "+(Ee===oe?""+((at=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&at!==void 0?at:z.toolboxActiveButtonStyleColorsClass.name):""+(($t=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$t!==void 0?$t:z.toolboxButtonStyleColorsClass.name))})},se}(),Re=function(se,ee){this.title=se,this.icon=ee},He=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.colors=[],Ee.addTransparent=!1,Ee.colorBoxes=[],Ee.colors=oe,Ee.currentColor=le,Ee.setCurrentColor=Ee.setCurrentColor.bind(Ee),Ee.getColorBox=Ee.getColorBox.bind(Ee),Ee}return ot(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(le){var re=z.getColorBox(le);oe.appendChild(re),z.colorBoxes.push(re)}),oe},ee.prototype.getColorBox=function(z){var oe=this,le=this.uiStyleSettings.toolbarHeight/4,re=this.uiStyleSettings.toolbarHeight-le,Ee=document.createElement("div");Ee.style.display="inline-block",Ee.style.boxSizing="content-box",Ee.style.width=re-2+"px",Ee.style.height=re-2+"px",Ee.style.padding="1px",Ee.style.marginRight="2px",Ee.style.marginBottom="2px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.borderRadius=(re+2)/2+"px",Ee.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){oe.setCurrentColor(z,Ee)});var at=document.createElement("div");return at.style.display="inline-block",at.style.width=re-2+"px",at.style.height=re-2+"px",at.style.backgroundColor=z,at.style.borderRadius=re/2+"px",z==="transparent"&&(at.style.fill=this.uiStyleSettings.toolboxAccentColor,at.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>`),Ee.appendChild(at),Ee},ee.prototype.setCurrentColor=function(z,oe){var le=this;this.currentColor=z,this.colorBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ee}(Re),Ie=function(){function se(ee,z,oe){this._state="new",this._isSelected=!1,this._container=ee,this._overlayContainer=z,this.globalSettings=oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(ee){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(ee,z){},se.prototype.dblClick=function(ee,z){},se.prototype.manipulate=function(ee){},se.prototype.pointerUp=function(ee){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(ee){this.container.childNodes.length>0?this.container.insertBefore(ee,this.container.childNodes[0]):this.container.appendChild(ee)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(ee){this._state=ee.state,this.notes=ee.notes},se.prototype.scale=function(ee,z){},se.prototype.colorChanged=function(ee){this.onColorChanged&&this.onColorChanged(ee),this.stateChanged()},se.prototype.fillColorChanged=function(ee){this.onFillColorChanged&&this.onFillColorChanged(ee),this.stateChanged()},se.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)}},se.typeName="MarkerBase",se}(),ut=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.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},se}(),gt=function(){function se(){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 se.prototype.ownsTarget=function(ee){return ee===this.visual||ee===this.visual.childNodes[0]||ee===this.visual.childNodes[1]},se}(),yt=function(){function se(){}return se.toITransformMatrix=function(ee){return{a:ee.a,b:ee.b,c:ee.c,d:ee.d,e:ee.e,f:ee.f}},se.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},se}(),ft=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.left=0,re.top=0,re.width=0,re.height=0,re.defaultSize={x:50,y:20},re.offsetX=0,re.offsetY=0,re.rotationAngle=0,re.CB_DISTANCE=10,re._suppressMarkerCreateEvent=!1,re.container.transform.baseVal.appendItem(Ce.createTransform()),re.setupControlBox(),re}return ot(ee,se),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 oe=Ce.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},ee.prototype.pointerDown=function(z,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(z);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){this.activeGrip=this.rotatorGrip;var re=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=re.x-this.width/2,this.top=re.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ee=this.container.transform.baseVal.getItem(0);Ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ee,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ee.prototype.pointerUp=function(z){var oe=this.state;se.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ee.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},ee.prototype.manipulate=function(z){var oe=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(z)},ee.prototype.resize=function(z){var oe=this.manipulationStartLeft,le=this.manipulationStartWidth,re=this.manipulationStartTop,Ee=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+z.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:re=this.manipulationStartTop+z.y-this.manipulationStartY,Ee=this.manipulationStartHeight+this.manipulationStartTop-re;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ee=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=oe,this.width=le):(this.left=oe+le,this.width=-le),Ee>=0?(this.top=re,this.height=Ee):(this.top=re+Ee,this.height=-Ee),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 oe=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},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 oe=this.container.getCTM(),le=Ce.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(oe)).x,y:le.y}},ee.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM();oe=oe.inverse();var le=Ce.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(oe)).x,y:le.y}},ee.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){se.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 ut,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,oe=-z/2,le=oe,re=(this.width+this.CB_DISTANCE)/2-z/2,Ee=(this.height+this.CB_DISTANCE)/2-z/2,at=this.height+this.CB_DISTANCE-z/2,$t=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,le),this.positionGrip(this.controlGrips.topCenter.visual,re,le),this.positionGrip(this.controlGrips.topRight.visual,$t,le),this.positionGrip(this.controlGrips.centerLeft.visual,oe,Ee),this.positionGrip(this.controlGrips.centerRight.visual,$t,Ee),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,at),this.positionGrip(this.controlGrips.bottomCenter.visual,re,at),this.positionGrip(this.controlGrips.bottomRight.visual,$t,at),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,re,le-3*this.CB_DISTANCE)},ee.prototype.positionGrip=function(z,oe,le){var re=z.transform.baseVal.getItem(0);re.setTranslate(oe,le),z.transform.baseVal.replaceItem(re,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:yt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:yt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe);var le=this.rotatePoint({x:this.left,y:this.top}),re=this.unrotatePoint({x:le.x*z,y:le.y*oe});this.left=re.x,this.top=re.y,this.width=this.width*z,this.height=this.height*oe,this.adjustControlBox()},ee}(Ie),nt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.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,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){se.prototype.setSize.call(this),Ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){se.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},se.prototype.getState.call(this))},ee.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),this.setSize()},ee.title="Rectangle marker",ee}(ft),vt=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ee.widths=[],Ee.widthBoxes=[],Ee.widths=oe,Ee.currentWidth=le,Ee.setCurrentWidth=Ee.setCurrentWidth.bind(Ee),Ee}return ot(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(le){var re=document.createElement("div");re.style.display="flex",re.style.flexGrow="2",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=le===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentWidth(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.innerText=le.toString(),Ee.style.marginRight="5px",re.appendChild(Ee);var at=document.createElement("div");at.style.minHeight="20px",at.style.flexGrow="2",at.style.display="flex",at.style.alignItems="center";var $t=document.createElement("hr");$t.style.minWidth="20px",$t.style.border="0px",$t.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,$t.style.flexGrow="2",at.appendChild($t),re.appendChild(at),z.widthBoxes.push(re)}),oe},ee.prototype.setCurrentWidth=function(z,oe){var le=this;this.currentWidth=z,this.widthBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ee}(Re),We=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.styles=[],Ee.styleBoxes=[],Ee.styles=oe,Ee.currentStyle=le,Ee.setCurrentStyle=Ee.setCurrentStyle.bind(Ee),Ee}return ot(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(le){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/z.styles.length-5+"%",re.style.borderColor=le===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentStyle(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.overflow="hidden";var at=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
|
</svg>`;Ee.innerHTML=at,re.appendChild(Ee),z.styleBoxes.push(re)}),oe},ee.prototype.setCurrentStyle=function(z,oe){var le=this;this.currentStyle=z,this.styleBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ee}(Re),At=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.strokePanel=new He("Line color",le.defaultColorSet,le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new vt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new We("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ot(ee,se),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="FrameMarker",ee.title="Frame marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ee}(nt),st=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"},qe=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.x1=0,re.y1=0,re.x2=0,re.y2=0,re.defaultLength=50,re.manipulationStartX=0,re.manipulationStartY=0,re.manipulationStartX1=0,re.manipulationStartY1=0,re.manipulationStartX2=0,re.manipulationStartY2=0,re.setupControlBox(),re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},ee.prototype.pointerDown=function(z,oe){se.prototype.pointerDown.call(this,z,oe),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ee.prototype.pointerUp=function(z){var oe=this.state;se.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},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(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){se.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,oe,le){var re=z.transform.baseVal.getItem(0);re.setTranslate(oe,le),z.transform.baseVal.replaceItem(re,0)},ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),this.x1=this.x1*z,this.y1=this.y1*oe,this.x2=this.x2*z,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},ee}(Ie),Mt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.strokePanel=new He("Line color",le.defaultColorSet,le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new vt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new We("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.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,oe){se.prototype.pointerDown.call(this,z,oe),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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.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}(qe),Ve=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.fonts=[],Ee.fontBoxes=[],Ee.fonts=oe,Ee.currentFont=le,Ee.setCurrentFont=Ee.setCurrentFont.bind(Ee),Ee}return ot(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(le){var re=document.createElement("div");re.style.display="inline-block",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/z.fonts.length-5+"%",re.style.borderColor=le===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentFont(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.fontFamily=le,Ee.style.overflow="hidden";var at=document.createElement("div");at.style.whiteSpace="nowrap",at.style.overflow="hidden",at.style.textOverflow="ellipsis",at.innerHTML="The quick brown fox jumps over the lazy dog",Ee.appendChild(at),re.appendChild(Ee),z.fontBoxes.push(re)}),oe},ee.prototype.setCurrentFont=function(z,oe){var le=this;this.currentFont=z,this.fontBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ee}(Re),pt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.color="transparent",re.padding=5,re.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",re.text=re.DEFAULT_TEXT,re.isMoved=!1,re.color=le.defaultColor,re.fontFamily=le.defaultFontFamily,re.defaultSize={x:100,y:30},re.setColor=re.setColor.bind(re),re.setFont=re.setFont.bind(re),re.renderText=re.renderText.bind(re),re.sizeText=re.sizeText.bind(re),re.textEditDivClicked=re.textEditDivClicked.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.setSize=re.setSize.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.colorPanel=new He("Color",le.defaultColorSet,le.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.fontFamilyPanel=new Ve("Font",le.defaultFontFamilies,le.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re}return ot(ee,se),ee.prototype.ownsTarget=function(z){if(se.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(le){le===z&&(oe=!0)}),oe},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,oe){se.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},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(oe){z.textElement.appendChild(Ce.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ee.prototype.getTextScale=function(){var z=this.textElement.getBBox(),oe=1;if(z.width>0&&z.height>0){var le=(1*this.width-this.width*this.padding*2/100)/z.width,re=(1*this.height-this.height*this.padding*2/100)/z.height;oe=Math.min(le,re)}return oe},ee.prototype.getTextPosition=function(z){var oe=this.textElement.getBBox(),le=0,re=0;return oe.width>0&&oe.height>0&&(le=(this.width-oe.width*z)/2,re=this.height/2-oe.height*z/2),{x:le,y:re}},ee.prototype.sizeText=function(){var z=this.textElement.getBBox(),oe=this.getTextScale(),le=this.getTextPosition(oe);le.y-=z.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},ee.prototype.manipulate=function(z){se.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){se.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},ee.prototype.setSize=function(){se.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 oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,z),this.setSize(),(oe==="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(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,z.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var le=oe.clipboardData.getData("text"),re=window.getSelection();if(!re.rangeCount)return!1;re.deleteFromDocument(),re.getRangeAt(0).insertNode(document.createTextNode(le)),oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ee.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),re={x:le.width*z,y:le.height*z};oe.x-=re.x/2,oe.y-=re.y/2,this.textEditor.style.top=oe.y+"px",this.textEditor.style.left=oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-oe.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},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(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},ee.prototype.dblClick=function(z,oe){se.prototype.dblClick.call(this,z,oe),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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(ft),ht=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.color="transparent",re.lineWidth=3,re.drawing=!1,re.pixelRatio=1,re.color=le.defaultColor,re.lineWidth=le.defaultStrokeWidth,re.pixelRatio=le.freehandPixelRatio,re.setColor=re.setColor.bind(re),re.addCanvas=re.addCanvas.bind(re),re.finishCreation=re.finishCreation.bind(re),re.setLineWidth=re.setLineWidth.bind(re),re.colorPanel=new He("Color",le.defaultColorSet,le.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.lineWidthPanel=new vt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.lineWidthPanel.onWidthChanged=re.setLineWidth,re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.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,oe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):se.prototype.pointerDown.call(this,z,oe)},ee.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){se.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()):se.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(),se.prototype.select.call(this)},ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},ee.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=oe[0],re=oe[1],Ee=oe[2],at=oe[3],$t=!1,Ye=0;Ye<this.canvasElement.height;Ye++)for(var ct=0;ct<this.canvasElement.width;ct++)z.data[Ye*this.canvasElement.width*4+4*ct+3]>0&&($t=!0,Ye<re&&(re=Ye),ct<le&&(le=ct),Ye>at&&(at=Ye),ct>Ee&&(Ee=ct));if($t){this.left=le/this.pixelRatio,this.top=re/this.pixelRatio,this.width=(Ee-le)/this.pixelRatio,this.height=(at-re)/this.pixelRatio;var St=document.createElement("canvas");St.width=Ee-le,St.height=at-re,St.getContext("2d").putImageData(this.canvasContext.getImageData(le,re,Ee-le,at-re),0,0),this.drawingImgUrl=St.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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){this.createVisual(),se.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(ft),ve=function(se){function ee(z,oe,le){var re=se.call(this,z,le||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return re.typeBoxes=[],re.currentType=oe,re.setCurrentType=re.setCurrentType.bind(re),re}return ot(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var le=function(at){var $t="both";switch(at){case 0:$t="both";break;case 1:$t="start";break;case 2:$t="end";break;case 3:$t="none"}var Ye=document.createElement("div");if(Ye.style.display="flex",Ye.style.flexGrow="2",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.borderColor=$t===re.currentType?re.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){z.setCurrentType($t,Ye)}),oe.appendChild(Ye),$t==="both"||$t==="start"){var ct=document.createElement("div");ct.style.display="flex",ct.style.alignItems="center",ct.style.minHeight="20px",ct.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ct.style.marginLeft="5px",Ye.appendChild(ct)}var St=document.createElement("div");St.style.display="flex",St.style.alignItems="center",St.style.minHeight="20px",St.style.flexGrow="2";var Ft=document.createElement("hr");if(Ft.style.minWidth="20px",Ft.style.border="0px",Ft.style.borderTop="3px solid "+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee"),Ft.style.flexGrow="2",St.appendChild(Ft),Ye.appendChild(St),$t==="both"||$t==="end"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.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="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Pt.style.marginRight="5px",Ye.appendChild(Pt)}re.typeBoxes.push(Ye)},re=this,Ee=0;Ee<4;Ee++)le(Ee);return oe},ee.prototype.setCurrentType=function(z,oe){var le=this;this.currentType=z,this.typeBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ee}(Re),Bt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.arrowType="end",re.arrowBaseHeight=10,re.arrowBaseWidth=10,re.getArrowPoints=re.getArrowPoints.bind(re),re.setArrowType=re.setArrowType.bind(re),re.arrowTypePanel=new ve("Arrow type","end"),re.arrowTypePanel.onArrowTypeChanged=re.setArrowType,re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},ee.prototype.getArrowPoints=function(z,oe){var le=this.arrowBaseWidth+2*this.strokeWidth,re=this.arrowBaseHeight+2*this.strokeWidth;return z-le/2+","+(oe+re/2)+" "+z+","+(oe-re/2)+" "+(z+le/2)+","+(oe+re/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,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(se.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 oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.arrowType=oe.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}(Mt),Ae=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor=le.defaultFillColor,re.strokeWidth=0,re.fillPanel=new He("Color",le.defaultColorSet,le.defaultFillColor),re.fillPanel.onColorChanged=re.setFillColor,re}return ot(ee,se),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="CoverMarker",ee.title="Cover marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ee}(nt),Nt=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.opacities=[],Ee.opacityBoxes=[],Ee.opacities=oe,Ee.currentOpacity=le,Ee.setCurrentOpacity=Ee.setCurrentOpacity.bind(Ee),Ee}return ot(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(le){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="center",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=le===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentOpacity(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.innerText=100*le+"%",re.appendChild(Ee),z.opacityBoxes.push(re)}),oe},ee.prototype.setCurrentOpacity=function(z,oe){var le=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ee}(Re),rn=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.setOpacity=re.setOpacity.bind(re),re.fillColor=le.defaultHighlightColor,re.strokeWidth=0,re.opacity=le.defaultHighlightOpacity,re.fillPanel=new He("Color",le.defaultColorSet,re.fillColor),re.fillPanel.onColorChanged=re.setFillColor,re.opacityPanel=new Nt("Opacity",le.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return ot(ee,se),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=se.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}(Ae),we='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',de='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Je=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.bgColor="transparent",re.tipPosition={x:0,y:0},re.tipBase1Position={x:0,y:0},re.tipBase2Position={x:0,y:0},re.tipMoving=!1,re.color=le.defaultStrokeColor,re.bgColor=le.defaultFillColor,re.fontFamily=le.defaultFontFamily,re.defaultSize={x:100,y:30},re.setBgColor=re.setBgColor.bind(re),re.getTipPoints=re.getTipPoints.bind(re),re.positionTip=re.positionTip.bind(re),re.setTipPoints=re.setTipPoints.bind(re),re.colorPanel=new He("Text color",le.defaultColorSet,re.color,we),re.colorPanel.onColorChanged=re.setColor,re.bgColorPanel=new He("Fill color",le.defaultColorSet,re.bgColor,de),re.bgColorPanel.onColorChanged=re.setBgColor,re.fontFamilyPanel=new Ve("Font",le.defaultFontFamilies,le.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.tipGrip=new gt,re.tipGrip.visual.transform.baseVal.appendItem(Ce.createTransform()),re.controlBox.appendChild(re.tipGrip.visual),re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return se.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,oe){this.state==="new"&&se.prototype.pointerDown.call(this,z,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,z,oe)},ee.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,z);else{var oe=this.state==="creating";se.prototype.pointerUp.call(this,z),this.setTipPoints(oe),this.positionTip()}},ee.prototype.manipulate=function(z){if(this.tipMoving){var oe=this.unrotatePoint(z);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else se.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 oe=Math.min(this.height/2,15),le=this.height/5;z&&(this.tipPosition={x:oe+le/2,y:this.height+20});var re=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+le,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-le,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?re<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-le,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-le},this.tipBase2Position={x:this.width,y:this.height-oe}):re<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-le})},ee.prototype.resize=function(z){se.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(),se.prototype.select.call(this)},ee.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,se.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*oe},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}(pt),wt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.fillColor=le.defaultFillColor,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.setOpacity=re.setOpacity.bind(re),re.createVisual=re.createVisual.bind(re),re.strokePanel=new He("Line color",xe(le.defaultColorSet,["transparent"]),le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new He("Fill color",xe(le.defaultColorSet,["transparent"]),re.fillColor,de),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new vt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new We("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.opacityPanel=new Nt("Opacity",le.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.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,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){se.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){se.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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(ft),Et=function(se){function ee(z,oe,le){return se.call(this,z,oe,le)||this}return ot(ee,se),Object.defineProperty(ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!(!se.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,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(se.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),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.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}(Mt),Be=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokePanel.colors=le.defaultColorSet,re.fillColor="transparent",re}return ot(ee,se),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=se.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}(wt),dt=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.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))},se.prototype.replaceLastUndoStep=function(ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ee)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.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}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),bt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.curveX=0,re.curveY=0,re.manipulationStartCurveX=0,re.manipulationStartCurveY=0,re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.positionGrips=re.positionGrips.bind(re),re.addControlGrips=re.addControlGrips.bind(re),re.adjustVisual=re.adjustVisual.bind(re),re.setupControlBox=re.setupControlBox.bind(re),re.resize=re.resize.bind(re),re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.strokePanel=new He("Line color",le.defaultColorSet,le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new vt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new We("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.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,oe){se.prototype.pointerDown.call(this,z,oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},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(){se.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,se.prototype.addControlGrips.call(this)},ee.prototype.positionGrips=function(){se.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),se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),se.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,oe){this.curveX=this.curveX*z,this.curveY=this.curveY*oe,se.prototype.scale.call(this,z,oe)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.curveY,this.createVisual(),this.adjustVisual()},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}(qe),tn=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.textColor="transparent",re.fontSize="1rem",re.isMoved=!1,re.captionText="Caption",re.PADDING=5,re.captionBoxWidth=0,re.captionBoxHeight=0,re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.fillColor=le.defaultFillColor,re.textColor=le.defaultStrokeColor,re.fontFamily=le.defaultFontFamily,re.fontSize=le.defaultCaptionFontSize,re.captionText=le.defaultCaptionText,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re.sizeCaption=re.sizeCaption.bind(re),re.setCaptionText=re.setCaptionText.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.finishTextEditing=re.finishTextEditing.bind(re),re.setFont=re.setFont.bind(re),re.setTextColor=re.setTextColor.bind(re),re.strokePanel=new He("Line color",xe(le.defaultColorSet,["transparent"]),re.strokeColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new He("Fill color",xe(le.defaultColorSet,["transparent"]),re.fillColor,de),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new vt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new We("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.fontFamilyPanel=new Ve("Font",le.defaultFontFamilies,le.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.textColorPanel=new He("Text color",le.defaultColorSet,re.textColor,we),re.textColorPanel.onColorChanged=re.setTextColor,re}return ot(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.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,oe){se.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){se.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){se.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(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},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(){se.prototype.setSize.call(this),Ce.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ee.prototype.pointerUp=function(z){se.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,oe){se.prototype.dblClick.call(this,z,oe),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},se.prototype.getState.call(this));return z.typeName=this.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(ft),Ot=function(){function se(ee,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ee,this.cancelable=z}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),jt=function(se){function ee(z,oe,le){var re=se.call(this,z,!1)||this;return re.dataUrl=oe,re.state=le,re}return ot(ee,se),ee}(Ot),it=function(se){function ee(z,oe,le){le===void 0&&(le=!1);var re=se.call(this,z,le)||this;return re.marker=oe,re}return ot(ee,se),ee}(Ot),Gt=function(){function se(){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 se.prototype.addEventListener=function(ee,z){this[ee].push(z)},se.prototype.removeEventListener=function(ee,z){var oe=this[ee].indexOf(z);oe>-1&&this[ee].splice(oe,1)},se}(),mt=function(){function se(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 st,this._isOpen=!1,this.undoRedoManager=new dt,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 Gt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ee,this.targetRoot=document.body,this.width=ee.clientWidth,this.height=ee.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[At,ht,Bt,pt,Be,wt,rn,Je,Et,Ae,Mt,bt,tn]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[At,ht,Bt,pt,wt,rn,Je]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[At,ht,Bt,pt,rn]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ee){var z=this;this._availableMarkerTypes.splice(0),ee.forEach(function(oe){if(typeof oe=="string"){var le=z.ALL_MARKER_TYPES.find(function(re){return re.typeName===oe});le!==void 0&&z._availableMarkerTypes.push(le)}else z._availableMarkerTypes.push(oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ze.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var ee=this;this.styles.styleSheetRoot===void 0&&ke.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ke.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Ot(ee))})},se.prototype.render=function(){return me(this,void 0,void 0,function(){var ee;return Ge(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new Ke).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()]}})})},se.prototype.close=function(ee){var z=this;if(ee===void 0&&(ee=!1),this.isOpen){var oe=!1;ee||this.eventListeners.beforeclose.forEach(function(le){var re=new Ot(z,!0);le(re),re.defaultPrevented&&(oe=!0)}),oe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(le){return le(new Ot(z))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var ee,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];(ee=this._availableMarkerTypes).push.apply(ee,z)},se.prototype.addRenderEventListener=function(ee){this.addEventListener("render",function(z){ee(z.dataUrl,z.state)})},se.prototype.removeRenderEventListener=function(ee){},se.prototype.addCloseEventListener=function(ee){this.addEventListener("close",function(){ee()})},se.prototype.removeCloseEventListener=function(ee){},se.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))},se.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,oe=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ee;this.resize(z,oe)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(ee,z){this._isResizing=!0;var oe=ee/this.imageWidth,le=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(oe,le),this._isResizing=!1},se.prototype.scaleMarkers=function(ee,z){var oe,le=this;this._currentMarker&&this._currentMarker instanceof pt?this._currentMarker.scale(ee,z):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(re){re!==le._currentMarker&&re.scale(ee,z)}),oe!==void 0&&this.setCurrentMarker(oe)},se.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"},se.prototype.setTopLeft=function(){var ee=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=ee.left-z.left,this.top=ee.top-z.top},se.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)},se.prototype.addDefs=function(){for(var ee,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];this.defs=Ce.createDefs(),this.addDefsToImage(),(ee=this.defs).append.apply(ee,z)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.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)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.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)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.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)},se.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()},se.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")},se.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"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.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 xt(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 rt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(ee){this.markerImage.removeChild(ee.container),this.markers.indexOf(ee)>-1&&this.markers.splice(this.markers.indexOf(ee),1),ee.dispose()},se.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())},se.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()}},se.prototype.deleteSelectedMarker=function(){var ee=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var re=new it(ee,ee._currentMarker,!0);le(re),re.defaultPrevented&&(z=!0)}),!z){var oe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(le){return le(new it(ee,oe))})}}},se.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ee){var at=new it(ee,void 0,!0);Ee(at),at.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var oe=function(Ee){var at=le.markers[Ee];le.setCurrentMarker(le.markers[Ee]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function($t){return $t(new it(ee,at))})},le=this,re=this.markers.length-1;re>=0;re--)oe(re);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.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))},se.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)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var ee=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===z.width&&oe.height===z.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(re){return re(new Ot(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(re){return re(new Ot(ee))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.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(oe){return oe(new Ot(ee))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.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(oe){return oe(new Ot(ee))}))},se.prototype.stepZoom=function(){var ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ee<this.zoomSteps.length-1?this.zoomSteps[ee+1]:this.zoomSteps[0]},se.prototype.panTo=function(ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ee.x,top:this.prevPanPoint.y-ee.y}),this.prevPanPoint=ee},se.prototype.startRenderAndClose=function(){return me(this,void 0,void 0,function(){var ee,z,oe=this;return Ge(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return ee=le.sent(),z=this.getState(),this.eventListeners.render.forEach(function(re){return re(new jt(oe,ee,z))}),this.close(!0),[2]}})})},se.prototype.getState=function(ee){ee===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return z.markers.push(oe.getState())}),z},se.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(oe){var le=z._availableMarkerTypes.find(function(Ee){return Ee.typeName===oe.typeName});if(le!==void 0){var re=z.addNewMarker(le);re.restoreState(oe),z.markers.push(re)}}),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(oe){return oe(new Ot(z))})},se.prototype.addNewMarker=function(ee){var z=Ce.createGroup();return this.markerImage.appendChild(z),new ee(z,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(ee){var z,oe=this;(z=typeof ee=="string"?this._availableMarkerTypes.find(function(le){return le.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(le){return le(new it(oe,oe._currentMarker))}))},se.prototype.markerCreated=function(ee){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ee),this.setCurrentMarker(ee),ee instanceof ht&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ht):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new it(z,z._currentMarker))})},se.prototype.colorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ee,this.settings.defaultStrokeColor=ee)},se.prototype.fillColorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ee)},se.prototype.markerStateChanged=function(ee){var z=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new it(z,ee))})},se.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(oe){return oe(new it(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(oe){return oe(new it(z,z._currentMarker))}))},se.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(oe){return oe.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))},se.prototype.onDblClick=function(ee){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(oe){return oe.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()}},se.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}))},se.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()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(ee){this._currentMarker===void 0||this.notesArea!==void 0||ee.key!=="Delete"&&ee.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(ee,z){var oe=this.markerImage.getBoundingClientRect();return{x:(ee-oe.left)/this.zoomLevel,y:(z-oe.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.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()},se.prototype.addLicenseKey=function(ee){ze.addKey(ee)},se.prototype.addEventListener=function(ee,z){this.eventListeners.addEventListener(ee,z)},se.prototype.removeEventListener=function(ee,z){this.eventListeners.removeEventListener(ee,z)},se.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(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.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 Ot(ee))}))},se.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 Ot(ee))}))},se.instanceCounter=0,se}()},6551:function(en,Ht,ie){"use strict";ie.d(Ht,{ZP:function(){return ze}});var te=ie(72190),ot=ie(59301),me=ie(47273),Ge=0,xe=(0,me.Z)();function Ce(){var Ke;return xe?(Ke=Ge,Ge+=1):Ke="TEST_OR_SSR",Ke}function ze(Ke){var ke=ot.useState(),fe=(0,te.Z)(ke,2),Qe=fe[0],be=fe[1];return ot.useEffect(function(){be("rc_select_".concat(Ce()))},[]),Ke||Qe}},37463:function(en,Ht,ie){"use strict";ie.d(Ht,{Ac:function(){return kt},Xo:function(){return nn},Wx:function(){return et},ZP:function(){return nr},lk:function(){return yt}});var te=ie(60499),ot=ie(77654),me=ie(18642),Ge=ie(85899),xe=ie(72190),Ce=ie(42244),ze=ie(43749),Ke=ie(18929),ke=ie(48736),fe=ie(59301),Qe=ie(92310),be=ie.n(Qe),xt=ie(34280),rt=ie(49658),Re=ie(8654),He=function(_e){var ge=_e.className,Pe=_e.customizeIcon,ye=_e.customizeIconProps,Oe=_e.children,pe=_e.onMouseDown,Fe=_e.onClick,je=typeof Pe=="function"?Pe(ye):Pe;return fe.createElement("span",{className:ge,onMouseDown:function(Ze){Ze.preventDefault(),pe==null||pe(Ze)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Fe,"aria-hidden":!0},je!==void 0?je:fe.createElement("span",{className:be()(ge.split(/\s+/).map(function(tt){return"".concat(tt,"-icon")}))},Oe))},Ie=He,ut=function(_e,ge,Pe,ye,Oe){var pe=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Fe=arguments.length>6?arguments[6]:void 0,je=arguments.length>7?arguments[7]:void 0,tt=fe.useMemo(function(){if((0,ze.Z)(ye)==="object")return ye.clearIcon;if(Oe)return Oe},[ye,Oe]),Ze=fe.useMemo(function(){return!!(!pe&&ye&&(Pe.length||Fe)&&!(je==="combobox"&&Fe===""))},[ye,pe,Pe.length,Fe,je]);return{allowClear:Ze,clearIcon:fe.createElement(Ie,{className:"".concat(_e,"-clear"),onMouseDown:ge,customizeIcon:tt},"\xD7")}},gt=fe.createContext(null);function yt(){return fe.useContext(gt)}function ft(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,_e=fe.useState(!1),ge=(0,xe.Z)(_e,2),Pe=ge[0],ye=ge[1],Oe=fe.useRef(null),pe=function(){window.clearTimeout(Oe.current)};fe.useEffect(function(){return pe},[]);var Fe=function(tt,Ze){pe(),Oe.current=window.setTimeout(function(){ye(tt),Ze&&Ze()},De)};return[Pe,Fe,pe]}function nt(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,_e=fe.useRef(null),ge=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(ge.current)}},[]);function Pe(ye){(ye||_e.current===null)&&(_e.current=ye),window.clearTimeout(ge.current),ge.current=window.setTimeout(function(){_e.current=null},De)}return[function(){return _e.current},Pe]}function vt(De,_e,ge,Pe){var ye=fe.useRef(null);ye.current={open:_e,triggerOpen:ge,customizedTrigger:Pe},fe.useEffect(function(){function Oe(pe){var Fe;if(!((Fe=ye.current)!==null&&Fe!==void 0&&Fe.customizedTrigger)){var je=pe.target;je.shadowRoot&&pe.composed&&(je=pe.composedPath()[0]||je),ye.current.open&&De().filter(function(tt){return tt}).every(function(tt){return!tt.contains(je)&&tt!==je})&&ye.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Oe),function(){return window.removeEventListener("mousedown",Oe)}},[])}var We=ie(10228);function At(De){return De&&![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(De)}var st=ie(26112),qe=ie(83836);function Mt(De,_e,ge){var Pe=(0,Ge.Z)((0,Ge.Z)({},De),ge?_e:{});return Object.keys(_e).forEach(function(ye){var Oe=_e[ye];typeof Oe=="function"&&(Pe[ye]=function(){for(var pe,Fe=arguments.length,je=new Array(Fe),tt=0;tt<Fe;tt++)je[tt]=arguments[tt];return Oe.apply(void 0,je),(pe=De[ye])===null||pe===void 0?void 0:pe.call.apply(pe,[De].concat(je))})}),Pe}var Ve=Mt,pt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],ht=function(_e,ge){var Pe=_e.prefixCls,ye=_e.id,Oe=_e.inputElement,pe=_e.autoFocus,Fe=_e.autoComplete,je=_e.editable,tt=_e.activeDescendantId,Ze=_e.value,Le=_e.open,Te=_e.attrs,Ue=(0,Ce.Z)(_e,pt),Vt=Oe||fe.createElement("input",null),zt=Vt,Zt=zt.ref,kn=zt.props;return(0,ke.Kp)(!("maxLength"in Vt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Vt=fe.cloneElement(Vt,(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({type:"search"},Ve(Ue,kn,!0)),{},{id:ye,ref:(0,Re.sQ)(ge,Zt),autoComplete:Fe||"off",autoFocus:pe,className:be()("".concat(Pe,"-selection-search-input"),kn==null?void 0:kn.className),role:"combobox","aria-expanded":Le||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ye,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ye,"_list"),"aria-activedescendant":Le?tt:void 0},Te),{},{value:je?Ze:"",readOnly:!je,unselectable:je?null:"on",style:(0,Ge.Z)((0,Ge.Z)({},kn.style),{},{opacity:je?null:0})})),Vt},ve=fe.forwardRef(ht),Bt=ve;function Ae(De){return Array.isArray(De)?De:De!==void 0?[De]:[]}var Nt=typeof window!="undefined"&&window.document&&window.document.documentElement,rn=Nt;function we(De){return De!=null}function de(De){return!De&&De!==0}function Je(De){return["string","number"].includes((0,ze.Z)(De))}function wt(De){var _e=void 0;return De&&(Je(De.title)?_e=De.title.toString():Je(De.label)&&(_e=De.label.toString())),_e}function Et(De,_e){rn?fe.useLayoutEffect(De,_e):fe.useEffect(De,_e)}function Be(De){var _e;return(_e=De.key)!==null&&_e!==void 0?_e:De.value}var dt=function(_e){_e.preventDefault(),_e.stopPropagation()},bt=function(_e){var ge=_e.id,Pe=_e.prefixCls,ye=_e.values,Oe=_e.open,pe=_e.searchValue,Fe=_e.autoClearSearchValue,je=_e.inputRef,tt=_e.placeholder,Ze=_e.disabled,Le=_e.mode,Te=_e.showSearch,Ue=_e.autoFocus,Vt=_e.autoComplete,zt=_e.activeDescendantId,Zt=_e.tabIndex,kn=_e.removeIcon,Tn=_e.maxTagCount,Hn=_e.maxTagTextLength,En=_e.maxTagPlaceholder,mn=En===void 0?function(un){return"+ ".concat(un.length," ...")}:En,wn=_e.tagRender,Fn=_e.onToggleOpen,Yn=_e.onRemove,Un=_e.onInputChange,Kn=_e.onInputPaste,vn=_e.onInputKeyDown,er=_e.onInputMouseDown,Wn=_e.onInputCompositionStart,dr=_e.onInputCompositionEnd,pr=_e.onInputBlur,lr=fe.useRef(null),ur=(0,fe.useState)(0),yr=(0,xe.Z)(ur,2),sr=yr[0],fr=yr[1],Qn=(0,fe.useState)(!1),mr=(0,xe.Z)(Qn,2),br=mr[0],Hr=mr[1],Er="".concat(Pe,"-selection"),Ar=Oe||Le==="multiple"&&Fe===!1||Le==="tags"?pe:"",kr=Le==="tags"||Le==="multiple"&&Fe===!1||Te&&(Oe||br);Et(function(){fr(lr.current.scrollWidth)},[Ar]);var Mr=function(_t,An,Zn,an,Kt){return fe.createElement("span",{title:wt(_t),className:be()("".concat(Er,"-item"),(0,me.Z)({},"".concat(Er,"-item-disabled"),Zn))},fe.createElement("span",{className:"".concat(Er,"-item-content")},An),an&&fe.createElement(Ie,{className:"".concat(Er,"-item-remove"),onMouseDown:dt,onClick:Kt,customizeIcon:kn},"\xD7"))},ir=function(_t,An,Zn,an,Kt,bn){var On=function(Or){dt(Or),Fn(!Oe)};return fe.createElement("span",{onMouseDown:On},wn({label:An,value:_t,disabled:Zn,closable:an,onClose:Kt,isMaxTag:!!bn}))},rr=function(_t){var An=_t.disabled,Zn=_t.label,an=_t.value,Kt=!Ze&&!An,bn=Zn;if(typeof Hn=="number"&&(typeof Zn=="string"||typeof Zn=="number")){var On=String(bn);On.length>Hn&&(bn="".concat(On.slice(0,Hn),"..."))}var cr=function(Ir){Ir&&Ir.stopPropagation(),Yn(_t)};return typeof wn=="function"?ir(an,bn,An,Kt,cr):Mr(_t,bn,An,Kt,cr)},Jn=function(_t){if(!ye.length)return null;var An=typeof mn=="function"?mn(_t):mn;return typeof wn=="function"?ir(void 0,An,!1,!1,void 0,!0):Mr({title:An},An,!1)},Yt=fe.createElement("div",{className:"".concat(Er,"-search"),style:{width:sr},onFocus:function(){Hr(!0)},onBlur:function(){Hr(!1)}},fe.createElement(Bt,{ref:je,open:Oe,prefixCls:Pe,id:ge,inputElement:null,disabled:Ze,autoFocus:Ue,autoComplete:Vt,editable:kr,activeDescendantId:zt,value:Ar,onKeyDown:vn,onMouseDown:er,onChange:Un,onPaste:Kn,onCompositionStart:Wn,onCompositionEnd:dr,onBlur:pr,tabIndex:Zt,attrs:(0,st.Z)(_e,!0)}),fe.createElement("span",{ref:lr,className:"".concat(Er,"-search-mirror"),"aria-hidden":!0},Ar,"\xA0")),cn=fe.createElement(qe.Z,{prefixCls:"".concat(Er,"-overflow"),data:ye,renderItem:rr,renderRest:Jn,suffix:Yt,itemKey:Be,maxCount:Tn});return fe.createElement("span",{className:"".concat(Er,"-wrap")},cn,!ye.length&&!Ar&&fe.createElement("span",{className:"".concat(Er,"-placeholder")},tt))},tn=bt,Ot=function(_e){var ge=_e.inputElement,Pe=_e.prefixCls,ye=_e.id,Oe=_e.inputRef,pe=_e.disabled,Fe=_e.autoFocus,je=_e.autoComplete,tt=_e.activeDescendantId,Ze=_e.mode,Le=_e.open,Te=_e.values,Ue=_e.placeholder,Vt=_e.tabIndex,zt=_e.showSearch,Zt=_e.searchValue,kn=_e.activeValue,Tn=_e.maxLength,Hn=_e.onInputKeyDown,En=_e.onInputMouseDown,mn=_e.onInputChange,wn=_e.onInputPaste,Fn=_e.onInputCompositionStart,Yn=_e.onInputCompositionEnd,Un=_e.onInputBlur,Kn=_e.title,vn=fe.useState(!1),er=(0,xe.Z)(vn,2),Wn=er[0],dr=er[1],pr=Ze==="combobox",lr=pr||zt,ur=Te[0],yr=Zt||"";pr&&kn&&!Wn&&(yr=kn),fe.useEffect(function(){pr&&dr(!1)},[pr,kn]);var sr=Ze!=="combobox"&&!Le&&!zt?!1:!!yr,fr=Kn===void 0?wt(ur):Kn,Qn=fe.useMemo(function(){return ur?null:fe.createElement("span",{className:"".concat(Pe,"-selection-placeholder"),style:sr?{visibility:"hidden"}:void 0},Ue)},[ur,sr,Ue,Pe]);return fe.createElement("span",{className:"".concat(Pe,"-selection-wrap")},fe.createElement("span",{className:"".concat(Pe,"-selection-search")},fe.createElement(Bt,{ref:Oe,prefixCls:Pe,id:ye,open:Le,inputElement:ge,disabled:pe,autoFocus:Fe,autoComplete:je,editable:lr,activeDescendantId:tt,value:yr,onKeyDown:Hn,onMouseDown:En,onChange:function(br){dr(!0),mn(br)},onPaste:wn,onCompositionStart:Fn,onCompositionEnd:Yn,onBlur:Un,tabIndex:Vt,attrs:(0,st.Z)(_e,!0),maxLength:pr?Tn:void 0})),!pr&&ur?fe.createElement("span",{className:"".concat(Pe,"-selection-item"),title:fr,style:sr?{visibility:"hidden"}:void 0},ur.label):null,Qn)},jt=Ot,it=function(_e,ge){var Pe=(0,fe.useRef)(null),ye=(0,fe.useRef)(!1),Oe=_e.prefixCls,pe=_e.open,Fe=_e.mode,je=_e.showSearch,tt=_e.tokenWithEnter,Ze=_e.disabled,Le=_e.prefix,Te=_e.autoClearSearchValue,Ue=_e.onSearch,Vt=_e.onSearchSubmit,zt=_e.onToggleOpen,Zt=_e.onInputKeyDown,kn=_e.onInputBlur,Tn=_e.domRef;fe.useImperativeHandle(ge,function(){return{focus:function(fr){Pe.current.focus(fr)},blur:function(){Pe.current.blur()}}});var Hn=nt(0),En=(0,xe.Z)(Hn,2),mn=En[0],wn=En[1],Fn=function(fr){var Qn=fr.which,mr=Pe.current instanceof HTMLTextAreaElement;!mr&&pe&&(Qn===We.Z.UP||Qn===We.Z.DOWN)&&fr.preventDefault(),Zt&&Zt(fr),Qn===We.Z.ENTER&&Fe==="tags"&&!ye.current&&!pe&&(Vt==null||Vt(fr.target.value)),!(mr&&!pe&&~[We.Z.UP,We.Z.DOWN,We.Z.LEFT,We.Z.RIGHT].indexOf(Qn))&&At(Qn)&&zt(!0)},Yn=function(){wn(!0)},Un=(0,fe.useRef)(null),Kn=function(fr){Ue(fr,!0,ye.current)!==!1&&zt(!0)},vn=function(){ye.current=!0},er=function(fr){ye.current=!1,Fe!=="combobox"&&Kn(fr.target.value)},Wn=function(fr){var Qn=fr.target.value;if(tt&&Un.current&&/[\r\n]/.test(Un.current)){var mr=Un.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Qn=Qn.replace(mr,Un.current)}Un.current=null,Kn(Qn)},dr=function(fr){var Qn=fr.clipboardData,mr=Qn==null?void 0:Qn.getData("text");Un.current=mr||""},pr=function(fr){var Qn=fr.target;if(Qn!==Pe.current){var mr=document.body.style.msTouchAction!==void 0;mr?setTimeout(function(){Pe.current.focus()}):Pe.current.focus()}},lr=function(fr){var Qn=mn();fr.target!==Pe.current&&!Qn&&!(Fe==="combobox"&&Ze)&&fr.preventDefault(),(Fe!=="combobox"&&(!je||!Qn)||!pe)&&(pe&&Te!==!1&&Ue("",!0,!1),zt())},ur={inputRef:Pe,onInputKeyDown:Fn,onInputMouseDown:Yn,onInputChange:Wn,onInputPaste:dr,onInputCompositionStart:vn,onInputCompositionEnd:er,onInputBlur:kn},yr=Fe==="multiple"||Fe==="tags"?fe.createElement(tn,(0,te.Z)({},_e,ur)):fe.createElement(jt,(0,te.Z)({},_e,ur));return fe.createElement("div",{ref:Tn,className:"".concat(Oe,"-selector"),onClick:pr,onMouseDown:lr},Le&&fe.createElement("div",{className:"".concat(Oe,"-prefix")},Le),yr)},Gt=fe.forwardRef(it),mt=Gt,se=ie(68196),ee=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(_e){var ge=_e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"}}},oe=function(_e,ge){var Pe=_e.prefixCls,ye=_e.disabled,Oe=_e.visible,pe=_e.children,Fe=_e.popupElement,je=_e.animation,tt=_e.transitionName,Ze=_e.dropdownStyle,Le=_e.dropdownClassName,Te=_e.direction,Ue=Te===void 0?"ltr":Te,Vt=_e.placement,zt=_e.builtinPlacements,Zt=_e.dropdownMatchSelectWidth,kn=_e.dropdownRender,Tn=_e.dropdownAlign,Hn=_e.getPopupContainer,En=_e.empty,mn=_e.getTriggerDOMNode,wn=_e.onPopupVisibleChange,Fn=_e.onPopupMouseEnter,Yn=(0,Ce.Z)(_e,ee),Un="".concat(Pe,"-dropdown"),Kn=Fe;kn&&(Kn=kn(Fe));var vn=fe.useMemo(function(){return zt||z(Zt)},[zt,Zt]),er=je?"".concat(Un,"-").concat(je):tt,Wn=typeof Zt=="number",dr=fe.useMemo(function(){return Wn?null:Zt===!1?"minWidth":"width"},[Zt,Wn]),pr=Ze;Wn&&(pr=(0,Ge.Z)((0,Ge.Z)({},pr),{},{width:Zt}));var lr=fe.useRef(null);return fe.useImperativeHandle(ge,function(){return{getPopupElement:function(){var yr;return(yr=lr.current)===null||yr===void 0?void 0:yr.popupElement}}}),fe.createElement(se.Z,(0,te.Z)({},Yn,{showAction:wn?["click"]:[],hideAction:wn?["click"]:[],popupPlacement:Vt||(Ue==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:vn,prefixCls:Un,popupTransitionName:er,popup:fe.createElement("div",{onMouseEnter:Fn},Kn),ref:lr,stretch:dr,popupAlign:Tn,popupVisible:Oe,getPopupContainer:Hn,popupClassName:be()(Le,(0,me.Z)({},"".concat(Un,"-empty"),En)),popupStyle:pr,getTriggerDOMNode:mn,onPopupVisibleChange:wn}),pe)},le=fe.forwardRef(oe),re=le,Ee=ie(48745);function at(De,_e){var ge=De.key,Pe;return"value"in De&&(Pe=De.value),ge!=null?ge:Pe!==void 0?Pe:"rc-index-key-".concat(_e)}function $t(De){return typeof De!="undefined"&&!Number.isNaN(De)}function Ye(De,_e){var ge=De||{},Pe=ge.label,ye=ge.value,Oe=ge.options,pe=ge.groupLabel,Fe=Pe||(_e?"children":"label");return{label:Fe,value:ye||"value",options:Oe||"options",groupLabel:pe||Fe}}function ct(De){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge=_e.fieldNames,Pe=_e.childrenAsData,ye=[],Oe=Ye(ge,!1),pe=Oe.label,Fe=Oe.value,je=Oe.options,tt=Oe.groupLabel;function Ze(Le,Te){Array.isArray(Le)&&Le.forEach(function(Ue){if(Te||!(je in Ue)){var Vt=Ue[Fe];ye.push({key:at(Ue,ye.length),groupOption:Te,data:Ue,label:Ue[pe],value:Vt})}else{var zt=Ue[tt];zt===void 0&&Pe&&(zt=Ue.label),ye.push({key:at(Ue,ye.length),group:!0,data:Ue,label:zt}),Ze(Ue[je],!0)}})}return Ze(De,!1),ye}function St(De){var _e=(0,Ge.Z)({},De);return"props"in _e||Object.defineProperty(_e,"props",{get:function(){return(0,ke.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),_e}}),_e}var Ft=function(_e,ge,Pe){if(!ge||!ge.length)return null;var ye=!1,Oe=function Fe(je,tt){var Ze=(0,Ee.Z)(tt),Le=Ze[0],Te=Ze.slice(1);if(!Le)return[je];var Ue=je.split(Le);return ye=ye||Ue.length>1,Ue.reduce(function(Vt,zt){return[].concat((0,ot.Z)(Vt),(0,ot.Z)(Fe(zt,Te)))},[]).filter(Boolean)},pe=Oe(_e,ge);return ye?typeof Pe!="undefined"?pe.slice(0,Pe):pe:null},Pt=fe.createContext(null),Qt=Pt;function Jt(De){var _e=De.visible,ge=De.values;if(!_e)return null;var Pe=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(ge.slice(0,Pe).map(function(ye){var Oe=ye.label,pe=ye.value;return["number","string"].includes((0,ze.Z)(Oe))?Oe:pe}).join(", ")),ge.length>Pe?", ...":null)}var Ut=["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"],on=function(_e){return _e==="tags"||_e==="multiple"},gn=fe.forwardRef(function(De,_e){var ge,Pe=De.id,ye=De.prefixCls,Oe=De.className,pe=De.showSearch,Fe=De.tagRender,je=De.direction,tt=De.omitDomProps,Ze=De.displayValues,Le=De.onDisplayValuesChange,Te=De.emptyOptions,Ue=De.notFoundContent,Vt=Ue===void 0?"Not Found":Ue,zt=De.onClear,Zt=De.mode,kn=De.disabled,Tn=De.loading,Hn=De.getInputElement,En=De.getRawInputElement,mn=De.open,wn=De.defaultOpen,Fn=De.onDropdownVisibleChange,Yn=De.activeValue,Un=De.onActiveValueChange,Kn=De.activeDescendantId,vn=De.searchValue,er=De.autoClearSearchValue,Wn=De.onSearch,dr=De.onSearchSplit,pr=De.tokenSeparators,lr=De.allowClear,ur=De.prefix,yr=De.suffixIcon,sr=De.clearIcon,fr=De.OptionList,Qn=De.animation,mr=De.transitionName,br=De.dropdownStyle,Hr=De.dropdownClassName,Er=De.dropdownMatchSelectWidth,Ar=De.dropdownRender,kr=De.dropdownAlign,Mr=De.placement,ir=De.builtinPlacements,rr=De.getPopupContainer,Jn=De.showAction,Yt=Jn===void 0?[]:Jn,cn=De.onFocus,un=De.onBlur,_t=De.onKeyUp,An=De.onKeyDown,Zn=De.onMouseDown,an=(0,Ce.Z)(De,Ut),Kt=on(Zt),bn=(pe!==void 0?pe:Kt)||Zt==="combobox",On=(0,Ge.Z)({},an);Sn.forEach(function(jr){delete On[jr]}),tt==null||tt.forEach(function(jr){delete On[jr]});var cr=fe.useState(!1),Or=(0,xe.Z)(cr,2),Ir=Or[0],Rr=Or[1];fe.useEffect(function(){Rr((0,rt.Z)())},[]);var Br=fe.useRef(null),Fr=fe.useRef(null),Ur=fe.useRef(null),Wr=fe.useRef(null),Kr=fe.useRef(null),ti=fe.useRef(!1),Ei=ft(),Ni=(0,xe.Z)(Ei,3),xi=Ni[0],li=Ni[1],Ri=Ni[2];fe.useImperativeHandle(_e,function(){var jr,Dr;return{focus:(jr=Wr.current)===null||jr===void 0?void 0:jr.focus,blur:(Dr=Wr.current)===null||Dr===void 0?void 0:Dr.blur,scrollTo:function(Ci){var ii;return(ii=Kr.current)===null||ii===void 0?void 0:ii.scrollTo(Ci)},nativeElement:Br.current||Fr.current}});var $r=fe.useMemo(function(){var jr;if(Zt!=="combobox")return vn;var Dr=(jr=Ze[0])===null||jr===void 0?void 0:jr.value;return typeof Dr=="string"||typeof Dr=="number"?String(Dr):""},[vn,Zt,Ze]),_i=Zt==="combobox"&&typeof Hn=="function"&&Hn()||null,qr=typeof En=="function"&&En(),xr=(0,Re.x1)(Fr,qr==null||(ge=qr.props)===null||ge===void 0?void 0:ge.ref),zr=fe.useState(!1),Gr=(0,xe.Z)(zr,2),wr=Gr[0],Nr=Gr[1];(0,xt.Z)(function(){Nr(!0)},[]);var Lr=(0,Ke.Z)(!1,{defaultValue:wn,value:mn}),ui=(0,xe.Z)(Lr,2),Mi=ui[0],fi=ui[1],ni=wr?Mi:!1,xo=!Vt&&Te;(kn||xo&&ni&&Zt==="combobox")&&(ni=!1);var lo=xo?!1:ni,vr=fe.useCallback(function(jr){var Dr=jr!==void 0?jr:!ni;kn||(fi(Dr),ni!==Dr&&(Fn==null||Fn(Dr)))},[kn,ni,fi,Fn]),Pr=fe.useMemo(function(){return(pr||[]).some(function(jr){return[`
|
|
|
`,`\r
|
|
|
`].includes(jr)})},[pr]),Cr=fe.useContext(Qt)||{},Sr=Cr.maxCount,Zr=Cr.rawValues,Xr=function(Dr,yi,Ci){if(!(Kt&&$t(Sr)&&(Zr==null?void 0:Zr.size)>=Sr)){var ii=!0,ci=Dr;Un==null||Un(null);var Yi=Ft(Dr,pr,$t(Sr)?Sr-Zr.size:void 0),Vi=Ci?null:Yi;return Zt!=="combobox"&&Vi&&(ci="",dr==null||dr(Vi),vr(!1),ii=!1),Wn&&$r!==ci&&Wn(ci,{source:yi?"typing":"effect"}),ii}},Ki=function(Dr){!Dr||!Dr.trim()||Wn(Dr,{source:"submit"})};fe.useEffect(function(){!ni&&!Kt&&Zt!=="combobox"&&Xr("",!1,!1)},[ni]),fe.useEffect(function(){Mi&&kn&&fi(!1),kn&&!ti.current&&li(!1)},[kn]);var ki=nt(),gi=(0,xe.Z)(ki,2),ri=gi[0],Gi=gi[1],eo=fe.useRef(!1),Fi=function(Dr){var yi=ri(),Ci=Dr.key,ii=Ci==="Enter";if(ii&&(Zt!=="combobox"&&Dr.preventDefault(),ni||vr(!0)),Gi(!!$r),Ci==="Backspace"&&!yi&&Kt&&!$r&&Ze.length){for(var ci=(0,ot.Z)(Ze),Yi=null,Vi=ci.length-1;Vi>=0;Vi-=1){var oo=ci[Vi];if(!oo.disabled){ci.splice(Vi,1),Yi=oo;break}}Yi&&Le(ci,{type:"remove",values:[Yi]})}for(var zi=arguments.length,Hi=new Array(zi>1?zi-1:0),Ji=1;Ji<zi;Ji++)Hi[Ji-1]=arguments[Ji];if(ni&&(!ii||!eo.current)){var co;ii&&(eo.current=!0),(co=Kr.current)===null||co===void 0||co.onKeyDown.apply(co,[Dr].concat(Hi))}An==null||An.apply(void 0,[Dr].concat(Hi))},to=function(Dr){for(var yi=arguments.length,Ci=new Array(yi>1?yi-1:0),ii=1;ii<yi;ii++)Ci[ii-1]=arguments[ii];if(ni){var ci;(ci=Kr.current)===null||ci===void 0||ci.onKeyUp.apply(ci,[Dr].concat(Ci))}Dr.key==="Enter"&&(eo.current=!1),_t==null||_t.apply(void 0,[Dr].concat(Ci))},io=function(Dr){var yi=Ze.filter(function(Ci){return Ci!==Dr});Le(yi,{type:"remove",values:[Dr]})},Xi=function(){eo.current=!1},Oo=fe.useRef(!1),Ga=function(){li(!0),kn||(cn&&!Oo.current&&cn.apply(void 0,arguments),Yt.includes("focus")&&vr(!0)),Oo.current=!0},ya=function(){ti.current=!0,li(!1,function(){Oo.current=!1,ti.current=!1,vr(!1)}),!kn&&($r&&(Zt==="tags"?Wn($r,{source:"submit"}):Zt==="multiple"&&Wn("",{source:"blur"})),un&&un.apply(void 0,arguments))},no=[];fe.useEffect(function(){return function(){no.forEach(function(jr){return clearTimeout(jr)}),no.splice(0,no.length)}},[]);var uo=function(Dr){var yi,Ci=Dr.target,ii=(yi=Ur.current)===null||yi===void 0?void 0:yi.getPopupElement();if(ii&&ii.contains(Ci)){var ci=setTimeout(function(){var zi=no.indexOf(ci);if(zi!==-1&&no.splice(zi,1),Ri(),!Ir&&!ii.contains(document.activeElement)){var Hi;(Hi=Wr.current)===null||Hi===void 0||Hi.focus()}});no.push(ci)}for(var Yi=arguments.length,Vi=new Array(Yi>1?Yi-1:0),oo=1;oo<Yi;oo++)Vi[oo-1]=arguments[oo];Zn==null||Zn.apply(void 0,[Dr].concat(Vi))},Ui=fe.useState({}),ba=(0,xe.Z)(Ui,2),xa=ba[1];function Ua(){xa({})}var Ca;qr&&(Ca=function(Dr){vr(Dr)}),vt(function(){var jr;return[Br.current,(jr=Ur.current)===null||jr===void 0?void 0:jr.getPopupElement()]},lo,vr,!!qr);var Va=fe.useMemo(function(){return(0,Ge.Z)((0,Ge.Z)({},De),{},{notFoundContent:Vt,open:ni,triggerOpen:lo,id:Pe,showSearch:bn,multiple:Kt,toggleOpen:vr})},[De,Vt,lo,ni,Pe,bn,Kt,vr]),_o=!!yr||Tn,Ko;_o&&(Ko=fe.createElement(Ie,{className:be()("".concat(ye,"-arrow"),(0,me.Z)({},"".concat(ye,"-arrow-loading"),Tn)),customizeIcon:yr,customizeIconProps:{loading:Tn,searchValue:$r,open:ni,focused:xi,showSearch:bn}}));var Co=function(){var Dr;zt==null||zt(),(Dr=Wr.current)===null||Dr===void 0||Dr.focus(),Le([],{type:"clear",values:Ze}),Xr("",!1,!1)},Xo=ut(ye,Co,Ze,lr,sr,kn,$r,Zt),wa=Xo.allowClear,Yo=Xo.clearIcon,Lo=fe.createElement(fr,{ref:Kr}),Sa=be()(ye,Oe,(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(ye,"-focused"),xi),"".concat(ye,"-multiple"),Kt),"".concat(ye,"-single"),!Kt),"".concat(ye,"-allow-clear"),lr),"".concat(ye,"-show-arrow"),_o),"".concat(ye,"-disabled"),kn),"".concat(ye,"-loading"),Tn),"".concat(ye,"-open"),ni),"".concat(ye,"-customize-input"),_i),"".concat(ye,"-show-search"),bn)),To=fe.createElement(re,{ref:Ur,disabled:kn,prefixCls:ye,visible:lo,popupElement:Lo,animation:Qn,transitionName:mr,dropdownStyle:br,dropdownClassName:Hr,direction:je,dropdownMatchSelectWidth:Er,dropdownRender:Ar,dropdownAlign:kr,placement:Mr,builtinPlacements:ir,getPopupContainer:rr,empty:Te,getTriggerDOMNode:function(Dr){return Fr.current||Dr},onPopupVisibleChange:Ca,onPopupMouseEnter:Ua},qr?fe.cloneElement(qr,{ref:xr}):fe.createElement(mt,(0,te.Z)({},De,{domRef:Fr,prefixCls:ye,inputElement:_i,ref:Wr,id:Pe,prefix:ur,showSearch:bn,autoClearSearchValue:er,mode:Zt,activeDescendantId:Kn,tagRender:Fe,values:Ze,open:ni,onToggleOpen:vr,activeValue:Yn,searchValue:$r,onSearch:Xr,onSearchSubmit:Ki,onRemove:io,tokenWithEnter:Pr,onInputBlur:Xi}))),Di;return qr?Di=To:Di=fe.createElement("div",(0,te.Z)({className:Sa},On,{ref:Br,onMouseDown:uo,onKeyDown:Fi,onKeyUp:to,onFocus:Ga,onBlur:ya}),fe.createElement(Jt,{visible:xi&&!ni,values:Ze}),To,Ko,wa&&Yo),fe.createElement(gt.Provider,{value:Va},Di)}),kt=gn,Mn=function(){return null};Mn.isSelectOptGroup=!0;var nn=Mn,Me=function(){return null};Me.isSelectOption=!0;var et=Me,Lt=ie(80547),Rt=ie(2738),Se=ie(48911);function $e(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var lt=["disabled","title","children","style","className"];function Tt(De){return typeof De=="string"||typeof De=="number"}var Wt=function(_e,ge){var Pe=yt(),ye=Pe.prefixCls,Oe=Pe.id,pe=Pe.open,Fe=Pe.multiple,je=Pe.mode,tt=Pe.searchValue,Ze=Pe.toggleOpen,Le=Pe.notFoundContent,Te=Pe.onPopupScroll,Ue=fe.useContext(Qt),Vt=Ue.maxCount,zt=Ue.flattenOptions,Zt=Ue.onActiveValue,kn=Ue.defaultActiveFirstOption,Tn=Ue.onSelect,Hn=Ue.menuItemSelectedIcon,En=Ue.rawValues,mn=Ue.fieldNames,wn=Ue.virtual,Fn=Ue.direction,Yn=Ue.listHeight,Un=Ue.listItemHeight,Kn=Ue.optionRender,vn="".concat(ye,"-item"),er=(0,Lt.Z)(function(){return zt},[pe,zt],function(Jn,Yt){return Yt[0]&&Jn[1]!==Yt[1]}),Wn=fe.useRef(null),dr=fe.useMemo(function(){return Fe&&$t(Vt)&&(En==null?void 0:En.size)>=Vt},[Fe,Vt,En==null?void 0:En.size]),pr=function(Yt){Yt.preventDefault()},lr=function(Yt){var cn;(cn=Wn.current)===null||cn===void 0||cn.scrollTo(typeof Yt=="number"?{index:Yt}:Yt)},ur=fe.useCallback(function(Jn){return je==="combobox"?!1:En.has(Jn)},[je,(0,ot.Z)(En).toString(),En.size]),yr=function(Yt){for(var cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,un=er.length,_t=0;_t<un;_t+=1){var An=(Yt+_t*cn+un)%un,Zn=er[An]||{},an=Zn.group,Kt=Zn.data;if(!an&&!(Kt!=null&&Kt.disabled)&&(ur(Kt.value)||!dr))return An}return-1},sr=fe.useState(function(){return yr(0)}),fr=(0,xe.Z)(sr,2),Qn=fr[0],mr=fr[1],br=function(Yt){var cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;mr(Yt);var un={source:cn?"keyboard":"mouse"},_t=er[Yt];if(!_t){Zt(null,-1,un);return}Zt(_t.value,Yt,un)};(0,fe.useEffect)(function(){br(kn!==!1?yr(0):-1)},[er.length,tt]);var Hr=fe.useCallback(function(Jn){return je==="combobox"?String(Jn).toLowerCase()===tt.toLowerCase():En.has(Jn)},[je,tt,(0,ot.Z)(En).toString(),En.size]);(0,fe.useEffect)(function(){var Jn=setTimeout(function(){if(!Fe&&pe&&En.size===1){var cn=Array.from(En)[0],un=er.findIndex(function(_t){var An=_t.data;return tt?String(An.value).startsWith(tt):An.value===cn});un!==-1&&(br(un),lr(un))}});if(pe){var Yt;(Yt=Wn.current)===null||Yt===void 0||Yt.scrollTo(void 0)}return function(){return clearTimeout(Jn)}},[pe,tt]);var Er=function(Yt){Yt!==void 0&&Tn(Yt,{selected:!En.has(Yt)}),Fe||Ze(!1)};if(fe.useImperativeHandle(ge,function(){return{onKeyDown:function(Yt){var cn=Yt.which,un=Yt.ctrlKey;switch(cn){case We.Z.N:case We.Z.P:case We.Z.UP:case We.Z.DOWN:{var _t=0;if(cn===We.Z.UP?_t=-1:cn===We.Z.DOWN?_t=1:$e()&&un&&(cn===We.Z.N?_t=1:cn===We.Z.P&&(_t=-1)),_t!==0){var An=yr(Qn+_t,_t);lr(An),br(An,!0)}break}case We.Z.TAB:case We.Z.ENTER:{var Zn,an=er[Qn];an&&!(an!=null&&(Zn=an.data)!==null&&Zn!==void 0&&Zn.disabled)&&!dr?Er(an.value):Er(void 0),pe&&Yt.preventDefault();break}case We.Z.ESC:Ze(!1),pe&&Yt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Yt){lr(Yt)}}}),er.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(Oe,"_list"),className:"".concat(vn,"-empty"),onMouseDown:pr},Le);var Ar=Object.keys(mn).map(function(Jn){return mn[Jn]}),kr=function(Yt){return Yt.label};function Mr(Jn,Yt){var cn=Jn.group;return{role:cn?"presentation":"option",id:"".concat(Oe,"_list_").concat(Yt)}}var ir=function(Yt){var cn=er[Yt];if(!cn)return null;var un=cn.data||{},_t=un.value,An=cn.group,Zn=(0,st.Z)(un,!0),an=kr(cn);return cn?fe.createElement("div",(0,te.Z)({"aria-label":typeof an=="string"&&!An?an:null},Zn,{key:Yt},Mr(cn,Yt),{"aria-selected":Hr(_t)}),_t):null},rr={role:"listbox",id:"".concat(Oe,"_list")};return fe.createElement(fe.Fragment,null,wn&&fe.createElement("div",(0,te.Z)({},rr,{style:{height:0,width:0,overflow:"hidden"}}),ir(Qn-1),ir(Qn),ir(Qn+1)),fe.createElement(Se.Z,{itemKey:"key",ref:Wn,data:er,height:Yn,itemHeight:Un,fullHeight:!1,onMouseDown:pr,onScroll:Te,virtual:wn,direction:Fn,innerProps:wn?null:rr},function(Jn,Yt){var cn=Jn.group,un=Jn.groupOption,_t=Jn.data,An=Jn.label,Zn=Jn.value,an=_t.key;if(cn){var Kt,bn=(Kt=_t.title)!==null&&Kt!==void 0?Kt:Tt(An)?An.toString():void 0;return fe.createElement("div",{className:be()(vn,"".concat(vn,"-group"),_t.className),title:bn},An!==void 0?An:an)}var On=_t.disabled,cr=_t.title,Or=_t.children,Ir=_t.style,Rr=_t.className,Br=(0,Ce.Z)(_t,lt),Fr=(0,Rt.Z)(Br,Ar),Ur=ur(Zn),Wr=On||!Ur&&dr,Kr="".concat(vn,"-option"),ti=be()(vn,Kr,Rr,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Kr,"-grouped"),un),"".concat(Kr,"-active"),Qn===Yt&&!Wr),"".concat(Kr,"-disabled"),Wr),"".concat(Kr,"-selected"),Ur)),Ei=kr(Jn),Ni=!Hn||typeof Hn=="function"||Ur,xi=typeof Ei=="number"?Ei:Ei||Zn,li=Tt(xi)?xi.toString():void 0;return cr!==void 0&&(li=cr),fe.createElement("div",(0,te.Z)({},(0,st.Z)(Fr),wn?{}:Mr(Jn,Yt),{"aria-selected":Hr(Zn),className:ti,title:li,onMouseMove:function(){Qn===Yt||Wr||br(Yt)},onClick:function(){Wr||Er(Zn)},style:Ir}),fe.createElement("div",{className:"".concat(Kr,"-content")},typeof Kn=="function"?Kn(Jn,{index:Yt}):xi),fe.isValidElement(Hn)||Ur,Ni&&fe.createElement(Ie,{className:"".concat(vn,"-option-state"),customizeIcon:Hn,customizeIconProps:{value:Zn,disabled:Wr,isSelected:Ur}},Ur?"\u2713":null))}))},ln=fe.forwardRef(Wt),Dn=ln,In=function(De,_e){var ge=fe.useRef({values:new Map,options:new Map}),Pe=fe.useMemo(function(){var Oe=ge.current,pe=Oe.values,Fe=Oe.options,je=De.map(function(Le){if(Le.label===void 0){var Te;return(0,Ge.Z)((0,Ge.Z)({},Le),{},{label:(Te=pe.get(Le.value))===null||Te===void 0?void 0:Te.label})}return Le}),tt=new Map,Ze=new Map;return je.forEach(function(Le){tt.set(Le.value,Le),Ze.set(Le.value,_e.get(Le.value)||Fe.get(Le.value))}),ge.current.values=tt,ge.current.options=Ze,je},[De,_e]),ye=fe.useCallback(function(Oe){return _e.get(Oe)||ge.current.options.get(Oe)},[_e]);return[Pe,ye]};function dn(De,_e){return Ae(De).join("").toUpperCase().includes(_e)}var Cn=function(De,_e,ge,Pe,ye){return fe.useMemo(function(){if(!ge||Pe===!1)return De;var Oe=_e.options,pe=_e.label,Fe=_e.value,je=[],tt=typeof Pe=="function",Ze=ge.toUpperCase(),Le=tt?Pe:function(Ue,Vt){return ye?dn(Vt[ye],Ze):Vt[Oe]?dn(Vt[pe!=="children"?pe:"label"],Ze):dn(Vt[Fe],Ze)},Te=tt?function(Ue){return St(Ue)}:function(Ue){return Ue};return De.forEach(function(Ue){if(Ue[Oe]){var Vt=Le(ge,Te(Ue));if(Vt)je.push(Ue);else{var zt=Ue[Oe].filter(function(Zt){return Le(ge,Te(Zt))});zt.length&&je.push((0,Ge.Z)((0,Ge.Z)({},Ue),{},(0,me.Z)({},Oe,zt)))}return}Le(ge,Te(Ue))&&je.push(Ue)}),je},[De,Pe,ye,ge,_e])},fn=ie(6551),$n=ie(11592),yn=["children","value"],hn=["children"];function qt(De){var _e=De,ge=_e.key,Pe=_e.props,ye=Pe.children,Oe=Pe.value,pe=(0,Ce.Z)(Pe,yn);return(0,Ge.Z)({key:ge,value:Oe!==void 0?Oe:ge,children:ye},pe)}function Pn(De){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,$n.Z)(De).map(function(ge,Pe){if(!fe.isValidElement(ge)||!ge.type)return null;var ye=ge,Oe=ye.type.isSelectOptGroup,pe=ye.key,Fe=ye.props,je=Fe.children,tt=(0,Ce.Z)(Fe,hn);return _e||!Oe?qt(ge):(0,Ge.Z)((0,Ge.Z)({key:"__RC_SELECT_GRP__".concat(pe===null?Pe:pe,"__"),label:pe},tt),{},{options:Pn(je)})}).filter(function(ge){return ge})}var pn=function(_e,ge,Pe,ye,Oe){return fe.useMemo(function(){var pe=_e,Fe=!_e;Fe&&(pe=Pn(ge));var je=new Map,tt=new Map,Ze=function(Ue,Vt,zt){zt&&typeof zt=="string"&&Ue.set(Vt[zt],Vt)},Le=function Te(Ue){for(var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zt=0;zt<Ue.length;zt+=1){var Zt=Ue[zt];!Zt[Pe.options]||Vt?(je.set(Zt[Pe.value],Zt),Ze(tt,Zt,Pe.label),Ze(tt,Zt,ye),Ze(tt,Zt,Oe)):Te(Zt[Pe.options],!0)}};return Le(pe),{options:pe,valueOptions:je,labelOptions:tt}},[_e,ge,Pe,ye,Oe])},Ln=pn;function Gn(De){var _e=fe.useRef();_e.current=De;var ge=fe.useCallback(function(){return _e.current.apply(_e,arguments)},[]);return ge}function jn(De){var _e=De.mode,ge=De.options,Pe=De.children,ye=De.backfill,Oe=De.allowClear,pe=De.placeholder,Fe=De.getInputElement,je=De.showSearch,tt=De.onSearch,Ze=De.defaultOpen,Le=De.autoFocus,Te=De.labelInValue,Ue=De.value,Vt=De.inputValue,zt=De.optionLabelProp,Zt=isMultiple(_e),kn=je!==void 0?je:Zt||_e==="combobox",Tn=ge||convertChildrenToData(Pe);if(warning(_e!=="tags"||Tn.every(function(wn){return!wn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),_e==="tags"||_e==="combobox"){var Hn=Tn.some(function(wn){return wn.options?wn.options.some(function(Fn){return typeof("value"in Fn?Fn.value:Fn.key)=="number"}):typeof("value"in wn?wn.value:wn.key)=="number"});warning(!Hn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(_e!=="combobox"||!zt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(_e==="combobox"||!ye,"`backfill` only works with `combobox` mode."),warning(_e==="combobox"||!Fe,"`getInputElement` only work with `combobox` mode."),noteOnce(_e!=="combobox"||!Fe||!Oe||!pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),tt&&!kn&&_e!=="combobox"&&_e!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ze||Le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ue!=null){var En=toArray(Ue);warning(!Te||En.every(function(wn){return _typeof(wn)==="object"&&("key"in wn||"value"in wn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Zt||Array.isArray(Ue),"`value` should be array when `mode` is `multiple` or `tags`")}if(Pe){var mn=null;toNodeArray(Pe).some(function(wn){if(!React.isValidElement(wn)||!wn.type)return!1;var Fn=wn,Yn=Fn.type;if(Yn.isSelectOption)return!1;if(Yn.isSelectOptGroup){var Un=toNodeArray(wn.props.children).every(function(Kn){return!React.isValidElement(Kn)||!wn.type||Kn.type.isSelectOption?!0:(mn=Kn.type,!1)});return!Un}return mn=Yn,!0}),mn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(mn.displayName||mn.name||mn,"`.")),warning(Vt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Bn(De,_e){if(De){var ge=function Pe(ye){for(var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=0;pe<ye.length;pe++){var Fe=ye[pe];if(Fe[_e==null?void 0:_e.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Oe&&Array.isArray(Fe[_e==null?void 0:_e.options])&&Pe(Fe[_e==null?void 0:_e.options],!0))break}};ge(De)}}var Xn=null,Nn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],ar=["inputValue"];function qn(De){return!De||(0,ze.Z)(De)!=="object"}var It=fe.forwardRef(function(De,_e){var ge=De.id,Pe=De.mode,ye=De.prefixCls,Oe=ye===void 0?"rc-select":ye,pe=De.backfill,Fe=De.fieldNames,je=De.inputValue,tt=De.searchValue,Ze=De.onSearch,Le=De.autoClearSearchValue,Te=Le===void 0?!0:Le,Ue=De.onSelect,Vt=De.onDeselect,zt=De.dropdownMatchSelectWidth,Zt=zt===void 0?!0:zt,kn=De.filterOption,Tn=De.filterSort,Hn=De.optionFilterProp,En=De.optionLabelProp,mn=De.options,wn=De.optionRender,Fn=De.children,Yn=De.defaultActiveFirstOption,Un=De.menuItemSelectedIcon,Kn=De.virtual,vn=De.direction,er=De.listHeight,Wn=er===void 0?200:er,dr=De.listItemHeight,pr=dr===void 0?20:dr,lr=De.labelRender,ur=De.value,yr=De.defaultValue,sr=De.labelInValue,fr=De.onChange,Qn=De.maxCount,mr=(0,Ce.Z)(De,Nn),br=(0,fn.ZP)(ge),Hr=on(Pe),Er=!!(!mn&&Fn),Ar=fe.useMemo(function(){return kn===void 0&&Pe==="combobox"?!1:kn},[kn,Pe]),kr=fe.useMemo(function(){return Ye(Fe,Er)},[JSON.stringify(Fe),Er]),Mr=(0,Ke.Z)("",{value:tt!==void 0?tt:je,postState:function(Pr){return Pr||""}}),ir=(0,xe.Z)(Mr,2),rr=ir[0],Jn=ir[1],Yt=Ln(mn,Fn,kr,Hn,En),cn=Yt.valueOptions,un=Yt.labelOptions,_t=Yt.options,An=fe.useCallback(function(vr){var Pr=Ae(vr);return Pr.map(function(Cr){var Sr,Zr,Xr,Ki,ki;if(qn(Cr))Sr=Cr;else{var gi;Xr=Cr.key,Zr=Cr.label,Sr=(gi=Cr.value)!==null&&gi!==void 0?gi:Xr}var ri=cn.get(Sr);if(ri){var Gi;if(Zr===void 0&&(Zr=ri==null?void 0:ri[En||kr.label]),Xr===void 0&&(Xr=(Gi=ri==null?void 0:ri.key)!==null&&Gi!==void 0?Gi:Sr),Ki=ri==null?void 0:ri.disabled,ki=ri==null?void 0:ri.title,0)var eo}return{label:Zr,value:Sr,key:Xr,disabled:Ki,title:ki}})},[kr,En,cn]),Zn=(0,Ke.Z)(yr,{value:ur}),an=(0,xe.Z)(Zn,2),Kt=an[0],bn=an[1],On=fe.useMemo(function(){var vr,Pr=Hr&&Kt===null?[]:Kt,Cr=An(Pr);return Pe==="combobox"&&de((vr=Cr[0])===null||vr===void 0?void 0:vr.value)?[]:Cr},[Kt,An,Pe,Hr]),cr=In(On,cn),Or=(0,xe.Z)(cr,2),Ir=Or[0],Rr=Or[1],Br=fe.useMemo(function(){if(!Pe&&Ir.length===1){var vr=Ir[0];if(vr.value===null&&(vr.label===null||vr.label===void 0))return[]}return Ir.map(function(Pr){var Cr;return(0,Ge.Z)((0,Ge.Z)({},Pr),{},{label:(Cr=typeof lr=="function"?lr(Pr):Pr.label)!==null&&Cr!==void 0?Cr:Pr.value})})},[Pe,Ir,lr]),Fr=fe.useMemo(function(){return new Set(Ir.map(function(vr){return vr.value}))},[Ir]);fe.useEffect(function(){if(Pe==="combobox"){var vr,Pr=(vr=Ir[0])===null||vr===void 0?void 0:vr.value;Jn(we(Pr)?String(Pr):"")}},[Ir]);var Ur=Gn(function(vr,Pr){var Cr=Pr!=null?Pr:vr;return(0,me.Z)((0,me.Z)({},kr.value,vr),kr.label,Cr)}),Wr=fe.useMemo(function(){if(Pe!=="tags")return _t;var vr=(0,ot.Z)(_t),Pr=function(Sr){return cn.has(Sr)};return(0,ot.Z)(Ir).sort(function(Cr,Sr){return Cr.value<Sr.value?-1:1}).forEach(function(Cr){var Sr=Cr.value;Pr(Sr)||vr.push(Ur(Sr,Cr.label))}),vr},[Ur,_t,cn,Ir,Pe]),Kr=Cn(Wr,kr,rr,Ar,Hn),ti=fe.useMemo(function(){return Pe!=="tags"||!rr||Kr.some(function(vr){return vr[Hn||"value"]===rr})||Kr.some(function(vr){return vr[kr.value]===rr})?Kr:[Ur(rr)].concat((0,ot.Z)(Kr))},[Ur,Hn,Pe,Kr,rr,kr]),Ei=function vr(Pr){var Cr=(0,ot.Z)(Pr).sort(function(Sr,Zr){return Tn(Sr,Zr,{searchValue:rr})});return Cr.map(function(Sr){return Array.isArray(Sr.options)?(0,Ge.Z)((0,Ge.Z)({},Sr),{},{options:Sr.options.length>0?vr(Sr.options):Sr.options}):Sr})},Ni=fe.useMemo(function(){return Tn?Ei(ti):ti},[ti,Tn,rr]),xi=fe.useMemo(function(){return ct(Ni,{fieldNames:kr,childrenAsData:Er})},[Ni,kr,Er]),li=function(Pr){var Cr=An(Pr);if(bn(Cr),fr&&(Cr.length!==Ir.length||Cr.some(function(Xr,Ki){var ki;return((ki=Ir[Ki])===null||ki===void 0?void 0:ki.value)!==(Xr==null?void 0:Xr.value)}))){var Sr=sr?Cr:Cr.map(function(Xr){return Xr.value}),Zr=Cr.map(function(Xr){return St(Rr(Xr.value))});fr(Hr?Sr:Sr[0],Hr?Zr:Zr[0])}},Ri=fe.useState(null),$r=(0,xe.Z)(Ri,2),_i=$r[0],qr=$r[1],xr=fe.useState(0),zr=(0,xe.Z)(xr,2),Gr=zr[0],wr=zr[1],Nr=Yn!==void 0?Yn:Pe!=="combobox",Lr=fe.useCallback(function(vr,Pr){var Cr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Sr=Cr.source,Zr=Sr===void 0?"keyboard":Sr;wr(Pr),pe&&Pe==="combobox"&&vr!==null&&Zr==="keyboard"&&qr(String(vr))},[pe,Pe]),ui=function(Pr,Cr,Sr){var Zr=function(){var io,Xi=Rr(Pr);return[sr?{label:Xi==null?void 0:Xi[kr.label],value:Pr,key:(io=Xi==null?void 0:Xi.key)!==null&&io!==void 0?io:Pr}:Pr,St(Xi)]};if(Cr&&Ue){var Xr=Zr(),Ki=(0,xe.Z)(Xr,2),ki=Ki[0],gi=Ki[1];Ue(ki,gi)}else if(!Cr&&Vt&&Sr!=="clear"){var ri=Zr(),Gi=(0,xe.Z)(ri,2),eo=Gi[0],Fi=Gi[1];Vt(eo,Fi)}},Mi=Gn(function(vr,Pr){var Cr,Sr=Hr?Pr.selected:!0;Sr?Cr=Hr?[].concat((0,ot.Z)(Ir),[vr]):[vr]:Cr=Ir.filter(function(Zr){return Zr.value!==vr}),li(Cr),ui(vr,Sr),Pe==="combobox"?qr(""):(!on||Te)&&(Jn(""),qr(""))}),fi=function(Pr,Cr){li(Pr);var Sr=Cr.type,Zr=Cr.values;(Sr==="remove"||Sr==="clear")&&Zr.forEach(function(Xr){ui(Xr.value,!1,Sr)})},ni=function(Pr,Cr){if(Jn(Pr),qr(null),Cr.source==="submit"){var Sr=(Pr||"").trim();if(Sr){var Zr=Array.from(new Set([].concat((0,ot.Z)(Fr),[Sr])));li(Zr),ui(Sr,!0),Jn("")}return}Cr.source!=="blur"&&(Pe==="combobox"&&li(Pr),Ze==null||Ze(Pr))},xo=function(Pr){var Cr=Pr;Pe!=="tags"&&(Cr=Pr.map(function(Zr){var Xr=un.get(Zr);return Xr==null?void 0:Xr.value}).filter(function(Zr){return Zr!==void 0}));var Sr=Array.from(new Set([].concat((0,ot.Z)(Fr),(0,ot.Z)(Cr))));li(Sr),Sr.forEach(function(Zr){ui(Zr,!0)})},lo=fe.useMemo(function(){var vr=Kn!==!1&&Zt!==!1;return(0,Ge.Z)((0,Ge.Z)({},Yt),{},{flattenOptions:xi,onActiveValue:Lr,defaultActiveFirstOption:Nr,onSelect:Mi,menuItemSelectedIcon:Un,rawValues:Fr,fieldNames:kr,virtual:vr,direction:vn,listHeight:Wn,listItemHeight:pr,childrenAsData:Er,maxCount:Qn,optionRender:wn})},[Qn,Yt,xi,Lr,Nr,Mi,Un,Fr,kr,Kn,Zt,vn,Wn,pr,Er,wn]);return fe.createElement(Qt.Provider,{value:lo},fe.createElement(kt,(0,te.Z)({},mr,{id:br,prefixCls:Oe,ref:_e,omitDomProps:ar,mode:Pe,displayValues:Br,onDisplayValuesChange:fi,direction:vn,searchValue:rr,onSearch:ni,autoClearSearchValue:Te,onSearchSplit:xo,dropdownMatchSelectWidth:Zt,OptionList:Dn,emptyOptions:!xi.length,activeValue:_i,activeDescendantId:"".concat(br,"_list_").concat(Gr)})))}),Xt=It;Xt.Option=et,Xt.OptGroup=nn;var zn=Xt,nr=zn},22711:function(en,Ht,ie){"use strict";ie.r(Ht),ie.d(Ht,{ResizableTextArea:function(){return Ve},default:function(){return Bt}});var te=ie(60499),ot=ie(18642),me=ie(85899),Ge=ie(77654),xe=ie(72190),Ce=ie(42244),ze=ie(92310),Ke=ie.n(ze),ke=ie(36901),fe=ie(66003),Qe=ie(30292),be=ie(18929),xt=ie(59301),rt=ie(43749),Re=ie(29301),He=ie(34280),Ie=ie(16089),ut=`
|
|
|
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"],yt={},ft;function nt(Ae){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rn=Ae.getAttribute("id")||Ae.getAttribute("data-reactid")||Ae.getAttribute("name");if(Nt&&yt[rn])return yt[rn];var we=window.getComputedStyle(Ae),de=we.getPropertyValue("box-sizing")||we.getPropertyValue("-moz-box-sizing")||we.getPropertyValue("-webkit-box-sizing"),Je=parseFloat(we.getPropertyValue("padding-bottom"))+parseFloat(we.getPropertyValue("padding-top")),wt=parseFloat(we.getPropertyValue("border-bottom-width"))+parseFloat(we.getPropertyValue("border-top-width")),Et=gt.map(function(dt){return"".concat(dt,":").concat(we.getPropertyValue(dt))}).join(";"),Be={sizingStyle:Et,paddingSize:Je,borderSize:wt,boxSizing:de};return Nt&&rn&&(yt[rn]=Be),Be}function vt(Ae){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ft||(ft=document.createElement("textarea"),ft.setAttribute("tab-index","-1"),ft.setAttribute("aria-hidden","true"),ft.setAttribute("name","hiddenTextarea"),document.body.appendChild(ft)),Ae.getAttribute("wrap")?ft.setAttribute("wrap",Ae.getAttribute("wrap")):ft.removeAttribute("wrap");var de=nt(Ae,Nt),Je=de.paddingSize,wt=de.borderSize,Et=de.boxSizing,Be=de.sizingStyle;ft.setAttribute("style","".concat(Be,";").concat(ut)),ft.value=Ae.value||Ae.placeholder||"";var dt=void 0,bt=void 0,tn,Ot=ft.scrollHeight;if(Et==="border-box"?Ot+=wt:Et==="content-box"&&(Ot-=Je),rn!==null||we!==null){ft.value=" ";var jt=ft.scrollHeight-Je;rn!==null&&(dt=jt*rn,Et==="border-box"&&(dt=dt+Je+wt),Ot=Math.max(dt,Ot)),we!==null&&(bt=jt*we,Et==="border-box"&&(bt=bt+Je+wt),tn=Ot>bt?"":"hidden",Ot=Math.min(bt,Ot))}var it={height:Ot,overflowY:tn,resize:"none"};return dt&&(it.minHeight=dt),bt&&(it.maxHeight=bt),it}var We=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],At=0,st=1,qe=2,Mt=xt.forwardRef(function(Ae,Nt){var rn=Ae,we=rn.prefixCls,de=rn.defaultValue,Je=rn.value,wt=rn.autoSize,Et=rn.onResize,Be=rn.className,dt=rn.style,bt=rn.disabled,tn=rn.onChange,Ot=rn.onInternalAutoSize,jt=(0,Ce.Z)(rn,We),it=(0,be.Z)(de,{value:Je,postState:function(et){return et!=null?et:""}}),Gt=(0,xe.Z)(it,2),mt=Gt[0],se=Gt[1],ee=function(et){se(et.target.value),tn==null||tn(et)},z=xt.useRef();xt.useImperativeHandle(Nt,function(){return{textArea:z.current}});var oe=xt.useMemo(function(){return wt&&(0,rt.Z)(wt)==="object"?[wt.minRows,wt.maxRows]:[]},[wt]),le=(0,xe.Z)(oe,2),re=le[0],Ee=le[1],at=!!wt,$t=function(){try{if(document.activeElement===z.current){var et=z.current,Lt=et.selectionStart,Rt=et.selectionEnd,Se=et.scrollTop;z.current.setSelectionRange(Lt,Rt),z.current.scrollTop=Se}}catch($e){}},Ye=xt.useState(qe),ct=(0,xe.Z)(Ye,2),St=ct[0],Ft=ct[1],Pt=xt.useState(),Qt=(0,xe.Z)(Pt,2),Jt=Qt[0],Ut=Qt[1],Sn=function(){Ft(At)};(0,He.Z)(function(){at&&Sn()},[Je,re,Ee,at]),(0,He.Z)(function(){if(St===At)Ft(st);else if(St===st){var Me=vt(z.current,!1,re,Ee);Ft(qe),Ut(Me)}else $t()},[St]);var on=xt.useRef(),gn=function(){Ie.Z.cancel(on.current)},kt=function(et){St===qe&&(Et==null||Et(et),wt&&(gn(),on.current=(0,Ie.Z)(function(){Sn()})))};xt.useEffect(function(){return gn},[]);var Mn=at?Jt:null,nn=(0,me.Z)((0,me.Z)({},dt),Mn);return(St===At||St===st)&&(nn.overflowY="hidden",nn.overflowX="hidden"),xt.createElement(Re.Z,{onResize:kt,disabled:!(wt||Et)},xt.createElement("textarea",(0,te.Z)({},jt,{ref:z,style:nn,className:Ke()(we,Be,(0,ot.Z)({},"".concat(we,"-disabled"),bt)),disabled:bt,value:mt,onChange:ee})))}),Ve=Mt,pt=["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"],ht=xt.forwardRef(function(Ae,Nt){var rn,we=Ae.defaultValue,de=Ae.value,Je=Ae.onFocus,wt=Ae.onBlur,Et=Ae.onChange,Be=Ae.allowClear,dt=Ae.maxLength,bt=Ae.onCompositionStart,tn=Ae.onCompositionEnd,Ot=Ae.suffix,jt=Ae.prefixCls,it=jt===void 0?"rc-textarea":jt,Gt=Ae.showCount,mt=Ae.count,se=Ae.className,ee=Ae.style,z=Ae.disabled,oe=Ae.hidden,le=Ae.classNames,re=Ae.styles,Ee=Ae.onResize,at=Ae.onClear,$t=Ae.onPressEnter,Ye=Ae.readOnly,ct=Ae.autoSize,St=Ae.onKeyDown,Ft=(0,Ce.Z)(Ae,pt),Pt=(0,be.Z)(we,{value:de,defaultValue:we}),Qt=(0,xe.Z)(Pt,2),Jt=Qt[0],Ut=Qt[1],Sn=Jt==null?"":String(Jt),on=xt.useState(!1),gn=(0,xe.Z)(on,2),kt=gn[0],Mn=gn[1],nn=xt.useRef(!1),Me=xt.useState(null),et=(0,xe.Z)(Me,2),Lt=et[0],Rt=et[1],Se=(0,xt.useRef)(null),$e=(0,xt.useRef)(null),lt=function(){var Xt;return(Xt=$e.current)===null||Xt===void 0?void 0:Xt.textArea},Tt=function(){lt().focus()};(0,xt.useImperativeHandle)(Nt,function(){var It;return{resizableTextArea:$e.current,focus:Tt,blur:function(){lt().blur()},nativeElement:((It=Se.current)===null||It===void 0?void 0:It.nativeElement)||lt()}}),(0,xt.useEffect)(function(){Mn(function(It){return!z&&It})},[z]);var Wt=xt.useState(null),ln=(0,xe.Z)(Wt,2),Dn=ln[0],In=ln[1];xt.useEffect(function(){if(Dn){var It;(It=lt()).setSelectionRange.apply(It,(0,Ge.Z)(Dn))}},[Dn]);var dn=(0,fe.Z)(mt,Gt),Cn=(rn=dn.max)!==null&&rn!==void 0?rn:dt,fn=Number(Cn)>0,$n=dn.strategy(Sn),yn=!!Cn&&$n>Cn,hn=function(Xt,zn){var nr=zn;!nn.current&&dn.exceedFormatter&&dn.max&&dn.strategy(zn)>dn.max&&(nr=dn.exceedFormatter(zn,{max:dn.max}),zn!==nr&&In([lt().selectionStart||0,lt().selectionEnd||0])),Ut(nr),(0,Qe.rJ)(Xt.currentTarget,Xt,Et,nr)},qt=function(Xt){nn.current=!0,bt==null||bt(Xt)},Pn=function(Xt){nn.current=!1,hn(Xt,Xt.currentTarget.value),tn==null||tn(Xt)},pn=function(Xt){hn(Xt,Xt.target.value)},Ln=function(Xt){Xt.key==="Enter"&&$t&&$t(Xt),St==null||St(Xt)},Gn=function(Xt){Mn(!0),Je==null||Je(Xt)},jn=function(Xt){Mn(!1),wt==null||wt(Xt)},Bn=function(Xt){Ut(""),Tt(),(0,Qe.rJ)(lt(),Xt,Et)},Xn=Ot,Nn;dn.show&&(dn.showFormatter?Nn=dn.showFormatter({value:Sn,count:$n,maxLength:Cn}):Nn="".concat($n).concat(fn?" / ".concat(Cn):""),Xn=xt.createElement(xt.Fragment,null,Xn,xt.createElement("span",{className:Ke()("".concat(it,"-data-count"),le==null?void 0:le.count),style:re==null?void 0:re.count},Nn)));var ar=function(Xt){var zn;Ee==null||Ee(Xt),(zn=lt())!==null&&zn!==void 0&&zn.style.height&&Rt(!0)},qn=!ct&&!Gt&&!Be;return xt.createElement(ke.BaseInput,{ref:Se,value:Sn,allowClear:Be,handleReset:Bn,suffix:Xn,prefixCls:it,classNames:(0,me.Z)((0,me.Z)({},le),{},{affixWrapper:Ke()(le==null?void 0:le.affixWrapper,(0,ot.Z)((0,ot.Z)({},"".concat(it,"-show-count"),Gt),"".concat(it,"-textarea-allow-clear"),Be))}),disabled:z,focused:kt,className:Ke()(se,yn&&"".concat(it,"-out-of-range")),style:(0,me.Z)((0,me.Z)({},ee),Lt&&!qn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nn=="string"?Nn:void 0}},hidden:oe,readOnly:Ye,onClear:at},xt.createElement(Ve,(0,te.Z)({},Ft,{autoSize:ct,maxLength:dt,onKeyDown:Ln,onChange:pn,onFocus:Gn,onBlur:jn,onCompositionStart:qt,onCompositionEnd:Pn,className:Ke()(le==null?void 0:le.textarea),style:(0,me.Z)((0,me.Z)({},re==null?void 0:re.textarea),{},{resize:ee==null?void 0:ee.resize}),disabled:z,prefixCls:it,onResize:ar,ref:$e,readOnly:Ye})))}),ve=ht,Bt=ve},48911:function(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return mt}});var te=ie(60499),ot=ie(43749),me=ie(85899),Ge=ie(18642),xe=ie(72190),Ce=ie(42244),ze=ie(92310),Ke=ie.n(ze),ke=ie(29301),fe=ie(70425),Qe=ie(34280),be=ie(59301),xt=ie(4676),rt=be.forwardRef(function(se,ee){var z=se.height,oe=se.offsetY,le=se.offsetX,re=se.children,Ee=se.prefixCls,at=se.onInnerResize,$t=se.innerProps,Ye=se.rtl,ct=se.extra,St={},Ft={display:"flex",flexDirection:"column"};return oe!==void 0&&(St={height:z,position:"relative",overflow:"hidden"},Ft=(0,me.Z)((0,me.Z)({},Ft),{},(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({transform:"translateY(".concat(oe,"px)")},Ye?"marginRight":"marginLeft",-le),"position","absolute"),"left",0),"right",0),"top",0))),be.createElement("div",{style:St},be.createElement(ke.Z,{onResize:function(Qt){var Jt=Qt.offsetHeight;Jt&&at&&at()}},be.createElement("div",(0,te.Z)({style:Ft,className:Ke()((0,Ge.Z)({},"".concat(Ee,"-holder-inner"),Ee)),ref:ee},$t),re,ct)))});rt.displayName="Filler";var Re=rt;function He(se){var ee=se.children,z=se.setRef,oe=be.useCallback(function(le){z(le)},[]);return be.cloneElement(ee,{ref:oe})}function Ie(se,ee,z,oe,le,re,Ee,at){var $t=at.getKey;return se.slice(ee,z+1).map(function(Ye,ct){var St=ee+ct,Ft=Ee(Ye,St,{style:{width:oe},offsetX:le}),Pt=$t(Ye);return be.createElement(He,{key:Pt,setRef:function(Jt){return re(Ye,Jt)}},Ft)})}function ut(se,ee,z,oe){var le=z-se,re=ee-z,Ee=Math.min(le,re)*2;if(oe<=Ee){var at=Math.floor(oe/2);return oe%2?z+at+1:z-at}return le>re?z-(oe-re):z+(oe-le)}function gt(se,ee,z){var oe=se.length,le=ee.length,re,Ee;if(oe===0&&le===0)return null;oe<le?(re=se,Ee=ee):(re=ee,Ee=se);var at={__EMPTY_ITEM__:!0};function $t(Qt){return Qt!==void 0?z(Qt):at}for(var Ye=null,ct=Math.abs(oe-le)!==1,St=0;St<Ee.length;St+=1){var Ft=$t(re[St]),Pt=$t(Ee[St]);if(Ft!==Pt){Ye=St,ct=ct||Ft!==$t(Ee[St+1]);break}}return Ye===null?null:{index:Ye,multiple:ct}}function yt(se,ee,z){var oe=be.useState(se),le=(0,xe.Z)(oe,2),re=le[0],Ee=le[1],at=be.useState(null),$t=(0,xe.Z)(at,2),Ye=$t[0],ct=$t[1];return be.useEffect(function(){var St=gt(re||[],se||[],ee);(St==null?void 0:St.index)!==void 0&&(z==null||z(St.index),ct(se[St.index])),Ee(se)},[se]),[Ye]}var ft=ie(16089),nt=(typeof navigator=="undefined"?"undefined":(0,ot.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),vt=nt,We=function(se,ee,z,oe){var le=(0,be.useRef)(!1),re=(0,be.useRef)(null);function Ee(){clearTimeout(re.current),le.current=!0,re.current=setTimeout(function(){le.current=!1},50)}var at=(0,be.useRef)({top:se,bottom:ee,left:z,right:oe});return at.current.top=se,at.current.bottom=ee,at.current.left=z,at.current.right=oe,function($t,Ye){var ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,St=$t?Ye<0&&at.current.left||Ye>0&&at.current.right:Ye<0&&at.current.top||Ye>0&&at.current.bottom;return ct&&St?(clearTimeout(re.current),le.current=!1):(!St||le.current)&&Ee(),!le.current&&St}};function At(se,ee,z,oe,le,re,Ee){var at=(0,be.useRef)(0),$t=(0,be.useRef)(null),Ye=(0,be.useRef)(null),ct=(0,be.useRef)(!1),St=We(ee,z,oe,le);function Ft(on,gn){if(ft.Z.cancel($t.current),!St(!1,gn)){var kt=on;if(!kt._virtualHandled)kt._virtualHandled=!0;else return;at.current+=gn,Ye.current=gn,vt||kt.preventDefault(),$t.current=(0,ft.Z)(function(){var Mn=ct.current?10:1;Ee(at.current*Mn,!1),at.current=0})}}function Pt(on,gn){Ee(gn,!0),vt||on.preventDefault()}var Qt=(0,be.useRef)(null),Jt=(0,be.useRef)(null);function Ut(on){if(se){ft.Z.cancel(Jt.current),Jt.current=(0,ft.Z)(function(){Qt.current=null},2);var gn=on.deltaX,kt=on.deltaY,Mn=on.shiftKey,nn=gn,Me=kt;(Qt.current==="sx"||!Qt.current&&Mn&&kt&&!gn)&&(nn=kt,Me=0,Qt.current="sx");var et=Math.abs(nn),Lt=Math.abs(Me);Qt.current===null&&(Qt.current=re&&et>Lt?"x":"y"),Qt.current==="y"?Ft(on,Me):Pt(on,nn)}}function Sn(on){se&&(ct.current=on.detail===Ye.current)}return[Ut,Sn]}function st(se,ee,z,oe){var le=be.useMemo(function(){return[new Map,[]]},[se,z.id,oe]),re=(0,xe.Z)(le,2),Ee=re[0],at=re[1],$t=function(ct){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ct,Ft=Ee.get(ct),Pt=Ee.get(St);if(Ft===void 0||Pt===void 0)for(var Qt=se.length,Jt=at.length;Jt<Qt;Jt+=1){var Ut,Sn=se[Jt],on=ee(Sn);Ee.set(on,Jt);var gn=(Ut=z.get(on))!==null&&Ut!==void 0?Ut:oe;if(at[Jt]=(at[Jt-1]||0)+gn,on===ct&&(Ft=Jt),on===St&&(Pt=Jt),Ft!==void 0&&Pt!==void 0)break}return{top:at[Ft-1]||0,bottom:at[Pt]}};return $t}var qe=ie(38705),Mt=ie(17212),Ve=function(){function se(){(0,qe.Z)(this,se),(0,Ge.Z)(this,"maps",void 0),(0,Ge.Z)(this,"id",0),(0,Ge.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Mt.Z)(se,[{key:"set",value:function(z,oe){this.diffRecords.set(z,this.maps[z]),this.maps[z]=oe,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),se}(),pt=Ve;function ht(se){var ee=parseFloat(se);return isNaN(ee)?0:ee}function ve(se,ee,z){var oe=be.useState(0),le=(0,xe.Z)(oe,2),re=le[0],Ee=le[1],at=(0,be.useRef)(new Map),$t=(0,be.useRef)(new pt),Ye=(0,be.useRef)(0);function ct(){Ye.current+=1}function St(){var Pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ct();var Qt=function(){var Sn=!1;at.current.forEach(function(on,gn){if(on&&on.offsetParent){var kt=on.offsetHeight,Mn=getComputedStyle(on),nn=Mn.marginTop,Me=Mn.marginBottom,et=ht(nn),Lt=ht(Me),Rt=kt+et+Lt;$t.current.get(gn)!==Rt&&($t.current.set(gn,Rt),Sn=!0)}}),Sn&&Ee(function(on){return on+1})};if(Pt)Qt();else{Ye.current+=1;var Jt=Ye.current;Promise.resolve().then(function(){Jt===Ye.current&&Qt()})}}function Ft(Pt,Qt){var Jt=se(Pt),Ut=at.current.get(Jt);Qt?(at.current.set(Jt,Qt),St()):at.current.delete(Jt),!Ut!=!Qt&&(Qt?ee==null||ee(Pt):z==null||z(Pt))}return(0,be.useEffect)(function(){return ct},[]),[Ft,St,$t.current,re]}var Bt=14/15;function Ae(se,ee,z){var oe=(0,be.useRef)(!1),le=(0,be.useRef)(0),re=(0,be.useRef)(0),Ee=(0,be.useRef)(null),at=(0,be.useRef)(null),$t,Ye=function(Pt){if(oe.current){var Qt=Math.ceil(Pt.touches[0].pageX),Jt=Math.ceil(Pt.touches[0].pageY),Ut=le.current-Qt,Sn=re.current-Jt,on=Math.abs(Ut)>Math.abs(Sn);on?le.current=Qt:re.current=Jt;var gn=z(on,on?Ut:Sn,!1,Pt);gn&&Pt.preventDefault(),clearInterval(at.current),gn&&(at.current=setInterval(function(){on?Ut*=Bt:Sn*=Bt;var kt=Math.floor(on?Ut:Sn);(!z(on,kt,!0)||Math.abs(kt)<=.1)&&clearInterval(at.current)},16))}},ct=function(){oe.current=!1,$t()},St=function(Pt){$t(),Pt.touches.length===1&&!oe.current&&(oe.current=!0,le.current=Math.ceil(Pt.touches[0].pageX),re.current=Math.ceil(Pt.touches[0].pageY),Ee.current=Pt.target,Ee.current.addEventListener("touchmove",Ye,{passive:!1}),Ee.current.addEventListener("touchend",ct,{passive:!0}))};$t=function(){Ee.current&&(Ee.current.removeEventListener("touchmove",Ye),Ee.current.removeEventListener("touchend",ct))},(0,Qe.Z)(function(){return se&&ee.current.addEventListener("touchstart",St,{passive:!0}),function(){var Ft;(Ft=ee.current)===null||Ft===void 0||Ft.removeEventListener("touchstart",St),$t(),clearInterval(at.current)}},[se])}function Nt(se){return Math.floor(Math.pow(se,.5))}function rn(se,ee){var z="touches"in se?se.touches[0]:se;return z[ee?"pageX":"pageY"]-window[ee?"scrollX":"scrollY"]}function we(se,ee,z){be.useEffect(function(){var oe=ee.current;if(se&&oe){var le=!1,re,Ee,at=function(){ft.Z.cancel(re)},$t=function Ft(){at(),re=(0,ft.Z)(function(){z(Ee),Ft()})},Ye=function(){le=!1,at()},ct=function(Pt){if(!(Pt.target.draggable||Pt.button!==0)){var Qt=Pt;Qt._virtualHandled||(Qt._virtualHandled=!0,le=!0)}},St=function(Pt){if(le){var Qt=rn(Pt,!1),Jt=oe.getBoundingClientRect(),Ut=Jt.top,Sn=Jt.bottom;if(Qt<=Ut){var on=Ut-Qt;Ee=-Nt(on),$t()}else if(Qt>=Sn){var gn=Qt-Sn;Ee=Nt(gn),$t()}else at()}};return oe.addEventListener("mousedown",ct),oe.ownerDocument.addEventListener("mouseup",Ye),oe.ownerDocument.addEventListener("mousemove",St),oe.ownerDocument.addEventListener("dragend",Ye),function(){oe.removeEventListener("mousedown",ct),oe.ownerDocument.removeEventListener("mouseup",Ye),oe.ownerDocument.removeEventListener("mousemove",St),oe.ownerDocument.removeEventListener("dragend",Ye),at()}}},[se])}var de=10;function Je(se,ee,z,oe,le,re,Ee,at){var $t=be.useRef(),Ye=be.useState(null),ct=(0,xe.Z)(Ye,2),St=ct[0],Ft=ct[1];return(0,Qe.Z)(function(){if(St&&St.times<de){if(!se.current){Ft(function(dn){return(0,me.Z)({},dn)});return}re();var Pt=St.targetAlign,Qt=St.originAlign,Jt=St.index,Ut=St.offset,Sn=se.current.clientHeight,on=!1,gn=Pt,kt=null;if(Sn){for(var Mn=Pt||Qt,nn=0,Me=0,et=0,Lt=Math.min(ee.length-1,Jt),Rt=0;Rt<=Lt;Rt+=1){var Se=le(ee[Rt]);Me=nn;var $e=z.get(Se);et=Me+($e===void 0?oe:$e),nn=et}for(var lt=Mn==="top"?Ut:Sn-Ut,Tt=Lt;Tt>=0;Tt-=1){var Wt=le(ee[Tt]),ln=z.get(Wt);if(ln===void 0){on=!0;break}if(lt-=ln,lt<=0)break}switch(Mn){case"top":kt=Me-Ut;break;case"bottom":kt=et-Sn+Ut;break;default:{var Dn=se.current.scrollTop,In=Dn+Sn;Me<Dn?gn="top":et>In&&(gn="bottom")}}kt!==null&&Ee(kt),kt!==St.lastTop&&(on=!0)}on&&Ft((0,me.Z)((0,me.Z)({},St),{},{times:St.times+1,targetAlign:gn,lastTop:kt}))}},[St,se.current]),function(Pt){if(Pt==null){at();return}if(ft.Z.cancel($t.current),typeof Pt=="number")Ee(Pt);else if(Pt&&(0,ot.Z)(Pt)==="object"){var Qt,Jt=Pt.align;"index"in Pt?Qt=Pt.index:Qt=ee.findIndex(function(on){return le(on)===Pt.key});var Ut=Pt.offset,Sn=Ut===void 0?0:Ut;Ft({times:0,index:Qt,offset:Sn,originAlign:Jt})}}}var wt=be.forwardRef(function(se,ee){var z=se.prefixCls,oe=se.rtl,le=se.scrollOffset,re=se.scrollRange,Ee=se.onStartMove,at=se.onStopMove,$t=se.onScroll,Ye=se.horizontal,ct=se.spinSize,St=se.containerSize,Ft=se.style,Pt=se.thumbStyle,Qt=se.showScrollBar,Jt=be.useState(!1),Ut=(0,xe.Z)(Jt,2),Sn=Ut[0],on=Ut[1],gn=be.useState(null),kt=(0,xe.Z)(gn,2),Mn=kt[0],nn=kt[1],Me=be.useState(null),et=(0,xe.Z)(Me,2),Lt=et[0],Rt=et[1],Se=!oe,$e=be.useRef(),lt=be.useRef(),Tt=be.useState(Qt),Wt=(0,xe.Z)(Tt,2),ln=Wt[0],Dn=Wt[1],In=be.useRef(),dn=function(){Qt===!0||Qt===!1||(clearTimeout(In.current),Dn(!0),In.current=setTimeout(function(){Dn(!1)},3e3))},Cn=re-St||0,fn=St-ct||0,$n=be.useMemo(function(){if(le===0||Cn===0)return 0;var Bn=le/Cn;return Bn*fn},[le,Cn,fn]),yn=function(Xn){Xn.stopPropagation(),Xn.preventDefault()},hn=be.useRef({top:$n,dragging:Sn,pageY:Mn,startTop:Lt});hn.current={top:$n,dragging:Sn,pageY:Mn,startTop:Lt};var qt=function(Xn){on(!0),nn(rn(Xn,Ye)),Rt(hn.current.top),Ee(),Xn.stopPropagation(),Xn.preventDefault()};be.useEffect(function(){var Bn=function(qn){qn.preventDefault()},Xn=$e.current,Nn=lt.current;return Xn.addEventListener("touchstart",Bn,{passive:!1}),Nn.addEventListener("touchstart",qt,{passive:!1}),function(){Xn.removeEventListener("touchstart",Bn),Nn.removeEventListener("touchstart",qt)}},[]);var Pn=be.useRef();Pn.current=Cn;var pn=be.useRef();pn.current=fn,be.useEffect(function(){if(Sn){var Bn,Xn=function(qn){var It=hn.current,Xt=It.dragging,zn=It.pageY,nr=It.startTop;ft.Z.cancel(Bn);var De=$e.current.getBoundingClientRect(),_e=St/(Ye?De.width:De.height);if(Xt){var ge=(rn(qn,Ye)-zn)*_e,Pe=nr;!Se&&Ye?Pe-=ge:Pe+=ge;var ye=Pn.current,Oe=pn.current,pe=Oe?Pe/Oe:0,Fe=Math.ceil(pe*ye);Fe=Math.max(Fe,0),Fe=Math.min(Fe,ye),Bn=(0,ft.Z)(function(){$t(Fe,Ye)})}},Nn=function(){on(!1),at()};return window.addEventListener("mousemove",Xn,{passive:!0}),window.addEventListener("touchmove",Xn,{passive:!0}),window.addEventListener("mouseup",Nn,{passive:!0}),window.addEventListener("touchend",Nn,{passive:!0}),function(){window.removeEventListener("mousemove",Xn),window.removeEventListener("touchmove",Xn),window.removeEventListener("mouseup",Nn),window.removeEventListener("touchend",Nn),ft.Z.cancel(Bn)}}},[Sn]),be.useEffect(function(){return dn(),function(){clearTimeout(In.current)}},[le]),be.useImperativeHandle(ee,function(){return{delayHidden:dn}});var Ln="".concat(z,"-scrollbar"),Gn={position:"absolute",visibility:ln?null:"hidden"},jn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Ye?(Object.assign(Gn,{height:8,left:0,right:0,bottom:0}),Object.assign(jn,(0,Ge.Z)({height:"100%",width:ct},Se?"left":"right",$n))):(Object.assign(Gn,(0,Ge.Z)({width:8,top:0,bottom:0},Se?"right":"left",0)),Object.assign(jn,{width:"100%",height:ct,top:$n})),be.createElement("div",{ref:$e,className:Ke()(Ln,(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({},"".concat(Ln,"-horizontal"),Ye),"".concat(Ln,"-vertical"),!Ye),"".concat(Ln,"-visible"),ln)),style:(0,me.Z)((0,me.Z)({},Gn),Ft),onMouseDown:yn,onMouseMove:dn},be.createElement("div",{ref:lt,className:Ke()("".concat(Ln,"-thumb"),(0,Ge.Z)({},"".concat(Ln,"-thumb-moving"),Sn)),style:(0,me.Z)((0,me.Z)({},jn),Pt),onMouseDown:qt}))}),Et=wt,Be=20;function dt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=se/ee*se;return isNaN(z)&&(z=0),z=Math.max(z,Be),Math.floor(z)}var bt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],tn=[],Ot={overflowY:"auto",overflowAnchor:"none"};function jt(se,ee){var z=se.prefixCls,oe=z===void 0?"rc-virtual-list":z,le=se.className,re=se.height,Ee=se.itemHeight,at=se.fullHeight,$t=at===void 0?!0:at,Ye=se.style,ct=se.data,St=se.children,Ft=se.itemKey,Pt=se.virtual,Qt=se.direction,Jt=se.scrollWidth,Ut=se.component,Sn=Ut===void 0?"div":Ut,on=se.onScroll,gn=se.onVirtualScroll,kt=se.onVisibleChange,Mn=se.innerProps,nn=se.extraRender,Me=se.styles,et=se.showScrollBar,Lt=et===void 0?"optional":et,Rt=(0,Ce.Z)(se,bt),Se=be.useCallback(function(Yt){return typeof Ft=="function"?Ft(Yt):Yt==null?void 0:Yt[Ft]},[Ft]),$e=ve(Se,null,null),lt=(0,xe.Z)($e,4),Tt=lt[0],Wt=lt[1],ln=lt[2],Dn=lt[3],In=!!(Pt!==!1&&re&&Ee),dn=be.useMemo(function(){return Object.values(ln.maps).reduce(function(Yt,cn){return Yt+cn},0)},[ln.id,ln.maps]),Cn=In&&ct&&(Math.max(Ee*ct.length,dn)>re||!!Jt),fn=Qt==="rtl",$n=Ke()(oe,(0,Ge.Z)({},"".concat(oe,"-rtl"),fn),le),yn=ct||tn,hn=(0,be.useRef)(),qt=(0,be.useRef)(),Pn=(0,be.useRef)(),pn=(0,be.useState)(0),Ln=(0,xe.Z)(pn,2),Gn=Ln[0],jn=Ln[1],Bn=(0,be.useState)(0),Xn=(0,xe.Z)(Bn,2),Nn=Xn[0],ar=Xn[1],qn=(0,be.useState)(!1),It=(0,xe.Z)(qn,2),Xt=It[0],zn=It[1],nr=function(){zn(!0)},De=function(){zn(!1)},_e={getKey:Se};function ge(Yt){jn(function(cn){var un;typeof Yt=="function"?un=Yt(cn):un=Yt;var _t=Yn(un);return hn.current.scrollTop=_t,_t})}var Pe=(0,be.useRef)({start:0,end:yn.length}),ye=(0,be.useRef)(),Oe=yt(yn,Se),pe=(0,xe.Z)(Oe,1),Fe=pe[0];ye.current=Fe;var je=be.useMemo(function(){if(!In)return{scrollHeight:void 0,start:0,end:yn.length-1,offset:void 0};if(!Cn){var Yt;return{scrollHeight:((Yt=qt.current)===null||Yt===void 0?void 0:Yt.offsetHeight)||0,start:0,end:yn.length-1,offset:void 0}}for(var cn=0,un,_t,An,Zn=yn.length,an=0;an<Zn;an+=1){var Kt=yn[an],bn=Se(Kt),On=ln.get(bn),cr=cn+(On===void 0?Ee:On);cr>=Gn&&un===void 0&&(un=an,_t=cn),cr>Gn+re&&An===void 0&&(An=an),cn=cr}return un===void 0&&(un=0,_t=0,An=Math.ceil(re/Ee)),An===void 0&&(An=yn.length-1),An=Math.min(An+1,yn.length-1),{scrollHeight:cn,start:un,end:An,offset:_t}},[Cn,In,Gn,yn,Dn,re]),tt=je.scrollHeight,Ze=je.start,Le=je.end,Te=je.offset;Pe.current.start=Ze,Pe.current.end=Le,be.useLayoutEffect(function(){var Yt=ln.getRecord();if(Yt.size===1){var cn=Array.from(Yt.keys())[0],un=Yt.get(cn),_t=yn[Ze];if(_t&&un===void 0){var An=Se(_t);if(An===cn){var Zn=ln.get(cn),an=Zn-Ee;ge(function(Kt){return Kt+an})}}}ln.resetRecord()},[tt]);var Ue=be.useState({width:0,height:re}),Vt=(0,xe.Z)(Ue,2),zt=Vt[0],Zt=Vt[1],kn=function(cn){Zt({width:cn.offsetWidth,height:cn.offsetHeight})},Tn=(0,be.useRef)(),Hn=(0,be.useRef)(),En=be.useMemo(function(){return dt(zt.width,Jt)},[zt.width,Jt]),mn=be.useMemo(function(){return dt(zt.height,tt)},[zt.height,tt]),wn=tt-re,Fn=(0,be.useRef)(wn);Fn.current=wn;function Yn(Yt){var cn=Yt;return Number.isNaN(Fn.current)||(cn=Math.min(cn,Fn.current)),cn=Math.max(cn,0),cn}var Un=Gn<=0,Kn=Gn>=wn,vn=Nn<=0,er=Nn>=Jt,Wn=We(Un,Kn,vn,er),dr=function(){return{x:fn?-Nn:Nn,y:Gn}},pr=(0,be.useRef)(dr()),lr=(0,fe.zX)(function(Yt){if(gn){var cn=(0,me.Z)((0,me.Z)({},dr()),Yt);(pr.current.x!==cn.x||pr.current.y!==cn.y)&&(gn(cn),pr.current=cn)}});function ur(Yt,cn){var un=Yt;cn?((0,xt.flushSync)(function(){ar(un)}),lr()):ge(un)}function yr(Yt){var cn=Yt.currentTarget.scrollTop;cn!==Gn&&ge(cn),on==null||on(Yt),lr()}var sr=function(cn){var un=cn,_t=Jt?Jt-zt.width:0;return un=Math.max(un,0),un=Math.min(un,_t),un},fr=(0,fe.zX)(function(Yt,cn){cn?((0,xt.flushSync)(function(){ar(function(un){var _t=un+(fn?-Yt:Yt);return sr(_t)})}),lr()):ge(function(un){var _t=un+Yt;return _t})}),Qn=At(In,Un,Kn,vn,er,!!Jt,fr),mr=(0,xe.Z)(Qn,2),br=mr[0],Hr=mr[1];Ae(In,hn,function(Yt,cn,un,_t){var An=_t;return Wn(Yt,cn,un)?!1:!An||!An._virtualHandled?(An&&(An._virtualHandled=!0),br({preventDefault:function(){},deltaX:Yt?cn:0,deltaY:Yt?0:cn}),!0):!1}),we(Cn,hn,function(Yt){ge(function(cn){return cn+Yt})}),(0,Qe.Z)(function(){function Yt(un){var _t=Un&&un.detail<0,An=Kn&&un.detail>0;In&&!_t&&!An&&un.preventDefault()}var cn=hn.current;return cn.addEventListener("wheel",br,{passive:!1}),cn.addEventListener("DOMMouseScroll",Hr,{passive:!0}),cn.addEventListener("MozMousePixelScroll",Yt,{passive:!1}),function(){cn.removeEventListener("wheel",br),cn.removeEventListener("DOMMouseScroll",Hr),cn.removeEventListener("MozMousePixelScroll",Yt)}},[In,Un,Kn]),(0,Qe.Z)(function(){if(Jt){var Yt=sr(Nn);ar(Yt),lr({x:Yt})}},[zt.width,Jt]);var Er=function(){var cn,un;(cn=Tn.current)===null||cn===void 0||cn.delayHidden(),(un=Hn.current)===null||un===void 0||un.delayHidden()},Ar=Je(hn,yn,ln,Ee,Se,function(){return Wt(!0)},ge,Er);be.useImperativeHandle(ee,function(){return{nativeElement:Pn.current,getScrollInfo:dr,scrollTo:function(cn){function un(_t){return _t&&(0,ot.Z)(_t)==="object"&&("left"in _t||"top"in _t)}un(cn)?(cn.left!==void 0&&ar(sr(cn.left)),Ar(cn.top)):Ar(cn)}}}),(0,Qe.Z)(function(){if(kt){var Yt=yn.slice(Ze,Le+1);kt(Yt,yn)}},[Ze,Le,yn]);var kr=st(yn,Se,ln,Ee),Mr=nn==null?void 0:nn({start:Ze,end:Le,virtual:Cn,offsetX:Nn,offsetY:Te,rtl:fn,getSize:kr}),ir=Ie(yn,Ze,Le,Jt,Nn,Tt,St,_e),rr=null;re&&(rr=(0,me.Z)((0,Ge.Z)({},$t?"height":"maxHeight",re),Ot),In&&(rr.overflowY="hidden",Jt&&(rr.overflowX="hidden"),Xt&&(rr.pointerEvents="none")));var Jn={};return fn&&(Jn.dir="rtl"),be.createElement("div",(0,te.Z)({ref:Pn,style:(0,me.Z)((0,me.Z)({},Ye),{},{position:"relative"}),className:$n},Jn,Rt),be.createElement(ke.Z,{onResize:kn},be.createElement(Sn,{className:"".concat(oe,"-holder"),style:rr,ref:hn,onScroll:yr,onMouseEnter:Er},be.createElement(Re,{prefixCls:oe,height:tt,offsetX:Nn,offsetY:Te,scrollWidth:Jt,onInnerResize:Wt,ref:qt,innerProps:Mn,rtl:fn,extra:Mr},ir))),Cn&&tt>re&&be.createElement(Et,{ref:Tn,prefixCls:oe,scrollOffset:Gn,scrollRange:tt,rtl:fn,onScroll:ur,onStartMove:nr,onStopMove:De,spinSize:mn,containerSize:zt.height,style:Me==null?void 0:Me.verticalScrollBar,thumbStyle:Me==null?void 0:Me.verticalScrollBarThumb,showScrollBar:Lt}),Cn&&Jt>zt.width&&be.createElement(Et,{ref:Hn,prefixCls:oe,scrollOffset:Nn,scrollRange:Jt,rtl:fn,onScroll:ur,onStartMove:nr,onStopMove:De,spinSize:En,containerSize:zt.width,horizontal:!0,style:Me==null?void 0:Me.horizontalScrollBar,thumbStyle:Me==null?void 0:Me.horizontalScrollBarThumb,showScrollBar:Lt}))}var it=be.forwardRef(jt);it.displayName="List";var Gt=it,mt=Gt},4977:function(en){"use strict";en.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(en,Ht,ie){"use strict";ie.d(Ht,{Z:function(){return Ke}});const te=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,ot=(ke,fe)=>(!fe||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",me=(ke,fe)=>{if(ke.clientHeight<ke.scrollHeight||ke.clientWidth<ke.scrollWidth){const Qe=getComputedStyle(ke,null);return ot(Qe.overflowY,fe)||ot(Qe.overflowX,fe)||(be=>{const xt=(rt=>{if(!rt.ownerDocument||!rt.ownerDocument.defaultView)return null;try{return rt.ownerDocument.defaultView.frameElement}catch(Re){return null}})(be);return!!xt&&(xt.clientHeight<be.scrollHeight||xt.clientWidth<be.scrollWidth)})(ke)}return!1},Ge=(ke,fe,Qe,be,xt,rt,Re,He)=>rt<ke&&Re>fe||rt>ke&&Re<fe?0:rt<=ke&&He<=Qe||Re>=fe&&He>=Qe?rt-ke-be:Re>fe&&He<Qe||rt<ke&&He>Qe?Re-fe+xt:0,xe=ke=>{const fe=ke.parentElement;return fe==null?ke.getRootNode().host||null:fe},Ce=(ke,fe)=>{var Qe,be,xt,rt;if(typeof document=="undefined")return[];const{scrollMode:Re,block:He,inline:Ie,boundary:ut,skipOverflowHiddenElements:gt}=fe,yt=typeof ut=="function"?ut:Et=>Et!==ut;if(!te(ke))throw new TypeError("Invalid target");const ft=document.scrollingElement||document.documentElement,nt=[];let vt=ke;for(;te(vt)&&yt(vt);){if(vt=xe(vt),vt===ft){nt.push(vt);break}vt!=null&&vt===document.body&&me(vt)&&!me(document.documentElement)||vt!=null&&me(vt,gt)&&nt.push(vt)}const We=(be=(Qe=window.visualViewport)==null?void 0:Qe.width)!=null?be:innerWidth,At=(rt=(xt=window.visualViewport)==null?void 0:xt.height)!=null?rt:innerHeight,{scrollX:st,scrollY:qe}=window,{height:Mt,width:Ve,top:pt,right:ht,bottom:ve,left:Bt}=ke.getBoundingClientRect(),{top:Ae,right:Nt,bottom:rn,left:we}=(Et=>{const Be=window.getComputedStyle(Et);return{top:parseFloat(Be.scrollMarginTop)||0,right:parseFloat(Be.scrollMarginRight)||0,bottom:parseFloat(Be.scrollMarginBottom)||0,left:parseFloat(Be.scrollMarginLeft)||0}})(ke);let de=He==="start"||He==="nearest"?pt-Ae:He==="end"?ve+rn:pt+Mt/2-Ae+rn,Je=Ie==="center"?Bt+Ve/2-we+Nt:Ie==="end"?ht+Nt:Bt-we;const wt=[];for(let Et=0;Et<nt.length;Et++){const Be=nt[Et],{height:dt,width:bt,top:tn,right:Ot,bottom:jt,left:it}=Be.getBoundingClientRect();if(Re==="if-needed"&&pt>=0&&Bt>=0&&ve<=At&&ht<=We&&(Be===ft&&!me(Be)||pt>=tn&&ve<=jt&&Bt>=it&&ht<=Ot))return wt;const Gt=getComputedStyle(Be),mt=parseInt(Gt.borderLeftWidth,10),se=parseInt(Gt.borderTopWidth,10),ee=parseInt(Gt.borderRightWidth,10),z=parseInt(Gt.borderBottomWidth,10);let oe=0,le=0;const re="offsetWidth"in Be?Be.offsetWidth-Be.clientWidth-mt-ee:0,Ee="offsetHeight"in Be?Be.offsetHeight-Be.clientHeight-se-z:0,at="offsetWidth"in Be?Be.offsetWidth===0?0:bt/Be.offsetWidth:0,$t="offsetHeight"in Be?Be.offsetHeight===0?0:dt/Be.offsetHeight:0;if(ft===Be)oe=He==="start"?de:He==="end"?de-At:He==="nearest"?Ge(qe,qe+At,At,se,z,qe+de,qe+de+Mt,Mt):de-At/2,le=Ie==="start"?Je:Ie==="center"?Je-We/2:Ie==="end"?Je-We:Ge(st,st+We,We,mt,ee,st+Je,st+Je+Ve,Ve),oe=Math.max(0,oe+qe),le=Math.max(0,le+st);else{oe=He==="start"?de-tn-se:He==="end"?de-jt+z+Ee:He==="nearest"?Ge(tn,jt,dt,se,z+Ee,de,de+Mt,Mt):de-(tn+dt/2)+Ee/2,le=Ie==="start"?Je-it-mt:Ie==="center"?Je-(it+bt/2)+re/2:Ie==="end"?Je-Ot+ee+re:Ge(it,Ot,bt,mt,ee+re,Je,Je+Ve,Ve);const{scrollLeft:Ye,scrollTop:ct}=Be;oe=$t===0?0:Math.max(0,Math.min(ct+oe/$t,Be.scrollHeight-dt/$t+Ee)),le=at===0?0:Math.max(0,Math.min(Ye+le/at,Be.scrollWidth-bt/at+re)),de+=ct-oe,Je+=Ye-le}wt.push({el:Be,top:oe,left:le})}return wt},ze=ke=>ke===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function Ke(ke,fe){if(!ke.isConnected||!(xt=>{let rt=xt;for(;rt&&rt.parentNode;){if(rt.parentNode===document)return!0;rt=rt.parentNode instanceof ShadowRoot?rt.parentNode.host:rt.parentNode}return!1})(ke))return;const Qe=(xt=>{const rt=window.getComputedStyle(xt);return{top:parseFloat(rt.scrollMarginTop)||0,right:parseFloat(rt.scrollMarginRight)||0,bottom:parseFloat(rt.scrollMarginBottom)||0,left:parseFloat(rt.scrollMarginLeft)||0}})(ke);if((xt=>typeof xt=="object"&&typeof xt.behavior=="function")(fe))return fe.behavior(Ce(ke,fe));const be=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:xt,top:rt,left:Re}of Ce(ke,ze(fe))){const He=rt-Qe.top+Qe.bottom,Ie=Re-Qe.left+Qe.right;xt.scroll({top:He,left:Ie,behavior:be})}}}}]);
|