|
|
!(function(){var Ys=Math.pow;var zl=(wn,qt,ce)=>new Promise((be,We)=>{var Fe=ke=>{try{xe(ce.next(ke))}catch(Te){We(Te)}},ft=ke=>{try{xe(ce.throw(ke))}catch(Te){We(Te)}},xe=ke=>ke.done?be(ke.value):Promise.resolve(ke.value).then(Fe,ft);xe((ce=ce.apply(wn,qt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[3317],{40001:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={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"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},84105:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},18785:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},73331:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={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"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},15277:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={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"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},33853:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},62772:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},61485:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={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"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},38819:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},47472:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={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"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},87395:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(54476),We=ce(59301),Fe={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"},ft=Fe,xe=ce(7657),ke=function(Oe,it){return We.createElement(xe.Z,(0,be.Z)({},Oe,{ref:it,icon:ft}))},Te=We.forwardRef(ke),we=Te},41913:function(){"use strict"},8682:function(){"use strict"},20699:function(wn,qt){"use strict";qt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},5296: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 wn={},qt="5.0",ce={},be=null,We=!1,Fe=!1,ft=null,xe=!1,ke=null,Te=null,we=0;we<arguments.length;we++){var Ee=arguments[we];if(Ee!==null)switch(typeof Ee){case"number":qt=Ee.toFixed(1);break;case"string":Ee.match(new RegExp("^[0-9]\\.[0-9]+$"))?qt=Ee:ft=Ee;break;case"object":typeof Ee.is3D!="undefined"?be=Ee:ce=Ee;break;case"boolean":We=Ee,Fe=!0;break}}be===null&&(be={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ce.material_id!==void 0&&!Fe&&(We=!0)),ft!==null&&ce.id===void 0&&(ce.id=ft);var Oe="",it="",Le=!1,ze=null,st=null,Qe=null,at=!1,tt=null,pt=null,Lt=null,Ue=null,Xe=null;ce.height!==void 0&&(ce.height=Math.round(ce.height)),ce.width!==void 0&&(ce.width=Math.round(ce.width));var He=function(Ye){return parseFloat(Ye)>4?parseFloat(Ye):5};wn.setHTML5Codebase=function(Ye,Je){Te=Ye,ht(Ye,Je)},wn.setJavaCodebase=wn.setJavaCodebaseVersion=wn.isCompiledInstalled=wn.setPreCompiledScriptPath=wn.setPreCompiledResourcePath=function(){},wn.setHTML5CodebaseVersion=function(Ye,Je){var At=parseFloat(Ye);if(At!==NaN&&At<5){console.log("The GeoGebra HTML5 codebase version "+At+" is deprecated. Using version latest instead.");return}ke=Ye,ye(Ye,Je)},wn.getHTML5CodebaseVersion=function(){return st},wn.getParameters=function(){return ce},wn.setFontsCSSURL=function(Ye){Ue=Ye},wn.setGiacJSURL=function(Ye){},wn.setJNLPFile=function(Ye){Oe=Ye},wn.setJNLPBaseDir=function(Ye){},wn.inject=function(){function Ye(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Je="auto",At=ce.id,mn,Gt=!1,hn=0;hn<arguments.length;hn++){var jt=arguments[hn];typeof jt=="string"?(jt=jt.toLowerCase(),jt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Je=jt:At=arguments[hn]):typeof jt=="boolean"?Gt=jt:jt instanceof HTMLElement&&(mn=jt)}Ft();function Ft(){if(!xe){setTimeout(Ft,200);return}Je=ct(Je);var Kt=mn||document.getElementById(At);if(!Kt){console.log("possibly bug on ajax loading? ");return}if(wn.removeExistingApplet(Kt,!1),ce.width===void 0&&Kt.clientWidth&&(ce.width=Kt.clientWidth),ce.height===void 0&&Kt.clientHeight&&(ce.height=Kt.clientHeight),!(ce.width&&ce.height)&&Je==="html5"&&(delete ce.width,delete ce.height),ze=Je,Je==="screenshot")Ge(Kt,ce);else{var ge=!1;ce.hasOwnProperty("playButton")&&ce.playButton||ce.hasOwnProperty("clickToLoad")&&ce.clickToLoad?ge=!0:ce.hasOwnProperty("playButtonAutoDecide")&&ce.playButtonAutoDecide&&(ge=(!Se()||Ye())&&Ke()),ge?(ze="screenshot",rt(Kt,ce,Gt,Je)):Et(Kt,ce,Gt)}}};function Se(){try{return window.self!==window.top}catch(Ye){return!0}}function Ke(){return ce.hasOwnProperty("screenshotGenerator")&&ce.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}wn.getViews=function(){return be},wn.isJavaInstalled=function(){return!1};var Ze=function(Ye){var Je=function(hn){var jt=JSON.parse(hn),Ft=function(se){return se.type=="G"||se.type=="E"},Kt=jt.elements?jt.elements.filter(Ft)[0]:jt;if(!Kt||!Kt.url){At();return}ce.fileName=Kt.url,gt(Kt.settings||{}),be.is3D=!0;var ge="https://www.geogebra.org/images/";wn.setPreviewImage(tt||Kt.previewUrl,ge+"GeoGebra_loading.png",ge+"applet_play.png"),Ye()},At=function(){ce.onError&&ce.onError(),Vt("Error: Fetching material (id "+ce.material_id+") failed.",ce)},mn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Gt="/materials/"+ce.material_id+"?scope=basic";je("https://"+mn+"/api/proxy.php?path="+encodeURIComponent(Gt),Je,At)};function gt(Ye){var Je=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(At){Ye[At]=!!Ye[At]}),Je.forEach(function(At){ce[At]===void 0&&Ye[At]!==void 0&&(ce[At]=Ye[At])}),ce.showToolBarHelp===void 0&&(ce.showToolBarHelp=ce.showToolBar)}function je(Ye,Je,At){var mn=new XMLHttpRequest;mn.open("GET",Ye),mn.onload=function(){Je(mn.responseText)},mn.onerror=At,mn.send()}wn.isHTML5Installed=function(){return!0},wn.getLoadedAppletType=function(){return ze},wn.setPreviewImage=function(Ye,Je,At){tt=Ye,pt=Je,Lt=At},wn.removeExistingApplet=function(Ye,Je){var At;typeof Ye=="string"&&(Ye=document.getElementById(Ye)),ze=null;var mn=null;for(At=0;At<Ye.childNodes.length;At++){var Gt=Ye.childNodes[At],hn=Gt.className;hn==="applet_screenshot"?Je?(Gt.style.display="block",ze="screenshot"):Gt.style.display="none":hn!=="applet_scaler prerender"&&(Ye.removeChild(Gt),mn=hn&&hn.indexOf("appletParameters")!=-1?Gt.id:null,At--)}var jt=ce.id!==void 0?ce.id:mn,Ft=window[jt];Ft&&typeof Ft.getBase64=="function"&&(Ft.remove(),window[jt]=null)},wn.refreshHitPoints=function(){if(He(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ye=wn.getAppletObject();return Ye&&typeof Ye.recalculateEnvironments=="function"?(Ye.recalculateEnvironments(),!0):!1},wn.startAnimation=function(){var Ye=wn.getAppletObject();return Ye&&typeof Ye.startAnimation=="function"?(Ye.startAnimation(),!0):!1},wn.stopAnimation=function(){var Ye=wn.getAppletObject();return Ye&&typeof Ye.stopAnimation=="function"?(Ye.stopAnimation(),!0):!1},wn.getAppletObject=function(){var Ye=ce.id!==void 0?ce.id:"ggbApplet";return window[Ye]},wn.resize=function(){};var St=function(Ye,Je,At){var mn=document.createElement("param");mn.setAttribute("name",Je),mn.setAttribute("value",At),Ye.appendChild(mn)},ot=function(Ye){return Ye&&Ye!=="false"},Et=function(Ye,Je,At){He(st)<=4.2&&(At=!0);var mn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==st||ggbHTML5LoadedCodebaseIsWebSimple&&!at)&&(mn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Gt=document.createElement("div");Gt.classList.add("appletParameters","notranslate");var hn=Je.width,jt=Je.height;if(Je.disableAutoScale=Je.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Je.disableAutoScale,Je.width!==void 0)if(He(st)<=4.4)ot(Je.showToolBar)&&(Je.height-=7),ot(Je.showAlgebraInput)&&(Je.height-=37),Je.width<605&&ot(Je.showToolBar)&&(Je.width=605,hn=605);else{var Ft=100;(ot(Je.showToolBar)||ot(Je.showMenuBar))&&(Je.hasOwnProperty("customToolBar")&&(Je.customToolbar=Je.customToolBar),Ft=ot(Je.showMenuBar)?245:155),hn<Ft&&(Je.width=Ft,hn=Ft)}Gt.style.border="none",Gt.style.display="inline-block";for(var Kt in Je)Je.hasOwnProperty(Kt)&&Kt!=="appletOnLoad"&&Gt.setAttribute("data-param-"+Kt,Je[Kt]);Ue&&Gt.setAttribute("data-param-fontscssurl",Ue),wn.resize=function(){GGBAppletUtils.responsiveResize(Ye,Je)},window.addEventListener("resize",function(en){wn.resize()});var ge=typeof Je.appletOnLoad=="function"?Je.appletOnLoad:function(){};if(!At&&Je.width!==void 0){Je.hasOwnProperty("showSplash")||Gt.setAttribute("data-param-showSplash","false");var se=Ye.querySelector(".applet_scaler.prerender"),oe=se!==null;if(oe)var de=se.querySelector(".ggb_preview");else{var de=Ct(hn,jt,Je.borderColor,!1);se=document.createElement("div"),se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.style.width=hn+"px",se.style.height=jt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(se,"66%"),He(st)>=5?(Je.appletOnLoad=function(en){var ln=Ye.querySelector(".ggb_preview");ln&&ln.parentNode.removeChild(ln),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(se),window.GGBT_wsf_view&&$(window).trigger("resize"),ge(en)},oe||se.appendChild(de)):Gt.appendChild(de),se.appendChild(Gt),oe||Ye.appendChild(se),setTimeout(function(){wn.resize()},1)}else{var fe=document.createElement("div");fe.className="applet_scaler",fe.style.position="relative",fe.style.display="block",fe.appendChild(Gt),Ye.appendChild(fe),Je.appletOnLoad=function(en){wn.resize(),ge(en)}}function le(en,ln){ln&&typeof ln.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(en,ln.appletOnLoad):renderGGBElement(en),Vt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ln)}function $e(en,ln){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:en,params:ln}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Sn){le(Sn.article,Sn.params)}),html5AppletsToProcess=null)},He(st)<5&&(en.className+=" geogebraweb")):le(en,ln)}if(mn){scriptLoadStarted=!0;for(var dt=0;dt<Gt.childNodes.length;dt++){var Rt=Gt.childNodes[dt].tagName;Rt==="TABLE"&&(Gt.removeChild(Gt.childNodes[dt]),dt--)}if(ggbHTML5LoadedScript!==null){var Pt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Pt!=null&&Pt.parentNode.removeChild(Pt)}var Ut=document.createElement("script"),Xt=function(){$e(Gt,Je)};Ut.src=it+Qe,ggbHTML5LoadedCodebaseIsWebSimple=at,ggbHTML5LoadedCodebaseVersion=st,ggbHTML5LoadedScript=Ut.src,Vt("GeoGebra HTML5 codebase loaded: '"+it+"'.",Je),!Te&&(!ke||ke=="5.0")?(at?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Xt()):it.requirejs?__webpack_require__.e(5994).then(function(){var en=[__webpack_require__(35994)];Xt.apply(null,en)}.bind(this)).catch(__webpack_require__.oe):(Ut.onload=Xt,Ye.appendChild(Ut))}else $e(Gt,Je);Je.height=jt,Je.width=hn},Ge=function(Ye,Je,At){var mn=Ct(Je.width,Je.height,Je.borderColor,At),Gt=document.createElement("div");Gt.style.position="relative",Gt.style.display="block",Gt.style.width=Je.width+"px",Gt.style.height=Je.height+"px",Gt.className="applet_screenshot applet_scaler"+(At?" applet_screenshot_play":""),Gt.appendChild(mn);var hn=GGBAppletUtils.getScale(Je,Ye,At);At?(Ye.appendChild(yt()),window.GGBT_wsf_view||(Ye.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Gt,"66%"),Ye.appendChild(Gt),hn!==1&&!isNaN(hn)&&(GGBAppletUtils.scaleElement(Gt,hn),Gt.style.width=Je.width+"px",Gt.style.height=Je.height+"px",Gt.parentNode.style.width=Je.width*hn+"px",Gt.parentNode.style.height=Je.height*hn+"px"),wn.resize=function(){Dt(Ye,mn,Gt,At)},window.addEventListener("resize",function(jt){wn.resize()}),wn.resize()};function Dt(Ye,Je,At,mn){if(Ye.contains(Je)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ye.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ye)}var Gt=GGBAppletUtils.getScale(ce,Ye,mn);At.parentNode!==null&&(!isNaN(Gt)&&Gt!==1?(GGBAppletUtils.scaleElement(At,Gt),At.parentNode.style.width=ce.width*Gt+"px",At.parentNode.style.height=ce.height*Gt+"px"):(GGBAppletUtils.scaleElement(At,1),At.parentNode.style.width=ce.width+"px",At.parentNode.style.height=ce.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ye),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}wn.onExitFullscreen=function(Ye,Je){Je.appendChild(Ye)};var rt=function(Ye,Je,At,mn){Ge(Ye,Je,!0);for(var Gt=function(){var Ft=[];for(jt=0;jt<Ye.childNodes.length;jt++)Ft.push(Ye.childNodes[jt]);if(window.GGBT_wsf_view){var Kt=window.GGBT_wsf_view.renderFullScreen(Ye,Je.id),ge=document.getElementById("fullscreencontainer"),se=jQuery(Ye).find(".fullscreencontent");se.length>0?(Kt.remove(),se.attr("id","fullscreencontent").show(),jQuery(ge).append(se),window.dispatchEvent(new Event("resize"))):Et(Kt,Je,!1),window.GGBT_wsf_view.launchFullScreen(ge)}else ze=mn,Et(Ye,Je,!1);if(!window.GGBT_wsf_view)for(jt=0;jt<Ft.length;jt++)Ye.removeChild(Ft[jt])},hn=Ye.getElementsByClassName("ggb_preview_play"),jt=0;jt<hn.length;jt++)hn[jt].addEventListener("click",Gt,!1),hn[jt].addEventListener("ontouchstart",Gt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ye),Ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},yt=function(){var Ye=document.createElement("div");if(Ye.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Je='.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");}',At=document.createElement("style");At.styleSheet?At.styleSheet.cssText=Je:At.appendChild(document.createTextNode(Je)),document.getElementsByTagName("head")[0].appendChild(At)}return Ye},Ct=function(Ye,Je,At,mn){var Gt=document.createElement("div");Gt.className="ggb_preview",Gt.style.position="absolute",Gt.style.zIndex="90",Gt.style.width=Ye-2+"px",Gt.style.height=Je-2+"px",Gt.style.top="0px",Gt.style.left="0px",Gt.style.overflow="hidden",Gt.style.backgroundColor="white";var hn="lightgrey";At!==void 0&&(At==="none"?hn="transparent":hn=At),Gt.style.border="1px solid "+hn;var jt=document.createElement("img");if(jt.style.position="relative",jt.style.zIndex="1000",jt.style.top="-1px",jt.style.left="-1px",tt!==null&&jt.setAttribute("src",tt),jt.style.opacity=.7,pt!==null){var Ft,Kt,ge;if(!mn){Ft=document.createElement("img"),Ft.style.position="absolute",Ft.style.zIndex="1001",Ft.style.opacity=1,jt.style.opacity=.3,Kt=360,Kt>Ye/4*3&&(Kt=Ye/4*3),ge=Kt/5.8,Ft.setAttribute("src",pt),Ft.setAttribute("width",Kt),Ft.setAttribute("height",ge);var se=(Ye-Kt)/2,oe=(Je-ge)/2;Ft.style.left=se+"px",Ft.style.top=oe+"px",Gt.appendChild(Ft)}}return Gt.appendChild(jt),Gt},ct=function(Ye){return Ye=Ye.toLowerCase(),Ye==="html5"||Ye==="screenshot"?Ye:"html5"},Pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ye=function(Ye,Je){if(st=Ye,Je){ht(st,!0);return}var At=!We;if(At){var mn=He(st);!isNaN(mn)&&mn<4.4&&(At=!1)}var Gt,hn;window.location.protocol.substr(0,4)==="http"?Gt=window.location.protocol:Gt="http:";var jt=st.indexOf("//");jt>0?hn=st:jt===0?hn=Gt+st:hn="https://www.geogebra.org/apps/5.2.814.0/";for(var Ft in Pe)if(st.slice(Pe[Ft].length*-1)===Pe[Ft]||st.slice((Pe[Ft].length+1)*-1)===Pe[Ft]+"/"){ht(hn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&At&&!be.is3D&&!be.AV&&!be.SV&&!be.CV&&!be.EV2&&!be.CP&&!be.PC&&!be.DA&&!be.FI&&!be.PV&&!ot(ce.showToolBar)&&!ot(ce.showMenuBar)&&!ot(ce.showAlgebraInput)&&!ot(ce.enableRightClick)&&(!ce.appName||ce.appName=="classic")?hn+="webSimple/":hn+="web3d/",ht(hn,!1)},ht=function(Ye,Je){if(Ye.requirejs){it=Ye;return}Ye.slice(-1)!=="/"&&(Ye+="/"),it=Ye,Je===null&&(Je=Ye.indexOf("http")===-1),Le=Je,Qe="web.nocache.js",at=!1;var At=it.split("/");At.length>1&&(!Je&&At[At.length-2]==="webSimple"?(Qe="webSimple.nocache.js",at=!0):Pe.indexOf(At[At.length-2])>=0&&(Qe=At[At.length-2]+".nocache.js")),At=Ye.split("/"),st=At[At.length-3],st.substr(0,4)==="test"?st=st.substr(4,1)+"."+st.substr(5,1):(st.substr(0,3)==="war"||st.substr(0,4)==="beta")&&(st="5.0");var mn=parseFloat(st);mn!==NaN&&mn<5&&Ye.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+mn+" is deprecated. Using version latest instead."),ye("5.0",Je))},Vt=function(Ye,Je){window.console&&window.console.log&&(!Je||typeof Je.showLogging=="undefined"||Je.showLogging&&Je.showLogging!=="false")&&console.log(Ye)};ce.material_id!==void 0?Ze(Ht):Ht();function Ht(){var Ye=qt;ke!==null?Ye=ke:parseFloat(Ye)<5&&(Ye="5.0"),ye(Ye,!1),Te!==null&&ht(Te,Le),xe=!0}return wn},GGBAppletUtils=function(){"use strict";function wn(){return window.GGBT_wsf_edit!==void 0}function qt(xe,ke){ke!=1?(xe.style.transformOrigin="0% 0% 0px",xe.style.webkitTransformOrigin="0% 0% 0px",xe.style.transform="scale("+ke+","+ke+")",xe.style.webkitTransform="scale("+ke+","+ke+")",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 ce(xe,ke,Te,we,Ee,Oe){var it=null;if(Oe!=null&&Oe!="")for(var Le=xe.parentNode;Le!=null;)if((" "+Le.className+" ").indexOf(" "+Oe+" ")>-1){it=Le;break}else Le=Le.parentNode;var ze=0,st=0,Qe=0,at=0,tt=0,pt=0,Lt=0;if(it)ze=it.offsetWidth,st=Math.max(we?it.offsetWidth:0,it.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ze=Math.min(window.innerWidth,document.documentElement.clientWidth),st=Math.min(window.innerHeight,document.documentElement.clientHeight),Qe=ze):(ze=window.innerWidth,st=window.innerHeight,Qe=window.innerWidth),xe){var Ue=xe.getBoundingClientRect();Ue.left>0&&Ue.left<=ze&&(Ee===void 0||!Ee)&&(document.dir==="rtl"?(tt=ze-Ue.width-Ue.left,pt=Qe<=480?10:30):(pt=Ue.left,tt=Qe<=480?10:30),at=pt+tt)}if(xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Xe=xe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(at=40,Lt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(at=0,Lt=40)}}return xe&&((Te===void 0||!Te)&&ke>0&&ke+at<ze?ze=ke:ze-=at,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Te===void 0||!Te)&&(st-=Lt)),{width:ze,height:st}}function be(xe,ke,Te,we,Ee){if(xe.isScreenshoGenerator)return 1;var Oe=we!==void 0&&we,it=xe.noScaleMargin!=null&&xe.noScaleMargin,Le=function(Xe){return Xe&&Xe!=="false"},ze=Le(xe.autoHeight),st=ce(ke,xe.width,Te,ze,Oe&&window.GGBT_wsf_view||it,Ee),Qe=parseInt(st.width),at=xe.width,tt=xe.height;if(at===void 0){var pt=ke.querySelector(".appletParameters");pt&&(at=pt.offsetWidth,tt=pt.offsetHeight)}var Lt=Qe/at,Ue=Oe?1:st.height/tt;return Te!==void 0&&!Te&&(Lt=Math.min(1,Lt),Ue=Math.min(1,Ue)),Math.min(Lt,Ue)}function We(xe,ke,Te){var we=1,Ee,Oe=!1;if(xe.hasOwnProperty("allowUpscale")&&(Oe=xe.allowUpscale),xe.hasOwnProperty("scale")&&(we=parseFloat(xe.scale),(isNaN(we)||we===null||we===0)&&(we=1),we>1&&(Oe=!0)),ke&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Oe=!0),!(xe.hasOwnProperty("disableAutoScale")&&xe.disableAutoScale))Ee=be(xe,ke,Oe,Te,xe.scaleContainerClass);else return we;return Oe&&(!xe.hasOwnProperty("scale")||we===1)?Ee:Math.min(we,Ee)}function Fe(xe){var ke=Math.min(window.innerWidth,document.documentElement.clientWidth),Te=Math.min(window.innerHeight,document.documentElement.clientHeight),we=xe.getBoundingClientRect(),Ee=(ke-we.width)/2,Oe=(Te-we.height)/2;Oe<0&&(Oe=0),xe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ee<40?xe.style.left="40px":xe.style.left=Ee+"px",xe.style.top=Oe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Oe<40?xe.style.top="40px":xe.style.top=Oe+"px",xe.style.left=Ee+"px")}function ft(xe,ke){var Te=xe.querySelector(".appletParameters");if(Te){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ke.id!==Te.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}if(Te.parentElement&&/fullscreen/.test(Te.parentElement.className))return;var we=We(ke,xe);wn()&&Te.setAttribute("data-param-scale",we);for(var Ee=null,Oe=0;Oe<xe.childNodes.length;Oe++)if(xe.childNodes[Oe].className!==void 0&&xe.childNodes[Oe].className.match(/^applet_scaler/)){Ee=xe.childNodes[Oe];break}if(Ee!==null&&Ee.querySelector(".noscale")!==null)return;var it=ke.id!==void 0?ke.id:"ggbApplet",Le=window[it];(Le==null||!Le.recalculateEnvironments)&&Ee!==null&&!Ee.className.match(/fullscreen/)&&(Ee.parentNode.style.transform="",!isNaN(we)&&we!==1?(Ee.parentNode.style.width=ke.width*we+"px",Ee.parentNode.style.height=ke.height*we+"px",qt(Ee,we)):(qt(Ee,1),Ee.parentNode.style.width=ke.width+"px",Ee.parentNode.style.height=ke.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Fe(xe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Te).parents(".content-added-content"))}}return{responsiveResize:ft,isFlexibleWorksheetEditor:wn,positionCenter:Fe,getScale:We,scaleElement:qt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var wn=n.location.search;return wn.indexOf(J)!=-1||wn.indexOf(K)!=-1}function q(wn,qt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(wn){var qt=s[L].bindings;s[L].bindings=function(){for(var ce=qt?qt():{},be=wn[webModule.__softPermutationId],We=O;We<be.length;We++){var Fe=be[We];ce[Fe[O]]=Fe[P]}return ce}};var t;function u(){return v(),t}function v(){if(!t){var wn=o.createElement(Q);if(wn.id=L,wn.style.cssText=R+S,wn.tabIndex=-1,o.body.appendChild(wn),t=wn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var qt=document.compatMode==U?V:W;t.write(qt+X),t.close()}}}function w(wn){function qt(be){function We(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=We();if(Fe){be();return}function ft(){if(!Fe){if(!We())return;Fe=!0,be(),o.removeEventListener&&o.removeEventListener(Z,ft,!1),xe&&clearInterval(xe)}}o.addEventListener&&o.addEventListener(Z,ft,!1);var xe=setInterval(function(){ft()},$)}function ce(be){var We=u(),Fe=We.body,ft=We.createElement(_);ft.language=ab,ft.crossOrigin=W,ft.src=be,webModule.__errFn&&(ft.onerror=function(){webModule.__errFn(L,new Error(bb+be))}),Fe.appendChild(ft)}qt(function(){ce(wn)})}webModule.__startLoadingFragment=function(wn){return C(wn)},webModule.__installRunAsyncCode=function(wn){var qt=u(),ce=qt.body,be=qt.createElement(_);be.language=ab,be.text=wn,ce.appendChild(be),ce.removeChild(be)};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(wn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(wn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(wn){var qt=c[wn];return qt==null?null:qt},r=d,webModule.__errFn=e}function B(){function wn(xe){var ke=xe.lastIndexOf(rb);ke==-1&&(ke=xe.length);var Te=xe.indexOf(sb);Te==-1&&(Te=xe.length);var we=xe.lastIndexOf(tb,Math.min(Te,ke));return we>=O?xe.substring(O,we+P):W}function qt(xe){if(!xe.match(/^\w+:\/\//)){var ke=o.createElement(ub);ke.src=xe+vb,xe=wn(ke.src)}return xe}function ce(){var xe=__gwt_getMetaProperty(wb);return xe!=null?xe:W}function be(){for(var xe=o.getElementsByTagName(_),ke=O;ke<xe.length;++ke)if(xe[ke].src.indexOf(xb)!=-1)return wn(xe[ke].src);return W}function We(){var xe=o.getElementsByTagName(yb);return xe.length>O?xe[xe.length-P].href:W}function Fe(){var xe=o.location;return xe.href==xe.protocol+zb+xe.host+xe.pathname+xe.search+xe.hash}var ft=ce();return ft==W&&(ft=be()),ft==W&&(ft=We()),ft==W&&Fe()&&(ft=wn(o.location.href)),ft=qt(ft),ft}function C(wn){return wn.match(/^\//)||wn.match(/^[a-zA-Z]+:\/\//)?wn:webModule.__moduleBase+wn}function D(){var wn=[],qt=O,ce=[],be=[];function We(xe){var ke=be[xe](),Te=ce[xe];if(ke in Te)return ke;var we=[];for(var Ee in Te)we[Te[Ee]]=Ee;throw r&&r(xe,we,ke),null}if(__gwt_isKnownPropertyValue=function(xe,ke){return ke in ce[xe]},webModule.__getPropMap=function(){var xe={};for(var ke in ce)ce.hasOwnProperty(ke)&&(xe[ke]=We(ke));return xe},webModule.__computePropValue=We,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var ft=Fe.indexOf(Db);ft!=-1&&(qt=parseInt(Fe.substring(ft+P),$),Fe=Fe.substring(O,ft))}catch(xe){}return webModule.__softPermutationId=qt,C(Fe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase=window.ENV==="build"?"/react/build/js/mathematicalGraphics/"+name+"/":"/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})()},33045:function(wn,qt,ce){"use strict";ce.d(qt,{Ax:function(){return ft},Ds:function(){return xe},KI:function(){return Te},SI:function(){return Fe},f1:function(){return We}});var be=ce(82506);function We(we){let Ee=!0;if(we.length>0){for(let Oe=0;Oe<we.length;Oe++)if(we[Oe].compile_success==0||!we[Oe].compile_success){Ee=!1;break}}else Ee=!1;return Ee}function Fe(we,Ee=""){let Oe=[];for(let it=0;it<we.length;it++){let Le=we[it],ze=Ee?`${Ee}/${Le.name}`:`${Le.name}`;Oe.push({title:Le.name,type:Le.type,isLeaf:Le.type!=="tree",key:ze})}return Oe}function ft(we,Ee,Oe){for(let it=0;it<we.length;it++){let Le=we[it];if(Le.key===Ee){Le.children=Oe;break}Le.children&&ft(Le.children,Ee,Oe)}return we}function xe(we,Ee,Oe){let it;return function(){let Le=this,ze=arguments,st=function(){it=null,Oe||we.apply(Le,ze)},Qe=Oe&&!it;clearTimeout(it),it=setTimeout(st,Ee),Qe&&we.apply(Le,ze)}}const ke=!0,Te=be.Z.API_SERVER},80137:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return it}});var be=ce(59301),We={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=ce(92310),ft=ce.n(Fe),xe=ce(71418),ke=ce(2859),Te=ce(56640),we=ce(5871),Ee=(Le,ze,st)=>new Promise((Qe,at)=>{var tt=Ue=>{try{Lt(st.next(Ue))}catch(Xe){at(Xe)}},pt=Ue=>{try{Lt(st.throw(Ue))}catch(Xe){at(Xe)}},Lt=Ue=>Ue.done?Qe(Ue.value):Promise.resolve(Ue.value).then(tt,pt);Lt((st=st.apply(Le,ze)).next())}),it=({data:Le,className:ze,fullWidth:st,style:Qe={},onClose:at,onOk:tt,showFullTools:pt,noAssociationId:Lt})=>{const Ue=(0,be.useRef)(null),Xe=(0,be.useRef)(null),He=(0,be.useRef)(null),Se=(0,be.useRef)(null),[Ke,Ze]=(0,be.useState)(!1),[gt,je]=(0,be.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,be.useEffect)(()=>{He.current||(He.current=document.createElement("style"),document.head.appendChild(He.current)),Le!=null&&Le.visible?(document.body.setAttribute("data-custom","y-hidden"),He.current.innerHTML=" html { overflow-y: hidden; }",Le!=null&&Le.src&&St()):(document.body.removeAttribute("data-custom"),He.current&&(document.head.removeChild(He.current),He.current=null))},[Le==null?void 0:Le.visible]);const St=()=>Ee(void 0,null,function*(){Ze(!0),je("\u6B63\u5728\u52A0\u8F7D\u4E2D");const rt=yield(0,we.ZJ)(Le==null?void 0:Le.src);Ue.current.src="",Ue.current.src=rt,Ue.current.onload=function(){Dt()},Ze(!1),je("")}),ot=()=>{document.body.removeAttribute("data-custom"),He.current.innerHTML=" ",at()},Et=rt=>Ee(void 0,null,function*(){Ze(!0),je("\u6B63\u5728\u4FDD\u5B58\u4E2D");const yt=yield(0,Te.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Le.title,file:rt.dataUrl}});yt!=null&&yt.id&&!Lt?(yield(0,Te.ZP)(`/api/attachments/${Le.id}/add_subitem.json`,{method:"post",body:{subitem_id:yt==null?void 0:yt.id,settings:JSON.stringify(rt.state)}})).status===0&&tt():yt!=null&&yt.id&&tt(yt),document.body.removeAttribute("data-custom"),He.current.innerHTML=" ",Ze(!1),je("")}),Ge=()=>{const rt=document.querySelector('a[href="https://markerjs.com/"]');rt&&rt.parentNode&&(rt.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(Ct=>{const ct=document.querySelector(Ct.name);ct&&ct.setAttribute("title",Ct.title)})},Dt=()=>{Xe.current=new ke.hP(Ue.current),Xe.current.targetRoot=Se.current,Xe.current.addEventListener("render",Et),Xe.current.addEventListener("beforeclose",ot),pt&&(Xe.current.availableMarkerTypes=Xe.current.ALL_MARKER_TYPES,Xe.current.uiStyleSettings.redoButtonVisible=!0,Xe.current.uiStyleSettings.notesButtonVisible=!0,Xe.current.uiStyleSettings.zoomButtonVisible=!0,Xe.current.uiStyleSettings.zoomOutButtonVisible=!0,Xe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Xe.current.uiStyleSettings,Xe.current.show(),Le!=null&&Le.snapshotData&&Xe.current.restoreState(Le.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ge()},300)};return be.createElement(be.Fragment,null,(Le==null?void 0:Le.visible)&&be.createElement(xe.Z,{spinning:Ke,tip:gt,style:{position:"absolute"}},be.createElement("div",{ref:Se,className:ft()(We.imageDimensions,ze,st?We.fullWidth:""),style:Qe},be.createElement("img",{className:We.img,ref:Ue}))))}},69923:function(wn,qt,ce){"use strict";var be=ce(59301),We=ce(95237),Fe=ce(43604),ft=ce(99313),xe=ce(3113),ke=ce(33754),Te=ce(20699),we=ce(48136),Ee=ce(59301);const Oe=(0,be.forwardRef)(({callback:it,showSaveButton:Le,value:ze=""},st)=>{const Qe=(0,be.useRef)(),at=[{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 "}]}]}],tt=[{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}`}]}]}],pt=Xe=>{Qe.current.setValue(Qe.current.getValue()+" "+Xe.value+" ")},Lt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ee.createElement(We.Z,{className:Te.Z.lists,gutter:[10,10]},at.map((Xe,He)=>Ee.createElement(Fe.Z,{flex:"110px",className:Te.Z.item},Ee.createElement("div",null,Ee.createElement(ke.Z,{value:`$$${Xe.value}$$`}),Xe.name),Ee.createElement("div",{className:Te.Z.children},Xe.children.map((Se,Ke)=>Ee.createElement("div",{key:Ke},Ee.createElement("h1",null,Se.name),Ee.createElement(We.Z,{gutter:[10,10]},Se.data.map((Ze,gt)=>Ee.createElement(Fe.Z,{key:gt,onClick:()=>pt(Ze),className:Te.Z.diamond},Ee.createElement(ke.Z,{value:"`$$"+Ze.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ee.createElement(We.Z,{className:Te.Z.lists,gutter:[10,10]},tt.map((Xe,He)=>Ee.createElement(Fe.Z,{flex:"110px",className:Te.Z.item},Ee.createElement("div",null,Ee.createElement(ke.Z,{value:"`$$"+Xe.value+"$$`"}),Xe.name),Ee.createElement("div",{className:Te.Z.children},Xe.children.map((Se,Ke)=>Ee.createElement("div",{key:Ke},Se.name&&Ee.createElement("h1",null,Se.name),Ee.createElement(We.Z,{gutter:[10,10]},Se.data.map((Ze,gt)=>Ee.createElement(Fe.Z,{key:gt,onClick:()=>pt(Ze),className:Te.Z.diamond},Ee.createElement(ke.Z,{value:"`$$"+Ze.value+"$$`"}))))))))))}],Ue=()=>{var Xe=document.createElement("div");Xe.innerHTML=Qe.current.getValue();var He=Xe.innerText;return it&&it(He),He};return(0,be.useImperativeHandle)(st,()=>({getData:Ue})),Ee.createElement("div",{className:Te.Z.mathWrap},Ee.createElement(ft.default,{defaultActiveKey:"1",items:Lt}),Ee.createElement("math-field",{locale:"zh_cn",className:Te.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Qe,style:{width:800,marginTop:30,fontSize:18}},ze||""),Le&&Ee.createElement("div",{className:Te.Z.button},Ee.createElement(xe.ZP,{size:"large",onClick:Ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});qt.Z=Oe},45326:function(wn,qt,ce){"use strict";ce.d(qt,{h:function(){return Xe}});var be=ce(59301),We=ce(57809),Fe=ce(78241),ft=ce(3113),xe=ce(89780),ke=ce.n(xe),Te=ce(41913),we=ce(8682),Ee=Object.defineProperty,Oe=Object.defineProperties,it=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,Qe=(He,Se,Ke)=>Se in He?Ee(He,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):He[Se]=Ke,at=(He,Se)=>{for(var Ke in Se||(Se={}))ze.call(Se,Ke)&&Qe(He,Ke,Se[Ke]);if(Le)for(var Ke of Le(Se))st.call(Se,Ke)&&Qe(He,Ke,Se[Ke]);return He},tt=(He,Se)=>Oe(He,it(Se));const pt=We.default.Option,Lt={labelCol:{span:4},wrapperCol:{span:20}},Ue={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};qt.Z=({callback:He,onCancel:Se})=>{const[Ke,Ze]=(0,be.useState)("python");function gt(St){Ze(Ue[St][1])}function je(St){He(St)}return be.createElement(Fe.default,tt(at({},Lt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:je,style:{width:500}}),be.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},be.createElement(We.default,{getPopupContainer:St=>St.parentNode,onChange:gt},Object.keys(Ue).map(St=>be.createElement(pt,{key:St,value:St},Ue[St][0])))),be.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},be.createElement(Xe,{mode:Ke})),be.createElement("div",{className:"flex-container flex-end"},be.createElement(ft.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),be.createElement(ft.ZP,{type:"ghost",onClick:Se},"\u53D6\u6D88")))};function Xe({value:He,onChange:Se,mode:Ke,options:Ze={}}){const gt=(0,be.useRef)(),[je,St]=(0,be.useState)();return(0,be.useEffect)(()=>{if(je){let ot=function(Et){const Ge=Et.getValue();Se&&Se(Ge)};return je.on("change",ot),()=>{je.off("change",ot)}}},[je,Se]),(0,be.useEffect)(()=>{je&&je.setOption("mode",Ke)},[je,Ke]),(0,be.useEffect)(()=>{je&&(He!==je.getValue()||He==="")&&setTimeout(()=>{je.setValue(He||"")},300)},[je,He]),(0,be.useEffect)(()=>{if(gt.current&&!je){const ot=ke().fromTextArea(gt.current,at({mode:Ke,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ze));St(ot)}},[gt.current,je]),be.createElement("div",{className:"my-codemirror-container"},be.createElement("textarea",{ref:gt}))}},41722:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return yn}});var be=ce(59301),We=ce(89780),Fe=ce.n(We),ft=ce(76374),xe=ce(41913),ke=ce(6313),Te=ce(25717),we=ce(99498),Ee=ce(25419),Oe=ce(67549),it=ce(33754),Le=({value:pn="",className:xn,showTextOnly:sn,showLines:dn,style:$n={}})=>{const nt=(0,be.useMemo)(()=>"",[pn]);return be.createElement(be.Fragment,null,be.createElement("div",{dangerouslySetInnerHTML:{__html:nt}}))},ze=ce(59301),st=Object.defineProperty,Qe=Object.defineProperties,at=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Ue=(pn,xn,sn)=>xn in pn?st(pn,xn,{enumerable:!0,configurable:!0,writable:!0,value:sn}):pn[xn]=sn,Xe=(pn,xn)=>{for(var sn in xn||(xn={}))pt.call(xn,sn)&&Ue(pn,sn,xn[sn]);if(tt)for(var sn of tt(xn))Lt.call(xn,sn)&&Ue(pn,sn,xn[sn]);return pn},He=(pn,xn)=>Qe(pn,at(xn));let Se=[{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\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",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 Ke({onActionCallback:pn,title:xn,icon:sn,actionName:dn,className:$n="",children:nt}){function _e(){pn(dn)}return ze.createElement("a",{title:xn,className:$n,onClick:_e},ze.createElement("i",{className:`${sn}`}),nt)}var Ze=({watch:pn,showNullButton:xn,showNullProgramButton:sn,onActionCallback:dn,fullScreen:$n,insertTemp:nt,hidetoolBar:_e,extraUse:Ie})=>{const Ae=[...Se,{title:`${pn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${pn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ze.createElement("ul",{className:"markdown-toolbar-container"},!_e&&Ae.map((Be,Ve)=>ze.createElement("li",{key:Ve},Be.actionName?ze.createElement(Ke,He(Xe({},Be),{onActionCallback:dn})):ze.createElement("span",{className:"v-line"}))),xn?ze.createElement("li",null,ze.createElement(Ke,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:dn},ze.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,sn?ze.createElement(ze.Fragment,null,ze.createElement("li",null,ze.createElement(Ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:dn},ze.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),ze.createElement("li",null,ze.createElement(Ke,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:dn},ze.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,nt&&ze.createElement("li",null,ze.createElement(Ke,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${nt}`,onActionCallback:dn},ze.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ie&&ze.createElement("li",null,Ie),ze.createElement("li",{className:"btn-full-screen"},ze.createElement(Ke,{icon:`${$n?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:$n?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:dn})))},gt=ce(55444),je=ce(78241),St=ce(92832),ot=ce(3113),Et=Object.defineProperty,Ge=Object.defineProperties,Dt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,ct=(pn,xn,sn)=>xn in pn?Et(pn,xn,{enumerable:!0,configurable:!0,writable:!0,value:sn}):pn[xn]=sn,Pe=(pn,xn)=>{for(var sn in xn||(xn={}))yt.call(xn,sn)&&ct(pn,sn,xn[sn]);if(rt)for(var sn of rt(xn))Ct.call(xn,sn)&&ct(pn,sn,xn[sn]);return pn},ye=(pn,xn)=>Ge(pn,Dt(xn));const ht={labelCol:{span:4},wrapperCol:{span:20}};var Vt=({callback:pn,onCancel:xn})=>{function sn(dn){pn(dn)}return be.createElement(je.default,ye(Pe({},ht),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:sn,style:{width:500}}),be.createElement(je.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},be.createElement(St.default,null)),be.createElement(je.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},be.createElement(St.default,null)),be.createElement("div",{className:"flex-container flex-end"},be.createElement(ot.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),be.createElement(ot.ZP,{type:"ghost",onClick:xn},"\u53D6\u6D88")))},Ht=ce(45326),Ye=ce(96554),Je=ce(43418),At=ce(95237),mn=ce(80137),Gt=ce(59301),hn=({callback:pn,onCancel:xn})=>{const sn=document.createElement("canvas"),dn=sn.getContext("2d");sn.width=1e3,sn.height=800,dn.fillStyle="#ffffff",dn.fillRect(0,0,sn.width,sn.height);const $n=sn.toDataURL("image/png");return Gt.createElement(Je.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Gt.createElement(At.Z,{style:{height:"100vh"}},Gt.createElement(mn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:$n,visible:!0,title:String(Date.now())},onOk:nt=>{pn({src:nt.url})},onClose:xn})))},jt=ce(43428),Ft=ce(43604),Kt=ce(8591),ge={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},se=ce(59301),de=(0,be.forwardRef)(({onCancel:pn,editImgId:xn,callback:sn},dn)=>{let $n=(0,be.useRef)(),nt=(0,be.useRef)(),_e=(0,be.useRef)(),Ie=(0,be.useRef)(!1);const Ae=(0,be.useRef)(!1);console.log("ref:",dn);const[Be,Ve]=(0,be.useState)(0),[lt,Bt]=(0,be.useState)("100vh");return(0,be.useEffect)(()=>{Ve(1)},[]),(0,be.useImperativeHandle)(dn,()=>({setHeight:Bt})),se.createElement("div",{ref:Ae,className:"body-overflow-initial"},se.createElement(jt.Z,{width:"100vw",height:lt,footer:null,closable:!0,placement:"bottom",open:!!Be,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ge.drawerWrap}`,onClose:()=>{window.saveDrawData(bt=>{sn({src:`/api/attachments/${bt}`,id:bt})})},title:se.createElement(At.Z,{align:"middle"},se.createElement(Ft.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),se.createElement(Ft.Z,{onClick:()=>{Bt(lt==="60px"?"100vh":"60px")}},se.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),se.createElement(Ft.Z,{onClick:()=>{window.saveDrawData(bt=>{if(bt===null){Kt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Kt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),sn({src:`/api/attachments/${bt}`,id:bt,disabledClose:!0})})}},se.createElement(ot.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},se.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${xn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:nt})))}),fe=ce(82506),le=ce(5112),$e=ce(20071);const dt=le.ZP.Group,Rt={margin:"0 8px"};var Pt=({callback:pn,onCancel:xn})=>{function sn(dn){pn(dn)}return be.createElement(je.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:sn},be.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},be.createElement("span",{style:Rt},"\u5355\u5143\u683C\u6570\uFF1A"),be.createElement("span",{style:Rt},"\u884C\u6570"),be.createElement(je.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},be.createElement($e.Z,null)),be.createElement("span",{style:Rt},"\u5217\u6570"),be.createElement(je.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},be.createElement($e.Z,null))),be.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},be.createElement("span",{style:Rt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),be.createElement(je.default.Item,{name:"align"},be.createElement(dt,null,be.createElement(le.ZP,{value:"default"},be.createElement("i",{className:"fa fa-align-justify"})),be.createElement(le.ZP,{value:"left"},be.createElement("i",{className:"fa fa-align-left"})),be.createElement(le.ZP,{value:"center"},be.createElement("i",{className:"fa fa-align-center"})),be.createElement(le.ZP,{value:"right"},be.createElement("i",{className:"fa fa-align-right"}))))),be.createElement("div",{className:"flex-container flex-end"},be.createElement(ot.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),be.createElement(ot.ZP,{type:"ghost",onClick:xn},"\u53D6\u6D88")))},Ut=ce(78673),Xt=ce(5296),en=ce.n(Xt),Sn=(0,be.forwardRef)(({use3d:pn,width:xn,height:sn,callback:dn,showSaveButton:$n},nt)=>{const _e=(0,be.useRef)(),Ie=(0,be.useRef)(),[Ae,Be]=(0,be.useState)(!1),Ve=(0,be.useRef)({id:_e,appName:"graphing",width:xn||1e3,height:sn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,be.useEffect)(()=>{Ie.current=new(en())(Ve.current,!0),window.onload=function(){Ie.current.inject("applet_container")}},[]);const lt=()=>{var Bt=window.ggbApplet.getPNGBase64(1,!0,72);return dn&&dn(Bt),Bt};return(0,be.useEffect)(()=>{Ve.current.appName=Ae?"3D":"graphing",Ie.current.inject("applet_container")},[Ae]),(0,be.useEffect)(()=>{Be(pn)},[pn]),(0,be.useImperativeHandle)(nt,()=>({getImgData:lt})),be.createElement(be.Fragment,null,be.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:_e}),be.createElement(At.Z,{align:"middle"},be.createElement(Ft.Z,{flex:1},be.createElement(Ut.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ae,onChange:Bt=>Be(Bt)})),be.createElement(Ft.Z,null,be.createElement(ot.ZP,{size:"large",onClick:lt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),xt=ce(69923),an=ce(1012);const On="link",ut="upload-image",wt="add-flowchart",Nt="draw-image",Pn="add-flowchart",Bn="code-block",Tn="add-table",nr="------------",mr={default:nr,left:`:${nr}`,center:`:${nr}:`,right:`${nr}:`};var ar=ce(8184),Er=(pn,xn,sn)=>new Promise((dn,$n)=>{var nt=Ae=>{try{Ie(sn.next(Ae))}catch(Be){$n(Be)}},_e=Ae=>{try{Ie(sn.throw(Ae))}catch(Be){$n(Be)}},Ie=Ae=>Ae.done?dn(Ae.value):Promise.resolve(Ae.value).then(nt,_e);Ie((sn=sn.apply(pn,xn)).next())});function _r(){}let Jn=0;const zr=1e4,Wr="\u2581",Vr="@\u2581\u2581@",ei="@\u2581@",Tr=`
|
|
|
**\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`,Yr=["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 xr(pn){return/^\d+$/.test(pn)?`${pn}px`:pn}const qr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",It={[qr+"-B"]:"bold",[qr+"-I"]:"italic"},_n={[On]:"\u6DFB\u52A0\u94FE\u63A5",[Bn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ut]:"\u6DFB\u52A0\u56FE\u7247",[Nt]:"\u6DFB\u52A0\u753B\u56FE",[wt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Tn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var yn=({defaultValue:pn="",onChange:xn,width:sn="100%",height:dn=400,miniToolbar:$n=!1,isFocus:nt=!1,watch:_e,insertTemp:Ie,mode:Ae="markdown",id:Be="markdown-editor-id",showResizeBar:Ve=!1,noStorage:lt=!1,showNullButton:Bt=!1,showNullProgramButton:bt=!1,hidetoolBar:zt=!1,fullScreen:tn=!1,onBlur:cn,onCMBeforeChange:on,onFullScreen:_t,className:Yt="",disablePaste:Dn=!1,disabled:Cn=!1,disabledFill:gn=!1,placeholder:Mn="",values:Fn="",extraUse:un,onAddBlank:Zn})=>{const[et,Tt]=(0,be.useState)(null),[$t,Jt]=(0,be.useState)(pn),[Ot,Zt]=(0,be.useState)(_e),[Wt,nn]=(0,be.useState)(tn),[bn,Ln]=(0,be.useState)(""),[Hn,jn]=(0,be.useState)(0),[rr,cr]=(0,be.useState)(dn),[er,vr]=(0,be.useState)(!1),fr=(0,be.useRef)((0,an.Z)()),pr=(0,be.useRef)(!1),Gn=(0,be.useRef)(),[sr,Xn]=(0,be.useState)(0),[Rn,gr]=(0,be.useState)(0),kr=(0,be.useRef)(),tr=(0,be.useRef)(),kn=(0,be.useRef)(),En=(0,be.useRef)(),dr=(0,be.useRef)(),qn=(0,be.useRef)(),wr=()=>Er(void 0,null,function*(){var Yn;const Un=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:fr.current}});(Yn=Un==null?void 0:Un.attachments)!=null&&Yn.length&&(console.log("cm:",et,kr),Un.attachments.map(Nn=>{Nn.content_type.indexOf("image")>-1?et.replaceSelection(``):Nn.content_type.indexOf("video")>-1?et.replaceSelection(`<video width="100%" controls src="${fe.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Nn.content_type.indexOf("pdf")>-1?et.replaceSelection(`<a href="${fe.Z.API_SERVER}/api/attachments/${Nn.id}?type=${Nn.content_type}&disposition=inline" target="_blank">${Nn.name}</a>`):et.replaceSelection(`[${Nn.name}](${fe.Z.API_SERVER}/api/attachments/${Nn.id}?type=${Nn.content_type})`)}))});(0,be.useEffect)(()=>{const Yn=window.scrollY||window.pageYOffset;Jt(Fn),et==null||et.setValue(Fn),window.scrollTo(0,Yn)},[Fn]),(0,be.useEffect)(()=>{_t==null||_t(Wt)},[Wt]),(0,be.useEffect)(()=>{if(kr.current){let Yn=function(Nn,Kn){var Nr;if(Dn){Kn.preventDefault();return}const ri=Kn.clipboardData;if(ri){const ai=ri.types.toString(),ci=ri.items;if(ai==="Files"||ri.types.indexOf("Files")>-1){if(Kn.preventDefault(),Ae=="stex")return;try{let ti=ci[1];((Nr=ci[0])==null?void 0:Nr.kind)==="file"&&(ti=ci[0]);const fi=ti.getAsFile(),Li=fi.name.split(".").pop();(0,Ye.I)(fi,ki=>{var ta,Yi,Ii;ki.id?((ta=fi==null?void 0:fi.type)==null?void 0:ta.indexOf("image"))>-1?Un.replaceSelection(`<img width="100%" src="/api/attachments/${ki.id}?type=${ki.content_type})" alt="" />`):((Yi=fi==null?void 0:fi.type)==null?void 0:Yi.indexOf("video"))>-1?Un.replaceSelection(`<video width="100%" controls src="/api/attachments/${ki.id}"></video>`):((Ii=fi==null?void 0:fi.type)==null?void 0:Ii.indexOf("pdf"))>-1?Un.replaceSelection(`<a href="/api/attachments/${ki.id}?type=${fi.type}&disposition=inline" target="_blank">${fi.name}</a>`):Yr.includes(Li)?Un.replaceSelection(`<a href="/api/attachments/${ki.id}?type=office&disposition=inline" target="_blank">${fi.name}</a>`):Un.replaceSelection(`[${fi.name}](/api/attachments/${ki.id}?type=${ki.content_type})`):(ki==null?void 0:ki.status)===401&&(Kt.ZP.warning((ki==null?void 0:ki.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(ti){Kt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Un=Fe().fromTextArea(kr.current,{mode:Ae,lineNumbers:!$n,lineWrapping:!0,value:pn,autoCloseTags:!bt,autoCloseBrackets:!0});return Un.on("keyup",function(Nn,Kn){Kn.keyCode===8&&(Nn.getValue()==""?Un.setOption("placeholder",Mn):Un.setOption("placeholder",null))}),Un.on("keydown",function(Nn,Kn){if(Kn.keyCode===8){var Nr=Cr(Nn);Nr&&Kn.preventDefault()}}),nt&&Un.focus(),Un.on("paste",Yn),Un.on("dragleave",function(Nn,Kn){tr.current.classList.remove("mouse-hover-md")}),Cn&&Un.on("beforeChange",function(Nn,Kn){(Kn.origin==="paste"||Kn.origin==="+input")&&Kn.cancel()}),Tt(Un),()=>{Un.off("paste",Yn)}}},[]);const Lr=(0,be.useCallback)(()=>{if(tr.current)try{}catch(Yn){console.log(Yn,"---- to set md editor body height")}},[rr,tr,Wt]);(0,be.useEffect)(()=>{function Yn(){let Un=new ft.Z(Nn=>{for(let Kn of Nn)(Kn.target.offsetHeight>0||Kn.target.offsetWidth>0)&&(Lr(),et.setSize("100%","100%"),et.refresh())});return Un.observe(kr.current.parentElement),Un}if(et){const Un=Yn();return()=>{var Nn,Kn;(Nn=kr.current)!=null&&Nn.parentElement&&Un.unobserve((Kn=kr.current)==null?void 0:Kn.parentElement)}}},[et,Lr]),(0,be.useEffect)(()=>{if(et){let Yn=[];for(const[Un,Nn]of Object.entries(It)){let Kn={[Un]:()=>{Zr(Nn)}};Yn.push(Kn),et.addKeyMap(Kn)}return Gn.current=setInterval(()=>{pr.current&&wr()},4e3),()=>{clearInterval(Gn.current);for(let Un of Yn)et.removeKeyMap(Un)}}},[et]),(0,be.useEffect)(()=>{tn!==Wt&&nn(tn)},[tn]),(0,ar.Z)(()=>{if(!lt&&Hn>0){let Yn=new Date().getTime(),Un=window.sessionStorage.getItem(Be);Yn>=Hn+zr&&(!Un||Un!==$t)&&(window.sessionStorage.setItem(Be,$t),vr(!0))}},zr),(0,be.useEffect)(()=>{Zt(_e)},[et,_e]),(0,be.useEffect)(()=>{et&&nt&&et.focus()},[et,nt]),(0,be.useEffect)(()=>{if(Ot&&et){let Yn=function(Nn){let Kn=Nn.target;if(En.current){let Nr=Kn.scrollTop/Kn.scrollHeight;En.current.scrollTop=En.current.scrollHeight*Nr}};const Un=et.getScrollerElement();return Un.addEventListener("scroll",Yn),()=>{Un.removeEventListener("scroll",Yn)}}},[et,Ot]),(0,be.useEffect)(()=>{if(et&&on){let Yn=function(Un,Nn){on(Un,Nn)};return et.on("beforeChange",Yn),()=>{et.off("beforeChange",Yn)}}},[et,on]),(0,be.useEffect)(()=>{if(et&&cn){let Yn=function(){cn(et.getValue())};return et.on("blur",Yn),()=>{et.off("blur",Yn)}}},[et,cn]);function Cr(Yn,Un){var Nn=Yn.getDoc(),Kn=Nn.getCursor(),Nr=Nn.getLine(Kn.line),ri=Nr.charAt(Kn.ch-1),ai=Nr.lastIndexOf("@\u2581@",Kn.ch),ci=Nr.lastIndexOf("@\u2581\u2581@",Kn.ch),ti=ai>ci?ai:ci,fi=ai>ci?3:4;if(Vr.indexOf(ri)===-1)return null;if(console.log("change1:",Un,Yn,Nr,Kn,ti,ai,ci,ri),ti>=0&&Kn.ch-ti<5){var Li=ti+fi;return Nn.replaceRange("",{line:Kn.line,ch:ti},{line:Kn.line,ch:Li}),{line:Kn.line,ch:Li}}return null}(0,be.useEffect)(()=>{if(et){let Yn=function(Un,Nn){const Kn=Un.getValue();Jt(Kn),jn(new Date().getTime()),Un.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),xn&&(bt?xn(Kn,Hi(Kn)):xn(Kn))};return et.on("change",Yn),()=>{et.off("change",Yn)}}},[et,xn]),(0,be.useEffect)(()=>{if(et)if(pn==null)et.setValue(""),Jt("");else{const Yn=window.scrollY||window.pageYOffset;pn!==et.getValue()&&(et.setValue(pn),Jt(pn),et.setCursor(Cn?1:et.lineCount(),0),window.scrollTo(0,Yn))}},[et,pn]);const Zr=(0,be.useCallback)(Yn=>{const Un=et.getCursor(),Nn=et.getSelection();let Kn=Nn.split(`
|
|
|
`);switch(Yn){case"bold":return et.replaceSelection("**"+Nn+"**"),Nn===""&&et.setCursor(Un.line,Un.ch+2),et.focus();case"italic":return et.replaceSelection("*"+Nn+"*"),Nn===""&&et.setCursor(Un.line,Un.ch+1),et.focus();case"code":return et.replaceSelection("`"+Nn+"`"),Nn===""&&et.setCursor(Un.line,Un.ch+1),et.focus();case"inline-latex":return Ln("inline-latex"),et.focus();case"latex":return et.replaceSelection("```latex\n"+Nn+"\n```"),et.setCursor(Un.line+1,Nn.length+1),et.focus();case"line-break":return et.replaceSelection(`<br/>
|
|
|
`),et.focus();case"list-ul":return Nn===""?et.replaceSelection("- "+Nn):et.replaceSelection(Kn.map(Nr=>Nr===""?"":`- ${Nr}`).join(`
|
|
|
`)),et.focus();case"list-ol":return Nn===""?et.replaceSelection("1. "+Nn):et.replaceSelection(Kn.map((Nr,ri)=>Nr===""?"":`${ri+1}. ${Nr}`).join(`
|
|
|
`)),et.focus();case"add-null-ch":Zn==null||Zn();return;case"add-signal":return Nn===""&&et.setCursor(Un.line,Un.ch),et.replaceSelection(ei),et.focus();case"add-multiple":return Nn===""&&et.setCursor(Un.line,Un.ch),et.replaceSelection(Vr),et.focus();case"inster-template-1":return Nn===""&&et.setCursor(Un.line,Un.ch),et.replaceSelection(Tr),et.focus();case"eraser":return et.setValue(""),et.focus();case"trigger-watch":return Zt(!Ot),et.focus();case"trigger-full-screen":return nn(!Wt),et.focus();case On:Ln(On);return;case Bn:Ln(Bn);return;case ut:Ln(ut);return;case Nt:Ln(Nt);return;case"maths-latex":Ln("maths-latex");return;case wt:dr.current="",sessionStorage.removeItem("file_id"),Ln(wt);return;case Tn:Ln(Tn);return;default:throw new Error}},[et,Ot,Wt]),Or=(0,be.useCallback)((Yn,Un)=>{var Nn,Kn,Nr,ri,ai,ci;Ln("");const{src:ti,alt:fi,id:Li}=Yn||{};switch(bn){case On:const{title:Ra,link:na}=Yn;return et.replaceSelection(`[${Ra}](${na})`),et.focus();case Bn:const{language:va,content:ra}=Yn;return et.replaceSelection(["```"+va,ra,"```"].join(`
|
|
|
`)),et.focus();case"maths-latex":for(var ki=atob(Yn),ta=new Uint8Array(ki.length),Yi=0;Yi<ki.length;Yi++)ta[Yi]=ki.charCodeAt(Yi);var Ii=new Blob([ta],{type:"image/png"});(0,Ye.I)(Ii,ii=>{ii.id?et.replaceSelection(``):(ii==null?void 0:ii.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":et.replaceSelection("`$$"+Yn+"$$`");break;case Pn:if(!Li)return;et.getValue().indexOf(ti)===-1?et.replaceSelection(`<center><img id="${Li}" width="80%" src="${ti}" class="draw-flowchart" alt="${fi||""}" /></center>`):document.getElementById(Li).src=fe.Z.API_SERVER+ti+"?t="+Date.now();break;case ut:case Nt:const Si=Un,$r=(Nr=(Kn=(Nn=Si==null?void 0:Si.name)==null?void 0:Nn.split("."))==null?void 0:Kn.pop)==null?void 0:Nr.call(Kn);return((ri=Si==null?void 0:Si.type)==null?void 0:ri.indexOf("image"))>-1||!(Si!=null&&Si.type)?Si!=null&&Si.align||Si!=null&&Si.width?et.replaceSelection(`<p style="text-align:${Si.align||"initial"}"><img width="${Si.width?Si.width+"%":"initial"}" src="${ti}" alt="${fi||""}" /></p>`):et.replaceSelection(`<img width="100%" src="${ti}" alt="${fi||""}" />`):((ai=Si==null?void 0:Si.type)==null?void 0:ai.indexOf("video"))>-1?et.replaceSelection(`<video width="100%" controls src="${ti}"></video>`):((ci=Si==null?void 0:Si.type)==null?void 0:ci.indexOf("pdf"))>-1?et.replaceSelection(`<a href="${ti}?type=${Si.type}&disposition=inline" target="_blank">${Si.name}</a>`):Yr.includes($r)?et.replaceSelection(`<a href="${ti}?type=office&disposition=inline" target="_blank">${Si.name}</a>`):et.replaceSelection(`[${Si.name}](${ti})`),et.focus();case Tn:const{row:Jr,col:Hr,align:Ir}=Yn;let si=`
|
|
|
`;for(let ii=0;ii<Jr;ii++){let Oi=[],Fi=[];for(let Ri=0;Ri<Hr;Ri++)ii===1&&Fi.push(mr[Ir]),Oi.push(" ");ii===1&&(si+=`| ${Fi.join(" | ")} |
|
|
|
`),si+=`| ${Oi.join(Hr===1?"":" | ")} |
|
|
|
`}return et.replaceSelection(si+`
|
|
|
`),et.focus();default:throw new Error}},[et,bn]),ni=(0,be.useMemo)(()=>{switch(bn){case On:return be.createElement(Vt,{callback:Or,onCancel:ir});case Bn:return be.createElement(Ht.Z,{callback:Or,onCancel:ir});case ut:return be.createElement(Ye.Z,{callback:Or,onCancel:ir});case wt:return be.createElement(de,{editImgId:dr.current,callback:Or,onCancel:ir});case Tn:return be.createElement(Pt,{callback:Or,onCancel:ir});case"maths-latex":return be.createElement(Sn,{showSaveButton:!0,callback:Or});case"inline-latex":return be.createElement(xt.Z,{showSaveButton:!0,callback:Or});default:return null}},[bn]);function ir(){Ln("")}(0,be.useEffect)(()=>{if(kn.current){let Yn=function(ai){Nr=!0,ri=ai.pageY},Un=function(){Nr=!1},Nn=function(ai){if(Nr){let ci=ai.pageY-ri;ci<0&&(ci=0),ci>300&&(ci=300);let ti=dn+ci+"px";cr(ti)}},Kn=kn.current,Nr=!1,ri=0;return Kn.addEventListener("mousedown",Yn),document.addEventListener("mousemove",Nn),document.addEventListener("mouseup",Un),()=>{Kn.removeEventListener("mousedown",Yn),document.removeEventListener("mousemove",Nn),document.removeEventListener("mouseup",Un)}}},[et,kn]),(0,be.useEffect)(()=>{cr(dn)},[dn]);const lr=xr(sn),Dr=xr(rr),Ar={width:lr,height:Dr},ui=(0,be.useMemo)(()=>{if(Hn){let Yn=new Date(Hn),Un=Yn.getHours(),Nn=Yn.getMinutes(),Kn=Yn.getSeconds();return Un=Un<10?"0"+Un:Un,Nn=Nn<10?"0"+Nn:Nn,Kn=Kn<10?"0"+Kn:Kn,`${Un}:${Nn}:${Kn}`}return 0},[Hn]),Hi=Yn=>{const Un=[];if(bt){let Nn=-1;Yn=Yn.replace(/(@▁▁@|@▁@)/g,function(Kn,Nr,ri){Un.push({multiLine:Kn!==ei})})}return Un};function _i(){window.sessionStorage.removeItem(Be),vr(!1),jn(0)}function Qr(){vr(!1),jn(0),et.setValue(window.sessionStorage.getItem(Be))}(0,be.useEffect)(()=>{_n[bn]&&bn!==Nt&&bn!==wt&&setTimeout(()=>{const Yn=document.getElementsByClassName("markdown-popup-form")[0],Un=window.innerWidth/2-Yn.offsetWidth/2,Nn=window.innerHeight/2-Yn.offsetHeight/2;Xn(Un),gr(Nn)},0)},[bn]);const bi=Yn=>{Yn.preventDefault();const Un=Yn.clientX-sr,Nn=Yn.clientY-Rn;document.body.onmousemove=Kn=>{let Nr=Kn.clientX-Un,ri=Kn.clientY-Nn;const ai=document.getElementsByClassName("markdown-popup-form")[0],ci=window.innerWidth-ai.offsetWidth,ti=window.innerHeight-ai.offsetHeight;Nr=Math.max(0,Math.min(Nr,ci)),ri=Math.max(0,Math.min(ri,ti)),mi(Kn.clientX,Kn.clientY,Un,Nn)&&(Xn(Nr),gr(ri))},document.body.onmouseup=function(){document.body.onmousemove=null}},mi=(Yn,Un,Nn,Kn)=>{const Nr=document.body.clientHeight,ri=document.body.clientWidth;return Yn<20&&Nn>Yn||Yn>ri-20&&Nn<Yn||Un<20&&Kn>Un||Un>Nr-20&&Kn<Un?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return be.createElement(be.Fragment,null,be.createElement("div",{className:"markdown-editor-wrapper",ref:tr},be.createElement("div",{className:`markdown-editor-container ${Yt} ${Ot?"on-preview":""} ${$n?"mini":""} ${Wt?"full-screen":""}`,style:Ar},be.createElement(Ze,{insertTemp:Ie,watch:Ot,fullScreen:Wt,showNullButton:Bt,showNullProgramButton:bt,onActionCallback:Zr,hidetoolBar:zt,extraUse:un}),be.createElement("div",{className:"markdown-editor-body"},be.createElement("div",{className:"codemirror-container"},be.createElement("textarea",{ref:kr,placeholder:Mn})),Ot?be.createElement("div",{ref:En,className:"preview-container"},Ae==="stex"&&be.createElement(Le,{value:$t}),Ae!=="stex"&&be.createElement(it.Z,{edit:!0,disabledFill:gn,showProgramFill:bt,value:$t,openEditor:Yn=>{var Un;dr.current=Yn,(Un=qn.current)==null||Un.setHeight("100vh"),setTimeout(()=>{Ln("add-flowchart")},150)}})):null))),Ve?be.createElement("a",{ref:kn,className:"editor-resize"}):null,bn===Nt&&be.createElement(hn,{callback:Or,onCancel:ir}),bn===wt&&be.createElement(de,{ref:qn,editImgId:dr.current,callback:Or,onCancel:ir}),be.createElement(gt.Z,null,_n[bn]&&bn!==Nt&&bn!==wt?be.createElement(Je.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:sr,top:Rn},title:be.createElement("div",{style:{cursor:"move"},onMouseDown:bi},_n[bn]),open:!0,onCancel:ir,footer:null,destroyOnClose:!0,width:bn===wt?"1200px":null,height:bn===wt?"80vh":null,className:"markdown-popup-form"},ni):null))}},96554:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Ke},I:function(){return gt}});var be=ce(78241),We=ce(8591),Fe=ce(92832),ft=ce(81327),xe=ce(20071),ke=ce(5112),Te=ce(3113),we=ce(33045),Ee=ce(59301),Oe=ce(62602),it=ce(59301),Le=Object.defineProperty,ze=Object.defineProperties,st=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,pt=(je,St,ot)=>St in je?Le(je,St,{enumerable:!0,configurable:!0,writable:!0,value:ot}):je[St]=ot,Lt=(je,St)=>{for(var ot in St||(St={}))at.call(St,ot)&&pt(je,ot,St[ot]);if(Qe)for(var ot of Qe(St))tt.call(St,ot)&&pt(je,ot,St[ot]);return je},Ue=(je,St)=>ze(je,st(St));const{useForm:Xe}=be.default,He={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}};var Ke=({callback:je,onCancel:St})=>{const[ot]=Xe();let Et=(0,Ee.useRef)();function Ge(yt){Et.current.width=ot.getFieldValue("width"),Et.current.align=ot.getFieldValue("align"),je(yt,Et.current)}function Dt(yt,Ct){if(yt.status===-1){We.ZP.error(yt.message);return}ot.setFieldsValue({src:`/api/attachments/${yt.id}`,type:Ct.type})}function rt(yt){let Ct=yt.target.files[0];Et.current=Ct,gt(Ct,Dt)}return it.createElement(be.default,Ue(Lt({form:ot},Se),{className:"upload-image-panel",onFinish:Ge,style:{width:470,overflow:"hidden"}}),it.createElement(be.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},it.createElement("div",{className:"flex-container"},it.createElement(be.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},it.createElement(Fe.default,{style:He})),it.createElement(Ze,{onFileChange:rt}))),it.createElement(be.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},it.createElement(Fe.default,{style:{width:264}})),it.createElement(be.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},it.createElement(ft.Z,null,it.createElement(be.default.Item,{name:"width",style:{margin:0}},it.createElement(xe.Z,{style:{width:264}})),it.createElement("span",{className:"ml8"},"%"))),it.createElement(be.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},it.createElement(ke.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"}]})),it.createElement("aside",null,it.createElement(be.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},it.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),it.createElement(Te.ZP,{type:"default",onClick:St},"\u53D6\u6D88"))))};function Ze({onFileChange:je}){return it.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",it.createElement("input",{type:"file",onChange:je}))}function gt(je,St){if(!je)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Oe.bg)())throw We.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let ot=new FormData;ot.append("editormd-image-file",je),ot.append("file_param_name","editormd-image-file"),ot.append("byxhr","true");var Et=new window.XMLHttpRequest;Et.withCredentials=!0,Et.addEventListener("load",function(Ge){St(JSON.parse(Ge.target.responseText),je)},!1),Et.addEventListener("error",function(Ge){console.error(Ge)},!1),Et.open("POST",`${we.KI}/api/attachments.json`),Et.send(ot)}},55444:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Fe}});var be=ce(59301),We=ce(4676);class Fe extends be.Component{constructor(xe){super(xe);const ke=window.document;this.node=ke.createElement("div"),ke.body.appendChild(this.node)}render(){const{children:xe}=this.props;return(0,We.createPortal)(xe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},8184:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return We}});var be=ce(59301);function We(Fe,ft){const xe=(0,be.useRef)();(0,be.useEffect)(()=>{xe.current=Fe}),(0,be.useEffect)(()=>{function ke(){xe.current()}if(ft!==null){let Te=setInterval(ke,ft);return()=>clearInterval(Te)}},[ft])}},35952:function(wn,qt,ce){"use strict";ce.r(qt),ce.d(qt,{default:function(){return Et}});var be=ce(59301),We=ce(41722),Fe=ce(91911),ft=ce(20834),xe=ce(44e3),ke=ce(78241),Te=ce(8591),we=ce(66104),Ee=ce(95237),Oe=ce(43604),it=ce(57809),Le=ce(92832),ze=ce(28103),st=ce(19842),Qe=ce(3113),at=ce(81415),tt={flex_box_center:"flex_box_center___JefHi",flex_space_between:"flex_space_between___N1h0l",flex_box_vertical_center:"flex_box_vertical_center___Mtb4t",flex_box_center_end:"flex_box_center_end___F6G6K",flex_box_column:"flex_box_column___JldFX",bg:"bg___Hgook",title:"title____XaYs",titleLeft:"titleLeft___xe0PB",titleRight:"titleRight___wML5g",btns:"btns___l22_n"},pt=Object.defineProperty,Lt=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable,He=(Ge,Dt,rt)=>Dt in Ge?pt(Ge,Dt,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Ge[Dt]=rt,Se=(Ge,Dt)=>{for(var rt in Dt||(Dt={}))Ue.call(Dt,rt)&&He(Ge,rt,Dt[rt]);if(Lt)for(var rt of Lt(Dt))Xe.call(Dt,rt)&&He(Ge,rt,Dt[rt]);return Ge},Ke=(Ge,Dt)=>{var rt={};for(var yt in Ge)Ue.call(Ge,yt)&&Dt.indexOf(yt)<0&&(rt[yt]=Ge[yt]);if(Ge!=null&&Lt)for(var yt of Lt(Ge))Dt.indexOf(yt)<0&&Xe.call(Ge,yt)&&(rt[yt]=Ge[yt]);return rt},Ze=(Ge,Dt,rt)=>new Promise((yt,Ct)=>{var ct=ht=>{try{ye(rt.next(ht))}catch(Vt){Ct(Vt)}},Pe=ht=>{try{ye(rt.throw(ht))}catch(Vt){Ct(Vt)}},ye=ht=>ht.done?yt(ht.value):Promise.resolve(ht.value).then(ct,Pe);ye((rt=rt.apply(Ge,Dt)).next())});const{SubMenu:gt}=ft.default,{Content:je,Sider:St}=xe.default,ot=Ge=>{var Dt=Ge,{graduation:rt,globalSetting:yt,loading:Ct,user:ct,dispatch:Pe}=Dt,ye=Ke(Dt,["graduation","globalSetting","loading","user","dispatch"]),ht,Vt,Ht,Ye,Je,At,mn;const Gt=(0,Fe.useParams)(),hn=(0,Fe.useLocation)(),{userInfo:jt}=ct,[Ft]=ke.default.useForm(),{addTopicData:Kt}=rt,ge=()=>Ze(void 0,null,function*(){const se=Ft.getFieldsValue(),oe=Se({},se);oe.city&&(oe.province=oe.city[0],oe.city=oe.city[1]);const de=yield Pe({type:"graduation/addTopic",payload:{coursesId:Gt.coursesId,attachment_ids:[],graduation_topic:oe}});de.status?Te.ZP.error(de.message):Fe.history.push(`/classrooms/${Gt.coursesId}/graduation_topics/${Gt.categoryId}`)});return(0,be.useEffect)(()=>{Pe({type:"graduation/addTopicDefaultData",payload:Se({},Gt)})},[Gt.coursesId]),be.createElement("section",{className:"edu-container"},be.createElement("section",{className:"animated fadeIn"},be.createElement("aside",{className:"mt10"},jt&&be.createElement(we.Z,{separator:">"},be.createElement(we.Z.Item,null,be.createElement(Fe.Link,{to:`${jt.first_category_url}`},(ht=jt==null?void 0:jt.course)==null?void 0:ht.course_name)),be.createElement(we.Z.Item,null,be.createElement(Fe.Link,{to:`/classrooms/${Gt.coursesId}/graduation_topics/${Gt.categoryId}`},"\u6BD5\u8BBE\u9009\u9898")),be.createElement(we.Z.Item,null,"\u65B0\u5EFA"))),be.createElement("aside",{className:[tt.title,"mt20"].join(" ")},be.createElement(Ee.Z,{style:{width:"100%"}},be.createElement(Oe.Z,{flex:"1"},be.createElement("strong",{className:"font20 ml5"},"\u65B0\u5EFA\u6BD5\u8BBE\u9009\u9898")),be.createElement(Oe.Z,null,be.createElement(Fe.Link,{className:"font16 c-light-black",to:`/classrooms/${Gt.coursesId}/exercise`},"\u8FD4\u56DE"))))),be.createElement("section",{className:[tt.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},be.createElement(ke.default,{layout:"vertical",form:Ft,scrollToFirstError:!0,onFinish:se=>Ze(void 0,null,function*(){ge()})},be.createElement(ke.default.Item,{name:"tea_id",label:"\u6307\u5BFC\u8001\u5E08\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08"}]},be.createElement(it.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08",style:{width:200}},(Vt=Kt.teacher_list)==null?void 0:Vt.map(function(se,oe){return be.createElement(it.default.Option,{value:se.id,key:oe},se.name)}))),be.createElement(ke.default.Item,{name:"name",label:"\u9009\u9898\u540D\u79F0\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},be.createElement(Le.default,{maxLength:60,size:"middle",placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),be.createElement(ze.Z,null),be.createElement(ke.default.Item,{label:"\u9009\u9898\u7B80\u4ECB",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},be.createElement(We.Z,{watch:!0,placeholder:"\u8BF7\u7B80\u8981\u8BF4\u660E\u9009\u9898\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"})),be.createElement(Ee.Z,{gutter:[20,0]},be.createElement(Oe.Z,{flex:"1"},be.createElement(ke.default.Item,{name:"topic_type"},be.createElement(it.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u7C7B\u578B"},(Ht=Kt.topic_type)==null?void 0:Ht.map(function(se,oe){return be.createElement(it.default.Option,{value:se.id,key:oe},se.name)})))),be.createElement(Oe.Z,{flex:"1"},be.createElement(ke.default.Item,{name:"topic_source"},be.createElement(it.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6765\u6E90"},(Ye=Kt.topic_source)==null?void 0:Ye.map(function(se,oe){return be.createElement(it.default.Option,{value:se.id,key:oe},se.name)})))),be.createElement(Oe.Z,{flex:"1"},be.createElement(ke.default.Item,{name:"topic_property_first"},be.createElement(it.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D281"},(Je=Kt.topic_property_first)==null?void 0:Je.map(function(se,oe){return be.createElement(it.default.Option,{value:se.id,key:oe},se.name)})))),be.createElement(Oe.Z,{flex:"1"},be.createElement(ke.default.Item,{name:"topic_property_second"},be.createElement(it.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D282"},(At=Kt.topic_property_second)==null?void 0:At.map(function(se,oe){return be.createElement(it.default.Option,{value:se.id,key:oe},se.name)})))),be.createElement(Oe.Z,{flex:"150px"})),be.createElement(ze.Z,null),be.createElement(ke.default.Item,{name:"source_unit",label:"\u9009\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"},be.createElement(Le.default,{width:"200",size:"middle",style:{width:200},placeholder:"\u8BF7\u586B\u5199\u6765\u6E90\u5355\u4F4D"})),be.createElement(ke.default.Item,{name:"topic_repeat",label:"\u9009\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"},be.createElement(it.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u91CD\u590D\u60C5\u51B5",style:{width:200}},(mn=Kt.topic_repeat)==null?void 0:mn.map(function(se,oe){return be.createElement(it.default.Option,{value:se.id,key:oe},se.name)}))),be.createElement(ke.default.Item,{name:"city",label:"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"},be.createElement(st.Z,{size:"middle",style:{width:200},options:at.P,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730"})))),be.createElement("aside",{className:tt.btns},be.createElement(Qe.ZP,{type:"primary",onClick:()=>{Ft.submit()}},"\u4FDD\u5B58"),be.createElement(Fe.Link,{to:`/classrooms/${Gt.coursesId}/graduation_topics/${Gt.categoryId}`},"\u53D6\u6D88")))};var Et=(0,Fe.connect)(({graduation:Ge,loading:Dt,user:rt,globalSetting:yt})=>({graduation:Ge,globalSetting:yt,user:rt,loading:Dt.effects}))(ot)},81415:function(wn,qt,ce){"use strict";ce.d(qt,{P:function(){return be}});const be=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},19080:function(wn,qt,ce){"use strict";ce.d(qt,{F:function(){return xe},Z:function(){return ft}});var be=ce(92310),We=ce.n(be);const Fe=null;function ft(ke,Te,we){return We()({[`${ke}-status-success`]:Te==="success",[`${ke}-status-warning`]:Te==="warning",[`${ke}-status-error`]:Te==="error",[`${ke}-status-validating`]:Te==="validating",[`${ke}-has-feedback`]:we})}const xe=(ke,Te)=>Te||ke},66104:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Dt}});var be=ce(92310),We=ce.n(be),Fe=ce(11592),ft=ce(26112),xe=ce(59301),ke=ce(92343),Te=ce(36355),we=ce(84105),Ee=ce(91857);const Oe=rt=>{let{children:yt}=rt;const{getPrefixCls:Ct}=xe.useContext(Te.E_),ct=Ct("breadcrumb");return xe.createElement("li",{className:`${ct}-separator`,"aria-hidden":"true"},yt===""?yt:yt||"/")};Oe.__ANT_BREADCRUMB_SEPARATOR=!0;var it=Oe,Le=function(rt,yt){var Ct={};for(var ct in rt)Object.prototype.hasOwnProperty.call(rt,ct)&&yt.indexOf(ct)<0&&(Ct[ct]=rt[ct]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,ct=Object.getOwnPropertySymbols(rt);Pe<ct.length;Pe++)yt.indexOf(ct[Pe])<0&&Object.prototype.propertyIsEnumerable.call(rt,ct[Pe])&&(Ct[ct[Pe]]=rt[ct[Pe]]);return Ct};function ze(rt,yt){if(rt.title===void 0||rt.title===null)return null;const Ct=Object.keys(yt).join("|");return typeof rt.title=="object"?rt.title:String(rt.title).replace(new RegExp(`:(${Ct})`,"g"),(ct,Pe)=>yt[Pe]||ct)}function st(rt,yt,Ct,ct){if(Ct==null)return null;const{className:Pe,onClick:ye}=yt,ht=Le(yt,["className","onClick"]),Vt=Object.assign(Object.assign({},(0,ft.Z)(ht,{data:!0,aria:!0})),{onClick:ye});return ct!==void 0?xe.createElement("a",Object.assign({},Vt,{className:We()(`${rt}-link`,Pe),href:ct}),Ct):xe.createElement("span",Object.assign({},Vt,{className:We()(`${rt}-link`,Pe)}),Ct)}function Qe(rt,yt){return(ct,Pe,ye,ht,Vt)=>{if(yt)return yt(ct,Pe,ye,ht);const Ht=ze(ct,Pe);return st(rt,ct,Ht,Vt)}}var at=function(rt,yt){var Ct={};for(var ct in rt)Object.prototype.hasOwnProperty.call(rt,ct)&&yt.indexOf(ct)<0&&(Ct[ct]=rt[ct]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,ct=Object.getOwnPropertySymbols(rt);Pe<ct.length;Pe++)yt.indexOf(ct[Pe])<0&&Object.prototype.propertyIsEnumerable.call(rt,ct[Pe])&&(Ct[ct[Pe]]=rt[ct[Pe]]);return Ct};const tt=rt=>{const{prefixCls:yt,separator:Ct="/",children:ct,menu:Pe,overlay:ye,dropdownProps:ht,href:Vt}=rt,Ye=(Je=>{if(Pe||ye){const At=Object.assign({},ht);if(Pe){const mn=Pe||{},{items:Gt}=mn,hn=at(mn,["items"]);At.menu=Object.assign(Object.assign({},hn),{items:Gt==null?void 0:Gt.map((jt,Ft)=>{var{key:Kt,title:ge,label:se,path:oe}=jt,de=at(jt,["key","title","label","path"]);let fe=se!=null?se:ge;return oe&&(fe=xe.createElement("a",{href:`${Vt}${oe}`},fe)),Object.assign(Object.assign({},de),{key:Kt!=null?Kt:Ft,label:fe})})})}else ye&&(At.overlay=ye);return xe.createElement(Ee.Z,Object.assign({placement:"bottom"},At),xe.createElement("span",{className:`${yt}-overlay-link`},Je,xe.createElement(we.Z,null)))}return Je})(ct);return Ye!=null?xe.createElement(xe.Fragment,null,xe.createElement("li",null,Ye),Ct&&xe.createElement(it,null,Ct)):null},pt=rt=>{const{prefixCls:yt,children:Ct,href:ct}=rt,Pe=at(rt,["prefixCls","children","href"]),{getPrefixCls:ye}=xe.useContext(Te.E_),ht=ye("breadcrumb",yt);return xe.createElement(tt,Object.assign({},Pe,{prefixCls:ht}),st(ht,Pe,Ct,ct))};pt.__ANT_BREADCRUMB_ITEM=!0;var Lt=pt,Ue=ce(17313),Xe=ce(83116),He=ce(37613);const Se=rt=>{const{componentCls:yt,iconCls:Ct}=rt;return{[yt]:Object.assign(Object.assign({},(0,Ue.Wf)(rt)),{color:rt.itemColor,fontSize:rt.fontSize,[Ct]:{fontSize:rt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:rt.linkColor,transition:`color ${rt.motionDurationMid}`,padding:`0 ${rt.paddingXXS}px`,borderRadius:rt.borderRadiusSM,height:rt.lineHeight*rt.fontSize,display:"inline-block",marginInline:-rt.marginXXS,"&:hover":{color:rt.linkHoverColor,backgroundColor:rt.colorBgTextHover}},(0,Ue.Qy)(rt)),"li:last-child":{color:rt.lastItemColor},[`${yt}-separator`]:{marginInline:rt.separatorMargin,color:rt.separatorColor},[`${yt}-link`]:{[`
|
|
|
> ${Ct} + span,
|
|
|
> ${Ct} + a
|
|
|
`]:{marginInlineStart:rt.marginXXS}},[`${yt}-overlay-link`]:{borderRadius:rt.borderRadiusSM,height:rt.lineHeight*rt.fontSize,display:"inline-block",padding:`0 ${rt.paddingXXS}px`,marginInline:-rt.marginXXS,[`> ${Ct}`]:{marginInlineStart:rt.marginXXS,fontSize:rt.fontSizeIcon},"&:hover":{color:rt.linkHoverColor,backgroundColor:rt.colorBgTextHover,a:{color:rt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${rt.componentCls}-rtl`]:{direction:"rtl"}})}};var Ke=(0,Xe.Z)("Breadcrumb",rt=>{const yt=(0,He.TS)(rt,{});return[Se(yt)]},rt=>({itemColor:rt.colorTextDescription,lastItemColor:rt.colorText,iconFontSize:rt.fontSize,linkColor:rt.colorTextDescription,linkHoverColor:rt.colorText,separatorColor:rt.colorTextDescription,separatorMargin:rt.marginXS})),Ze=function(rt,yt){var Ct={};for(var ct in rt)Object.prototype.hasOwnProperty.call(rt,ct)&&yt.indexOf(ct)<0&&(Ct[ct]=rt[ct]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,ct=Object.getOwnPropertySymbols(rt);Pe<ct.length;Pe++)yt.indexOf(ct[Pe])<0&&Object.prototype.propertyIsEnumerable.call(rt,ct[Pe])&&(Ct[ct[Pe]]=rt[ct[Pe]]);return Ct};function gt(rt){const{breadcrumbName:yt,children:Ct}=rt,ct=Ze(rt,["breadcrumbName","children"]),Pe=Object.assign({title:yt},ct);return Ct&&(Pe.menu={items:Ct.map(ye=>{var{breadcrumbName:ht}=ye,Vt=Ze(ye,["breadcrumbName"]);return Object.assign(Object.assign({},Vt),{title:ht})})}),Pe}function je(rt,yt){return(0,xe.useMemo)(()=>rt||(yt?yt.map(gt):null),[rt,yt])}var St=function(rt,yt){var Ct={};for(var ct in rt)Object.prototype.hasOwnProperty.call(rt,ct)&&yt.indexOf(ct)<0&&(Ct[ct]=rt[ct]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,ct=Object.getOwnPropertySymbols(rt);Pe<ct.length;Pe++)yt.indexOf(ct[Pe])<0&&Object.prototype.propertyIsEnumerable.call(rt,ct[Pe])&&(Ct[ct[Pe]]=rt[ct[Pe]]);return Ct};const ot=(rt,yt)=>{if(yt===void 0)return yt;let Ct=(yt||"").replace(/^\//,"");return Object.keys(rt).forEach(ct=>{Ct=Ct.replace(`:${ct}`,rt[ct])}),Ct},Et=rt=>{const{prefixCls:yt,separator:Ct="/",style:ct,className:Pe,rootClassName:ye,routes:ht,items:Vt,children:Ht,itemRender:Ye,params:Je={}}=rt,At=St(rt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:mn,direction:Gt,breadcrumb:hn}=xe.useContext(Te.E_);let jt;const Ft=mn("breadcrumb",yt),[Kt,ge]=Ke(Ft),se=je(Vt,ht),oe=Qe(Ft,Ye);if(se&&se.length>0){const le=[],$e=Vt||ht;jt=se.map((dt,Rt)=>{const{path:Pt,key:Ut,type:Xt,menu:en,overlay:ln,onClick:Sn,className:xt,separator:an,dropdownProps:On}=dt,ut=ot(Je,Pt);ut!==void 0&&le.push(ut);const wt=Ut!=null?Ut:Rt;if(Xt==="separator")return xe.createElement(it,{key:wt},an);const Nt={},Pn=Rt===se.length-1;en?Nt.menu=en:ln&&(Nt.overlay=ln);let{href:Bn}=dt;return le.length&&ut!==void 0&&(Bn=`#/${le.join("/")}`),xe.createElement(tt,Object.assign({key:wt},Nt,(0,ft.Z)(dt,{data:!0,aria:!0}),{className:xt,dropdownProps:On,href:Bn,separator:Pn?"":Ct,onClick:Sn,prefixCls:Ft}),oe(dt,Je,$e,le,Bn))})}else if(Ht){const le=(0,Fe.Z)(Ht).length;jt=(0,Fe.Z)(Ht).map(($e,dt)=>{if(!$e)return $e;const Rt=dt===le-1;return(0,ke.Tm)($e,{separator:Rt?"":Ct,key:dt})})}const de=We()(Ft,hn==null?void 0:hn.className,{[`${Ft}-rtl`]:Gt==="rtl"},Pe,ye,ge),fe=Object.assign(Object.assign({},hn==null?void 0:hn.style),ct);return Kt(xe.createElement("nav",Object.assign({className:de,style:fe},At),xe.createElement("ol",null,jt)))};Et.Item=Lt,Et.Separator=it;var Ge=Et,Dt=Ge},19842:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return qr}});var be=ce(94480),We=ce(59301),Fe=ce(33853),ft=ce(58617),xe=ce(38819),ke=ce(92310),Te=ce.n(ke),we=ce(54476),Ee=ce(42978),Oe=ce(75931),it=ce(77861),Le=ce(17115),ze=ce(90782),st=ce(6089),Qe=ce(18929),at=We.createContext(null),tt=at,pt=ce(76190),Lt=ce(20068),Ue=ce(33885),Xe="__rc_cascader_search_mark__",He=function(_n,yn,pn){var xn=pn.label;return yn.some(function(sn){return String(sn[xn]).toLowerCase().includes(_n.toLowerCase())})},Se=function(_n,yn,pn,xn){return yn.map(function(sn){return sn[xn.label]}).join(" / ")},Ke=function(It,_n,yn,pn,xn,sn){var dn=xn.filter,$n=dn===void 0?He:dn,nt=xn.render,_e=nt===void 0?Se:nt,Ie=xn.limit,Ae=Ie===void 0?50:Ie,Be=xn.sort;return We.useMemo(function(){var Ve=[];if(!It)return[];function lt(Bt,bt){var zt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Bt.forEach(function(tn){if(!(!Be&&Ae!==!1&&Ae>0&&Ve.length>=Ae)){var cn=[].concat((0,be.Z)(bt),[tn]),on=tn[yn.children],_t=zt||tn.disabled;if((!on||on.length===0||sn)&&$n(It,cn,{label:yn.label})){var Yt;Ve.push((0,Ue.Z)((0,Ue.Z)({},tn),{},(Yt={disabled:_t},(0,Lt.Z)(Yt,yn.label,_e(It,cn,pn,yn)),(0,Lt.Z)(Yt,Xe,cn),(0,Lt.Z)(Yt,yn.children,void 0),Yt)))}on&<(tn[yn.children],cn,_t)}})}return lt(_n,[]),Be&&Ve.sort(function(Bt,bt){return Be(Bt[Xe],bt[Xe],It,yn)}),Ae!==!1&&Ae>0?Ve.slice(0,Ae):Ve},[It,_n,yn,pn,_e,sn,$n,Be,Ae])},Ze="__RC_CASCADER_SPLIT__",gt="SHOW_PARENT",je="SHOW_CHILD";function St(It){return It.join(Ze)}function ot(It){return It.map(St)}function Et(It){return It.split(Ze)}function Ge(It){var _n=It||{},yn=_n.label,pn=_n.value,xn=_n.children,sn=pn||"value";return{label:yn||"label",value:sn,key:sn,children:xn||"children"}}function Dt(It,_n){var yn,pn;return(yn=It.isLeaf)!==null&&yn!==void 0?yn:!((pn=It[_n.children])!==null&&pn!==void 0&&pn.length)}function rt(It){var _n=It.parentElement;if(_n){var yn=It.offsetTop-_n.offsetTop;yn-_n.scrollTop<0?_n.scrollTo({top:yn}):yn+It.offsetHeight-_n.scrollTop>_n.offsetHeight&&_n.scrollTo({top:yn+It.offsetHeight-_n.offsetHeight})}}function yt(It,_n){return It.map(function(yn){var pn;return(pn=yn[Xe])===null||pn===void 0?void 0:pn.map(function(xn){return xn[_n.value]})})}function Ct(It,_n,yn){var pn=new Set(It),xn=_n();return It.filter(function(sn){var dn=xn[sn],$n=dn?dn.parent:null,nt=dn?dn.children:null;return dn&&dn.node.disabled?!0:yn===je?!(nt&&nt.some(function(_e){return _e.key&&pn.has(_e.key)})):!($n&&!$n.node.disabled&&pn.has($n.key))})}function ct(It,_n,yn){for(var pn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,xn=_n,sn=[],dn=function(){var _e,Ie,Ae,Be=It[$n],Ve=(_e=xn)===null||_e===void 0?void 0:_e.findIndex(function(Bt){var bt=Bt[yn.value];return pn?String(bt)===String(Be):bt===Be}),lt=Ve!==-1?(Ie=xn)===null||Ie===void 0?void 0:Ie[Ve]:null;sn.push({value:(Ae=lt==null?void 0:lt[yn.value])!==null&&Ae!==void 0?Ae:Be,index:Ve,option:lt}),xn=lt==null?void 0:lt[yn.children]},$n=0;$n<It.length;$n+=1)dn();return sn}var Pe=function(It,_n,yn,pn,xn){return We.useMemo(function(){var sn=xn||function(dn){var $n=pn?dn.slice(-1):dn,nt=" / ";return $n.every(function(_e){return["string","number"].includes((0,pt.Z)(_e))})?$n.join(nt):$n.reduce(function(_e,Ie,Ae){var Be=We.isValidElement(Ie)?We.cloneElement(Ie,{key:Ae}):Ie;return Ae===0?[Be]:[].concat((0,be.Z)(_e),[nt,Be])},[])};return It.map(function(dn){var $n,nt,_e=ct(dn,_n,yn),Ie=sn(_e.map(function(Be){var Ve,lt=Be.option,Bt=Be.value;return(Ve=lt==null?void 0:lt[yn.label])!==null&&Ve!==void 0?Ve:Bt}),_e.map(function(Be){var Ve=Be.option;return Ve})),Ae=St(dn);return{label:Ie,value:Ae,key:Ae,valueCells:dn,disabled:($n=_e[_e.length-1])===null||$n===void 0||(nt=$n.option)===null||nt===void 0?void 0:nt.disabled}})},[It,_n,yn,xn,pn])},ye=ce(71430),ht=function(It,_n){var yn=We.useRef({options:null,info:null}),pn=We.useCallback(function(){return yn.current.options!==It&&(yn.current.options=It,yn.current.info=(0,ye.I8)(It,{fieldNames:_n,initWrapper:function(sn){return(0,Ue.Z)((0,Ue.Z)({},sn),{},{pathKeyEntities:{}})},processEntity:function(sn,dn){var $n=sn.nodes.map(function(nt){return nt[_n.value]}).join(Ze);dn.pathKeyEntities[$n]=sn,sn.key=$n}})),yn.current.info.pathKeyEntities},[_n,It]);return pn},Vt=function(It,_n){return We.useCallback(function(yn){var pn=[],xn=[];return yn.forEach(function(sn){var dn=ct(sn,It,_n);dn.every(function($n){return $n.option})?xn.push(sn):pn.push(sn)}),[xn,pn]},[It,_n])},Ht=ce(48736);function Ye(It){return We.useMemo(function(){if(!It)return[!1,{}];var _n={matchInputWidth:!0,limit:50};return It&&(0,pt.Z)(It)==="object"&&(_n=(0,Ue.Z)((0,Ue.Z)({},_n),It)),_n.limit<=0&&delete _n.limit,[!0,_n]},[It])}var Je=We.memo(function(It){var _n=It.children;return _n},function(It,_n){return!_n.open}),At=Je;function mn(It){var _n,yn=It.prefixCls,pn=It.checked,xn=It.halfChecked,sn=It.disabled,dn=It.onClick,$n=It.disableCheckbox,nt=We.useContext(tt),_e=nt.checkable,Ie=typeof _e!="boolean"?_e:null;return We.createElement("span",{className:Te()("".concat(yn),(_n={},(0,Lt.Z)(_n,"".concat(yn,"-checked"),pn),(0,Lt.Z)(_n,"".concat(yn,"-indeterminate"),!pn&&xn),(0,Lt.Z)(_n,"".concat(yn,"-disabled"),sn||$n),_n)),onClick:dn},Ie)}var Gt="__cascader_fix_label__";function hn(It){var _n=It.prefixCls,yn=It.multiple,pn=It.options,xn=It.activeValue,sn=It.prevValuePath,dn=It.onToggleOpen,$n=It.onSelect,nt=It.onActive,_e=It.checkedSet,Ie=It.halfCheckedSet,Ae=It.loadingKeys,Be=It.isSelectable,Ve=It.searchValue,lt="".concat(_n,"-menu"),Bt="".concat(_n,"-menu-item"),bt=We.useContext(tt),zt=bt.fieldNames,tn=bt.changeOnSelect,cn=bt.expandTrigger,on=bt.expandIcon,_t=bt.loadingIcon,Yt=bt.dropdownMenuColumnStyle,Dn=cn==="hover",Cn=We.useMemo(function(){return pn.map(function(gn){var Mn,Fn=gn.disabled,un=gn.disableCheckbox,Zn=gn[Xe],et=(Mn=gn[Gt])!==null&&Mn!==void 0?Mn:gn[zt.label],Tt=gn[zt.value],$t=Dt(gn,zt),Jt=Zn?Zn.map(function(bn){return bn[zt.value]}):[].concat((0,be.Z)(sn),[Tt]),Ot=St(Jt),Zt=Ae.includes(Ot),Wt=_e.has(Ot),nn=Ie.has(Ot);return{disabled:Fn,label:et,value:Tt,isLeaf:$t,isLoading:Zt,checked:Wt,halfChecked:nn,option:gn,disableCheckbox:un,fullPath:Jt,fullPathKey:Ot}})},[pn,_e,zt,Ie,Ae,sn]);return We.createElement("ul",{className:lt,role:"menu"},Cn.map(function(gn){var Mn,Fn=gn.disabled,un=gn.label,Zn=gn.value,et=gn.isLeaf,Tt=gn.isLoading,$t=gn.checked,Jt=gn.halfChecked,Ot=gn.option,Zt=gn.fullPath,Wt=gn.fullPathKey,nn=gn.disableCheckbox,bn=function(){if(!(Fn||Ve)){var rr=(0,be.Z)(Zt);Dn&&et&&rr.pop(),nt(rr)}},Ln=function(){Be(Ot)&&$n(Zt,et)},Hn;return typeof Ot.title=="string"?Hn=Ot.title:typeof un=="string"&&(Hn=un),We.createElement("li",{key:Wt,className:Te()(Bt,(Mn={},(0,Lt.Z)(Mn,"".concat(Bt,"-expand"),!et),(0,Lt.Z)(Mn,"".concat(Bt,"-active"),xn===Zn||xn===Wt),(0,Lt.Z)(Mn,"".concat(Bt,"-disabled"),Fn),(0,Lt.Z)(Mn,"".concat(Bt,"-loading"),Tt),Mn)),style:Yt,role:"menuitemcheckbox",title:Hn,"aria-checked":$t,"data-path-key":Wt,onClick:function(){bn(),!nn&&(!yn||et)&&Ln()},onDoubleClick:function(){tn&&dn(!1)},onMouseEnter:function(){Dn&&bn()},onMouseDown:function(rr){rr.preventDefault()}},yn&&We.createElement(mn,{prefixCls:"".concat(_n,"-checkbox"),checked:$t,halfChecked:Jt,disabled:Fn||nn,disableCheckbox:nn,onClick:function(rr){nn||(rr.stopPropagation(),Ln())}}),We.createElement("div",{className:"".concat(Bt,"-content")},un),!Tt&&on&&!et&&We.createElement("div",{className:"".concat(Bt,"-expand-icon")},on),Tt&&_t&&We.createElement("div",{className:"".concat(Bt,"-loading-icon")},_t))}))}var jt=function(){var It=(0,it.lk)(),_n=It.multiple,yn=It.open,pn=We.useContext(tt),xn=pn.values,sn=We.useState([]),dn=(0,Ee.Z)(sn,2),$n=dn[0],nt=dn[1];return We.useEffect(function(){if(yn&&!_n){var _e=xn[0];nt(_e||[])}},[yn]),[$n,nt]},Ft=ce(10228),Kt=function(It,_n,yn,pn,xn,sn){var dn=(0,it.lk)(),$n=dn.direction,nt=dn.searchValue,_e=dn.toggleOpen,Ie=dn.open,Ae=$n==="rtl",Be=We.useMemo(function(){for(var Yt=-1,Dn=_n,Cn=[],gn=[],Mn=pn.length,Fn=yt(_n,yn),un=function(Ot){var Zt=Dn.findIndex(function(Wt,nn){return(Fn[nn]?St(Fn[nn]):Wt[yn.value])===pn[Ot]});if(Zt===-1)return"break";Yt=Zt,Cn.push(Yt),gn.push(pn[Ot]),Dn=Dn[Yt][yn.children]},Zn=0;Zn<Mn&&Dn;Zn+=1){var et=un(Zn);if(et==="break")break}for(var Tt=_n,$t=0;$t<Cn.length-1;$t+=1)Tt=Tt[Cn[$t]][yn.children];return[gn,Yt,Tt,Fn]},[pn,yn,_n]),Ve=(0,Ee.Z)(Be,4),lt=Ve[0],Bt=Ve[1],bt=Ve[2],zt=Ve[3],tn=function(Dn){xn(Dn)},cn=function(Dn){var Cn=bt.length,gn=Bt;gn===-1&&Dn<0&&(gn=Cn);for(var Mn=0;Mn<Cn;Mn+=1){gn=(gn+Dn+Cn)%Cn;var Fn=bt[gn];if(Fn&&!Fn.disabled){var un=lt.slice(0,-1).concat(zt[gn]?St(zt[gn]):Fn[yn.value]);tn(un);return}}},on=function(){if(lt.length>1){var Dn=lt.slice(0,-1);tn(Dn)}else _e(!1)},_t=function(){var Dn,Cn=((Dn=bt[Bt])===null||Dn===void 0?void 0:Dn[yn.children])||[],gn=Cn.find(function(Fn){return!Fn.disabled});if(gn){var Mn=[].concat((0,be.Z)(lt),[gn[yn.value]]);tn(Mn)}};We.useImperativeHandle(It,function(){return{onKeyDown:function(Dn){var Cn=Dn.which;switch(Cn){case Ft.Z.UP:case Ft.Z.DOWN:{var gn=0;Cn===Ft.Z.UP?gn=-1:Cn===Ft.Z.DOWN&&(gn=1),gn!==0&&cn(gn);break}case Ft.Z.LEFT:{if(nt)break;Ae?_t():on();break}case Ft.Z.RIGHT:{if(nt)break;Ae?on():_t();break}case Ft.Z.BACKSPACE:{nt||on();break}case Ft.Z.ENTER:{if(lt.length){var Mn=bt[Bt],Fn=(Mn==null?void 0:Mn[Xe])||[];Fn.length?sn(Fn.map(function(un){return un[yn.value]}),Fn[Fn.length-1]):sn(lt,bt[Bt])}break}case Ft.Z.ESC:_e(!1),Ie&&Dn.stopPropagation()}},onKeyUp:function(){}}})},ge=We.forwardRef(function(It,_n){var yn,pn,xn,sn,dn=(0,it.lk)(),$n=dn.prefixCls,nt=dn.multiple,_e=dn.searchValue,Ie=dn.toggleOpen,Ae=dn.notFoundContent,Be=dn.direction,Ve=dn.open,lt=We.useRef(),Bt=Be==="rtl",bt=We.useContext(tt),zt=bt.options,tn=bt.values,cn=bt.halfValues,on=bt.fieldNames,_t=bt.changeOnSelect,Yt=bt.onSelect,Dn=bt.searchOptions,Cn=bt.dropdownPrefixCls,gn=bt.loadData,Mn=bt.expandTrigger,Fn=Cn||$n,un=We.useState([]),Zn=(0,Ee.Z)(un,2),et=Zn[0],Tt=Zn[1],$t=function(Rn){if(!(!gn||_e)){var gr=ct(Rn,zt,on),kr=gr.map(function(En){var dr=En.option;return dr}),tr=kr[kr.length-1];if(tr&&!Dt(tr,on)){var kn=St(Rn);Tt(function(En){return[].concat((0,be.Z)(En),[kn])}),gn(kr)}}};We.useEffect(function(){et.length&&et.forEach(function(Xn){var Rn=Et(Xn),gr=ct(Rn,zt,on,!0).map(function(tr){var kn=tr.option;return kn}),kr=gr[gr.length-1];(!kr||kr[on.children]||Dt(kr,on))&&Tt(function(tr){return tr.filter(function(kn){return kn!==Xn})})})},[zt,et,on]);var Jt=We.useMemo(function(){return new Set(ot(tn))},[tn]),Ot=We.useMemo(function(){return new Set(ot(cn))},[cn]),Zt=jt(),Wt=(0,Ee.Z)(Zt,2),nn=Wt[0],bn=Wt[1],Ln=function(Rn){bn(Rn),$t(Rn)},Hn=function(Rn){var gr=Rn.disabled,kr=Dt(Rn,on);return!gr&&(kr||_t||nt)},jn=function(Rn,gr){var kr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Yt(Rn),!nt&&(gr||_t&&(Mn==="hover"||kr))&&Ie(!1)},rr=We.useMemo(function(){return _e?Dn:zt},[_e,Dn,zt]),cr=We.useMemo(function(){for(var Xn=[{options:rr}],Rn=rr,gr=yt(Rn,on),kr=function(){var dr=nn[tr],qn=Rn.find(function(Lr,Cr){return(gr[Cr]?St(gr[Cr]):Lr[on.value])===dr}),wr=qn==null?void 0:qn[on.children];if(!(wr!=null&&wr.length))return"break";Rn=wr,Xn.push({options:wr})},tr=0;tr<nn.length;tr+=1){var kn=kr();if(kn==="break")break}return Xn},[rr,nn,on]),er=function(Rn,gr){Hn(gr)&&jn(Rn,Dt(gr,on),!0)};Kt(_n,rr,on,nn,Ln,er),We.useEffect(function(){for(var Xn=0;Xn<nn.length;Xn+=1){var Rn,gr=nn.slice(0,Xn+1),kr=St(gr),tr=(Rn=lt.current)===null||Rn===void 0?void 0:Rn.querySelector('li[data-path-key="'.concat(kr.replace(/\\{0,2}"/g,'\\"'),'"]'));tr&&rt(tr)}},[nn]);var vr=!((yn=cr[0])!==null&&yn!==void 0&&(pn=yn.options)!==null&&pn!==void 0&&pn.length),fr=[(xn={},(0,Lt.Z)(xn,on.value,"__EMPTY__"),(0,Lt.Z)(xn,Gt,Ae),(0,Lt.Z)(xn,"disabled",!0),xn)],pr=(0,Ue.Z)((0,Ue.Z)({},It),{},{multiple:!vr&&nt,onSelect:jn,onActive:Ln,onToggleOpen:Ie,checkedSet:Jt,halfCheckedSet:Ot,loadingKeys:et,isSelectable:Hn}),Gn=vr?[{options:fr}]:cr,sr=Gn.map(function(Xn,Rn){var gr=nn.slice(0,Rn),kr=nn[Rn];return We.createElement(hn,(0,we.Z)({key:Rn},pr,{searchValue:_e,prefixCls:Fn,options:Xn.options,prevValuePath:gr,activeValue:kr}))});return We.createElement(At,{open:Ve},We.createElement("div",{className:Te()("".concat(Fn,"-menus"),(sn={},(0,Lt.Z)(sn,"".concat(Fn,"-menu-empty"),vr),(0,Lt.Z)(sn,"".concat(Fn,"-rtl"),Bt),sn)),ref:lt},sr))}),se=ge;function oe(It){var _n=It.onPopupVisibleChange,yn=It.popupVisible,pn=It.popupClassName,xn=It.popupPlacement;warning(!_n,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(yn===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(pn===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(xn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function de(It,_n){if(It){var yn=function pn(xn){for(var sn=0;sn<xn.length;sn++){var dn=xn[sn];if(dn[_n==null?void 0:_n.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(dn[_n==null?void 0:_n.children])&&pn(dn[_n==null?void 0:_n.children]))return!0}};yn(It)}}var fe=null,le=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function $e(It){return Array.isArray(It)&&Array.isArray(It[0])}function dt(It){return It?$e(It)?It:(It.length===0?[]:[It]).map(function(_n){return Array.isArray(_n)?_n:[_n]}):[]}var Rt=We.forwardRef(function(It,_n){var yn=It.id,pn=It.prefixCls,xn=pn===void 0?"rc-cascader":pn,sn=It.fieldNames,dn=It.defaultValue,$n=It.value,nt=It.changeOnSelect,_e=It.onChange,Ie=It.displayRender,Ae=It.checkable,Be=It.autoClearSearchValue,Ve=Be===void 0?!0:Be,lt=It.searchValue,Bt=It.onSearch,bt=It.showSearch,zt=It.expandTrigger,tn=It.options,cn=It.dropdownPrefixCls,on=It.loadData,_t=It.popupVisible,Yt=It.open,Dn=It.popupClassName,Cn=It.dropdownClassName,gn=It.dropdownMenuColumnStyle,Mn=It.popupPlacement,Fn=It.placement,un=It.onDropdownVisibleChange,Zn=It.onPopupVisibleChange,et=It.expandIcon,Tt=et===void 0?">":et,$t=It.loadingIcon,Jt=It.children,Ot=It.dropdownMatchSelectWidth,Zt=Ot===void 0?!1:Ot,Wt=It.showCheckedStrategy,nn=Wt===void 0?gt:Wt,bn=(0,Oe.Z)(It,le),Ln=(0,Le.ZP)(yn),Hn=!!Ae,jn=(0,Qe.Z)(dn,{value:$n,postState:dt}),rr=(0,Ee.Z)(jn,2),cr=rr[0],er=rr[1],vr=We.useMemo(function(){return Ge(sn)},[JSON.stringify(sn)]),fr=We.useMemo(function(){return tn||[]},[tn]),pr=ht(fr,vr),Gn=We.useCallback(function(Nn){var Kn=pr();return Nn.map(function(Nr){var ri=Kn[Nr].nodes;return ri.map(function(ai){return ai[vr.value]})})},[pr,vr]),sr=(0,Qe.Z)("",{value:lt,postState:function(Kn){return Kn||""}}),Xn=(0,Ee.Z)(sr,2),Rn=Xn[0],gr=Xn[1],kr=function(Kn,Nr){gr(Kn),Nr.source!=="blur"&&Bt&&Bt(Kn)},tr=Ye(bt),kn=(0,Ee.Z)(tr,2),En=kn[0],dr=kn[1],qn=Ke(Rn,fr,vr,cn||xn,dr,nt),wr=Vt(fr,vr),Lr=We.useMemo(function(){var Nn=wr(cr),Kn=(0,Ee.Z)(Nn,2),Nr=Kn[0],ri=Kn[1];if(!Hn||!cr.length)return[Nr,[],ri];var ai=ot(Nr),ci=pr(),ti=(0,ze.S)(ai,!0,ci),fi=ti.checkedKeys,Li=ti.halfCheckedKeys;return[Gn(fi),Gn(Li),ri]},[Hn,cr,pr,Gn,wr]),Cr=(0,Ee.Z)(Lr,3),Zr=Cr[0],Or=Cr[1],ni=Cr[2],ir=We.useMemo(function(){var Nn=ot(Zr),Kn=Ct(Nn,pr,nn);return[].concat((0,be.Z)(ni),(0,be.Z)(Gn(Kn)))},[Zr,pr,Gn,ni,nn]),lr=Pe(ir,fr,vr,Hn,Ie),Dr=(0,st.Z)(function(Nn){if(er(Nn),_e){var Kn=dt(Nn),Nr=Kn.map(function(ci){return ct(ci,fr,vr).map(function(ti){return ti.option})}),ri=Hn?Kn:Kn[0],ai=Hn?Nr:Nr[0];_e(ri,ai)}}),Ar=(0,st.Z)(function(Nn){if((!Hn||Ve)&&gr(""),!Hn)Dr(Nn);else{var Kn=St(Nn),Nr=ot(Zr),ri=ot(Or),ai=Nr.includes(Kn),ci=ni.some(function(na){return St(na)===Kn}),ti=Zr,fi=ni;if(ci&&!ai)fi=ni.filter(function(na){return St(na)!==Kn});else{var Li=ai?Nr.filter(function(na){return na!==Kn}):[].concat((0,be.Z)(Nr),[Kn]),ki=pr(),ta;if(ai){var Yi=(0,ze.S)(Li,{checked:!1,halfCheckedKeys:ri},ki);ta=Yi.checkedKeys}else{var Ii=(0,ze.S)(Li,!0,ki);ta=Ii.checkedKeys}var Ra=Ct(ta,pr,nn);ti=Gn(Ra)}Dr([].concat((0,be.Z)(fi),(0,be.Z)(ti)))}}),ui=function(Kn,Nr){if(Nr.type==="clear"){Dr([]);return}var ri=Nr.values[0],ai=ri.valueCells;Ar(ai)},Hi=Yt!==void 0?Yt:_t,_i=Cn||Dn,Qr=Fn||Mn,bi=function(Kn){un==null||un(Kn),Zn==null||Zn(Kn)},mi=We.useMemo(function(){return{options:fr,fieldNames:vr,values:Zr,halfValues:Or,changeOnSelect:nt,onSelect:Ar,checkable:Ae,searchOptions:qn,dropdownPrefixCls:cn,loadData:on,expandTrigger:zt,expandIcon:Tt,loadingIcon:$t,dropdownMenuColumnStyle:gn}},[fr,vr,Zr,Or,nt,Ar,Ae,qn,cn,on,zt,Tt,$t,gn]),Yn=!(Rn?qn:fr).length,Un=Rn&&dr.matchInputWidth||Yn?{}:{minWidth:"auto"};return We.createElement(tt.Provider,{value:mi},We.createElement(it.Ac,(0,we.Z)({},bn,{ref:_n,id:Ln,prefixCls:xn,autoClearSearchValue:Ve,dropdownMatchSelectWidth:Zt,dropdownStyle:Un,displayValues:lr,onDisplayValuesChange:ui,mode:Hn?"multiple":void 0,searchValue:Rn,onSearch:kr,showSearch:En,OptionList:se,emptyOptions:Yn,open:Hi,dropdownClassName:_i,placement:Qr,onDropdownVisibleChange:bi,getRawInputElement:function(){return Jt}})))});Rt.SHOW_PARENT=gt,Rt.SHOW_CHILD=je;var Pt=Rt,Ut=Pt,Xt=ce(2738),en=ce(62892),ln=ce(53487),Sn=ce(19080),xt=ce(36355),an=ce(93891),On=ce(1684),ut=ce(19716),wt=ce(32441),Nt=ce(14154),Pn=ce(58582),Bn=ce(84443),Tn=ce(66339),nr=ce(33234),mr=ce(98447),ar=ce(17313),Er=ce(74207),_r=ce(83116);const Jn=It=>{const{prefixCls:_n,componentCls:yn,antCls:pn}=It,xn=`${yn}-menu-item`,sn=`
|
|
|
&${xn}-expand ${xn}-expand-icon,
|
|
|
${xn}-loading-icon
|
|
|
`;return[{[yn]:{width:It.controlWidth}},{[`${yn}-dropdown`]:[(0,mr.C2)(`${_n}-checkbox`,It),{[`&${pn}-select-dropdown`]:{padding:0}},{[yn]:{"&-checkbox":{top:0,marginInlineEnd:It.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${yn}-menu-empty`]:{[`${yn}-menu`]:{width:"100%",height:"auto",[xn]:{color:It.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:It.controlItemWidth,height:It.dropdownHeight,margin:0,padding:It.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${It.lineWidth}px ${It.lineType} ${It.colorSplit}`},"&-item":Object.assign(Object.assign({},ar.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:It.optionPadding,lineHeight:It.lineHeight,cursor:"pointer",transition:`all ${It.motionDurationMid}`,borderRadius:It.borderRadiusSM,"&:hover":{background:It.controlItemBgHover},"&-disabled":{color:It.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[sn]:{color:It.colorTextDisabled}},[`&-active:not(${xn}-disabled)`]:{"&, &:hover":{fontWeight:It.optionSelectedFontWeight,backgroundColor:It.optionSelectedBg}},"&-content":{flex:"auto"},[sn]:{marginInlineStart:It.paddingXXS,color:It.colorTextDescription,fontSize:It.fontSizeIcon},"&-keyword":{color:It.colorHighlight}})}}}]},{[`${yn}-dropdown-rtl`]:{direction:"rtl"}},(0,Er.c)(It)]};var zr=(0,_r.Z)("Cascader",It=>[Jn(It)],It=>{const _n=Math.round((It.controlHeight-It.fontSize*It.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:It.controlItemBgActive,optionSelectedFontWeight:It.fontWeightStrong,optionPadding:`${_n}px ${It.paddingSM}px`,menuPadding:It.paddingXXS}}),Wr=function(It,_n){var yn={};for(var pn in It)Object.prototype.hasOwnProperty.call(It,pn)&&_n.indexOf(pn)<0&&(yn[pn]=It[pn]);if(It!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xn=0,pn=Object.getOwnPropertySymbols(It);xn<pn.length;xn++)_n.indexOf(pn[xn])<0&&Object.prototype.propertyIsEnumerable.call(It,pn[xn])&&(yn[pn[xn]]=It[pn[xn]]);return yn};const{SHOW_CHILD:Vr,SHOW_PARENT:ei}=Ut;function Tr(It,_n,yn){const pn=It.toLowerCase().split(_n).reduce((dn,$n,nt)=>nt===0?[$n]:[].concat((0,be.Z)(dn),[_n,$n]),[]),xn=[];let sn=0;return pn.forEach((dn,$n)=>{const nt=sn+dn.length;let _e=It.slice(sn,nt);sn=nt,$n%2===1&&(_e=We.createElement("span",{className:`${yn}-menu-item-keyword`,key:`separator-${$n}`},_e)),xn.push(_e)}),xn}const Yr=(It,_n,yn,pn)=>{const xn=[],sn=It.toLowerCase();return _n.forEach((dn,$n)=>{$n!==0&&xn.push(" / ");let nt=dn[pn.label];const _e=typeof nt;(_e==="string"||_e==="number")&&(nt=Tr(String(nt),sn,yn)),xn.push(nt)}),xn},xr=We.forwardRef((It,_n)=>{const{prefixCls:yn,size:pn,disabled:xn,className:sn,rootClassName:dn,multiple:$n,bordered:nt=!0,transitionName:_e,choiceTransitionName:Ie="",popupClassName:Ae,dropdownClassName:Be,expandIcon:Ve,placement:lt,showSearch:Bt,allowClear:bt=!0,notFoundContent:zt,direction:tn,getPopupContainer:cn,status:on,showArrow:_t,builtinPlacements:Yt,style:Dn}=It,Cn=Wr(It,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),gn=(0,Xt.Z)(Cn,["suffixIcon"]),{getPopupContainer:Mn,getPrefixCls:Fn,renderEmpty:un,direction:Zn,popupOverflow:et,cascader:Tt}=We.useContext(xt.E_),$t=tn||Zn,Jt=$t==="rtl",{status:Ot,hasFeedback:Zt,isFormItemInput:Wt,feedbackIcon:nn}=We.useContext(wt.aM),bn=(0,Sn.F)(Ot,on),Ln=zt||(un==null?void 0:un("Cascader"))||We.createElement(an.Z,{componentName:"Cascader"}),Hn=Fn(),jn=Fn("select",yn),rr=Fn("cascader",yn),[cr,er]=(0,Nt.Z)(jn),[vr]=zr(rr),{compactSize:fr,compactItemClassnames:pr}=(0,nr.ri)(jn,tn),Gn=Te()(Ae||Be,`${rr}-dropdown`,{[`${rr}-dropdown-rtl`]:$t==="rtl"},dn,er),sr=We.useMemo(()=>{if(!Bt)return Bt;let ni={render:Yr};return typeof Bt=="object"&&(ni=Object.assign(Object.assign({},ni),Bt)),ni},[Bt]),Xn=(0,ut.Z)(ni=>{var ir;return(ir=pn!=null?pn:fr)!==null&&ir!==void 0?ir:ni}),Rn=We.useContext(On.Z),gr=xn!=null?xn:Rn;let kr=Ve;Ve||(kr=Jt?We.createElement(Fe.Z,null):We.createElement(xe.Z,null));const tr=We.createElement("span",{className:`${jn}-menu-item-loading-icon`},We.createElement(ft.Z,{spin:!0})),kn=We.useMemo(()=>$n?We.createElement("span",{className:`${rr}-checkbox-inner`}):!1,[$n]),En=(0,Bn.Z)(It.suffixIcon,_t),{suffixIcon:dr,removeIcon:qn,clearIcon:wr}=(0,Tn.Z)(Object.assign(Object.assign({},It),{hasFeedback:Zt,feedbackIcon:nn,showSuffixIcon:En,multiple:$n,prefixCls:jn,componentName:"Cascader"})),Lr=We.useMemo(()=>lt!==void 0?lt:Jt?"bottomRight":"bottomLeft",[lt,Jt]),Cr=(0,Pn.Z)(Yt,et),Zr=bt===!0?{clearIcon:wr}:bt,Or=We.createElement(Ut,Object.assign({prefixCls:jn,className:Te()(!yn&&rr,{[`${jn}-lg`]:Xn==="large",[`${jn}-sm`]:Xn==="small",[`${jn}-rtl`]:Jt,[`${jn}-borderless`]:!nt,[`${jn}-in-form-item`]:Wt},(0,Sn.Z)(jn,bn,Zt),pr,Tt==null?void 0:Tt.className,sn,dn,er),disabled:gr,style:Object.assign(Object.assign({},Tt==null?void 0:Tt.style),Dn)},gn,{builtinPlacements:Cr,direction:$t,placement:Lr,notFoundContent:Ln,allowClear:Zr,showSearch:sr,expandIcon:kr,suffixIcon:dr,removeIcon:qn,loadingIcon:tr,checkable:kn,dropdownClassName:Gn,dropdownPrefixCls:yn||rr,choiceTransitionName:(0,en.m)(Hn,"",Ie),transitionName:(0,en.m)(Hn,"slide-up",_e),getPopupContainer:cn||Mn,ref:_n}));return vr(cr(Or))}),Ur=(0,ln.Z)(xr);xr.SHOW_PARENT=ei,xr.SHOW_CHILD=Vr,xr._InternalPanelDoNotUseOrYouWillBeFired=Ur;var qr=xr},98447:function(wn,qt,ce){"use strict";ce.d(qt,{C2:function(){return xe}});var be=ce(17313),We=ce(37613),Fe=ce(83116);const ft=ke=>{const{checkboxCls:Te}=ke,we=`${Te}-wrapper`;return[{[`${Te}-group`]:Object.assign(Object.assign({},(0,be.Wf)(ke)),{display:"inline-flex",flexWrap:"wrap",columnGap:ke.marginXS,[`> ${ke.antCls}-row`]:{flex:1}}),[we]:Object.assign(Object.assign({},(0,be.Wf)(ke)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${we}`]:{marginInlineStart:0},[`&${we}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Te]:Object.assign(Object.assign({},(0,be.Wf)(ke)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:ke.borderRadiusSM,alignSelf:"center",[`${Te}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Te}-inner`]:Object.assign({},(0,be.oN)(ke))},[`${Te}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:ke.checkboxSize,height:ke.checkboxSize,direction:"ltr",backgroundColor:ke.colorBgContainer,border:`${ke.lineWidth}px ${ke.lineType} ${ke.colorBorder}`,borderRadius:ke.borderRadiusSM,borderCollapse:"separate",transition:`all ${ke.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:ke.checkboxSize/14*5,height:ke.checkboxSize/14*8,border:`${ke.lineWidthBold}px solid ${ke.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${ke.motionDurationFast} ${ke.motionEaseInBack}, opacity ${ke.motionDurationFast}`}},"& + span":{paddingInlineStart:ke.paddingXS,paddingInlineEnd:ke.paddingXS}})},{[`
|
|
|
${we}:not(${we}-disabled),
|
|
|
${Te}:not(${Te}-disabled)
|
|
|
`]:{[`&:hover ${Te}-inner`]:{borderColor:ke.colorPrimary}},[`${we}:not(${we}-disabled)`]:{[`&:hover ${Te}-checked:not(${Te}-disabled) ${Te}-inner`]:{backgroundColor:ke.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Te}-checked:not(${Te}-disabled):after`]:{borderColor:ke.colorPrimaryHover}}},{[`${Te}-checked`]:{[`${Te}-inner`]:{backgroundColor:ke.colorPrimary,borderColor:ke.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${ke.motionDurationMid} ${ke.motionEaseOutBack} ${ke.motionDurationFast}`}}},[`
|
|
|
${we}-checked:not(${we}-disabled),
|
|
|
${Te}-checked:not(${Te}-disabled)
|
|
|
`]:{[`&:hover ${Te}-inner`]:{backgroundColor:ke.colorPrimaryHover,borderColor:"transparent"}}},{[Te]:{"&-indeterminate":{[`${Te}-inner`]:{backgroundColor:ke.colorBgContainer,borderColor:ke.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:ke.fontSizeLG/2,height:ke.fontSizeLG/2,backgroundColor:ke.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${we}-disabled`]:{cursor:"not-allowed"},[`${Te}-disabled`]:{[`&, ${Te}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Te}-inner`]:{background:ke.colorBgContainerDisabled,borderColor:ke.colorBorder,"&:after":{borderColor:ke.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:ke.colorTextDisabled},[`&${Te}-indeterminate ${Te}-inner::after`]:{background:ke.colorTextDisabled}}}]};function xe(ke,Te){const we=(0,We.TS)(Te,{checkboxCls:`.${ke}`,checkboxSize:Te.controlInteractiveSize});return[ft(we)]}qt.ZP=(0,Fe.Z)("Checkbox",(ke,Te)=>{let{prefixCls:we}=Te;return[xe(we,ke)]})},93891:function(wn,qt,ce){"use strict";var be=ce(59301),We=ce(36355),Fe=ce(64165);const ft=xe=>{const{componentName:ke}=xe,{getPrefixCls:Te}=(0,be.useContext)(We.E_),we=Te("empty");switch(ke){case"Table":case"List":return be.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return be.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE,className:`${we}-small`});default:return be.createElement(Fe.Z,null)}};qt.Z=ft},28103:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Le}});var be=ce(92310),We=ce.n(be),Fe=ce(59301),ft=ce(36355),xe=ce(17313),ke=ce(83116),Te=ce(37613);const we=ze=>{const{componentCls:st,sizePaddingEdgeHorizontal:Qe,colorSplit:at,lineWidth:tt,textPaddingInline:pt,orientationMargin:Lt,verticalMarginInline:Ue}=ze;return{[st]:Object.assign(Object.assign({},(0,xe.Wf)(ze)),{borderBlockStart:`${tt}px solid ${at}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:Ue,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${tt}px solid ${at}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ze.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${st}-with-text`]:{display:"flex",alignItems:"center",margin:`${ze.dividerHorizontalWithTextGutterMargin}px 0`,color:ze.colorTextHeading,fontWeight:500,fontSize:ze.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${at}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${tt}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${st}-with-text-left`]:{"&::before":{width:`${Lt*100}%`},"&::after":{width:`${100-Lt*100}%`}},[`&-horizontal${st}-with-text-right`]:{"&::before":{width:`${100-Lt*100}%`},"&::after":{width:`${Lt*100}%`}},[`${st}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:pt},"&-dashed":{background:"none",borderColor:at,borderStyle:"dashed",borderWidth:`${tt}px 0 0`},[`&-horizontal${st}-with-text${st}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${st}-dashed`]:{borderInlineStartWidth:tt,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${st}-with-text`]:{color:ze.colorText,fontWeight:"normal",fontSize:ze.fontSize},[`&-horizontal${st}-with-text-left${st}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${st}-inner-text`]:{paddingInlineStart:Qe}},[`&-horizontal${st}-with-text-right${st}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${st}-inner-text`]:{paddingInlineEnd:Qe}}})}};var Ee=(0,ke.Z)("Divider",ze=>{const st=(0,Te.TS)(ze,{dividerHorizontalWithTextGutterMargin:ze.margin,dividerHorizontalGutterMargin:ze.marginLG,sizePaddingEdgeHorizontal:0});return[we(st)]},ze=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:ze.marginXS})),Oe=function(ze,st){var Qe={};for(var at in ze)Object.prototype.hasOwnProperty.call(ze,at)&&st.indexOf(at)<0&&(Qe[at]=ze[at]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,at=Object.getOwnPropertySymbols(ze);tt<at.length;tt++)st.indexOf(at[tt])<0&&Object.prototype.propertyIsEnumerable.call(ze,at[tt])&&(Qe[at[tt]]=ze[at[tt]]);return Qe},Le=ze=>{const{getPrefixCls:st,direction:Qe,divider:at}=Fe.useContext(ft.E_),{prefixCls:tt,type:pt="horizontal",orientation:Lt="center",orientationMargin:Ue,className:Xe,rootClassName:He,children:Se,dashed:Ke,plain:Ze,style:gt}=ze,je=Oe(ze,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),St=st("divider",tt),[ot,Et]=Ee(St),Ge=Lt.length>0?`-${Lt}`:Lt,Dt=!!Se,rt=Lt==="left"&&Ue!=null,yt=Lt==="right"&&Ue!=null,Ct=We()(St,at==null?void 0:at.className,Et,`${St}-${pt}`,{[`${St}-with-text`]:Dt,[`${St}-with-text${Ge}`]:Dt,[`${St}-dashed`]:!!Ke,[`${St}-plain`]:!!Ze,[`${St}-rtl`]:Qe==="rtl",[`${St}-no-default-orientation-margin-left`]:rt,[`${St}-no-default-orientation-margin-right`]:yt},Xe,He),ct=Fe.useMemo(()=>typeof Ue=="number"?Ue:/^\d+$/.test(Ue)?Number(Ue):Ue,[Ue]),Pe=Object.assign(Object.assign({},rt&&{marginLeft:ct}),yt&&{marginRight:ct});return ot(Fe.createElement("div",Object.assign({className:Ct,style:Object.assign(Object.assign({},at==null?void 0:at.style),gt)},je,{role:"separator"}),Se&&pt!=="vertical"&&Fe.createElement("span",{className:`${St}-inner-text`,style:Pe},Se)))}},43428:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return jt}});var be=ce(92310),We=ce.n(be),Fe=ce(33885),ft=ce(42978),xe=ce(43403),ke=ce(34280),Te=ce(59301),we=Te.createContext(null),Ee=Te.createContext({}),Oe=we,it=ce(20068),Le=ce(54476),ze=ce(77900),st=ce(10228),Qe=ce(26112),at=ce(70425),tt=function(Kt){var ge=Kt.prefixCls,se=Kt.className,oe=Kt.style,de=Kt.children,fe=Kt.containerRef,le=Kt.id,$e=Kt.onMouseEnter,dt=Kt.onMouseOver,Rt=Kt.onMouseLeave,Pt=Kt.onClick,Ut=Kt.onKeyDown,Xt=Kt.onKeyUp,en={onMouseEnter:$e,onMouseOver:dt,onMouseLeave:Rt,onClick:Pt,onKeyDown:Ut,onKeyUp:Xt},ln=Te.useContext(Ee),Sn=ln.panel,xt=(0,at.useComposeRef)(Sn,fe);return Te.createElement(Te.Fragment,null,Te.createElement("div",(0,Le.Z)({id:le,className:We()("".concat(ge,"-content"),se),style:(0,Fe.Z)({},oe),"aria-modal":"true",role:"dialog",ref:xt},en),de))},pt=tt,Lt=ce(48736);function Ue(Ft){return typeof Ft=="string"&&String(Number(Ft))===Ft?((0,Lt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ft)):Ft}function Xe(Ft){warning(!("wrapperClassName"in Ft),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ft.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var He={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Se(Ft,Kt){var ge,se,oe,de,fe=Ft.prefixCls,le=Ft.open,$e=Ft.placement,dt=Ft.inline,Rt=Ft.push,Pt=Ft.forceRender,Ut=Ft.autoFocus,Xt=Ft.keyboard,en=Ft.rootClassName,ln=Ft.rootStyle,Sn=Ft.zIndex,xt=Ft.className,an=Ft.id,On=Ft.style,ut=Ft.motion,wt=Ft.width,Nt=Ft.height,Pn=Ft.children,Bn=Ft.contentWrapperStyle,Tn=Ft.mask,nr=Ft.maskClosable,mr=Ft.maskMotion,ar=Ft.maskClassName,Er=Ft.maskStyle,_r=Ft.afterOpenChange,Jn=Ft.onClose,zr=Ft.onMouseEnter,Wr=Ft.onMouseOver,Vr=Ft.onMouseLeave,ei=Ft.onClick,Tr=Ft.onKeyDown,Yr=Ft.onKeyUp,xr=Te.useRef(),Ur=Te.useRef(),qr=Te.useRef();Te.useImperativeHandle(Kt,function(){return xr.current});var It=function(bt){var zt=bt.keyCode,tn=bt.shiftKey;switch(zt){case st.Z.TAB:{if(zt===st.Z.TAB){if(!tn&&document.activeElement===qr.current){var cn;(cn=Ur.current)===null||cn===void 0||cn.focus({preventScroll:!0})}else if(tn&&document.activeElement===Ur.current){var on;(on=qr.current)===null||on===void 0||on.focus({preventScroll:!0})}}break}case st.Z.ESC:{Jn&&Xt&&(bt.stopPropagation(),Jn(bt));break}}};Te.useEffect(function(){if(le&&Ut){var Bt;(Bt=xr.current)===null||Bt===void 0||Bt.focus({preventScroll:!0})}},[le]);var _n=Te.useState(!1),yn=(0,ft.Z)(_n,2),pn=yn[0],xn=yn[1],sn=Te.useContext(Oe),dn;Rt===!1?dn={distance:0}:Rt===!0?dn={}:dn=Rt||{};var $n=(ge=(se=(oe=dn)===null||oe===void 0?void 0:oe.distance)!==null&&se!==void 0?se:sn==null?void 0:sn.pushDistance)!==null&&ge!==void 0?ge:180,nt=Te.useMemo(function(){return{pushDistance:$n,push:function(){xn(!0)},pull:function(){xn(!1)}}},[$n]);Te.useEffect(function(){if(le){var Bt;sn==null||(Bt=sn.push)===null||Bt===void 0||Bt.call(sn)}else{var bt;sn==null||(bt=sn.pull)===null||bt===void 0||bt.call(sn)}},[le]),Te.useEffect(function(){return function(){var Bt;sn==null||(Bt=sn.pull)===null||Bt===void 0||Bt.call(sn)}},[]);var _e=Tn&&Te.createElement(ze.default,(0,Le.Z)({key:"mask"},mr,{visible:le}),function(Bt,bt){var zt=Bt.className,tn=Bt.style;return Te.createElement("div",{className:We()("".concat(fe,"-mask"),zt,ar),style:(0,Fe.Z)((0,Fe.Z)({},tn),Er),onClick:nr&&le?Jn:void 0,ref:bt})}),Ie=typeof ut=="function"?ut($e):ut,Ae={};if(pn&&$n)switch($e){case"top":Ae.transform="translateY(".concat($n,"px)");break;case"bottom":Ae.transform="translateY(".concat(-$n,"px)");break;case"left":Ae.transform="translateX(".concat($n,"px)");break;default:Ae.transform="translateX(".concat(-$n,"px)");break}$e==="left"||$e==="right"?Ae.width=Ue(wt):Ae.height=Ue(Nt);var Be={onMouseEnter:zr,onMouseOver:Wr,onMouseLeave:Vr,onClick:ei,onKeyDown:Tr,onKeyUp:Yr},Ve=Te.createElement(ze.default,(0,Le.Z)({key:"panel"},Ie,{visible:le,forceRender:Pt,onVisibleChanged:function(bt){_r==null||_r(bt)},removeOnLeave:!1,leavedClassName:"".concat(fe,"-content-wrapper-hidden")}),function(Bt,bt){var zt=Bt.className,tn=Bt.style;return Te.createElement("div",(0,Le.Z)({className:We()("".concat(fe,"-content-wrapper"),zt),style:(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Ae),tn),Bn)},(0,Qe.Z)(Ft,{data:!0})),Te.createElement(pt,(0,Le.Z)({id:an,containerRef:bt,prefixCls:fe,className:xt,style:On},Be),Pn))}),lt=(0,Fe.Z)({},ln);return Sn&&(lt.zIndex=Sn),Te.createElement(Oe.Provider,{value:nt},Te.createElement("div",{className:We()(fe,"".concat(fe,"-").concat($e),en,(de={},(0,it.Z)(de,"".concat(fe,"-open"),le),(0,it.Z)(de,"".concat(fe,"-inline"),dt),de)),style:lt,tabIndex:-1,ref:xr,onKeyDown:It},_e,Te.createElement("div",{tabIndex:0,ref:Ur,style:He,"aria-hidden":"true","data-sentinel":"start"}),Ve,Te.createElement("div",{tabIndex:0,ref:qr,style:He,"aria-hidden":"true","data-sentinel":"end"})))}var Ke=Te.forwardRef(Se),Ze=Ke,gt=function(Kt){var ge=Kt.open,se=ge===void 0?!1:ge,oe=Kt.prefixCls,de=oe===void 0?"rc-drawer":oe,fe=Kt.placement,le=fe===void 0?"right":fe,$e=Kt.autoFocus,dt=$e===void 0?!0:$e,Rt=Kt.keyboard,Pt=Rt===void 0?!0:Rt,Ut=Kt.width,Xt=Ut===void 0?378:Ut,en=Kt.mask,ln=en===void 0?!0:en,Sn=Kt.maskClosable,xt=Sn===void 0?!0:Sn,an=Kt.getContainer,On=Kt.forceRender,ut=Kt.afterOpenChange,wt=Kt.destroyOnClose,Nt=Kt.onMouseEnter,Pn=Kt.onMouseOver,Bn=Kt.onMouseLeave,Tn=Kt.onClick,nr=Kt.onKeyDown,mr=Kt.onKeyUp,ar=Kt.panelRef,Er=Te.useState(!1),_r=(0,ft.Z)(Er,2),Jn=_r[0],zr=_r[1],Wr=Te.useState(!1),Vr=(0,ft.Z)(Wr,2),ei=Vr[0],Tr=Vr[1];(0,ke.Z)(function(){Tr(!0)},[]);var Yr=ei?se:!1,xr=Te.useRef(),Ur=Te.useRef();(0,ke.Z)(function(){Yr&&(Ur.current=document.activeElement)},[Yr]);var qr=function(xn){var sn;if(zr(xn),ut==null||ut(xn),!xn&&Ur.current&&!((sn=xr.current)!==null&&sn!==void 0&&sn.contains(Ur.current))){var dn;(dn=Ur.current)===null||dn===void 0||dn.focus({preventScroll:!0})}},It=Te.useMemo(function(){return{panel:ar}},[ar]);if(!On&&!Jn&&!Yr&&wt)return null;var _n={onMouseEnter:Nt,onMouseOver:Pn,onMouseLeave:Bn,onClick:Tn,onKeyDown:nr,onKeyUp:mr},yn=(0,Fe.Z)((0,Fe.Z)({},Kt),{},{open:Yr,prefixCls:de,placement:le,autoFocus:dt,keyboard:Pt,width:Xt,mask:ln,maskClosable:xt,inline:an===!1,afterOpenChange:qr,ref:xr},_n);return Te.createElement(Ee.Provider,{value:It},Te.createElement(xe.Z,{open:Yr||On||Jn,autoDestroy:!1,getContainer:an,autoLock:ln&&(Yr||Jn)},Te.createElement(Ze,yn)))},je=gt,St=je,ot=ce(62892),Et=ce(36355),Ge=ce(32441),Dt=ce(47729),yt=Ft=>{const{prefixCls:Kt,title:ge,footer:se,extra:oe,closeIcon:de,closable:fe,onClose:le,headerStyle:$e,drawerStyle:dt,bodyStyle:Rt,footerStyle:Pt,children:Ut}=Ft,Xt=Te.useCallback(an=>Te.createElement("button",{type:"button",onClick:le,"aria-label":"Close",className:`${Kt}-close`},an),[le]),[en,ln]=(0,Dt.Z)(fe,de,Xt,void 0,!0),Sn=Te.useMemo(()=>!ge&&!en?null:Te.createElement("div",{style:$e,className:We()(`${Kt}-header`,{[`${Kt}-header-close-only`]:en&&!ge&&!oe})},Te.createElement("div",{className:`${Kt}-header-title`},ln,ge&&Te.createElement("div",{className:`${Kt}-title`},ge)),oe&&Te.createElement("div",{className:`${Kt}-extra`},oe)),[en,ln,oe,$e,Kt,ge]),xt=Te.useMemo(()=>{if(!se)return null;const an=`${Kt}-footer`;return Te.createElement("div",{className:an,style:Pt},se)},[se,Pt,Kt]);return Te.createElement("div",{className:`${Kt}-wrapper-body`,style:dt},Sn,Te.createElement("div",{className:`${Kt}-body`,style:Rt},Ut),xt)},Ct=ce(33234),ct=ce(83116),Pe=ce(37613),ht=Ft=>{const{componentCls:Kt,motionDurationSlow:ge}=Ft,se={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${ge}`}}};return{[Kt]:{[`${Kt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${ge}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Kt}-panel-motion`]:{"&-left":[se,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[se,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[se,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[se,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Vt=Ft=>{const{componentCls:Kt,zIndexPopup:ge,colorBgMask:se,colorBgElevated:oe,motionDurationSlow:de,motionDurationMid:fe,padding:le,paddingLG:$e,fontSizeLG:dt,lineHeightLG:Rt,lineWidth:Pt,lineType:Ut,colorSplit:Xt,marginSM:en,colorIcon:ln,colorIconHover:Sn,colorText:xt,fontWeightStrong:an,footerPaddingBlock:On,footerPaddingInline:ut}=Ft,wt=`${Kt}-content-wrapper`;return{[Kt]:{position:"fixed",inset:0,zIndex:ge,pointerEvents:"none","&-pure":{position:"relative",background:oe,[`&${Kt}-left`]:{boxShadow:Ft.boxShadowDrawerLeft},[`&${Kt}-right`]:{boxShadow:Ft.boxShadowDrawerRight},[`&${Kt}-top`]:{boxShadow:Ft.boxShadowDrawerUp},[`&${Kt}-bottom`]:{boxShadow:Ft.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Kt}-mask`]:{position:"absolute",inset:0,zIndex:ge,background:se,pointerEvents:"auto"},[wt]:{position:"absolute",zIndex:ge,maxWidth:"100vw",transition:`all ${de}`,"&-hidden":{display:"none"}},[`&-left > ${wt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Ft.boxShadowDrawerLeft},[`&-right > ${wt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Ft.boxShadowDrawerRight},[`&-top > ${wt}`]:{top:0,insetInline:0,boxShadow:Ft.boxShadowDrawerUp},[`&-bottom > ${wt}`]:{bottom:0,insetInline:0,boxShadow:Ft.boxShadowDrawerDown},[`${Kt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:oe,pointerEvents:"auto"},[`${Kt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Kt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${le}px ${$e}px`,fontSize:dt,lineHeight:Rt,borderBottom:`${Pt}px ${Ut} ${Xt}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Kt}-extra`]:{flex:"none"},[`${Kt}-close`]:{display:"inline-block",marginInlineEnd:en,color:ln,fontWeight:an,fontSize:dt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${fe}`,textRendering:"auto","&:focus, &:hover":{color:Sn,textDecoration:"none"}},[`${Kt}-title`]:{flex:1,margin:0,color:xt,fontWeight:Ft.fontWeightStrong,fontSize:dt,lineHeight:Rt},[`${Kt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:$e,overflow:"auto"},[`${Kt}-footer`]:{flexShrink:0,padding:`${On}px ${ut}px`,borderTop:`${Pt}px ${Ut} ${Xt}`},"&-rtl":{direction:"rtl"}}}};var Ht=(0,ct.Z)("Drawer",Ft=>{const Kt=(0,Pe.TS)(Ft,{});return[Vt(Kt),ht(Kt)]},Ft=>({zIndexPopup:Ft.zIndexPopupBase,footerPaddingBlock:Ft.paddingXS,footerPaddingInline:Ft.padding})),Ye=ce(11575),Je=function(Ft,Kt){var ge={};for(var se in Ft)Object.prototype.hasOwnProperty.call(Ft,se)&&Kt.indexOf(se)<0&&(ge[se]=Ft[se]);if(Ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,se=Object.getOwnPropertySymbols(Ft);oe<se.length;oe++)Kt.indexOf(se[oe])<0&&Object.prototype.propertyIsEnumerable.call(Ft,se[oe])&&(ge[se[oe]]=Ft[se[oe]]);return ge};const At=null,mn={distance:180},Gt=Ft=>{var Kt;const{rootClassName:ge,width:se,height:oe,size:de="default",mask:fe=!0,push:le=mn,open:$e,afterOpenChange:dt,onClose:Rt,prefixCls:Pt,getContainer:Ut,style:Xt,className:en,visible:ln,afterVisibleChange:Sn}=Ft,xt=Je(Ft,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:an,getPrefixCls:On,direction:ut,drawer:wt}=Te.useContext(Et.E_),Nt=On("drawer",Pt),[Pn,Bn]=Ht(Nt),Tn=Ut===void 0&&an?()=>an(document.body):Ut,nr=We()({"no-mask":!fe,[`${Nt}-rtl`]:ut==="rtl"},ge,Bn),mr=Te.useMemo(()=>se!=null?se:de==="large"?736:378,[se,de]),ar=Te.useMemo(()=>oe!=null?oe:de==="large"?736:378,[oe,de]),Er={motionName:(0,ot.m)(Nt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_r=zr=>({motionName:(0,ot.m)(Nt,`panel-motion-${zr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Jn=(0,Ye.H)();return Pn(Te.createElement(Ct.BR,null,Te.createElement(Ge.Ux,{status:!0,override:!0},Te.createElement(St,Object.assign({prefixCls:Nt,onClose:Rt,maskMotion:Er,motion:_r},xt,{open:$e!=null?$e:ln,mask:fe,push:le,width:mr,height:ar,style:Object.assign(Object.assign({},wt==null?void 0:wt.style),Xt),className:We()(wt==null?void 0:wt.className,en),rootClassName:nr,getContainer:Tn,afterOpenChange:dt!=null?dt:Sn,panelRef:Jn}),Te.createElement(yt,Object.assign({prefixCls:Nt},xt,{onClose:Rt}))))))},hn=Ft=>{const{prefixCls:Kt,style:ge,className:se,placement:oe="right"}=Ft,de=Je(Ft,["prefixCls","style","className","placement"]),{getPrefixCls:fe}=Te.useContext(Et.E_),le=fe("drawer",Kt),[$e,dt]=Ht(le),Rt=We()(le,`${le}-pure`,`${le}-${oe}`,dt,se);return $e(Te.createElement("div",{className:Rt,style:ge},Te.createElement(yt,Object.assign({prefixCls:le},de))))};Gt._InternalPanelDoNotUseOrYouWillBeFired=hn;var jt=Gt},91857:function(wn,qt,ce){"use strict";var be=ce(59301),We=ce(38819),Fe=ce(92310),ft=ce.n(Fe),xe=ce(31561),ke=ce(70425),Te=ce(18929),we=ce(2738),Ee=ce(79676),Oe=ce(53487),it=ce(92343),Le=ce(36355),ze=ce(20834),st=ce(40875),Qe=ce(88088),at=ce(47211);const tt=null,pt=He=>{const{menu:Se,arrow:Ke,prefixCls:Ze,children:gt,trigger:je,disabled:St,dropdownRender:ot,getPopupContainer:Et,overlayClassName:Ge,rootClassName:Dt,open:rt,onOpenChange:yt,visible:Ct,onVisibleChange:ct,mouseEnterDelay:Pe=.15,mouseLeaveDelay:ye=.1,autoAdjustOverflow:ht=!0,placement:Vt="",overlay:Ht,transitionName:Ye}=He,{getPopupContainer:Je,getPrefixCls:At,direction:mn}=be.useContext(Le.E_),Gt=be.useMemo(()=>{const en=At();return Ye!==void 0?Ye:Vt.includes("top")?`${en}-slide-down`:`${en}-slide-up`},[At,Vt,Ye]),hn=be.useMemo(()=>Vt?Vt.includes("Center")?Vt.slice(0,Vt.indexOf("Center")):Vt:mn==="rtl"?"bottomRight":"bottomLeft",[Vt,mn]),jt=At("dropdown",Ze),[Ft,Kt]=(0,at.Z)(jt),[,ge]=(0,Qe.Z)(),se=be.Children.only(gt),oe=(0,it.Tm)(se,{className:ft()(`${jt}-trigger`,{[`${jt}-rtl`]:mn==="rtl"},se.props.className),disabled:St}),de=St?[]:je;let fe;de&&de.includes("contextMenu")&&(fe=!0);const[le,$e]=(0,Te.Z)(!1,{value:rt!=null?rt:Ct}),dt=(0,ke.useEvent)(en=>{yt==null||yt(en),ct==null||ct(en),$e(en)}),Rt=ft()(Ge,Dt,Kt,{[`${jt}-rtl`]:mn==="rtl"}),Pt=(0,Ee.Z)({arrowPointAtCenter:typeof Ke=="object"&&Ke.pointAtCenter,autoAdjustOverflow:ht,offset:ge.marginXXS,arrowWidth:Ke?ge.sizePopupArrow:0,borderRadius:ge.borderRadius}),Ut=be.useCallback(()=>{$e(!1)},[]),Xt=()=>{let en;return Se!=null&&Se.items?en=be.createElement(ze.default,Object.assign({},Se)):typeof Ht=="function"?en=Ht():en=Ht,ot&&(en=ot(en)),en=be.Children.only(typeof en=="string"?be.createElement("span",null,en):en),be.createElement(st.J,{prefixCls:`${jt}-menu`,expandIcon:be.createElement("span",{className:`${jt}-menu-submenu-arrow`},be.createElement(We.Z,{className:`${jt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ut,validator:ln=>{let{mode:Sn}=ln}},en)};return Ft(be.createElement(xe.Z,Object.assign({alignPoint:fe},(0,we.Z)(He,["rootClassName"]),{mouseEnterDelay:Pe,mouseLeaveDelay:ye,visible:le,builtinPlacements:Pt,arrow:!!Ke,overlayClassName:Rt,prefixCls:jt,getPopupContainer:Et||Je,transitionName:Gt,trigger:de,overlay:Xt,placement:hn,onVisibleChange:dt}),oe))};function Lt(He){return Object.assign(Object.assign({},He),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const Ue=(0,Oe.Z)(pt,"dropdown",He=>He,Lt),Xe=He=>be.createElement(Ue,Object.assign({},He),be.createElement("span",null));pt._InternalPanelDoNotUseOrYouWillBeFired=Xe,qt.Z=pt},47211:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return it}});var be=ce(17313),We=ce(13826),Fe=ce(92899),ft=ce(29878),xe=ce(19447),ke=ce(83116),Te=ce(37613),Ee=Le=>{const{componentCls:ze,menuCls:st,colorError:Qe,colorTextLightSolid:at}=Le,tt=`${st}-item`;return{[`${ze}, ${ze}-menu-submenu`]:{[`${st} ${tt}`]:{[`&${tt}-danger:not(${tt}-disabled)`]:{color:Qe,"&:hover":{color:at,backgroundColor:Qe}}}}}};const Oe=Le=>{const{componentCls:ze,menuCls:st,zIndexPopup:Qe,dropdownArrowDistance:at,sizePopupArrow:tt,antCls:pt,iconCls:Lt,motionDurationMid:Ue,dropdownPaddingVertical:Xe,fontSize:He,dropdownEdgeChildPadding:Se,colorTextDisabled:Ke,fontSizeIcon:Ze,controlPaddingHorizontal:gt,colorBgElevated:je}=Le;return[{[ze]:Object.assign(Object.assign({},(0,be.Wf)(Le)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Qe,display:"block","&::before":{position:"absolute",insetBlock:-at+tt/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${pt}-btn`]:{[`& > ${Lt}-down, & > ${pt}-btn-icon > ${Lt}-down`]:{fontSize:Ze}},[`${ze}-wrap`]:{position:"relative",[`${pt}-btn > ${Lt}-down`]:{fontSize:Ze},[`${Lt}-down::before`]:{transition:`transform ${Ue}`}},[`${ze}-wrap-open`]:{[`${Lt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${pt}-slide-down-enter${pt}-slide-down-enter-active${ze}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${ze}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-enter${pt}-slide-down-enter-active${ze}-placement-bottom,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${ze}-placement-bottom,
|
|
|
&${pt}-slide-down-enter${pt}-slide-down-enter-active${ze}-placement-bottomRight,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${ze}-placement-bottomRight`]:{animationName:We.fJ},[`&${pt}-slide-up-enter${pt}-slide-up-enter-active${ze}-placement-topLeft,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${ze}-placement-topLeft,
|
|
|
&${pt}-slide-up-enter${pt}-slide-up-enter-active${ze}-placement-top,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${ze}-placement-top,
|
|
|
&${pt}-slide-up-enter${pt}-slide-up-enter-active${ze}-placement-topRight,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${ze}-placement-topRight`]:{animationName:We.Qt},[`&${pt}-slide-down-leave${pt}-slide-down-leave-active${ze}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-leave${pt}-slide-down-leave-active${ze}-placement-bottom,
|
|
|
&${pt}-slide-down-leave${pt}-slide-down-leave-active${ze}-placement-bottomRight`]:{animationName:We.Uw},[`&${pt}-slide-up-leave${pt}-slide-up-leave-active${ze}-placement-topLeft,
|
|
|
&${pt}-slide-up-leave${pt}-slide-up-leave-active${ze}-placement-top,
|
|
|
&${pt}-slide-up-leave${pt}-slide-up-leave-active${ze}-placement-topRight`]:{animationName:We.ly}})},(0,xe.ZP)(Le,{colorBg:je,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${ze} ${st}`]:{position:"relative",margin:0},[`${st}-submenu-popup`]:{position:"absolute",zIndex:Qe,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${ze}, ${ze}-menu-submenu`]:{[st]:Object.assign(Object.assign({padding:Se,listStyleType:"none",backgroundColor:je,backgroundClip:"padding-box",borderRadius:Le.borderRadiusLG,outline:"none",boxShadow:Le.boxShadowSecondary},(0,be.Qy)(Le)),{[`${st}-item-group-title`]:{padding:`${Xe}px ${gt}px`,color:Le.colorTextDescription,transition:`all ${Ue}`},[`${st}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${st}-item-icon`]:{minWidth:He,marginInlineEnd:Le.marginXS,fontSize:Le.fontSizeSM},[`${st}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Ue}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${st}-item, ${st}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Xe}px ${gt}px`,color:Le.colorText,fontWeight:"normal",fontSize:He,lineHeight:Le.lineHeight,cursor:"pointer",transition:`all ${Ue}`,borderRadius:Le.borderRadiusSM,"&:hover, &-active":{backgroundColor:Le.controlItemBgHover}},(0,be.Qy)(Le)),{"&-selected":{color:Le.colorPrimary,backgroundColor:Le.controlItemBgActive,"&:hover, &-active":{backgroundColor:Le.controlItemBgActiveHover}},"&-disabled":{color:Ke,cursor:"not-allowed","&:hover":{color:Ke,backgroundColor:je,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Le.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Le.colorSplit},[`${ze}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Le.paddingXS,[`${ze}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Le.colorTextDescription,fontSize:Ze,fontStyle:"normal"}}}),[`${st}-item-group-list`]:{margin:`0 ${Le.marginXS}px`,padding:0,listStyle:"none"},[`${st}-submenu-title`]:{paddingInlineEnd:gt+Le.fontSizeSM},[`${st}-submenu-vertical`]:{position:"relative"},[`${st}-submenu${st}-submenu-disabled ${ze}-menu-submenu-title`]:{[`&, ${ze}-menu-submenu-arrow-icon`]:{color:Ke,backgroundColor:je,cursor:"not-allowed"}},[`${st}-submenu-selected ${ze}-menu-submenu-title`]:{color:Le.colorPrimary}})}},[(0,We.oN)(Le,"slide-up"),(0,We.oN)(Le,"slide-down"),(0,Fe.Fm)(Le,"move-up"),(0,Fe.Fm)(Le,"move-down"),(0,ft._y)(Le,"zoom-big")]]};var it=(0,ke.Z)("Dropdown",(Le,ze)=>{let{rootPrefixCls:st}=ze;const{marginXXS:Qe,sizePopupArrow:at,controlHeight:tt,fontSize:pt,lineHeight:Lt,paddingXXS:Ue,componentCls:Xe,borderRadiusLG:He}=Le,Se=(tt-pt*Lt)/2,{dropdownArrowOffset:Ke}=(0,xe.fS)({contentRadius:He}),Ze=(0,Te.TS)(Le,{menuCls:`${Xe}-menu`,rootPrefixCls:st,dropdownArrowDistance:at/2+Qe,dropdownArrowOffset:Ke,dropdownPaddingVertical:Se,dropdownEdgeChildPadding:Ue});return[Oe(Ze),Ee(Ze)]},Le=>({zIndexPopup:Le.zIndexPopupBase+50}))},64165:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Ue}});var be=ce(92310),We=ce.n(be),Fe=ce(59301),ft=ce(36355),xe=ce(9763),ke=ce(64993),Te=ce(88088),Ee=()=>{const[,Xe]=(0,Te.Z)(),Se=new ke.C(Xe.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Fe.createElement("svg",{style:Se,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{fill:"none",fillRule:"evenodd"},Fe.createElement("g",{transform:"translate(24 31.67)"},Fe.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Fe.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"}),Fe.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)"}),Fe.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"}),Fe.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"})),Fe.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"}),Fe.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Fe.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Fe.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},it=()=>{const[,Xe]=(0,Te.Z)(),{colorFill:He,colorFillTertiary:Se,colorFillQuaternary:Ke,colorBgContainer:Ze}=Xe,{borderColor:gt,shadowColor:je,contentColor:St}=(0,Fe.useMemo)(()=>({borderColor:new ke.C(He).onBackground(Ze).toHexShortString(),shadowColor:new ke.C(Se).onBackground(Ze).toHexShortString(),contentColor:new ke.C(Ke).onBackground(Ze).toHexShortString()}),[He,Se,Ke,Ze]);return Fe.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Fe.createElement("ellipse",{fill:je,cx:"32",cy:"33",rx:"32",ry:"7"}),Fe.createElement("g",{fillRule:"nonzero",stroke:gt},Fe.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"}),Fe.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:St}))))},Le=ce(83116),ze=ce(37613);const st=Xe=>{const{componentCls:He,margin:Se,marginXS:Ke,marginXL:Ze,fontSize:gt,lineHeight:je}=Xe;return{[He]:{marginInline:Ke,fontSize:gt,lineHeight:je,textAlign:"center",[`${He}-image`]:{height:Xe.emptyImgHeight,marginBottom:Ke,opacity:Xe.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${He}-description`]:{color:Xe.colorText},[`${He}-footer`]:{marginTop:Se},"&-normal":{marginBlock:Ze,color:Xe.colorTextDisabled,[`${He}-description`]:{color:Xe.colorTextDisabled},[`${He}-image`]:{height:Xe.emptyImgHeightMD}},"&-small":{marginBlock:Ke,color:Xe.colorTextDisabled,[`${He}-image`]:{height:Xe.emptyImgHeightSM}}}}};var Qe=(0,Le.Z)("Empty",Xe=>{const{componentCls:He,controlHeightLG:Se}=Xe,Ke=(0,ze.TS)(Xe,{emptyImgCls:`${He}-img`,emptyImgHeight:Se*2.5,emptyImgHeightMD:Se,emptyImgHeightSM:Se*.875});return[st(Ke)]}),at=function(Xe,He){var Se={};for(var Ke in Xe)Object.prototype.hasOwnProperty.call(Xe,Ke)&&He.indexOf(Ke)<0&&(Se[Ke]=Xe[Ke]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Ke=Object.getOwnPropertySymbols(Xe);Ze<Ke.length;Ze++)He.indexOf(Ke[Ze])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Ke[Ze])&&(Se[Ke[Ze]]=Xe[Ke[Ze]]);return Se};const tt=Fe.createElement(Ee,null),pt=Fe.createElement(it,null),Lt=Xe=>{var{className:He,rootClassName:Se,prefixCls:Ke,image:Ze=tt,description:gt,children:je,imageStyle:St,style:ot}=Xe,Et=at(Xe,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Ge,direction:Dt,empty:rt}=Fe.useContext(ft.E_),yt=Ge("empty",Ke),[Ct,ct]=Qe(yt),[Pe]=(0,xe.Z)("Empty"),ye=typeof gt!="undefined"?gt:Pe==null?void 0:Pe.description,ht=typeof ye=="string"?ye:"empty";let Vt=null;return typeof Ze=="string"?Vt=Fe.createElement("img",{alt:ht,src:Ze}):Vt=Ze,Ct(Fe.createElement("div",Object.assign({className:We()(ct,yt,rt==null?void 0:rt.className,{[`${yt}-normal`]:Ze===pt,[`${yt}-rtl`]:Dt==="rtl"},He,Se),style:Object.assign(Object.assign({},rt==null?void 0:rt.style),ot)},Et),Fe.createElement("div",{className:`${yt}-image`,style:St},Vt),ye&&Fe.createElement("div",{className:`${yt}-description`},ye),je&&Fe.createElement("div",{className:`${yt}-footer`},je)))};Lt.PRESENTED_IMAGE_DEFAULT=tt,Lt.PRESENTED_IMAGE_SIMPLE=pt;var Ue=Lt},78241:function(wn,qt,ce){"use strict";ce.d(qt,{default:function(){return $n}});var be=ce(94480),We=ce(92310),Fe=ce.n(We),ft=ce(77900),xe=ce(59301),ke=ce(62892),Te=ce(32441);function we(nt){const[_e,Ie]=xe.useState(nt);return xe.useEffect(()=>{const Ae=setTimeout(()=>{Ie(nt)},nt.length?0:10);return()=>{clearTimeout(Ae)}},[nt]),_e}var Ee=ce(17313),Oe=ce(29878),it=ce(8378),Le=ce(37613),ze=ce(83116),Qe=nt=>{const{componentCls:_e}=nt,Ie=`${_e}-show-help`,Ae=`${_e}-show-help-item`;return{[Ie]:{transition:`opacity ${nt.motionDurationSlow} ${nt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Ae]:{overflow:"hidden",transition:`height ${nt.motionDurationSlow} ${nt.motionEaseInOut},
|
|
|
opacity ${nt.motionDurationSlow} ${nt.motionEaseInOut},
|
|
|
transform ${nt.motionDurationSlow} ${nt.motionEaseInOut} !important`,[`&${Ae}-appear, &${Ae}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Ae}-leave-active`]:{transform:"translateY(-5px)"}}}}};const at=nt=>({legend:{display:"block",width:"100%",marginBottom:nt.marginLG,padding:0,color:nt.colorTextDescription,fontSize:nt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${nt.lineWidth}px ${nt.lineType} ${nt.colorBorder}`},label:{fontSize:nt.fontSize},'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 ${nt.controlOutlineWidth}px ${nt.controlOutline}`},output:{display:"block",paddingTop:15,color:nt.colorText,fontSize:nt.fontSize,lineHeight:nt.lineHeight}}),tt=(nt,_e)=>{const{formItemCls:Ie}=nt;return{[Ie]:{[`${Ie}-label > label`]:{height:_e},[`${Ie}-control-input`]:{minHeight:_e}}}},pt=nt=>{const{componentCls:_e}=nt;return{[nt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Ee.Wf)(nt)),at(nt)),{[`${_e}-text`]:{display:"inline-block",paddingInlineEnd:nt.paddingSM},"&-small":Object.assign({},tt(nt,nt.controlHeightSM)),"&-large":Object.assign({},tt(nt,nt.controlHeightLG))})}},Lt=nt=>{const{formItemCls:_e,iconCls:Ie,componentCls:Ae,rootPrefixCls:Be,labelRequiredMarkColor:Ve,labelColor:lt,labelFontSize:Bt,labelHeight:bt,labelColonMarginInlineStart:zt,labelColonMarginInlineEnd:tn,itemMarginBottom:cn}=nt;return{[_e]:Object.assign(Object.assign({},(0,Ee.Wf)(nt)),{marginBottom:cn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Be}-row`]:{display:"none"},"&-has-warning":{[`${_e}-split`]:{color:nt.colorError}},"&-has-error":{[`${_e}-split`]:{color:nt.colorWarning}},[`${_e}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${nt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:bt,color:lt,fontSize:Bt,[`> ${Ie}`]:{fontSize:nt.fontSize,verticalAlign:"top"},[`&${_e}-required:not(${_e}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:nt.marginXXS,color:Ve,fontSize:nt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Ae}-hide-required-mark &`]:{display:"none"}},[`${_e}-optional`]:{display:"inline-block",marginInlineStart:nt.marginXXS,color:nt.colorTextDescription,[`${Ae}-hide-required-mark &`]:{display:"none"}},[`${_e}-tooltip`]:{color:nt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:nt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:zt,marginInlineEnd:tn},[`&${_e}-no-colon::after`]:{content:'"\\a0"'}}},[`${_e}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Be}-col-'"]):not([class*="' ${Be}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:nt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[_e]:{"&-explain, &-extra":{clear:"both",color:nt.colorTextDescription,fontSize:nt.fontSize,lineHeight:nt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:nt.controlHeightSM,transition:`color ${nt.motionDurationMid} ${nt.motionEaseOut}`},"&-explain":{"&-error":{color:nt.colorError},"&-warning":{color:nt.colorWarning}}},[`&-with-help ${_e}-explain`]:{height:"auto",opacity:1},[`${_e}-feedback-icon`]:{fontSize:nt.fontSize,textAlign:"center",visibility:"visible",animationName:Oe.kr,animationDuration:nt.motionDurationMid,animationTimingFunction:nt.motionEaseOutBack,pointerEvents:"none","&-success":{color:nt.colorSuccess},"&-error":{color:nt.colorError},"&-warning":{color:nt.colorWarning},"&-validating":{color:nt.colorPrimary}}})}},Ue=nt=>{const{componentCls:_e,formItemCls:Ie}=nt;return{[`${_e}-horizontal`]:{[`${Ie}-label`]:{flexGrow:0},[`${Ie}-control`]:{flex:"1 1 0",minWidth:0},[`${Ie}-label[class$='-24'], ${Ie}-label[class*='-24 ']`]:{[`& + ${Ie}-control`]:{minWidth:"unset"}}}}},Xe=nt=>{const{componentCls:_e,formItemCls:Ie}=nt;return{[`${_e}-inline`]:{display:"flex",flexWrap:"wrap",[Ie]:{flex:"none",marginInlineEnd:nt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Ie}-label,
|
|
|
> ${Ie}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Ie}-label`]:{flex:"none"},[`${_e}-text`]:{display:"inline-block"},[`${Ie}-has-feedback`]:{display:"inline-block"}}}}},He=nt=>({padding:nt.verticalLabelPadding,margin:nt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Se=nt=>{const{componentCls:_e,formItemCls:Ie,rootPrefixCls:Ae}=nt;return{[`${Ie} ${Ie}-label`]:He(nt),[_e]:{[Ie]:{flexWrap:"wrap",[`${Ie}-label, ${Ie}-control`]:{[`&:not([class*=" ${Ae}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ke=nt=>{const{componentCls:_e,formItemCls:Ie,rootPrefixCls:Ae}=nt;return{[`${_e}-vertical`]:{[Ie]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${_e}-item-control`]:{width:"100%"}}},[`${_e}-vertical ${Ie}-label,
|
|
|
.${Ae}-col-24${Ie}-label,
|
|
|
.${Ae}-col-xl-24${Ie}-label`]:He(nt),[`@media (max-width: ${nt.screenXSMax}px)`]:[Se(nt),{[_e]:{[`.${Ae}-col-xs-24${Ie}-label`]:He(nt)}}],[`@media (max-width: ${nt.screenSMMax}px)`]:{[_e]:{[`.${Ae}-col-sm-24${Ie}-label`]:He(nt)}},[`@media (max-width: ${nt.screenMDMax}px)`]:{[_e]:{[`.${Ae}-col-md-24${Ie}-label`]:He(nt)}},[`@media (max-width: ${nt.screenLGMax}px)`]:{[_e]:{[`.${Ae}-col-lg-24${Ie}-label`]:He(nt)}}}},Ze=(nt,_e)=>(0,Le.TS)(nt,{formItemCls:`${nt.componentCls}-item`,rootPrefixCls:_e});var gt=(0,ze.Z)("Form",(nt,_e)=>{let{rootPrefixCls:Ie}=_e;const Ae=Ze(nt,Ie);return[pt(Ae),Lt(Ae),Qe(Ae),Ue(Ae),Xe(Ae),Ke(Ae),(0,it.Z)(Ae),Oe.kr]},nt=>({labelRequiredMarkColor:nt.colorError,labelColor:nt.colorTextHeading,labelFontSize:nt.fontSize,labelHeight:nt.controlHeight,labelColonMarginInlineStart:nt.marginXXS/2,labelColonMarginInlineEnd:nt.marginXS,itemMarginBottom:nt.marginLG,verticalLabelPadding:`0 0 ${nt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const je=[];function St(nt,_e,Ie){let Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof nt=="string"?nt:`${_e}-${Ae}`,error:nt,errorStatus:Ie}}var Et=nt=>{let{help:_e,helpStatus:Ie,errors:Ae=je,warnings:Be=je,className:Ve,fieldId:lt,onVisibleChanged:Bt}=nt;const{prefixCls:bt}=xe.useContext(Te.Rk),zt=`${bt}-item-explain`,[,tn]=gt(bt),cn=(0,xe.useMemo)(()=>(0,ke.Z)(bt),[bt]),on=we(Ae),_t=we(Be),Yt=xe.useMemo(()=>_e!=null?[St(_e,"help",Ie)]:[].concat((0,be.Z)(on.map((Cn,gn)=>St(Cn,"error","error",gn))),(0,be.Z)(_t.map((Cn,gn)=>St(Cn,"warning","warning",gn)))),[_e,Ie,on,_t]),Dn={};return lt&&(Dn.id=`${lt}_help`),xe.createElement(ft.default,{motionDeadline:cn.motionDeadline,motionName:`${bt}-show-help`,visible:!!Yt.length,onVisibleChanged:Bt},Cn=>{const{className:gn,style:Mn}=Cn;return xe.createElement("div",Object.assign({},Dn,{className:Fe()(zt,gn,Ve,tn),style:Mn,role:"alert"}),xe.createElement(ft.CSSMotionList,Object.assign({keys:Yt},(0,ke.Z)(bt),{motionName:`${bt}-show-help-item`,component:!1}),Fn=>{const{key:un,error:Zn,errorStatus:et,className:Tt,style:$t}=Fn;return xe.createElement("div",{key:un,className:Fe()(Tt,{[`${zt}-${et}`]:et}),style:$t},Zn)}))})},Ge=ce(95013),Dt=ce(36355),rt=ce(1684),yt=ce(52946),Ct=ce(19716),ct=ce(16722);const Pe=["parentNode"],ye="form_item";function ht(nt){return nt===void 0||nt===!1?[]:Array.isArray(nt)?nt:[nt]}function Vt(nt,_e){if(!nt.length)return;const Ie=nt.join("_");return _e?`${_e}_${Ie}`:Pe.includes(Ie)?`${ye}_${Ie}`:Ie}function Ht(nt,_e,Ie,Ae,Be,Ve){let lt=Ae;return Ve!==void 0?lt=Ve:Ie.validating?lt="validating":nt.length?lt="error":_e.length?lt="warning":(Ie.touched||Be&&Ie.validated)&&(lt="success"),lt}function Ye(nt){return ht(nt).join("_")}function Je(nt){const[_e]=(0,Ge.useForm)(),Ie=xe.useRef({}),Ae=xe.useMemo(()=>nt!=null?nt:Object.assign(Object.assign({},_e),{__INTERNAL__:{itemRef:Be=>Ve=>{const lt=Ye(Be);Ve?Ie.current[lt]=Ve:delete Ie.current[lt]}},scrollToField:function(Be){let Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const lt=ht(Be),Bt=Vt(lt,Ae.__INTERNAL__.name),bt=Bt?document.getElementById(Bt):null;bt&&(0,ct.Z)(bt,Object.assign({scrollMode:"if-needed",block:"nearest"},Ve))},getFieldInstance:Be=>{const Ve=Ye(Be);return Ie.current[Ve]}}),[nt,_e]);return[Ae]}var At=ce(28726),mn=function(nt,_e){var Ie={};for(var Ae in nt)Object.prototype.hasOwnProperty.call(nt,Ae)&&_e.indexOf(Ae)<0&&(Ie[Ae]=nt[Ae]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Ae=Object.getOwnPropertySymbols(nt);Be<Ae.length;Be++)_e.indexOf(Ae[Be])<0&&Object.prototype.propertyIsEnumerable.call(nt,Ae[Be])&&(Ie[Ae[Be]]=nt[Ae[Be]]);return Ie};const Gt=(nt,_e)=>{const Ie=xe.useContext(rt.Z),{getPrefixCls:Ae,direction:Be,form:Ve}=xe.useContext(Dt.E_),{prefixCls:lt,className:Bt,rootClassName:bt,size:zt,disabled:tn=Ie,form:cn,colon:on,labelAlign:_t,labelWrap:Yt,labelCol:Dn,wrapperCol:Cn,hideRequiredMark:gn,layout:Mn="horizontal",scrollToFirstError:Fn,requiredMark:un,onFinishFailed:Zn,name:et,style:Tt,feedbackIcons:$t}=nt,Jt=mn(nt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ot=(0,Ct.Z)(zt),Zt=xe.useContext(At.Z),Wt=(0,xe.useMemo)(()=>un!==void 0?un:Ve&&Ve.requiredMark!==void 0?Ve.requiredMark:!gn,[gn,un,Ve]),nn=on!=null?on:Ve==null?void 0:Ve.colon,bn=Ae("form",lt),[Ln,Hn]=gt(bn),jn=Fe()(bn,`${bn}-${Mn}`,{[`${bn}-hide-required-mark`]:Wt===!1,[`${bn}-rtl`]:Be==="rtl",[`${bn}-${Ot}`]:Ot},Hn,Ve==null?void 0:Ve.className,Bt,bt),[rr]=Je(cn),{__INTERNAL__:cr}=rr;cr.name=et;const er=(0,xe.useMemo)(()=>({name:et,labelAlign:_t,labelCol:Dn,labelWrap:Yt,wrapperCol:Cn,vertical:Mn==="vertical",colon:nn,requiredMark:Wt,itemRef:cr.itemRef,form:rr,feedbackIcons:$t}),[et,_t,Dn,Cn,Mn,nn,Wt,rr,$t]);xe.useImperativeHandle(_e,()=>rr);const vr=(pr,Gn)=>{if(pr){let sr={block:"nearest"};typeof pr=="object"&&(sr=pr),rr.scrollToField(Gn,sr)}},fr=pr=>{if(Zn==null||Zn(pr),pr.errorFields.length){const Gn=pr.errorFields[0].name;if(Fn!==void 0){vr(Fn,Gn);return}Ve&&Ve.scrollToFirstError!==void 0&&vr(Ve.scrollToFirstError,Gn)}};return Ln(xe.createElement(rt.n,{disabled:tn},xe.createElement(yt.q,{size:Ot},xe.createElement(Te.RV,Object.assign({},{validateMessages:Zt}),xe.createElement(Te.q3.Provider,{value:er},xe.createElement(Ge.default,Object.assign({id:et},Jt,{name:et,onFinishFailed:fr,form:rr,style:Object.assign(Object.assign({},Ve==null?void 0:Ve.style),Tt),className:jn})))))))};var jt=xe.forwardRef(Gt),Ft=ce(41799),Kt=ce(8654),ge=ce(92343),se=ce(11592);function oe(nt){if(typeof nt=="function")return nt;const _e=(0,se.Z)(nt);return _e.length<=1?_e[0]:_e}const de=()=>{const{status:nt,errors:_e=[],warnings:Ie=[]}=(0,xe.useContext)(Te.aM);return{status:nt,errors:_e,warnings:Ie}};de.Context=Te.aM;var fe=de,le=ce(16089);function $e(nt){const[_e,Ie]=xe.useState(nt),Ae=(0,xe.useRef)(null),Be=(0,xe.useRef)([]),Ve=(0,xe.useRef)(!1);xe.useEffect(()=>(Ve.current=!1,()=>{Ve.current=!0,le.Z.cancel(Ae.current),Ae.current=null}),[]);function lt(Bt){Ve.current||(Ae.current===null&&(Be.current=[],Ae.current=(0,le.Z)(()=>{Ae.current=null,Ie(bt=>{let zt=bt;return Be.current.forEach(tn=>{zt=tn(zt)}),zt})})),Be.current.push(Bt))}return[_e,lt]}function dt(){const{itemRef:nt}=xe.useContext(Te.q3),_e=xe.useRef({});function Ie(Ae,Be){const Ve=Be&&typeof Be=="object"&&Be.ref,lt=Ae.join("_");return(_e.current.name!==lt||_e.current.originRef!==Ve)&&(_e.current.name=lt,_e.current.originRef=Ve,_e.current.ref=(0,Kt.sQ)(nt(Ae),Ve)),_e.current.ref}return Ie}var Rt=ce(29194),Pt=ce(34280),Ut=ce(2738),Xt=ce(27382),en=ce(37028);const ln=nt=>{const{formItemCls:_e}=nt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${_e}-control`]:{display:"flex"}}}};var Sn=(0,ze.b)(["Form","item-item"],(nt,_e)=>{let{rootPrefixCls:Ie}=_e;const Ae=Ze(nt,Ie);return[ln(Ae)]}),an=nt=>{const{prefixCls:_e,status:Ie,wrapperCol:Ae,children:Be,errors:Ve,warnings:lt,_internalItemRender:Bt,extra:bt,help:zt,fieldId:tn,marginBottom:cn,onErrorVisibleChanged:on}=nt,_t=`${_e}-item`,Yt=xe.useContext(Te.q3),Dn=Ae||Yt.wrapperCol||{},Cn=Fe()(`${_t}-control`,Dn.className),gn=xe.useMemo(()=>Object.assign({},Yt),[Yt]);delete gn.labelCol,delete gn.wrapperCol;const Mn=xe.createElement("div",{className:`${_t}-control-input`},xe.createElement("div",{className:`${_t}-control-input-content`},Be)),Fn=xe.useMemo(()=>({prefixCls:_e,status:Ie}),[_e,Ie]),un=cn!==null||Ve.length||lt.length?xe.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},xe.createElement(Te.Rk.Provider,{value:Fn},xe.createElement(Et,{fieldId:tn,errors:Ve,warnings:lt,help:zt,helpStatus:Ie,className:`${_t}-explain-connected`,onVisibleChanged:on})),!!cn&&xe.createElement("div",{style:{width:0,height:cn}})):null,Zn={};tn&&(Zn.id=`${tn}_extra`);const et=bt?xe.createElement("div",Object.assign({},Zn,{className:`${_t}-extra`}),bt):null,Tt=Bt&&Bt.mark==="pro_table_render"&&Bt.render?Bt.render(nt,{input:Mn,errorList:un,extra:et}):xe.createElement(xe.Fragment,null,Mn,un,et);return xe.createElement(Te.q3.Provider,{value:gn},xe.createElement(en.Z,Object.assign({},Dn,{className:Cn}),Tt),xe.createElement(Sn,{prefixCls:_e}))},On=ce(61485),ut=ce(31724),wt=ce(9763),Nt=ce(6848),Pn=function(nt,_e){var Ie={};for(var Ae in nt)Object.prototype.hasOwnProperty.call(nt,Ae)&&_e.indexOf(Ae)<0&&(Ie[Ae]=nt[Ae]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Ae=Object.getOwnPropertySymbols(nt);Be<Ae.length;Be++)_e.indexOf(Ae[Be])<0&&Object.prototype.propertyIsEnumerable.call(nt,Ae[Be])&&(Ie[Ae[Be]]=nt[Ae[Be]]);return Ie};function Bn(nt){return nt?typeof nt=="object"&&!xe.isValidElement(nt)?nt:{title:nt}:null}var nr=nt=>{let{prefixCls:_e,label:Ie,htmlFor:Ae,labelCol:Be,labelAlign:Ve,colon:lt,required:Bt,requiredMark:bt,tooltip:zt}=nt;var tn;const[cn]=(0,wt.Z)("Form"),{vertical:on,labelAlign:_t,labelCol:Yt,labelWrap:Dn,colon:Cn}=xe.useContext(Te.q3);if(!Ie)return null;const gn=Be||Yt||{},Mn=Ve||_t,Fn=`${_e}-item-label`,un=Fe()(Fn,Mn==="left"&&`${Fn}-left`,gn.className,{[`${Fn}-wrap`]:!!Dn});let Zn=Ie;const et=lt===!0||Cn!==!1&<!==!1;et&&!on&&typeof Ie=="string"&&Ie.trim()!==""&&(Zn=Ie.replace(/[:|:]\s*$/,""));const $t=Bn(zt);if($t){const{icon:Wt=xe.createElement(On.Z,null)}=$t,nn=Pn($t,["icon"]),bn=xe.createElement(Nt.Z,Object.assign({},nn),xe.cloneElement(Wt,{className:`${_e}-item-tooltip`,title:""}));Zn=xe.createElement(xe.Fragment,null,Zn,bn)}const Jt=bt==="optional",Ot=typeof bt=="function";Ot?Zn=bt(Zn,{required:!!Bt}):Jt&&!Bt&&(Zn=xe.createElement(xe.Fragment,null,Zn,xe.createElement("span",{className:`${_e}-item-optional`,title:""},(cn==null?void 0:cn.optional)||((tn=ut.Z.Form)===null||tn===void 0?void 0:tn.optional))));const Zt=Fe()({[`${_e}-item-required`]:Bt,[`${_e}-item-required-mark-optional`]:Jt||Ot,[`${_e}-item-no-colon`]:!et});return xe.createElement(en.Z,Object.assign({},gn,{className:un}),xe.createElement("label",{htmlFor:Ae,className:Zt,title:typeof Ie=="string"?Ie:""},Zn))},mr=ce(29679),ar=ce(19248),Er=ce(96512),_r=ce(58617);const Jn={success:mr.Z,warning:Er.Z,error:ar.Z,validating:_r.Z};function zr(nt){let{children:_e,errors:Ie,warnings:Ae,hasFeedback:Be,validateStatus:Ve,prefixCls:lt,meta:Bt,noStyle:bt}=nt;const zt=`${lt}-item`,{feedbackIcons:tn}=xe.useContext(Te.q3),cn=Ht(Ie,Ae,Bt,null,!!Be,Ve),{isFormItemInput:on,status:_t}=xe.useContext(Te.aM),Yt=xe.useMemo(()=>{var Dn;let Cn;if(Be){const Fn=Be!==!0&&Be.icons||tn,un=cn&&((Dn=Fn==null?void 0:Fn({status:cn,errors:Ie,warnings:Ae}))===null||Dn===void 0?void 0:Dn[cn]),Zn=cn&&Jn[cn];Cn=un!==!1&&Zn?xe.createElement("span",{className:Fe()(`${zt}-feedback-icon`,`${zt}-feedback-icon-${cn}`)},un||xe.createElement(Zn,null)):null}let gn=!0,Mn=cn||"";return bt&&(gn=on,Mn=(cn!=null?cn:_t)||""),{status:Mn,errors:Ie,warnings:Ae,hasFeedback:!!Be,feedbackIcon:Cn,isFormItemInput:gn}},[cn,Be,bt,on,_t]);return xe.createElement(Te.aM.Provider,{value:Yt},_e)}var Wr=function(nt,_e){var Ie={};for(var Ae in nt)Object.prototype.hasOwnProperty.call(nt,Ae)&&_e.indexOf(Ae)<0&&(Ie[Ae]=nt[Ae]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Ae=Object.getOwnPropertySymbols(nt);Be<Ae.length;Be++)_e.indexOf(Ae[Be])<0&&Object.prototype.propertyIsEnumerable.call(nt,Ae[Be])&&(Ie[Ae[Be]]=nt[Ae[Be]]);return Ie};function Vr(nt){const{prefixCls:_e,className:Ie,rootClassName:Ae,style:Be,help:Ve,errors:lt,warnings:Bt,validateStatus:bt,meta:zt,hasFeedback:tn,hidden:cn,children:on,fieldId:_t,required:Yt,isRequired:Dn,onSubItemMetaChange:Cn}=nt,gn=Wr(nt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Mn=`${_e}-item`,{requiredMark:Fn}=xe.useContext(Te.q3),un=xe.useRef(null),Zn=we(lt),et=we(Bt),Tt=Ve!=null,$t=!!(Tt||lt.length||Bt.length),Jt=!!un.current&&(0,Rt.Z)(un.current),[Ot,Zt]=xe.useState(null);(0,Pt.Z)(()=>{if($t&&un.current){const Hn=getComputedStyle(un.current);Zt(parseInt(Hn.marginBottom,10))}},[$t,Jt]);const Wt=Hn=>{Hn||Zt(null)},bn=function(){let Hn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const jn=Hn?Zn:zt.errors,rr=Hn?et:zt.warnings;return Ht(jn,rr,zt,"",!!tn,bt)}(),Ln=Fe()(Mn,Ie,Ae,{[`${Mn}-with-help`]:Tt||Zn.length||et.length,[`${Mn}-has-feedback`]:bn&&tn,[`${Mn}-has-success`]:bn==="success",[`${Mn}-has-warning`]:bn==="warning",[`${Mn}-has-error`]:bn==="error",[`${Mn}-is-validating`]:bn==="validating",[`${Mn}-hidden`]:cn});return xe.createElement("div",{className:Ln,style:Be,ref:un},xe.createElement(Xt.Z,Object.assign({className:`${Mn}-row`},(0,Ut.Z)(gn,["_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"])),xe.createElement(nr,Object.assign({htmlFor:_t},nt,{requiredMark:Fn,required:Yt!=null?Yt:Dn,prefixCls:_e})),xe.createElement(an,Object.assign({},nt,zt,{errors:Zn,warnings:et,prefixCls:_e,status:bn,help:Ve,marginBottom:Ot,onErrorVisibleChanged:Wt}),xe.createElement(Te.qI.Provider,{value:Cn},xe.createElement(zr,{prefixCls:_e,meta:zt,errors:zt.errors,warnings:zt.warnings,hasFeedback:tn,validateStatus:bn},on)))),!!Ot&&xe.createElement("div",{className:`${Mn}-margin-offset`,style:{marginBottom:-Ot}}))}const ei="__SPLIT__",Tr=null,Yr=xe.memo(nt=>{let{children:_e}=nt;return _e},(nt,_e)=>nt.value===_e.value&&nt.update===_e.update&&nt.childProps.length===_e.childProps.length&&nt.childProps.every((Ie,Ae)=>Ie===_e.childProps[Ae]));function xr(nt){return nt!=null}function Ur(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function qr(nt){const{name:_e,noStyle:Ie,className:Ae,dependencies:Be,prefixCls:Ve,shouldUpdate:lt,rules:Bt,children:bt,required:zt,label:tn,messageVariables:cn,trigger:on="onChange",validateTrigger:_t,hidden:Yt,help:Dn}=nt,{getPrefixCls:Cn}=xe.useContext(Dt.E_),{name:gn}=xe.useContext(Te.q3),Mn=oe(bt),Fn=typeof Mn=="function",un=xe.useContext(Te.qI),{validateTrigger:Zn}=xe.useContext(Ge.FieldContext),et=_t!==void 0?_t:Zn,Tt=xr(_e),$t=Cn("form",Ve),[Jt,Ot]=gt($t),Zt=xe.useContext(Ge.ListContext),Wt=xe.useRef(),[nn,bn]=$e({}),[Ln,Hn]=(0,Ft.Z)(()=>Ur()),jn=Gn=>{const sr=Zt==null?void 0:Zt.getKey(Gn.name);if(Hn(Gn.destroy?Ur():Gn,!0),Ie&&Dn!==!1&&un){let Xn=Gn.name;if(Gn.destroy)Xn=Wt.current||Xn;else if(sr!==void 0){const[Rn,gr]=sr;Xn=[Rn].concat((0,be.Z)(gr)),Wt.current=Xn}un(Gn,Xn)}},rr=(Gn,sr)=>{bn(Xn=>{const Rn=Object.assign({},Xn),kr=[].concat((0,be.Z)(Gn.name.slice(0,-1)),(0,be.Z)(sr)).join(ei);return Gn.destroy?delete Rn[kr]:Rn[kr]=Gn,Rn})},[cr,er]=xe.useMemo(()=>{const Gn=(0,be.Z)(Ln.errors),sr=(0,be.Z)(Ln.warnings);return Object.values(nn).forEach(Xn=>{Gn.push.apply(Gn,(0,be.Z)(Xn.errors||[])),sr.push.apply(sr,(0,be.Z)(Xn.warnings||[]))}),[Gn,sr]},[nn,Ln.errors,Ln.warnings]),vr=dt();function fr(Gn,sr,Xn){return Ie&&!Yt?xe.createElement(zr,{prefixCls:$t,hasFeedback:nt.hasFeedback,validateStatus:nt.validateStatus,meta:Ln,errors:cr,warnings:er,noStyle:!0},Gn):xe.createElement(Vr,Object.assign({key:"row"},nt,{className:Fe()(Ae,Ot),prefixCls:$t,fieldId:sr,isRequired:Xn,errors:cr,warnings:er,meta:Ln,onSubItemMetaChange:rr}),Gn)}if(!Tt&&!Fn&&!Be)return Jt(fr(Mn));let pr={};return typeof tn=="string"?pr.label=tn:_e&&(pr.label=String(_e)),cn&&(pr=Object.assign(Object.assign({},pr),cn)),Jt(xe.createElement(Ge.Field,Object.assign({},nt,{messageVariables:pr,trigger:on,validateTrigger:et,onMetaChange:jn}),(Gn,sr,Xn)=>{const Rn=ht(_e).length&&sr?sr.name:[],gr=Vt(Rn,gn),kr=zt!==void 0?zt:!!(Bt&&Bt.some(En=>{if(En&&typeof En=="object"&&En.required&&!En.warningOnly)return!0;if(typeof En=="function"){const dr=En(Xn);return dr&&dr.required&&!dr.warningOnly}return!1})),tr=Object.assign({},Gn);let kn=null;if(Array.isArray(Mn)&&Tt)kn=Mn;else if(!(Fn&&(!(lt||Be)||Tt))){if(!(Be&&!Fn&&!Tt))if((0,ge.l$)(Mn)){const En=Object.assign(Object.assign({},Mn.props),tr);if(En.id||(En.id=gr),Dn||cr.length>0||er.length>0||nt.extra){const wr=[];(Dn||cr.length>0)&&wr.push(`${gr}_help`),nt.extra&&wr.push(`${gr}_extra`),En["aria-describedby"]=wr.join(" ")}cr.length>0&&(En["aria-invalid"]="true"),kr&&(En["aria-required"]="true"),(0,Kt.Yr)(Mn)&&(En.ref=vr(Rn,Mn)),new Set([].concat((0,be.Z)(ht(on)),(0,be.Z)(ht(et)))).forEach(wr=>{En[wr]=function(){for(var Lr,Cr,Zr,Or,ni,ir=arguments.length,lr=new Array(ir),Dr=0;Dr<ir;Dr++)lr[Dr]=arguments[Dr];(Zr=tr[wr])===null||Zr===void 0||(Lr=Zr).call.apply(Lr,[tr].concat(lr)),(ni=(Or=Mn.props)[wr])===null||ni===void 0||(Cr=ni).call.apply(Cr,[Or].concat(lr))}});const qn=[En["aria-required"],En["aria-invalid"],En["aria-describedby"]];kn=xe.createElement(Yr,{value:tr[nt.valuePropName||"value"],update:Mn,childProps:qn},(0,ge.Tm)(Mn,En))}else Fn&&(lt||Be)&&!Tt?kn=Mn(Xn):kn=Mn}return fr(kn,gr,kr)}))}const It=qr;It.useStatus=fe;var _n=It,yn=function(nt,_e){var Ie={};for(var Ae in nt)Object.prototype.hasOwnProperty.call(nt,Ae)&&_e.indexOf(Ae)<0&&(Ie[Ae]=nt[Ae]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Ae=Object.getOwnPropertySymbols(nt);Be<Ae.length;Be++)_e.indexOf(Ae[Be])<0&&Object.prototype.propertyIsEnumerable.call(nt,Ae[Be])&&(Ie[Ae[Be]]=nt[Ae[Be]]);return Ie},xn=nt=>{var{prefixCls:_e,children:Ie}=nt,Ae=yn(nt,["prefixCls","children"]);const{getPrefixCls:Be}=xe.useContext(Dt.E_),Ve=Be("form",_e),lt=xe.useMemo(()=>({prefixCls:Ve,status:"error"}),[Ve]);return xe.createElement(Ge.List,Object.assign({},Ae),(Bt,bt,zt)=>xe.createElement(Te.Rk.Provider,{value:lt},Ie(Bt.map(tn=>Object.assign(Object.assign({},tn),{fieldKey:tn.key})),bt,{errors:zt.errors,warnings:zt.warnings})))};function sn(){const{form:nt}=(0,xe.useContext)(Te.q3);return nt}const dn=jt;dn.Item=_n,dn.List=xn,dn.ErrorList=Et,dn.useForm=Je,dn.useFormInstance=sn,dn.useWatch=Ge.useWatch,dn.Provider=Te.RV,dn.create=()=>{};var $n=dn},20071:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return On}});var be=ce(84105),We=ce(87395),Fe=ce(92310),ft=ce.n(Fe),xe=ce(54476),ke=ce(20068),Te=ce(76190),we=ce(42978),Ee=ce(75931),Oe=ce(67732),it=ce(83652);function Le(){return typeof BigInt=="function"}function ze(ut){return!ut&&ut!==0&&!Number.isNaN(ut)||!String(ut).trim()}function st(ut){var wt=ut.trim(),Nt=wt.startsWith("-");Nt&&(wt=wt.slice(1)),wt=wt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),wt.startsWith(".")&&(wt="0".concat(wt));var Pn=wt||"0",Bn=Pn.split("."),Tn=Bn[0]||"0",nr=Bn[1]||"0";Tn==="0"&&nr==="0"&&(Nt=!1);var mr=Nt?"-":"";return{negative:Nt,negativeStr:mr,trimStr:Pn,integerStr:Tn,decimalStr:nr,fullStr:"".concat(mr).concat(Pn)}}function Qe(ut){var wt=String(ut);return!Number.isNaN(Number(wt))&&wt.includes("e")}function at(ut){var wt=String(ut);if(Qe(ut)){var Nt=Number(wt.slice(wt.indexOf("e-")+2)),Pn=wt.match(/\.(\d+)/);return Pn!=null&&Pn[1]&&(Nt+=Pn[1].length),Nt}return wt.includes(".")&&pt(wt)?wt.length-wt.indexOf(".")-1:0}function tt(ut){var wt=String(ut);if(Qe(ut)){if(ut>Number.MAX_SAFE_INTEGER)return String(Le()?BigInt(ut).toString():Number.MAX_SAFE_INTEGER);if(ut<Number.MIN_SAFE_INTEGER)return String(Le()?BigInt(ut).toString():Number.MIN_SAFE_INTEGER);wt=ut.toFixed(at(wt))}return st(wt).fullStr}function pt(ut){return typeof ut=="number"?!Number.isNaN(ut):ut?/^\s*-?\d+(\.\d+)?\s*$/.test(ut)||/^\s*-?\d+\.\s*$/.test(ut)||/^\s*-?\.\d+\s*$/.test(ut):!1}var Lt=function(){function ut(wt){if((0,Oe.Z)(this,ut),(0,ke.Z)(this,"origin",""),(0,ke.Z)(this,"negative",void 0),(0,ke.Z)(this,"integer",void 0),(0,ke.Z)(this,"decimal",void 0),(0,ke.Z)(this,"decimalLen",void 0),(0,ke.Z)(this,"empty",void 0),(0,ke.Z)(this,"nan",void 0),ze(wt)){this.empty=!0;return}if(this.origin=String(wt),wt==="-"||Number.isNaN(wt)){this.nan=!0;return}var Nt=wt;if(Qe(Nt)&&(Nt=Number(Nt)),Nt=typeof Nt=="string"?Nt:tt(Nt),pt(Nt)){var Pn=st(Nt);this.negative=Pn.negative;var Bn=Pn.trimStr.split(".");this.integer=BigInt(Bn[0]);var Tn=Bn[1]||"0";this.decimal=BigInt(Tn),this.decimalLen=Tn.length}else this.nan=!0}return(0,it.Z)(ut,[{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(Nt){var Pn="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Nt,"0"));return BigInt(Pn)}},{key:"negate",value:function(){var Nt=new ut(this.toString());return Nt.negative=!Nt.negative,Nt}},{key:"cal",value:function(Nt,Pn,Bn){var Tn=Math.max(this.getDecimalStr().length,Nt.getDecimalStr().length),nr=this.alignDecimal(Tn),mr=Nt.alignDecimal(Tn),ar=Pn(nr,mr).toString(),Er=Bn(Tn),_r=st(ar),Jn=_r.negativeStr,zr=_r.trimStr,Wr="".concat(Jn).concat(zr.padStart(Er+1,"0"));return new ut("".concat(Wr.slice(0,-Er),".").concat(Wr.slice(-Er)))}},{key:"add",value:function(Nt){if(this.isInvalidate())return new ut(Nt);var Pn=new ut(Nt);return Pn.isInvalidate()?this:this.cal(Pn,function(Bn,Tn){return Bn+Tn},function(Bn){return Bn})}},{key:"multi",value:function(Nt){var Pn=new ut(Nt);return this.isInvalidate()||Pn.isInvalidate()?new ut(NaN):this.cal(Pn,function(Bn,Tn){return Bn*Tn},function(Bn){return Bn*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(Nt){return this.toString()===(Nt==null?void 0:Nt.toString())}},{key:"lessEquals",value:function(Nt){return this.add(Nt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Nt?this.isInvalidate()?"":st("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),ut}(),Ue=function(){function ut(wt){if((0,Oe.Z)(this,ut),(0,ke.Z)(this,"origin",""),(0,ke.Z)(this,"number",void 0),(0,ke.Z)(this,"empty",void 0),ze(wt)){this.empty=!0;return}this.origin=String(wt),this.number=Number(wt)}return(0,it.Z)(ut,[{key:"negate",value:function(){return new ut(-this.toNumber())}},{key:"add",value:function(Nt){if(this.isInvalidate())return new ut(Nt);var Pn=Number(Nt);if(Number.isNaN(Pn))return this;var Bn=this.number+Pn;if(Bn>Number.MAX_SAFE_INTEGER)return new ut(Number.MAX_SAFE_INTEGER);if(Bn<Number.MIN_SAFE_INTEGER)return new ut(Number.MIN_SAFE_INTEGER);var Tn=Math.max(at(this.number),at(Pn));return new ut(Bn.toFixed(Tn))}},{key:"multi",value:function(Nt){var Pn=Number(Nt);if(this.isInvalidate()||Number.isNaN(Pn))return new ut(NaN);var Bn=this.number*Pn;if(Bn>Number.MAX_SAFE_INTEGER)return new ut(Number.MAX_SAFE_INTEGER);if(Bn<Number.MIN_SAFE_INTEGER)return new ut(Number.MIN_SAFE_INTEGER);var Tn=Math.max(at(this.number),at(Pn));return new ut(Bn.toFixed(Tn))}},{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(Nt){return this.toNumber()===(Nt==null?void 0:Nt.toNumber())}},{key:"lessEquals",value:function(Nt){return this.add(Nt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Nt?this.isInvalidate()?"":tt(this.number):this.origin}}]),ut}();function Xe(ut){return Le()?new Lt(ut):new Ue(ut)}function He(ut,wt,Nt){var Pn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ut==="")return"";var Bn=st(ut),Tn=Bn.negativeStr,nr=Bn.integerStr,mr=Bn.decimalStr,ar="".concat(wt).concat(mr),Er="".concat(Tn).concat(nr);if(Nt>=0){var _r=Number(mr[Nt]);if(_r>=5&&!Pn){var Jn=Xe(ut).add("".concat(Tn,"0.").concat("0".repeat(Nt)).concat(10-_r));return He(Jn.toString(),wt,Nt,Pn)}return Nt===0?Er:"".concat(Er).concat(wt).concat(mr.padEnd(Nt,"0").slice(0,Nt))}return ar===".0"?Er:"".concat(Er).concat(ar)}var Se=Xe,Ke=ce(93681),Ze=ce(34280),gt=ce(8654),je=ce(59301),St=ce(48736);function ot(ut,wt){var Nt=(0,je.useRef)(null);function Pn(){try{var Tn=ut.selectionStart,nr=ut.selectionEnd,mr=ut.value,ar=mr.substring(0,Tn),Er=mr.substring(nr);Nt.current={start:Tn,end:nr,value:mr,beforeTxt:ar,afterTxt:Er}}catch(_r){}}function Bn(){if(ut&&Nt.current&&wt)try{var Tn=ut.value,nr=Nt.current,mr=nr.beforeTxt,ar=nr.afterTxt,Er=nr.start,_r=Tn.length;if(Tn.endsWith(ar))_r=Tn.length-Nt.current.afterTxt.length;else if(Tn.startsWith(mr))_r=mr.length;else{var Jn=mr[Er-1],zr=Tn.indexOf(Jn,Er-1);zr!==-1&&(_r=zr+1)}ut.setSelectionRange(_r,_r)}catch(Wr){(0,St.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Wr.message))}}return[Pn,Bn]}var Et=ce(49658),Ge=function(){var wt=(0,je.useState)(!1),Nt=(0,we.Z)(wt,2),Pn=Nt[0],Bn=Nt[1];return(0,Ze.Z)(function(){Bn((0,Et.Z)())},[]),Pn},Dt=Ge,rt=ce(16089),yt=200,Ct=600;function ct(ut){var wt=ut.prefixCls,Nt=ut.upNode,Pn=ut.downNode,Bn=ut.upDisabled,Tn=ut.downDisabled,nr=ut.onStep,mr=je.useRef(),ar=je.useRef([]),Er=je.useRef();Er.current=nr;var _r=function(){clearTimeout(mr.current)},Jn=function(Ur,qr){Ur.preventDefault(),_r(),Er.current(qr);function It(){Er.current(qr),mr.current=setTimeout(It,yt)}mr.current=setTimeout(It,Ct)};je.useEffect(function(){return function(){_r(),ar.current.forEach(function(xr){return rt.Z.cancel(xr)})}},[]);var zr=Dt();if(zr)return null;var Wr="".concat(wt,"-handler"),Vr=ft()(Wr,"".concat(Wr,"-up"),(0,ke.Z)({},"".concat(Wr,"-up-disabled"),Bn)),ei=ft()(Wr,"".concat(Wr,"-down"),(0,ke.Z)({},"".concat(Wr,"-down-disabled"),Tn)),Tr=function(){return ar.current.push((0,rt.Z)(_r))},Yr={unselectable:"on",role:"button",onMouseUp:Tr,onMouseLeave:Tr};return je.createElement("div",{className:"".concat(Wr,"-wrap")},je.createElement("span",(0,xe.Z)({},Yr,{onMouseDown:function(Ur){Jn(Ur,!0)},"aria-label":"Increase Value","aria-disabled":Bn,className:Vr}),Nt||je.createElement("span",{unselectable:"on",className:"".concat(wt,"-handler-up-inner")})),je.createElement("span",(0,xe.Z)({},Yr,{onMouseDown:function(Ur){Jn(Ur,!1)},"aria-label":"Decrease Value","aria-disabled":Tn,className:ei}),Pn||je.createElement("span",{unselectable:"on",className:"".concat(wt,"-handler-down-inner")})))}function Pe(ut){var wt=typeof ut=="number"?tt(ut):st(ut).fullStr,Nt=wt.includes(".");return Nt?st(wt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:ut+"0"}var ye=ce(5643),ht=function(){var ut=(0,je.useRef)(0),wt=function(){rt.Z.cancel(ut.current)};return(0,je.useEffect)(function(){return wt},[]),function(Nt){wt(),ut.current=(0,rt.Z)(function(){Nt()})}},Vt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Ht=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Ye=function(wt,Nt){return wt||Nt.isEmpty()?Nt.toString():Nt.toNumber()},Je=function(wt){var Nt=Se(wt);return Nt.isInvalidate()?null:Nt},At=je.forwardRef(function(ut,wt){var Nt,Pn=ut.prefixCls,Bn=Pn===void 0?"rc-input-number":Pn,Tn=ut.className,nr=ut.style,mr=ut.min,ar=ut.max,Er=ut.step,_r=Er===void 0?1:Er,Jn=ut.defaultValue,zr=ut.value,Wr=ut.disabled,Vr=ut.readOnly,ei=ut.upHandler,Tr=ut.downHandler,Yr=ut.keyboard,xr=ut.controls,Ur=xr===void 0?!0:xr,qr=ut.classNames,It=ut.stringMode,_n=ut.parser,yn=ut.formatter,pn=ut.precision,xn=ut.decimalSeparator,sn=ut.onChange,dn=ut.onInput,$n=ut.onPressEnter,nt=ut.onStep,_e=(0,Ee.Z)(ut,Vt),Ie="".concat(Bn,"-input"),Ae=je.useRef(null),Be=je.useState(!1),Ve=(0,we.Z)(Be,2),lt=Ve[0],Bt=Ve[1],bt=je.useRef(!1),zt=je.useRef(!1),tn=je.useRef(!1),cn=je.useState(function(){return Se(zr!=null?zr:Jn)}),on=(0,we.Z)(cn,2),_t=on[0],Yt=on[1];function Dn(kn){zr===void 0&&Yt(kn)}var Cn=je.useCallback(function(kn,En){if(!En)return pn>=0?pn:Math.max(at(kn),at(_r))},[pn,_r]),gn=je.useCallback(function(kn){var En=String(kn);if(_n)return _n(En);var dr=En;return xn&&(dr=dr.replace(xn,".")),dr.replace(/[^\w.-]+/g,"")},[_n,xn]),Mn=je.useRef(""),Fn=je.useCallback(function(kn,En){if(yn)return yn(kn,{userTyping:En,input:String(Mn.current)});var dr=typeof kn=="number"?tt(kn):kn;if(!En){var qn=Cn(dr,En);if(pt(dr)&&(xn||qn>=0)){var wr=xn||".";dr=He(dr,wr,qn)}}return dr},[yn,Cn,xn]),un=je.useState(function(){var kn=Jn!=null?Jn:zr;return _t.isInvalidate()&&["string","number"].includes((0,Te.Z)(kn))?Number.isNaN(kn)?"":kn:Fn(_t.toString(),!1)}),Zn=(0,we.Z)(un,2),et=Zn[0],Tt=Zn[1];Mn.current=et;function $t(kn,En){Tt(Fn(kn.isInvalidate()?kn.toString(!1):kn.toString(!En),En))}var Jt=je.useMemo(function(){return Je(ar)},[ar,pn]),Ot=je.useMemo(function(){return Je(mr)},[mr,pn]),Zt=je.useMemo(function(){return!Jt||!_t||_t.isInvalidate()?!1:Jt.lessEquals(_t)},[Jt,_t]),Wt=je.useMemo(function(){return!Ot||!_t||_t.isInvalidate()?!1:_t.lessEquals(Ot)},[Ot,_t]),nn=ot(Ae.current,lt),bn=(0,we.Z)(nn,2),Ln=bn[0],Hn=bn[1],jn=function(En){return Jt&&!En.lessEquals(Jt)?Jt:Ot&&!Ot.lessEquals(En)?Ot:null},rr=function(En){return!jn(En)},cr=function(En,dr){var qn=En,wr=rr(qn)||qn.isEmpty();if(!qn.isEmpty()&&!dr&&(qn=jn(qn)||qn,wr=!0),!Vr&&!Wr&&wr){var Lr=qn.toString(),Cr=Cn(Lr,dr);return Cr>=0&&(qn=Se(He(Lr,".",Cr)),rr(qn)||(qn=Se(He(Lr,".",Cr,!0)))),qn.equals(_t)||(Dn(qn),sn==null||sn(qn.isEmpty()?null:Ye(It,qn)),zr===void 0&&$t(qn,dr)),qn}return _t},er=ht(),vr=function kn(En){if(Ln(),Mn.current=En,Tt(En),!zt.current){var dr=gn(En),qn=Se(dr);qn.isNaN()||cr(qn,!0)}dn==null||dn(En),er(function(){var wr=En;_n||(wr=En.replace(/。/g,".")),wr!==En&&kn(wr)})},fr=function(){zt.current=!0},pr=function(){zt.current=!1,vr(Ae.current.value)},Gn=function(En){vr(En.target.value)},sr=function(En){var dr;if(!(En&&Zt||!En&&Wt)){bt.current=!1;var qn=Se(tn.current?Pe(_r):_r);En||(qn=qn.negate());var wr=(_t||Se(0)).add(qn.toString()),Lr=cr(wr,!1);nt==null||nt(Ye(It,Lr),{offset:tn.current?Pe(_r):_r,type:En?"up":"down"}),(dr=Ae.current)===null||dr===void 0||dr.focus()}},Xn=function(En){var dr=Se(gn(et)),qn=dr;dr.isNaN()?qn=cr(_t,En):qn=cr(dr,En),zr!==void 0?$t(_t,!1):qn.isNaN()||$t(qn,!1)},Rn=function(){bt.current=!0},gr=function(En){var dr=En.key,qn=En.shiftKey;bt.current=!0,tn.current=qn,dr==="Enter"&&(zt.current||(bt.current=!1),Xn(!1),$n==null||$n(En)),Yr!==!1&&!zt.current&&["Up","ArrowUp","Down","ArrowDown"].includes(dr)&&(sr(dr==="Up"||dr==="ArrowUp"),En.preventDefault())},kr=function(){bt.current=!1,tn.current=!1},tr=function(){Xn(!1),Bt(!1),bt.current=!1};return(0,Ze.o)(function(){_t.isInvalidate()||$t(_t,!1)},[pn]),(0,Ze.o)(function(){var kn=Se(zr);Yt(kn);var En=Se(gn(et));(!kn.equals(En)||!bt.current||yn)&&$t(kn,bt.current)},[zr]),(0,Ze.o)(function(){yn&&Hn()},[et]),je.createElement("div",{className:ft()(Bn,qr==null?void 0:qr.input,Tn,(Nt={},(0,ke.Z)(Nt,"".concat(Bn,"-focused"),lt),(0,ke.Z)(Nt,"".concat(Bn,"-disabled"),Wr),(0,ke.Z)(Nt,"".concat(Bn,"-readonly"),Vr),(0,ke.Z)(Nt,"".concat(Bn,"-not-a-number"),_t.isNaN()),(0,ke.Z)(Nt,"".concat(Bn,"-out-of-range"),!_t.isInvalidate()&&!rr(_t)),Nt)),style:nr,onFocus:function(){Bt(!0)},onBlur:tr,onKeyDown:gr,onKeyUp:kr,onCompositionStart:fr,onCompositionEnd:pr,onBeforeInput:Rn},Ur&&je.createElement(ct,{prefixCls:Bn,upNode:ei,downNode:Tr,upDisabled:Zt,downDisabled:Wt,onStep:sr}),je.createElement("div",{className:"".concat(Ie,"-wrap")},je.createElement("input",(0,xe.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":mr,"aria-valuemax":ar,"aria-valuenow":_t.isInvalidate()?null:_t.toString(),step:_r},_e,{ref:(0,gt.sQ)(Ae,wt),className:Ie,value:et,onChange:Gn,disabled:Wr,readOnly:Vr}))))}),mn=je.forwardRef(function(ut,wt){var Nt=ut.disabled,Pn=ut.style,Bn=ut.prefixCls,Tn=ut.value,nr=ut.prefix,mr=ut.suffix,ar=ut.addonBefore,Er=ut.addonAfter,_r=ut.classes,Jn=ut.className,zr=ut.classNames,Wr=(0,Ee.Z)(ut,Ht),Vr=je.useRef(null),ei=function(Yr){Vr.current&&(0,ye.nH)(Vr.current,Yr)};return je.createElement(Ke.BaseInput,{inputElement:je.createElement(At,(0,xe.Z)({prefixCls:Bn,disabled:Nt,classNames:zr,ref:(0,gt.sQ)(Vr,wt)},Wr)),className:Jn,triggerFocus:ei,prefixCls:Bn,value:Tn,disabled:Nt,style:Pn,prefix:nr,suffix:mr,addonAfter:Er,addonBefore:ar,classes:_r,classNames:zr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});mn.displayName="InputNumber";var Gt=mn,hn=Gt,jt=ce(19080),Ft=ce(36355),Kt=ce(92736),ge=ce(1684),se=ce(19716),oe=ce(32441),de=ce(33234),fe=ce(9937),le=ce(17313),$e=ce(74207),dt=ce(83116),Rt=ce(37613);const Pt=(ut,wt)=>{let{componentCls:Nt,borderRadiusSM:Pn,borderRadiusLG:Bn}=ut;const Tn=wt==="lg"?Bn:Pn;return{[`&-${wt}`]:{[`${Nt}-handler-wrap`]:{borderStartEndRadius:Tn,borderEndEndRadius:Tn},[`${Nt}-handler-up`]:{borderStartEndRadius:Tn},[`${Nt}-handler-down`]:{borderEndEndRadius:Tn}}}},Ut=ut=>{const{componentCls:wt,lineWidth:Nt,lineType:Pn,colorBorder:Bn,borderRadius:Tn,fontSizeLG:nr,controlHeightLG:mr,controlHeightSM:ar,colorError:Er,paddingInlineSM:_r,colorTextDescription:Jn,motionDurationMid:zr,handleHoverColor:Wr,paddingInline:Vr,paddingBlock:ei,handleBg:Tr,handleActiveBg:Yr,colorTextDisabled:xr,borderRadiusSM:Ur,borderRadiusLG:qr,controlWidth:It,handleVisible:_n,handleBorderColor:yn}=ut;return[{[wt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(ut)),(0,fe.ik)(ut)),(0,fe.bi)(ut,wt)),{display:"inline-block",width:It,margin:0,padding:0,border:`${Nt}px ${Pn} ${Bn}`,borderRadius:Tn,"&-rtl":{direction:"rtl",[`${wt}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:nr,borderRadius:qr,[`input${wt}-input`]:{height:mr-2*Nt}},"&-sm":{padding:0,borderRadius:Ur,[`input${wt}-input`]:{height:ar-2*Nt,padding:`0 ${_r}px`}},"&:hover":Object.assign({},(0,fe.pU)(ut)),"&-focused":Object.assign({},(0,fe.M1)(ut)),"&-out-of-range":{[`${wt}-input-wrap`]:{input:{color:Er}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,le.Wf)(ut)),(0,fe.s7)(ut)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${wt}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${wt}-group-addon`]:{borderRadius:qr,fontSize:ut.fontSizeLG}},"&-sm":{[`${wt}-group-addon`]:{borderRadius:Ur}},[`${wt}-wrapper-disabled > ${wt}-group-addon`]:Object.assign({},(0,fe.Xy)(ut))}}),[`&-disabled ${wt}-input`]:{cursor:"not-allowed"},[wt]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(ut)),{width:"100%",padding:`${ei}px ${Vr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Tn,outline:0,transition:`all ${zr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,fe.nz)(ut.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[wt]:Object.assign(Object.assign(Object.assign({[`&:hover ${wt}-handler-wrap, &-focused ${wt}-handler-wrap`]:{opacity:1},[`${wt}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:ut.handleWidth,height:"100%",background:Tr,borderStartStartRadius:0,borderStartEndRadius:Tn,borderEndEndRadius:Tn,borderEndStartRadius:0,opacity:_n===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${zr} linear ${zr}`,[`${wt}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${wt}-handler-up-inner,
|
|
|
${wt}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:ut.handleFontSize}}},[`${wt}-handler`]:{height:"50%",overflow:"hidden",color:Jn,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Nt}px ${Pn} ${yn}`,transition:`all ${zr} linear`,"&:active":{background:Yr},"&:hover":{height:"60%",[`
|
|
|
${wt}-handler-up-inner,
|
|
|
${wt}-handler-down-inner
|
|
|
`]:{color:Wr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,le.Ro)()),{color:Jn,transition:`all ${zr} linear`,userSelect:"none"})},[`${wt}-handler-up`]:{borderStartEndRadius:Tn},[`${wt}-handler-down`]:{borderBlockStart:`${Nt}px ${Pn} ${yn}`,borderEndEndRadius:Tn}},Pt(ut,"lg")),Pt(ut,"sm")),{"&-disabled, &-readonly":{[`${wt}-handler-wrap`]:{display:"none"},[`${wt}-input`]:{color:"inherit"}},[`
|
|
|
${wt}-handler-up-disabled,
|
|
|
${wt}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${wt}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${wt}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:xr}})},{[`${wt}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${wt}-handler-down`]:{borderBlockStartWidth:0}}}]},Xt=ut=>{const{componentCls:wt,paddingBlock:Nt,paddingInline:Pn,inputAffixPadding:Bn,controlWidth:Tn,borderRadiusLG:nr,borderRadiusSM:mr}=ut;return{[`${wt}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,fe.ik)(ut)),(0,fe.bi)(ut,`${wt}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Tn,padding:0,paddingInlineStart:Pn,"&-lg":{borderRadius:nr},"&-sm":{borderRadius:mr},[`&:not(${wt}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,fe.pU)(ut)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${wt}-disabled`]:{background:"transparent"},[`> div${wt}`]:{width:"100%",border:"none",outline:"none",[`&${wt}-focused`]:{boxShadow:"none !important"}},[`input${wt}-input`]:{padding:`${Nt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${wt}-handler-wrap`]:{zIndex:2},[wt]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Bn},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Pn,marginInlineStart:Bn}}})}};var en=(0,dt.Z)("InputNumber",ut=>{const wt=(0,Rt.TS)(ut,(0,fe.e5)(ut));return[Ut(wt),Xt(wt),(0,$e.c)(wt)]},ut=>Object.assign(Object.assign({},(0,fe.TM)(ut)),{controlWidth:90,handleWidth:ut.controlHeightSM-ut.lineWidth*2,handleFontSize:ut.fontSize/2,handleVisible:"auto",handleActiveBg:ut.colorFillAlter,handleBg:ut.colorBgContainer,handleHoverColor:ut.colorPrimary,handleBorderColor:ut.colorBorder})),ln=function(ut,wt){var Nt={};for(var Pn in ut)Object.prototype.hasOwnProperty.call(ut,Pn)&&wt.indexOf(Pn)<0&&(Nt[Pn]=ut[Pn]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bn=0,Pn=Object.getOwnPropertySymbols(ut);Bn<Pn.length;Bn++)wt.indexOf(Pn[Bn])<0&&Object.prototype.propertyIsEnumerable.call(ut,Pn[Bn])&&(Nt[Pn[Bn]]=ut[Pn[Bn]]);return Nt};const Sn=je.forwardRef((ut,wt)=>{const{getPrefixCls:Nt,direction:Pn}=je.useContext(Ft.E_),Bn=je.useRef(null);je.useImperativeHandle(wt,()=>Bn.current);const{className:Tn,rootClassName:nr,size:mr,disabled:ar,prefixCls:Er,addonBefore:_r,addonAfter:Jn,prefix:zr,bordered:Wr=!0,readOnly:Vr,status:ei,controls:Tr}=ut,Yr=ln(ut,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),xr=Nt("input-number",Er),[Ur,qr]=en(xr),{compactSize:It,compactItemClassnames:_n}=(0,de.ri)(xr,Pn);let yn=je.createElement(We.Z,{className:`${xr}-handler-up-inner`}),pn=je.createElement(be.Z,{className:`${xr}-handler-down-inner`});const xn=typeof Tr=="boolean"?Tr:void 0;typeof Tr=="object"&&(yn=typeof Tr.upIcon=="undefined"?yn:je.createElement("span",{className:`${xr}-handler-up-inner`},Tr.upIcon),pn=typeof Tr.downIcon=="undefined"?pn:je.createElement("span",{className:`${xr}-handler-down-inner`},Tr.downIcon));const{hasFeedback:sn,status:dn,isFormItemInput:$n,feedbackIcon:nt}=je.useContext(oe.aM),_e=(0,jt.F)(dn,ei),Ie=(0,se.Z)(bt=>{var zt;return(zt=mr!=null?mr:It)!==null&&zt!==void 0?zt:bt}),Ae=je.useContext(ge.Z),Be=ar!=null?ar:Ae,Ve=ft()({[`${xr}-lg`]:Ie==="large",[`${xr}-sm`]:Ie==="small",[`${xr}-rtl`]:Pn==="rtl",[`${xr}-borderless`]:!Wr,[`${xr}-in-form-item`]:$n},(0,jt.Z)(xr,_e),_n,qr),lt=`${xr}-group`,Bt=je.createElement(hn,Object.assign({ref:Bn,disabled:Be,className:ft()(Tn,nr),upHandler:yn,downHandler:pn,prefixCls:xr,readOnly:Vr,controls:xn,prefix:zr,suffix:sn&&nt,addonAfter:Jn&&je.createElement(de.BR,null,je.createElement(oe.Ux,{override:!0,status:!0},Jn)),addonBefore:_r&&je.createElement(de.BR,null,je.createElement(oe.Ux,{override:!0,status:!0},_r)),classNames:{input:Ve},classes:{affixWrapper:ft()((0,jt.Z)(`${xr}-affix-wrapper`,_e,sn),{[`${xr}-affix-wrapper-sm`]:Ie==="small",[`${xr}-affix-wrapper-lg`]:Ie==="large",[`${xr}-affix-wrapper-rtl`]:Pn==="rtl",[`${xr}-affix-wrapper-borderless`]:!Wr},qr),wrapper:ft()({[`${lt}-rtl`]:Pn==="rtl",[`${xr}-wrapper-disabled`]:Be},qr),group:ft()({[`${xr}-group-wrapper-sm`]:Ie==="small",[`${xr}-group-wrapper-lg`]:Ie==="large",[`${xr}-group-wrapper-rtl`]:Pn==="rtl"},(0,jt.Z)(`${xr}-group-wrapper`,_e,sn),qr)}},Yr));return Ur(Bt)}),xt=Sn,an=ut=>je.createElement(Kt.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},je.createElement(Sn,Object.assign({},ut)));xt._InternalPanelDoNotUseOrYouWillBeFired=an;var On=xt},9432:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Lt},n:function(){return tt}});var be=ce(19248),We=ce(92310),Fe=ce.n(We),ft=ce(93681),xe=ce(8654),ke=ce(59301),Te=ce(19080),we=ce(36355),Ee=ce(1684),Oe=ce(19716),it=ce(32441),Le=ce(33234),ze=ce(59412),st=ce(9937);function Qe(Ue){return!!(Ue.prefix||Ue.suffix||Ue.allowClear)}var at=function(Ue,Xe){var He={};for(var Se in Ue)Object.prototype.hasOwnProperty.call(Ue,Se)&&Xe.indexOf(Se)<0&&(He[Se]=Ue[Se]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,Se=Object.getOwnPropertySymbols(Ue);Ke<Se.length;Ke++)Xe.indexOf(Se[Ke])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Se[Ke])&&(He[Se[Ke]]=Ue[Se[Ke]]);return He};function tt(Ue,Xe){if(!Ue)return;Ue.focus(Xe);const{cursor:He}=Xe||{};if(He){const Se=Ue.value.length;switch(He){case"start":Ue.setSelectionRange(0,0);break;case"end":Ue.setSelectionRange(Se,Se);break;default:Ue.setSelectionRange(0,Se);break}}}var Lt=(0,ke.forwardRef)((Ue,Xe)=>{var He;const{prefixCls:Se,bordered:Ke=!0,status:Ze,size:gt,disabled:je,onBlur:St,onFocus:ot,suffix:Et,allowClear:Ge,addonAfter:Dt,addonBefore:rt,className:yt,style:Ct,styles:ct,rootClassName:Pe,onChange:ye,classNames:ht}=Ue,Vt=at(Ue,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Ht,direction:Ye,input:Je}=ke.useContext(we.E_),At=Ht("input",Se),mn=(0,ke.useRef)(null),[Gt,hn]=(0,st.ZP)(At),{compactSize:jt,compactItemClassnames:Ft}=(0,Le.ri)(At,Ye),Kt=(0,Oe.Z)(Sn=>{var xt;return(xt=gt!=null?gt:jt)!==null&&xt!==void 0?xt:Sn}),ge=ke.useContext(Ee.Z),se=je!=null?je:ge,{status:oe,hasFeedback:de,feedbackIcon:fe}=(0,ke.useContext)(it.aM),le=(0,Te.F)(oe,Ze),$e=Qe(Ue)||!!de,dt=(0,ke.useRef)($e);(0,ke.useEffect)(()=>{var Sn;$e&&dt.current,dt.current=$e},[$e]);const Rt=(0,ze.Z)(mn,!0),Pt=Sn=>{Rt(),St==null||St(Sn)},Ut=Sn=>{Rt(),ot==null||ot(Sn)},Xt=Sn=>{Rt(),ye==null||ye(Sn)},en=(de||Et)&&ke.createElement(ke.Fragment,null,Et,de&&fe);let ln;return typeof Ge=="object"&&(Ge!=null&&Ge.clearIcon)?ln=Ge:Ge&&(ln={clearIcon:ke.createElement(be.Z,null)}),Gt(ke.createElement(ft.default,Object.assign({ref:(0,xe.sQ)(Xe,mn),prefixCls:At,autoComplete:Je==null?void 0:Je.autoComplete},Vt,{disabled:se,onBlur:Pt,onFocus:Ut,style:Object.assign(Object.assign({},Je==null?void 0:Je.style),Ct),styles:Object.assign(Object.assign({},Je==null?void 0:Je.styles),ct),suffix:en,allowClear:ln,className:Fe()(yt,Pe,Ft,Je==null?void 0:Je.className),onChange:Xt,addonAfter:Dt&&ke.createElement(Le.BR,null,ke.createElement(it.Ux,{override:!0,status:!0},Dt)),addonBefore:rt&&ke.createElement(Le.BR,null,ke.createElement(it.Ux,{override:!0,status:!0},rt)),classNames:Object.assign(Object.assign(Object.assign({},ht),Je==null?void 0:Je.classNames),{input:Fe()({[`${At}-sm`]:Kt==="small",[`${At}-lg`]:Kt==="large",[`${At}-rtl`]:Ye==="rtl",[`${At}-borderless`]:!Ke},!$e&&(0,Te.Z)(At,le),ht==null?void 0:ht.input,(He=Je==null?void 0:Je.classNames)===null||He===void 0?void 0:He.input,hn)}),classes:{affixWrapper:Fe()({[`${At}-affix-wrapper-sm`]:Kt==="small",[`${At}-affix-wrapper-lg`]:Kt==="large",[`${At}-affix-wrapper-rtl`]:Ye==="rtl",[`${At}-affix-wrapper-borderless`]:!Ke},(0,Te.Z)(`${At}-affix-wrapper`,le,de),hn),wrapper:Fe()({[`${At}-group-rtl`]:Ye==="rtl"},hn),group:Fe()({[`${At}-group-wrapper-sm`]:Kt==="small",[`${At}-group-wrapper-lg`]:Kt==="large",[`${At}-group-wrapper-rtl`]:Ye==="rtl",[`${At}-group-wrapper-disabled`]:se},(0,Te.Z)(`${At}-group-wrapper`,le,de),hn)}})))})},1643:function(wn,qt,ce){"use strict";var be=ce(19248),We=ce(92310),Fe=ce.n(We),ft=ce(9296),xe=ce(59301),ke=ce(19080),Te=ce(36355),we=ce(1684),Ee=ce(19716),Oe=ce(32441),it=ce(9432),Le=ce(9937),ze=function(Qe,at){var tt={};for(var pt in Qe)Object.prototype.hasOwnProperty.call(Qe,pt)&&at.indexOf(pt)<0&&(tt[pt]=Qe[pt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Lt=0,pt=Object.getOwnPropertySymbols(Qe);Lt<pt.length;Lt++)at.indexOf(pt[Lt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,pt[Lt])&&(tt[pt[Lt]]=Qe[pt[Lt]]);return tt};const st=(0,xe.forwardRef)((Qe,at)=>{const{prefixCls:tt,bordered:pt=!0,size:Lt,disabled:Ue,status:Xe,allowClear:He,showCount:Se,classNames:Ke,rootClassName:Ze,className:gt}=Qe,je=ze(Qe,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:St,direction:ot}=xe.useContext(Te.E_),Et=(0,Ee.Z)(Lt),Ge=xe.useContext(we.Z),Dt=Ue!=null?Ue:Ge,{status:rt,hasFeedback:yt,feedbackIcon:Ct}=xe.useContext(Oe.aM),ct=(0,ke.F)(rt,Xe),Pe=xe.useRef(null);xe.useImperativeHandle(at,()=>{var Ye;return{resizableTextArea:(Ye=Pe.current)===null||Ye===void 0?void 0:Ye.resizableTextArea,focus:Je=>{var At,mn;(0,it.n)((mn=(At=Pe.current)===null||At===void 0?void 0:At.resizableTextArea)===null||mn===void 0?void 0:mn.textArea,Je)},blur:()=>{var Je;return(Je=Pe.current)===null||Je===void 0?void 0:Je.blur()}}});const ye=St("input",tt);let ht;typeof He=="object"&&(He!=null&&He.clearIcon)?ht=He:He&&(ht={clearIcon:xe.createElement(be.Z,null)});const[Vt,Ht]=(0,Le.ZP)(ye);return Vt(xe.createElement(ft.default,Object.assign({},je,{disabled:Dt,allowClear:ht,className:Fe()(gt,Ze),classes:{affixWrapper:Fe()(`${ye}-textarea-affix-wrapper`,{[`${ye}-affix-wrapper-rtl`]:ot==="rtl",[`${ye}-affix-wrapper-borderless`]:!pt,[`${ye}-affix-wrapper-sm`]:Et==="small",[`${ye}-affix-wrapper-lg`]:Et==="large",[`${ye}-textarea-show-count`]:Se},(0,ke.Z)(`${ye}-affix-wrapper`,ct),Ht)},classNames:Object.assign(Object.assign({},Ke),{textarea:Fe()({[`${ye}-borderless`]:!pt,[`${ye}-sm`]:Et==="small",[`${ye}-lg`]:Et==="large"},(0,ke.Z)(ye,ct),Ht,Ke==null?void 0:Ke.textarea)}),prefixCls:ye,suffix:yt&&xe.createElement("span",{className:`${ye}-textarea-suffix`},Ct),showCount:Se,ref:Pe})))});qt.Z=st},59412:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return We}});var be=ce(59301);function We(Fe,ft){const xe=(0,be.useRef)([]),ke=()=>{xe.current.push(setTimeout(()=>{var Te,we,Ee,Oe;!((Te=Fe.current)===null||Te===void 0)&&Te.input&&((we=Fe.current)===null||we===void 0?void 0:we.input.getAttribute("type"))==="password"&&(!((Ee=Fe.current)===null||Ee===void 0)&&Ee.input.hasAttribute("value"))&&((Oe=Fe.current)===null||Oe===void 0||Oe.input.removeAttribute("value"))}))};return(0,be.useEffect)(()=>(ft&&ke(),()=>xe.current.forEach(Te=>{Te&&clearTimeout(Te)})),[]),ke}},92832:function(wn,qt,ce){"use strict";ce.d(qt,{default:function(){return Et}});var be=ce(92310),We=ce.n(be),Fe=ce(59301),ft=ce(36355),xe=ce(32441),ke=ce(9937),we=Ge=>{const{getPrefixCls:Dt,direction:rt}=(0,Fe.useContext)(ft.E_),{prefixCls:yt,className:Ct}=Ge,ct=Dt("input-group",yt),Pe=Dt("input"),[ye,ht]=(0,ke.ZP)(Pe),Vt=We()(ct,{[`${ct}-lg`]:Ge.size==="large",[`${ct}-sm`]:Ge.size==="small",[`${ct}-compact`]:Ge.compact,[`${ct}-rtl`]:rt==="rtl"},ht,Ct),Ht=(0,Fe.useContext)(xe.aM),Ye=(0,Fe.useMemo)(()=>Object.assign(Object.assign({},Ht),{isFormItemInput:!1}),[Ht]);return ye(Fe.createElement("span",{className:Vt,style:Ge.style,onMouseEnter:Ge.onMouseEnter,onMouseLeave:Ge.onMouseLeave,onFocus:Ge.onFocus,onBlur:Ge.onBlur},Fe.createElement(xe.aM.Provider,{value:Ye},Ge.children)))},Ee=ce(9432),Oe=ce(73331),it=ce(15277),Le=ce(2738),ze=ce(8654),st=ce(59412),Qe=function(Ge,Dt){var rt={};for(var yt in Ge)Object.prototype.hasOwnProperty.call(Ge,yt)&&Dt.indexOf(yt)<0&&(rt[yt]=Ge[yt]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,yt=Object.getOwnPropertySymbols(Ge);Ct<yt.length;Ct++)Dt.indexOf(yt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(Ge,yt[Ct])&&(rt[yt[Ct]]=Ge[yt[Ct]]);return rt};const at=Ge=>Ge?Fe.createElement(it.Z,null):Fe.createElement(Oe.Z,null),tt={click:"onClick",hover:"onMouseOver"};var Lt=Fe.forwardRef((Ge,Dt)=>{const{visibilityToggle:rt=!0}=Ge,yt=typeof rt=="object"&&rt.visible!==void 0,[Ct,ct]=(0,Fe.useState)(()=>yt?rt.visible:!1),Pe=(0,Fe.useRef)(null);Fe.useEffect(()=>{yt&&ct(rt.visible)},[yt,rt]);const ye=(0,st.Z)(Pe),ht=()=>{const{disabled:se}=Ge;se||(Ct&&ye(),ct(oe=>{var de;const fe=!oe;return typeof rt=="object"&&((de=rt.onVisibleChange)===null||de===void 0||de.call(rt,fe)),fe}))},Vt=se=>{const{action:oe="click",iconRender:de=at}=Ge,fe=tt[oe]||"",le=de(Ct),$e={[fe]:ht,className:`${se}-icon`,key:"passwordIcon",onMouseDown:dt=>{dt.preventDefault()},onMouseUp:dt=>{dt.preventDefault()}};return Fe.cloneElement(Fe.isValidElement(le)?le:Fe.createElement("span",null,le),$e)},{className:Ht,prefixCls:Ye,inputPrefixCls:Je,size:At}=Ge,mn=Qe(Ge,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Gt}=Fe.useContext(ft.E_),hn=Gt("input",Je),jt=Gt("input-password",Ye),Ft=rt&&Vt(jt),Kt=We()(jt,Ht,{[`${jt}-${At}`]:!!At}),ge=Object.assign(Object.assign({},(0,Le.Z)(mn,["suffix","iconRender","visibilityToggle"])),{type:Ct?"text":"password",className:Kt,prefixCls:hn,suffix:Ft});return At&&(ge.size=At),Fe.createElement(Ee.Z,Object.assign({ref:(0,ze.sQ)(Dt,Pe)},ge))}),Ue=ce(47472),Xe=ce(92343),He=ce(3113),Se=ce(19716),Ke=ce(33234),Ze=function(Ge,Dt){var rt={};for(var yt in Ge)Object.prototype.hasOwnProperty.call(Ge,yt)&&Dt.indexOf(yt)<0&&(rt[yt]=Ge[yt]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,yt=Object.getOwnPropertySymbols(Ge);Ct<yt.length;Ct++)Dt.indexOf(yt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(Ge,yt[Ct])&&(rt[yt[Ct]]=Ge[yt[Ct]]);return rt},je=Fe.forwardRef((Ge,Dt)=>{const{prefixCls:rt,inputPrefixCls:yt,className:Ct,size:ct,suffix:Pe,enterButton:ye=!1,addonAfter:ht,loading:Vt,disabled:Ht,onSearch:Ye,onChange:Je,onCompositionStart:At,onCompositionEnd:mn}=Ge,Gt=Ze(Ge,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:hn,direction:jt}=Fe.useContext(ft.E_),Ft=Fe.useRef(!1),Kt=hn("input-search",rt),ge=hn("input",yt),{compactSize:se}=(0,Ke.ri)(Kt,jt),oe=(0,Se.Z)(an=>{var On;return(On=ct!=null?ct:se)!==null&&On!==void 0?On:an}),de=Fe.useRef(null),fe=an=>{an&&an.target&&an.type==="click"&&Ye&&Ye(an.target.value,an,{source:"clear"}),Je&&Je(an)},le=an=>{var On;document.activeElement===((On=de.current)===null||On===void 0?void 0:On.input)&&an.preventDefault()},$e=an=>{var On,ut;Ye&&Ye((ut=(On=de.current)===null||On===void 0?void 0:On.input)===null||ut===void 0?void 0:ut.value,an,{source:"input"})},dt=an=>{Ft.current||Vt||$e(an)},Rt=typeof ye=="boolean"?Fe.createElement(Ue.Z,null):null,Pt=`${Kt}-button`;let Ut;const Xt=ye||{},en=Xt.type&&Xt.type.__ANT_BUTTON===!0;en||Xt.type==="button"?Ut=(0,Xe.Tm)(Xt,Object.assign({onMouseDown:le,onClick:an=>{var On,ut;(ut=(On=Xt==null?void 0:Xt.props)===null||On===void 0?void 0:On.onClick)===null||ut===void 0||ut.call(On,an),$e(an)},key:"enterButton"},en?{className:Pt,size:oe}:{})):Ut=Fe.createElement(He.ZP,{className:Pt,type:ye?"primary":void 0,size:oe,disabled:Ht,key:"enterButton",onMouseDown:le,onClick:$e,loading:Vt,icon:Rt},ye),ht&&(Ut=[Ut,(0,Xe.Tm)(ht,{key:"addonAfter"})]);const ln=We()(Kt,{[`${Kt}-rtl`]:jt==="rtl",[`${Kt}-${oe}`]:!!oe,[`${Kt}-with-button`]:!!ye},Ct),Sn=an=>{Ft.current=!0,At==null||At(an)},xt=an=>{Ft.current=!1,mn==null||mn(an)};return Fe.createElement(Ee.Z,Object.assign({ref:(0,ze.sQ)(de,Dt),onPressEnter:dt},Gt,{size:oe,onCompositionStart:Sn,onCompositionEnd:xt,prefixCls:ge,addonAfter:Ut,suffix:Pe,onChange:fe,className:ln,disabled:Ht}))}),St=ce(1643);const ot=Ee.Z;ot.Group=we,ot.Search=je,ot.TextArea=St.Z,ot.Password=Lt;var Et=ot},9937:function(wn,qt,ce){"use strict";ce.d(qt,{M1:function(){return Te},TM:function(){return Xe},Xy:function(){return we},bi:function(){return it},e5:function(){return Ue},ik:function(){return Le},nz:function(){return xe},pU:function(){return ke},s7:function(){return ze},x0:function(){return Oe}});var be=ce(17313),We=ce(74207),Fe=ce(37613),ft=ce(83116);const xe=He=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:He,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),ke=He=>({borderColor:He.hoverBorderColor}),Te=He=>({borderColor:He.activeBorderColor,boxShadow:He.activeShadow,outline:0}),we=He=>({color:He.colorTextDisabled,backgroundColor:He.colorBgContainerDisabled,borderColor:He.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},ke((0,Fe.TS)(He,{hoverBorderColor:He.colorBorder})))}),Ee=He=>{const{paddingBlockLG:Se,fontSizeLG:Ke,lineHeightLG:Ze,borderRadiusLG:gt,paddingInlineLG:je}=He;return{padding:`${Se}px ${je}px`,fontSize:Ke,lineHeight:Ze,borderRadius:gt}},Oe=He=>({padding:`${He.paddingBlockSM}px ${He.paddingInlineSM}px`,borderRadius:He.borderRadiusSM}),it=(He,Se)=>{const{componentCls:Ke,colorError:Ze,colorWarning:gt,errorActiveShadow:je,warningActiveShadow:St,colorErrorBorderHover:ot,colorWarningBorderHover:Et}=He;return{[`&-status-error:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:Ze,"&:hover":{borderColor:ot},"&:focus, &-focused":Object.assign({},Te((0,Fe.TS)(He,{activeBorderColor:Ze,activeShadow:je}))),[`${Ke}-prefix, ${Ke}-suffix`]:{color:Ze}},[`&-status-warning:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:gt,"&:hover":{borderColor:Et},"&:focus, &-focused":Object.assign({},Te((0,Fe.TS)(He,{activeBorderColor:gt,activeShadow:St}))),[`${Ke}-prefix, ${Ke}-suffix`]:{color:gt}}}},Le=He=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${He.paddingBlock}px ${He.paddingInline}px`,color:He.colorText,fontSize:He.fontSize,lineHeight:He.lineHeight,backgroundColor:He.colorBgContainer,backgroundImage:"none",borderWidth:He.lineWidth,borderStyle:He.lineType,borderColor:He.colorBorder,borderRadius:He.borderRadius,transition:`all ${He.motionDurationMid}`},xe(He.colorTextPlaceholder)),{"&:hover":Object.assign({},ke(He)),"&:focus, &-focused":Object.assign({},Te(He)),"&-disabled, &[disabled]":Object.assign({},we(He)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:He.controlHeight,lineHeight:He.lineHeight,verticalAlign:"bottom",transition:`all ${He.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},Ee(He)),"&-sm":Object.assign({},Oe(He)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),ze=He=>{const{componentCls:Se,antCls:Ke}=He;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:He.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Se}, &-lg > ${Se}-group-addon`]:Object.assign({},Ee(He)),[`&-sm ${Se}, &-sm > ${Se}-group-addon`]:Object.assign({},Oe(He)),[`&-lg ${Ke}-select-single ${Ke}-select-selector`]:{height:He.controlHeightLG},[`&-sm ${Ke}-select-single ${Ke}-select-selector`]:{height:He.controlHeightSM},[`> ${Se}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${Se}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${He.paddingInline}px`,color:He.colorText,fontWeight:"normal",fontSize:He.fontSize,textAlign:"center",backgroundColor:He.colorFillAlter,border:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`,borderRadius:He.borderRadius,transition:`all ${He.motionDurationSlow}`,lineHeight:1,[`${Ke}-select`]:{margin:`-${He.paddingBlock+1}px -${He.paddingInline}px`,[`&${Ke}-select-single:not(${Ke}-select-customize-input)`]:{[`${Ke}-select-selector`]:{backgroundColor:"inherit",border:`${He.lineWidth}px ${He.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Ke}-select-selector`]:{color:He.colorPrimary}}},[`${Ke}-cascader-picker`]:{margin:`-9px -${He.paddingInline}px`,backgroundColor:"transparent",[`${Ke}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${Se}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${Se}-search-with-button &`]:{zIndex:0}}},[`> ${Se}:first-child, ${Se}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ke}-select ${Ke}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}-affix-wrapper`]:{[`&:not(:first-child) ${Se}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${Se}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}:last-child, ${Se}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Ke}-select ${Ke}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Se}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Se}-search &`]:{borderStartStartRadius:He.borderRadius,borderEndStartRadius:He.borderRadius}},[`&:not(:first-child), ${Se}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Se}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,be.dF)()),{[`${Se}-group-addon, ${Se}-group-wrap, > ${Se}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:He.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${Se}-affix-wrapper,
|
|
|
& > ${Se}-number-affix-wrapper,
|
|
|
& > ${Ke}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-He.lineWidth,borderInlineEndWidth:He.lineWidth},[`${Se}`]:{float:"none"},[`& > ${Ke}-select > ${Ke}-select-selector,
|
|
|
& > ${Ke}-select-auto-complete ${Se},
|
|
|
& > ${Ke}-cascader-picker ${Se},
|
|
|
& > ${Se}-group-wrapper ${Se}`]:{borderInlineEndWidth:He.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Ke}-select-focused`]:{zIndex:1},[`& > ${Ke}-select > ${Ke}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${Ke}-select:first-child > ${Ke}-select-selector,
|
|
|
& > ${Ke}-select-auto-complete:first-child ${Se},
|
|
|
& > ${Ke}-cascader-picker:first-child ${Se}`]:{borderStartStartRadius:He.borderRadius,borderEndStartRadius:He.borderRadius},[`& > *:last-child,
|
|
|
& > ${Ke}-select:last-child > ${Ke}-select-selector,
|
|
|
& > ${Ke}-cascader-picker:last-child ${Se},
|
|
|
& > ${Ke}-cascader-picker-focused:last-child ${Se}`]:{borderInlineEndWidth:He.lineWidth,borderStartEndRadius:He.borderRadius,borderEndEndRadius:He.borderRadius},[`& > ${Ke}-select-auto-complete ${Se}`]:{verticalAlign:"top"},[`${Se}-group-wrapper + ${Se}-group-wrapper`]:{marginInlineStart:-He.lineWidth,[`${Se}-affix-wrapper`]:{borderRadius:0}},[`${Se}-group-wrapper:not(:last-child)`]:{[`&${Se}-search > ${Se}-group`]:{[`& > ${Se}-group-addon > ${Se}-search-button`]:{borderRadius:0},[`& > ${Se}`]:{borderStartStartRadius:He.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:He.borderRadius}}}})}},st=He=>{const{componentCls:Se,controlHeightSM:Ke,lineWidth:Ze}=He,je=(Ke-Ze*2-16)/2;return{[Se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,be.Wf)(He)),Le(He)),it(He,Se)),{'&[type="color"]':{height:He.controlHeight,[`&${Se}-lg`]:{height:He.controlHeightLG},[`&${Se}-sm`]:{height:Ke,paddingTop:je,paddingBottom:je}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Qe=He=>{const{componentCls:Se}=He;return{[`${Se}-clear-icon`]:{margin:0,color:He.colorTextQuaternary,fontSize:He.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${He.motionDurationSlow}`,"&:hover":{color:He.colorTextTertiary},"&:active":{color:He.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${He.inputAffixPadding}px`}}}},at=He=>{const{componentCls:Se,inputAffixPadding:Ke,colorTextDescription:Ze,motionDurationSlow:gt,colorIcon:je,colorIconHover:St,iconCls:ot}=He;return{[`${Se}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Le(He)),{display:"inline-flex",[`&:not(${Se}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},ke(He)),{zIndex:1,[`${Se}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${Se}[disabled]`]:{background:"transparent"}},[`> input${Se}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Se}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:He.paddingXS}},"&-show-count-suffix":{color:Ze},"&-show-count-has-suffix":{marginInlineEnd:He.paddingXXS},"&-prefix":{marginInlineEnd:Ke},"&-suffix":{marginInlineStart:Ke}}}),Qe(He)),{[`${ot}${Se}-password-icon`]:{color:je,cursor:"pointer",transition:`all ${gt}`,"&:hover":{color:St}}}),it(He,`${Se}-affix-wrapper`))}},tt=He=>{const{componentCls:Se,colorError:Ke,colorWarning:Ze,borderRadiusLG:gt,borderRadiusSM:je}=He;return{[`${Se}-group`]:Object.assign(Object.assign(Object.assign({},(0,be.Wf)(He)),ze(He)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Se}-group-addon`]:{borderRadius:gt,fontSize:He.fontSizeLG}},"&-sm":{[`${Se}-group-addon`]:{borderRadius:je}},"&-status-error":{[`${Se}-group-addon`]:{color:Ke,borderColor:Ke}},"&-status-warning":{[`${Se}-group-addon`]:{color:Ze,borderColor:Ze}},"&-disabled":{[`${Se}-group-addon`]:Object.assign({},we(He))},[`&:not(${Se}-compact-first-item):not(${Se}-compact-last-item)${Se}-compact-item`]:{[`${Se}, ${Se}-group-addon`]:{borderRadius:0}},[`&:not(${Se}-compact-last-item)${Se}-compact-first-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Se}-compact-first-item)${Se}-compact-last-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},pt=He=>{const{componentCls:Se,antCls:Ke}=He,Ze=`${Se}-search`;return{[Ze]:{[`${Se}`]:{"&:hover, &:focus":{borderColor:He.colorPrimaryHover,[`+ ${Se}-group-addon ${Ze}-button:not(${Ke}-btn-primary)`]:{borderInlineStartColor:He.colorPrimaryHover}}},[`${Se}-affix-wrapper`]:{borderRadius:0},[`${Se}-lg`]:{lineHeight:He.lineHeightLG-2e-4},[`> ${Se}-group`]:{[`> ${Se}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ze}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:He.borderRadius,borderEndEndRadius:He.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ze}-button:not(${Ke}-btn-primary)`]:{color:He.colorTextDescription,"&:hover":{color:He.colorPrimaryHover},"&:active":{color:He.colorPrimaryActive},[`&${Ke}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ze}-button`]:{height:He.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ze}-button`]:{height:He.controlHeightLG},[`&-small ${Ze}-button`]:{height:He.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Se}-compact-item`]:{[`&:not(${Se}-compact-last-item)`]:{[`${Se}-group-addon`]:{[`${Se}-search-button`]:{marginInlineEnd:-He.lineWidth,borderRadius:0}}},[`&:not(${Se}-compact-first-item)`]:{[`${Se},${Se}-affix-wrapper`]:{borderRadius:0}},[`> ${Se}-group-addon ${Se}-search-button,
|
|
|
> ${Se},
|
|
|
${Se}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${Se}-affix-wrapper-focused`]:{zIndex:2}}}}},Lt=He=>{const{componentCls:Se,paddingLG:Ke}=He,Ze=`${Se}-textarea`;return{[Ze]:{position:"relative","&-show-count":{[`> ${Se}`]:{height:"100%"},[`${Se}-data-count`]:{position:"absolute",bottom:-He.fontSize*He.lineHeight,insetInlineEnd:0,color:He.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Se}`]:{paddingInlineEnd:Ke}},[`&-affix-wrapper${Ze}-has-feedback`]:{[`${Se}`]:{paddingInlineEnd:Ke}},[`&-affix-wrapper${Se}-affix-wrapper`]:{padding:0,[`> textarea${Se}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${Se}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Se}-clear-icon`]:{position:"absolute",insetInlineEnd:He.paddingXS,insetBlockStart:He.paddingXS},[`${Ze}-suffix`]:{position:"absolute",top:0,insetInlineEnd:He.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Ue(He){return(0,Fe.TS)(He,{inputAffixPadding:He.paddingXXS})}const Xe=He=>{const{controlHeight:Se,fontSize:Ke,lineHeight:Ze,lineWidth:gt,controlHeightSM:je,controlHeightLG:St,fontSizeLG:ot,lineHeightLG:Et,paddingSM:Ge,controlPaddingHorizontalSM:Dt,controlPaddingHorizontal:rt,colorFillAlter:yt,colorPrimaryHover:Ct,controlOutlineWidth:ct,controlOutline:Pe,colorErrorOutline:ye,colorWarningOutline:ht}=He;return{paddingBlock:Math.max(Math.round((Se-Ke*Ze)/2*10)/10-gt,3),paddingBlockSM:Math.max(Math.round((je-Ke*Ze)/2*10)/10-gt,0),paddingBlockLG:Math.ceil((St-ot*Et)/2*10)/10-gt,paddingInline:Ge-gt,paddingInlineSM:Dt-gt,paddingInlineLG:rt-gt,addonBg:yt,activeBorderColor:Ct,hoverBorderColor:Ct,activeShadow:`0 0 0 ${ct}px ${Pe}`,errorActiveShadow:`0 0 0 ${ct}px ${ye}`,warningActiveShadow:`0 0 0 ${ct}px ${ht}`}};qt.ZP=(0,ft.Z)("Input",He=>{const Se=(0,Fe.TS)(He,Ue(He));return[st(Se),Lt(Se),at(Se),tt(Se),pt(Se),(0,We.c)(Se)]},Xe)},45818:function(wn,qt,ce){"use strict";ce.d(qt,{D:function(){return Ue},Z:function(){return Se}});var be=ce(54476),We=ce(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},ft=Fe,xe=ce(7657),ke=function(Ze,gt){return We.createElement(xe.Z,(0,be.Z)({},Ze,{ref:gt,icon:ft}))},Te=We.forwardRef(ke),we=Te,Ee=ce(33853),Oe=ce(38819),it=ce(92310),Le=ce.n(it),ze=ce(2738),Qe=Ke=>!isNaN(parseFloat(Ke))&&isFinite(Ke),at=ce(36355),tt=ce(84966),pt=function(Ke,Ze){var gt={};for(var je in Ke)Object.prototype.hasOwnProperty.call(Ke,je)&&Ze.indexOf(je)<0&&(gt[je]=Ke[je]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,je=Object.getOwnPropertySymbols(Ke);St<je.length;St++)Ze.indexOf(je[St])<0&&Object.prototype.propertyIsEnumerable.call(Ke,je[St])&&(gt[je[St]]=Ke[je[St]]);return gt};const Lt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Ue=We.createContext({}),Xe=(()=>{let Ke=0;return function(){let Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ke+=1,`${Ze}${Ke}`}})();var Se=We.forwardRef((Ke,Ze)=>{const{prefixCls:gt,className:je,trigger:St,children:ot,defaultCollapsed:Et=!1,theme:Ge="dark",style:Dt={},collapsible:rt=!1,reverseArrow:yt=!1,width:Ct=200,collapsedWidth:ct=80,zeroWidthTriggerStyle:Pe,breakpoint:ye,onCollapse:ht,onBreakpoint:Vt}=Ke,Ht=pt(Ke,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ye}=(0,We.useContext)(tt.Gs),[Je,At]=(0,We.useState)("collapsed"in Ke?Ke.collapsed:Et),[mn,Gt]=(0,We.useState)(!1);(0,We.useEffect)(()=>{"collapsed"in Ke&&At(Ke.collapsed)},[Ke.collapsed]);const hn=(oe,de)=>{"collapsed"in Ke||At(oe),ht==null||ht(oe,de)},jt=(0,We.useRef)();jt.current=oe=>{Gt(oe.matches),Vt==null||Vt(oe.matches),Je!==oe.matches&&hn(oe.matches,"responsive")},(0,We.useEffect)(()=>{function oe(fe){return jt.current(fe)}let de;if(typeof window!="undefined"){const{matchMedia:fe}=window;if(fe&&ye&&ye in Lt){de=fe(`(max-width: ${Lt[ye]})`);try{de.addEventListener("change",oe)}catch(le){de.addListener(oe)}oe(de)}}return()=>{try{de==null||de.removeEventListener("change",oe)}catch(fe){de==null||de.removeListener(oe)}}},[ye]),(0,We.useEffect)(()=>{const oe=Xe("ant-sider-");return Ye.addSider(oe),()=>Ye.removeSider(oe)},[]);const Ft=()=>{hn(!Je,"clickTrigger")},{getPrefixCls:Kt}=(0,We.useContext)(at.E_),ge=()=>{const oe=Kt("layout-sider",gt),de=(0,ze.Z)(Ht,["collapsed"]),fe=Je?ct:Ct,le=Qe(fe)?`${fe}px`:String(fe),$e=parseFloat(String(ct||0))===0?We.createElement("span",{onClick:Ft,className:Le()(`${oe}-zero-width-trigger`,`${oe}-zero-width-trigger-${yt?"right":"left"}`),style:Pe},St||We.createElement(we,null)):null,Pt={expanded:yt?We.createElement(Oe.Z,null):We.createElement(Ee.Z,null),collapsed:yt?We.createElement(Ee.Z,null):We.createElement(Oe.Z,null)}[Je?"collapsed":"expanded"],Ut=St!==null?$e||We.createElement("div",{className:`${oe}-trigger`,onClick:Ft,style:{width:le}},St||Pt):null,Xt=Object.assign(Object.assign({},Dt),{flex:`0 0 ${le}`,maxWidth:le,minWidth:le,width:le}),en=Le()(oe,`${oe}-${Ge}`,{[`${oe}-collapsed`]:!!Je,[`${oe}-has-trigger`]:rt&&St!==null&&!$e,[`${oe}-below`]:!!mn,[`${oe}-zero-width`]:parseFloat(le)===0},je);return We.createElement("aside",Object.assign({className:en},de,{style:Xt,ref:Ze}),We.createElement("div",{className:`${oe}-children`},ot),rt||mn&&$e?Ut:null)},se=We.useMemo(()=>({siderCollapsed:Je}),[Je]);return We.createElement(Ue.Provider,{value:se},ge())})},44e3:function(wn,qt,ce){"use strict";var be=ce(84966),We=ce(45818);const Fe=be.ZP;Fe.Header=be.h4,Fe.Footer=be.$_,Fe.Content=be.VY,Fe.Sider=We.Z,qt.default=Fe},84966:function(wn,qt,ce){"use strict";ce.d(qt,{VY:function(){return Ue},$_:function(){return Lt},h4:function(){return pt},Gs:function(){return ze},ZP:function(){return Xe}});var be=ce(94480),We=ce(92310),Fe=ce.n(We),ft=ce(2738),xe=ce(59301),ke=ce(36355),Te=ce(83116),Ee=He=>{const{componentCls:Se,bodyBg:Ke,lightSiderBg:Ze,lightTriggerBg:gt,lightTriggerColor:je}=He;return{[`${Se}-sider-light`]:{background:Ze,[`${Se}-sider-trigger`]:{color:je,background:gt},[`${Se}-sider-zero-width-trigger`]:{color:je,background:gt,border:`1px solid ${Ke}`,borderInlineStart:0}}}};const Oe=He=>{const{antCls:Se,componentCls:Ke,colorText:Ze,triggerColor:gt,footerBg:je,triggerBg:St,headerHeight:ot,headerPadding:Et,headerColor:Ge,footerPadding:Dt,triggerHeight:rt,zeroTriggerHeight:yt,zeroTriggerWidth:Ct,motionDurationMid:ct,motionDurationSlow:Pe,fontSize:ye,borderRadius:ht,bodyBg:Vt,headerBg:Ht,siderBg:Ye}=He;return{[Ke]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Vt,"&, *":{boxSizing:"border-box"},[`&${Ke}-has-sider`]:{flexDirection:"row",[`> ${Ke}, > ${Ke}-content`]:{width:0}},[`${Ke}-header, &${Ke}-footer`]:{flex:"0 0 auto"},[`${Ke}-sider`]:{position:"relative",minWidth:0,background:Ye,transition:`all ${ct}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Se}-menu${Se}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:rt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:rt,color:gt,lineHeight:`${rt}px`,textAlign:"center",background:St,cursor:"pointer",transition:`all ${ct}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:ot,insetInlineEnd:-Ct,zIndex:1,width:Ct,height:yt,color:gt,fontSize:He.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Ye,borderStartStartRadius:0,borderStartEndRadius:ht,borderEndEndRadius:ht,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Pe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Pe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Ct,borderStartStartRadius:ht,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ht}}}}},Ee(He)),{"&-rtl":{direction:"rtl"}}),[`${Ke}-header`]:{height:ot,padding:Et,color:Ge,lineHeight:`${ot}px`,background:Ht,[`${Se}-menu`]:{lineHeight:"inherit"}},[`${Ke}-footer`]:{padding:Dt,color:Ze,fontSize:ye,background:je},[`${Ke}-content`]:{flex:"auto",minHeight:0}}};var it=(0,Te.Z)("Layout",He=>[Oe(He)],He=>{const{colorBgLayout:Se,controlHeight:Ke,controlHeightLG:Ze,colorText:gt,controlHeightSM:je,marginXXS:St,colorTextLightSolid:ot,colorBgContainer:Et}=He,Ge=Ze*1.25;return{colorBgHeader:"#001529",colorBgBody:Se,colorBgTrigger:"#002140",bodyBg:Se,headerBg:"#001529",headerHeight:Ke*2,headerPadding:`0 ${Ge}px`,headerColor:gt,footerPadding:`${je}px ${Ge}px`,footerBg:Se,siderBg:"#001529",triggerHeight:Ze+St*2,triggerBg:"#002140",triggerColor:ot,zeroTriggerWidth:Ze,zeroTriggerHeight:Ze,lightSiderBg:Et,lightTriggerBg:Et,lightTriggerColor:gt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Le=function(He,Se){var Ke={};for(var Ze in He)Object.prototype.hasOwnProperty.call(He,Ze)&&Se.indexOf(Ze)<0&&(Ke[Ze]=He[Ze]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Ze=Object.getOwnPropertySymbols(He);gt<Ze.length;gt++)Se.indexOf(Ze[gt])<0&&Object.prototype.propertyIsEnumerable.call(He,Ze[gt])&&(Ke[Ze[gt]]=He[Ze[gt]]);return Ke};const ze=xe.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function st(He){let{suffixCls:Se,tagName:Ke,displayName:Ze}=He;return gt=>xe.forwardRef((St,ot)=>xe.createElement(gt,Object.assign({ref:ot,suffixCls:Se,tagName:Ke},St)))}const Qe=xe.forwardRef((He,Se)=>{const{prefixCls:Ke,suffixCls:Ze,className:gt,tagName:je}=He,St=Le(He,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:ot}=xe.useContext(ke.E_),Et=ot("layout",Ke),[Ge,Dt]=it(Et),rt=Ze?`${Et}-${Ze}`:Et;return Ge(xe.createElement(je,Object.assign({className:Fe()(Ke||rt,gt,Dt),ref:Se},St)))}),at=xe.forwardRef((He,Se)=>{const{direction:Ke}=xe.useContext(ke.E_),[Ze,gt]=xe.useState([]),{prefixCls:je,className:St,rootClassName:ot,children:Et,hasSider:Ge,tagName:Dt,style:rt}=He,yt=Le(He,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Ct=(0,ft.Z)(yt,["suffixCls"]),{getPrefixCls:ct,layout:Pe}=xe.useContext(ke.E_),ye=ct("layout",je),[ht,Vt]=it(ye),Ht=Fe()(ye,{[`${ye}-has-sider`]:typeof Ge=="boolean"?Ge:Ze.length>0,[`${ye}-rtl`]:Ke==="rtl"},Pe==null?void 0:Pe.className,St,ot,Vt),Ye=xe.useMemo(()=>({siderHook:{addSider:Je=>{gt(At=>[].concat((0,be.Z)(At),[Je]))},removeSider:Je=>{gt(At=>At.filter(mn=>mn!==Je))}}}),[]);return ht(xe.createElement(ze.Provider,{value:Ye},xe.createElement(Dt,Object.assign({ref:Se,className:Ht,style:Object.assign(Object.assign({},Pe==null?void 0:Pe.style),rt)},Ct),Et)))}),tt=st({tagName:"div",displayName:"Layout"})(at),pt=st({suffixCls:"header",tagName:"header",displayName:"Header"})(Qe),Lt=st({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(Qe),Ue=st({suffixCls:"content",tagName:"main",displayName:"Content"})(Qe);var Xe=tt},40875:function(wn,qt,ce){"use strict";ce.d(qt,{J:function(){return ke}});var be=ce(59301),We=ce(33234),Fe=ce(70425),ft=function(Te,we){var Ee={};for(var Oe in Te)Object.prototype.hasOwnProperty.call(Te,Oe)&&we.indexOf(Oe)<0&&(Ee[Oe]=Te[Oe]);if(Te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Oe=Object.getOwnPropertySymbols(Te);it<Oe.length;it++)we.indexOf(Oe[it])<0&&Object.prototype.propertyIsEnumerable.call(Te,Oe[it])&&(Ee[Oe[it]]=Te[Oe[it]]);return Ee};const xe=be.createContext(null),ke=be.forwardRef((Te,we)=>{const{children:Ee}=Te,Oe=ft(Te,["children"]),it=be.useContext(xe),Le=be.useMemo(()=>Object.assign(Object.assign({},it),Oe),[it,Oe.prefixCls,Oe.mode,Oe.selectable]);return be.createElement(xe.Provider,{value:Le},be.createElement(We.BR,null,(0,Fe.supportNodeRef)(Ee)?be.cloneElement(Ee,{ref:we}):Ee))});qt.Z=xe},20834:function(wn,qt,ce){"use strict";ce.d(qt,{default:function(){return se}});var be=ce(15285),We=ce(59301),Fe=ce(45818),ft=ce(92310),xe=ce.n(ft),ke=ce(36355),Te=function(oe,de){var fe={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&de.indexOf(le)<0&&(fe[le]=oe[le]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,le=Object.getOwnPropertySymbols(oe);$e<le.length;$e++)de.indexOf(le[$e])<0&&Object.prototype.propertyIsEnumerable.call(oe,le[$e])&&(fe[le[$e]]=oe[le[$e]]);return fe},Ee=oe=>{const{prefixCls:de,className:fe,dashed:le}=oe,$e=Te(oe,["prefixCls","className","dashed"]),{getPrefixCls:dt}=We.useContext(ke.E_),Rt=dt("menu",de),Pt=xe()({[`${Rt}-item-divider-dashed`]:!!le},fe);return We.createElement(be.iz,Object.assign({className:Pt},$e))},Oe=ce(11592),it=ce(2738),Le=ce(6848),ze=ce(92343),Qe=(0,We.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),tt=oe=>{var de;const{className:fe,children:le,icon:$e,title:dt,danger:Rt}=oe,{prefixCls:Pt,firstLevel:Ut,direction:Xt,disableMenuItemTitleTooltip:en,inlineCollapsed:ln}=We.useContext(Qe),Sn=Nt=>{const Pn=We.createElement("span",{className:`${Pt}-title-content`},le);return(!$e||(0,ze.l$)(le)&&le.type==="span")&&le&&Nt&&Ut&&typeof le=="string"?We.createElement("div",{className:`${Pt}-inline-collapsed-noicon`},le.charAt(0)):Pn},{siderCollapsed:xt}=We.useContext(Fe.D);let an=dt;typeof dt=="undefined"?an=Ut?le:"":dt===!1&&(an="");const On={title:an};!xt&&!ln&&(On.title=null,On.open=!1);const ut=(0,Oe.Z)(le).length;let wt=We.createElement(be.ck,Object.assign({},(0,it.Z)(oe,["title","icon","danger"]),{className:xe()({[`${Pt}-item-danger`]:Rt,[`${Pt}-item-only-child`]:($e?ut+1:ut)===1},fe),title:typeof dt=="string"?dt:void 0}),(0,ze.Tm)($e,{className:xe()((0,ze.l$)($e)?(de=$e.props)===null||de===void 0?void 0:de.className:"",`${Pt}-item-icon`)}),Sn(ln));return en||(wt=We.createElement(Le.Z,Object.assign({},On,{placement:Xt==="rtl"?"left":"right",overlayClassName:`${Pt}-inline-collapsed-tooltip`}),wt)),wt},Lt=oe=>{var de;const{popupClassName:fe,icon:le,title:$e,theme:dt}=oe,Rt=We.useContext(Qe),{prefixCls:Pt,inlineCollapsed:Ut,theme:Xt}=Rt,en=(0,be.Xl)();let ln;if(!le)ln=Ut&&!en.length&&$e&&typeof $e=="string"?We.createElement("div",{className:`${Pt}-inline-collapsed-noicon`},$e.charAt(0)):We.createElement("span",{className:`${Pt}-title-content`},$e);else{const xt=(0,ze.l$)($e)&&$e.type==="span";ln=We.createElement(We.Fragment,null,(0,ze.Tm)(le,{className:xe()((0,ze.l$)(le)?(de=le.props)===null||de===void 0?void 0:de.className:"",`${Pt}-item-icon`)}),xt?$e:We.createElement("span",{className:`${Pt}-title-content`},$e))}const Sn=We.useMemo(()=>Object.assign(Object.assign({},Rt),{firstLevel:!1}),[Rt]);return We.createElement(Qe.Provider,{value:Sn},We.createElement(be.Wd,Object.assign({},(0,it.Z)(oe,["icon"]),{title:ln,popupClassName:xe()(Pt,fe,`${Pt}-${dt||Xt}`)})))},Ue=ce(18785),Xe=ce(70425),He=ce(62892),Se=ce(40875),Ke=function(oe,de){var fe={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&de.indexOf(le)<0&&(fe[le]=oe[le]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,le=Object.getOwnPropertySymbols(oe);$e<le.length;$e++)de.indexOf(le[$e])<0&&Object.prototype.propertyIsEnumerable.call(oe,le[$e])&&(fe[le[$e]]=oe[le[$e]]);return fe};function Ze(oe){return(oe||[]).map((de,fe)=>{if(de&&typeof de=="object"){const le=de,{label:$e,children:dt,key:Rt,type:Pt}=le,Ut=Ke(le,["label","children","key","type"]),Xt=Rt!=null?Rt:`tmp-${fe}`;return dt||Pt==="group"?Pt==="group"?We.createElement(be.BW,Object.assign({key:Xt},Ut,{title:$e}),Ze(dt)):We.createElement(Lt,Object.assign({key:Xt},Ut,{title:$e}),Ze(dt)):Pt==="divider"?We.createElement(Ee,Object.assign({key:Xt},Ut)):We.createElement(tt,Object.assign({key:Xt},Ut),$e)}return null}).filter(de=>de)}function gt(oe){return We.useMemo(()=>oe&&Ze(oe),[oe])}var je=ce(64993),St=ce(17313),ot=ce(8378),Et=ce(13826),Ge=ce(29878),Dt=ce(83116),rt=ce(37613),Ct=oe=>{const{componentCls:de,motionDurationSlow:fe,horizontalLineHeight:le,colorSplit:$e,lineWidth:dt,lineType:Rt,itemPaddingInline:Pt}=oe;return{[`${de}-horizontal`]:{lineHeight:le,border:0,borderBottom:`${dt}px ${Rt} ${$e}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${de}-item, ${de}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Pt},[`> ${de}-item:hover,
|
|
|
> ${de}-item-active,
|
|
|
> ${de}-submenu ${de}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${de}-item, ${de}-submenu-title`]:{transition:[`border-color ${fe}`,`background ${fe}`].join(",")},[`${de}-submenu-arrow`]:{display:"none"}}}},Pe=oe=>{let{componentCls:de,menuArrowOffset:fe}=oe;return{[`${de}-rtl`]:{direction:"rtl"},[`${de}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${de}-rtl${de}-vertical,
|
|
|
${de}-submenu-rtl ${de}-vertical`]:{[`${de}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${fe})`},"&::after":{transform:`rotate(45deg) translateY(${fe})`}}}}};const ye=oe=>Object.assign({},(0,St.oN)(oe));var Vt=(oe,de)=>{const{componentCls:fe,itemColor:le,itemSelectedColor:$e,groupTitleColor:dt,itemBg:Rt,subMenuItemBg:Pt,itemSelectedBg:Ut,activeBarHeight:Xt,activeBarWidth:en,activeBarBorderWidth:ln,motionDurationSlow:Sn,motionEaseInOut:xt,motionEaseOut:an,itemPaddingInline:On,motionDurationMid:ut,itemHoverColor:wt,lineType:Nt,colorSplit:Pn,itemDisabledColor:Bn,dangerItemColor:Tn,dangerItemHoverColor:nr,dangerItemSelectedColor:mr,dangerItemActiveBg:ar,dangerItemSelectedBg:Er,itemHoverBg:_r,itemActiveBg:Jn,menuSubMenuBg:zr,horizontalItemSelectedColor:Wr,horizontalItemSelectedBg:Vr,horizontalItemBorderRadius:ei,horizontalItemHoverBg:Tr,popupBg:Yr}=oe;return{[`${fe}-${de}, ${fe}-${de} > ${fe}`]:{color:le,background:Rt,[`&${fe}-root:focus-visible`]:Object.assign({},ye(oe)),[`${fe}-item-group-title`]:{color:dt},[`${fe}-submenu-selected`]:{[`> ${fe}-submenu-title`]:{color:$e}},[`${fe}-item-disabled, ${fe}-submenu-disabled`]:{color:`${Bn} !important`},[`${fe}-item:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{[`&:hover, > ${fe}-submenu-title:hover`]:{color:wt}},[`&:not(${fe}-horizontal)`]:{[`${fe}-item:not(${fe}-item-selected)`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:Jn}},[`${fe}-submenu-title`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:Jn}}},[`${fe}-item-danger`]:{color:Tn,[`&${fe}-item:hover`]:{[`&:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{color:nr}},[`&${fe}-item:active`]:{background:ar}},[`${fe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${fe}-item-selected`]:{color:$e,[`&${fe}-item-danger`]:{color:mr},"a, a:hover":{color:"inherit"}},[`& ${fe}-item-selected`]:{backgroundColor:Ut,[`&${fe}-item-danger`]:{backgroundColor:Er}},[`${fe}-item, ${fe}-submenu-title`]:{[`&:not(${fe}-item-disabled):focus-visible`]:Object.assign({},ye(oe))},[`&${fe}-submenu > ${fe}`]:{backgroundColor:zr},[`&${fe}-popup > ${fe}`]:{backgroundColor:Yr},[`&${fe}-horizontal`]:Object.assign(Object.assign({},de==="dark"?{borderBottom:0}:{}),{[`> ${fe}-item, > ${fe}-submenu`]:{top:ln,marginTop:-ln,marginBottom:0,borderRadius:ei,"&::after":{position:"absolute",insetInline:On,bottom:0,borderBottom:`${Xt}px solid transparent`,transition:`border-color ${Sn} ${xt}`,content:'""'},"&:hover, &-active, &-open":{background:Tr,"&::after":{borderBottomWidth:Xt,borderBottomColor:Wr}},"&-selected":{color:Wr,backgroundColor:Vr,"&:hover":{backgroundColor:Vr},"&::after":{borderBottomWidth:Xt,borderBottomColor:Wr}}}}),[`&${fe}-root`]:{[`&${fe}-inline, &${fe}-vertical`]:{borderInlineEnd:`${ln}px ${Nt} ${Pn}`}},[`&${fe}-inline`]:{[`${fe}-sub${fe}-inline`]:{background:Pt},[`${fe}-item, ${fe}-submenu-title`]:ln&&en?{width:`calc(100% + ${ln}px)`}:{},[`${fe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${en}px solid ${$e}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${ut} ${an}`,`opacity ${ut} ${an}`].join(","),content:'""'},[`&${fe}-item-danger`]:{"&::after":{borderInlineEndColor:mr}}},[`${fe}-selected, ${fe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${ut} ${xt}`,`opacity ${ut} ${xt}`].join(",")}}}}}};const Ht=oe=>{const{componentCls:de,itemHeight:fe,itemMarginInline:le,padding:$e,menuArrowSize:dt,marginXS:Rt,itemMarginBlock:Pt}=oe,Ut=$e+dt+Rt;return{[`${de}-item`]:{position:"relative",overflow:"hidden"},[`${de}-item, ${de}-submenu-title`]:{height:fe,lineHeight:`${fe}px`,paddingInline:$e,overflow:"hidden",textOverflow:"ellipsis",marginInline:le,marginBlock:Pt,width:`calc(100% - ${le*2}px)`},[`> ${de}-item,
|
|
|
> ${de}-submenu > ${de}-submenu-title`]:{height:fe,lineHeight:`${fe}px`},[`${de}-item-group-list ${de}-submenu-title,
|
|
|
${de}-submenu-title`]:{paddingInlineEnd:Ut}}};var Je=oe=>{const{componentCls:de,iconCls:fe,itemHeight:le,colorTextLightSolid:$e,dropdownWidth:dt,controlHeightLG:Rt,motionDurationMid:Pt,motionEaseOut:Ut,paddingXL:Xt,itemMarginInline:en,fontSizeLG:ln,motionDurationSlow:Sn,paddingXS:xt,boxShadowSecondary:an,collapsedWidth:On,collapsedIconSize:ut}=oe,wt={height:le,lineHeight:`${le}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[de]:{"&-inline, &-vertical":Object.assign({[`&${de}-root`]:{boxShadow:"none"}},Ht(oe))},[`${de}-submenu-popup`]:{[`${de}-vertical`]:Object.assign(Object.assign({},Ht(oe)),{boxShadow:an})}},{[`${de}-submenu-popup ${de}-vertical${de}-sub`]:{minWidth:dt,maxHeight:`calc(100vh - ${Rt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${de}-inline`]:{width:"100%",[`&${de}-root`]:{[`${de}-item, ${de}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Sn}`,`background ${Sn}`,`padding ${Pt} ${Ut}`].join(","),[`> ${de}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${de}-sub${de}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${de}-submenu > ${de}-submenu-title`]:wt,[`& ${de}-item-group-title`]:{paddingInlineStart:Xt}},[`${de}-item`]:wt}},{[`${de}-inline-collapsed`]:{width:On,[`&${de}-root`]:{[`${de}-item, ${de}-submenu ${de}-submenu-title`]:{[`> ${de}-inline-collapsed-noicon`]:{fontSize:ln,textAlign:"center"}}},[`> ${de}-item,
|
|
|
> ${de}-item-group > ${de}-item-group-list > ${de}-item,
|
|
|
> ${de}-item-group > ${de}-item-group-list > ${de}-submenu > ${de}-submenu-title,
|
|
|
> ${de}-submenu > ${de}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ln/2}px - ${en}px)`,textOverflow:"clip",[`
|
|
|
${de}-submenu-arrow,
|
|
|
${de}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${de}-item-icon, ${fe}`]:{margin:0,fontSize:ut,lineHeight:`${le}px`,"+ span":{display:"inline-block",opacity:0}}},[`${de}-item-icon, ${fe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${de}-item-icon, ${fe}`]:{display:"none"},"a, a:hover":{color:$e}},[`${de}-item-group-title`]:Object.assign(Object.assign({},St.vS),{paddingInline:xt})}}]};const At=oe=>{const{componentCls:de,motionDurationSlow:fe,motionDurationMid:le,motionEaseInOut:$e,motionEaseOut:dt,iconCls:Rt,iconSize:Pt,iconMarginInlineEnd:Ut}=oe;return{[`${de}-item, ${de}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${fe}`,`background ${fe}`,`padding ${fe} ${$e}`].join(","),[`${de}-item-icon, ${Rt}`]:{minWidth:Pt,fontSize:Pt,transition:[`font-size ${le} ${dt}`,`margin ${fe} ${$e}`,`color ${fe}`].join(","),"+ span":{marginInlineStart:Ut,opacity:1,transition:[`opacity ${fe} ${$e}`,`margin ${fe}`,`color ${fe}`].join(",")}},[`${de}-item-icon`]:Object.assign({},(0,St.Ro)()),[`&${de}-item-only-child`]:{[`> ${Rt}, > ${de}-item-icon`]:{marginInlineEnd:0}}},[`${de}-item-disabled, ${de}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${de}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},mn=oe=>{const{componentCls:de,motionDurationSlow:fe,motionEaseInOut:le,borderRadius:$e,menuArrowSize:dt,menuArrowOffset:Rt}=oe;return{[`${de}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:oe.margin,width:dt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${fe} ${le}, opacity ${fe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:dt*.6,height:dt*.15,backgroundColor:"currentcolor",borderRadius:$e,transition:[`background ${fe} ${le}`,`transform ${fe} ${le}`,`top ${fe} ${le}`,`color ${fe} ${le}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Rt})`},"&::after":{transform:`rotate(-45deg) translateY(${Rt})`}}}}},Gt=oe=>{const{antCls:de,componentCls:fe,fontSize:le,motionDurationSlow:$e,motionDurationMid:dt,motionEaseInOut:Rt,paddingXS:Pt,padding:Ut,colorSplit:Xt,lineWidth:en,zIndexPopup:ln,borderRadiusLG:Sn,subMenuItemBorderRadius:xt,menuArrowSize:an,menuArrowOffset:On,lineType:ut,menuPanelMaskInset:wt,groupTitleLineHeight:Nt,groupTitleFontSize:Pn}=oe;return[{"":{[`${fe}`]:Object.assign(Object.assign({},(0,St.dF)()),{"&-hidden":{display:"none"}})},[`${fe}-submenu-hidden`]:{display:"none"}},{[fe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,St.Wf)(oe)),(0,St.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:le,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${$e} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${fe}-item`]:{flex:"none"}},[`${fe}-item, ${fe}-submenu, ${fe}-submenu-title`]:{borderRadius:oe.itemBorderRadius},[`${fe}-item-group-title`]:{padding:`${Pt}px ${Ut}px`,fontSize:Pn,lineHeight:Nt,transition:`all ${$e}`},[`&-horizontal ${fe}-submenu`]:{transition:[`border-color ${$e} ${Rt}`,`background ${$e} ${Rt}`].join(",")},[`${fe}-submenu, ${fe}-submenu-inline`]:{transition:[`border-color ${$e} ${Rt}`,`background ${$e} ${Rt}`,`padding ${dt} ${Rt}`].join(",")},[`${fe}-submenu ${fe}-sub`]:{cursor:"initial",transition:[`background ${$e} ${Rt}`,`padding ${$e} ${Rt}`].join(",")},[`${fe}-title-content`]:{transition:`color ${$e}`},[`${fe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${fe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Xt,borderStyle:ut,borderWidth:0,borderTopWidth:en,marginBlock:en,padding:0,"&-dashed":{borderStyle:"dashed"}}}),At(oe)),{[`${fe}-item-group`]:{[`${fe}-item-group-list`]:{margin:0,padding:0,[`${fe}-item, ${fe}-submenu-title`]:{paddingInline:`${le*2}px ${Ut}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:ln,borderRadius:Sn,boxShadow:"none",transformOrigin:"0 0",[`&${fe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${wt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:wt},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:oe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:oe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:oe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:oe.paddingXS},[`> ${fe}`]:Object.assign(Object.assign(Object.assign({borderRadius:Sn},At(oe)),mn(oe)),{[`${fe}-item, ${fe}-submenu > ${fe}-submenu-title`]:{borderRadius:xt},[`${fe}-submenu-title::after`]:{transition:`transform ${$e} ${Rt}`}})}}),mn(oe)),{[`&-inline-collapsed ${fe}-submenu-arrow,
|
|
|
&-inline ${fe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${On})`},"&::after":{transform:`rotate(45deg) translateX(-${On})`}},[`${fe}-submenu-open${fe}-submenu-inline > ${fe}-submenu-title > ${fe}-submenu-arrow`]:{transform:`translateY(-${an*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${On})`},"&::before":{transform:`rotate(45deg) translateX(${On})`}}})},{[`${de}-layout-header`]:{[fe]:{lineHeight:"inherit"}}}]};var hn=(oe,de)=>(0,Dt.Z)("Menu",le=>{if(de===!1)return[];const{colorBgElevated:$e,colorPrimary:dt,colorTextLightSolid:Rt,controlHeightLG:Pt,fontSize:Ut,darkItemColor:Xt,darkDangerItemColor:en,darkItemBg:ln,darkSubMenuItemBg:Sn,darkItemSelectedColor:xt,darkItemSelectedBg:an,darkDangerItemSelectedBg:On,darkItemHoverBg:ut,darkGroupTitleColor:wt,darkItemHoverColor:Nt,darkItemDisabledColor:Pn,darkDangerItemHoverColor:Bn,darkDangerItemSelectedColor:Tn,darkDangerItemActiveBg:nr}=le,mr=Ut/7*5,ar=(0,rt.TS)(le,{menuArrowSize:mr,menuHorizontalHeight:Pt*1.15,menuArrowOffset:`${mr*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:$e}),Er=(0,rt.TS)(ar,{itemColor:Xt,itemHoverColor:Nt,groupTitleColor:wt,itemSelectedColor:xt,itemBg:ln,popupBg:ln,subMenuItemBg:Sn,itemActiveBg:"transparent",itemSelectedBg:an,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:ut,itemDisabledColor:Pn,dangerItemColor:en,dangerItemHoverColor:Bn,dangerItemSelectedColor:Tn,dangerItemActiveBg:nr,dangerItemSelectedBg:On,menuSubMenuBg:Sn,horizontalItemSelectedColor:Rt,horizontalItemSelectedBg:dt});return[Gt(ar),Ct(ar),Je(ar),Vt(ar,"light"),Vt(Er,"dark"),Pe(ar),(0,ot.Z)(ar),(0,Et.oN)(ar,"slide-up"),(0,Et.oN)(ar,"slide-down"),(0,Ge._y)(ar,"zoom-big")]},le=>{const{colorPrimary:$e,colorError:dt,colorTextDisabled:Rt,colorErrorBg:Pt,colorText:Ut,colorTextDescription:Xt,colorBgContainer:en,colorFillAlter:ln,colorFillContent:Sn,lineWidth:xt,lineWidthBold:an,controlItemBgActive:On,colorBgTextHover:ut,controlHeightLG:wt,lineHeight:Nt,colorBgElevated:Pn,marginXXS:Bn,padding:Tn,fontSize:nr,controlHeightSM:mr,fontSizeLG:ar,colorTextLightSolid:Er,colorErrorHover:_r}=le,Jn=new je.C(Er).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:le.zIndexPopupBase+50,radiusItem:le.borderRadiusLG,itemBorderRadius:le.borderRadiusLG,radiusSubMenuItem:le.borderRadiusSM,subMenuItemBorderRadius:le.borderRadiusSM,colorItemText:Ut,itemColor:Ut,colorItemTextHover:Ut,itemHoverColor:Ut,colorItemTextHoverHorizontal:$e,horizontalItemHoverColor:$e,colorGroupTitle:Xt,groupTitleColor:Xt,colorItemTextSelected:$e,itemSelectedColor:$e,colorItemTextSelectedHorizontal:$e,horizontalItemSelectedColor:$e,colorItemBg:en,itemBg:en,colorItemBgHover:ut,itemHoverBg:ut,colorItemBgActive:Sn,itemActiveBg:On,colorSubItemBg:ln,subMenuItemBg:ln,colorItemBgSelected:On,itemSelectedBg:On,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:an,activeBarHeight:an,colorActiveBarBorderSize:xt,activeBarBorderWidth:xt,colorItemTextDisabled:Rt,itemDisabledColor:Rt,colorDangerItemText:dt,dangerItemColor:dt,colorDangerItemTextHover:dt,dangerItemHoverColor:dt,colorDangerItemTextSelected:dt,dangerItemSelectedColor:dt,colorDangerItemBgActive:Pt,dangerItemActiveBg:Pt,colorDangerItemBgSelected:Pt,dangerItemSelectedBg:Pt,itemMarginInline:le.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:wt,groupTitleLineHeight:Nt,collapsedWidth:wt*2,popupBg:Pn,itemMarginBlock:Bn,itemPaddingInline:Tn,horizontalLineHeight:`${wt*1.15}px`,iconSize:nr,iconMarginInlineEnd:mr-nr,collapsedIconSize:ar,groupTitleFontSize:nr,darkItemDisabledColor:new je.C(Er).setAlpha(.25).toRgbString(),darkItemColor:Jn,darkDangerItemColor:dt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Er,darkItemSelectedBg:$e,darkDangerItemSelectedBg:dt,darkItemHoverBg:"transparent",darkGroupTitleColor:Jn,darkItemHoverColor:Er,darkDangerItemHoverColor:_r,darkDangerItemSelectedColor:Er,darkDangerItemActiveBg:dt}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(oe),jt=function(oe,de){var fe={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&de.indexOf(le)<0&&(fe[le]=oe[le]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,le=Object.getOwnPropertySymbols(oe);$e<le.length;$e++)de.indexOf(le[$e])<0&&Object.prototype.propertyIsEnumerable.call(oe,le[$e])&&(fe[le[$e]]=oe[le[$e]]);return fe},Kt=(0,We.forwardRef)((oe,de)=>{var fe,le;const $e=We.useContext(Se.Z),dt=$e||{},{getPrefixCls:Rt,getPopupContainer:Pt,direction:Ut,menu:Xt}=We.useContext(ke.E_),en=Rt(),{prefixCls:ln,className:Sn,style:xt,theme:an="light",expandIcon:On,_internalDisableMenuItemTitleTooltip:ut,inlineCollapsed:wt,siderCollapsed:Nt,items:Pn,children:Bn,rootClassName:Tn,mode:nr,selectable:mr,onClick:ar,overflowedIndicatorPopupClassName:Er}=oe,_r=jt(oe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Jn=(0,it.Z)(_r,["collapsedWidth"]),zr=gt(Pn)||Bn;(fe=dt.validator)===null||fe===void 0||fe.call(dt,{mode:nr});const Wr=(0,Xe.useEvent)(function(){var pn;ar==null||ar.apply(void 0,arguments),(pn=dt.onClick)===null||pn===void 0||pn.call(dt)}),Vr=dt.mode||nr,ei=mr!=null?mr:dt.selectable,Tr=We.useMemo(()=>Nt!==void 0?Nt:wt,[wt,Nt]),Yr={horizontal:{motionName:`${en}-slide-up`},inline:(0,He.Z)(en),other:{motionName:`${en}-zoom-big`}},xr=Rt("menu",ln||dt.prefixCls),[Ur,qr]=hn(xr,!$e),It=xe()(`${xr}-${an}`,Xt==null?void 0:Xt.className,Sn);let _n;if(typeof On=="function")_n=On;else if(On===null||On===!1)_n=null;else if(dt.expandIcon===null||dt.expandIcon===!1)_n=null;else{const pn=On!=null?On:dt.expandIcon;_n=(0,ze.Tm)(pn,{className:xe()(`${xr}-submenu-expand-icon`,(0,ze.l$)(pn)?(le=pn.props)===null||le===void 0?void 0:le.className:"")})}const yn=We.useMemo(()=>({prefixCls:xr,inlineCollapsed:Tr||!1,direction:Ut,firstLevel:!0,theme:an,mode:Vr,disableMenuItemTitleTooltip:ut}),[xr,Tr,Ut,ut,an]);return Ur(We.createElement(Se.Z.Provider,{value:null},We.createElement(Qe.Provider,{value:yn},We.createElement(be.ZP,Object.assign({getPopupContainer:Pt,overflowedIndicator:We.createElement(Ue.Z,null),overflowedIndicatorPopupClassName:xe()(xr,`${xr}-${an}`,Er),mode:Vr,selectable:ei,onClick:Wr},Jn,{inlineCollapsed:Tr,style:Object.assign(Object.assign({},Xt==null?void 0:Xt.style),xt),className:It,prefixCls:xr,direction:Ut,defaultMotions:Yr,expandIcon:_n,ref:de,rootClassName:xe()(Tn,qr)}),zr))))});const ge=(0,We.forwardRef)((oe,de)=>{const fe=(0,We.useRef)(null),le=We.useContext(Fe.D);return(0,We.useImperativeHandle)(de,()=>({menu:fe.current,focus:$e=>{var dt;(dt=fe.current)===null||dt===void 0||dt.focus($e)}})),We.createElement(Kt,Object.assign({ref:fe},oe,le))});ge.Item=tt,ge.SubMenu=Lt,ge.Divider=Ee,ge.ItemGroup=be.BW;var se=ge},5112:function(wn,qt,ce){"use strict";ce.d(qt,{ZP:function(){return Pe}});var be=ce(92310),We=ce.n(be),Fe=ce(18929),ft=ce(26112),xe=ce(59301),ke=ce(36355),Te=ce(19716);const we=xe.createContext(null),Ee=we.Provider;var Oe=we;const it=xe.createContext(null),Le=it.Provider;var ze=ce(5630),st=ce(8654),Qe=ce(1684),at=ce(32441),tt=ce(17313),pt=ce(83116),Lt=ce(37613);const Ue=ye=>{const{componentCls:ht,antCls:Vt}=ye,Ht=`${ht}-group`;return{[Ht]:Object.assign(Object.assign({},(0,tt.Wf)(ye)),{display:"inline-block",fontSize:0,[`&${Ht}-rtl`]:{direction:"rtl"},[`${Vt}-badge ${Vt}-badge-count`]:{zIndex:1},[`> ${Vt}-badge:not(:first-child) > ${Vt}-button-wrapper`]:{borderInlineStart:"none"}})}},Xe=ye=>{const{componentCls:ht,wrapperMarginInlineEnd:Vt,colorPrimary:Ht,radioSize:Ye,motionDurationSlow:Je,motionDurationMid:At,motionEaseInOutCirc:mn,colorBgContainer:Gt,colorBorder:hn,lineWidth:jt,dotSize:Ft,colorBgContainerDisabled:Kt,colorTextDisabled:ge,paddingXS:se,dotColorDisabled:oe,lineType:de,radioDotDisabledSize:fe,wireframe:le,colorWhite:$e}=ye,dt=`${ht}-inner`;return{[`${ht}-wrapper`]:Object.assign(Object.assign({},(0,tt.Wf)(ye)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Vt,cursor:"pointer",[`&${ht}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:ye.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${ht}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${jt}px ${de} ${Ht}`,borderRadius:"50%",visibility:"hidden",content:'""'},[ht]:Object.assign(Object.assign({},(0,tt.Wf)(ye)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${ht}-wrapper:hover &,
|
|
|
&:hover ${dt}`]:{borderColor:Ht},[`${ht}-input:focus-visible + ${dt}`]:Object.assign({},(0,tt.oN)(ye)),[`${ht}:hover::after, ${ht}-wrapper:hover &::after`]:{visibility:"visible"},[`${ht}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Ye,height:Ye,marginBlockStart:Ye/-2,marginInlineStart:Ye/-2,backgroundColor:le?Ht:$e,borderBlockStart:0,borderInlineStart:0,borderRadius:Ye,transform:"scale(0)",opacity:0,transition:`all ${Je} ${mn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Ye,height:Ye,backgroundColor:Gt,borderColor:hn,borderStyle:"solid",borderWidth:jt,borderRadius:"50%",transition:`all ${At}`},[`${ht}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${ht}-checked`]:{[dt]:{borderColor:Ht,backgroundColor:le?Gt:Ht,"&::after":{transform:`scale(${Ft/Ye})`,opacity:1,transition:`all ${Je} ${mn}`}}},[`${ht}-disabled`]:{cursor:"not-allowed",[dt]:{backgroundColor:Kt,borderColor:hn,cursor:"not-allowed","&::after":{backgroundColor:oe}},[`${ht}-input`]:{cursor:"not-allowed"},[`${ht}-disabled + span`]:{color:ge,cursor:"not-allowed"},[`&${ht}-checked`]:{[dt]:{"&::after":{transform:`scale(${fe/Ye})`}}}},[`span${ht} + *`]:{paddingInlineStart:se,paddingInlineEnd:se}})}},He=ye=>{const{buttonColor:ht,controlHeight:Vt,componentCls:Ht,lineWidth:Ye,lineType:Je,colorBorder:At,motionDurationSlow:mn,motionDurationMid:Gt,buttonPaddingInline:hn,fontSize:jt,buttonBg:Ft,fontSizeLG:Kt,controlHeightLG:ge,controlHeightSM:se,paddingXS:oe,borderRadius:de,borderRadiusSM:fe,borderRadiusLG:le,buttonCheckedBg:$e,buttonSolidCheckedColor:dt,colorTextDisabled:Rt,colorBgContainerDisabled:Pt,buttonCheckedBgDisabled:Ut,buttonCheckedColorDisabled:Xt,colorPrimary:en,colorPrimaryHover:ln,colorPrimaryActive:Sn,buttonSolidCheckedBg:xt,buttonSolidCheckedHoverBg:an,buttonSolidCheckedActiveBg:On}=ye;return{[`${Ht}-button-wrapper`]:{position:"relative",display:"inline-block",height:Vt,margin:0,paddingInline:hn,paddingBlock:0,color:ht,fontSize:jt,lineHeight:`${Vt-Ye*2}px`,background:Ft,border:`${Ye}px ${Je} ${At}`,borderBlockStartWidth:Ye+.02,borderInlineStartWidth:0,borderInlineEndWidth:Ye,cursor:"pointer",transition:[`color ${Gt}`,`background ${Gt}`,`box-shadow ${Gt}`].join(","),a:{color:ht},[`> ${Ht}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Ye,insetInlineStart:-Ye,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ye,paddingInline:0,backgroundColor:At,transition:`background-color ${mn}`,content:'""'}},"&:first-child":{borderInlineStart:`${Ye}px ${Je} ${At}`,borderStartStartRadius:de,borderEndStartRadius:de},"&:last-child":{borderStartEndRadius:de,borderEndEndRadius:de},"&:first-child:last-child":{borderRadius:de},[`${Ht}-group-large &`]:{height:ge,fontSize:Kt,lineHeight:`${ge-Ye*2}px`,"&:first-child":{borderStartStartRadius:le,borderEndStartRadius:le},"&:last-child":{borderStartEndRadius:le,borderEndEndRadius:le}},[`${Ht}-group-small &`]:{height:se,paddingInline:oe-Ye,paddingBlock:0,lineHeight:`${se-Ye*2}px`,"&:first-child":{borderStartStartRadius:fe,borderEndStartRadius:fe},"&:last-child":{borderStartEndRadius:fe,borderEndEndRadius:fe}},"&:hover":{position:"relative",color:en},"&:has(:focus-visible)":Object.assign({},(0,tt.oN)(ye)),[`${Ht}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Ht}-button-wrapper-disabled)`]:{zIndex:1,color:en,background:$e,borderColor:en,"&::before":{backgroundColor:en},"&:first-child":{borderColor:en},"&:hover":{color:ln,borderColor:ln,"&::before":{backgroundColor:ln}},"&:active":{color:Sn,borderColor:Sn,"&::before":{backgroundColor:Sn}}},[`${Ht}-group-solid &-checked:not(${Ht}-button-wrapper-disabled)`]:{color:dt,background:xt,borderColor:xt,"&:hover":{color:dt,background:an,borderColor:an},"&:active":{color:dt,background:On,borderColor:On}},"&-disabled":{color:Rt,backgroundColor:Pt,borderColor:At,cursor:"not-allowed","&:first-child, &:hover":{color:Rt,backgroundColor:Pt,borderColor:At}},[`&-disabled${Ht}-button-wrapper-checked`]:{color:Xt,backgroundColor:Ut,borderColor:At,boxShadow:"none"}}}},Se=ye=>ye-4*2;var Ke=(0,pt.Z)("Radio",ye=>{const{controlOutline:ht,controlOutlineWidth:Vt,radioSize:Ht}=ye,Ye=`0 0 0 ${Vt}px ${ht}`,Je=Ye,At=Se(Ht),mn=(0,Lt.TS)(ye,{radioDotDisabledSize:At,radioFocusShadow:Ye,radioButtonFocusShadow:Je});return[Ue(mn),Xe(mn),He(mn)]},ye=>{const{wireframe:ht,padding:Vt,marginXS:Ht,lineWidth:Ye,fontSizeLG:Je,colorText:At,colorBgContainer:mn,colorTextDisabled:Gt,controlItemBgActiveDisabled:hn,colorTextLightSolid:jt,colorPrimary:Ft,colorPrimaryHover:Kt,colorPrimaryActive:ge}=ye,se=4,oe=Je,de=ht?Se(oe):oe-(se+Ye)*2;return{radioSize:oe,dotSize:de,dotColorDisabled:Gt,buttonSolidCheckedColor:jt,buttonSolidCheckedBg:Ft,buttonSolidCheckedHoverBg:Kt,buttonSolidCheckedActiveBg:ge,buttonBg:mn,buttonCheckedBg:mn,buttonColor:At,buttonCheckedBgDisabled:hn,buttonCheckedColorDisabled:Gt,buttonPaddingInline:Vt-Ye,wrapperMarginInlineEnd:Ht}}),Ze=ce(14088),gt=ce(4572),je=function(ye,ht){var Vt={};for(var Ht in ye)Object.prototype.hasOwnProperty.call(ye,Ht)&&ht.indexOf(Ht)<0&&(Vt[Ht]=ye[Ht]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ye=0,Ht=Object.getOwnPropertySymbols(ye);Ye<Ht.length;Ye++)ht.indexOf(Ht[Ye])<0&&Object.prototype.propertyIsEnumerable.call(ye,Ht[Ye])&&(Vt[Ht[Ye]]=ye[Ht[Ye]]);return Vt};const St=(ye,ht)=>{var Vt,Ht;const Ye=xe.useContext(Oe),Je=xe.useContext(it),{getPrefixCls:At,direction:mn,radio:Gt}=xe.useContext(ke.E_),hn=xe.useRef(null),jt=(0,st.sQ)(ht,hn),{isFormItemInput:Ft}=xe.useContext(at.aM),Kt=Sn=>{var xt,an;(xt=ye.onChange)===null||xt===void 0||xt.call(ye,Sn),(an=Ye==null?void 0:Ye.onChange)===null||an===void 0||an.call(Ye,Sn)},{prefixCls:ge,className:se,rootClassName:oe,children:de,style:fe}=ye,le=je(ye,["prefixCls","className","rootClassName","children","style"]),$e=At("radio",ge),dt=((Ye==null?void 0:Ye.optionType)||Je)==="button",Rt=dt?`${$e}-button`:$e,[Pt,Ut]=Ke($e),Xt=Object.assign({},le),en=xe.useContext(Qe.Z);Ye&&(Xt.name=Ye.name,Xt.onChange=Kt,Xt.checked=ye.value===Ye.value,Xt.disabled=(Vt=Xt.disabled)!==null&&Vt!==void 0?Vt:Ye.disabled),Xt.disabled=(Ht=Xt.disabled)!==null&&Ht!==void 0?Ht:en;const ln=We()(`${Rt}-wrapper`,{[`${Rt}-wrapper-checked`]:Xt.checked,[`${Rt}-wrapper-disabled`]:Xt.disabled,[`${Rt}-wrapper-rtl`]:mn==="rtl",[`${Rt}-wrapper-in-form-item`]:Ft},Gt==null?void 0:Gt.className,se,oe,Ut);return Pt(xe.createElement(Ze.Z,{component:"Radio",disabled:Xt.disabled},xe.createElement("label",{className:ln,style:Object.assign(Object.assign({},Gt==null?void 0:Gt.style),fe),onMouseEnter:ye.onMouseEnter,onMouseLeave:ye.onMouseLeave},xe.createElement(ze.Z,Object.assign({},Xt,{className:We()(Xt.className,!dt&>.A),type:"radio",prefixCls:Rt,ref:jt})),de!==void 0?xe.createElement("span",null,de):null)))};var Et=xe.forwardRef(St);const Ge=xe.forwardRef((ye,ht)=>{const{getPrefixCls:Vt,direction:Ht}=xe.useContext(ke.E_),[Ye,Je]=(0,Fe.Z)(ye.defaultValue,{value:ye.value}),At=xt=>{const an=Ye,On=xt.target.value;"value"in ye||Je(On);const{onChange:ut}=ye;ut&&On!==an&&ut(xt)},{prefixCls:mn,className:Gt,rootClassName:hn,options:jt,buttonStyle:Ft="outline",disabled:Kt,children:ge,size:se,style:oe,id:de,onMouseEnter:fe,onMouseLeave:le,onFocus:$e,onBlur:dt}=ye,Rt=Vt("radio",mn),Pt=`${Rt}-group`,[Ut,Xt]=Ke(Rt);let en=ge;jt&&jt.length>0&&(en=jt.map(xt=>typeof xt=="string"||typeof xt=="number"?xe.createElement(Et,{key:xt.toString(),prefixCls:Rt,disabled:Kt,value:xt,checked:Ye===xt},xt):xe.createElement(Et,{key:`radio-group-value-options-${xt.value}`,prefixCls:Rt,disabled:xt.disabled||Kt,value:xt.value,checked:Ye===xt.value,title:xt.title,style:xt.style},xt.label)));const ln=(0,Te.Z)(se),Sn=We()(Pt,`${Pt}-${Ft}`,{[`${Pt}-${ln}`]:ln,[`${Pt}-rtl`]:Ht==="rtl"},Gt,hn,Xt);return Ut(xe.createElement("div",Object.assign({},(0,ft.Z)(ye,{aria:!0,data:!0}),{className:Sn,style:oe,onMouseEnter:fe,onMouseLeave:le,onFocus:$e,onBlur:dt,id:de,ref:ht}),xe.createElement(Ee,{value:{onChange:At,value:Ye,disabled:ye.disabled,name:ye.name,optionType:ye.optionType}},en)))});var Dt=xe.memo(Ge),rt=function(ye,ht){var Vt={};for(var Ht in ye)Object.prototype.hasOwnProperty.call(ye,Ht)&&ht.indexOf(Ht)<0&&(Vt[Ht]=ye[Ht]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ye=0,Ht=Object.getOwnPropertySymbols(ye);Ye<Ht.length;Ye++)ht.indexOf(Ht[Ye])<0&&Object.prototype.propertyIsEnumerable.call(ye,Ht[Ye])&&(Vt[Ht[Ye]]=ye[Ht[Ye]]);return Vt};const yt=(ye,ht)=>{const{getPrefixCls:Vt}=xe.useContext(ke.E_),{prefixCls:Ht}=ye,Ye=rt(ye,["prefixCls"]),Je=Vt("radio",Ht);return xe.createElement(Le,{value:"button"},xe.createElement(Et,Object.assign({prefixCls:Je},Ye,{type:"radio",ref:ht})))};var Ct=xe.forwardRef(yt);const ct=Et;ct.Button=Ct,ct.Group=Dt,ct.__ANT_RADIO=!0;var Pe=ct},57809:function(wn,qt,ce){"use strict";var be=ce(92310),We=ce.n(be),Fe=ce(77861),ft=ce(2738),xe=ce(59301),ke=ce(53487),Te=ce(62892),we=ce(19080),Ee=ce(36355),Oe=ce(1684),it=ce(93891),Le=ce(19716),ze=ce(32441),st=ce(33234),Qe=ce(14154),at=ce(58582),tt=ce(84443),pt=ce(66339),Lt=function(Ke,Ze){var gt={};for(var je in Ke)Object.prototype.hasOwnProperty.call(Ke,je)&&Ze.indexOf(je)<0&&(gt[je]=Ke[je]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,je=Object.getOwnPropertySymbols(Ke);St<je.length;St++)Ze.indexOf(je[St])<0&&Object.prototype.propertyIsEnumerable.call(Ke,je[St])&&(gt[je[St]]=Ke[je[St]]);return gt};const Ue="SECRET_COMBOBOX_MODE_DO_NOT_USE",Xe=(Ke,Ze)=>{var gt,{prefixCls:je,bordered:St=!0,className:ot,rootClassName:Et,getPopupContainer:Ge,popupClassName:Dt,dropdownClassName:rt,listHeight:yt=256,placement:Ct,listItemHeight:ct=24,size:Pe,disabled:ye,notFoundContent:ht,status:Vt,builtinPlacements:Ht,dropdownMatchSelectWidth:Ye,popupMatchSelectWidth:Je,direction:At,style:mn,allowClear:Gt}=Ke,hn=Lt(Ke,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:jt,getPrefixCls:Ft,renderEmpty:Kt,direction:ge,virtual:se,popupMatchSelectWidth:oe,popupOverflow:de,select:fe}=xe.useContext(Ee.E_),le=Ft("select",je),$e=Ft(),dt=At!=null?At:ge,{compactSize:Rt,compactItemClassnames:Pt}=(0,st.ri)(le,dt),[Ut,Xt]=(0,Qe.Z)(le),en=xe.useMemo(()=>{const{mode:Yr}=hn;if(Yr!=="combobox")return Yr===Ue?"combobox":Yr},[hn.mode]),ln=en==="multiple"||en==="tags",Sn=(0,tt.Z)(hn.suffixIcon,hn.showArrow),xt=(gt=Je!=null?Je:Ye)!==null&>!==void 0?gt:oe,{status:an,hasFeedback:On,isFormItemInput:ut,feedbackIcon:wt}=xe.useContext(ze.aM),Nt=(0,we.F)(an,Vt);let Pn;ht!==void 0?Pn=ht:en==="combobox"?Pn=null:Pn=(Kt==null?void 0:Kt("Select"))||xe.createElement(it.Z,{componentName:"Select"});const{suffixIcon:Bn,itemIcon:Tn,removeIcon:nr,clearIcon:mr}=(0,pt.Z)(Object.assign(Object.assign({},hn),{multiple:ln,hasFeedback:On,feedbackIcon:wt,showSuffixIcon:Sn,prefixCls:le,showArrow:hn.showArrow,componentName:"Select"})),ar=Gt===!0?{clearIcon:mr}:Gt,Er=(0,ft.Z)(hn,["suffixIcon","itemIcon"]),_r=We()(Dt||rt,{[`${le}-dropdown-${dt}`]:dt==="rtl"},Et,Xt),Jn=(0,Le.Z)(Yr=>{var xr;return(xr=Pe!=null?Pe:Rt)!==null&&xr!==void 0?xr:Yr}),zr=xe.useContext(Oe.Z),Wr=ye!=null?ye:zr,Vr=We()({[`${le}-lg`]:Jn==="large",[`${le}-sm`]:Jn==="small",[`${le}-rtl`]:dt==="rtl",[`${le}-borderless`]:!St,[`${le}-in-form-item`]:ut},(0,we.Z)(le,Nt,On),Pt,fe==null?void 0:fe.className,ot,Et,Xt),ei=xe.useMemo(()=>Ct!==void 0?Ct:dt==="rtl"?"bottomRight":"bottomLeft",[Ct,dt]),Tr=(0,at.Z)(Ht,de);return Ut(xe.createElement(Fe.ZP,Object.assign({ref:Ze,virtual:se,showSearch:fe==null?void 0:fe.showSearch},Er,{style:Object.assign(Object.assign({},fe==null?void 0:fe.style),mn),dropdownMatchSelectWidth:xt,builtinPlacements:Tr,transitionName:(0,Te.m)($e,"slide-up",hn.transitionName),listHeight:yt,listItemHeight:ct,mode:en,prefixCls:le,placement:ei,direction:dt,suffixIcon:Bn,menuItemSelectedIcon:Tn,removeIcon:nr,allowClear:ar,notFoundContent:Pn,className:Vr,getPopupContainer:Ge||jt,dropdownClassName:_r,disabled:Wr})))},He=xe.forwardRef(Xe),Se=(0,ke.Z)(He);He.SECRET_COMBOBOX_MODE_DO_NOT_USE=Ue,He.Option=Fe.Wx,He.OptGroup=Fe.Xo,He._InternalPanelDoNotUseOrYouWillBeFired=Se,qt.default=He},14154:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return He}});var be=ce(17313),We=ce(74207),Fe=ce(37613),ft=ce(83116),xe=ce(13826),ke=ce(92899);const Te=Se=>{const{optionHeight:Ke,optionFontSize:Ze,optionLineHeight:gt,optionPadding:je}=Se;return{position:"relative",display:"block",minHeight:Ke,padding:je,color:Se.colorText,fontWeight:"normal",fontSize:Ze,lineHeight:gt,boxSizing:"border-box"}};var Ee=Se=>{const{antCls:Ke,componentCls:Ze}=Se,gt=`${Ze}-item`,je=`&${Ke}-slide-up-enter${Ke}-slide-up-enter-active`,St=`&${Ke}-slide-up-appear${Ke}-slide-up-appear-active`,ot=`&${Ke}-slide-up-leave${Ke}-slide-up-leave-active`,Et=`${Ze}-dropdown-placement-`;return[{[`${Ze}-dropdown`]:Object.assign(Object.assign({},(0,be.Wf)(Se)),{position:"absolute",top:-9999,zIndex:Se.zIndexPopup,boxSizing:"border-box",padding:Se.paddingXXS,overflow:"hidden",fontSize:Se.fontSize,fontVariant:"initial",backgroundColor:Se.colorBgElevated,borderRadius:Se.borderRadiusLG,outline:"none",boxShadow:Se.boxShadowSecondary,[`
|
|
|
${je}${Et}bottomLeft,
|
|
|
${St}${Et}bottomLeft
|
|
|
`]:{animationName:xe.fJ},[`
|
|
|
${je}${Et}topLeft,
|
|
|
${St}${Et}topLeft,
|
|
|
${je}${Et}topRight,
|
|
|
${St}${Et}topRight
|
|
|
`]:{animationName:xe.Qt},[`${ot}${Et}bottomLeft`]:{animationName:xe.Uw},[`
|
|
|
${ot}${Et}topLeft,
|
|
|
${ot}${Et}topRight
|
|
|
`]:{animationName:xe.ly},"&-hidden":{display:"none"},[`${gt}`]:Object.assign(Object.assign({},Te(Se)),{cursor:"pointer",transition:`background ${Se.motionDurationSlow} ease`,borderRadius:Se.borderRadiusSM,"&-group":{color:Se.colorTextDescription,fontSize:Se.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},be.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${gt}-option-disabled)`]:{backgroundColor:Se.optionActiveBg},[`&-selected:not(${gt}-option-disabled)`]:{color:Se.optionSelectedColor,fontWeight:Se.optionSelectedFontWeight,backgroundColor:Se.optionSelectedBg,[`${gt}-option-state`]:{color:Se.colorPrimary}},"&-disabled":{[`&${gt}-option-selected`]:{backgroundColor:Se.colorBgContainerDisabled},color:Se.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Se.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,xe.oN)(Se,"slide-up"),(0,xe.oN)(Se,"slide-down"),(0,ke.Fm)(Se,"move-up"),(0,ke.Fm)(Se,"move-down")]};const Oe=2,it=Se=>{let{controlHeightSM:Ke,controlHeight:Ze,lineWidth:gt}=Se;const je=(Ze-Ke)/2-gt,St=Math.ceil(je/2);return[je,St]};function Le(Se,Ke){const{componentCls:Ze,iconCls:gt}=Se,je=`${Ze}-selection-overflow`,St=Se.multipleSelectItemHeight,[ot]=it(Se),Et=Ke?`${Ze}-${Ke}`:"";return{[`${Ze}-multiple${Et}`]:{fontSize:Se.fontSize,[je]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ze}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${ot-Oe}px ${Oe*2}px`,borderRadius:Se.borderRadius,[`${Ze}-show-search&`]:{cursor:"text"},[`${Ze}-disabled&`]:{background:Se.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Oe}px 0`,lineHeight:`${St}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ze}-show-arrow ${Ze}-selector,
|
|
|
&${Ze}-allow-clear ${Ze}-selector
|
|
|
`]:{paddingInlineEnd:Se.fontSizeIcon+Se.controlPaddingHorizontal},[`${Ze}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:St,marginTop:Oe,marginBottom:Oe,lineHeight:`${St-Se.lineWidth*2}px`,background:Se.multipleItemBg,border:`${Se.lineWidth}px ${Se.lineType} ${Se.multipleItemBorderColor}`,borderRadius:Se.borderRadiusSM,cursor:"default",transition:`font-size ${Se.motionDurationSlow}, line-height ${Se.motionDurationSlow}, height ${Se.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Oe*2,paddingInlineStart:Se.paddingXS,paddingInlineEnd:Se.paddingXS/2,[`${Ze}-disabled&`]:{color:Se.multipleItemColorDisabled,borderColor:Se.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Se.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,be.Ro)()),{display:"inline-flex",alignItems:"center",color:Se.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${gt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Se.colorIconHover}})},[`${je}-item + ${je}-item`]:{[`${Ze}-selection-search`]:{marginInlineStart:0}},[`${Ze}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Se.inputPaddingHorizontalBase-ot,"\n &-input,\n &-mirror\n ":{height:St,fontFamily:Se.fontFamily,lineHeight:`${St}px`,transition:`all ${Se.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ze}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Se.inputPaddingHorizontalBase,insetInlineEnd:Se.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Se.motionDurationSlow}`}}}}var st=Se=>{const{componentCls:Ke}=Se,Ze=(0,Fe.TS)(Se,{controlHeight:Se.controlHeightSM,multipleSelectItemHeight:Se.controlHeightXS,borderRadius:Se.borderRadiusSM,borderRadiusSM:Se.borderRadiusXS}),gt=(0,Fe.TS)(Se,{fontSize:Se.fontSizeLG,controlHeight:Se.controlHeightLG,multipleSelectItemHeight:Se.multipleItemHeightLG,borderRadius:Se.borderRadiusLG,borderRadiusSM:Se.borderRadius}),[,je]=it(Se);return[Le(Se),Le(Ze,"sm"),{[`${Ke}-multiple${Ke}-sm`]:{[`${Ke}-selection-placeholder`]:{insetInline:Se.controlPaddingHorizontalSM-Se.lineWidth},[`${Ke}-selection-search`]:{marginInlineStart:je}}},Le(gt,"lg")]};function Qe(Se,Ke){const{componentCls:Ze,inputPaddingHorizontalBase:gt,borderRadius:je}=Se,St=Se.controlHeight-Se.lineWidth*2,ot=Math.ceil(Se.fontSize*1.25),Et=Ke?`${Ze}-${Ke}`:"";return{[`${Ze}-single${Et}`]:{fontSize:Se.fontSize,[`${Ze}-selector`]:Object.assign(Object.assign({},(0,be.Wf)(Se)),{display:"flex",borderRadius:je,[`${Ze}-selection-search`]:{position:"absolute",top:0,insetInlineStart:gt,insetInlineEnd:gt,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ze}-selection-item,
|
|
|
${Ze}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${St}px`,transition:`all ${Se.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${St}px`}},[`${Ze}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ze}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ze}-selection-item:after`,`${Ze}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ze}-show-arrow ${Ze}-selection-item,
|
|
|
&${Ze}-show-arrow ${Ze}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ot},[`&${Ze}-open ${Ze}-selection-item`]:{color:Se.colorTextPlaceholder},[`&:not(${Ze}-customize-input)`]:{[`${Ze}-selector`]:{width:"100%",height:Se.controlHeight,padding:`0 ${gt}px`,[`${Ze}-selection-search-input`]:{height:St},"&:after":{lineHeight:`${St}px`}}},[`&${Ze}-customize-input`]:{[`${Ze}-selector`]:{"&:after":{display:"none"},[`${Ze}-selection-search`]:{position:"static",width:"100%"},[`${Ze}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${gt}px`,"&:after":{display:"none"}}}}}}}function at(Se){const{componentCls:Ke}=Se,Ze=Se.controlPaddingHorizontalSM-Se.lineWidth;return[Qe(Se),Qe((0,Fe.TS)(Se,{controlHeight:Se.controlHeightSM,borderRadius:Se.borderRadiusSM}),"sm"),{[`${Ke}-single${Ke}-sm`]:{[`&:not(${Ke}-customize-input)`]:{[`${Ke}-selection-search`]:{insetInlineStart:Ze,insetInlineEnd:Ze},[`${Ke}-selector`]:{padding:`0 ${Ze}px`},[`&${Ke}-show-arrow ${Ke}-selection-search`]:{insetInlineEnd:Ze+Se.fontSize*1.5},[`
|
|
|
&${Ke}-show-arrow ${Ke}-selection-item,
|
|
|
&${Ke}-show-arrow ${Ke}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Se.fontSize*1.5}}}},Qe((0,Fe.TS)(Se,{controlHeight:Se.singleItemHeightLG,fontSize:Se.fontSizeLG,borderRadius:Se.borderRadiusLG}),"lg")]}const tt=Se=>{const{componentCls:Ke,selectorBg:Ze}=Se;return{position:"relative",backgroundColor:Ze,border:`${Se.lineWidth}px ${Se.lineType} ${Se.colorBorder}`,transition:`all ${Se.motionDurationMid} ${Se.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ke}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ke}-disabled&`]:{color:Se.colorTextDisabled,background:Se.colorBgContainerDisabled,cursor:"not-allowed",[`${Ke}-multiple&`]:{background:Se.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},pt=function(Se,Ke){let Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:gt,borderHoverColor:je,outlineColor:St,antCls:ot}=Ke,Et=Ze?{[`${gt}-selector`]:{borderColor:je}}:{};return{[Se]:{[`&:not(${gt}-disabled):not(${gt}-customize-input):not(${ot}-pagination-size-changer)`]:Object.assign(Object.assign({},Et),{[`${gt}-focused& ${gt}-selector`]:{borderColor:je,boxShadow:`0 0 0 ${Ke.controlOutlineWidth}px ${St}`,outline:0},[`&:hover ${gt}-selector`]:{borderColor:je}})}}},Lt=Se=>{const{componentCls:Ke}=Se;return{[`${Ke}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Ue=Se=>{const{componentCls:Ke,inputPaddingHorizontalBase:Ze,iconCls:gt}=Se;return{[Ke]:Object.assign(Object.assign({},(0,be.Wf)(Se)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ke}-customize-input) ${Ke}-selector`]:Object.assign(Object.assign({},tt(Se)),Lt(Se)),[`${Ke}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},be.vS),[`${Ke}-selection-placeholder`]:Object.assign(Object.assign({},be.vS),{flex:1,color:Se.colorTextPlaceholder,pointerEvents:"none"}),[`${Ke}-arrow`]:Object.assign(Object.assign({},(0,be.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ze,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[gt]:{verticalAlign:"top",transition:`transform ${Se.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ke}-suffix)`]:{pointerEvents:"auto"}},[`${Ke}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ke}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ze,zIndex:1,display:"inline-block",width:Se.fontSizeIcon,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Se.clearBg,cursor:"pointer",opacity:0,transition:`color ${Se.motionDurationMid} ease, opacity ${Se.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Se.colorTextTertiary}},"&:hover":{[`${Ke}-clear`]:{opacity:1}}}),[`${Ke}-has-feedback`]:{[`${Ke}-clear`]:{insetInlineEnd:Ze+Se.fontSize+Se.paddingXS}}}},Xe=Se=>{const{componentCls:Ke}=Se;return[{[Ke]:{[`&-borderless ${Ke}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ke}-in-form-item`]:{width:"100%"}}},Ue(Se),at(Se),st(Se),Ee(Se),{[`${Ke}-rtl`]:{direction:"rtl"}},pt(Ke,(0,Fe.TS)(Se,{borderHoverColor:Se.colorPrimaryHover,outlineColor:Se.controlOutline})),pt(`${Ke}-status-error`,(0,Fe.TS)(Se,{borderHoverColor:Se.colorErrorHover,outlineColor:Se.colorErrorOutline}),!0),pt(`${Ke}-status-warning`,(0,Fe.TS)(Se,{borderHoverColor:Se.colorWarningHover,outlineColor:Se.colorWarningOutline}),!0),(0,We.c)(Se,{borderElCls:`${Ke}-selector`,focusElCls:`${Ke}-focused`})]};var He=(0,ft.Z)("Select",(Se,Ke)=>{let{rootPrefixCls:Ze}=Ke;const gt=(0,Fe.TS)(Se,{rootPrefixCls:Ze,inputPaddingHorizontalBase:Se.paddingSM-1,multipleSelectItemHeight:Se.multipleItemHeight});return[Xe(gt)]},Se=>{const{fontSize:Ke,lineHeight:Ze,controlHeight:gt,controlPaddingHorizontal:je,zIndexPopupBase:St,colorText:ot,fontWeightStrong:Et,controlItemBgActive:Ge,controlItemBgHover:Dt,colorBgContainer:rt,colorFillSecondary:yt,controlHeightLG:Ct,controlHeightSM:ct,colorBgContainerDisabled:Pe,colorTextDisabled:ye}=Se;return{zIndexPopup:St+50,optionSelectedColor:ot,optionSelectedFontWeight:Et,optionSelectedBg:Ge,optionActiveBg:Dt,optionPadding:`${(gt-Ke*Ze)/2}px ${je}px`,optionFontSize:Ke,optionLineHeight:Ze,optionHeight:gt,selectorBg:rt,clearBg:rt,singleItemHeightLG:Ct,multipleItemBg:yt,multipleItemBorderColor:"transparent",multipleItemHeight:ct,multipleItemHeightLG:gt,multipleSelectorBgDisabled:Pe,multipleItemColorDisabled:ye,multipleItemBorderColorDisabled:"transparent"}})},58582:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return We}});const be=Fe=>{const xe={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Fe==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},xe),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},xe),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},xe),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},xe),{points:["br","tr"],offset:[0,-4]})}};function We(Fe,ft){return Fe||be(ft)}},84443:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return be}});function be(We,Fe){return Fe!==void 0?Fe:We!==null}},66339:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});var be=ce(40001),We=ce(19248),Fe=ce(99267),ft=ce(84105),xe=ce(58617),ke=ce(47472),Te=ce(59301);function we(Ee){let{suffixIcon:Oe,clearIcon:it,menuItemSelectedIcon:Le,removeIcon:ze,loading:st,multiple:Qe,hasFeedback:at,prefixCls:tt,showSuffixIcon:pt,feedbackIcon:Lt,showArrow:Ue,componentName:Xe}=Ee;const He=it!=null?it:Te.createElement(We.Z,null),Se=je=>Oe===null&&!at&&!Ue?null:Te.createElement(Te.Fragment,null,pt!==!1&&je,at&&Lt);let Ke=null;if(Oe!==void 0)Ke=Se(Oe);else if(st)Ke=Se(Te.createElement(xe.Z,{spin:!0}));else{const je=`${tt}-suffix`;Ke=St=>{let{open:ot,showSearch:Et}=St;return Se(ot&&Et?Te.createElement(ke.Z,{className:je}):Te.createElement(ft.Z,{className:je}))}}let Ze=null;Le!==void 0?Ze=Le:Qe?Ze=Te.createElement(be.Z,null):Ze=null;let gt=null;return ze!==void 0?gt=ze:gt=Te.createElement(Fe.Z,null),{clearIcon:He,suffixIcon:Ke,itemIcon:Ze,removeIcon:gt}}},8378:function(wn,qt){"use strict";const ce=be=>({[be.componentCls]:{[`${be.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${be.motionDurationMid} ${be.motionEaseInOut},
|
|
|
opacity ${be.motionDurationMid} ${be.motionEaseInOut} !important`}},[`${be.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${be.motionDurationMid} ${be.motionEaseInOut},
|
|
|
opacity ${be.motionDurationMid} ${be.motionEaseInOut} !important`}}});qt.Z=ce},92899:function(wn,qt,ce){"use strict";ce.d(qt,{Fm:function(){return Le}});var be=ce(36237),We=ce(95406);const Fe=new be.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ft=new be.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),xe=new be.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ke=new be.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Te=new be.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),we=new be.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Ee=new be.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Oe=new be.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),it={"move-up":{inKeyframes:Ee,outKeyframes:Oe},"move-down":{inKeyframes:Fe,outKeyframes:ft},"move-left":{inKeyframes:xe,outKeyframes:ke},"move-right":{inKeyframes:Te,outKeyframes:we}},Le=(ze,st)=>{const{antCls:Qe}=ze,at=`${Qe}-${st}`,{inKeyframes:tt,outKeyframes:pt}=it[st];return[(0,We.R)(at,tt,pt,ze.motionDurationMid),{[`
|
|
|
${at}-enter,
|
|
|
${at}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:ze.motionEaseOutCirc},[`${at}-leave`]:{animationTimingFunction:ze.motionEaseInOutCirc}}]}},13826:function(wn,qt,ce){"use strict";ce.d(qt,{Qt:function(){return xe},Uw:function(){return ft},fJ:function(){return Fe},ly:function(){return ke},oN:function(){return Le}});var be=ce(36237),We=ce(95406);const Fe=new be.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ft=new be.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),xe=new be.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),ke=new be.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Te=new be.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),we=new be.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Ee=new be.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Oe=new be.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),it={"slide-up":{inKeyframes:Fe,outKeyframes:ft},"slide-down":{inKeyframes:xe,outKeyframes:ke},"slide-left":{inKeyframes:Te,outKeyframes:we},"slide-right":{inKeyframes:Ee,outKeyframes:Oe}},Le=(ze,st)=>{const{antCls:Qe}=ze,at=`${Qe}-${st}`,{inKeyframes:tt,outKeyframes:pt}=it[st];return[(0,We.R)(at,tt,pt,ze.motionDurationMid),{[`
|
|
|
${at}-enter,
|
|
|
${at}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:ze.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${at}-leave`]:{animationTimingFunction:ze.motionEaseInQuint}}]}},78673:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Et}});var be=ce(58617),We=ce(92310),Fe=ce.n(We),ft=ce(54476),xe=ce(20068),ke=ce(42978),Te=ce(75931),we=ce(59301),Ee=ce(18929),Oe=ce(10228),it=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Le=we.forwardRef(function(Ge,Dt){var rt,yt=Ge.prefixCls,Ct=yt===void 0?"rc-switch":yt,ct=Ge.className,Pe=Ge.checked,ye=Ge.defaultChecked,ht=Ge.disabled,Vt=Ge.loadingIcon,Ht=Ge.checkedChildren,Ye=Ge.unCheckedChildren,Je=Ge.onClick,At=Ge.onChange,mn=Ge.onKeyDown,Gt=(0,Te.Z)(Ge,it),hn=(0,Ee.Z)(!1,{value:Pe,defaultValue:ye}),jt=(0,ke.Z)(hn,2),Ft=jt[0],Kt=jt[1];function ge(fe,le){var $e=Ft;return ht||($e=fe,Kt($e),At==null||At($e,le)),$e}function se(fe){fe.which===Oe.Z.LEFT?ge(!1,fe):fe.which===Oe.Z.RIGHT&&ge(!0,fe),mn==null||mn(fe)}function oe(fe){var le=ge(!Ft,fe);Je==null||Je(le,fe)}var de=Fe()(Ct,ct,(rt={},(0,xe.Z)(rt,"".concat(Ct,"-checked"),Ft),(0,xe.Z)(rt,"".concat(Ct,"-disabled"),ht),rt));return we.createElement("button",(0,ft.Z)({},Gt,{type:"button",role:"switch","aria-checked":Ft,disabled:ht,className:de,ref:Dt,onKeyDown:se,onClick:oe}),Vt,we.createElement("span",{className:"".concat(Ct,"-inner")},we.createElement("span",{className:"".concat(Ct,"-inner-checked")},Ht),we.createElement("span",{className:"".concat(Ct,"-inner-unchecked")},Ye)))});Le.displayName="Switch";var ze=Le,st=ce(14088),Qe=ce(36355),at=ce(1684),tt=ce(19716),pt=ce(64993),Lt=ce(17313),Ue=ce(83116),Xe=ce(37613);const He=Ge=>{const{componentCls:Dt,trackHeightSM:rt,trackPadding:yt,trackMinWidthSM:Ct,innerMinMarginSM:ct,innerMaxMarginSM:Pe,handleSizeSM:ye}=Ge,ht=`${Dt}-inner`;return{[Dt]:{[`&${Dt}-small`]:{minWidth:Ct,height:rt,lineHeight:`${rt}px`,[`${Dt}-inner`]:{paddingInlineStart:Pe,paddingInlineEnd:ct,[`${ht}-checked`]:{marginInlineStart:`calc(-100% + ${ye+yt*2}px - ${Pe*2}px)`,marginInlineEnd:`calc(100% - ${ye+yt*2}px + ${Pe*2}px)`},[`${ht}-unchecked`]:{marginTop:-rt,marginInlineStart:0,marginInlineEnd:0}},[`${Dt}-handle`]:{width:ye,height:ye},[`${Dt}-loading-icon`]:{top:(ye-Ge.switchLoadingIconSize)/2,fontSize:Ge.switchLoadingIconSize},[`&${Dt}-checked`]:{[`${Dt}-inner`]:{paddingInlineStart:ct,paddingInlineEnd:Pe,[`${ht}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ht}-unchecked`]:{marginInlineStart:`calc(100% - ${ye+yt*2}px + ${Pe*2}px)`,marginInlineEnd:`calc(-100% + ${ye+yt*2}px - ${Pe*2}px)`}},[`${Dt}-handle`]:{insetInlineStart:`calc(100% - ${ye+yt}px)`}},[`&:not(${Dt}-disabled):active`]:{[`&:not(${Dt}-checked) ${ht}`]:{[`${ht}-unchecked`]:{marginInlineStart:Ge.marginXXS/2,marginInlineEnd:-Ge.marginXXS/2}},[`&${Dt}-checked ${ht}`]:{[`${ht}-checked`]:{marginInlineStart:-Ge.marginXXS/2,marginInlineEnd:Ge.marginXXS/2}}}}}}},Se=Ge=>{const{componentCls:Dt,handleSize:rt}=Ge;return{[Dt]:{[`${Dt}-loading-icon${Ge.iconCls}`]:{position:"relative",top:(rt-Ge.fontSize)/2,color:Ge.switchLoadingIconColor,verticalAlign:"top"},[`&${Dt}-checked ${Dt}-loading-icon`]:{color:Ge.switchColor}}}},Ke=Ge=>{const{componentCls:Dt,motion:rt,trackPadding:yt,handleBg:Ct,handleShadow:ct,handleSize:Pe}=Ge,ye=`${Dt}-handle`;return{[Dt]:{[ye]:{position:"absolute",top:yt,insetInlineStart:yt,width:Pe,height:Pe,transition:`all ${Ge.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Ct,borderRadius:Pe/2,boxShadow:ct,transition:`all ${Ge.switchDuration} ease-in-out`,content:'""'}},[`&${Dt}-checked ${ye}`]:{insetInlineStart:`calc(100% - ${Pe+yt}px)`},[`&:not(${Dt}-disabled):active`]:rt?{[`${ye}::before`]:{insetInlineEnd:Ge.switchHandleActiveInset,insetInlineStart:0},[`&${Dt}-checked ${ye}::before`]:{insetInlineEnd:0,insetInlineStart:Ge.switchHandleActiveInset}}:{}}}},Ze=Ge=>{const{componentCls:Dt,trackHeight:rt,trackPadding:yt,innerMinMargin:Ct,innerMaxMargin:ct,handleSize:Pe}=Ge,ye=`${Dt}-inner`;return{[Dt]:{[ye]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:ct,paddingInlineEnd:Ct,transition:`padding-inline-start ${Ge.switchDuration} ease-in-out, padding-inline-end ${Ge.switchDuration} ease-in-out`,[`${ye}-checked, ${ye}-unchecked`]:{display:"block",color:Ge.colorTextLightSolid,fontSize:Ge.fontSizeSM,transition:`margin-inline-start ${Ge.switchDuration} ease-in-out, margin-inline-end ${Ge.switchDuration} ease-in-out`,pointerEvents:"none"},[`${ye}-checked`]:{marginInlineStart:`calc(-100% + ${Pe+yt*2}px - ${ct*2}px)`,marginInlineEnd:`calc(100% - ${Pe+yt*2}px + ${ct*2}px)`},[`${ye}-unchecked`]:{marginTop:-rt,marginInlineStart:0,marginInlineEnd:0}},[`&${Dt}-checked ${ye}`]:{paddingInlineStart:Ct,paddingInlineEnd:ct,[`${ye}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ye}-unchecked`]:{marginInlineStart:`calc(100% - ${Pe+yt*2}px + ${ct*2}px)`,marginInlineEnd:`calc(-100% + ${Pe+yt*2}px - ${ct*2}px)`}},[`&:not(${Dt}-disabled):active`]:{[`&:not(${Dt}-checked) ${ye}`]:{[`${ye}-unchecked`]:{marginInlineStart:yt*2,marginInlineEnd:-yt*2}},[`&${Dt}-checked ${ye}`]:{[`${ye}-checked`]:{marginInlineStart:-yt*2,marginInlineEnd:yt*2}}}}}},gt=Ge=>{const{componentCls:Dt,trackHeight:rt,trackMinWidth:yt}=Ge;return{[Dt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Lt.Wf)(Ge)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:yt,height:rt,lineHeight:`${rt}px`,verticalAlign:"middle",background:Ge.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${Ge.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Dt}-disabled)`]:{background:Ge.colorTextTertiary}}),(0,Lt.Qy)(Ge)),{[`&${Dt}-checked`]:{background:Ge.switchColor,[`&:hover:not(${Dt}-disabled)`]:{background:Ge.colorPrimaryHover}},[`&${Dt}-loading, &${Dt}-disabled`]:{cursor:"not-allowed",opacity:Ge.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Dt}-rtl`]:{direction:"rtl"}})}};var je=(0,Ue.Z)("Switch",Ge=>{const Dt=(0,Xe.TS)(Ge,{switchDuration:Ge.motionDurationMid,switchColor:Ge.colorPrimary,switchDisabledOpacity:Ge.opacityLoading,switchLoadingIconSize:Ge.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${Ge.opacityLoading})`,switchHandleActiveInset:"-30%"});return[gt(Dt),Ze(Dt),Ke(Dt),Se(Dt),He(Dt)]},Ge=>{const{fontSize:Dt,lineHeight:rt,controlHeight:yt,colorWhite:Ct}=Ge,ct=Dt*rt,Pe=yt/2,ye=2,ht=ct-ye*2,Vt=Pe-ye*2;return{trackHeight:ct,trackHeightSM:Pe,trackMinWidth:ht*2+ye*4,trackMinWidthSM:Vt*2+ye*2,trackPadding:ye,handleBg:Ct,handleSize:ht,handleSizeSM:Vt,handleShadow:`0 2px 4px 0 ${new pt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:ht/2,innerMaxMargin:ht+ye+ye*2,innerMinMarginSM:Vt/2,innerMaxMarginSM:Vt+ye+ye*2}}),St=function(Ge,Dt){var rt={};for(var yt in Ge)Object.prototype.hasOwnProperty.call(Ge,yt)&&Dt.indexOf(yt)<0&&(rt[yt]=Ge[yt]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,yt=Object.getOwnPropertySymbols(Ge);Ct<yt.length;Ct++)Dt.indexOf(yt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(Ge,yt[Ct])&&(rt[yt[Ct]]=Ge[yt[Ct]]);return rt};const ot=we.forwardRef((Ge,Dt)=>{const{prefixCls:rt,size:yt,disabled:Ct,loading:ct,className:Pe,rootClassName:ye,style:ht}=Ge,Vt=St(Ge,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Ht,direction:Ye,switch:Je}=we.useContext(Qe.E_),At=we.useContext(at.Z),mn=(Ct!=null?Ct:At)||ct,Gt=Ht("switch",rt),hn=we.createElement("div",{className:`${Gt}-handle`},ct&&we.createElement(be.Z,{className:`${Gt}-loading-icon`})),[jt,Ft]=je(Gt),Kt=(0,tt.Z)(yt),ge=Fe()(Je==null?void 0:Je.className,{[`${Gt}-small`]:Kt==="small",[`${Gt}-loading`]:ct,[`${Gt}-rtl`]:Ye==="rtl"},Pe,ye,Ft),se=Object.assign(Object.assign({},Je==null?void 0:Je.style),ht);return jt(we.createElement(st.Z,{component:"Switch"},we.createElement(ze,Object.assign({},Vt,{prefixCls:Gt,className:ge,style:se,disabled:mn,ref:Dt,loadingIcon:hn}))))});ot.__ANT_SWITCH=!0;var Et=ot},99313:function(wn,qt,ce){"use strict";ce.d(qt,{default:function(){return nt}});var be=ce(99267),We=ce(18785),Fe=ce(62772),ft=ce(92310),xe=ce.n(ft),ke=ce(54476),Te=ce(20068),we=ce(33885),Ee=ce(42978),Oe=ce(76190),it=ce(75931),Le=ce(59301),ze=ce(49658),st=ce(18929),Qe=ce(77900),at=(0,Le.createContext)(null),tt=Le.forwardRef(function(_e,Ie){var Ae=_e.prefixCls,Be=_e.className,Ve=_e.style,lt=_e.id,Bt=_e.active,bt=_e.tabKey,zt=_e.children;return Le.createElement("div",{id:lt&&"".concat(lt,"-panel-").concat(bt),role:"tabpanel",tabIndex:Bt?0:-1,"aria-labelledby":lt&&"".concat(lt,"-tab-").concat(bt),"aria-hidden":!Bt,style:Ve,className:xe()(Ae,Bt&&"".concat(Ae,"-active"),Be),ref:Ie},zt)}),pt=tt,Lt=["key","forceRender","style","className"];function Ue(_e){var Ie=_e.id,Ae=_e.activeKey,Be=_e.animated,Ve=_e.tabPosition,lt=_e.destroyInactiveTabPane,Bt=Le.useContext(at),bt=Bt.prefixCls,zt=Bt.tabs,tn=Be.tabPane,cn="".concat(bt,"-tabpane");return Le.createElement("div",{className:xe()("".concat(bt,"-content-holder"))},Le.createElement("div",{className:xe()("".concat(bt,"-content"),"".concat(bt,"-content-").concat(Ve),(0,Te.Z)({},"".concat(bt,"-content-animated"),tn))},zt.map(function(on){var _t=on.key,Yt=on.forceRender,Dn=on.style,Cn=on.className,gn=(0,it.Z)(on,Lt),Mn=_t===Ae;return Le.createElement(Qe.default,(0,ke.Z)({key:_t,visible:Mn,forceRender:Yt,removeOnLeave:!!lt,leavedClassName:"".concat(cn,"-hidden")},Be.tabPaneMotion),function(Fn,un){var Zn=Fn.style,et=Fn.className;return Le.createElement(pt,(0,ke.Z)({},gn,{prefixCls:cn,id:Ie,tabKey:_t,animated:tn,active:Mn,style:(0,we.Z)((0,we.Z)({},Dn),Zn),className:xe()(Cn,et),ref:un}))})})))}var Xe=ce(94480),He=ce(29301),Se=ce(6089),Ke=ce(8654),Ze={width:0,height:0,left:0,top:0};function gt(_e,Ie,Ae){return(0,Le.useMemo)(function(){for(var Be,Ve=new Map,lt=Ie.get((Be=_e[0])===null||Be===void 0?void 0:Be.key)||Ze,Bt=lt.left+lt.width,bt=0;bt<_e.length;bt+=1){var zt=_e[bt].key,tn=Ie.get(zt);if(!tn){var cn;tn=Ie.get((cn=_e[bt-1])===null||cn===void 0?void 0:cn.key)||Ze}var on=Ve.get(zt)||(0,we.Z)({},tn);on.right=Bt-on.left-on.width,Ve.set(zt,on)}return Ve},[_e.map(function(Be){return Be.key}).join("_"),Ie,Ae])}function je(_e,Ie){var Ae=Le.useRef(_e),Be=Le.useState({}),Ve=(0,Ee.Z)(Be,2),lt=Ve[1];function Bt(bt){var zt=typeof bt=="function"?bt(Ae.current):bt;zt!==Ae.current&&Ie(zt,Ae.current),Ae.current=zt,lt({})}return[Ae.current,Bt]}var St=.1,ot=.01,Et=20,Ge=Math.pow(.995,Et);function Dt(_e,Ie){var Ae=(0,Le.useState)(),Be=(0,Ee.Z)(Ae,2),Ve=Be[0],lt=Be[1],Bt=(0,Le.useState)(0),bt=(0,Ee.Z)(Bt,2),zt=bt[0],tn=bt[1],cn=(0,Le.useState)(0),on=(0,Ee.Z)(cn,2),_t=on[0],Yt=on[1],Dn=(0,Le.useState)(),Cn=(0,Ee.Z)(Dn,2),gn=Cn[0],Mn=Cn[1],Fn=(0,Le.useRef)();function un(Ot){var Zt=Ot.touches[0],Wt=Zt.screenX,nn=Zt.screenY;lt({x:Wt,y:nn}),window.clearInterval(Fn.current)}function Zn(Ot){if(Ve){Ot.preventDefault();var Zt=Ot.touches[0],Wt=Zt.screenX,nn=Zt.screenY;lt({x:Wt,y:nn});var bn=Wt-Ve.x,Ln=nn-Ve.y;Ie(bn,Ln);var Hn=Date.now();tn(Hn),Yt(Hn-zt),Mn({x:bn,y:Ln})}}function et(){if(Ve&&(lt(null),Mn(null),gn)){var Ot=gn.x/_t,Zt=gn.y/_t,Wt=Math.abs(Ot),nn=Math.abs(Zt);if(Math.max(Wt,nn)<St)return;var bn=Ot,Ln=Zt;Fn.current=window.setInterval(function(){if(Math.abs(bn)<ot&&Math.abs(Ln)<ot){window.clearInterval(Fn.current);return}bn*=Ge,Ln*=Ge,Ie(bn*Et,Ln*Et)},Et)}}var Tt=(0,Le.useRef)();function $t(Ot){var Zt=Ot.deltaX,Wt=Ot.deltaY,nn=0,bn=Math.abs(Zt),Ln=Math.abs(Wt);bn===Ln?nn=Tt.current==="x"?Zt:Wt:bn>Ln?(nn=Zt,Tt.current="x"):(nn=Wt,Tt.current="y"),Ie(-nn,-nn)&&Ot.preventDefault()}var Jt=(0,Le.useRef)(null);Jt.current={onTouchStart:un,onTouchMove:Zn,onTouchEnd:et,onWheel:$t},Le.useEffect(function(){function Ot(bn){Jt.current.onTouchStart(bn)}function Zt(bn){Jt.current.onTouchMove(bn)}function Wt(bn){Jt.current.onTouchEnd(bn)}function nn(bn){Jt.current.onWheel(bn)}return document.addEventListener("touchmove",Zt,{passive:!1}),document.addEventListener("touchend",Wt,{passive:!1}),_e.current.addEventListener("touchstart",Ot,{passive:!1}),_e.current.addEventListener("wheel",nn),function(){document.removeEventListener("touchmove",Zt),document.removeEventListener("touchend",Wt)}},[])}var rt=ce(34280);function yt(_e){var Ie=(0,Le.useState)(0),Ae=(0,Ee.Z)(Ie,2),Be=Ae[0],Ve=Ae[1],lt=(0,Le.useRef)(0),Bt=(0,Le.useRef)();return Bt.current=_e,(0,rt.o)(function(){var bt;(bt=Bt.current)===null||bt===void 0||bt.call(Bt)},[Be]),function(){lt.current===Be&&(lt.current+=1,Ve(lt.current))}}function Ct(_e){var Ie=(0,Le.useRef)([]),Ae=(0,Le.useState)({}),Be=(0,Ee.Z)(Ae,2),Ve=Be[1],lt=(0,Le.useRef)(typeof _e=="function"?_e():_e),Bt=yt(function(){var zt=lt.current;Ie.current.forEach(function(tn){zt=tn(zt)}),Ie.current=[],lt.current=zt,Ve({})});function bt(zt){Ie.current.push(zt),Bt()}return[lt.current,bt]}var ct={width:0,height:0,left:0,top:0,right:0};function Pe(_e,Ie,Ae,Be,Ve,lt,Bt){var bt=Bt.tabs,zt=Bt.tabPosition,tn=Bt.rtl,cn,on,_t;return["top","bottom"].includes(zt)?(cn="width",on=tn?"right":"left",_t=Math.abs(Ae)):(cn="height",on="top",_t=-Ae),(0,Le.useMemo)(function(){if(!bt.length)return[0,0];for(var Yt=bt.length,Dn=Yt,Cn=0;Cn<Yt;Cn+=1){var gn=_e.get(bt[Cn].key)||ct;if(gn[on]+gn[cn]>_t+Ie){Dn=Cn-1;break}}for(var Mn=0,Fn=Yt-1;Fn>=0;Fn-=1){var un=_e.get(bt[Fn].key)||ct;if(un[on]<_t){Mn=Fn+1;break}}return Mn>=Dn?[0,0]:[Mn,Dn]},[_e,Ie,Be,Ve,lt,_t,zt,bt.map(function(Yt){return Yt.key}).join("_"),tn])}function ye(_e){var Ie;return _e instanceof Map?(Ie={},_e.forEach(function(Ae,Be){Ie[Be]=Ae})):Ie=_e,JSON.stringify(Ie)}var ht="TABS_DQ";function Vt(_e){return String(_e).replace(/"/g,ht)}function Ht(_e,Ie,Ae,Be){return!(!Ae||Be||_e===!1||_e===void 0&&(Ie===!1||Ie===null))}function Ye(_e,Ie){var Ae=_e.prefixCls,Be=_e.editable,Ve=_e.locale,lt=_e.style;return!Be||Be.showAdd===!1?null:Le.createElement("button",{ref:Ie,type:"button",className:"".concat(Ae,"-nav-add"),style:lt,"aria-label":(Ve==null?void 0:Ve.addAriaLabel)||"Add tab",onClick:function(bt){Be.onEdit("add",{event:bt})}},Be.addIcon||"+")}var Je=Le.forwardRef(Ye),At=Le.forwardRef(function(_e,Ie){var Ae=_e.position,Be=_e.prefixCls,Ve=_e.extra;if(!Ve)return null;var lt,Bt={};return(0,Oe.Z)(Ve)==="object"&&!Le.isValidElement(Ve)?Bt=Ve:Bt.right=Ve,Ae==="right"&&(lt=Bt.right),Ae==="left"&&(lt=Bt.left),lt?Le.createElement("div",{className:"".concat(Be,"-extra-content"),ref:Ie},lt):null}),mn=At,Gt=ce(31561),hn=ce(15285),jt=ce(10228);function Ft(_e,Ie){var Ae=_e.prefixCls,Be=_e.id,Ve=_e.tabs,lt=_e.locale,Bt=_e.mobile,bt=_e.moreIcon,zt=bt===void 0?"More":bt,tn=_e.moreTransitionName,cn=_e.style,on=_e.className,_t=_e.editable,Yt=_e.tabBarGutter,Dn=_e.rtl,Cn=_e.removeAriaLabel,gn=_e.onTabClick,Mn=_e.getPopupContainer,Fn=_e.popupClassName,un=(0,Le.useState)(!1),Zn=(0,Ee.Z)(un,2),et=Zn[0],Tt=Zn[1],$t=(0,Le.useState)(null),Jt=(0,Ee.Z)($t,2),Ot=Jt[0],Zt=Jt[1],Wt="".concat(Be,"-more-popup"),nn="".concat(Ae,"-dropdown"),bn=Ot!==null?"".concat(Wt,"-").concat(Ot):null,Ln=lt==null?void 0:lt.dropdownAriaLabel;function Hn(pr,Gn){pr.preventDefault(),pr.stopPropagation(),_t.onEdit("remove",{key:Gn,event:pr})}var jn=Le.createElement(hn.ZP,{onClick:function(Gn){var sr=Gn.key,Xn=Gn.domEvent;gn(sr,Xn),Tt(!1)},prefixCls:"".concat(nn,"-menu"),id:Wt,tabIndex:-1,role:"listbox","aria-activedescendant":bn,selectedKeys:[Ot],"aria-label":Ln!==void 0?Ln:"expanded dropdown"},Ve.map(function(pr){var Gn=pr.closable,sr=pr.disabled,Xn=pr.closeIcon,Rn=pr.key,gr=pr.label,kr=Ht(Gn,Xn,_t,sr);return Le.createElement(hn.sN,{key:Rn,id:"".concat(Wt,"-").concat(Rn),role:"option","aria-controls":Be&&"".concat(Be,"-panel-").concat(Rn),disabled:sr},Le.createElement("span",null,gr),kr&&Le.createElement("button",{type:"button","aria-label":Cn||"remove",tabIndex:0,className:"".concat(nn,"-menu-item-remove"),onClick:function(kn){kn.stopPropagation(),Hn(kn,Rn)}},Xn||_t.removeIcon||"\xD7"))}));function rr(pr){for(var Gn=Ve.filter(function(kr){return!kr.disabled}),sr=Gn.findIndex(function(kr){return kr.key===Ot})||0,Xn=Gn.length,Rn=0;Rn<Xn;Rn+=1){sr=(sr+pr+Xn)%Xn;var gr=Gn[sr];if(!gr.disabled){Zt(gr.key);return}}}function cr(pr){var Gn=pr.which;if(!et){[jt.Z.DOWN,jt.Z.SPACE,jt.Z.ENTER].includes(Gn)&&(Tt(!0),pr.preventDefault());return}switch(Gn){case jt.Z.UP:rr(-1),pr.preventDefault();break;case jt.Z.DOWN:rr(1),pr.preventDefault();break;case jt.Z.ESC:Tt(!1);break;case jt.Z.SPACE:case jt.Z.ENTER:Ot!==null&&gn(Ot,pr);break}}(0,Le.useEffect)(function(){var pr=document.getElementById(bn);pr&&pr.scrollIntoView&&pr.scrollIntoView(!1)},[Ot]),(0,Le.useEffect)(function(){et||Zt(null)},[et]);var er=(0,Te.Z)({},Dn?"marginRight":"marginLeft",Yt);Ve.length||(er.visibility="hidden",er.order=1);var vr=xe()((0,Te.Z)({},"".concat(nn,"-rtl"),Dn)),fr=Bt?null:Le.createElement(Gt.Z,{prefixCls:nn,overlay:jn,trigger:["hover"],visible:Ve.length?et:!1,transitionName:tn,onVisibleChange:Tt,overlayClassName:xe()(vr,Fn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Mn},Le.createElement("button",{type:"button",className:"".concat(Ae,"-nav-more"),style:er,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Wt,id:"".concat(Be,"-more"),"aria-expanded":et,onKeyDown:cr},zt));return Le.createElement("div",{className:xe()("".concat(Ae,"-nav-operations"),on),style:cn,ref:Ie},fr,Le.createElement(Je,{prefixCls:Ae,locale:lt,editable:_t}))}var Kt=Le.memo(Le.forwardRef(Ft),function(_e,Ie){return Ie.tabMoving});function ge(_e){var Ie,Ae=_e.prefixCls,Be=_e.id,Ve=_e.active,lt=_e.tab,Bt=lt.key,bt=lt.label,zt=lt.disabled,tn=lt.closeIcon,cn=_e.closable,on=_e.renderWrapper,_t=_e.removeAriaLabel,Yt=_e.editable,Dn=_e.onClick,Cn=_e.onFocus,gn=_e.style,Mn="".concat(Ae,"-tab"),Fn=Ht(cn,tn,Yt,zt);function un(Tt){zt||Dn(Tt)}function Zn(Tt){Tt.preventDefault(),Tt.stopPropagation(),Yt.onEdit("remove",{key:Bt,event:Tt})}var et=Le.createElement("div",{key:Bt,"data-node-key":Vt(Bt),className:xe()(Mn,(Ie={},(0,Te.Z)(Ie,"".concat(Mn,"-with-remove"),Fn),(0,Te.Z)(Ie,"".concat(Mn,"-active"),Ve),(0,Te.Z)(Ie,"".concat(Mn,"-disabled"),zt),Ie)),style:gn,onClick:un},Le.createElement("div",{role:"tab","aria-selected":Ve,id:Be&&"".concat(Be,"-tab-").concat(Bt),className:"".concat(Mn,"-btn"),"aria-controls":Be&&"".concat(Be,"-panel-").concat(Bt),"aria-disabled":zt,tabIndex:zt?null:0,onClick:function($t){$t.stopPropagation(),un($t)},onKeyDown:function($t){[jt.Z.SPACE,jt.Z.ENTER].includes($t.which)&&($t.preventDefault(),un($t))},onFocus:Cn},bt),Fn&&Le.createElement("button",{type:"button","aria-label":_t||"remove",tabIndex:0,className:"".concat(Mn,"-remove"),onClick:function($t){$t.stopPropagation(),Zn($t)}},tn||Yt.removeIcon||"\xD7"));return on?on(et):et}var se=ge,oe=ce(16089),de=function(Ie){var Ae=Ie.activeTabOffset,Be=Ie.horizontal,Ve=Ie.rtl,lt=Ie.indicatorSize,Bt=(0,Le.useState)(),bt=(0,Ee.Z)(Bt,2),zt=bt[0],tn=bt[1],cn=(0,Le.useRef)(),on=function(Dn){return typeof lt=="function"?lt(Dn):typeof lt=="number"?lt:Dn};function _t(){oe.Z.cancel(cn.current)}return(0,Le.useEffect)(function(){var Yt={};return Ae&&(Be?(Ve?(Yt.right=Ae.right+Ae.width/2,Yt.transform="translateX(50%)"):(Yt.left=Ae.left+Ae.width/2,Yt.transform="translateX(-50%)"),Yt.width=on(Ae.width)):(Yt.top=Ae.top+Ae.height/2,Yt.transform="translateY(-50%)",Yt.height=on(Ae.height))),_t(),cn.current=(0,oe.Z)(function(){tn(Yt)}),_t},[Ae,Be,Ve,lt]),{style:zt}},fe=de,le=function(Ie){var Ae=Ie.current||{},Be=Ae.offsetWidth,Ve=Be===void 0?0:Be,lt=Ae.offsetHeight,Bt=lt===void 0?0:lt;return[Ve,Bt]},$e=function(Ie,Ae){return Ie[Ae?0:1]};function dt(_e,Ie){var Ae,Be=Le.useContext(at),Ve=Be.prefixCls,lt=Be.tabs,Bt=_e.className,bt=_e.style,zt=_e.id,tn=_e.animated,cn=_e.activeKey,on=_e.rtl,_t=_e.extra,Yt=_e.editable,Dn=_e.locale,Cn=_e.tabPosition,gn=_e.tabBarGutter,Mn=_e.children,Fn=_e.onTabClick,un=_e.onTabScroll,Zn=_e.indicatorSize,et=(0,Le.useRef)(),Tt=(0,Le.useRef)(),$t=(0,Le.useRef)(),Jt=(0,Le.useRef)(),Ot=(0,Le.useRef)(),Zt=(0,Le.useRef)(),Wt=(0,Le.useRef)(),nn=Cn==="top"||Cn==="bottom",bn=je(0,function(pi,hi){nn&&un&&un({direction:pi>hi?"left":"right"})}),Ln=(0,Ee.Z)(bn,2),Hn=Ln[0],jn=Ln[1],rr=je(0,function(pi,hi){!nn&&un&&un({direction:pi>hi?"top":"bottom"})}),cr=(0,Ee.Z)(rr,2),er=cr[0],vr=cr[1],fr=(0,Le.useState)([0,0]),pr=(0,Ee.Z)(fr,2),Gn=pr[0],sr=pr[1],Xn=(0,Le.useState)([0,0]),Rn=(0,Ee.Z)(Xn,2),gr=Rn[0],kr=Rn[1],tr=(0,Le.useState)([0,0]),kn=(0,Ee.Z)(tr,2),En=kn[0],dr=kn[1],qn=(0,Le.useState)([0,0]),wr=(0,Ee.Z)(qn,2),Lr=wr[0],Cr=wr[1],Zr=Ct(new Map),Or=(0,Ee.Z)(Zr,2),ni=Or[0],ir=Or[1],lr=gt(lt,ni,gr[0]),Dr=$e(Gn,nn),Ar=$e(gr,nn),ui=$e(En,nn),Hi=$e(Lr,nn),_i=Dr<Ar+ui,Qr=_i?Dr-Hi:Dr-ui,bi="".concat(Ve,"-nav-operations-hidden"),mi=0,Yn=0;nn&&on?(mi=0,Yn=Math.max(0,Ar-Qr)):(mi=Math.min(0,Qr-Ar),Yn=0);function Un(pi){return pi<mi?mi:pi>Yn?Yn:pi}var Nn=(0,Le.useRef)(),Kn=(0,Le.useState)(),Nr=(0,Ee.Z)(Kn,2),ri=Nr[0],ai=Nr[1];function ci(){ai(Date.now())}function ti(){window.clearTimeout(Nn.current)}Dt(Jt,function(pi,hi){function Wi(sa,aa){sa(function(Ji){var ts=Un(Ji+aa);return ts})}return _i?(nn?Wi(jn,pi):Wi(vr,hi),ti(),ci(),!0):!1}),(0,Le.useEffect)(function(){return ti(),ri&&(Nn.current=window.setTimeout(function(){ai(0)},100)),ti},[ri]);var fi=Pe(lr,Qr,nn?Hn:er,Ar,ui,Hi,(0,we.Z)((0,we.Z)({},_e),{},{tabs:lt})),Li=(0,Ee.Z)(fi,2),ki=Li[0],ta=Li[1],Yi=(0,Se.Z)(function(){var pi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cn,hi=lr.get(pi)||{width:0,height:0,left:0,right:0,top:0};if(nn){var Wi=Hn;on?hi.right<Hn?Wi=hi.right:hi.right+hi.width>Hn+Qr&&(Wi=hi.right+hi.width-Qr):hi.left<-Hn?Wi=-hi.left:hi.left+hi.width>-Hn+Qr&&(Wi=-(hi.left+hi.width-Qr)),vr(0),jn(Un(Wi))}else{var sa=er;hi.top<-er?sa=-hi.top:hi.top+hi.height>-er+Qr&&(sa=-(hi.top+hi.height-Qr)),jn(0),vr(Un(sa))}}),Ii={};Cn==="top"||Cn==="bottom"?Ii[on?"marginRight":"marginLeft"]=gn:Ii.marginTop=gn;var Ra=lt.map(function(pi,hi){var Wi=pi.key;return Le.createElement(se,{id:zt,prefixCls:Ve,key:Wi,tab:pi,style:hi===0?void 0:Ii,closable:pi.closable,editable:Yt,active:Wi===cn,renderWrapper:Mn,removeAriaLabel:Dn==null?void 0:Dn.removeAriaLabel,onClick:function(aa){Fn(Wi,aa)},onFocus:function(){Yi(Wi),ci(),Jt.current&&(on||(Jt.current.scrollLeft=0),Jt.current.scrollTop=0)}})}),na=function(){return ir(function(){var hi=new Map;return lt.forEach(function(Wi){var sa,aa=Wi.key,Ji=(sa=Ot.current)===null||sa===void 0?void 0:sa.querySelector('[data-node-key="'.concat(Vt(aa),'"]'));Ji&&hi.set(aa,{width:Ji.offsetWidth,height:Ji.offsetHeight,left:Ji.offsetLeft,top:Ji.offsetTop})}),hi})};(0,Le.useEffect)(function(){na()},[lt.map(function(pi){return pi.key}).join("_")]);var va=yt(function(){var pi=le(et),hi=le(Tt),Wi=le($t);sr([pi[0]-hi[0]-Wi[0],pi[1]-hi[1]-Wi[1]]);var sa=le(Wt);dr(sa);var aa=le(Zt);Cr(aa);var Ji=le(Ot);kr([Ji[0]-sa[0],Ji[1]-sa[1]]),na()}),ra=lt.slice(0,ki),Si=lt.slice(ta+1),$r=[].concat((0,Xe.Z)(ra),(0,Xe.Z)(Si)),Jr=lr.get(cn),Hr=fe({activeTabOffset:Jr,horizontal:nn,rtl:on,indicatorSize:Zn}),Ir=Hr.style;(0,Le.useEffect)(function(){Yi()},[cn,mi,Yn,ye(Jr),ye(lr),nn]),(0,Le.useEffect)(function(){va()},[on]);var si=!!$r.length,ii="".concat(Ve,"-nav-wrap"),Oi,Fi,Ri,qi;return nn?on?(Fi=Hn>0,Oi=Hn!==Yn):(Oi=Hn<0,Fi=Hn!==mi):(Ri=er<0,qi=er!==mi),Le.createElement(He.Z,{onResize:va},Le.createElement("div",{ref:(0,Ke.x1)(Ie,et),role:"tablist",className:xe()("".concat(Ve,"-nav"),Bt),style:bt,onKeyDown:function(){ci()}},Le.createElement(mn,{ref:Tt,position:"left",extra:_t,prefixCls:Ve}),Le.createElement(He.Z,{onResize:va},Le.createElement("div",{className:xe()(ii,(Ae={},(0,Te.Z)(Ae,"".concat(ii,"-ping-left"),Oi),(0,Te.Z)(Ae,"".concat(ii,"-ping-right"),Fi),(0,Te.Z)(Ae,"".concat(ii,"-ping-top"),Ri),(0,Te.Z)(Ae,"".concat(ii,"-ping-bottom"),qi),Ae)),ref:Jt},Le.createElement(He.Z,{onResize:va},Le.createElement("div",{ref:Ot,className:"".concat(Ve,"-nav-list"),style:{transform:"translate(".concat(Hn,"px, ").concat(er,"px)"),transition:ri?"none":void 0}},Ra,Le.createElement(Je,{ref:Wt,prefixCls:Ve,locale:Dn,editable:Yt,style:(0,we.Z)((0,we.Z)({},Ra.length===0?void 0:Ii),{},{visibility:si?"hidden":null})}),Le.createElement("div",{className:xe()("".concat(Ve,"-ink-bar"),(0,Te.Z)({},"".concat(Ve,"-ink-bar-animated"),tn.inkBar)),style:Ir}))))),Le.createElement(Kt,(0,ke.Z)({},_e,{removeAriaLabel:Dn==null?void 0:Dn.removeAriaLabel,ref:Zt,prefixCls:Ve,tabs:$r,className:!si&&bi,tabMoving:!!ri})),Le.createElement(mn,{ref:$t,position:"right",extra:_t,prefixCls:Ve})))}var Rt=Le.forwardRef(dt),Pt=["renderTabBar"],Ut=["label","key"];function Xt(_e){var Ie=_e.renderTabBar,Ae=(0,it.Z)(_e,Pt),Be=Le.useContext(at),Ve=Be.tabs;if(Ie){var lt=(0,we.Z)((0,we.Z)({},Ae),{},{panes:Ve.map(function(Bt){var bt=Bt.label,zt=Bt.key,tn=(0,it.Z)(Bt,Ut);return Le.createElement(pt,(0,ke.Z)({tab:bt,key:zt,tabKey:zt},tn))})});return Ie(lt,Rt)}return Le.createElement(Rt,Ae)}var en=ce(48736);function ln(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Ie;return _e===!1?Ie={inkBar:!1,tabPane:!1}:_e===!0?Ie={inkBar:!0,tabPane:!1}:Ie=(0,we.Z)({inkBar:!0},(0,Oe.Z)(_e)==="object"?_e:{}),Ie.tabPaneMotion&&Ie.tabPane===void 0&&(Ie.tabPane=!0),!Ie.tabPaneMotion&&Ie.tabPane&&(Ie.tabPane=!1),Ie}var Sn=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],xt=0;function an(_e,Ie){var Ae,Be=_e.id,Ve=_e.prefixCls,lt=Ve===void 0?"rc-tabs":Ve,Bt=_e.className,bt=_e.items,zt=_e.direction,tn=_e.activeKey,cn=_e.defaultActiveKey,on=_e.editable,_t=_e.animated,Yt=_e.tabPosition,Dn=Yt===void 0?"top":Yt,Cn=_e.tabBarGutter,gn=_e.tabBarStyle,Mn=_e.tabBarExtraContent,Fn=_e.locale,un=_e.moreIcon,Zn=_e.moreTransitionName,et=_e.destroyInactiveTabPane,Tt=_e.renderTabBar,$t=_e.onChange,Jt=_e.onTabClick,Ot=_e.onTabScroll,Zt=_e.getPopupContainer,Wt=_e.popupClassName,nn=_e.indicatorSize,bn=(0,it.Z)(_e,Sn),Ln=Le.useMemo(function(){return(bt||[]).filter(function(Cr){return Cr&&(0,Oe.Z)(Cr)==="object"&&"key"in Cr})},[bt]),Hn=zt==="rtl",jn=ln(_t),rr=(0,Le.useState)(!1),cr=(0,Ee.Z)(rr,2),er=cr[0],vr=cr[1];(0,Le.useEffect)(function(){vr((0,ze.Z)())},[]);var fr=(0,st.Z)(function(){var Cr;return(Cr=Ln[0])===null||Cr===void 0?void 0:Cr.key},{value:tn,defaultValue:cn}),pr=(0,Ee.Z)(fr,2),Gn=pr[0],sr=pr[1],Xn=(0,Le.useState)(function(){return Ln.findIndex(function(Cr){return Cr.key===Gn})}),Rn=(0,Ee.Z)(Xn,2),gr=Rn[0],kr=Rn[1];(0,Le.useEffect)(function(){var Cr=Ln.findIndex(function(Or){return Or.key===Gn});if(Cr===-1){var Zr;Cr=Math.max(0,Math.min(gr,Ln.length-1)),sr((Zr=Ln[Cr])===null||Zr===void 0?void 0:Zr.key)}kr(Cr)},[Ln.map(function(Cr){return Cr.key}).join("_"),Gn,gr]);var tr=(0,st.Z)(null,{value:Be}),kn=(0,Ee.Z)(tr,2),En=kn[0],dr=kn[1];(0,Le.useEffect)(function(){Be||(dr("rc-tabs-".concat(xt)),xt+=1)},[]);function qn(Cr,Zr){Jt==null||Jt(Cr,Zr);var Or=Cr!==Gn;sr(Cr),Or&&($t==null||$t(Cr))}var wr={id:En,activeKey:Gn,animated:jn,tabPosition:Dn,rtl:Hn,mobile:er},Lr=(0,we.Z)((0,we.Z)({},wr),{},{editable:on,locale:Fn,moreIcon:un,moreTransitionName:Zn,tabBarGutter:Cn,onTabClick:qn,onTabScroll:Ot,extra:Mn,style:gn,panes:null,getPopupContainer:Zt,popupClassName:Wt,indicatorSize:nn});return Le.createElement(at.Provider,{value:{tabs:Ln,prefixCls:lt}},Le.createElement("div",(0,ke.Z)({ref:Ie,id:Be,className:xe()(lt,"".concat(lt,"-").concat(Dn),(Ae={},(0,Te.Z)(Ae,"".concat(lt,"-mobile"),er),(0,Te.Z)(Ae,"".concat(lt,"-editable"),on),(0,Te.Z)(Ae,"".concat(lt,"-rtl"),Hn),Ae),Bt)},bn),Le.createElement(Xt,(0,ke.Z)({},Lr,{renderTabBar:Tt})),Le.createElement(Ue,(0,ke.Z)({destroyInactiveTabPane:et},wr,{animated:jn}))))}var On=Le.forwardRef(an),ut=On,wt=ut,Nt=ce(36355),Pn=ce(19716),Tn=()=>null,nr=ce(62892);const mr={motionAppear:!1,motionEnter:!0,motionLeave:!0};function ar(_e){let Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Ae;return Ie===!1?Ae={inkBar:!1,tabPane:!1}:Ie===!0?Ae={inkBar:!0,tabPane:!0}:Ae=Object.assign({inkBar:!0},typeof Ie=="object"?Ie:{}),Ae.tabPane&&(Ae.tabPaneMotion=Object.assign(Object.assign({},mr),{motionName:(0,nr.m)(_e,"switch")})),Ae}var Er=ce(11592),_r=function(_e,Ie){var Ae={};for(var Be in _e)Object.prototype.hasOwnProperty.call(_e,Be)&&Ie.indexOf(Be)<0&&(Ae[Be]=_e[Be]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Be=Object.getOwnPropertySymbols(_e);Ve<Be.length;Ve++)Ie.indexOf(Be[Ve])<0&&Object.prototype.propertyIsEnumerable.call(_e,Be[Ve])&&(Ae[Be[Ve]]=_e[Be[Ve]]);return Ae};function Jn(_e){return _e.filter(Ie=>Ie)}function zr(_e,Ie){if(_e)return _e;const Ae=(0,Er.Z)(Ie).map(Be=>{if(Le.isValidElement(Be)){const{key:Ve,props:lt}=Be,Bt=lt||{},{tab:bt}=Bt,zt=_r(Bt,["tab"]);return Object.assign(Object.assign({key:String(Ve)},zt),{label:bt})}return null});return Jn(Ae)}var Wr=ce(17313),Vr=ce(83116),ei=ce(37613),Tr=ce(13826),xr=_e=>{const{componentCls:Ie,motionDurationSlow:Ae}=_e;return[{[Ie]:{[`${Ie}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Ae}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Ae}`}}}}},[(0,Tr.oN)(_e,"slide-up"),(0,Tr.oN)(_e,"slide-down")]]};const Ur=_e=>{const{componentCls:Ie,tabsCardPadding:Ae,cardBg:Be,cardGutter:Ve,colorBorderSecondary:lt,itemSelectedColor:Bt}=_e;return{[`${Ie}-card`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab`]:{margin:0,padding:Ae,background:Be,border:`${_e.lineWidth}px ${_e.lineType} ${lt}`,transition:`all ${_e.motionDurationSlow} ${_e.motionEaseInOut}`},[`${Ie}-tab-active`]:{color:Bt,background:_e.colorBgContainer},[`${Ie}-ink-bar`]:{visibility:"hidden"}},[`&${Ie}-top, &${Ie}-bottom`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab + ${Ie}-tab`]:{marginLeft:{_skip_check_:!0,value:`${Ve}px`}}}},[`&${Ie}-top`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab`]:{borderRadius:`${_e.borderRadiusLG}px ${_e.borderRadiusLG}px 0 0`},[`${Ie}-tab-active`]:{borderBottomColor:_e.colorBgContainer}}},[`&${Ie}-bottom`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab`]:{borderRadius:`0 0 ${_e.borderRadiusLG}px ${_e.borderRadiusLG}px`},[`${Ie}-tab-active`]:{borderTopColor:_e.colorBgContainer}}},[`&${Ie}-left, &${Ie}-right`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab + ${Ie}-tab`]:{marginTop:`${Ve}px`}}},[`&${Ie}-left`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab`]:{borderRadius:{_skip_check_:!0,value:`${_e.borderRadiusLG}px 0 0 ${_e.borderRadiusLG}px`}},[`${Ie}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:_e.colorBgContainer}}}},[`&${Ie}-right`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${_e.borderRadiusLG}px ${_e.borderRadiusLG}px 0`}},[`${Ie}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:_e.colorBgContainer}}}}}}},qr=_e=>{const{componentCls:Ie,itemHoverColor:Ae,dropdownEdgeChildVerticalPadding:Be}=_e;return{[`${Ie}-dropdown`]:Object.assign(Object.assign({},(0,Wr.Wf)(_e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:_e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Ie}-dropdown-menu`]:{maxHeight:_e.tabsDropdownHeight,margin:0,padding:`${Be}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:_e.colorBgContainer,backgroundClip:"padding-box",borderRadius:_e.borderRadiusLG,outline:"none",boxShadow:_e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Wr.vS),{display:"flex",alignItems:"center",minWidth:_e.tabsDropdownWidth,margin:0,padding:`${_e.paddingXXS}px ${_e.paddingSM}px`,color:_e.colorText,fontWeight:"normal",fontSize:_e.fontSize,lineHeight:_e.lineHeight,cursor:"pointer",transition:`all ${_e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:_e.marginSM},color:_e.colorTextDescription,fontSize:_e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Ae}},"&:hover":{background:_e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:_e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},It=_e=>{const{componentCls:Ie,margin:Ae,colorBorderSecondary:Be,horizontalMargin:Ve,verticalItemPadding:lt,verticalItemMargin:Bt}=_e;return{[`${Ie}-top, ${Ie}-bottom`]:{flexDirection:"column",[`> ${Ie}-nav, > div > ${Ie}-nav`]:{margin:Ve,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${_e.lineWidth}px ${_e.lineType} ${Be}`,content:"''"},[`${Ie}-ink-bar`]:{height:_e.lineWidthBold,"&-animated":{transition:`width ${_e.motionDurationSlow}, left ${_e.motionDurationSlow},
|
|
|
right ${_e.motionDurationSlow}`}},[`${Ie}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:_e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:_e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:_e.boxShadowTabsOverflowRight},[`&${Ie}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Ie}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Ie}-top`]:{[`> ${Ie}-nav,
|
|
|
> div > ${Ie}-nav`]:{"&::before":{bottom:0},[`${Ie}-ink-bar`]:{bottom:0}}},[`${Ie}-bottom`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{order:1,marginTop:`${Ae}px`,marginBottom:0,"&::before":{top:0},[`${Ie}-ink-bar`]:{top:0}},[`> ${Ie}-content-holder, > div > ${Ie}-content-holder`]:{order:0}},[`${Ie}-left, ${Ie}-right`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{flexDirection:"column",minWidth:_e.controlHeight*1.25,[`${Ie}-tab`]:{padding:lt,textAlign:"center"},[`${Ie}-tab + ${Ie}-tab`]:{margin:Bt},[`${Ie}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:_e.controlHeight},"&::before":{top:0,boxShadow:_e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:_e.boxShadowTabsOverflowBottom},[`&${Ie}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Ie}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Ie}-ink-bar`]:{width:_e.lineWidthBold,"&-animated":{transition:`height ${_e.motionDurationSlow}, top ${_e.motionDurationSlow}`}},[`${Ie}-nav-list, ${Ie}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Ie}-left`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Ie}-content-holder, > div > ${Ie}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${_e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${_e.lineWidth}px ${_e.lineType} ${_e.colorBorder}`},[`> ${Ie}-content > ${Ie}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:_e.paddingLG}}}},[`${Ie}-right`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{order:1,[`${Ie}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Ie}-content-holder, > div > ${Ie}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-_e.lineWidth},borderRight:{_skip_check_:!0,value:`${_e.lineWidth}px ${_e.lineType} ${_e.colorBorder}`},[`> ${Ie}-content > ${Ie}-tabpane`]:{paddingRight:{_skip_check_:!0,value:_e.paddingLG}}}}}},_n=_e=>{const{componentCls:Ie,cardPaddingSM:Ae,cardPaddingLG:Be,horizontalItemPaddingSM:Ve,horizontalItemPaddingLG:lt}=_e;return{[Ie]:{"&-small":{[`> ${Ie}-nav`]:{[`${Ie}-tab`]:{padding:Ve,fontSize:_e.titleFontSizeSM}}},"&-large":{[`> ${Ie}-nav`]:{[`${Ie}-tab`]:{padding:lt,fontSize:_e.titleFontSizeLG}}}},[`${Ie}-card`]:{[`&${Ie}-small`]:{[`> ${Ie}-nav`]:{[`${Ie}-tab`]:{padding:Ae}},[`&${Ie}-bottom`]:{[`> ${Ie}-nav ${Ie}-tab`]:{borderRadius:`0 0 ${_e.borderRadius}px ${_e.borderRadius}px`}},[`&${Ie}-top`]:{[`> ${Ie}-nav ${Ie}-tab`]:{borderRadius:`${_e.borderRadius}px ${_e.borderRadius}px 0 0`}},[`&${Ie}-right`]:{[`> ${Ie}-nav ${Ie}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${_e.borderRadius}px ${_e.borderRadius}px 0`}}},[`&${Ie}-left`]:{[`> ${Ie}-nav ${Ie}-tab`]:{borderRadius:{_skip_check_:!0,value:`${_e.borderRadius}px 0 0 ${_e.borderRadius}px`}}}},[`&${Ie}-large`]:{[`> ${Ie}-nav`]:{[`${Ie}-tab`]:{padding:Be}}}}}},yn=_e=>{const{componentCls:Ie,itemActiveColor:Ae,itemHoverColor:Be,iconCls:Ve,tabsHorizontalItemMargin:lt,horizontalItemPadding:Bt,itemSelectedColor:bt,itemColor:zt}=_e,tn=`${Ie}-tab`;return{[tn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:Bt,fontSize:_e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:zt,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Ae}},(0,Wr.Qy)(_e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-_e.marginXXS},marginLeft:{_skip_check_:!0,value:_e.marginXS},color:_e.colorTextDescription,fontSize:_e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${_e.motionDurationSlow}`,"&:hover":{color:_e.colorTextHeading}},"&:hover":{color:Be},[`&${tn}-active ${tn}-btn`]:{color:bt,textShadow:_e.tabsActiveTextShadow},[`&${tn}-disabled`]:{color:_e.colorTextDisabled,cursor:"not-allowed"},[`&${tn}-disabled ${tn}-btn, &${tn}-disabled ${Ie}-remove`]:{"&:focus, &:active":{color:_e.colorTextDisabled}},[`& ${tn}-remove ${Ve}`]:{margin:0},[Ve]:{marginRight:{_skip_check_:!0,value:_e.marginSM}}},[`${tn} + ${tn}`]:{margin:{_skip_check_:!0,value:lt}}}},pn=_e=>{const{componentCls:Ie,tabsHorizontalItemMarginRTL:Ae,iconCls:Be,cardGutter:Ve}=_e;return{[`${Ie}-rtl`]:{direction:"rtl",[`${Ie}-nav`]:{[`${Ie}-tab`]:{margin:{_skip_check_:!0,value:Ae},[`${Ie}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Be]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${_e.marginSM}px`}},[`${Ie}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${_e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${_e.marginXXS}px`},[Be]:{margin:0}}}},[`&${Ie}-left`]:{[`> ${Ie}-nav`]:{order:1},[`> ${Ie}-content-holder`]:{order:0}},[`&${Ie}-right`]:{[`> ${Ie}-nav`]:{order:0},[`> ${Ie}-content-holder`]:{order:1}},[`&${Ie}-card${Ie}-top, &${Ie}-card${Ie}-bottom`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-tab + ${Ie}-tab`]:{marginRight:{_skip_check_:!0,value:Ve},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Ie}-dropdown-rtl`]:{direction:"rtl"},[`${Ie}-menu-item`]:{[`${Ie}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},xn=_e=>{const{componentCls:Ie,tabsCardPadding:Ae,cardHeight:Be,cardGutter:Ve,itemHoverColor:lt,itemActiveColor:Bt,colorBorderSecondary:bt}=_e;return{[Ie]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Wr.Wf)(_e)),{display:"flex",[`> ${Ie}-nav, > div > ${Ie}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Ie}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${_e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Ie}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${_e.motionDurationSlow}`},[`${Ie}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Ie}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Ie}-nav-more`]:{position:"relative",padding:Ae,background:"transparent",border:0,color:_e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:_e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Ie}-nav-add`]:Object.assign({minWidth:Be,marginLeft:{_skip_check_:!0,value:Ve},padding:`0 ${_e.paddingXS}px`,background:"transparent",border:`${_e.lineWidth}px ${_e.lineType} ${bt}`,borderRadius:`${_e.borderRadiusLG}px ${_e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:_e.colorText,transition:`all ${_e.motionDurationSlow} ${_e.motionEaseInOut}`,"&:hover":{color:lt},"&:active, &:focus:not(:focus-visible)":{color:Bt}},(0,Wr.Qy)(_e))},[`${Ie}-extra-content`]:{flex:"none"},[`${Ie}-ink-bar`]:{position:"absolute",background:_e.inkBarColor,pointerEvents:"none"}}),yn(_e)),{[`${Ie}-content`]:{position:"relative",width:"100%"},[`${Ie}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Ie}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Ie}-centered`]:{[`> ${Ie}-nav, > div > ${Ie}-nav`]:{[`${Ie}-nav-wrap`]:{[`&:not([class*='${Ie}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var sn=(0,Vr.Z)("Tabs",_e=>{const Ie=(0,ei.TS)(_e,{tabsCardPadding:_e.cardPadding||`${(_e.cardHeight-Math.round(_e.fontSize*_e.lineHeight))/2-_e.lineWidth}px ${_e.padding}px`,dropdownEdgeChildVerticalPadding:_e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${_e.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${_e.horizontalItemGutter}px`});return[_n(Ie),pn(Ie),It(Ie),qr(Ie),Ur(Ie),xn(Ie),xr(Ie)]},_e=>{const Ie=_e.controlHeightLG;return{zIndexPopup:_e.zIndexPopupBase+50,cardBg:_e.colorFillAlter,cardHeight:Ie,cardPadding:"",cardPaddingSM:`${_e.paddingXXS*1.5}px ${_e.padding}px`,cardPaddingLG:`${_e.paddingXS}px ${_e.padding}px ${_e.paddingXXS*1.5}px`,titleFontSize:_e.fontSize,titleFontSizeLG:_e.fontSizeLG,titleFontSizeSM:_e.fontSize,inkBarColor:_e.colorPrimary,horizontalMargin:`0 0 ${_e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${_e.paddingSM}px 0`,horizontalItemPaddingSM:`${_e.paddingXS}px 0`,horizontalItemPaddingLG:`${_e.padding}px 0`,verticalItemPadding:`${_e.paddingXS}px ${_e.paddingLG}px`,verticalItemMargin:`${_e.margin}px 0 0 0`,itemColor:_e.colorText,itemSelectedColor:_e.colorPrimary,itemHoverColor:_e.colorPrimaryHover,itemActiveColor:_e.colorPrimaryActive,cardGutter:_e.marginXXS/2}}),dn=function(_e,Ie){var Ae={};for(var Be in _e)Object.prototype.hasOwnProperty.call(_e,Be)&&Ie.indexOf(Be)<0&&(Ae[Be]=_e[Be]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Be=Object.getOwnPropertySymbols(_e);Ve<Be.length;Ve++)Ie.indexOf(Be[Ve])<0&&Object.prototype.propertyIsEnumerable.call(_e,Be[Ve])&&(Ae[Be[Ve]]=_e[Be[Ve]]);return Ae};const $n=_e=>{const{type:Ie,className:Ae,rootClassName:Be,size:Ve,onEdit:lt,hideAdd:Bt,centered:bt,addIcon:zt,popupClassName:tn,children:cn,items:on,animated:_t,style:Yt,indicatorSize:Dn}=_e,Cn=dn(_e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:gn,moreIcon:Mn=Le.createElement(We.Z,null)}=Cn,{direction:Fn,tabs:un,getPrefixCls:Zn,getPopupContainer:et}=Le.useContext(Nt.E_),Tt=Zn("tabs",gn),[$t,Jt]=sn(Tt);let Ot;Ie==="editable-card"&&(Ot={onEdit:(Hn,jn)=>{let{key:rr,event:cr}=jn;lt==null||lt(Hn==="add"?cr:rr,Hn)},removeIcon:Le.createElement(be.Z,null),addIcon:zt||Le.createElement(Fe.Z,null),showAdd:Bt!==!0});const Zt=Zn(),Wt=zr(on,cn),nn=ar(Tt,_t),bn=(0,Pn.Z)(Ve),Ln=Object.assign(Object.assign({},un==null?void 0:un.style),Yt);return $t(Le.createElement(wt,Object.assign({direction:Fn,getPopupContainer:et,moreTransitionName:`${Zt}-slide-up`},Cn,{items:Wt,className:xe()({[`${Tt}-${bn}`]:bn,[`${Tt}-card`]:["card","editable-card"].includes(Ie),[`${Tt}-editable-card`]:Ie==="editable-card",[`${Tt}-centered`]:bt},un==null?void 0:un.className,Ae,Be,Jt),popupClassName:xe()(tn,Jt),style:Ln,editable:Ot,moreIcon:Mn,prefixCls:Tt,animated:nn,indicatorSize:Dn!=null?Dn:un==null?void 0:un.indicatorSize})))};$n.TabPane=Tn;var nt=$n},99498:function(wn,qt,ce){(function(be){be(ce(89780))})(function(be){be.defineOption("placeholder","",function(we,Ee,Oe){var it=Oe&&Oe!=be.Init;if(Ee&&!it)we.on("blur",xe),we.on("change",ke),we.on("swapDoc",ke),be.on(we.getInputField(),"compositionupdate",we.state.placeholderCompose=function(){ft(we)}),ke(we);else if(!Ee&&it){we.off("blur",xe),we.off("change",ke),we.off("swapDoc",ke),be.off(we.getInputField(),"compositionupdate",we.state.placeholderCompose),We(we);var Le=we.getWrapperElement();Le.className=Le.className.replace(" CodeMirror-empty","")}Ee&&!we.hasFocus()&&xe(we)});function We(we){we.state.placeholder&&(we.state.placeholder.parentNode.removeChild(we.state.placeholder),we.state.placeholder=null)}function Fe(we){We(we);var Ee=we.state.placeholder=document.createElement("pre");Ee.style.cssText="height: 0; overflow: visible",Ee.style.direction=we.getOption("direction"),Ee.className="CodeMirror-placeholder CodeMirror-line-like";var Oe=we.getOption("placeholder");typeof Oe=="string"&&(Oe=document.createTextNode(Oe)),Ee.appendChild(Oe),we.display.lineSpace.insertBefore(Ee,we.display.lineSpace.firstChild)}function ft(we){setTimeout(function(){var Ee=!1,Oe=we.getInputField();Oe.nodeName=="TEXTAREA"?Ee=!Oe.value:we.lineCount()==1&&(Ee=!/[^\u200b]/.test(Oe.querySelector(".CodeMirror-line").textContent)),Ee?Fe(we):We(we)},20)}function xe(we){Te(we)&&Fe(we)}function ke(we){var Ee=we.getWrapperElement(),Oe=Te(we);Ee.className=Ee.className.replace(" CodeMirror-empty","")+(Oe?" CodeMirror-empty":""),Oe?Fe(we):We(we)}function Te(we){return we.lineCount()===1&&we.getLine(0)===""}})},25717:function(wn,qt,ce){(function(be){be(ce(89780))})(function(be){var We={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=be.Pos;be.defineOption("autoCloseBrackets",!1,function(Qe,at,tt){tt&&tt!=be.Init&&(Qe.removeKeyMap(xe),Qe.state.closeBrackets=null),at&&(ke(ft(at,"pairs")),Qe.state.closeBrackets=at,Qe.addKeyMap(xe))});function ft(Qe,at){return at=="pairs"&&typeof Qe=="string"?Qe:typeof Qe=="object"&&Qe[at]!=null?Qe[at]:We[at]}var xe={Backspace:Ee,Enter:Oe};function ke(Qe){for(var at=0;at<Qe.length;at++){var tt=Qe.charAt(at),pt="'"+tt+"'";xe[pt]||(xe[pt]=Te(tt))}}ke(We.pairs+"`");function Te(Qe){return function(at){return Le(at,Qe)}}function we(Qe){var at=Qe.state.closeBrackets;if(!at||at.override)return at;var tt=Qe.getModeAt(Qe.getCursor());return tt.closeBrackets||at}function Ee(Qe){var at=we(Qe);if(!at||Qe.getOption("disableInput"))return be.Pass;for(var tt=ft(at,"pairs"),pt=Qe.listSelections(),Lt=0;Lt<pt.length;Lt++){if(!pt[Lt].empty())return be.Pass;var Ue=ze(Qe,pt[Lt].head);if(!Ue||tt.indexOf(Ue)%2!=0)return be.Pass}for(var Lt=pt.length-1;Lt>=0;Lt--){var Xe=pt[Lt].head;Qe.replaceRange("",Fe(Xe.line,Xe.ch-1),Fe(Xe.line,Xe.ch+1),"+delete")}}function Oe(Qe){var at=we(Qe),tt=at&&ft(at,"explode");if(!tt||Qe.getOption("disableInput"))return be.Pass;for(var pt=Qe.listSelections(),Lt=0;Lt<pt.length;Lt++){if(!pt[Lt].empty())return be.Pass;var Ue=ze(Qe,pt[Lt].head);if(!Ue||tt.indexOf(Ue)%2!=0)return be.Pass}Qe.operation(function(){var Xe=Qe.lineSeparator()||`
|
|
|
`;Qe.replaceSelection(Xe+Xe,null),Qe.execCommand("goCharLeft"),pt=Qe.listSelections();for(var He=0;He<pt.length;He++){var Se=pt[He].head.line;Qe.indentLine(Se,null,!0),Qe.indentLine(Se+1,null,!0)}})}function it(Qe){var at=be.cmpPos(Qe.anchor,Qe.head)>0;return{anchor:new Fe(Qe.anchor.line,Qe.anchor.ch+(at?-1:1)),head:new Fe(Qe.head.line,Qe.head.ch+(at?1:-1))}}function Le(Qe,at){var tt=we(Qe);if(!tt||Qe.getOption("disableInput"))return be.Pass;var pt=ft(tt,"pairs"),Lt=pt.indexOf(at);if(Lt==-1)return be.Pass;for(var Ue=ft(tt,"closeBefore"),Xe=ft(tt,"triples"),He=pt.charAt(Lt+1)==at,Se=Qe.listSelections(),Ke=Lt%2==0,Ze,gt=0;gt<Se.length;gt++){var je=Se[gt],St=je.head,ot,Et=Qe.getRange(St,Fe(St.line,St.ch+1));if(Ke&&!je.empty())ot="surround";else if((He||!Ke)&&Et==at)He&&st(Qe,St)?ot="both":Xe.indexOf(at)>=0&&Qe.getRange(St,Fe(St.line,St.ch+3))==at+at+at?ot="skipThree":ot="skip";else if(He&&St.ch>1&&Xe.indexOf(at)>=0&&Qe.getRange(Fe(St.line,St.ch-2),St)==at+at){if(St.ch>2&&/\bstring/.test(Qe.getTokenTypeAt(Fe(St.line,St.ch-2))))return be.Pass;ot="addFour"}else if(He){var Ge=St.ch==0?" ":Qe.getRange(Fe(St.line,St.ch-1),St);if(!be.isWordChar(Et)&&Ge!=at&&!be.isWordChar(Ge))ot="both";else return be.Pass}else if(Ke&&(Et.length===0||/\s/.test(Et)||Ue.indexOf(Et)>-1))ot="both";else return be.Pass;if(!Ze)Ze=ot;else if(Ze!=ot)return be.Pass}var Dt=Lt%2?pt.charAt(Lt-1):at,rt=Lt%2?at:pt.charAt(Lt+1);Qe.operation(function(){if(Ze=="skip")Qe.execCommand("goCharRight");else if(Ze=="skipThree")for(var yt=0;yt<3;yt++)Qe.execCommand("goCharRight");else if(Ze=="surround"){for(var Ct=Qe.getSelections(),yt=0;yt<Ct.length;yt++)Ct[yt]=Dt+Ct[yt]+rt;Qe.replaceSelections(Ct,"around"),Ct=Qe.listSelections().slice();for(var yt=0;yt<Ct.length;yt++)Ct[yt]=it(Ct[yt]);Qe.setSelections(Ct)}else Ze=="both"?(Qe.replaceSelection(Dt+rt,null),Qe.triggerElectric(Dt+rt),Qe.execCommand("goCharLeft")):Ze=="addFour"&&(Qe.replaceSelection(Dt+Dt+Dt+Dt,"before"),Qe.execCommand("goCharRight"))})}function ze(Qe,at){var tt=Qe.getRange(Fe(at.line,at.ch-1),Fe(at.line,at.ch+1));return tt.length==2?tt:null}function st(Qe,at){var tt=Qe.getTokenAt(Fe(at.line,at.ch+1));return/\bstring/.test(tt.type)&&tt.start==at.ch&&(at.ch==0||!/\bstring/.test(Qe.getTokenTypeAt(at)))}})},6313:function(wn,qt,ce){(function(be){be(ce(89780),ce(32855))})(function(be){be.defineOption("autoCloseTags",!1,function(Ee,Oe,it){if(it!=be.Init&&it&&Ee.removeKeyMap("autoCloseTags"),!!Oe){var Le={name:"autoCloseTags"};(typeof Oe!="object"||Oe.whenClosing!==!1)&&(Le["'/'"]=function(ze){return ke(ze)}),(typeof Oe!="object"||Oe.whenOpening!==!1)&&(Le["'>'"]=function(ze){return ft(ze)}),Ee.addKeyMap(Le)}});var We=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Fe=["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 ft(Ee){if(Ee.getOption("disableInput"))return be.Pass;for(var Oe=Ee.listSelections(),it=[],Le=Ee.getOption("autoCloseTags"),ze=0;ze<Oe.length;ze++){if(!Oe[ze].empty())return be.Pass;var st=Oe[ze].head,Qe=Ee.getTokenAt(st),at=be.innerMode(Ee.getMode(),Qe.state),tt=at.state,pt=at.mode.xmlCurrentTag&&at.mode.xmlCurrentTag(tt),Lt=pt&&pt.name;if(!Lt)return be.Pass;var Ue=at.mode.configuration=="html",Xe=typeof Le=="object"&&Le.dontCloseTags||Ue&&We,He=typeof Le=="object"&&Le.indentTags||Ue&&Fe;Qe.end>st.ch&&(Lt=Lt.slice(0,Lt.length-Qe.end+st.ch));var Se=Lt.toLowerCase();if(!Lt||Qe.type=="string"&&(Qe.end!=st.ch||!/[\"\']/.test(Qe.string.charAt(Qe.string.length-1))||Qe.string.length==1)||Qe.type=="tag"&&pt.close||Qe.string.indexOf("/")==st.ch-Qe.start-1||Xe&&Te(Xe,Se)>-1||we(Ee,at.mode.xmlCurrentContext&&at.mode.xmlCurrentContext(tt)||[],Lt,st,!0))return be.Pass;var Ke=typeof Le=="object"&&Le.emptyTags;if(Ke&&Te(Ke,Lt)>-1){it[ze]={text:"/>",newPos:be.Pos(st.line,st.ch+2)};continue}var Ze=He&&Te(He,Se)>-1;it[ze]={indent:Ze,text:">"+(Ze?`
|
|
|
|
|
|
`:"")+"</"+Lt+">",newPos:Ze?be.Pos(st.line+1,0):be.Pos(st.line,st.ch+1)}}for(var gt=typeof Le=="object"&&Le.dontIndentOnAutoClose,ze=Oe.length-1;ze>=0;ze--){var je=it[ze];Ee.replaceRange(je.text,Oe[ze].head,Oe[ze].anchor,"+insert");var St=Ee.listSelections().slice(0);St[ze]={head:je.newPos,anchor:je.newPos},Ee.setSelections(St),!gt&&je.indent&&(Ee.indentLine(je.newPos.line,null,!0),Ee.indentLine(je.newPos.line+1,null,!0))}}function xe(Ee,Oe){for(var it=Ee.listSelections(),Le=[],ze=Oe?"/":"</",st=Ee.getOption("autoCloseTags"),Qe=typeof st=="object"&&st.dontIndentOnSlash,at=0;at<it.length;at++){if(!it[at].empty())return be.Pass;var tt=it[at].head,pt=Ee.getTokenAt(tt),Lt=be.innerMode(Ee.getMode(),pt.state),Ue=Lt.state;if(Oe&&(pt.type=="string"||pt.string.charAt(0)!="<"||pt.start!=tt.ch-1))return be.Pass;var Xe,He=Lt.mode.name!="xml"&&Ee.getMode().name=="htmlmixed";if(He&&Lt.mode.name=="javascript")Xe=ze+"script";else if(He&&Lt.mode.name=="css")Xe=ze+"style";else{var Se=Lt.mode.xmlCurrentContext&&Lt.mode.xmlCurrentContext(Ue);if(!Se||Se.length&&we(Ee,Se,Se[Se.length-1],tt))return be.Pass;Xe=ze+Se[Se.length-1]}Ee.getLine(tt.line).charAt(pt.end)!=">"&&(Xe+=">"),Le[at]=Xe}if(Ee.replaceSelections(Le),it=Ee.listSelections(),!Qe)for(var at=0;at<it.length;at++)(at==it.length-1||it[at].head.line<it[at+1].head.line)&&Ee.indentLine(it[at].head.line)}function ke(Ee){return Ee.getOption("disableInput")?be.Pass:xe(Ee,!0)}be.commands.closeTag=function(Ee){return xe(Ee)};function Te(Ee,Oe){if(Ee.indexOf)return Ee.indexOf(Oe);for(var it=0,Le=Ee.length;it<Le;++it)if(Ee[it]==Oe)return it;return-1}function we(Ee,Oe,it,Le,ze){if(!be.scanForClosingTag)return!1;var st=Math.min(Ee.lastLine()+1,Le.line+500),Qe=be.scanForClosingTag(Ee,Le,null,st);if(!Qe||Qe.tag!=it)return!1;for(var at=ze?1:0,tt=Oe.length-1;tt>=0&&Oe[tt]==it;tt--)++at;Le=Qe.to;for(var tt=1;tt<at;tt++){var pt=be.scanForClosingTag(Ee,Le,null,st);if(!pt||pt.tag!=it)return!1;Le=pt.to}return!0}})},32855:function(wn,qt,ce){(function(be){be(ce(89780))})(function(be){"use strict";var We=be.Pos;function Fe(tt,pt){return tt.line-pt.line||tt.ch-pt.ch}var ft="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=ft+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ke=new RegExp("<(/?)(["+ft+"]["+xe+"]*)","g");function Te(tt,pt,Lt,Ue){this.line=pt,this.ch=Lt,this.cm=tt,this.text=tt.getLine(pt),this.min=Ue?Math.max(Ue.from,tt.firstLine()):tt.firstLine(),this.max=Ue?Math.min(Ue.to-1,tt.lastLine()):tt.lastLine()}function we(tt,pt){var Lt=tt.cm.getTokenTypeAt(We(tt.line,pt));return Lt&&/\btag\b/.test(Lt)}function Ee(tt){if(!(tt.line>=tt.max))return tt.ch=0,tt.text=tt.cm.getLine(++tt.line),!0}function Oe(tt){if(!(tt.line<=tt.min))return tt.text=tt.cm.getLine(--tt.line),tt.ch=tt.text.length,!0}function it(tt){for(;;){var pt=tt.text.indexOf(">",tt.ch);if(pt==-1){if(Ee(tt))continue;return}if(!we(tt,pt+1)){tt.ch=pt+1;continue}var Lt=tt.text.lastIndexOf("/",pt),Ue=Lt>-1&&!/\S/.test(tt.text.slice(Lt+1,pt));return tt.ch=pt+1,Ue?"selfClose":"regular"}}function Le(tt){for(;;){var pt=tt.ch?tt.text.lastIndexOf("<",tt.ch-1):-1;if(pt==-1){if(Oe(tt))continue;return}if(!we(tt,pt+1)){tt.ch=pt;continue}ke.lastIndex=pt,tt.ch=pt;var Lt=ke.exec(tt.text);if(Lt&&Lt.index==pt)return Lt}}function ze(tt){for(;;){ke.lastIndex=tt.ch;var pt=ke.exec(tt.text);if(!pt){if(Ee(tt))continue;return}if(!we(tt,pt.index+1)){tt.ch=pt.index+1;continue}return tt.ch=pt.index+pt[0].length,pt}}function st(tt){for(;;){var pt=tt.ch?tt.text.lastIndexOf(">",tt.ch-1):-1;if(pt==-1){if(Oe(tt))continue;return}if(!we(tt,pt+1)){tt.ch=pt;continue}var Lt=tt.text.lastIndexOf("/",pt),Ue=Lt>-1&&!/\S/.test(tt.text.slice(Lt+1,pt));return tt.ch=pt+1,Ue?"selfClose":"regular"}}function Qe(tt,pt){for(var Lt=[];;){var Ue=ze(tt),Xe,He=tt.line,Se=tt.ch-(Ue?Ue[0].length:0);if(!Ue||!(Xe=it(tt)))return;if(Xe!="selfClose")if(Ue[1]){for(var Ke=Lt.length-1;Ke>=0;--Ke)if(Lt[Ke]==Ue[2]){Lt.length=Ke;break}if(Ke<0&&(!pt||pt==Ue[2]))return{tag:Ue[2],from:We(He,Se),to:We(tt.line,tt.ch)}}else Lt.push(Ue[2])}}function at(tt,pt){for(var Lt=[];;){var Ue=st(tt);if(!Ue)return;if(Ue=="selfClose"){Le(tt);continue}var Xe=tt.line,He=tt.ch,Se=Le(tt);if(!Se)return;if(Se[1])Lt.push(Se[2]);else{for(var Ke=Lt.length-1;Ke>=0;--Ke)if(Lt[Ke]==Se[2]){Lt.length=Ke;break}if(Ke<0&&(!pt||pt==Se[2]))return{tag:Se[2],from:We(tt.line,tt.ch),to:We(Xe,He)}}}}be.registerHelper("fold","xml",function(tt,pt){for(var Lt=new Te(tt,pt.line,0);;){var Ue=ze(Lt);if(!Ue||Lt.line!=pt.line)return;var Xe=it(Lt);if(!Xe)return;if(!Ue[1]&&Xe!="selfClose"){var He=We(Lt.line,Lt.ch),Se=Qe(Lt,Ue[2]);return Se&&Fe(Se.from,He)>0?{from:He,to:Se.from}:null}}}),be.findMatchingTag=function(tt,pt,Lt){var Ue=new Te(tt,pt.line,pt.ch,Lt);if(!(Ue.text.indexOf(">")==-1&&Ue.text.indexOf("<")==-1)){var Xe=it(Ue),He=Xe&&We(Ue.line,Ue.ch),Se=Xe&&Le(Ue);if(!(!Xe||!Se||Fe(Ue,pt)>0)){var Ke={from:We(Ue.line,Ue.ch),to:He,tag:Se[2]};return Xe=="selfClose"?{open:Ke,close:null,at:"open"}:Se[1]?{open:at(Ue,Se[2]),close:Ke,at:"close"}:(Ue=new Te(tt,He.line,He.ch,Lt),{open:Ke,close:Qe(Ue,Se[2]),at:"open"})}}},be.findEnclosingTag=function(tt,pt,Lt,Ue){for(var Xe=new Te(tt,pt.line,pt.ch,Lt);;){var He=at(Xe,Ue);if(!He)break;var Se=new Te(tt,pt.line,pt.ch,Lt),Ke=Qe(Se,He.tag);if(Ke)return{open:He,close:Ke}}},be.scanForClosingTag=function(tt,pt,Lt,Ue){var Xe=new Te(tt,pt.line,pt.ch,Ue?{from:0,to:Ue}:null);return Qe(Xe,Lt)}})},89780:function(wn){(function(qt,ce){wn.exports=ce()})(this,function(){"use strict";var qt=navigator.userAgent,ce=navigator.platform,be=/gecko\/\d/i.test(qt),We=/MSIE \d/.test(qt),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qt),ft=/Edge\/(\d+)/.exec(qt),xe=We||Fe||ft,ke=xe&&(We?document.documentMode||6:+(ft||Fe)[1]),Te=!ft&&/WebKit\//.test(qt),we=Te&&/Qt\/\d+\.\d+/.test(qt),Ee=!ft&&/Chrome\//.test(qt),Oe=/Opera\//.test(qt),it=/Apple Computer/.test(navigator.vendor),Le=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qt),ze=/PhantomJS/.test(qt),st=!ft&&/AppleWebKit/.test(qt)&&/Mobile\/\w+/.test(qt),Qe=/Android/.test(qt),at=st||Qe||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qt),tt=st||/Mac/.test(ce),pt=/\bCrOS\b/.test(qt),Lt=/win/i.test(ce),Ue=Oe&&qt.match(/Version\/(\d*\.\d*)/);Ue&&(Ue=Number(Ue[1])),Ue&&Ue>=15&&(Oe=!1,Te=!0);var Xe=tt&&(we||Oe&&(Ue==null||Ue<12.11)),He=be||xe&&ke>=9;function Se(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var Ke=function(x,z){var ne=x.className,te=Se(z).exec(ne);if(te){var ie=ne.slice(te.index+te[0].length);x.className=ne.slice(0,te.index)+(ie?te[1]+ie:"")}};function Ze(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function gt(x,z){return Ze(x).appendChild(z)}function je(x,z,ne,te){var ie=document.createElement(x);if(ne&&(ie.className=ne),te&&(ie.style.cssText=te),typeof z=="string")ie.appendChild(document.createTextNode(z));else if(z)for(var ue=0;ue<z.length;++ue)ie.appendChild(z[ue]);return ie}function St(x,z,ne,te){var ie=je(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var ot;document.createRange?ot=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:ot=function(x,z,ne){var te=document.body.createTextRange();try{te.moveToElementText(x.parentNode)}catch(ie){return te}return te.collapse(!0),te.moveEnd("character",ne),te.moveStart("character",z),te};function Et(x,z){if(z.nodeType==3&&(z=z.parentNode),x.contains)return x.contains(z);do if(z.nodeType==11&&(z=z.host),z==x)return!0;while(z=z.parentNode)}function Ge(){var x;try{x=document.activeElement}catch(z){x=document.body||null}for(;x&&x.shadowRoot&&x.shadowRoot.activeElement;)x=x.shadowRoot.activeElement;return x}function Dt(x,z){var ne=x.className;Se(z).test(ne)||(x.className+=(ne?" ":"")+z)}function rt(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!Se(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var yt=function(x){x.select()};st?yt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:xe&&(yt=function(x){try{x.select()}catch(z){}});function Ct(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function ct(x,z,ne){z||(z={});for(var te in x)x.hasOwnProperty(te)&&(ne!==!1||!z.hasOwnProperty(te))&&(z[te]=x[te]);return z}function Pe(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var ue=te||0,me=ie||0;;){var Me=x.indexOf(" ",ue);if(Me<0||Me>=z)return me+(z-ue);me+=Me-ue,me+=ne-me%ne,ue=Me+1}}var ye=function(){this.id=null,this.f=null,this.time=0,this.handler=Ct(this.onTimeout,this)};ye.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},ye.prototype.set=function(x,z){this.f=z;var ne=+new Date+x;(!this.id||ne<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,x),this.time=ne)};function ht(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var Vt=50,Ht={toString:function(){return"CodeMirror.Pass"}},Ye={scroll:!1},Je={origin:"*mouse"},At={origin:"+move"};function mn(x,z,ne){for(var te=0,ie=0;;){var ue=x.indexOf(" ",te);ue==-1&&(ue=x.length);var me=ue-te;if(ue==x.length||ie+me>=z)return te+Math.min(me,z-ie);if(ie+=ue-te,ie+=ne-ie%ne,te=ue+1,ie>=z)return te}}var Gt=[""];function hn(x){for(;Gt.length<=x;)Gt.push(jt(Gt)+" ");return Gt[x]}function jt(x){return x[x.length-1]}function Ft(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function Kt(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function ge(){}function se(x,z){var ne;return Object.create?ne=Object.create(x):(ge.prototype=x,ne=new ge),z&&ct(z,ne),ne}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function de(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||oe.test(x))}function fe(x,z){return z?z.source.indexOf("\\w")>-1&&de(x)?!0:z.test(x):de(x)}function le(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var $e=/[\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 dt(x){return x.charCodeAt(0)>=768&&$e.test(x)}function Rt(x,z,ne){for(;(ne<0?z>0:z<x.length)&&dt(x.charAt(z));)z+=ne;return z}function Pt(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ie=(z+ne)/2,ue=te<0?Math.ceil(ie):Math.floor(ie);if(ue==z)return x(ue)?z:ne;x(ue)?ne=ue:z=ue+te}}function Ut(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,ue=0;ue<x.length;++ue){var me=x[ue];(me.from<ne&&me.to>z||z==ne&&me.to==z)&&(te(Math.max(me.from,z),Math.min(me.to,ne),me.level==1?"rtl":"ltr",ue),ie=!0)}ie||te(z,ne,"ltr")}var Xt=null;function en(x,z,ne){var te;Xt=null;for(var ie=0;ie<x.length;++ie){var ue=x[ie];if(ue.from<z&&ue.to>z)return ie;ue.to==z&&(ue.from!=ue.to&&ne=="before"?te=ie:Xt=ie),ue.from==z&&(ue.from!=ue.to&&ne!="before"?te=ie:Xt=ie)}return te!=null?te:Xt}var ln=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne(Re){return Re<=247?x.charAt(Re):1424<=Re&&Re<=1524?"R":1536<=Re&&Re<=1785?z.charAt(Re-1536):1774<=Re&&Re<=2220?"r":8192<=Re&&Re<=8203?"w":Re==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ie=/[stwN]/,ue=/[LRr]/,me=/[Lb1n]/,Me=/[1n]/;function De(Re,mt,kt){this.level=Re,this.from=mt,this.to=kt}return function(Re,mt){var kt=mt=="ltr"?"L":"R";if(Re.length==0||mt=="ltr"&&!te.test(Re))return!1;for(var rn=Re.length,Qt=[],In=0;In<rn;++In)Qt.push(ne(Re.charCodeAt(In)));for(var Vn=0,br=kt;Vn<rn;++Vn){var Mr=Qt[Vn];Mr=="m"?Qt[Vn]=br:br=Mr}for(var Br=0,Sr=kt;Br<rn;++Br){var Pr=Qt[Br];Pr=="1"&&Sr=="r"?Qt[Br]="n":ue.test(Pr)&&(Sr=Pr,Pr=="r"&&(Qt[Br]="R"))}for(var Gr=1,Xr=Qt[0];Gr<rn-1;++Gr){var gi=Qt[Gr];gi=="+"&&Xr=="1"&&Qt[Gr+1]=="1"?Qt[Gr]="1":gi==","&&Xr==Qt[Gr+1]&&(Xr=="1"||Xr=="n")&&(Qt[Gr]=Xr),Xr=gi}for(var Gi=0;Gi<rn;++Gi){var Fa=Qt[Gi];if(Fa==",")Qt[Gi]="N";else if(Fa=="%"){var ua=void 0;for(ua=Gi+1;ua<rn&&Qt[ua]=="%";++ua);for(var uo=Gi&&Qt[Gi-1]=="!"||ua<rn&&Qt[ua]=="1"?"1":"N",co=Gi;co<ua;++co)Qt[co]=uo;Gi=ua-1}}for(var Ea=0,ho=kt;Ea<rn;++Ea){var li=Qt[Ea];ho=="L"&&li=="1"?Qt[Ea]="L":ue.test(li)&&(ho=li)}for(var fa=0;fa<rn;++fa)if(ie.test(Qt[fa])){var ca=void 0;for(ca=fa+1;ca<rn&&ie.test(Qt[ca]);++ca);for(var pa=(fa?Qt[fa-1]:kt)=="L",ba=(ca<rn?Qt[ca]:kt)=="L",fl=pa==ba?pa?"L":"R":kt,go=fa;go<ca;++go)Qt[go]=fl;fa=ca-1}for(var Za=[],Bi,Ta=0;Ta<rn;)if(me.test(Qt[Ta])){var ac=Ta;for(++Ta;Ta<rn&&me.test(Qt[Ta]);++Ta);Za.push(new De(0,ac,Ta))}else{var ys=Ta,Rs=Za.length,Yo=mt=="rtl"?1:0;for(++Ta;Ta<rn&&Qt[Ta]!="L";++Ta);for(var Ma=ys;Ma<Ta;)if(Me.test(Qt[Ma])){ys<Ma&&(Za.splice(Rs,0,new De(1,ys,Ma)),Rs+=Yo);var pl=Ma;for(++Ma;Ma<Ta&&Me.test(Qt[Ma]);++Ma);Za.splice(Rs,0,new De(2,pl,Ma)),Rs+=Yo,ys=Ma}else++Ma;ys<Ta&&Za.splice(Rs,0,new De(1,ys,Ta))}return mt=="ltr"&&(Za[0].level==1&&(Bi=Re.match(/^\s+/))&&(Za[0].from=Bi[0].length,Za.unshift(new De(0,0,Bi[0].length))),jt(Za).level==1&&(Bi=Re.match(/\s+$/))&&(jt(Za).to-=Bi[0].length,Za.push(new De(0,rn-Bi[0].length,rn)))),mt=="rtl"?Za.reverse():Za}}();function Sn(x,z){var ne=x.order;return ne==null&&(ne=x.order=ln(x.text,z)),ne}var xt=[],an=function(x,z,ne){if(x.addEventListener)x.addEventListener(z,ne,!1);else if(x.attachEvent)x.attachEvent("on"+z,ne);else{var te=x._handlers||(x._handlers={});te[z]=(te[z]||xt).concat(ne)}};function On(x,z){return x._handlers&&x._handlers[z]||xt}function ut(x,z,ne){if(x.removeEventListener)x.removeEventListener(z,ne,!1);else if(x.detachEvent)x.detachEvent("on"+z,ne);else{var te=x._handlers,ie=te&&te[z];if(ie){var ue=ht(ie,ne);ue>-1&&(te[z]=ie.slice(0,ue).concat(ie.slice(ue+1)))}}}function wt(x,z){var ne=On(x,z);if(ne.length)for(var te=Array.prototype.slice.call(arguments,2),ie=0;ie<ne.length;++ie)ne[ie].apply(null,te)}function Nt(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),wt(x,ne||z.type,x,z),ar(z)||z.codemirrorIgnore}function Pn(x){var z=x._handlers&&x._handlers.cursorActivity;if(z)for(var ne=x.curOp.cursorActivityHandlers||(x.curOp.cursorActivityHandlers=[]),te=0;te<z.length;++te)ht(ne,z[te])==-1&&ne.push(z[te])}function Bn(x,z){return On(x,z).length>0}function Tn(x){x.prototype.on=function(z,ne){an(this,z,ne)},x.prototype.off=function(z,ne){ut(this,z,ne)}}function nr(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function mr(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function ar(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Er(x){nr(x),mr(x)}function _r(x){return x.target||x.srcElement}function Jn(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),tt&&x.ctrlKey&&z==1&&(z=3),z}var zr=function(){if(xe&&ke<9)return!1;var x=je("div");return"draggable"in x||"dragDrop"in x}(),Wr;function Vr(x){if(Wr==null){var z=je("span","\u200B");gt(x,je("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(Wr=z.offsetWidth<=1&&z.offsetHeight>2&&!(xe&&ke<8))}var ne=Wr?je("span","\u200B"):je("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var ei;function Tr(x){if(ei!=null)return ei;var z=gt(x,document.createTextNode("A\u062EA")),ne=ot(z,0,1).getBoundingClientRect(),te=ot(z,1,2).getBoundingClientRect();return Ze(x),!ne||ne.left==ne.right?!1:ei=te.right-ne.right<3}var Yr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(x){for(var z=0,ne=[],te=x.length;z<=te;){var ie=x.indexOf(`
|
|
|
`,z);ie==-1&&(ie=x.length);var ue=x.slice(z,x.charAt(ie-1)=="\r"?ie-1:ie),me=ue.indexOf("\r");me!=-1?(ne.push(ue.slice(0,me)),z+=me+1):(ne.push(ue),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},xr=window.getSelection?function(x){try{return x.selectionStart!=x.selectionEnd}catch(z){return!1}}:function(x){var z;try{z=x.ownerDocument.selection.createRange()}catch(ne){}return!z||z.parentElement()!=x?!1:z.compareEndPoints("StartToEnd",z)!=0},Ur=function(){var x=je("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),qr=null;function It(x){if(qr!=null)return qr;var z=gt(x,je("span","x")),ne=z.getBoundingClientRect(),te=ot(z,0,1).getBoundingClientRect();return qr=Math.abs(ne.left-te.left)>1}var _n={},yn={};function pn(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),_n[x]=z}function xn(x,z){yn[x]=z}function sn(x){if(typeof x=="string"&&yn.hasOwnProperty(x))x=yn[x];else if(x&&typeof x.name=="string"&&yn.hasOwnProperty(x.name)){var z=yn[x.name];typeof z=="string"&&(z={name:z}),x=se(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return sn("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return sn("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function dn(x,z){z=sn(z);var ne=_n[z.name];if(!ne)return dn(x,"text/plain");var te=ne(x,z);if($n.hasOwnProperty(z.name)){var ie=$n[z.name];for(var ue in ie)ie.hasOwnProperty(ue)&&(te.hasOwnProperty(ue)&&(te["_"+ue]=te[ue]),te[ue]=ie[ue])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var me in z.modeProps)te[me]=z.modeProps[me];return te}var $n={};function nt(x,z){var ne=$n.hasOwnProperty(x)?$n[x]:$n[x]={};ct(z,ne)}function _e(x,z){if(z===!0)return z;if(x.copyState)return x.copyState(z);var ne={};for(var te in z){var ie=z[te];ie instanceof Array&&(ie=ie.concat([])),ne[te]=ie}return ne}function Ie(x,z){for(var ne;x.innerMode&&(ne=x.innerMode(z),!(!ne||ne.mode==x));)z=ne.state,x=ne.mode;return ne||{mode:x,state:z}}function Ae(x,z,ne){return x.startState?x.startState(z,ne):!0}var Be=function(x,z,ne){this.pos=this.start=0,this.string=x,this.tabSize=z||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ne};Be.prototype.eol=function(){return this.pos>=this.string.length},Be.prototype.sol=function(){return this.pos==this.lineStart},Be.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Be.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Be.prototype.eat=function(x){var z=this.string.charAt(this.pos),ne;if(typeof x=="string"?ne=z==x:ne=z&&(x.test?x.test(z):x(z)),ne)return++this.pos,z},Be.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},Be.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},Be.prototype.skipToEnd=function(){this.pos=this.string.length},Be.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},Be.prototype.backUp=function(x){this.pos-=x},Be.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},Be.prototype.indentation=function(){return Pe(this.string,null,this.tabSize)-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},Be.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(me){return ne?me.toLowerCase():me},ie=this.string.substr(this.pos,x.length);if(te(ie)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var ue=this.string.slice(this.pos).match(x);return ue&&ue.index>0?null:(ue&&z!==!1&&(this.pos+=ue[0].length),ue)}},Be.prototype.current=function(){return this.string.slice(this.start,this.pos)},Be.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},Be.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},Be.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function Ve(x,z){if(z-=x.first,z<0||z>=x.size)throw new Error("There is no line "+(z+x.first)+" in the document.");for(var ne=x;!ne.lines;)for(var te=0;;++te){var ie=ne.children[te],ue=ie.chunkSize();if(z<ue){ne=ie;break}z-=ue}return ne.lines[z]}function lt(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(ue){var me=ue.text;ie==ne.line&&(me=me.slice(0,ne.ch)),ie==z.line&&(me=me.slice(z.ch)),te.push(me),++ie}),te}function Bt(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function bt(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function zt(x){if(x.parent==null)return null;for(var z=x.parent,ne=ht(z.lines,x),te=z.parent;te;z=te,te=te.parent)for(var ie=0;te.children[ie]!=z;++ie)ne+=te.children[ie].chunkSize();return ne+z.first}function tn(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ie=x.children[te],ue=ie.height;if(z<ue){x=ie;continue e}z-=ue,ne+=ie.chunkSize()}return ne}while(!x.lines);for(var me=0;me<x.lines.length;++me){var Me=x.lines[me],De=Me.height;if(z<De)break;z-=De}return ne+me}function cn(x,z){return z>=x.first&&z<x.first+x.size}function on(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function _t(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof _t))return new _t(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function Yt(x,z){return x.line-z.line||x.ch-z.ch}function Dn(x,z){return x.sticky==z.sticky&&Yt(x,z)==0}function Cn(x){return _t(x.line,x.ch)}function gn(x,z){return Yt(x,z)<0?z:x}function Mn(x,z){return Yt(x,z)<0?x:z}function Fn(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function un(x,z){if(z.line<x.first)return _t(x.first,0);var ne=x.first+x.size-1;return z.line>ne?_t(ne,Ve(x,ne).text.length):Zn(z,Ve(x,z.line).text.length)}function Zn(x,z){var ne=x.ch;return ne==null||ne>z?_t(x.line,z):ne<0?_t(x.line,0):x}function et(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=un(x,z[te]);return ne}var Tt=function(x,z){this.state=x,this.lookAhead=z},$t=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};$t.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},$t.prototype.baseToken=function(x){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=x;)this.baseTokenPos+=2;var z=this.baseTokens[this.baseTokenPos+1];return{type:z&&z.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-x}},$t.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},$t.fromSaved=function(x,z,ne){return z instanceof Tt?new $t(x,_e(x.mode,z.state),ne,z.lookAhead):new $t(x,_e(x.mode,z),ne)},$t.prototype.save=function(x){var z=x!==!1?_e(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Tt(z,this.maxLookAhead):z};function Jt(x,z,ne,te){var ie=[x.state.modeGen],ue={};rr(x,z.text,x.doc.mode,ne,function(Re,mt){return ie.push(Re,mt)},ue,te);for(var me=ne.state,Me=function(Re){ne.baseTokens=ie;var mt=x.state.overlays[Re],kt=1,rn=0;ne.state=!0,rr(x,z.text,mt.mode,ne,function(Qt,In){for(var Vn=kt;rn<Qt;){var br=ie[kt];br>Qt&&ie.splice(kt,1,Qt,ie[kt+1],br),kt+=2,rn=Math.min(Qt,br)}if(In)if(mt.opaque)ie.splice(Vn,kt-Vn,Qt,"overlay "+In),kt=Vn+2;else for(;Vn<kt;Vn+=2){var Mr=ie[Vn+1];ie[Vn+1]=(Mr?Mr+" ":"")+"overlay "+In}},ue),ne.state=me,ne.baseTokens=null,ne.baseTokenPos=1},De=0;De<x.state.overlays.length;++De)Me(De);return{styles:ie,classes:ue.bgClass||ue.textClass?ue:null}}function Ot(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=Zt(x,zt(z)),ie=z.text.length>x.options.maxHighlightLength&&_e(x.doc.mode,te.state),ue=Jt(x,z,te);ie&&(te.state=ie),z.stateAfter=te.save(!ie),z.styles=ue.styles,ue.classes?z.styleClasses=ue.classes:z.styleClasses&&(z.styleClasses=null),ne===x.doc.highlightFrontier&&(x.doc.modeFrontier=Math.max(x.doc.modeFrontier,++x.doc.highlightFrontier))}return z.styles}function Zt(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new $t(te,!0,z);var ue=cr(x,z,ne),me=ue>te.first&&Ve(te,ue-1).stateAfter,Me=me?$t.fromSaved(te,me,ue):new $t(te,Ae(te.mode),ue);return te.iter(ue,z,function(De){Wt(x,De.text,Me);var Re=Me.line;De.stateAfter=Re==z-1||Re%5==0||Re>=ie.viewFrom&&Re<ie.viewTo?Me.save():null,Me.nextLine()}),ne&&(te.modeFrontier=Me.line),Me}function Wt(x,z,ne,te){var ie=x.doc.mode,ue=new Be(z,x.options.tabSize,ne);for(ue.start=ue.pos=te||0,z==""&&nn(ie,ne.state);!ue.eol();)bn(ie,ue,ne.state),ue.start=ue.pos}function nn(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=Ie(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function bn(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=Ie(x,ne).mode);var ue=x.token(z,ne);if(z.pos>z.start)return ue}throw new Error("Mode "+x.name+" failed to advance stream.")}var Ln=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function Hn(x,z,ne,te){var ie=x.doc,ue=ie.mode,me;z=un(ie,z);var Me=Ve(ie,z.line),De=Zt(x,z.line,ne),Re=new Be(Me.text,x.options.tabSize,De),mt;for(te&&(mt=[]);(te||Re.pos<z.ch)&&!Re.eol();)Re.start=Re.pos,me=bn(ue,Re,De.state),te&&mt.push(new Ln(Re,me,_e(ie.mode,De.state)));return te?mt:new Ln(Re,me,De.state)}function jn(x,z){if(x)for(;;){var ne=x.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ne)break;x=x.slice(0,ne.index)+x.slice(ne.index+ne[0].length);var te=ne[1]?"bgClass":"textClass";z[te]==null?z[te]=ne[2]:new RegExp("(?:^|\\s)"+ne[2]+"(?:$|\\s)").test(z[te])||(z[te]+=" "+ne[2])}return x}function rr(x,z,ne,te,ie,ue,me){var Me=ne.flattenSpans;Me==null&&(Me=x.options.flattenSpans);var De=0,Re=null,mt=new Be(z,x.options.tabSize,te),kt,rn=x.options.addModeClass&&[null];for(z==""&&jn(nn(ne,te.state),ue);!mt.eol();){if(mt.pos>x.options.maxHighlightLength?(Me=!1,me&&Wt(x,z,te,mt.pos),mt.pos=z.length,kt=null):kt=jn(bn(ne,mt,te.state,rn),ue),rn){var Qt=rn[0].name;Qt&&(kt="m-"+(kt?Qt+" "+kt:Qt))}if(!Me||Re!=kt){for(;De<mt.start;)De=Math.min(mt.start,De+5e3),ie(De,Re);Re=kt}mt.start=mt.pos}for(;De<mt.pos;){var In=Math.min(mt.pos,De+5e3);ie(In,Re),De=In}}function cr(x,z,ne){for(var te,ie,ue=x.doc,me=ne?-1:z-(x.doc.mode.innerMode?1e3:100),Me=z;Me>me;--Me){if(Me<=ue.first)return ue.first;var De=Ve(ue,Me-1),Re=De.stateAfter;if(Re&&(!ne||Me+(Re instanceof Tt?Re.lookAhead:0)<=ue.modeFrontier))return Me;var mt=Pe(De.text,null,x.options.tabSize);(ie==null||te>mt)&&(ie=Me-1,te=mt)}return ie}function er(x,z){if(x.modeFrontier=Math.min(x.modeFrontier,z),!(x.highlightFrontier<z-10)){for(var ne=x.first,te=z-1;te>ne;te--){var ie=Ve(x,te).stateAfter;if(ie&&(!(ie instanceof Tt)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var vr=!1,fr=!1;function pr(){vr=!0}function Gn(){fr=!0}function sr(x,z,ne){this.marker=x,this.from=z,this.to=ne}function Xn(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function Rn(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function gr(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function kr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],me=ue.marker,Me=ue.from==null||(me.inclusiveLeft?ue.from<=z:ue.from<z);if(Me||ue.from==z&&me.type=="bookmark"&&(!ne||!ue.marker.insertLeft)){var De=ue.to==null||(me.inclusiveRight?ue.to>=z:ue.to>z);(te||(te=[])).push(new sr(me,ue.from,De?null:ue.to))}}return te}function tr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],me=ue.marker,Me=ue.to==null||(me.inclusiveRight?ue.to>=z:ue.to>z);if(Me||ue.from==z&&me.type=="bookmark"&&(!ne||ue.marker.insertLeft)){var De=ue.from==null||(me.inclusiveLeft?ue.from<=z:ue.from<z);(te||(te=[])).push(new sr(me,De?null:ue.from-z,ue.to==null?null:ue.to-z))}}return te}function kn(x,z){if(z.full)return null;var ne=cn(x,z.from.line)&&Ve(x,z.from.line).markedSpans,te=cn(x,z.to.line)&&Ve(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ue=z.to.ch,me=Yt(z.from,z.to)==0,Me=kr(ne,ie,me),De=tr(te,ue,me),Re=z.text.length==1,mt=jt(z.text).length+(Re?ie:0);if(Me)for(var kt=0;kt<Me.length;++kt){var rn=Me[kt];if(rn.to==null){var Qt=Xn(De,rn.marker);Qt?Re&&(rn.to=Qt.to==null?null:Qt.to+mt):rn.to=ie}}if(De)for(var In=0;In<De.length;++In){var Vn=De[In];if(Vn.to!=null&&(Vn.to+=mt),Vn.from==null){var br=Xn(Me,Vn.marker);br||(Vn.from=mt,Re&&(Me||(Me=[])).push(Vn))}else Vn.from+=mt,Re&&(Me||(Me=[])).push(Vn)}Me&&(Me=En(Me)),De&&De!=Me&&(De=En(De));var Mr=[Me];if(!Re){var Br=z.text.length-2,Sr;if(Br>0&&Me)for(var Pr=0;Pr<Me.length;++Pr)Me[Pr].to==null&&(Sr||(Sr=[])).push(new sr(Me[Pr].marker,null,null));for(var Gr=0;Gr<Br;++Gr)Mr.push(Sr);Mr.push(De)}return Mr}function En(x){for(var z=0;z<x.length;++z){var ne=x[z];ne.from!=null&&ne.from==ne.to&&ne.marker.clearWhenEmpty!==!1&&x.splice(z--,1)}return x.length?x:null}function dr(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(Qt){if(Qt.markedSpans)for(var In=0;In<Qt.markedSpans.length;++In){var Vn=Qt.markedSpans[In].marker;Vn.readOnly&&(!te||ht(te,Vn)==-1)&&(te||(te=[])).push(Vn)}}),!te)return null;for(var ie=[{from:z,to:ne}],ue=0;ue<te.length;++ue)for(var me=te[ue],Me=me.find(0),De=0;De<ie.length;++De){var Re=ie[De];if(!(Yt(Re.to,Me.from)<0||Yt(Re.from,Me.to)>0)){var mt=[De,1],kt=Yt(Re.from,Me.from),rn=Yt(Re.to,Me.to);(kt<0||!me.inclusiveLeft&&!kt)&&mt.push({from:Re.from,to:Me.from}),(rn>0||!me.inclusiveRight&&!rn)&&mt.push({from:Me.to,to:Re.to}),ie.splice.apply(ie,mt),De+=mt.length-3}}return ie}function qn(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function wr(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function Lr(x){return x.inclusiveLeft?-1:0}function Cr(x){return x.inclusiveRight?1:0}function Zr(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ue=Yt(te.from,ie.from)||Lr(x)-Lr(z);if(ue)return-ue;var me=Yt(te.to,ie.to)||Cr(x)-Cr(z);return me||z.id-x.id}function Or(x,z){var ne=fr&&x.markedSpans,te;if(ne)for(var ie=void 0,ue=0;ue<ne.length;++ue)ie=ne[ue],ie.marker.collapsed&&(z?ie.from:ie.to)==null&&(!te||Zr(te,ie.marker)<0)&&(te=ie.marker);return te}function ni(x){return Or(x,!0)}function ir(x){return Or(x,!1)}function lr(x,z){var ne=fr&&x.markedSpans,te;if(ne)for(var ie=0;ie<ne.length;++ie){var ue=ne[ie];ue.marker.collapsed&&(ue.from==null||ue.from<z)&&(ue.to==null||ue.to>z)&&(!te||Zr(te,ue.marker)<0)&&(te=ue.marker)}return te}function Dr(x,z,ne,te,ie){var ue=Ve(x,z),me=fr&&ue.markedSpans;if(me)for(var Me=0;Me<me.length;++Me){var De=me[Me];if(De.marker.collapsed){var Re=De.marker.find(0),mt=Yt(Re.from,ne)||Lr(De.marker)-Lr(ie),kt=Yt(Re.to,te)||Cr(De.marker)-Cr(ie);if(!(mt>=0&&kt<=0||mt<=0&&kt>=0)&&(mt<=0&&(De.marker.inclusiveRight&&ie.inclusiveLeft?Yt(Re.to,ne)>=0:Yt(Re.to,ne)>0)||mt>=0&&(De.marker.inclusiveRight&&ie.inclusiveLeft?Yt(Re.from,te)<=0:Yt(Re.from,te)<0)))return!0}}}function Ar(x){for(var z;z=ni(x);)x=z.find(-1,!0).line;return x}function ui(x){for(var z;z=ir(x);)x=z.find(1,!0).line;return x}function Hi(x){for(var z,ne;z=ir(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function _i(x,z){var ne=Ve(x,z),te=Ar(ne);return ne==te?z:zt(te)}function Qr(x,z){if(z>x.lastLine())return z;var ne=Ve(x,z),te;if(!bi(x,ne))return z;for(;te=ir(ne);)ne=te.find(1,!0).line;return zt(ne)+1}function bi(x,z){var ne=fr&&z.markedSpans;if(ne){for(var te=void 0,ie=0;ie<ne.length;++ie)if(te=ne[ie],!!te.marker.collapsed){if(te.from==null)return!0;if(!te.marker.widgetNode&&te.from==0&&te.marker.inclusiveLeft&&mi(x,z,te))return!0}}}function mi(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return mi(x,te.line,Xn(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ie=void 0,ue=0;ue<z.markedSpans.length;++ue)if(ie=z.markedSpans[ue],ie.marker.collapsed&&!ie.marker.widgetNode&&ie.from==ne.to&&(ie.to==null||ie.to!=ne.from)&&(ie.marker.inclusiveLeft||ne.marker.inclusiveRight)&&mi(x,z,ie))return!0}function Yn(x){x=Ar(x);for(var z=0,ne=x.parent,te=0;te<ne.lines.length;++te){var ie=ne.lines[te];if(ie==x)break;z+=ie.height}for(var ue=ne.parent;ue;ne=ue,ue=ne.parent)for(var me=0;me<ue.children.length;++me){var Me=ue.children[me];if(Me==ne)break;z+=Me.height}return z}function Un(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=ni(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=ir(te);){var ue=ne.find(0,!0);z-=te.text.length-ue.from.ch,te=ue.to.line,z+=te.text.length-ue.to.ch}return z}function Nn(x){var z=x.display,ne=x.doc;z.maxLine=Ve(ne,ne.first),z.maxLineLength=Un(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ie=Un(te);ie>z.maxLineLength&&(z.maxLineLength=ie,z.maxLine=te)})}var Kn=function(x,z,ne){this.text=x,wr(this,z),this.height=ne?ne(this):1};Kn.prototype.lineNo=function(){return zt(this)},Tn(Kn);function Nr(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),qn(x),wr(x,ne);var ie=te?te(x):1;ie!=x.height&&bt(x,ie)}function ri(x){x.parent=null,qn(x)}var ai={},ci={};function ti(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?ci:ai;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function fi(x,z){var ne=St("span",null,null,Te?"padding-right: .1px":null),te={pre:St("pre",[ne],"CodeMirror-line"),content:ne,col:0,pos:0,cm:x,trailingSpace:!1,splitSpaces:x.getOption("lineWrapping")};z.measure={};for(var ie=0;ie<=(z.rest?z.rest.length:0);ie++){var ue=ie?z.rest[ie-1]:z.line,me=void 0;te.pos=0,te.addToken=ki,Tr(x.display.measure)&&(me=Sn(ue,x.doc.direction))&&(te.addToken=Yi(te.addToken,me)),te.map=[];var Me=z!=x.display.externalMeasured&&zt(ue);Ra(ue,te,Ot(x,ue,Me)),ue.styleClasses&&(ue.styleClasses.bgClass&&(te.bgClass=rt(ue.styleClasses.bgClass,te.bgClass||"")),ue.styleClasses.textClass&&(te.textClass=rt(ue.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(Vr(x.display.measure))),ie==0?(z.measure.map=te.map,z.measure.cache={}):((z.measure.maps||(z.measure.maps=[])).push(te.map),(z.measure.caches||(z.measure.caches=[])).push({}))}if(Te){var De=te.content.lastChild;(/\bcm-tab\b/.test(De.className)||De.querySelector&&De.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return wt(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=rt(te.pre.className,te.textClass||"")),te}function Li(x){var z=je("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function ki(x,z,ne,te,ie,ue,me){if(z){var Me=x.splitSpaces?ta(z,x.trailingSpace):z,De=x.cm.state.specialChars,Re=!1,mt;if(!De.test(z))x.col+=z.length,mt=document.createTextNode(Me),x.map.push(x.pos,x.pos+z.length,mt),xe&&ke<9&&(Re=!0),x.pos+=z.length;else{mt=document.createDocumentFragment();for(var kt=0;;){De.lastIndex=kt;var rn=De.exec(z),Qt=rn?rn.index-kt:z.length-kt;if(Qt){var In=document.createTextNode(Me.slice(kt,kt+Qt));xe&&ke<9?mt.appendChild(je("span",[In])):mt.appendChild(In),x.map.push(x.pos,x.pos+Qt,In),x.col+=Qt,x.pos+=Qt}if(!rn)break;kt+=Qt+1;var Vn=void 0;if(rn[0]==" "){var br=x.cm.options.tabSize,Mr=br-x.col%br;Vn=mt.appendChild(je("span",hn(Mr),"cm-tab")),Vn.setAttribute("role","presentation"),Vn.setAttribute("cm-text"," "),x.col+=Mr}else rn[0]=="\r"||rn[0]==`
|
|
|
`?(Vn=mt.appendChild(je("span",rn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Vn.setAttribute("cm-text",rn[0]),x.col+=1):(Vn=x.cm.options.specialCharPlaceholder(rn[0]),Vn.setAttribute("cm-text",rn[0]),xe&&ke<9?mt.appendChild(je("span",[Vn])):mt.appendChild(Vn),x.col+=1);x.map.push(x.pos,x.pos+1,Vn),x.pos++}}if(x.trailingSpace=Me.charCodeAt(z.length-1)==32,ne||te||ie||Re||ue||me){var Br=ne||"";te&&(Br+=te),ie&&(Br+=ie);var Sr=je("span",[mt],Br,ue);if(me)for(var Pr in me)me.hasOwnProperty(Pr)&&Pr!="style"&&Pr!="class"&&Sr.setAttribute(Pr,me[Pr]);return x.content.appendChild(Sr)}x.content.appendChild(mt)}}function ta(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ie=0;ie<x.length;ie++){var ue=x.charAt(ie);ue==" "&&ne&&(ie==x.length-1||x.charCodeAt(ie+1)==32)&&(ue="\xA0"),te+=ue,ne=ue==" "}return te}function Yi(x,z){return function(ne,te,ie,ue,me,Me,De){ie=ie?ie+" cm-force-border":"cm-force-border";for(var Re=ne.pos,mt=Re+te.length;;){for(var kt=void 0,rn=0;rn<z.length&&(kt=z[rn],!(kt.to>Re&&kt.from<=Re));rn++);if(kt.to>=mt)return x(ne,te,ie,ue,me,Me,De);x(ne,te.slice(0,kt.to-Re),ie,ue,null,Me,De),ue=null,te=te.slice(kt.to-Re),Re=kt.to}}}function Ii(x,z,ne,te){var ie=!te&&ne.widgetNode;ie&&x.map.push(x.pos,x.pos+z,ie),!te&&x.cm.display.input.needsContentAttribute&&(ie||(ie=x.content.appendChild(document.createElement("span"))),ie.setAttribute("cm-marker",ne.id)),ie&&(x.cm.display.input.setUneditable(ie),x.content.appendChild(ie)),x.pos+=z,x.trailingSpace=!1}function Ra(x,z,ne){var te=x.markedSpans,ie=x.text,ue=0;if(!te){for(var me=1;me<ne.length;me+=2)z.addToken(z,ie.slice(ue,ue=ne[me]),ti(ne[me+1],z.cm.options));return}for(var Me=ie.length,De=0,Re=1,mt="",kt,rn,Qt=0,In,Vn,br,Mr,Br;;){if(Qt==De){In=Vn=br=rn="",Br=null,Mr=null,Qt=1/0;for(var Sr=[],Pr=void 0,Gr=0;Gr<te.length;++Gr){var Xr=te[Gr],gi=Xr.marker;if(gi.type=="bookmark"&&Xr.from==De&&gi.widgetNode)Sr.push(gi);else if(Xr.from<=De&&(Xr.to==null||Xr.to>De||gi.collapsed&&Xr.to==De&&Xr.from==De)){if(Xr.to!=null&&Xr.to!=De&&Qt>Xr.to&&(Qt=Xr.to,Vn=""),gi.className&&(In+=" "+gi.className),gi.css&&(rn=(rn?rn+";":"")+gi.css),gi.startStyle&&Xr.from==De&&(br+=" "+gi.startStyle),gi.endStyle&&Xr.to==Qt&&(Pr||(Pr=[])).push(gi.endStyle,Xr.to),gi.title&&((Br||(Br={})).title=gi.title),gi.attributes)for(var Gi in gi.attributes)(Br||(Br={}))[Gi]=gi.attributes[Gi];gi.collapsed&&(!Mr||Zr(Mr.marker,gi)<0)&&(Mr=Xr)}else Xr.from>De&&Qt>Xr.from&&(Qt=Xr.from)}if(Pr)for(var Fa=0;Fa<Pr.length;Fa+=2)Pr[Fa+1]==Qt&&(Vn+=" "+Pr[Fa]);if(!Mr||Mr.from==De)for(var ua=0;ua<Sr.length;++ua)Ii(z,0,Sr[ua]);if(Mr&&(Mr.from||0)==De){if(Ii(z,(Mr.to==null?Me+1:Mr.to)-De,Mr.marker,Mr.from==null),Mr.to==null)return;Mr.to==De&&(Mr=!1)}}if(De>=Me)break;for(var uo=Math.min(Me,Qt);;){if(mt){var co=De+mt.length;if(!Mr){var Ea=co>uo?mt.slice(0,uo-De):mt;z.addToken(z,Ea,kt?kt+In:In,br,De+Ea.length==Qt?Vn:"",rn,Br)}if(co>=uo){mt=mt.slice(uo-De),De=uo;break}De=co,br=""}mt=ie.slice(ue,ue=ne[Re++]),kt=ti(ne[Re++],z.cm.options)}}}function na(x,z,ne){this.line=z,this.rest=Hi(z),this.size=this.rest?zt(jt(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=bi(x,z)}function va(x,z,ne){for(var te=[],ie,ue=z;ue<ne;ue=ie){var me=new na(x.doc,Ve(x.doc,ue),ue);ie=ue+me.size,te.push(me)}return te}var ra=null;function Si(x){ra?ra.ops.push(x):x.ownsGroup=ra={ops:[x],delayedCallbacks:[]}}function $r(x){var z=x.delayedCallbacks,ne=0;do{for(;ne<z.length;ne++)z[ne].call(null);for(var te=0;te<x.ops.length;te++){var ie=x.ops[te];if(ie.cursorActivityHandlers)for(;ie.cursorActivityCalled<ie.cursorActivityHandlers.length;)ie.cursorActivityHandlers[ie.cursorActivityCalled++].call(null,ie.cm)}}while(ne<z.length)}function Jr(x,z){var ne=x.ownsGroup;if(ne)try{$r(ne)}finally{ra=null,z(ne)}}var Hr=null;function Ir(x,z){var ne=On(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;ra?ie=ra.delayedCallbacks:Hr?ie=Hr:(ie=Hr=[],setTimeout(si,0));for(var ue=function(Me){ie.push(function(){return ne[Me].apply(null,te)})},me=0;me<ne.length;++me)ue(me)}}function si(){var x=Hr;Hr=null;for(var z=0;z<x.length;++z)x[z]()}function ii(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ue=z.changes[ie];ue=="text"?qi(x,z):ue=="gutter"?hi(x,z,ne,te):ue=="class"?pi(x,z):ue=="widget"&&Wi(x,z,te)}z.changes=null}function Oi(x){return x.node==x.text&&(x.node=je("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),xe&&ke<8&&(x.node.style.zIndex=2)),x.node}function Fi(x,z){var ne=z.bgClass?z.bgClass+" "+(z.line.bgClass||""):z.line.bgClass;if(ne&&(ne+=" CodeMirror-linebackground"),z.background)ne?z.background.className=ne:(z.background.parentNode.removeChild(z.background),z.background=null);else if(ne){var te=Oi(z);z.background=te.insertBefore(je("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function Ri(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):fi(x,z)}function qi(x,z){var ne=z.text.className,te=Ri(x,z);z.text==z.node&&(z.node=te.pre),z.text.parentNode.replaceChild(te.pre,z.text),z.text=te.pre,te.bgClass!=z.bgClass||te.textClass!=z.textClass?(z.bgClass=te.bgClass,z.textClass=te.textClass,pi(x,z)):ne&&(z.text.className=ne)}function pi(x,z){Fi(x,z),z.line.wrapClass?Oi(z).className=z.line.wrapClass:z.node!=z.text&&(z.node.className="");var ne=z.textClass?z.textClass+" "+(z.line.textClass||""):z.line.textClass;z.text.className=ne||""}function hi(x,z,ne,te){if(z.gutter&&(z.node.removeChild(z.gutter),z.gutter=null),z.gutterBackground&&(z.node.removeChild(z.gutterBackground),z.gutterBackground=null),z.line.gutterClass){var ie=Oi(z);z.gutterBackground=je("div",null,"CodeMirror-gutter-background "+z.line.gutterClass,"left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px; width: "+te.gutterTotalWidth+"px"),x.display.input.setUneditable(z.gutterBackground),ie.insertBefore(z.gutterBackground,z.text)}var ue=z.line.gutterMarkers;if(x.options.lineNumbers||ue){var me=Oi(z),Me=z.gutter=je("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(Me),me.insertBefore(Me,z.text),z.line.gutterClass&&(Me.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ue||!ue["CodeMirror-linenumbers"])&&(z.lineNumber=Me.appendChild(je("div",on(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),ue)for(var De=0;De<x.display.gutterSpecs.length;++De){var Re=x.display.gutterSpecs[De].className,mt=ue.hasOwnProperty(Re)&&ue[Re];mt&&Me.appendChild(je("div",[mt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[Re]+"px; width: "+te.gutterWidth[Re]+"px"))}}}function Wi(x,z,ne){z.alignable&&(z.alignable=null);for(var te=Se("CodeMirror-linewidget"),ie=z.node.firstChild,ue=void 0;ie;ie=ue)ue=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);aa(x,z,ne)}function sa(x,z,ne,te){var ie=Ri(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),pi(x,z),hi(x,z,ne,te),aa(x,z,te),z.node}function aa(x,z,ne){if(Ji(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)Ji(x,z.rest[te],z,ne,!1)}function Ji(x,z,ne,te,ie){if(z.widgets)for(var ue=Oi(ne),me=0,Me=z.widgets;me<Me.length;++me){var De=Me[me],Re=je("div",[De.node],"CodeMirror-linewidget"+(De.className?" "+De.className:""));De.handleMouseEvents||Re.setAttribute("cm-ignore-events","true"),ts(De,Re,ne,te),x.display.input.setUneditable(Re),ie&&De.above?ue.insertBefore(Re,ne.gutter||ne.text):ue.appendChild(Re),Ir(De,"redraw")}}function ts(x,z,ne,te){if(x.noHScroll){(ne.alignable||(ne.alignable=[])).push(z);var ie=te.wrapperWidth;z.style.left=te.fixedPos+"px",x.coverGutter||(ie-=te.gutterTotalWidth,z.style.paddingLeft=te.gutterTotalWidth+"px"),z.style.width=ie+"px"}x.coverGutter&&(z.style.zIndex=5,z.style.position="relative",x.noHScroll||(z.style.marginLeft=-te.gutterTotalWidth+"px"))}function ao(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!Et(document.body,x.node)){var ne="position: relative;";x.coverGutter&&(ne+="margin-left: -"+z.display.gutters.offsetWidth+"px;"),x.noHScroll&&(ne+="width: "+z.display.wrapper.clientWidth+"px;"),gt(z.display.measure,je("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function oo(x,z){for(var ne=_r(z);ne!=x.wrapper;ne=ne.parentNode)if(!ne||ne.nodeType==1&&ne.getAttribute("cm-ignore-events")=="true"||ne.parentNode==x.sizer&&ne!=x.mover)return!0}function eo(x){return x.lineSpace.offsetTop}function Ss(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function fo(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=gt(x.measure,je("pre","x","CodeMirror-line-like")),ne=window.getComputedStyle?window.getComputedStyle(z):z.currentStyle,te={left:parseInt(ne.paddingLeft),right:parseInt(ne.paddingRight)};return!isNaN(te.left)&&!isNaN(te.right)&&(x.cachedPaddingH=te),te}function _a(x){return Vt-x.display.nativeBarWidth}function da(x){return x.display.scroller.clientWidth-_a(x)-x.display.barWidth}function yo(x){return x.display.scroller.clientHeight-_a(x)-x.display.barHeight}function _o(x,z,ne){var te=x.options.lineWrapping,ie=te&&da(x);if(!z.measure.heights||te&&z.measure.width!=ie){var ue=z.measure.heights=[];if(te){z.measure.width=ie;for(var me=z.text.firstChild.getClientRects(),Me=0;Me<me.length-1;Me++){var De=me[Me],Re=me[Me+1];Math.abs(De.bottom-Re.bottom)>2&&ue.push((De.bottom+Re.top)/2-ne.top)}}ue.push(ne.bottom-ne.top)}}function ko(x,z,ne){if(x.line==z)return{map:x.measure.map,cache:x.measure.cache};for(var te=0;te<x.rest.length;te++)if(x.rest[te]==z)return{map:x.measure.maps[te],cache:x.measure.caches[te]};for(var ie=0;ie<x.rest.length;ie++)if(zt(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function ns(x,z){z=Ar(z);var ne=zt(z),te=x.display.externalMeasured=new na(x.doc,z,ne);te.lineN=ne;var ie=te.built=fi(x,te);return te.text=ie.pre,gt(x.display.lineMeasure,ie.pre),te}function $o(x,z,ne,te){return Ai(x,Pa(x,z),ne,te)}function Xa(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[po(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function Pa(x,z){var ne=zt(z),te=Xa(x,ne);te&&!te.text?te=null:te&&te.changes&&(ii(x,te,ne,Di(x)),x.curOp.forceUpdate=!0),te||(te=ns(x,z));var ie=ko(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Ai(x,z,ne,te,ie){z.before&&(ne=-1);var ue=ne+(te||""),me;return z.cache.hasOwnProperty(ue)?me=z.cache[ue]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(_o(x,z.view,z.rect),z.hasHeights=!0),me=yi(x,z,ne,te),me.bogus||(z.cache[ue]=me)),{left:me.left,right:me.right,top:ie?me.rtop:me.top,bottom:ie?me.rbottom:me.bottom}}var Do={left:0,right:0,top:0,bottom:0};function rs(x,z,ne){for(var te,ie,ue,me,Me,De,Re=0;Re<x.length;Re+=3)if(Me=x[Re],De=x[Re+1],z<Me?(ie=0,ue=1,me="left"):z<De?(ie=z-Me,ue=ie+1):(Re==x.length-3||z==De&&x[Re+3]>z)&&(ue=De-Me,ie=ue-1,z>=De&&(me="right")),ie!=null){if(te=x[Re+2],Me==De&&ne==(te.insertLeft?"left":"right")&&(me=ne),ne=="left"&&ie==0)for(;Re&&x[Re-2]==x[Re-3]&&x[Re-1].insertLeft;)te=x[(Re-=3)+2],me="left";if(ne=="right"&&ie==De-Me)for(;Re<x.length-3&&x[Re+3]==x[Re+4]&&!x[Re+5].insertLeft;)te=x[(Re+=3)+2],me="right";break}return{node:te,start:ie,end:ue,collapse:me,coverStart:Me,coverEnd:De}}function Lo(x,z){var ne=Do;if(z=="left")for(var te=0;te<x.length&&(ne=x[te]).left==ne.right;te++);else for(var ie=x.length-1;ie>=0&&(ne=x[ie]).left==ne.right;ie--);return ne}function yi(x,z,ne,te){var ie=rs(z.map,ne,te),ue=ie.node,me=ie.start,Me=ie.end,De=ie.collapse,Re;if(ue.nodeType==3){for(var mt=0;mt<4;mt++){for(;me&&dt(z.line.text.charAt(ie.coverStart+me));)--me;for(;ie.coverStart+Me<ie.coverEnd&&dt(z.line.text.charAt(ie.coverStart+Me));)++Me;if(xe&&ke<9&&me==0&&Me==ie.coverEnd-ie.coverStart?Re=ue.parentNode.getBoundingClientRect():Re=Lo(ot(ue,me,Me).getClientRects(),te),Re.left||Re.right||me==0)break;Me=me,me=me-1,De="right"}xe&&ke<11&&(Re=di(x.display.measure,Re))}else{me>0&&(De=te="right");var kt;x.options.lineWrapping&&(kt=ue.getClientRects()).length>1?Re=kt[te=="right"?kt.length-1:0]:Re=ue.getBoundingClientRect()}if(xe&&ke<9&&!me&&(!Re||!Re.left&&!Re.right)){var rn=ue.parentNode.getClientRects()[0];rn?Re={left:rn.left,right:rn.left+Ei(x.display),top:rn.top,bottom:rn.bottom}:Re=Do}for(var Qt=Re.top-z.rect.top,In=Re.bottom-z.rect.top,Vn=(Qt+In)/2,br=z.view.measure.heights,Mr=0;Mr<br.length-1&&!(Vn<br[Mr]);Mr++);var Br=Mr?br[Mr-1]:0,Sr=br[Mr],Pr={left:(De=="right"?Re.right:Re.left)-z.rect.left,right:(De=="left"?Re.left:Re.right)-z.rect.left,top:Br,bottom:Sr};return!Re.left&&!Re.right&&(Pr.bogus=!0),x.options.singleCursorHeightPerLine||(Pr.rtop=Qt,Pr.rbottom=In),Pr}function di(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!It(x))return z;var ne=screen.logicalXDPI/screen.deviceXDPI,te=screen.logicalYDPI/screen.deviceYDPI;return{left:z.left*ne,right:z.right*ne,top:z.top*te,bottom:z.bottom*te}}function $i(x){if(x.measure&&(x.measure.cache={},x.measure.heights=null,x.rest))for(var z=0;z<x.rest.length;z++)x.measure.caches[z]={}}function ka(x){x.display.externalMeasure=null,Ze(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)$i(x.display.view[z])}function Zi(x){ka(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function Oa(){return Ee&&Qe?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Na(){return Ee&&Qe?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function to(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=ao(x.widgets[ne]));return z}function $a(x,z,ne,te,ie){if(!ie){var ue=to(z);ne.top+=ue,ne.bottom+=ue}if(te=="line")return ne;te||(te="local");var me=Yn(z);if(te=="local"?me+=eo(x.display):me-=x.display.viewOffset,te=="page"||te=="window"){var Me=x.display.lineSpace.getBoundingClientRect();me+=Me.top+(te=="window"?0:Na());var De=Me.left+(te=="window"?0:Oa());ne.left+=De,ne.right+=De}return ne.top+=me,ne.bottom+=me,ne}function so(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=Oa(),ie-=Na();else if(ne=="local"||!ne){var ue=x.display.sizer.getBoundingClientRect();te+=ue.left,ie+=ue.top}var me=x.display.lineSpace.getBoundingClientRect();return{left:te-me.left,top:ie-me.top}}function lo(x,z,ne,te,ie){return te||(te=Ve(x.doc,z.line)),$a(x,te,$o(x,te,z.ch,ie),ne)}function Da(x,z,ne,te,ie,ue){te=te||Ve(x.doc,z.line),ie||(ie=Pa(x,te));function me(In,Vn){var br=Ai(x,ie,In,Vn?"right":"left",ue);return Vn?br.left=br.right:br.right=br.left,$a(x,te,br,ne)}var Me=Sn(te,x.doc.direction),De=z.ch,Re=z.sticky;if(De>=te.text.length?(De=te.text.length,Re="before"):De<=0&&(De=0,Re="after"),!Me)return me(Re=="before"?De-1:De,Re=="before");function mt(In,Vn,br){var Mr=Me[Vn],Br=Mr.level==1;return me(br?In-1:In,Br!=br)}var kt=en(Me,De,Re),rn=Xt,Qt=mt(De,kt,Re=="before");return rn!=null&&(Qt.other=mt(De,rn,Re!="before")),Qt}function yl(x,z){var ne=0;z=un(x.doc,z),x.options.lineWrapping||(ne=Ei(x.display)*z.ch);var te=Ve(x.doc,z.line),ie=Yn(te)+eo(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function jo(x,z,ne,te,ie){var ue=_t(x,z,ne);return ue.xRel=ie,te&&(ue.outside=te),ue}function Js(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return jo(te.first,0,null,-1,-1);var ie=tn(te,ne),ue=te.first+te.size-1;if(ie>ue)return jo(te.first+te.size-1,Ve(te,ue).text.length,null,1,1);z<0&&(z=0);for(var me=Ve(te,ie);;){var Me=Mu(x,me,ie,z,ne),De=lr(me,Me.ch+(Me.xRel>0||Me.outside>0?1:0));if(!De)return Me;var Re=De.find(1);if(Re.line==ie)return Re;me=Ve(te,ie=Re.line)}}function Kl(x,z,ne,te){te-=to(z);var ie=z.text.length,ue=Pt(function(me){return Ai(x,ne,me-1).bottom<=te},ie,0);return ie=Pt(function(me){return Ai(x,ne,me).top>te},ue,ie),{begin:ue,end:ie}}function Hl(x,z,ne,te){ne||(ne=Pa(x,z));var ie=$a(x,z,Ai(x,ne,te),"line").top;return Kl(x,z,ne,ie)}function Cs(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function Mu(x,z,ne,te,ie){ie-=Yn(z);var ue=Pa(x,z),me=to(z),Me=0,De=z.text.length,Re=!0,mt=Sn(z,x.doc.direction);if(mt){var kt=(x.options.lineWrapping?xl:is)(x,z,ne,ue,mt,te,ie);Re=kt.level!=1,Me=Re?kt.from:kt.to-1,De=Re?kt.to:kt.from-1}var rn=null,Qt=null,In=Pt(function(Gr){var Xr=Ai(x,ue,Gr);return Xr.top+=me,Xr.bottom+=me,Cs(Xr,te,ie,!1)?(Xr.top<=ie&&Xr.left<=te&&(rn=Gr,Qt=Xr),!0):!1},Me,De),Vn,br,Mr=!1;if(Qt){var Br=te-Qt.left<Qt.right-te,Sr=Br==Re;In=rn+(Sr?0:1),br=Sr?"after":"before",Vn=Br?Qt.left:Qt.right}else{!Re&&(In==De||In==Me)&&In++,br=In==0?"after":In==z.text.length?"before":Ai(x,ue,In-(Re?1:0)).bottom+me<=ie==Re?"after":"before";var Pr=Da(x,_t(ne,In,br),"line",z,ue);Vn=Pr.left,Mr=ie<Pr.top?-1:ie>=Pr.bottom?1:0}return In=Rt(z.text,In,1),jo(ne,In,br,Mr,te-Vn)}function is(x,z,ne,te,ie,ue,me){var Me=Pt(function(kt){var rn=ie[kt],Qt=rn.level!=1;return Cs(Da(x,_t(ne,Qt?rn.to:rn.from,Qt?"before":"after"),"line",z,te),ue,me,!0)},0,ie.length-1),De=ie[Me];if(Me>0){var Re=De.level!=1,mt=Da(x,_t(ne,Re?De.from:De.to,Re?"after":"before"),"line",z,te);Cs(mt,ue,me,!0)&&mt.top>me&&(De=ie[Me-1])}return De}function xl(x,z,ne,te,ie,ue,me){var Me=Kl(x,z,te,me),De=Me.begin,Re=Me.end;/\s/.test(z.text.charAt(Re-1))&&Re--;for(var mt=null,kt=null,rn=0;rn<ie.length;rn++){var Qt=ie[rn];if(!(Qt.from>=Re||Qt.to<=De)){var In=Qt.level!=1,Vn=Ai(x,te,In?Math.min(Re,Qt.to)-1:Math.max(De,Qt.from)).right,br=Vn<ue?ue-Vn+1e9:Vn-ue;(!mt||kt>br)&&(mt=Qt,kt=br)}}return mt||(mt=ie[ie.length-1]),mt.from<De&&(mt={from:De,to:mt.to,level:mt.level}),mt.to>Re&&(mt={from:mt.from,to:Re,level:mt.level}),mt}var Vo;function as(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(Vo==null){Vo=je("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)Vo.appendChild(document.createTextNode("x")),Vo.appendChild(je("br"));Vo.appendChild(document.createTextNode("x"))}gt(x.measure,Vo);var ne=Vo.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),Ze(x.measure),ne||1}function Ei(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=je("span","xxxxxxxxxx"),ne=je("pre",[z],"CodeMirror-line-like");gt(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function Di(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ue=z.gutters.firstChild,me=0;ue;ue=ue.nextSibling,++me){var Me=x.display.gutterSpecs[me].className;ne[Me]=ue.offsetLeft+ue.clientLeft+ie,te[Me]=ue.clientWidth}return{fixedPos:Ni(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function Ni(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Ya(x){var z=as(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/Ei(x.display)-3);return function(ie){if(bi(x.doc,ie))return 0;var ue=0;if(ie.widgets)for(var me=0;me<ie.widgets.length;me++)ie.widgets[me].height&&(ue+=ie.widgets[me].height);return ne?ue+(Math.ceil(ie.text.length/te)||1)*z:ue+z}}function La(x){var z=x.doc,ne=Ya(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&bt(te,ie)})}function xo(x,z,ne,te){var ie=x.display;if(!ne&&_r(z).getAttribute("cm-not-content")=="true")return null;var ue,me,Me=ie.lineSpace.getBoundingClientRect();try{ue=z.clientX-Me.left,me=z.clientY-Me.top}catch(kt){return null}var De=Js(x,ue,me),Re;if(te&&De.xRel>0&&(Re=Ve(x.doc,De.line).text).length==De.ch){var mt=Pe(Re,Re.length,x.options.tabSize)-Re.length;De=_t(De.line,Math.max(0,Math.round((ue-fo(x.display).left)/Ei(x.display))-mt))}return De}function po(x,z){if(z>=x.display.viewTo||(z-=x.display.viewFrom,z<0))return null;for(var ne=x.display.view,te=0;te<ne.length;te++)if(z-=ne[te].size,z<0)return te}function za(x,z,ne,te){z==null&&(z=x.doc.first),ne==null&&(ne=x.doc.first+x.doc.size),te||(te=0);var ie=x.display;if(te&&ne<ie.viewTo&&(ie.updateLineNumbers==null||ie.updateLineNumbers>z)&&(ie.updateLineNumbers=z),x.curOp.viewChanged=!0,z>=ie.viewTo)fr&&_i(x.doc,z)<ie.viewTo&&Bo(x);else if(ne<=ie.viewFrom)fr&&Qr(x.doc,ne+te)>ie.viewFrom?Bo(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)Bo(x);else if(z<=ie.viewFrom){var ue=wo(x,ne,ne+te,1);ue?(ie.view=ie.view.slice(ue.index),ie.viewFrom=ue.lineN,ie.viewTo+=te):Bo(x)}else if(ne>=ie.viewTo){var me=wo(x,z,z,-1);me?(ie.view=ie.view.slice(0,me.index),ie.viewTo=me.lineN):Bo(x)}else{var Me=wo(x,z,z,-1),De=wo(x,ne,ne+te,1);Me&&De?(ie.view=ie.view.slice(0,Me.index).concat(va(x,Me.lineN,De.lineN)).concat(ie.view.slice(De.index)),ie.viewTo+=te):Bo(x)}var Re=ie.externalMeasured;Re&&(ne<Re.lineN?Re.lineN+=te:z<Re.lineN+Re.size&&(ie.externalMeasured=null))}function Ao(x,z,ne){x.curOp.viewChanged=!0;var te=x.display,ie=x.display.externalMeasured;if(ie&&z>=ie.lineN&&z<ie.lineN+ie.size&&(te.externalMeasured=null),!(z<te.viewFrom||z>=te.viewTo)){var ue=te.view[po(x,z)];if(ue.node!=null){var me=ue.changes||(ue.changes=[]);ht(me,ne)==-1&&me.push(ne)}}}function Bo(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function wo(x,z,ne,te){var ie=po(x,z),ue,me=x.display.view;if(!fr||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var Me=x.display.viewFrom,De=0;De<ie;De++)Me+=me[De].size;if(Me!=z){if(te>0){if(ie==me.length-1)return null;ue=Me+me[ie].size-z,ie++}else ue=Me-z;z+=ue,ne+=ue}for(;_i(x.doc,ne)!=ne;){if(ie==(te<0?0:me.length-1))return null;ne+=te*me[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function os(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=va(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=va(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(po(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(va(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,po(x,ne)))),te.viewTo=ne}function Wl(x){for(var z=x.display.view,ne=0,te=0;te<z.length;te++){var ie=z[te];!ie.hidden&&(!ie.node||ie.changes)&&++ne}return ne}function wl(x){x.display.input.showSelection(x.display.input.prepareSelection())}function Mc(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ue=te.selection=document.createDocumentFragment(),me=0;me<ne.sel.ranges.length;me++)if(!(!z&&me==ne.sel.primIndex)){var Me=ne.sel.ranges[me];if(!(Me.from().line>=x.display.viewTo||Me.to().line<x.display.viewFrom)){var De=Me.empty();(De||x.options.showCursorWhenSelecting)&&_c(x,Me.head,ie),De||Od(x,Me,ue)}}return te}function _c(x,z,ne){var te=Da(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(je("div","\xA0","CodeMirror-cursor"));if(ie.style.left=te.left+"px",ie.style.top=te.top+"px",ie.style.height=Math.max(0,te.bottom-te.top)*x.options.cursorHeight+"px",te.other){var ue=ne.appendChild(je("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ue.style.display="",ue.style.left=te.other.left+"px",ue.style.top=te.other.top+"px",ue.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function Zl(x,z){return x.top-z.top||x.left-z.left}function Od(x,z,ne){var te=x.display,ie=x.doc,ue=document.createDocumentFragment(),me=fo(x.display),Me=me.left,De=Math.max(te.sizerWidth,da(x)-te.sizer.offsetLeft)-me.right,Re=ie.direction=="ltr";function mt(Sr,Pr,Gr,Xr){Pr<0&&(Pr=0),Pr=Math.round(Pr),Xr=Math.round(Xr),ue.appendChild(je("div",null,"CodeMirror-selected","position: absolute; left: "+Sr+`px;
|
|
|
top: `+Pr+"px; width: "+(Gr==null?De-Sr:Gr)+`px;
|
|
|
height: `+(Xr-Pr)+"px"))}function kt(Sr,Pr,Gr){var Xr=Ve(ie,Sr),gi=Xr.text.length,Gi,Fa;function ua(Ea,ho){return lo(x,_t(Sr,Ea),"div",Xr,ho)}function uo(Ea,ho,li){var fa=Hl(x,Xr,null,Ea),ca=ho=="ltr"==(li=="after")?"left":"right",pa=li=="after"?fa.begin:fa.end-(/\s/.test(Xr.text.charAt(fa.end-1))?2:1);return ua(pa,ca)[ca]}var co=Sn(Xr,ie.direction);return Ut(co,Pr||0,Gr==null?gi:Gr,function(Ea,ho,li,fa){var ca=li=="ltr",pa=ua(Ea,ca?"left":"right"),ba=ua(ho-1,ca?"right":"left"),fl=Pr==null&&Ea==0,go=Gr==null&&ho==gi,Za=fa==0,Bi=!co||fa==co.length-1;if(ba.top-pa.top<=3){var Ta=(Re?fl:go)&&Za,ac=(Re?go:fl)&&Bi,ys=Ta?Me:(ca?pa:ba).left,Rs=ac?De:(ca?ba:pa).right;mt(ys,pa.top,Rs-ys,pa.bottom)}else{var Yo,Ma,pl,ja;ca?(Yo=Re&&fl&&Za?Me:pa.left,Ma=Re?De:uo(Ea,li,"before"),pl=Re?Me:uo(ho,li,"after"),ja=Re&&go&&Bi?De:ba.right):(Yo=Re?uo(Ea,li,"before"):Me,Ma=!Re&&fl&&Za?De:pa.right,pl=!Re&&go&&Bi?Me:ba.left,ja=Re?uo(ho,li,"after"):De),mt(Yo,pa.top,Ma-Yo,pa.bottom),pa.bottom<ba.top&&mt(Me,pa.bottom,null,ba.top),mt(pl,ba.top,ja-pl,ba.bottom)}(!Gi||Zl(pa,Gi)<0)&&(Gi=pa),Zl(ba,Gi)<0&&(Gi=ba),(!Fa||Zl(pa,Fa)<0)&&(Fa=pa),Zl(ba,Fa)<0&&(Fa=ba)}),{start:Gi,end:Fa}}var rn=z.from(),Qt=z.to();if(rn.line==Qt.line)kt(rn.line,rn.ch,Qt.ch);else{var In=Ve(ie,rn.line),Vn=Ve(ie,Qt.line),br=Ar(In)==Ar(Vn),Mr=kt(rn.line,rn.ch,br?In.text.length+1:null).end,Br=kt(Qt.line,br?0:null,Qt.ch).start;br&&(Mr.top<Br.top-2?(mt(Mr.right,Mr.top,null,Mr.bottom),mt(Me,Br.top,Br.left,Br.bottom)):mt(Mr.right,Mr.top,Br.left-Mr.right,Mr.bottom)),Mr.bottom<Br.top&&mt(Me,Mr.bottom,null,Br.top)}ne.appendChild(ue)}function _u(x){if(x.state.focused){var z=x.display;clearInterval(z.blinker);var ne=!0;z.cursorDiv.style.visibility="",x.options.cursorBlinkRate>0?z.blinker=setInterval(function(){x.hasFocus()||qs(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Sl(x){x.state.focused||(x.display.input.focus(),ku(x))}function kc(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,qs(x))},100)}function ku(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(wt(x,"focus",x,z),x.state.focused=!0,Dt(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),Te&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),_u(x))}function qs(x,z){x.state.delayingBlurEvent||(x.state.focused&&(wt(x,"blur",x,z),x.state.focused=!1,Ke(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function jl(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],ue=x.options.lineWrapping,me=void 0,Me=0;if(!ie.hidden){if(xe&&ke<8){var De=ie.node.offsetTop+ie.node.offsetHeight;me=De-ne,ne=De}else{var Re=ie.node.getBoundingClientRect();me=Re.bottom-Re.top,!ue&&ie.text.firstChild&&(Me=ie.text.firstChild.getBoundingClientRect().right-Re.left-1)}var mt=ie.line.height-me;if((mt>.005||mt<-.005)&&(bt(ie.line,me),Dc(ie.line),ie.rest))for(var kt=0;kt<ie.rest.length;kt++)Dc(ie.rest[kt]);if(Me>x.display.sizerWidth){var rn=Math.ceil(Me/Ei(x.display));rn>x.display.maxLineLength&&(x.display.maxLineLength=rn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function Dc(x){if(x.widgets)for(var z=0;z<x.widgets.length;++z){var ne=x.widgets[z],te=ne.node.parentNode;te&&(ne.height=te.offsetHeight)}}function Aa(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-eo(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ue=tn(z,te),me=tn(z,ie);if(ne&&ne.ensure){var Me=ne.ensure.from.line,De=ne.ensure.to.line;Me<ue?(ue=Me,me=tn(z,Yn(Ve(z,Me))+x.wrapper.clientHeight)):Math.min(De,z.lastLine())>=me&&(ue=tn(z,Yn(Ve(z,De))-x.wrapper.clientHeight),me=De)}return{from:ue,to:Math.max(me,ue+1)}}function ss(x,z){if(!Nt(x,"scrollCursorIntoView")){var ne=x.display,te=ne.sizer.getBoundingClientRect(),ie=null;if(z.top+te.top<0?ie=!0:z.bottom+te.top>(window.innerHeight||document.documentElement.clientHeight)&&(ie=!1),ie!=null&&!ze){var ue=je("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-ne.viewOffset-eo(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+_a(x)+ne.barHeight)+`px;
|
|
|
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(ue),ue.scrollIntoView(ie),x.display.lineSpace.removeChild(ue)}}}function Es(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?_t(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?_t(z.line,z.ch+1,"before"):z);for(var ue=0;ue<5;ue++){var me=!1,Me=Da(x,z),De=!ne||ne==z?Me:Da(x,ne);ie={left:Math.min(Me.left,De.left),top:Math.min(Me.top,De.top)-te,right:Math.max(Me.left,De.left),bottom:Math.max(Me.bottom,De.bottom)+te};var Re=Vl(x,ie),mt=x.doc.scrollTop,kt=x.doc.scrollLeft;if(Re.scrollTop!=null&&(Ms(x,Re.scrollTop),Math.abs(x.doc.scrollTop-mt)>1&&(me=!0)),Re.scrollLeft!=null&&(_s(x,Re.scrollLeft),Math.abs(x.doc.scrollLeft-kt)>1&&(me=!0)),!me)break}return ie}function $d(x,z){var ne=Vl(x,z);ne.scrollTop!=null&&Ms(x,ne.scrollTop),ne.scrollLeft!=null&&_s(x,ne.scrollLeft)}function Vl(x,z){var ne=x.display,te=as(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ue=yo(x),me={};z.bottom-z.top>ue&&(z.bottom=z.top+ue);var Me=x.doc.height+Ss(ne),De=z.top<te,Re=z.bottom>Me-te;if(z.top<ie)me.scrollTop=De?0:z.top;else if(z.bottom>ie+ue){var mt=Math.min(z.top,(Re?Me:z.bottom)-ue);mt!=ie&&(me.scrollTop=mt)}var kt=x.options.fixedGutter?0:ne.gutters.offsetWidth,rn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-kt,Qt=da(x)-ne.gutters.offsetWidth,In=z.right-z.left>Qt;return In&&(z.right=z.left+Qt),z.left<10?me.scrollLeft=0:z.left<rn?me.scrollLeft=Math.max(0,z.left+kt-(In?0:10)):z.right>Qt+rn-3&&(me.scrollLeft=z.right+(In?0:10)-Qt),me}function Du(x,z){z!=null&&(Gl(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function Qs(x){Gl(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function el(x,z,ne){(z!=null||ne!=null)&&Gl(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Fd(x,z){Gl(x),x.curOp.scrollToPos=z}function Gl(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=yl(x,z.from),te=yl(x,z.to);Lc(x,ne,te,z.margin)}}function Lc(x,z,ne,te){var ie=Vl(x,{left:Math.min(z.left,ne.left),top:Math.min(z.top,ne.top)-te,right:Math.max(z.right,ne.right),bottom:Math.max(z.bottom,ne.bottom)+te});el(x,ie.scrollLeft,ie.scrollTop)}function Ms(x,z){Math.abs(x.doc.scrollTop-z)<2||(be||Bu(x,{top:z}),Ac(x,z,!0),be&&Bu(x),nl(x,100))}function Ac(x,z,ne){z=Math.max(0,Math.min(x.display.scroller.scrollHeight-x.display.scroller.clientHeight,z)),!(x.display.scroller.scrollTop==z&&!ne)&&(x.doc.scrollTop=z,x.display.scrollbars.setScrollTop(z),x.display.scroller.scrollTop!=z&&(x.display.scroller.scrollTop=z))}function _s(x,z,ne,te){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((ne?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!te)&&(x.doc.scrollLeft=z,$c(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function tl(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+Ss(x.display));return{clientHeight:z.scroller.clientHeight,viewHeight:z.wrapper.clientHeight,scrollWidth:z.scroller.scrollWidth,clientWidth:z.scroller.clientWidth,viewWidth:z.wrapper.clientWidth,barLeft:x.options.fixedGutter?ne:0,docHeight:te,scrollHeight:te+_a(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var ls=function(x,z,ne){this.cm=ne;var te=this.vert=je("div",[je("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=je("div",[je("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),an(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),an(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xe&&ke<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ls.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,ne=x.scrollHeight>x.clientHeight+1,te=x.nativeBarWidth;if(ne){this.vert.style.display="block",this.vert.style.bottom=z?te+"px":"0";var ie=x.viewHeight-(z?te:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+ie)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=ne?te+"px":"0",this.horiz.style.left=x.barLeft+"px";var ue=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+ue)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&x.clientHeight>0&&(te==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ne?te:0,bottom:z?te:0}},ls.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ls.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ls.prototype.zeroWidthHack=function(){var x=tt&&!Le?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ye,this.disableVert=new ye},ls.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ie=x.getBoundingClientRect(),ue=ne=="vert"?document.elementFromPoint(ie.right-1,(ie.top+ie.bottom)/2):document.elementFromPoint((ie.right+ie.left)/2,ie.bottom-1);ue!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},ls.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var mo=function(){};mo.prototype.update=function(){return{bottom:0,right:0}},mo.prototype.setScrollLeft=function(){},mo.prototype.setScrollTop=function(){},mo.prototype.clear=function(){};function ks(x,z){z||(z=tl(x));var ne=x.display.barWidth,te=x.display.barHeight;Lu(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&jl(x),Lu(x,tl(x)),ne=x.display.barWidth,te=x.display.barHeight}function Lu(x,z){var ne=x.display,te=ne.scrollbars.update(z);ne.sizer.style.paddingRight=(ne.barWidth=te.right)+"px",ne.sizer.style.paddingBottom=(ne.barHeight=te.bottom)+"px",ne.heightForcer.style.borderBottom=te.bottom+"px solid transparent",te.right&&te.bottom?(ne.scrollbarFiller.style.display="block",ne.scrollbarFiller.style.height=te.bottom+"px",ne.scrollbarFiller.style.width=te.right+"px"):ne.scrollbarFiller.style.display="",te.bottom&&x.options.coverGutterNextToScrollbar&&x.options.fixedGutter?(ne.gutterFiller.style.display="block",ne.gutterFiller.style.height=te.bottom+"px",ne.gutterFiller.style.width=z.gutterWidth+"px"):ne.gutterFiller.style.display=""}var Bc={native:ls,null:mo};function Tc(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&Ke(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new Bc[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),an(z,"mousedown",function(){x.state.focused&&setTimeout(function(){return x.display.input.focus()},0)}),z.setAttribute("cm-not-content","true")},function(z,ne){ne=="horizontal"?_s(x,z):Ms(x,z)},x),x.display.scrollbars.addClass&&Dt(x.display.wrapper,x.display.scrollbars.addClass)}var Rd=0;function Ds(x){x.curOp={cm:x,viewChanged:!1,startHeight:x.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:++Rd},Si(x.curOp)}function us(x){var z=x.curOp;z&&Jr(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;Nd(ne)})}function Nd(x){for(var z=x.ops,ne=0;ne<z.length;ne++)zd(z[ne]);for(var te=0;te<z.length;te++)Kd(z[te]);for(var ie=0;ie<z.length;ie++)Hd(z[ie]);for(var ue=0;ue<z.length;ue++)Wd(z[ue]);for(var me=0;me<z.length;me++)Zd(z[me])}function zd(x){var z=x.cm,ne=z.display;Pc(z),x.updateMaxLine&&Nn(z),x.mustUpdate=x.viewChanged||x.forceUpdate||x.scrollTop!=null||x.scrollToPos&&(x.scrollToPos.from.line<ne.viewFrom||x.scrollToPos.to.line>=ne.viewTo)||ne.maxLineChanged&&z.options.lineWrapping,x.update=x.mustUpdate&&new Ul(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function Kd(x){x.updatedDisplay=x.mustUpdate&&Au(x.cm,x.update)}function Hd(x){var z=x.cm,ne=z.display;x.updatedDisplay&&jl(z),x.barMeasure=tl(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=$o(z,ne.maxLine,ne.maxLine.text.length).left+3,z.display.sizerWidth=x.adjustWidthTo,x.barMeasure.scrollWidth=Math.max(ne.scroller.clientWidth,ne.sizer.offsetLeft+x.adjustWidthTo+_a(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-da(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Wd(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&_s(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==Ge();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&ks(z,x.barMeasure),x.updatedDisplay&&Iu(z,x.barMeasure),x.selectionChanged&&_u(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&Sl(x.cm)}function Zd(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&Oc(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&Ac(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&_s(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=Es(z,un(te,x.scrollToPos.from),un(te,x.scrollToPos.to),x.scrollToPos.margin);ss(z,ie)}var ue=x.maybeHiddenMarkers,me=x.maybeUnhiddenMarkers;if(ue)for(var Me=0;Me<ue.length;++Me)ue[Me].lines.length||wt(ue[Me],"hide");if(me)for(var De=0;De<me.length;++De)me[De].lines.length&&wt(me[De],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&wt(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function ha(x,z){if(x.curOp)return z();Ds(x);try{return z()}finally{us(x)}}function wa(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Ds(x);try{return z.apply(x,arguments)}finally{us(x)}}}function la(x){return function(){if(this.curOp)return x.apply(this,arguments);Ds(this);try{return x.apply(this,arguments)}finally{us(this)}}}function Ba(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Ds(z);try{return x.apply(this,arguments)}finally{us(z)}}}function nl(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,Ct(Ic,x))}function Ic(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=Zt(x,z.highlightFrontier),ie=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(ue){if(te.line>=x.display.viewFrom){var me=ue.styles,Me=ue.text.length>x.options.maxHighlightLength?_e(z.mode,te.state):null,De=Jt(x,ue,te,!0);Me&&(te.state=Me),ue.styles=De.styles;var Re=ue.styleClasses,mt=De.classes;mt?ue.styleClasses=mt:Re&&(ue.styleClasses=null);for(var kt=!me||me.length!=ue.styles.length||Re!=mt&&(!Re||!mt||Re.bgClass!=mt.bgClass||Re.textClass!=mt.textClass),rn=0;!kt&&rn<me.length;++rn)kt=me[rn]!=ue.styles[rn];kt&&ie.push(te.line),ue.stateAfter=te.save(),te.nextLine()}else ue.text.length<=x.options.maxHighlightLength&&Wt(x,ue.text,te),ue.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return nl(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&ha(x,function(){for(var ue=0;ue<ie.length;ue++)Ao(x,ie[ue],"text")})}}var Ul=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=Aa(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=da(x),this.force=ne,this.dims=Di(x),this.events=[]};Ul.prototype.signal=function(x,z){Bn(x,z)&&this.events.push(arguments)},Ul.prototype.finish=function(){for(var x=0;x<this.events.length;x++)wt.apply(null,this.events[x])};function Pc(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=_a(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=_a(x)+"px",z.scrollbarsClipped=!0)}function jd(x){if(x.hasFocus())return null;var z=Ge();if(!z||!Et(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&Et(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function Vd(x){if(!(!x||!x.activeElt||x.activeElt==Ge())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&Et(document.body,x.anchorNode)&&Et(document.body,x.focusNode))){var z=window.getSelection(),ne=document.createRange();ne.setEnd(x.anchorNode,x.anchorOffset),ne.collapse(!1),z.removeAllRanges(),z.addRange(ne),z.extend(x.focusNode,x.focusOffset)}}function Au(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return Bo(x),!1;if(!z.force&&z.visible.from>=ne.viewFrom&&z.visible.to<=ne.viewTo&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo)&&ne.renderedView==ne.view&&Wl(x)==0)return!1;Xl(x)&&(Bo(x),z.dims=Di(x));var ie=te.first+te.size,ue=Math.max(z.visible.from-x.options.viewportMargin,te.first),me=Math.min(ie,z.visible.to+x.options.viewportMargin);ne.viewFrom<ue&&ue-ne.viewFrom<20&&(ue=Math.max(te.first,ne.viewFrom)),ne.viewTo>me&&ne.viewTo-me<20&&(me=Math.min(ie,ne.viewTo)),fr&&(ue=_i(x.doc,ue),me=Qr(x.doc,me));var Me=ue!=ne.viewFrom||me!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;os(x,ue,me),ne.viewOffset=Yn(Ve(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var De=Wl(x);if(!Me&&De==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var Re=jd(x);return De>4&&(ne.lineDiv.style.display="none"),Gd(x,ne.updateLineNumbers,z.dims),De>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Vd(Re),Ze(ne.cursorDiv),Ze(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,Me&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,nl(x,400)),ne.updateLineNumbers=null,!0}function Oc(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==da(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+Ss(x.display)-yo(x),ne.top)}),z.visible=Aa(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=Aa(x.display,x.doc,ne));if(!Au(x,z))break;jl(x);var ie=tl(x);wl(x),ks(x,ie),Iu(x,ie),z.force=!1}z.signal(x,"update",x),(x.display.viewFrom!=x.display.reportedViewFrom||x.display.viewTo!=x.display.reportedViewTo)&&(z.signal(x,"viewportChange",x,x.display.viewFrom,x.display.viewTo),x.display.reportedViewFrom=x.display.viewFrom,x.display.reportedViewTo=x.display.viewTo)}function Bu(x,z){var ne=new Ul(x,z);if(Au(x,ne)){jl(x),Oc(x,ne);var te=tl(x);wl(x),ks(x,te),Iu(x,te),ne.finish()}}function Gd(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ue=te.lineDiv,me=ue.firstChild;function Me(In){var Vn=In.nextSibling;return Te&&tt&&x.display.currentWheelTarget==In?In.style.display="none":In.parentNode.removeChild(In),Vn}for(var De=te.view,Re=te.viewFrom,mt=0;mt<De.length;mt++){var kt=De[mt];if(!kt.hidden)if(!kt.node||kt.node.parentNode!=ue){var rn=sa(x,kt,Re,ne);ue.insertBefore(rn,me)}else{for(;me!=kt.node;)me=Me(me);var Qt=ie&&z!=null&&z<=Re&&kt.lineNumber;kt.changes&&(ht(kt.changes,"gutter")>-1&&(Qt=!1),ii(x,kt,Re,ne)),Qt&&(Ze(kt.lineNumber),kt.lineNumber.appendChild(document.createTextNode(on(x.options,Re)))),me=kt.node.nextSibling}Re+=kt.size}for(;me;)me=Me(me)}function Tu(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Iu(x,z){x.display.sizer.style.minHeight=z.docHeight+"px",x.display.heightForcer.style.top=z.docHeight+"px",x.display.gutters.style.height=z.docHeight+x.display.barHeight+_a(x)+"px"}function $c(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=Ni(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,ue=te+"px",me=0;me<ne.length;me++)if(!ne[me].hidden){x.options.fixedGutter&&(ne[me].gutter&&(ne[me].gutter.style.left=ue),ne[me].gutterBackground&&(ne[me].gutterBackground.style.left=ue));var Me=ne[me].alignable;if(Me)for(var De=0;De<Me.length;De++)Me[De].style.left=ue}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function Xl(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=on(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(je("div",[je("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ue=ie.firstChild.offsetWidth,me=ie.offsetWidth-ue;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(ue,te.lineGutter.offsetWidth-me)+1,te.lineNumWidth=te.lineNumInnerWidth+me,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",Tu(x.display),!0}return!1}function Pu(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var ue=x[ie],me=null;if(typeof ue!="string"&&(me=ue.style,ue=ue.className),ue=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:ue,style:me})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function Fc(x){var z=x.gutters,ne=x.gutterSpecs;Ze(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],ue=ie.className,me=ie.style,Me=z.appendChild(je("div",null,"CodeMirror-gutter "+ue));me&&(Me.style.cssText=me),ue=="CodeMirror-linenumbers"&&(x.lineGutter=Me,Me.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Tu(x)}function Cl(x){Fc(x.display),za(x),$c(x)}function Ud(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=je("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=je("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=St("div",null,"CodeMirror-code"),ie.selectionDiv=je("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=je("div",null,"CodeMirror-cursors"),ie.measure=je("div",null,"CodeMirror-measure"),ie.lineMeasure=je("div",null,"CodeMirror-measure"),ie.lineSpace=St("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ue=St("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=je("div",[ue],null,"position: relative"),ie.sizer=je("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=je("div",null,null,"position: absolute; height: "+Vt+"px; width: 1px;"),ie.gutters=je("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=je("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=je("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),xe&&ke<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!Te&&!(be&&at)&&(ie.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(ie.wrapper):x(ie.wrapper)),ie.viewFrom=ie.viewTo=z.first,ie.reportedViewFrom=ie.reportedViewTo=z.first,ie.view=[],ie.renderedView=null,ie.externalMeasured=null,ie.viewOffset=0,ie.lastWrapHeight=ie.lastWrapWidth=0,ie.updateLineNumbers=null,ie.nativeBarWidth=ie.barHeight=ie.barWidth=0,ie.scrollbarsClipped=!1,ie.lineNumWidth=ie.lineNumInnerWidth=ie.lineNumChars=null,ie.alignWidgets=!1,ie.cachedCharWidth=ie.cachedTextHeight=ie.cachedPaddingH=null,ie.maxLine=null,ie.maxLineLength=0,ie.maxLineChanged=!1,ie.wheelDX=ie.wheelDY=ie.wheelStartX=ie.wheelStartY=null,ie.shift=!1,ie.selForContextMenu=null,ie.activeTouch=null,ie.gutterSpecs=Pu(te.gutters,te.lineNumbers),Fc(ie),ne.init(ie)}var Yl=0,Ka=null;xe?Ka=-.53:be?Ka=15:Ee?Ka=-.7:it&&(Ka=-1/3);function rl(x){var z=x.wheelDeltaX,ne=x.wheelDeltaY;return z==null&&x.detail&&x.axis==x.HORIZONTAL_AXIS&&(z=x.detail),ne==null&&x.detail&&x.axis==x.VERTICAL_AXIS?ne=x.detail:ne==null&&(ne=x.wheelDelta),{x:z,y:ne}}function Rc(x){var z=rl(x);return z.x*=Ka,z.y*=Ka,z}function Nc(x,z){var ne=rl(z),te=ne.x,ie=ne.y,ue=x.display,me=ue.scroller,Me=me.scrollWidth>me.clientWidth,De=me.scrollHeight>me.clientHeight;if(te&&Me||ie&&De){if(ie&&tt&&Te){e:for(var Re=z.target,mt=ue.view;Re!=me;Re=Re.parentNode)for(var kt=0;kt<mt.length;kt++)if(mt[kt].node==Re){x.display.currentWheelTarget=Re;break e}}if(te&&!be&&!Oe&&Ka!=null){ie&&De&&Ms(x,Math.max(0,me.scrollTop+ie*Ka)),_s(x,Math.max(0,me.scrollLeft+te*Ka)),(!ie||ie&&De)&&nr(z),ue.wheelStartX=null;return}if(ie&&Ka!=null){var rn=ie*Ka,Qt=x.doc.scrollTop,In=Qt+ue.wrapper.clientHeight;rn<0?Qt=Math.max(0,Qt+rn-50):In=Math.min(x.doc.height,In+rn+50),Bu(x,{top:Qt,bottom:In})}Yl<20&&(ue.wheelStartX==null?(ue.wheelStartX=me.scrollLeft,ue.wheelStartY=me.scrollTop,ue.wheelDX=te,ue.wheelDY=ie,setTimeout(function(){if(ue.wheelStartX!=null){var Vn=me.scrollLeft-ue.wheelStartX,br=me.scrollTop-ue.wheelStartY,Mr=br&&ue.wheelDY&&br/ue.wheelDY||Vn&&ue.wheelDX&&Vn/ue.wheelDX;ue.wheelStartX=ue.wheelStartY=null,Mr&&(Ka=(Ka*Yl+Mr)/(Yl+1),++Yl)}},200)):(ue.wheelDX+=te,ue.wheelDY+=ie))}}var vo=function(x,z){this.ranges=x,this.primIndex=z};vo.prototype.primary=function(){return this.ranges[this.primIndex]},vo.prototype.equals=function(x){if(x==this)return!0;if(x.primIndex!=this.primIndex||x.ranges.length!=this.ranges.length)return!1;for(var z=0;z<this.ranges.length;z++){var ne=this.ranges[z],te=x.ranges[z];if(!Dn(ne.anchor,te.anchor)||!Dn(ne.head,te.head))return!1}return!0},vo.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new Pi(Cn(this.ranges[z].anchor),Cn(this.ranges[z].head));return new vo(x,this.primIndex)},vo.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},vo.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(Yt(z,te.from())>=0&&Yt(x,te.to())<=0)return ne}return-1};var Pi=function(x,z){this.anchor=x,this.head=z};Pi.prototype.from=function(){return Mn(this.anchor,this.head)},Pi.prototype.to=function(){return gn(this.anchor,this.head)},Pi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function To(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(rn,Qt){return Yt(rn.from(),Qt.from())}),ne=ht(z,ie);for(var ue=1;ue<z.length;ue++){var me=z[ue],Me=z[ue-1],De=Yt(Me.to(),me.from());if(te&&!me.empty()?De>0:De>=0){var Re=Mn(Me.from(),me.from()),mt=gn(Me.to(),me.to()),kt=Me.empty()?me.from()==me.head:Me.from()==Me.head;ue<=ne&&--ne,z.splice(--ue,2,new Pi(kt?mt:Re,kt?Re:mt))}}return new vo(z,ne)}function Fo(x,z){return new vo([new Pi(x,z||x)],0)}function cs(x){return x.text?_t(x.from.line+x.text.length-1,jt(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function zc(x,z){if(Yt(x,z.from)<0)return x;if(Yt(x,z.to)<=0)return cs(z);var ne=x.line+z.text.length-(z.to.line-z.from.line)-1,te=x.ch;return x.line==z.to.line&&(te+=cs(z).ch-z.to.ch),_t(ne,te)}function Ou(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new Pi(zc(ie.anchor,z),zc(ie.head,z)))}return To(x.cm,ne,x.sel.primIndex)}function il(x,z,ne){return x.line==z.line?_t(ne.line,x.ch-z.ch+ne.ch):_t(ne.line+(x.line-z.line),x.ch)}function $u(x,z,ne){for(var te=[],ie=_t(x.first,0),ue=ie,me=0;me<z.length;me++){var Me=z[me],De=il(Me.from,ie,ue),Re=il(cs(Me),ie,ue);if(ie=Me.to,ue=Re,ne=="around"){var mt=x.sel.ranges[me],kt=Yt(mt.head,mt.anchor)<0;te[me]=new Pi(kt?Re:De,kt?De:Re)}else te[me]=new Pi(De,De)}return new vo(te,x.sel.primIndex)}function Fu(x){x.doc.mode=dn(x.options,x.doc.modeOption),al(x)}function al(x){x.doc.iter(function(z){z.stateAfter&&(z.stateAfter=null),z.styles&&(z.styles=null)}),x.doc.modeFrontier=x.doc.highlightFrontier=x.doc.first,nl(x,100),x.state.modeGen++,x.curOp&&za(x)}function Kc(x,z){return z.from.ch==0&&z.to.ch==0&&jt(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function Ru(x,z,ne,te){function ie(Br){return ne?ne[Br]:null}function ue(Br,Sr,Pr){Nr(Br,Sr,Pr,te),Ir(Br,"change",Br,z)}function me(Br,Sr){for(var Pr=[],Gr=Br;Gr<Sr;++Gr)Pr.push(new Kn(Re[Gr],ie(Gr),te));return Pr}var Me=z.from,De=z.to,Re=z.text,mt=Ve(x,Me.line),kt=Ve(x,De.line),rn=jt(Re),Qt=ie(Re.length-1),In=De.line-Me.line;if(z.full)x.insert(0,me(0,Re.length)),x.remove(Re.length,x.size-Re.length);else if(Kc(x,z)){var Vn=me(0,Re.length-1);ue(kt,kt.text,Qt),In&&x.remove(Me.line,In),Vn.length&&x.insert(Me.line,Vn)}else if(mt==kt)if(Re.length==1)ue(mt,mt.text.slice(0,Me.ch)+rn+mt.text.slice(De.ch),Qt);else{var br=me(1,Re.length-1);br.push(new Kn(rn+mt.text.slice(De.ch),Qt,te)),ue(mt,mt.text.slice(0,Me.ch)+Re[0],ie(0)),x.insert(Me.line+1,br)}else if(Re.length==1)ue(mt,mt.text.slice(0,Me.ch)+Re[0]+kt.text.slice(De.ch),ie(0)),x.remove(Me.line+1,In);else{ue(mt,mt.text.slice(0,Me.ch)+Re[0],ie(0)),ue(kt,rn+kt.text.slice(De.ch),Qt);var Mr=me(1,Re.length-1);In>1&&x.remove(Me.line+1,In-1),x.insert(Me.line+1,Mr)}Ir(x,"change",x,z)}function ds(x,z,ne){function te(ie,ue,me){if(ie.linked)for(var Me=0;Me<ie.linked.length;++Me){var De=ie.linked[Me];if(De.doc!=ue){var Re=me&&De.sharedHist;ne&&!Re||(z(De.doc,Re),te(De.doc,ie,Re))}}}te(x,null,!0)}function Jl(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,La(x),Fu(x),ql(x),x.options.lineWrapping||Nn(x),x.options.mode=z.modeOption,za(x)}function ql(x){(x.doc.direction=="rtl"?Dt:Ke)(x.display.lineDiv,"CodeMirror-rtl")}function Nu(x){ha(x,function(){ql(x),za(x)})}function Ql(x){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=x||1}function zu(x,z){var ne={from:Cn(z.from),to:cs(z),text:lt(x,z.from,z.to)};return Zu(x,ne,z.from.line,z.to.line+1),ds(x,function(te){return Zu(te,ne,z.from.line,z.to.line+1)},!0),ne}function Hc(x){for(;x.length;){var z=jt(x);if(z.ranges)x.pop();else break}}function Ku(x,z){if(z)return Hc(x.done),jt(x.done);if(x.done.length&&!jt(x.done).ranges)return jt(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),jt(x.done)}function eu(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ue=+new Date,me,Me;if((ie.lastOp==te||ie.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ie.lastModTime>ue-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(me=Ku(ie,ie.lastOp==te)))Me=jt(me.changes),Yt(z.from,z.to)==0&&Yt(z.from,Me.to)==0?Me.to=cs(z):me.changes.push(zu(x,z));else{var De=jt(ie.done);for((!De||!De.ranges)&&tu(x.sel,ie.done),me={changes:[zu(x,z)],generation:ie.generation},ie.done.push(me);ie.done.length>ie.undoDepth;)ie.done.shift(),ie.done[0].ranges||ie.done.shift()}ie.done.push(ne),ie.generation=++ie.maxGeneration,ie.lastModTime=ie.lastSelTime=ue,ie.lastOp=ie.lastSelOp=te,ie.lastOrigin=ie.lastSelOrigin=z.origin,Me||wt(x,"historyAdded")}function Hu(x,z,ne,te){var ie=z.charAt(0);return ie=="*"||ie=="+"&&ne.ranges.length==te.ranges.length&&ne.somethingSelected()==te.somethingSelected()&&new Date-x.history.lastSelTime<=(x.cm?x.cm.options.historyEventDelay:500)}function Wu(x,z,ne,te){var ie=x.history,ue=te&&te.origin;ne==ie.lastSelOp||ue&&ie.lastSelOrigin==ue&&(ie.lastModTime==ie.lastSelTime&&ie.lastOrigin==ue||Hu(x,ue,jt(ie.done),z))?ie.done[ie.done.length-1]=z:tu(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ue,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&Hc(ie.undone)}function tu(x,z){var ne=jt(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function Zu(x,z,ne,te){var ie=z["spans_"+x.id],ue=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(me){me.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[ue]=me.markedSpans),++ue})}function ju(x){if(!x)return null;for(var z,ne=0;ne<x.length;++ne)x[ne].marker.explicitlyCleared?z||(z=x.slice(0,ne)):z&&z.push(x[ne]);return z?z.length?z:null:x}function Xd(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ie=0;ie<z.text.length;++ie)te.push(ju(ne[ie]));return te}function Wc(x,z){var ne=Xd(x,z),te=kn(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var ue=ne[ie],me=te[ie];if(ue&&me)e:for(var Me=0;Me<me.length;++Me){for(var De=me[Me],Re=0;Re<ue.length;++Re)if(ue[Re].marker==De.marker)continue e;ue.push(De)}else me&&(ne[ie]=me)}return ne}function ol(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ue=x[ie];if(ue.ranges){te.push(ne?vo.prototype.deepCopy.call(ue):ue);continue}var me=ue.changes,Me=[];te.push({changes:Me});for(var De=0;De<me.length;++De){var Re=me[De],mt=void 0;if(Me.push({from:Re.from,to:Re.to,text:Re.text}),z)for(var kt in Re)(mt=kt.match(/^spans_(\d+)$/))&&ht(z,Number(mt[1]))>-1&&(jt(Me)[kt]=Re[kt],delete Re[kt])}}return te}function Vu(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ue=Yt(z,ie)<0;ue!=Yt(ne,ie)<0?(ie=z,z=ne):ue!=Yt(z,ne)<0&&(z=ne)}return new Pi(ie,z)}else return new Pi(ne||z,z)}function sl(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),Sa(x,new vo([Vu(x.sel.primary(),z,ne,ie)],0),te)}function Fr(x,z,ne){for(var te=[],ie=x.cm&&(x.cm.display.shift||x.extend),ue=0;ue<x.sel.ranges.length;ue++)te[ue]=Vu(x.sel.ranges[ue],z[ue],null,ie);var me=To(x.cm,te,x.sel.primIndex);Sa(x,me,ne)}function So(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,Sa(x,To(x.cm,ie,x.sel.primIndex),te)}function Zc(x,z,ne,te){Sa(x,Fo(z,ne),te)}function Yd(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var ue=0;ue<ie.length;ue++)this.ranges[ue]=new Pi(un(x,ie[ue].anchor),un(x,ie[ue].head))},origin:ne&&ne.origin};return wt(x,"beforeSelectionChange",x,te),x.cm&&wt(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?To(x.cm,te.ranges,te.ranges.length-1):z}function no(x,z,ne){var te=x.history.done,ie=jt(te);ie&&ie.ranges?(te[te.length-1]=z,nu(x,z,ne)):Sa(x,z,ne)}function Sa(x,z,ne){nu(x,z,ne),Wu(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function nu(x,z,ne){(Bn(x,"beforeSelectionChange")||x.cm&&Bn(x.cm,"beforeSelectionChange"))&&(z=Yd(x,z,ne));var te=ne&&ne.bias||(Yt(z.primary().head,x.sel.primary().head)<0?-1:1);Jd(x,ll(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&Qs(x.cm)}function Jd(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Pn(x.cm)),Ir(x,"cursorActivity",x))}function qd(x){Jd(x,ll(x,x.sel,null,!1))}function ll(x,z,ne,te){for(var ie,ue=0;ue<z.ranges.length;ue++){var me=z.ranges[ue],Me=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ue],De=Gu(x,me.anchor,Me&&Me.anchor,ne,te),Re=Gu(x,me.head,Me&&Me.head,ne,te);(ie||De!=me.anchor||Re!=me.head)&&(ie||(ie=z.ranges.slice(0,ue)),ie[ue]=new Pi(De,Re))}return ie?To(x.cm,ie,z.primIndex):z}function ro(x,z,ne,te,ie){var ue=Ve(x,z.line);if(ue.markedSpans)for(var me=0;me<ue.markedSpans.length;++me){var Me=ue.markedSpans[me],De=Me.marker,Re="selectLeft"in De?!De.selectLeft:De.inclusiveLeft,mt="selectRight"in De?!De.selectRight:De.inclusiveRight;if((Me.from==null||(Re?Me.from<=z.ch:Me.from<z.ch))&&(Me.to==null||(mt?Me.to>=z.ch:Me.to>z.ch))){if(ie&&(wt(De,"beforeCursorEnter"),De.explicitlyCleared))if(ue.markedSpans){--me;continue}else break;if(!De.atomic)continue;if(ne){var kt=De.find(te<0?1:-1),rn=void 0;if((te<0?mt:Re)&&(kt=hs(x,kt,-te,kt&&kt.line==z.line?ue:null)),kt&&kt.line==z.line&&(rn=Yt(kt,ne))&&(te<0?rn<0:rn>0))return ro(x,kt,z,te,ie)}var Qt=De.find(te<0?-1:1);return(te<0?Re:mt)&&(Qt=hs(x,Qt,te,Qt.line==z.line?ue:null)),Qt?ro(x,Qt,z,te,ie):null}}return z}function Gu(x,z,ne,te,ie){var ue=te||1,me=ro(x,z,ne,ue,ie)||!ie&&ro(x,z,ne,ue,!0)||ro(x,z,ne,-ue,ie)||!ie&&ro(x,z,ne,-ue,!0);return me||(x.cantEdit=!0,_t(x.first,0))}function hs(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?un(x,_t(z.line-1)):null:ne>0&&z.ch==(te||Ve(x,z.line)).text.length?z.line<x.first+x.size-1?_t(z.line+1,0):null:new _t(z.line,z.ch+ne)}function jc(x){x.setSelection(_t(x.firstLine(),0),_t(x.lastLine()),Ye)}function Uu(x,z,ne){var te={canceled:!1,from:z.from,to:z.to,text:z.text,origin:z.origin,cancel:function(){return te.canceled=!0}};return ne&&(te.update=function(ie,ue,me,Me){ie&&(te.from=un(x,ie)),ue&&(te.to=un(x,ue)),me&&(te.text=me),Me!==void 0&&(te.origin=Me)}),wt(x,"beforeChange",x,te),x.cm&&wt(x.cm,"beforeChange",x.cm,te),te.canceled?(x.cm&&(x.cm.curOp.updateInput=2),null):{from:te.from,to:te.to,text:te.text,origin:te.origin}}function Ls(x,z,ne){if(x.cm){if(!x.cm.curOp)return wa(x.cm,Ls)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((Bn(x,"beforeChange")||x.cm&&Bn(x.cm,"beforeChange"))&&(z=Uu(x,z,!0),!z))){var te=vr&&!ne&&dr(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)Vc(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else Vc(x,z)}}function Vc(x,z){if(!(z.text.length==1&&z.text[0]==""&&Yt(z.from,z.to)==0)){var ne=Ou(x,z);eu(x,z,ne,x.cm?x.cm.curOp.id:NaN),ul(x,z,ne,kn(x,z));var te=[];ds(x,function(ie,ue){!ue&&ht(te,ie.history)==-1&&(ru(ie.history,z),te.push(ie.history)),ul(ie,z,null,kn(ie,z))})}}function fs(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ue,me=x.sel,Me=z=="undo"?ie.done:ie.undone,De=z=="undo"?ie.undone:ie.done,Re=0;Re<Me.length&&(ue=Me[Re],!(ne?ue.ranges&&!ue.equals(x.sel):!ue.ranges));Re++);if(Re!=Me.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ue=Me.pop(),ue.ranges){if(tu(ue,De),ne&&!ue.equals(x.sel)){Sa(x,ue,{clearRedo:!1});return}me=ue}else if(te){Me.push(ue);return}else break;var mt=[];tu(me,De),De.push({changes:mt,generation:ie.generation}),ie.generation=ue.generation||++ie.maxGeneration;for(var kt=Bn(x,"beforeChange")||x.cm&&Bn(x.cm,"beforeChange"),rn=function(Vn){var br=ue.changes[Vn];if(br.origin=z,kt&&!Uu(x,br,!1))return Me.length=0,{};mt.push(zu(x,br));var Mr=Vn?Ou(x,br):jt(Me);ul(x,br,Mr,Wc(x,br)),!Vn&&x.cm&&x.cm.scrollIntoView({from:br.from,to:cs(br)});var Br=[];ds(x,function(Sr,Pr){!Pr&&ht(Br,Sr.history)==-1&&(ru(Sr.history,br),Br.push(Sr.history)),ul(Sr,br,null,Wc(Sr,br))})},Qt=ue.changes.length-1;Qt>=0;--Qt){var In=rn(Qt);if(In)return In.v}}}}function Xu(x,z){if(z!=0&&(x.first+=z,x.sel=new vo(Ft(x.sel.ranges,function(ie){return new Pi(_t(ie.anchor.line+z,ie.anchor.ch),_t(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){za(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)Ao(x.cm,te,"gutter")}}function ul(x,z,ne,te){if(x.cm&&!x.cm.curOp)return wa(x.cm,ul)(x,z,ne,te);if(z.to.line<x.first){Xu(x,z.text.length-1-(z.to.line-z.from.line));return}if(!(z.from.line>x.lastLine())){if(z.from.line<x.first){var ie=z.text.length-1-(x.first-z.from.line);Xu(x,ie),z={from:_t(x.first,0),to:_t(z.to.line+ie,z.to.ch),text:[jt(z.text)],origin:z.origin}}var ue=x.lastLine();z.to.line>ue&&(z={from:z.from,to:_t(ue,Ve(x,ue).text.length),text:[z.text[0]],origin:z.origin}),z.removed=lt(x,z.from,z.to),ne||(ne=Ou(x,z)),x.cm?Qd(x.cm,z,te):Ru(x,z,te),nu(x,ne,Ye),x.cantEdit&&Gu(x,_t(x.firstLine(),0))&&(x.cantEdit=!1)}}function Qd(x,z,ne){var te=x.doc,ie=x.display,ue=z.from,me=z.to,Me=!1,De=ue.line;x.options.lineWrapping||(De=zt(Ar(Ve(te,ue.line))),te.iter(De,me.line+1,function(Qt){if(Qt==ie.maxLine)return Me=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Pn(x),Ru(te,z,ne,Ya(x)),x.options.lineWrapping||(te.iter(De,ue.line+z.text.length,function(Qt){var In=Un(Qt);In>ie.maxLineLength&&(ie.maxLine=Qt,ie.maxLineLength=In,ie.maxLineChanged=!0,Me=!1)}),Me&&(x.curOp.updateMaxLine=!0)),er(te,ue.line),nl(x,400);var Re=z.text.length-(me.line-ue.line)-1;z.full?za(x):ue.line==me.line&&z.text.length==1&&!Kc(x.doc,z)?Ao(x,ue.line,"text"):za(x,ue.line,me.line+1,Re);var mt=Bn(x,"changes"),kt=Bn(x,"change");if(kt||mt){var rn={from:ue,to:me,text:z.text,removed:z.removed,origin:z.origin};kt&&Ir(x,"change",x,rn),mt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(rn)}x.display.selForContextMenu=null}function El(x,z,ne,te,ie){var ue;te||(te=ne),Yt(te,ne)<0&&(ue=[te,ne],ne=ue[0],te=ue[1]),typeof z=="string"&&(z=x.splitLines(z)),Ls(x,{from:ne,to:te,text:z,origin:ie})}function eh(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function th(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ue=x[ie],me=!0;if(ue.ranges){ue.copied||(ue=x[ie]=ue.deepCopy(),ue.copied=!0);for(var Me=0;Me<ue.ranges.length;Me++)eh(ue.ranges[Me].anchor,z,ne,te),eh(ue.ranges[Me].head,z,ne,te);continue}for(var De=0;De<ue.changes.length;++De){var Re=ue.changes[De];if(ne<Re.from.line)Re.from=_t(Re.from.line+te,Re.from.ch),Re.to=_t(Re.to.line+te,Re.to.ch);else if(z<=Re.to.line){me=!1;break}}me||(x.splice(0,ie+1),ie=0)}}function ru(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;th(x.done,ne,te,ie),th(x.undone,ne,te,ie)}function iu(x,z,ne,te){var ie=z,ue=z;return typeof z=="number"?ue=Ve(x,Fn(x,z)):ie=zt(z),ie==null?null:(te(ue,ie)&&x.cm&&Ao(x.cm,ie,ne),ue)}function As(x){this.lines=x,this.parent=null;for(var z=0,ne=0;ne<x.length;++ne)x[ne].parent=this,z+=x[ne].height;this.height=z}As.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var ne=x,te=x+z;ne<te;++ne){var ie=this.lines[ne];this.height-=ie.height,ri(ie),Ir(ie,"delete")}this.lines.splice(x,z)},collapse:function(x){x.push.apply(x,this.lines)},insertInner:function(x,z,ne){this.height+=ne,this.lines=this.lines.slice(0,x).concat(z).concat(this.lines.slice(x));for(var te=0;te<z.length;++te)z[te].parent=this},iterN:function(x,z,ne){for(var te=x+z;x<te;++x)if(ne(this.lines[x]))return!0}};function Ml(x){this.children=x;for(var z=0,ne=0,te=0;te<x.length;++te){var ie=x[te];z+=ie.chunkSize(),ne+=ie.height,ie.parent=this}this.size=z,this.height=ne,this.parent=null}Ml.prototype={chunkSize:function(){return this.size},removeInner:function(x,z){this.size-=z;for(var ne=0;ne<this.children.length;++ne){var te=this.children[ne],ie=te.chunkSize();if(x<ie){var ue=Math.min(z,ie-x),me=te.height;if(te.removeInner(x,ue),this.height-=me-te.height,ie==ue&&(this.children.splice(ne--,1),te.parent=null),(z-=ue)==0)break;x=0}else x-=ie}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof As))){var Me=[];this.collapse(Me),this.children=[new As(Me)],this.children[0].parent=this}},collapse:function(x){for(var z=0;z<this.children.length;++z)this.children[z].collapse(x)},insertInner:function(x,z,ne){this.size+=z.length,this.height+=ne;for(var te=0;te<this.children.length;++te){var ie=this.children[te],ue=ie.chunkSize();if(x<=ue){if(ie.insertInner(x,z,ne),ie.lines&&ie.lines.length>50){for(var me=ie.lines.length%25+25,Me=me;Me<ie.lines.length;){var De=new As(ie.lines.slice(Me,Me+=25));ie.height-=De.height,this.children.splice(++te,0,De),De.parent=this}ie.lines=ie.lines.slice(0,me),this.maybeSpill()}break}x-=ue}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new Ml(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=ht(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new Ml(x.children);te.parent=x,x.children=[te,ne],x=te}ne.parent=x.parent}while(x.children.length>10);x.parent.maybeSpill()}},iterN:function(x,z,ne){for(var te=0;te<this.children.length;++te){var ie=this.children[te],ue=ie.chunkSize();if(x<ue){var me=Math.min(z,ue-x);if(ie.iterN(x,me,ne))return!0;if((z-=me)==0)break;x=0}else x-=ue}}};var _l=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};_l.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=zt(ne);if(!(te==null||!z)){for(var ie=0;ie<z.length;++ie)z[ie]==this&&z.splice(ie--,1);z.length||(ne.widgets=null);var ue=ao(this);bt(ne,Math.max(0,ne.height-ue)),x&&(ha(x,function(){nh(x,ne,-ue),Ao(x,te,"widget")}),Ir(x,"lineWidgetCleared",x,this,te))}},_l.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=ao(this)-z;ie&&(bi(this.doc,te)||bt(te,te.height+ie),ne&&ha(ne,function(){ne.curOp.forceUpdate=!0,nh(ne,te,ie),Ir(ne,"lineWidgetChanged",ne,x,zt(te))}))},Tn(_l);function nh(x,z,ne){Yn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&Du(x,ne)}function rh(x,z,ne,te){var ie=new _l(x,ne,te),ue=x.cm;return ue&&ie.noHScroll&&(ue.display.alignWidgets=!0),iu(x,z,"widget",function(me){var Me=me.widgets||(me.widgets=[]);if(ie.insertAt==null?Me.push(ie):Me.splice(Math.min(Me.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=me,ue&&!bi(x,me)){var De=Yn(me)<x.scrollTop;bt(me,me.height+ao(ie)),De&&Du(ue,ie.height),ue.curOp.forceUpdate=!0}return!0}),ue&&Ir(ue,"lineWidgetAdded",ue,ie,typeof z=="number"?z:zt(z)),ie}var ih=0,Bs=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++ih};Bs.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Ds(x),Bn(this,"clear")){var ne=this.find();ne&&Ir(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ue=0;ue<this.lines.length;++ue){var me=this.lines[ue],Me=Xn(me.markedSpans,this);x&&!this.collapsed?Ao(x,zt(me),"text"):x&&(Me.to!=null&&(ie=zt(me)),Me.from!=null&&(te=zt(me))),me.markedSpans=Rn(me.markedSpans,Me),Me.from==null&&this.collapsed&&!bi(this.doc,me)&&x&&bt(me,as(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var De=0;De<this.lines.length;++De){var Re=Ar(this.lines[De]),mt=Un(Re);mt>x.display.maxLineLength&&(x.display.maxLine=Re,x.display.maxLineLength=mt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&za(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&qd(x.doc)),x&&Ir(x,"markerCleared",x,this,te,ie),z&&us(x),this.parent&&this.parent.clear()}},Bs.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var ue=this.lines[ie],me=Xn(ue.markedSpans,this);if(me.from!=null&&(ne=_t(z?ue:zt(ue),me.from),x==-1))return ne;if(me.to!=null&&(te=_t(z?ue:zt(ue),me.to),x==1))return te}return ne&&{from:ne,to:te}},Bs.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||ha(te,function(){var ie=z.line,ue=zt(z.line),me=Xa(te,ue);if(me&&($i(me),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!bi(ne.doc,ie)&&ne.height!=null){var Me=ne.height;ne.height=null;var De=ao(ne)-Me;De&&bt(ie,ie.height+De)}Ir(te,"markerChanged",te,x)})},Bs.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||ht(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},Bs.prototype.detachLine=function(x){if(this.lines.splice(ht(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},Tn(Bs);function ps(x,z,ne,te,ie){if(te&&te.shared)return Qi(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return wa(x.cm,ps)(x,z,ne,te,ie);var ue=new Bs(x,ie),me=Yt(z,ne);if(te&&ct(te,ue,!1),me>0||me==0&&ue.clearWhenEmpty!==!1)return ue;if(ue.replacedWith&&(ue.collapsed=!0,ue.widgetNode=St("span",[ue.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ue.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ue.widgetNode.insertLeft=!0)),ue.collapsed){if(Dr(x,z.line,z,ne,ue)||z.line!=ne.line&&Dr(x,ne.line,z,ne,ue))throw new Error("Inserting collapsed marker partially overlapping an existing one");Gn()}ue.addToHistory&&eu(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var Me=z.line,De=x.cm,Re;if(x.iter(Me,ne.line+1,function(kt){De&&ue.collapsed&&!De.options.lineWrapping&&Ar(kt)==De.display.maxLine&&(Re=!0),ue.collapsed&&Me!=z.line&&bt(kt,0),gr(kt,new sr(ue,Me==z.line?z.ch:null,Me==ne.line?ne.ch:null)),++Me}),ue.collapsed&&x.iter(z.line,ne.line+1,function(kt){bi(x,kt)&&bt(kt,0)}),ue.clearOnEnter&&an(ue,"beforeCursorEnter",function(){return ue.clear()}),ue.readOnly&&(pr(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ue.collapsed&&(ue.id=++ih,ue.atomic=!0),De){if(Re&&(De.curOp.updateMaxLine=!0),ue.collapsed)za(De,z.line,ne.line+1);else if(ue.className||ue.startStyle||ue.endStyle||ue.css||ue.attributes||ue.title)for(var mt=z.line;mt<=ne.line;mt++)Ao(De,mt,"text");ue.atomic&&qd(De.doc),Ir(De,"markerAdded",De,ue)}return ue}var vi=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};vi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Ir(this,"clear")}},vi.prototype.find=function(x,z){return this.primary.find(x,z)},Tn(vi);function Qi(x,z,ne,te,ie){te=ct(te),te.shared=!1;var ue=[ps(x,z,ne,te,ie)],me=ue[0],Me=te.widgetNode;return ds(x,function(De){Me&&(te.widgetNode=Me.cloneNode(!0)),ue.push(ps(De,un(De,z),un(De,ne),te,ie));for(var Re=0;Re<De.linked.length;++Re)if(De.linked[Re].isParent)return;me=jt(ue)}),new vi(ue,me)}function Ts(x){return x.findMarks(_t(x.first,0),x.clipPos(_t(x.lastLine())),function(z){return z.parent})}function ah(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ie=te.find(),ue=x.clipPos(ie.from),me=x.clipPos(ie.to);if(Yt(ue,me)){var Me=ps(x,ue,me,te.primary,te.primary.type);te.markers.push(Me),Me.parent=te}}}function Co(x){for(var z=function(te){var ie=x[te],ue=[ie.primary.doc];ds(ie.primary.doc,function(De){return ue.push(De)});for(var me=0;me<ie.markers.length;me++){var Me=ie.markers[me];ht(ue,Me.doc)==-1&&(Me.parent=null,ie.markers.splice(me--,1))}},ne=0;ne<x.length;ne++)z(ne)}var oh=0,ga=function(x,z,ne,te,ie){if(!(this instanceof ga))return new ga(x,z,ne,te,ie);ne==null&&(ne=0),Ml.call(this,[new As([new Kn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ue=_t(ne,0);this.sel=Fo(ue),this.history=new Ql(null),this.id=++oh,this.modeOption=z,this.lineSep=te,this.direction=ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),Ru(this,{from:ue,to:ue,text:x}),Sa(this,Fo(ue),Ye)};ga.prototype=se(Ml.prototype,{constructor:ga,iter:function(x,z,ne){ne?this.iterN(x-this.first,z-x,ne):this.iterN(this.first,this.first+this.size,x)},insert:function(x,z){for(var ne=0,te=0;te<z.length;++te)ne+=z[te].height;this.insertInner(x-this.first,z,ne)},remove:function(x,z){this.removeInner(x-this.first,z)},getValue:function(x){var z=Bt(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:Ba(function(x){var z=_t(this.first,0),ne=this.first+this.size-1;Ls(this,{from:z,to:_t(ne,Ve(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&el(this.cm,0,0),Sa(this,Fo(z),Ye)}),replaceRange:function(x,z,ne,te){z=un(this,z),ne=ne?un(this,ne):z,El(this,x,z,ne,te)},getRange:function(x,z,ne){var te=lt(this,un(this,x),un(this,z));return ne===!1?te:te.join(ne||this.lineSeparator())},getLine:function(x){var z=this.getLineHandle(x);return z&&z.text},getLineHandle:function(x){if(cn(this,x))return Ve(this,x)},getLineNumber:function(x){return zt(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=Ve(this,x)),Ar(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return un(this,x)},getCursor:function(x){var z=this.sel.primary(),ne;return x==null||x=="head"?ne=z.head:x=="anchor"?ne=z.anchor:x=="end"||x=="to"||x===!1?ne=z.to():ne=z.from(),ne},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ba(function(x,z,ne){Zc(this,un(this,typeof x=="number"?_t(x,z||0):x),null,ne)}),setSelection:Ba(function(x,z,ne){Zc(this,un(this,x),un(this,z||x),ne)}),extendSelection:Ba(function(x,z,ne){sl(this,un(this,x),z&&un(this,z),ne)}),extendSelections:Ba(function(x,z){Fr(this,et(this,x),z)}),extendSelectionsBy:Ba(function(x,z){var ne=Ft(this.sel.ranges,x);Fr(this,et(this,ne),z)}),setSelections:Ba(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new Pi(un(this,x[ie].anchor),un(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),Sa(this,To(this.cm,te,z),ne)}}),addSelection:Ba(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new Pi(un(this,x),un(this,z||x))),Sa(this,To(this.cm,te,te.length-1),ne)}),getSelection:function(x){for(var z=this.sel.ranges,ne,te=0;te<z.length;te++){var ie=lt(this,z[te].from(),z[te].to());ne=ne?ne.concat(ie):ie}return x===!1?ne:ne.join(x||this.lineSeparator())},getSelections:function(x){for(var z=[],ne=this.sel.ranges,te=0;te<ne.length;te++){var ie=lt(this,ne[te].from(),ne[te].to());x!==!1&&(ie=ie.join(x||this.lineSeparator())),z[te]=ie}return z},replaceSelection:function(x,z,ne){for(var te=[],ie=0;ie<this.sel.ranges.length;ie++)te[ie]=x;this.replaceSelections(te,z,ne||"+input")},replaceSelections:Ba(function(x,z,ne){for(var te=[],ie=this.sel,ue=0;ue<ie.ranges.length;ue++){var me=ie.ranges[ue];te[ue]={from:me.from(),to:me.to(),text:this.splitLines(x[ue]),origin:ne}}for(var Me=z&&z!="end"&&$u(this,te,z),De=te.length-1;De>=0;De--)Ls(this,te[De]);Me?no(this,Me):this.cm&&Qs(this.cm)}),undo:Ba(function(){fs(this,"undo")}),redo:Ba(function(){fs(this,"redo")}),undoSelection:Ba(function(){fs(this,"undo",!0)}),redoSelection:Ba(function(){fs(this,"redo",!0)}),setExtending:function(x){this.extend=x},getExtending:function(){return this.extend},historySize:function(){for(var x=this.history,z=0,ne=0,te=0;te<x.done.length;te++)x.done[te].ranges||++z;for(var ie=0;ie<x.undone.length;ie++)x.undone[ie].ranges||++ne;return{undo:z,redo:ne}},clearHistory:function(){var x=this;this.history=new Ql(this.history.maxGeneration),ds(this,function(z){return z.history=x.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(x){return x&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(x){return this.history.generation==(x||this.cleanGeneration)},getHistory:function(){return{done:ol(this.history.done),undone:ol(this.history.undone)}},setHistory:function(x){var z=this.history=new Ql(this.history.maxGeneration);z.done=ol(x.done.slice(0),null,!0),z.undone=ol(x.undone.slice(0),null,!0)},setGutterMarker:Ba(function(x,z,ne){return iu(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&le(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:Ba(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&iu(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,le(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!cn(this,x)||(z=x,x=Ve(this,x),!x))return null}else if(z=zt(x),z==null)return null;return{line:z,handle:x,text:x.text,gutterMarkers:x.gutterMarkers,textClass:x.textClass,bgClass:x.bgClass,wrapClass:x.wrapClass,widgets:x.widgets}},addLineClass:Ba(function(x,z,ne){return iu(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass";if(!te[ie])te[ie]=ne;else{if(Se(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:Ba(function(x,z,ne){return iu(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",ue=te[ie];if(ue)if(ne==null)te[ie]=null;else{var me=ue.match(Se(ne));if(!me)return!1;var Me=me.index+me[0].length;te[ie]=ue.slice(0,me.index)+(!me.index||Me==ue.length?"":" ")+ue.slice(Me)||null}else return!1;return!0})}),addLineWidget:Ba(function(x,z,ne){return rh(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return ps(this,un(this,x),un(this,z),ne,ne&&ne.type||"range")},setBookmark:function(x,z){var ne={replacedWith:z&&(z.nodeType==null?z.widget:z),insertLeft:z&&z.insertLeft,clearWhenEmpty:!1,shared:z&&z.shared,handleMouseEvents:z&&z.handleMouseEvents};return x=un(this,x),ps(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=un(this,x);var z=[],ne=Ve(this,x.line).markedSpans;if(ne)for(var te=0;te<ne.length;++te){var ie=ne[te];(ie.from==null||ie.from<=x.ch)&&(ie.to==null||ie.to>=x.ch)&&z.push(ie.marker.parent||ie.marker)}return z},findMarks:function(x,z,ne){x=un(this,x),z=un(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(ue){var me=ue.markedSpans;if(me)for(var Me=0;Me<me.length;Me++){var De=me[Me];!(De.to!=null&&ie==x.line&&x.ch>=De.to||De.from==null&&ie!=x.line||De.from!=null&&ie==z.line&&De.from>=z.ch)&&(!ne||ne(De.marker))&&te.push(De.marker.parent||De.marker)}++ie}),te},getAllMarks:function(){var x=[];return this.iter(function(z){var ne=z.markedSpans;if(ne)for(var te=0;te<ne.length;++te)ne[te].from!=null&&x.push(ne[te].marker)}),x},posFromIndex:function(x){var z,ne=this.first,te=this.lineSeparator().length;return this.iter(function(ie){var ue=ie.text.length+te;if(ue>x)return z=x,!0;x-=ue,++ne}),un(this,_t(ne,z))},indexFromPos:function(x){x=un(this,x);var z=x.ch;if(x.line<this.first||x.ch<0)return 0;var ne=this.lineSeparator().length;return this.iter(this.first,x.line,function(te){z+=te.text.length+ne}),z},copy:function(x){var z=new ga(Bt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return z.scrollTop=this.scrollTop,z.scrollLeft=this.scrollLeft,z.sel=this.sel,z.extend=!1,x&&(z.history.undoDepth=this.history.undoDepth,z.setHistory(this.getHistory())),z},linkedDoc:function(x){x||(x={});var z=this.first,ne=this.first+this.size;x.from!=null&&x.from>z&&(z=x.from),x.to!=null&&x.to<ne&&(ne=x.to);var te=new ga(Bt(this,z,ne),x.mode||this.modeOption,z,this.lineSep,this.direction);return x.sharedHist&&(te.history=this.history),(this.linked||(this.linked=[])).push({doc:te,sharedHist:x.sharedHist}),te.linked=[{doc:this,isParent:!0,sharedHist:x.sharedHist}],ah(te,Ts(this)),te},unlinkDoc:function(x){if(x instanceof oi&&(x=x.doc),this.linked)for(var z=0;z<this.linked.length;++z){var ne=this.linked[z];if(ne.doc==x){this.linked.splice(z,1),x.unlinkDoc(this),Co(Ts(this));break}}if(x.history==this.history){var te=[x.id];ds(x,function(ie){return te.push(ie.id)},!0),x.history=new Ql(null),x.history.done=ol(this.history.done,te),x.history.undone=ol(this.history.undone,te)}},iterLinkedDocs:function(x){ds(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):Yr(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Ba(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&Nu(this.cm))})}),ga.prototype.eachLine=ga.prototype.iter;var Gc=0;function Qh(x){var z=this;if(kl(z),!(Nt(z,x)||oo(z.display,x))){nr(x),xe&&(Gc=+new Date);var ne=xo(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,ue=Array(ie),me=0,Me=function(){++me==ie&&wa(z,function(){ne=un(z.doc,ne);var Qt={from:ne,to:ne,text:z.doc.splitLines(ue.filter(function(In){return In!=null}).join(z.doc.lineSeparator())),origin:"paste"};Ls(z.doc,Qt),no(z.doc,Fo(un(z.doc,ne),un(z.doc,cs(Qt))))})()},De=function(Qt,In){if(z.options.allowDropFileTypes&&ht(z.options.allowDropFileTypes,Qt.type)==-1){Me();return}var Vn=new FileReader;Vn.onerror=function(){return Me()},Vn.onload=function(){var br=Vn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(br)){Me();return}ue[In]=br,Me()},Vn.readAsText(Qt)},Re=0;Re<te.length;Re++)De(te[Re],Re);else{if(z.state.draggingText&&z.doc.sel.contains(ne)>-1){z.state.draggingText(x),setTimeout(function(){return z.display.input.focus()},20);return}try{var mt=x.dataTransfer.getData("Text");if(mt){var kt;if(z.state.draggingText&&!z.state.draggingText.copy&&(kt=z.listSelections()),nu(z.doc,Fo(ne,ne)),kt)for(var rn=0;rn<kt.length;++rn)El(z.doc,"",kt[rn].anchor,kt[rn].head,"drag");z.replaceSelection(mt,"around","paste"),z.display.input.focus()}}catch(Qt){}}}}function ef(x,z){if(xe&&(!x.state.draggingText||+new Date-Gc<100)){Er(z);return}if(!(Nt(x,z)||oo(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!it)){var ne=je("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Oe&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Oe&&ne.parentNode.removeChild(ne)}}function Uc(x,z){var ne=xo(x,z);if(ne){var te=document.createDocumentFragment();_c(x,ne,te),x.display.dragCursor||(x.display.dragCursor=je("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),gt(x.display.dragCursor,te)}}function kl(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function Dl(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),ne=[],te=0;te<z.length;te++){var ie=z[te].CodeMirror;ie&&ne.push(ie)}ne.length&&ne[0].operation(function(){for(var ue=0;ue<ne.length;ue++)x(ne[ue])})}}var ur=!1;function Xc(){ur||(Yu(),ur=!0)}function Yu(){var x;an(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,Dl(Ju)},100))}),an(window,"blur",function(){return Dl(qs)})}function Ju(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Ro={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"},au=0;au<10;au++)Ro[au+48]=Ro[au+96]=String(au);for(var qu=65;qu<=90;qu++)Ro[qu]=String.fromCharCode(qu);for(var ou=1;ou<=12;ou++)Ro[ou+111]=Ro[ou+63235]="F"+ou;var ji={};ji.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"},ji.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"},ji.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"},ji.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"]},ji.default=tt?ji.macDefault:ji.pcDefault;function tf(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,ue,me=0;me<z.length-1;me++){var Me=z[me];if(/^(cmd|meta|m)$/i.test(Me))ue=!0;else if(/^a(lt)?$/i.test(Me))ne=!0;else if(/^(c|ctrl|control)$/i.test(Me))te=!0;else if(/^s(hift)?$/i.test(Me))ie=!0;else throw new Error("Unrecognized modifier name: "+Me)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),ue&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function Yc(x){var z={};for(var ne in x)if(x.hasOwnProperty(ne)){var te=x[ne];if(/^(name|fallthrough|(de|at)tach)$/.test(ne))continue;if(te=="..."){delete x[ne];continue}for(var ie=Ft(ne.split(" "),tf),ue=0;ue<ie.length;ue++){var me=void 0,Me=void 0;ue==ie.length-1?(Me=ie.join(" "),me=te):(Me=ie.slice(0,ue+1).join(" "),me="...");var De=z[Me];if(!De)z[Me]=me;else if(De!=me)throw new Error("Inconsistent bindings for "+Me)}delete x[ne]}for(var Re in z)x[Re]=z[Re];return x}function ms(x,z,ne,te){z=io(z);var ie=z.call?z.call(x,te):z[x];if(ie===!1)return"nothing";if(ie==="...")return"multi";if(ie!=null&&ne(ie))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return ms(x,z.fallthrough,ne,te);for(var ue=0;ue<z.fallthrough.length;ue++){var me=ms(x,z.fallthrough[ue],ne,te);if(me)return me}}}function su(x){var z=typeof x=="string"?x:Ro[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function Is(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(Xe?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(Xe?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function cl(x,z){if(Oe&&x.keyCode==34&&x.char)return!1;var ne=Ro[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),Is(ne,x,z))}function io(x){return typeof x=="string"?ji[x]:x}function Io(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ue=z(ne[ie]);te.length&&Yt(ue.from,jt(te).to)<=0;){var me=te.pop();if(Yt(me.from,ue.from)<0){ue.from=me.from;break}}te.push(ue)}ha(x,function(){for(var Me=te.length-1;Me>=0;Me--)El(x.doc,"",te[Me].from,te[Me].to,"+delete");Qs(x)})}function Ha(x,z,ne){var te=Rt(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Go(x,z,ne){var te=Ha(x,z.ch,ne);return te==null?null:new _t(z.line,te,ne<0?"after":"before")}function dl(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ue=Sn(ne,z.doc.direction);if(ue){var me=ie<0?jt(ue):ue[0],Me=ie<0==(me.level==1),De=Me?"after":"before",Re;if(me.level>0||z.doc.direction=="rtl"){var mt=Pa(z,ne);Re=ie<0?ne.text.length-1:0;var kt=Ai(z,mt,Re).top;Re=Pt(function(rn){return Ai(z,mt,rn).top==kt},ie<0==(me.level==1)?me.from:me.to-1,Re),De=="before"&&(Re=Ha(ne,Re,1))}else Re=ie<0?me.to:me.from;return new _t(te,Re,De)}}return new _t(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function Uo(x,z,ne,te){var ie=Sn(z,x.doc.direction);if(!ie)return Go(z,ne,te);ne.ch>=z.text.length?(ne.ch=z.text.length,ne.sticky="before"):ne.ch<=0&&(ne.ch=0,ne.sticky="after");var ue=en(ie,ne.ch,ne.sticky),me=ie[ue];if(x.doc.direction=="ltr"&&me.level%2==0&&(te>0?me.to>ne.ch:me.from<ne.ch))return Go(z,ne,te);var Me=function(Mr,Br){return Ha(z,Mr instanceof _t?Mr.ch:Mr,Br)},De,Re=function(Mr){return x.options.lineWrapping?(De=De||Pa(x,z),Hl(x,z,De,Mr)):{begin:0,end:z.text.length}},mt=Re(ne.sticky=="before"?Me(ne,-1):ne.ch);if(x.doc.direction=="rtl"||me.level==1){var kt=me.level==1==te<0,rn=Me(ne,kt?1:-1);if(rn!=null&&(kt?rn<=me.to&&rn<=mt.end:rn>=me.from&&rn>=mt.begin)){var Qt=kt?"before":"after";return new _t(ne.line,rn,Qt)}}var In=function(Mr,Br,Sr){for(var Pr=function(Gi,Fa){return Fa?new _t(ne.line,Me(Gi,1),"before"):new _t(ne.line,Gi,"after")};Mr>=0&&Mr<ie.length;Mr+=Br){var Gr=ie[Mr],Xr=Br>0==(Gr.level!=1),gi=Xr?Sr.begin:Me(Sr.end,-1);if(Gr.from<=gi&&gi<Gr.to||(gi=Xr?Gr.from:Me(Gr.to,-1),Sr.begin<=gi&&gi<Sr.end))return Pr(gi,Xr)}},Vn=In(ue+te,te,mt);if(Vn)return Vn;var br=te>0?mt.end:Me(mt.begin,-1);return br!=null&&!(te>0&&br==z.text.length)&&(Vn=In(te>0?0:ie.length-1,te,Re(br)),Vn)?Vn:null}var Ll={selectAll:jc,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),Ye)},killLine:function(x){return Io(x,function(z){if(z.empty()){var ne=Ve(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:_t(z.head.line+1,0)}:{from:z.head,to:_t(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return Io(x,function(z){return{from:_t(z.from().line,0),to:un(x.doc,_t(z.to().line+1,0))}})},delLineLeft:function(x){return Io(x,function(z){return{from:_t(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return Io(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return{from:te,to:z.from()}})},delWrappedLineRight:function(x){return Io(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div");return{from:z.from(),to:te}})},undo:function(x){return x.undo()},redo:function(x){return x.redo()},undoSelection:function(x){return x.undoSelection()},redoSelection:function(x){return x.redoSelection()},goDocStart:function(x){return x.extendSelection(_t(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(_t(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return Jc(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return sh(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return qc(x,z.head.line)},{origin:"+move",bias:-1})},goLineRight:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div")},At)},goLineLeft:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:0,top:ne},"div")},At)},goLineLeftSmart:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return te.ch<x.getLine(te.line).search(/\S/)?sh(x,z.head):te},At)},goLineUp:function(x){return x.moveV(-1,"line")},goLineDown:function(x){return x.moveV(1,"line")},goPageUp:function(x){return x.moveV(-1,"page")},goPageDown:function(x){return x.moveV(1,"page")},goCharLeft:function(x){return x.moveH(-1,"char")},goCharRight:function(x){return x.moveH(1,"char")},goColumnLeft:function(x){return x.moveH(-1,"column")},goColumnRight:function(x){return x.moveH(1,"column")},goWordLeft:function(x){return x.moveH(-1,"word")},goGroupRight:function(x){return x.moveH(1,"group")},goGroupLeft:function(x){return x.moveH(-1,"group")},goWordRight:function(x){return x.moveH(1,"word")},delCharBefore:function(x){return x.deleteH(-1,"codepoint")},delCharAfter:function(x){return x.deleteH(1,"char")},delWordBefore:function(x){return x.deleteH(-1,"word")},delWordAfter:function(x){return x.deleteH(1,"word")},delGroupBefore:function(x){return x.deleteH(-1,"group")},delGroupAfter:function(x){return x.deleteH(1,"group")},indentAuto:function(x){return x.indentSelection("smart")},indentMore:function(x){return x.indentSelection("add")},indentLess:function(x){return x.indentSelection("subtract")},insertTab:function(x){return x.replaceSelection(" ")},insertSoftTab:function(x){for(var z=[],ne=x.listSelections(),te=x.options.tabSize,ie=0;ie<ne.length;ie++){var ue=ne[ie].from(),me=Pe(x.getLine(ue.line),ue.ch,te);z.push(hn(te-me%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return ha(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ue=Ve(x.doc,ie.line).text;if(ue){if(ie.ch==ue.length&&(ie=new _t(ie.line,ie.ch-1)),ie.ch>0)ie=new _t(ie.line,ie.ch+1),x.replaceRange(ue.charAt(ie.ch-1)+ue.charAt(ie.ch-2),_t(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var me=Ve(x.doc,ie.line-1).text;me&&(ie=new _t(ie.line,1),x.replaceRange(ue.charAt(0)+x.doc.lineSeparator()+me.charAt(me.length-1),_t(ie.line-1,me.length-1),ie,"+transpose"))}}ne.push(new Pi(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return ha(x,function(){for(var z=x.listSelections(),ne=z.length-1;ne>=0;ne--)x.replaceRange(x.doc.lineSeparator(),z[ne].anchor,z[ne].head,"+input");z=x.listSelections();for(var te=0;te<z.length;te++)x.indentLine(z[te].from().line,null,!0);Qs(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function Jc(x,z){var ne=Ve(x.doc,z),te=Ar(ne);return te!=ne&&(z=zt(te)),dl(!0,x,te,z,1)}function qc(x,z){var ne=Ve(x.doc,z),te=ui(ne);return te!=ne&&(z=zt(te)),dl(!0,x,ne,z,-1)}function sh(x,z){var ne=Jc(x,z.line),te=Ve(x.doc,ne.line),ie=Sn(te,x.doc.direction);if(!ie||ie[0].level==0){var ue=Math.max(ne.ch,te.text.search(/\S/)),me=z.line==ne.line&&z.ch<=ue&&z.ch;return _t(ne.line,me?0:ue,ne.sticky)}return ne}function Ca(x,z,ne){if(typeof z=="string"&&(z=Ll[z],!z))return!1;x.display.input.ensurePolled();var te=x.display.shift,ie=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ne&&(x.display.shift=!1),ie=z(x)!=Ht}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function Xo(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=ms(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&ms(z,x.options.extraKeys,ne,x)||ms(z,x.options.keyMap,ne,x)}var nf=new ye;function Al(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(su(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:nf.set(50,function(){x.state.keySeq==ie&&(x.state.keySeq=null,x.display.input.reset())}),Qu(x,ie+" "+z,ne,te))return!0}return Qu(x,z,ne,te)}function Qu(x,z,ne,te){var ie=Xo(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&Ir(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(nr(ne),_u(x)),!!ie}function wi(x,z){var ne=cl(z,!0);return ne?z.shiftKey&&!x.state.keySeq?Al(x,"Shift-"+ne,z,function(te){return Ca(x,te,!0)})||Al(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Ca(x,te)}):Al(x,ne,z,function(te){return Ca(x,te)}):!1}function Bl(x,z,ne){return Al(x,"'"+ne+"'",z,function(te){return Ca(x,te,!0)})}var vs=null;function lu(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=Ge(),!Nt(z,x))){xe&&ke<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=wi(z,x);Oe&&(vs=te?ne:null,!te&&ne==88&&!Ur&&(tt?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),be&&!tt&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&An(z)}}function An(x){var z=x.display.lineDiv;Dt(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(Ke(z,"CodeMirror-crosshair"),ut(document,"keyup",ne),ut(document,"mouseover",ne))}an(document,"keyup",ne),an(document,"mouseover",ne)}function lh(x){x.keyCode==16&&(this.doc.sel.shift=!1),Nt(this,x)}function uh(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(oo(z.display,x)||Nt(z,x)||x.ctrlKey&&!x.altKey||tt&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Oe&&ne==vs){vs=null,nr(x);return}if(!(Oe&&(!x.which||x.which<10)&&wi(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(Bl(z,x,ie)||z.display.input.onKeyPress(x))}}}var Qc=400,ed=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};ed.prototype.compare=function(x,z,ne){return this.time+Qc>x&&Yt(z,this.pos)==0&&ne==this.button};var gs,uu;function rf(x,z){var ne=+new Date;return uu&&uu.compare(ne,x,z)?(gs=uu=null,"triple"):gs&&gs.compare(ne,x,z)?(uu=new ed(ne,x,z),gs=null,"double"):(gs=new ed(ne,x,z),uu=null,"single")}function Wa(x){var z=this,ne=z.display;if(!(Nt(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,oo(ne,x)){Te||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!Ja(z,x)){var te=xo(z,x),ie=Jn(x),ue=te?rf(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&Ps(z,ie,te,ue,x))&&(ie==1?te?tc(z,te,ue,x):_r(x)==ne.scroller&&nr(x):ie==2?(te&&sl(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(He?z.display.input.onContextMenu(x):kc(z)))}}}function Ps(x,z,ne,te,ie){var ue="Click";return te=="double"?ue="Double"+ue:te=="triple"&&(ue="Triple"+ue),ue=(z==1?"Left":z==2?"Middle":"Right")+ue,Al(x,Is(ue,ie),ie,function(me){if(typeof me=="string"&&(me=Ll[me]),!me)return!1;var Me=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),Me=me(x,ne)!=Ht}finally{x.state.suppressEdits=!1}return Me})}function ec(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ue=pt?ne.shiftKey&&ne.metaKey:ne.altKey;ie.unit=ue?"rectangle":z=="single"?"char":z=="double"?"word":"line"}return(ie.extend==null||x.doc.extend)&&(ie.extend=x.doc.extend||ne.shiftKey),ie.addNew==null&&(ie.addNew=tt?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(tt?ne.altKey:ne.ctrlKey)),ie}function tc(x,z,ne,te){xe?setTimeout(Ct(Sl,x),0):x.curOp.focus=Ge();var ie=ec(x,ne,te),ue=x.doc.sel,me;x.options.dragDrop&&zr&&!x.isReadOnly()&&ne=="single"&&(me=ue.contains(z))>-1&&(Yt((me=ue.ranges[me]).from(),z)<0||z.xRel>0)&&(Yt(me.to(),z)>0||z.xRel<0)?af(x,te,z,ie):td(x,te,z,ie)}function af(x,z,ne,te){var ie=x.display,ue=!1,me=wa(x,function(Re){Te&&(ie.scroller.draggable=!1),x.state.draggingText=!1,ut(ie.wrapper.ownerDocument,"mouseup",me),ut(ie.wrapper.ownerDocument,"mousemove",Me),ut(ie.scroller,"dragstart",De),ut(ie.scroller,"drop",me),ue||(nr(Re),te.addNew||sl(x.doc,ne,null,null,te.extend),Te&&!it||xe&&ke==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),Me=function(Re){ue=ue||Math.abs(z.clientX-Re.clientX)+Math.abs(z.clientY-Re.clientY)>=10},De=function(){return ue=!0};Te&&(ie.scroller.draggable=!0),x.state.draggingText=me,me.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),an(ie.wrapper.ownerDocument,"mouseup",me),an(ie.wrapper.ownerDocument,"mousemove",Me),an(ie.scroller,"dragstart",De),an(ie.scroller,"drop",me),kc(x),setTimeout(function(){return ie.input.focus()},20)}function ch(x,z,ne){if(ne=="char")return new Pi(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new Pi(_t(z.line,0),un(x.doc,_t(z.line+1,0)));var te=ne(x,z);return new Pi(te.from,te.to)}function td(x,z,ne,te){var ie=x.display,ue=x.doc;nr(z);var me,Me,De=ue.sel,Re=De.ranges;if(te.addNew&&!te.extend?(Me=ue.sel.contains(ne),Me>-1?me=Re[Me]:me=new Pi(ne,ne)):(me=ue.sel.primary(),Me=ue.sel.primIndex),te.unit=="rectangle")te.addNew||(me=new Pi(ne,ne)),ne=xo(x,z,!0,!0),Me=-1;else{var mt=ch(x,ne,te.unit);te.extend?me=Vu(me,mt.anchor,mt.head,te.extend):me=mt}te.addNew?Me==-1?(Me=Re.length,Sa(ue,To(x,Re.concat([me]),Me),{scroll:!1,origin:"*mouse"})):Re.length>1&&Re[Me].empty()&&te.unit=="char"&&!te.extend?(Sa(ue,To(x,Re.slice(0,Me).concat(Re.slice(Me+1)),0),{scroll:!1,origin:"*mouse"}),De=ue.sel):So(ue,Me,me,Je):(Me=0,Sa(ue,new vo([me],0),Je),De=ue.sel);var kt=ne;function rn(Sr){if(Yt(kt,Sr)!=0)if(kt=Sr,te.unit=="rectangle"){for(var Pr=[],Gr=x.options.tabSize,Xr=Pe(Ve(ue,ne.line).text,ne.ch,Gr),gi=Pe(Ve(ue,Sr.line).text,Sr.ch,Gr),Gi=Math.min(Xr,gi),Fa=Math.max(Xr,gi),ua=Math.min(ne.line,Sr.line),uo=Math.min(x.lastLine(),Math.max(ne.line,Sr.line));ua<=uo;ua++){var co=Ve(ue,ua).text,Ea=mn(co,Gi,Gr);Gi==Fa?Pr.push(new Pi(_t(ua,Ea),_t(ua,Ea))):co.length>Ea&&Pr.push(new Pi(_t(ua,Ea),_t(ua,mn(co,Fa,Gr))))}Pr.length||Pr.push(new Pi(ne,ne)),Sa(ue,To(x,De.ranges.slice(0,Me).concat(Pr),Me),{origin:"*mouse",scroll:!1}),x.scrollIntoView(Sr)}else{var ho=me,li=ch(x,Sr,te.unit),fa=ho.anchor,ca;Yt(li.anchor,fa)>0?(ca=li.head,fa=Mn(ho.from(),li.anchor)):(ca=li.anchor,fa=gn(ho.to(),li.head));var pa=De.ranges.slice(0);pa[Me]=dh(x,new Pi(un(ue,fa),ca)),Sa(ue,To(x,pa,Me),Je)}}var Qt=ie.wrapper.getBoundingClientRect(),In=0;function Vn(Sr){var Pr=++In,Gr=xo(x,Sr,!0,te.unit=="rectangle");if(Gr)if(Yt(Gr,kt)!=0){x.curOp.focus=Ge(),rn(Gr);var Xr=Aa(ie,ue);(Gr.line>=Xr.to||Gr.line<Xr.from)&&setTimeout(wa(x,function(){In==Pr&&Vn(Sr)}),150)}else{var gi=Sr.clientY<Qt.top?-20:Sr.clientY>Qt.bottom?20:0;gi&&setTimeout(wa(x,function(){In==Pr&&(ie.scroller.scrollTop+=gi,Vn(Sr))}),50)}}function br(Sr){x.state.selectingText=!1,In=1/0,Sr&&(nr(Sr),ie.input.focus()),ut(ie.wrapper.ownerDocument,"mousemove",Mr),ut(ie.wrapper.ownerDocument,"mouseup",Br),ue.history.lastSelOrigin=null}var Mr=wa(x,function(Sr){Sr.buttons===0||!Jn(Sr)?br(Sr):Vn(Sr)}),Br=wa(x,br);x.state.selectingText=Br,an(ie.wrapper.ownerDocument,"mousemove",Mr),an(ie.wrapper.ownerDocument,"mouseup",Br)}function dh(x,z){var ne=z.anchor,te=z.head,ie=Ve(x.doc,ne.line);if(Yt(ne,te)==0&&ne.sticky==te.sticky)return z;var ue=Sn(ie);if(!ue)return z;var me=en(ue,ne.ch,ne.sticky),Me=ue[me];if(Me.from!=ne.ch&&Me.to!=ne.ch)return z;var De=me+(Me.from==ne.ch==(Me.level!=1)?0:1);if(De==0||De==ue.length)return z;var Re;if(te.line!=ne.line)Re=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var mt=en(ue,te.ch,te.sticky),kt=mt-me||(te.ch-ne.ch)*(Me.level==1?-1:1);mt==De-1||mt==De?Re=kt<0:Re=kt>0}var rn=ue[De+(Re?-1:0)],Qt=Re==(rn.level==1),In=Qt?rn.from:rn.to,Vn=Qt?"after":"before";return ne.ch==In&&ne.sticky==Vn?z:new Pi(new _t(ne.line,In,Vn),te)}function cu(x,z,ne,te){var ie,ue;if(z.touches)ie=z.touches[0].clientX,ue=z.touches[0].clientY;else try{ie=z.clientX,ue=z.clientY}catch(rn){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&nr(z);var me=x.display,Me=me.lineDiv.getBoundingClientRect();if(ue>Me.bottom||!Bn(x,ne))return ar(z);ue-=Me.top-me.viewOffset;for(var De=0;De<x.display.gutterSpecs.length;++De){var Re=me.gutters.childNodes[De];if(Re&&Re.getBoundingClientRect().right>=ie){var mt=tn(x.doc,ue),kt=x.display.gutterSpecs[De];return wt(x,ne,x,mt,kt.className,z),ar(z)}}}function Ja(x,z){return cu(x,z,"gutterClick",!0)}function Os(x,z){oo(x.display,z)||hh(x,z)||Nt(x,z,"contextmenu")||He||x.display.input.onContextMenu(z)}function hh(x,z){return Bn(x,"gutterContextMenu")?cu(x,z,"gutterContextMenu",!1):!1}function nd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Zi(x)}var $s={toString:function(){return"CodeMirror.Init"}},fh={},nc={};function of(x){var z=x.optionHandlers;function ne(te,ie,ue,me){x.defaults[te]=ie,ue&&(z[te]=me?function(Me,De,Re){Re!=$s&&ue(Me,De,Re)}:ue)}x.defineOption=ne,x.Init=$s,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,Fu(te)},!0),ne("indentUnit",2,Fu,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){al(te),Zi(te),za(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ue=[],me=te.doc.first;te.doc.iter(function(De){for(var Re=0;;){var mt=De.text.indexOf(ie,Re);if(mt==-1)break;Re=mt+ie.length,ue.push(_t(me,mt))}me++});for(var Me=ue.length-1;Me>=0;Me--)El(te.doc,ie,ue[Me],_t(ue[Me].line,ue[Me].ch+ie.length))}}),ne("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(te,ie,ue){te.state.specialChars=new RegExp(ie.source+(ie.test(" ")?"":"| "),"g"),ue!=$s&&te.refresh()}),ne("specialCharPlaceholder",Li,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",at?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ne("spellcheck",!1,function(te,ie){return te.getInputField().spellcheck=ie},!0),ne("autocorrect",!1,function(te,ie){return te.getInputField().autocorrect=ie},!0),ne("autocapitalize",!1,function(te,ie){return te.getInputField().autocapitalize=ie},!0),ne("rtlMoveVisually",!Lt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){nd(te),Cl(te)},!0),ne("keyMap","default",function(te,ie,ue){var me=io(ie),Me=ue!=$s&&io(ue);Me&&Me.detach&&Me.detach(te,me),me.attach&&me.attach(te,Me||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,ph,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=Pu(ie,te.options.lineNumbers),Cl(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?Ni(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return ks(te)},!0),ne("scrollbarStyle","native",function(te){Tc(te),ks(te),te.display.scrollbars.setScrollTop(te.doc.scrollTop),te.display.scrollbars.setScrollLeft(te.doc.scrollLeft)},!0),ne("lineNumbers",!1,function(te,ie){te.display.gutterSpecs=Pu(te.options.gutters,ie),Cl(te)},!0),ne("firstLineNumber",1,Cl,!0),ne("lineNumberFormatter",function(te){return te},Cl,!0),ne("showCursorWhenSelecting",!1,wl,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(qs(te),te.display.input.blur()),te.display.input.readOnlyChanged(ie)}),ne("screenReaderLabel",null,function(te,ie){ie=ie===""?null:ie,te.display.input.screenReaderLabelChanged(ie)}),ne("disableInput",!1,function(te,ie){ie||te.display.input.reset()},!0),ne("dragDrop",!0,sf),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,wl,!0),ne("singleCursorHeightPerLine",!0,wl,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,al,!0),ne("addModeClass",!1,al,!0),ne("pollInterval",100),ne("undoDepth",200,function(te,ie){return te.doc.history.undoDepth=ie}),ne("historyEventDelay",1250),ne("viewportMargin",10,function(te){return te.refresh()},!0),ne("maxHighlightLength",1e4,al,!0),ne("moveInputWithCursor",!0,function(te,ie){ie||te.display.input.resetPosition()}),ne("tabindex",null,function(te,ie){return te.display.input.getField().tabIndex=ie||""}),ne("autofocus",null),ne("direction","ltr",function(te,ie){return te.doc.setDirection(ie)},!0),ne("phrases",null)}function sf(x,z,ne){var te=ne&&ne!=$s;if(!z!=!te){var ie=x.display.dragFunctions,ue=z?an:ut;ue(x.display.scroller,"dragstart",ie.start),ue(x.display.scroller,"dragenter",ie.enter),ue(x.display.scroller,"dragover",ie.over),ue(x.display.scroller,"dragleave",ie.leave),ue(x.display.scroller,"drop",ie.drop)}}function ph(x){x.options.lineWrapping?(Dt(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(Ke(x.display.wrapper,"CodeMirror-wrap"),Nn(x)),La(x),za(x),Zi(x),setTimeout(function(){return ks(x)},100)}function oi(x,z){var ne=this;if(!(this instanceof oi))return new oi(x,z);this.options=z=z?ct(z):{},ct(fh,z,!1);var te=z.value;typeof te=="string"?te=new ga(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new oi.inputStyles[z.inputStyle](this),ue=this.display=new Ud(x,te,ie,z);ue.wrapper.CodeMirror=this,nd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tc(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 ye,keySeq:null,specialChars:null},z.autofocus&&!at&&ue.input.focus(),xe&&ke<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lf(this),Xc(),Ds(this),this.curOp.forceUpdate=!0,Jl(this,te),z.autofocus&&!at||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&ku(ne)},20):qs(this);for(var me in nc)nc.hasOwnProperty(me)&&nc[me](this,z[me],$s);Xl(this),z.finishInit&&z.finishInit(this);for(var Me=0;Me<rd.length;++Me)rd[Me](this);us(this),Te&&z.lineWrapping&&getComputedStyle(ue.lineDiv).textRendering=="optimizelegibility"&&(ue.lineDiv.style.textRendering="auto")}oi.defaults=fh,oi.optionHandlers=nc;function lf(x){var z=x.display;an(z.scroller,"mousedown",wa(x,Wa)),xe&&ke<11?an(z.scroller,"dblclick",wa(x,function(De){if(!Nt(x,De)){var Re=xo(x,De);if(!(!Re||Ja(x,De)||oo(x.display,De))){nr(De);var mt=x.findWordAt(Re);sl(x.doc,mt.anchor,mt.head)}}})):an(z.scroller,"dblclick",function(De){return Nt(x,De)||nr(De)}),an(z.scroller,"contextmenu",function(De){return Os(x,De)}),an(z.input.getField(),"contextmenu",function(De){z.scroller.contains(De.target)||Os(x,De)});var ne,te={end:0};function ie(){z.activeTouch&&(ne=setTimeout(function(){return z.activeTouch=null},1e3),te=z.activeTouch,te.end=+new Date)}function ue(De){if(De.touches.length!=1)return!1;var Re=De.touches[0];return Re.radiusX<=1&&Re.radiusY<=1}function me(De,Re){if(Re.left==null)return!0;var mt=Re.left-De.left,kt=Re.top-De.top;return mt*mt+kt*kt>20*20}an(z.scroller,"touchstart",function(De){if(!Nt(x,De)&&!ue(De)&&!Ja(x,De)){z.input.ensurePolled(),clearTimeout(ne);var Re=+new Date;z.activeTouch={start:Re,moved:!1,prev:Re-te.end<=300?te:null},De.touches.length==1&&(z.activeTouch.left=De.touches[0].pageX,z.activeTouch.top=De.touches[0].pageY)}}),an(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),an(z.scroller,"touchend",function(De){var Re=z.activeTouch;if(Re&&!oo(z,De)&&Re.left!=null&&!Re.moved&&new Date-Re.start<300){var mt=x.coordsChar(z.activeTouch,"page"),kt;!Re.prev||me(Re,Re.prev)?kt=new Pi(mt,mt):!Re.prev.prev||me(Re,Re.prev.prev)?kt=x.findWordAt(mt):kt=new Pi(_t(mt.line,0),un(x.doc,_t(mt.line+1,0))),x.setSelection(kt.anchor,kt.head),x.focus(),nr(De)}ie()}),an(z.scroller,"touchcancel",ie),an(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Ms(x,z.scroller.scrollTop),_s(x,z.scroller.scrollLeft,!0),wt(x,"scroll",x))}),an(z.scroller,"mousewheel",function(De){return Nc(x,De)}),an(z.scroller,"DOMMouseScroll",function(De){return Nc(x,De)}),an(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(De){Nt(x,De)||Er(De)},over:function(De){Nt(x,De)||(Uc(x,De),Er(De))},start:function(De){return ef(x,De)},drop:wa(x,Qh),leave:function(De){Nt(x,De)||kl(x)}};var Me=z.input.getField();an(Me,"keyup",function(De){return lh.call(x,De)}),an(Me,"keydown",wa(x,lu)),an(Me,"keypress",wa(x,uh)),an(Me,"focus",function(De){return ku(x,De)}),an(Me,"blur",function(De){return qs(x,De)})}var rd=[];oi.defineInitHook=function(x){return rd.push(x)};function No(x,z,ne,te){var ie=x.doc,ue;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ue=Zt(x,z).state:ne="prev");var me=x.options.tabSize,Me=Ve(ie,z),De=Pe(Me.text,null,me);Me.stateAfter&&(Me.stateAfter=null);var Re=Me.text.match(/^\s*/)[0],mt;if(!te&&!/\S/.test(Me.text))mt=0,ne="not";else if(ne=="smart"&&(mt=ie.mode.indent(ue,Me.text.slice(Re.length),Me.text),mt==Ht||mt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?mt=Pe(Ve(ie,z-1).text,null,me):mt=0:ne=="add"?mt=De+x.options.indentUnit:ne=="subtract"?mt=De-x.options.indentUnit:typeof ne=="number"&&(mt=De+ne),mt=Math.max(0,mt);var kt="",rn=0;if(x.options.indentWithTabs)for(var Qt=Math.floor(mt/me);Qt;--Qt)rn+=me,kt+=" ";if(rn<mt&&(kt+=hn(mt-rn)),kt!=Re)return El(ie,kt,_t(z,0),_t(z,Re.length),"+input"),Me.stateAfter=null,!0;for(var In=0;In<ie.sel.ranges.length;In++){var Vn=ie.sel.ranges[In];if(Vn.head.line==z&&Vn.head.ch<Re.length){var br=_t(z,Re.length);So(ie,In,new Pi(br,br));break}}}var zo=null;function Fs(x){zo=x}function id(x,z,ne,te,ie){var ue=x.doc;x.display.shift=!1,te||(te=ue.sel);var me=+new Date-200,Me=ie=="paste"||x.state.pasteIncoming>me,De=Yr(z),Re=null;if(Me&&te.ranges.length>1)if(zo&&zo.text.join(`
|
|
|
`)==z){if(te.ranges.length%zo.text.length==0){Re=[];for(var mt=0;mt<zo.text.length;mt++)Re.push(ue.splitLines(zo.text[mt]))}}else De.length==te.ranges.length&&x.options.pasteLinesPerSelection&&(Re=Ft(De,function(Mr){return[Mr]}));for(var kt=x.curOp.updateInput,rn=te.ranges.length-1;rn>=0;rn--){var Qt=te.ranges[rn],In=Qt.from(),Vn=Qt.to();Qt.empty()&&(ne&&ne>0?In=_t(In.line,In.ch-ne):x.state.overwrite&&!Me?Vn=_t(Vn.line,Math.min(Ve(ue,Vn.line).text.length,Vn.ch+jt(De).length)):Me&&zo&&zo.lineWise&&zo.text.join(`
|
|
|
`)==De.join(`
|
|
|
`)&&(In=Vn=_t(In.line,0)));var br={from:In,to:Vn,text:Re?Re[rn%Re.length]:De,origin:ie||(Me?"paste":x.state.cutIncoming>me?"cut":"+input")};Ls(x.doc,br),Ir(x,"inputRead",x,br)}z&&!Me&&od(x,z),Qs(x),x.curOp.updateInput<2&&(x.curOp.updateInput=kt),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function ad(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&ha(z,function(){return id(z,ne,0,null,"paste")}),!0}function od(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ne=x.doc.sel,te=ne.ranges.length-1;te>=0;te--){var ie=ne.ranges[te];if(!(ie.head.ch>100||te&&ne.ranges[te-1].head.line==ie.head.line)){var ue=x.getModeAt(ie.head),me=!1;if(ue.electricChars){for(var Me=0;Me<ue.electricChars.length;Me++)if(z.indexOf(ue.electricChars.charAt(Me))>-1){me=No(x,ie.head.line,"smart");break}}else ue.electricInput&&ue.electricInput.test(Ve(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(me=No(x,ie.head.line,"smart"));me&&Ir(x,"electricInput",x,ie.head.line)}}}function Tl(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ie=x.doc.sel.ranges[te].head.line,ue={anchor:_t(ie,0),head:_t(ie+1,0)};ne.push(ue),z.push(x.getRange(ue.anchor,ue.head))}return{text:z,ranges:ne}}function mh(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function sd(){var x=je("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=je("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Te?x.style.width="1000px":x.setAttribute("wrap","off"),st&&(x.style.border="1px solid black"),mh(x),z}function ld(x){var z=x.optionHandlers,ne=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(te,ie){var ue=this.options,me=ue[te];ue[te]==ie&&te!="mode"||(ue[te]=ie,z.hasOwnProperty(te)&&wa(this,z[te])(this,ie,me),wt(this,"optionChange",this,te))},getOption:function(te){return this.options[te]},getDoc:function(){return this.doc},addKeyMap:function(te,ie){this.state.keyMaps[ie?"push":"unshift"](io(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,ue=0;ue<ie.length;++ue)if(ie[ue]==te||ie[ue].name==te)return ie.splice(ue,1),!0},addOverlay:la(function(te,ie){var ue=te.token?te:x.getMode(this.options,te);if(ue.startState)throw new Error("Overlays may not be stateful.");Kt(this.state.overlays,{mode:ue,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(me){return me.priority}),this.state.modeGen++,za(this)}),removeOverlay:la(function(te){for(var ie=this.state.overlays,ue=0;ue<ie.length;++ue){var me=ie[ue].modeSpec;if(me==te||typeof te=="string"&&me.name==te){ie.splice(ue,1),this.state.modeGen++,za(this);return}}}),indentLine:la(function(te,ie,ue){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),cn(this.doc,te)&&No(this,te,ie,ue)}),indentSelection:la(function(te){for(var ie=this.doc.sel.ranges,ue=-1,me=0;me<ie.length;me++){var Me=ie[me];if(Me.empty())Me.head.line>ue&&(No(this,Me.head.line,te,!0),ue=Me.head.line,me==this.doc.sel.primIndex&&Qs(this));else{var De=Me.from(),Re=Me.to(),mt=Math.max(ue,De.line);ue=Math.min(this.lastLine(),Re.line-(Re.ch?0:1))+1;for(var kt=mt;kt<ue;++kt)No(this,kt,te);var rn=this.doc.sel.ranges;De.ch==0&&ie.length==rn.length&&rn[me].from().ch>0&&So(this.doc,me,new Pi(De,rn[me].to()),Ye)}}}),getTokenAt:function(te,ie){return Hn(this,te,ie)},getLineTokens:function(te,ie){return Hn(this,_t(te),ie,!0)},getTokenTypeAt:function(te){te=un(this.doc,te);var ie=Ot(this,Ve(this.doc,te.line)),ue=0,me=(ie.length-1)/2,Me=te.ch,De;if(Me==0)De=ie[2];else for(;;){var Re=ue+me>>1;if((Re?ie[Re*2-1]:0)>=Me)me=Re;else if(ie[Re*2+1]<Me)ue=Re+1;else{De=ie[Re*2+2];break}}var mt=De?De.indexOf("overlay "):-1;return mt<0?De:mt==0?null:De.slice(0,mt-1)},getModeAt:function(te){var ie=this.doc.mode;return ie.innerMode?x.innerMode(ie,this.getTokenAt(te).state).mode:ie},getHelper:function(te,ie){return this.getHelpers(te,ie)[0]},getHelpers:function(te,ie){var ue=[];if(!ne.hasOwnProperty(ie))return ue;var me=ne[ie],Me=this.getModeAt(te);if(typeof Me[ie]=="string")me[Me[ie]]&&ue.push(me[Me[ie]]);else if(Me[ie])for(var De=0;De<Me[ie].length;De++){var Re=me[Me[ie][De]];Re&&ue.push(Re)}else Me.helperType&&me[Me.helperType]?ue.push(me[Me.helperType]):me[Me.name]&&ue.push(me[Me.name]);for(var mt=0;mt<me._global.length;mt++){var kt=me._global[mt];kt.pred(Me,this)&&ht(ue,kt.val)==-1&&ue.push(kt.val)}return ue},getStateAfter:function(te,ie){var ue=this.doc;return te=Fn(ue,te==null?ue.first+ue.size-1:te),Zt(this,te+1,ie).state},cursorCoords:function(te,ie){var ue,me=this.doc.sel.primary();return te==null?ue=me.head:typeof te=="object"?ue=un(this.doc,te):ue=te?me.from():me.to(),Da(this,ue,ie||"page")},charCoords:function(te,ie){return lo(this,un(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=so(this,te,ie||"page"),Js(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=so(this,{top:te,left:0},ie||"page").top,tn(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ue){var me=!1,Me;if(typeof te=="number"){var De=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>De&&(te=De,me=!0),Me=Ve(this.doc,te)}else Me=te;return $a(this,Me,{top:0,left:0},ie||"page",ue||me).top+(me?this.doc.height-Yn(Me):0)},defaultTextHeight:function(){return as(this.display)},defaultCharWidth:function(){return Ei(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ue,me,Me){var De=this.display;te=Da(this,un(this.doc,te));var Re=te.bottom,mt=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),De.sizer.appendChild(ie),me=="over")Re=te.top;else if(me=="above"||me=="near"){var kt=Math.max(De.wrapper.clientHeight,this.doc.height),rn=Math.max(De.sizer.clientWidth,De.lineSpace.clientWidth);(me=="above"||te.bottom+ie.offsetHeight>kt)&&te.top>ie.offsetHeight?Re=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=kt&&(Re=te.bottom),mt+ie.offsetWidth>rn&&(mt=rn-ie.offsetWidth)}ie.style.top=Re+"px",ie.style.left=ie.style.right="",Me=="right"?(mt=De.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(Me=="left"?mt=0:Me=="middle"&&(mt=(De.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=mt+"px"),ue&&$d(this,{left:mt,top:Re,right:mt+ie.offsetWidth,bottom:Re+ie.offsetHeight})},triggerOnKeyDown:la(lu),triggerOnKeyPress:la(uh),triggerOnKeyUp:lh,triggerOnMouseDown:la(Wa),execCommand:function(te){if(Ll.hasOwnProperty(te))return Ll[te].call(null,this)},triggerElectric:la(function(te){od(this,te)}),findPosH:function(te,ie,ue,me){var Me=1;ie<0&&(Me=-1,ie=-ie);for(var De=un(this.doc,te),Re=0;Re<ie&&(De=rc(this.doc,De,Me,ue,me),!De.hitSide);++Re);return De},moveH:la(function(te,ie){var ue=this;this.extendSelectionsBy(function(me){return ue.display.shift||ue.doc.extend||me.empty()?rc(ue.doc,me.head,te,ie,ue.options.rtlMoveVisually):te<0?me.from():me.to()},At)}),deleteH:la(function(te,ie){var ue=this.doc.sel,me=this.doc;ue.somethingSelected()?me.replaceSelection("",null,"+delete"):Io(this,function(Me){var De=rc(me,Me.head,te,ie,!1);return te<0?{from:De,to:Me.head}:{from:Me.head,to:De}})}),findPosV:function(te,ie,ue,me){var Me=1,De=me;ie<0&&(Me=-1,ie=-ie);for(var Re=un(this.doc,te),mt=0;mt<ie;++mt){var kt=Da(this,Re,"div");if(De==null?De=kt.left:kt.left=De,Re=vh(this,kt,Me,ue),Re.hitSide)break}return Re},moveV:la(function(te,ie){var ue=this,me=this.doc,Me=[],De=!this.display.shift&&!me.extend&&me.sel.somethingSelected();if(me.extendSelectionsBy(function(mt){if(De)return te<0?mt.from():mt.to();var kt=Da(ue,mt.head,"div");mt.goalColumn!=null&&(kt.left=mt.goalColumn),Me.push(kt.left);var rn=vh(ue,kt,te,ie);return ie=="page"&&mt==me.sel.primary()&&Du(ue,lo(ue,rn,"div").top-kt.top),rn},At),Me.length)for(var Re=0;Re<me.sel.ranges.length;Re++)me.sel.ranges[Re].goalColumn=Me[Re]}),findWordAt:function(te){var ie=this.doc,ue=Ve(ie,te.line).text,me=te.ch,Me=te.ch;if(ue){var De=this.getHelper(te,"wordChars");(te.sticky=="before"||Me==ue.length)&&me?--me:++Me;for(var Re=ue.charAt(me),mt=fe(Re,De)?function(kt){return fe(kt,De)}:/\s/.test(Re)?function(kt){return/\s/.test(kt)}:function(kt){return!/\s/.test(kt)&&!fe(kt)};me>0&&mt(ue.charAt(me-1));)--me;for(;Me<ue.length&&mt(ue.charAt(Me));)++Me}return new Pi(_t(te.line,me),_t(te.line,Me))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Dt(this.display.cursorDiv,"CodeMirror-overwrite"):Ke(this.display.cursorDiv,"CodeMirror-overwrite"),wt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ge()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:la(function(te,ie){el(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-_a(this)-this.display.barHeight,width:te.scrollWidth-_a(this)-this.display.barWidth,clientHeight:yo(this),clientWidth:da(this)}},scrollIntoView:la(function(te,ie){te==null?(te={from:this.doc.sel.primary().head,to:null},ie==null&&(ie=this.options.cursorScrollMargin)):typeof te=="number"?te={from:_t(te,0),to:null}:te.from==null&&(te={from:te,to:null}),te.to||(te.to=te.from),te.margin=ie||0,te.from.line!=null?Fd(this,te):Lc(this,te.from,te.to,te.margin)}),setSize:la(function(te,ie){var ue=this,me=function(De){return typeof De=="number"||/^\d+$/.test(String(De))?De+"px":De};te!=null&&(this.display.wrapper.style.width=me(te)),ie!=null&&(this.display.wrapper.style.height=me(ie)),this.options.lineWrapping&&ka(this);var Me=this.display.viewFrom;this.doc.iter(Me,this.display.viewTo,function(De){if(De.widgets){for(var Re=0;Re<De.widgets.length;Re++)if(De.widgets[Re].noHScroll){Ao(ue,Me,"widget");break}}++Me}),this.curOp.forceUpdate=!0,wt(this,"refresh",this)}),operation:function(te){return ha(this,te)},startOperation:function(){return Ds(this)},endOperation:function(){return us(this)},refresh:la(function(){var te=this.display.cachedTextHeight;za(this),this.curOp.forceUpdate=!0,Zi(this),el(this,this.doc.scrollLeft,this.doc.scrollTop),Tu(this.display),(te==null||Math.abs(te-as(this.display))>.5||this.options.lineWrapping)&&La(this),wt(this,"refresh",this)}),swapDoc:la(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),Jl(this,te),Zi(this),this.display.input.reset(),el(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,Ir(this,"swapDoc",this,ie),ie}),phrase:function(te){var ie=this.options.phrases;return ie&&Object.prototype.hasOwnProperty.call(ie,te)?ie[te]:te},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}},Tn(x),x.registerHelper=function(te,ie,ue){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ie]=ue},x.registerGlobalHelper=function(te,ie,ue,me){x.registerHelper(te,ie,me),ne[te]._global.push({pred:ue,val:me})}}function rc(x,z,ne,te,ie){var ue=z,me=ne,Me=Ve(x,z.line),De=ie&&x.direction=="rtl"?-ne:ne;function Re(){var Br=z.line+De;return Br<x.first||Br>=x.first+x.size?!1:(z=new _t(Br,z.ch,z.sticky),Me=Ve(x,Br))}function mt(Br){var Sr;if(te=="codepoint"){var Pr=Me.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(Pr)?Sr=null:Sr=new _t(z.line,Math.max(0,Math.min(Me.text.length,z.ch+ne*(Pr>=55296&&Pr<56320?2:1))),-ne)}else ie?Sr=Uo(x.cm,Me,z,ne):Sr=Go(Me,z,ne);if(Sr==null)if(!Br&&Re())z=dl(ie,x.cm,Me,z.line,De);else return!1;else z=Sr;return!0}if(te=="char"||te=="codepoint")mt();else if(te=="column")mt(!0);else if(te=="word"||te=="group")for(var kt=null,rn=te=="group",Qt=x.cm&&x.cm.getHelper(z,"wordChars"),In=!0;!(ne<0&&!mt(!In));In=!1){var Vn=Me.text.charAt(z.ch)||`
|
|
|
`,br=fe(Vn,Qt)?"w":rn&&Vn==`
|
|
|
`?"n":!rn||/\s/.test(Vn)?null:"p";if(rn&&!In&&!br&&(br="s"),kt&&kt!=br){ne<0&&(ne=1,mt(),z.sticky="after");break}if(br&&(kt=br),ne>0&&!mt(!In))break}var Mr=Gu(x,z,ue,me,!0);return Dn(ue,Mr)&&(Mr.hitSide=!0),Mr}function vh(x,z,ne,te){var ie=x.doc,ue=z.left,me;if(te=="page"){var Me=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),De=Math.max(Me-.5*as(x.display),3);me=(ne>0?z.bottom:z.top)+ne*De}else te=="line"&&(me=ne>0?z.bottom+3:z.top-3);for(var Re;Re=Js(x,ue,me),!!Re.outside;){if(ne<0?me<=0:me>=ie.height){Re.hitSide=!0;break}me+=ne*5}return Re}var zi=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ye,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zi.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;mh(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ue(Me){for(var De=Me.target;De;De=De.parentNode){if(De==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(De.className))break}return!1}an(ie,"paste",function(Me){!ue(Me)||Nt(te,Me)||ad(Me,te)||ke<=11&&setTimeout(wa(te,function(){return z.updateFromDOM()}),20)}),an(ie,"compositionstart",function(Me){z.composing={data:Me.data,done:!1}}),an(ie,"compositionupdate",function(Me){z.composing||(z.composing={data:Me.data,done:!1})}),an(ie,"compositionend",function(Me){z.composing&&(Me.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),an(ie,"touchstart",function(){return ne.forceCompositionEnd()}),an(ie,"input",function(){z.composing||z.readFromDOMSoon()});function me(Me){if(!(!ue(Me)||Nt(te,Me))){if(te.somethingSelected())Fs({lineWise:!1,text:te.getSelections()}),Me.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var De=Tl(te);Fs({lineWise:!0,text:De.text}),Me.type=="cut"&&te.operation(function(){te.setSelections(De.ranges,0,Ye),te.replaceSelection("",null,"cut")})}else return;if(Me.clipboardData){Me.clipboardData.clearData();var Re=zo.text.join(`
|
|
|
`);if(Me.clipboardData.setData("Text",Re),Me.clipboardData.getData("Text")==Re){Me.preventDefault();return}}var mt=sd(),kt=mt.firstChild;te.display.lineSpace.insertBefore(mt,te.display.lineSpace.firstChild),kt.value=zo.text.join(`
|
|
|
`);var rn=document.activeElement;yt(kt),setTimeout(function(){te.display.lineSpace.removeChild(mt),rn.focus(),rn==ie&&ne.showPrimarySelection()},50)}}an(ie,"copy",me),an(ie,"cut",me)},zi.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},zi.prototype.prepareSelection=function(){var x=Mc(this.cm,!1);return x.focus=document.activeElement==this.div,x},zi.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},zi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zi.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,ne=z.doc.sel.primary(),te=ne.from(),ie=ne.to();if(z.display.viewTo==z.display.viewFrom||te.line>=z.display.viewTo||ie.line<z.display.viewFrom){x.removeAllRanges();return}var ue=ic(z,x.anchorNode,x.anchorOffset),me=ic(z,x.focusNode,x.focusOffset);if(!(ue&&!ue.bad&&me&&!me.bad&&Yt(Mn(ue,me),te)==0&&Yt(gn(ue,me),ie)==0)){var Me=z.display.view,De=te.line>=z.display.viewFrom&&gh(z,te)||{node:Me[0].measure.map[2],offset:0},Re=ie.line<z.display.viewTo&&gh(z,ie);if(!Re){var mt=Me[Me.length-1].measure,kt=mt.maps?mt.maps[mt.maps.length-1]:mt.map;Re={node:kt[kt.length-1],offset:kt[kt.length-2]-kt[kt.length-3]}}if(!De||!Re){x.removeAllRanges();return}var rn=x.rangeCount&&x.getRangeAt(0),Qt;try{Qt=ot(De.node,De.offset,Re.offset,Re.node)}catch(In){}Qt&&(!be&&z.state.focused?(x.collapse(De.node,De.offset),Qt.collapsed||(x.removeAllRanges(),x.addRange(Qt))):(x.removeAllRanges(),x.addRange(Qt)),rn&&x.anchorNode==null?x.addRange(rn):be&&this.startGracePeriod()),this.rememberSelection()}},zi.prototype.startGracePeriod=function(){var x=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){x.gracePeriod=!1,x.selectionChanged()&&x.cm.operation(function(){return x.cm.curOp.selectionChanged=!0})},20)},zi.prototype.showMultipleSelections=function(x){gt(this.cm.display.cursorDiv,x.cursors),gt(this.cm.display.selectionDiv,x.selection)},zi.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},zi.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Et(this.div,z)},zi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},zi.prototype.blur=function(){this.div.blur()},zi.prototype.getField=function(){return this.div},zi.prototype.supportsTouch=function(){return!0},zi.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():ha(this.cm,function(){return x.cm.curOp.selectionChanged=!0});function z(){x.cm.state.focused&&(x.pollSelection(),x.polling.set(x.cm.options.pollInterval,z))}this.polling.set(this.cm.options.pollInterval,z)},zi.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},zi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(Qe&&Ee&&this.cm.display.gutterSpecs.length&&uf(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=ic(z,x.anchorNode,x.anchorOffset),te=ic(z,x.focusNode,x.focusOffset);ne&&te&&ha(z,function(){Sa(z.doc,Fo(ne,te),Ye),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},zi.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var x=this.cm,z=x.display,ne=x.doc.sel.primary(),te=ne.from(),ie=ne.to();if(te.ch==0&&te.line>x.firstLine()&&(te=_t(te.line-1,Ve(x.doc,te.line-1).length)),ie.ch==Ve(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=_t(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ue,me,Me;te.line==z.viewFrom||(ue=po(x,te.line))==0?(me=zt(z.view[0].line),Me=z.view[0].node):(me=zt(z.view[ue].line),Me=z.view[ue-1].node.nextSibling);var De=po(x,ie.line),Re,mt;if(De==z.view.length-1?(Re=z.viewTo-1,mt=z.lineDiv.lastChild):(Re=zt(z.view[De+1].line)-1,mt=z.view[De+1].node.previousSibling),!Me)return!1;for(var kt=x.doc.splitLines(cf(x,Me,mt,me,Re)),rn=lt(x.doc,_t(me,0),_t(Re,Ve(x.doc,Re).text.length));kt.length>1&&rn.length>1;)if(jt(kt)==jt(rn))kt.pop(),rn.pop(),Re--;else if(kt[0]==rn[0])kt.shift(),rn.shift(),me++;else break;for(var Qt=0,In=0,Vn=kt[0],br=rn[0],Mr=Math.min(Vn.length,br.length);Qt<Mr&&Vn.charCodeAt(Qt)==br.charCodeAt(Qt);)++Qt;for(var Br=jt(kt),Sr=jt(rn),Pr=Math.min(Br.length-(kt.length==1?Qt:0),Sr.length-(rn.length==1?Qt:0));In<Pr&&Br.charCodeAt(Br.length-In-1)==Sr.charCodeAt(Sr.length-In-1);)++In;if(kt.length==1&&rn.length==1&&me==te.line)for(;Qt&&Qt>te.ch&&Br.charCodeAt(Br.length-In-1)==Sr.charCodeAt(Sr.length-In-1);)Qt--,In++;kt[kt.length-1]=Br.slice(0,Br.length-In).replace(/^\u200b+/,""),kt[0]=kt[0].slice(Qt).replace(/\u200b+$/,"");var Gr=_t(me,Qt),Xr=_t(Re,rn.length?jt(rn).length-In:0);if(kt.length>1||kt[0]||Yt(Gr,Xr))return El(x.doc,kt,Gr,Xr,"+input"),!0},zi.prototype.ensurePolled=function(){this.forceCompositionEnd()},zi.prototype.reset=function(){this.forceCompositionEnd()},zi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},zi.prototype.readFromDOMSoon=function(){var x=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(x.readDOMTimeout=null,x.composing)if(x.composing.done)x.composing=null;else return;x.updateFromDOM()},80))},zi.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&ha(this.cm,function(){return za(x.cm)})},zi.prototype.setUneditable=function(x){x.contentEditable="false"},zi.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||wa(this.cm,id)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},zi.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},zi.prototype.onContextMenu=function(){},zi.prototype.resetPosition=function(){},zi.prototype.needsContentAttribute=!0;function gh(x,z){var ne=Xa(x,z.line);if(!ne||ne.hidden)return null;var te=Ve(x.doc,z.line),ie=ko(ne,te,z.line),ue=Sn(te,x.doc.direction),me="left";if(ue){var Me=en(ue,z.ch);me=Me%2?"right":"left"}var De=rs(ie.map,z.ch,me);return De.offset=De.collapse=="right"?De.end:De.start,De}function uf(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function Il(x,z){return z&&(x.bad=!0),x}function cf(x,z,ne,te,ie){var ue="",me=!1,Me=x.doc.lineSeparator(),De=!1;function Re(Qt){return function(In){return In.id==Qt}}function mt(){me&&(ue+=Me,De&&(ue+=Me),me=De=!1)}function kt(Qt){Qt&&(mt(),ue+=Qt)}function rn(Qt){if(Qt.nodeType==1){var In=Qt.getAttribute("cm-text");if(In){kt(In);return}var Vn=Qt.getAttribute("cm-marker"),br;if(Vn){var Mr=x.findMarks(_t(te,0),_t(ie+1,0),Re(+Vn));Mr.length&&(br=Mr[0].find(0))&&kt(lt(x.doc,br.from,br.to).join(Me));return}if(Qt.getAttribute("contenteditable")=="false")return;var Br=/^(pre|div|p|li|table|br)$/i.test(Qt.nodeName);if(!/^br$/i.test(Qt.nodeName)&&Qt.textContent.length==0)return;Br&&mt();for(var Sr=0;Sr<Qt.childNodes.length;Sr++)rn(Qt.childNodes[Sr]);/^(pre|p)$/i.test(Qt.nodeName)&&(De=!0),Br&&(me=!0)}else Qt.nodeType==3&&kt(Qt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;rn(z),z!=ne;)z=z.nextSibling,De=!1;return ue}function ic(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return Il(x.clipPos(_t(x.display.viewTo-1)),!0);z=null,ne=0}else for(te=z;;te=te.parentNode){if(!te||te==x.display.lineDiv)return null;if(te.parentNode&&te.parentNode==x.display.lineDiv)break}for(var ie=0;ie<x.display.view.length;ie++){var ue=x.display.view[ie];if(ue.node==te)return df(ue,z,ne)}}function df(x,z,ne){var te=x.text.firstChild,ie=!1;if(!z||!Et(te,z))return Il(_t(zt(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ue=x.rest?jt(x.rest):x.line;return Il(_t(zt(ue),ue.text.length),ie)}var me=z.nodeType==3?z:null,Me=z;for(!me&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(me=z.firstChild,ne&&(ne=me.nodeValue.length));Me.parentNode!=te;)Me=Me.parentNode;var De=x.measure,Re=De.maps;function mt(br,Mr,Br){for(var Sr=-1;Sr<(Re?Re.length:0);Sr++)for(var Pr=Sr<0?De.map:Re[Sr],Gr=0;Gr<Pr.length;Gr+=3){var Xr=Pr[Gr+2];if(Xr==br||Xr==Mr){var gi=zt(Sr<0?x.line:x.rest[Sr]),Gi=Pr[Gr]+Br;return(Br<0||Xr!=br)&&(Gi=Pr[Gr+(Br?1:0)]),_t(gi,Gi)}}}var kt=mt(me,Me,ne);if(kt)return Il(kt,ie);for(var rn=Me.nextSibling,Qt=me?me.nodeValue.length-ne:0;rn;rn=rn.nextSibling){if(kt=mt(rn,rn.firstChild,0),kt)return Il(_t(kt.line,kt.ch-Qt),ie);Qt+=rn.textContent.length}for(var In=Me.previousSibling,Vn=ne;In;In=In.previousSibling){if(kt=mt(In,In.firstChild,-1),kt)return Il(_t(kt.line,kt.ch+Vn),ie);Vn+=In.textContent.length}}var Vi=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new ye,this.hasSelection=!1,this.composing=null};Vi.prototype.init=function(x){var z=this,ne=this,te=this.cm;this.createField(x);var ie=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),st&&(ie.style.width="0px"),an(ie,"input",function(){xe&&ke>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),an(ie,"paste",function(me){Nt(te,me)||ad(me,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ue(me){if(!Nt(te,me)){if(te.somethingSelected())Fs({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var Me=Tl(te);Fs({lineWise:!0,text:Me.text}),me.type=="cut"?te.setSelections(Me.ranges,null,Ye):(ne.prevInput="",ie.value=Me.text.join(`
|
|
|
`),yt(ie))}else return;me.type=="cut"&&(te.state.cutIncoming=+new Date)}}an(ie,"cut",ue),an(ie,"copy",ue),an(x.scroller,"paste",function(me){if(!(oo(x,me)||Nt(te,me))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var Me=new Event("paste");Me.clipboardData=me.clipboardData,ie.dispatchEvent(Me)}}),an(x.lineSpace,"selectstart",function(me){oo(x,me)||nr(me)}),an(ie,"compositionstart",function(){var me=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:me,range:te.markText(me,te.getCursor("to"),{className:"CodeMirror-composing"})}}),an(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},Vi.prototype.createField=function(x){this.wrapper=sd(),this.textarea=this.wrapper.firstChild},Vi.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},Vi.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=Mc(x);if(x.options.moveInputWithCursor){var ie=Da(x,ne.sel.primary().head,"div"),ue=z.wrapper.getBoundingClientRect(),me=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+me.top-ue.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+me.left-ue.left))}return te},Vi.prototype.showSelection=function(x){var z=this.cm,ne=z.display;gt(ne.cursorDiv,x.cursors),gt(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},Vi.prototype.reset=function(x){if(!(this.contextMenuPending||this.composing)){var z=this.cm;if(z.somethingSelected()){this.prevInput="";var ne=z.getSelection();this.textarea.value=ne,z.state.focused&&yt(this.textarea),xe&&ke>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",xe&&ke>=9&&(this.hasSelection=null))}},Vi.prototype.getField=function(){return this.textarea},Vi.prototype.supportsTouch=function(){return!1},Vi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!at||Ge()!=this.textarea))try{this.textarea.focus()}catch(x){}},Vi.prototype.blur=function(){this.textarea.blur()},Vi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vi.prototype.receivedFocus=function(){this.slowPoll()},Vi.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},Vi.prototype.fastPoll=function(){var x=!1,z=this;z.pollingFast=!0;function ne(){var te=z.poll();!te&&!x?(x=!0,z.polling.set(60,ne)):(z.pollingFast=!1,z.slowPoll())}z.polling.set(20,ne)},Vi.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||xr(ne)&&!te&&!this.composing||z.isReadOnly()||z.options.disableInput||z.state.keySeq)return!1;var ie=ne.value;if(ie==te&&!z.somethingSelected())return!1;if(xe&&ke>=9&&this.hasSelection===ie||tt&&/[\uf700-\uf7ff]/.test(ie))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var ue=ie.charCodeAt(0);if(ue==8203&&!te&&(te="\u200B"),ue==8666)return this.reset(),this.cm.execCommand("undo")}for(var me=0,Me=Math.min(te.length,ie.length);me<Me&&te.charCodeAt(me)==ie.charCodeAt(me);)++me;return ha(z,function(){id(z,ie.slice(me),te.length-me,null,x.composing?"*compose":null),ie.length>1e3||ie.indexOf(`
|
|
|
`)>-1?ne.value=x.prevInput="":x.prevInput=ie,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Vi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vi.prototype.onKeyPress=function(){xe&&ke>=9&&(this.hasSelection=null),this.fastPoll()},Vi.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ue=xo(ne,x),me=te.scroller.scrollTop;if(!ue||Oe)return;var Me=ne.options.resetSelectionOnContextMenu;Me&&ne.doc.sel.contains(ue)==-1&&wa(ne,Sa)(ne.doc,Fo(ue),Ye);var De=ie.style.cssText,Re=z.wrapper.style.cssText,mt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-mt.top-5)+"px; left: "+(x.clientX-mt.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 kt;Te&&(kt=window.scrollY),te.input.focus(),Te&&window.scrollTo(null,kt),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=Qt,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function rn(){if(ie.selectionStart!=null){var Vn=ne.somethingSelected(),br="\u200B"+(Vn?ie.value:"");ie.value="\u21DA",ie.value=br,z.prevInput=Vn?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=br.length,te.selForContextMenu=ne.doc.sel}}function Qt(){if(z.contextMenuPending==Qt&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Re,ie.style.cssText=De,xe&&ke<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=me),ie.selectionStart!=null)){(!xe||xe&&ke<9)&&rn();var Vn=0,br=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?wa(ne,jc)(ne):Vn++<10?te.detectingSelectAll=setTimeout(br,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(br,200)}}if(xe&&ke>=9&&rn(),He){Er(x);var In=function(){ut(window,"mouseup",In),setTimeout(Qt,20)};an(window,"mouseup",In)}else setTimeout(Qt,50)},Vi.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},Vi.prototype.setUneditable=function(){},Vi.prototype.needsContentAttribute=!1;function hl(x,z){if(z=z?ct(z):{},z.value=x.value,!z.tabindex&&x.tabIndex&&(z.tabindex=x.tabIndex),!z.placeholder&&x.placeholder&&(z.placeholder=x.placeholder),z.autofocus==null){var ne=Ge();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=Me.getValue()}var ie;if(x.form&&(an(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var ue=x.form;ie=ue.submit;try{var me=ue.submit=function(){te(),ue.submit=ie,ue.submit(),ue.submit=me}}catch(De){}}z.finishInit=function(De){De.save=te,De.getTextArea=function(){return x},De.toTextArea=function(){De.toTextArea=isNaN,te(),x.parentNode.removeChild(De.getWrapperElement()),x.style.display="",x.form&&(ut(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var Me=oi(function(De){return x.parentNode.insertBefore(De,x.nextSibling)},z);return Me}function Pl(x){x.off=ut,x.on=an,x.wheelEventPixels=Rc,x.Doc=ga,x.splitLines=Yr,x.countColumn=Pe,x.findColumn=mn,x.isWordChar=de,x.Pass=Ht,x.signal=wt,x.Line=Kn,x.changeEnd=cs,x.scrollbarModel=Bc,x.Pos=_t,x.cmpPos=Yt,x.modes=_n,x.mimeModes=yn,x.resolveMode=sn,x.getMode=dn,x.modeExtensions=$n,x.extendMode=nt,x.copyState=_e,x.startState=Ae,x.innerMode=Ie,x.commands=Ll,x.keyMap=ji,x.keyName=cl,x.isModifierKey=su,x.lookupKey=ms,x.normalizeKeyMap=Yc,x.StringStream=Be,x.SharedTextMarker=vi,x.TextMarker=Bs,x.LineWidget=_l,x.e_preventDefault=nr,x.e_stopPropagation=mr,x.e_stop=Er,x.addClass=Dt,x.contains=Et,x.rmClass=Ke,x.keyNames=Ro}of(oi),ld(oi);var bs="iter insert remove copy getEditor constructor".split(" ");for(var Po in ga.prototype)ga.prototype.hasOwnProperty(Po)&&ht(bs,Po)<0&&(oi.prototype[Po]=function(x){return function(){return x.apply(this.doc,arguments)}}(ga.prototype[Po]));return Tn(ga),oi.inputStyles={textarea:Vi,contenteditable:zi},oi.defineMode=function(x){!oi.defaults.mode&&x!="null"&&(oi.defaults.mode=x),pn.apply(this,arguments)},oi.defineMIME=xn,oi.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),oi.defineMIME("text/plain","null"),oi.defineExtension=function(x,z){oi.prototype[x]=z},oi.defineDocExtension=function(x,z){ga.prototype[x]=z},oi.fromTextArea=hl,Pl(oi),oi.version="5.58.2",oi})},25419:function(wn,qt,ce){(function(be){be(ce(89780),ce(15525),ce(98101))})(function(be){"use strict";be.defineMode("markdown",function(We,Fe){var ft=be.getMode(We,"text/html"),xe=ft.name=="null";function ke(Pe){if(be.findModeByName){var ye=be.findModeByName(Pe);ye&&(Pe=ye.mime||ye.mimes[0])}var ht=be.getMode(We,Pe);return ht.name=="null"?null:ht}Fe.highlightFormatting===void 0&&(Fe.highlightFormatting=!1),Fe.maxBlockquoteDepth===void 0&&(Fe.maxBlockquoteDepth=0),Fe.taskLists===void 0&&(Fe.taskLists=!1),Fe.strikethrough===void 0&&(Fe.strikethrough=!1),Fe.emoji===void 0&&(Fe.emoji=!1),Fe.fencedCodeBlockHighlighting===void 0&&(Fe.fencedCodeBlockHighlighting=!0),Fe.fencedCodeBlockDefaultMode===void 0&&(Fe.fencedCodeBlockDefaultMode="text/plain"),Fe.xml===void 0&&(Fe.xml=!0),Fe.tokenTypeOverrides===void 0&&(Fe.tokenTypeOverrides={});var Te={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var we in Te)Te.hasOwnProperty(we)&&Fe.tokenTypeOverrides[we]&&(Te[we]=Fe.tokenTypeOverrides[we]);var Ee=/^([*\-_])(?:\s*\1){2,}\s*$/,Oe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,it=/^\[(x| )\](?=\s)/i,Le=Fe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ze=/^ {0,3}(?:\={1,}|-{2,})\s*$/,st=/^[^#!\[\]*_\\<>` "'(~:]+/,Qe=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,at=/^\s*\[[^\]]+?\]:.*$/,tt=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,pt=" ";function Lt(Pe,ye,ht){return ye.f=ye.inline=ht,ht(Pe,ye)}function Ue(Pe,ye,ht){return ye.f=ye.block=ht,ht(Pe,ye)}function Xe(Pe){return!Pe||!/\S/.test(Pe.string)}function He(Pe){if(Pe.linkTitle=!1,Pe.linkHref=!1,Pe.linkText=!1,Pe.em=!1,Pe.strong=!1,Pe.strikethrough=!1,Pe.quote=0,Pe.indentedCode=!1,Pe.f==Ke){var ye=xe;if(!ye){var ht=be.innerMode(ft,Pe.htmlState);ye=ht.mode.name=="xml"&&ht.state.tagStart===null&&!ht.state.context&&ht.state.tokenize.isInText}ye&&(Pe.f=St,Pe.block=Se,Pe.htmlState=null)}return Pe.trailingSpace=0,Pe.trailingSpaceNewLine=!1,Pe.prevLine=Pe.thisLine,Pe.thisLine={stream:null},null}function Se(Pe,ye){var ht=Pe.column()===ye.indentation,Vt=Xe(ye.prevLine.stream),Ht=ye.indentedCode,Ye=ye.prevLine.hr,Je=ye.list!==!1,At=(ye.listStack[ye.listStack.length-1]||0)+3;ye.indentedCode=!1;var mn=ye.indentation;if(ye.indentationDiff===null&&(ye.indentationDiff=ye.indentation,Je)){for(ye.list=null;mn<ye.listStack[ye.listStack.length-1];)ye.listStack.pop(),ye.listStack.length?ye.indentation=ye.listStack[ye.listStack.length-1]:ye.list=!1;ye.list!==!1&&(ye.indentationDiff=mn-ye.listStack[ye.listStack.length-1])}var Gt=!Vt&&!Ye&&!ye.prevLine.header&&(!Je||!Ht)&&!ye.prevLine.fencedCodeEnd,hn=(ye.list===!1||Ye||Vt)&&ye.indentation<=At&&Pe.match(Ee),jt=null;if(ye.indentationDiff>=4&&(Ht||ye.prevLine.fencedCodeEnd||ye.prevLine.header||Vt))return Pe.skipToEnd(),ye.indentedCode=!0,Te.code;if(Pe.eatSpace())return null;if(ht&&ye.indentation<=At&&(jt=Pe.match(Le))&&jt[1].length<=6)return ye.quote=0,ye.header=jt[1].length,ye.thisLine.header=!0,Fe.highlightFormatting&&(ye.formatting="header"),ye.f=ye.inline,gt(ye);if(ye.indentation<=At&&Pe.eat(">"))return ye.quote=ht?1:ye.quote+1,Fe.highlightFormatting&&(ye.formatting="quote"),Pe.eatSpace(),gt(ye);if(!hn&&!ye.setext&&ht&&ye.indentation<=At&&(jt=Pe.match(Oe))){var Ft=jt[1]?"ol":"ul";return ye.indentation=mn+Pe.current().length,ye.list=!0,ye.quote=0,ye.listStack.push(ye.indentation),ye.em=!1,ye.strong=!1,ye.code=!1,ye.strikethrough=!1,Fe.taskLists&&Pe.match(it,!1)&&(ye.taskList=!0),ye.f=ye.inline,Fe.highlightFormatting&&(ye.formatting=["list","list-"+Ft]),gt(ye)}else{if(ht&&ye.indentation<=At&&(jt=Pe.match(Qe,!0)))return ye.quote=0,ye.fencedEndRE=new RegExp(jt[1]+"+ *$"),ye.localMode=Fe.fencedCodeBlockHighlighting&&ke(jt[2]||Fe.fencedCodeBlockDefaultMode),ye.localMode&&(ye.localState=be.startState(ye.localMode)),ye.f=ye.block=Ze,Fe.highlightFormatting&&(ye.formatting="code-block"),ye.code=-1,gt(ye);if(ye.setext||(!Gt||!Je)&&!ye.quote&&ye.list===!1&&!ye.code&&!hn&&!at.test(Pe.string)&&(jt=Pe.lookAhead(1))&&(jt=jt.match(ze)))return ye.setext?(ye.header=ye.setext,ye.setext=0,Pe.skipToEnd(),Fe.highlightFormatting&&(ye.formatting="header")):(ye.header=jt[0].charAt(0)=="="?1:2,ye.setext=ye.header),ye.thisLine.header=!0,ye.f=ye.inline,gt(ye);if(hn)return Pe.skipToEnd(),ye.hr=!0,ye.thisLine.hr=!0,Te.hr;if(Pe.peek()==="[")return Lt(Pe,ye,rt)}return Lt(Pe,ye,ye.inline)}function Ke(Pe,ye){var ht=ft.token(Pe,ye.htmlState);if(!xe){var Vt=be.innerMode(ft,ye.htmlState);(Vt.mode.name=="xml"&&Vt.state.tagStart===null&&!Vt.state.context&&Vt.state.tokenize.isInText||ye.md_inside&&Pe.current().indexOf(">")>-1)&&(ye.f=St,ye.block=Se,ye.htmlState=null)}return ht}function Ze(Pe,ye){var ht=ye.listStack[ye.listStack.length-1]||0,Vt=ye.indentation<ht,Ht=ht+3;if(ye.fencedEndRE&&ye.indentation<=Ht&&(Vt||Pe.match(ye.fencedEndRE))){Fe.highlightFormatting&&(ye.formatting="code-block");var Ye;return Vt||(Ye=gt(ye)),ye.localMode=ye.localState=null,ye.block=Se,ye.f=St,ye.fencedEndRE=null,ye.code=0,ye.thisLine.fencedCodeEnd=!0,Vt?Ue(Pe,ye,ye.block):Ye}else return ye.localMode?ye.localMode.token(Pe,ye.localState):(Pe.skipToEnd(),Te.code)}function gt(Pe){var ye=[];if(Pe.formatting){ye.push(Te.formatting),typeof Pe.formatting=="string"&&(Pe.formatting=[Pe.formatting]);for(var ht=0;ht<Pe.formatting.length;ht++)ye.push(Te.formatting+"-"+Pe.formatting[ht]),Pe.formatting[ht]==="header"&&ye.push(Te.formatting+"-"+Pe.formatting[ht]+"-"+Pe.header),Pe.formatting[ht]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Pe.quote?ye.push(Te.formatting+"-"+Pe.formatting[ht]+"-"+Pe.quote):ye.push("error"))}if(Pe.taskOpen)return ye.push("meta"),ye.length?ye.join(" "):null;if(Pe.taskClosed)return ye.push("property"),ye.length?ye.join(" "):null;if(Pe.linkHref?ye.push(Te.linkHref,"url"):(Pe.strong&&ye.push(Te.strong),Pe.em&&ye.push(Te.em),Pe.strikethrough&&ye.push(Te.strikethrough),Pe.emoji&&ye.push(Te.emoji),Pe.linkText&&ye.push(Te.linkText),Pe.code&&ye.push(Te.code),Pe.image&&ye.push(Te.image),Pe.imageAltText&&ye.push(Te.imageAltText,"link"),Pe.imageMarker&&ye.push(Te.imageMarker)),Pe.header&&ye.push(Te.header,Te.header+"-"+Pe.header),Pe.quote&&(ye.push(Te.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Pe.quote?ye.push(Te.quote+"-"+Pe.quote):ye.push(Te.quote+"-"+Fe.maxBlockquoteDepth)),Pe.list!==!1){var Vt=(Pe.listStack.length-1)%3;Vt?Vt===1?ye.push(Te.list2):ye.push(Te.list3):ye.push(Te.list1)}return Pe.trailingSpaceNewLine?ye.push("trailing-space-new-line"):Pe.trailingSpace&&ye.push("trailing-space-"+(Pe.trailingSpace%2?"a":"b")),ye.length?ye.join(" "):null}function je(Pe,ye){if(Pe.match(st,!0))return gt(ye)}function St(Pe,ye){var ht=ye.text(Pe,ye);if(typeof ht!="undefined")return ht;if(ye.list)return ye.list=null,gt(ye);if(ye.taskList){var Vt=Pe.match(it,!0)[1]===" ";return Vt?ye.taskOpen=!0:ye.taskClosed=!0,Fe.highlightFormatting&&(ye.formatting="task"),ye.taskList=!1,gt(ye)}if(ye.taskOpen=!1,ye.taskClosed=!1,ye.header&&Pe.match(/^#+$/,!0))return Fe.highlightFormatting&&(ye.formatting="header"),gt(ye);var Ht=Pe.next();if(ye.linkTitle){ye.linkTitle=!1;var Ye=Ht;Ht==="("&&(Ye=")"),Ye=(Ye+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Je="^\\s*(?:[^"+Ye+"\\\\]+|\\\\\\\\|\\\\.)"+Ye;if(Pe.match(new RegExp(Je),!0))return Te.linkHref}if(Ht==="`"){var At=ye.formatting;Fe.highlightFormatting&&(ye.formatting="code"),Pe.eatWhile("`");var mn=Pe.current().length;if(ye.code==0&&(!ye.quote||mn==1))return ye.code=mn,gt(ye);if(mn==ye.code){var Gt=gt(ye);return ye.code=0,Gt}else return ye.formatting=At,gt(ye)}else if(ye.code)return gt(ye);if(Ht==="\\"&&(Pe.next(),Fe.highlightFormatting)){var hn=gt(ye),jt=Te.formatting+"-escape";return hn?hn+" "+jt:jt}if(Ht==="!"&&Pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ye.imageMarker=!0,ye.image=!0,Fe.highlightFormatting&&(ye.formatting="image"),gt(ye);if(Ht==="["&&ye.imageMarker&&Pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ye.imageMarker=!1,ye.imageAltText=!0,Fe.highlightFormatting&&(ye.formatting="image"),gt(ye);if(Ht==="]"&&ye.imageAltText){Fe.highlightFormatting&&(ye.formatting="image");var hn=gt(ye);return ye.imageAltText=!1,ye.image=!1,ye.inline=ye.f=Et,hn}if(Ht==="["&&!ye.image)return ye.linkText&&Pe.match(/^.*?\]/)||(ye.linkText=!0,Fe.highlightFormatting&&(ye.formatting="link")),gt(ye);if(Ht==="]"&&ye.linkText){Fe.highlightFormatting&&(ye.formatting="link");var hn=gt(ye);return ye.linkText=!1,ye.inline=ye.f=Pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Et:St,hn}if(Ht==="<"&&Pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ye.f=ye.inline=ot,Fe.highlightFormatting&&(ye.formatting="link");var hn=gt(ye);return hn?hn+=" ":hn="",hn+Te.linkInline}if(Ht==="<"&&Pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ye.f=ye.inline=ot,Fe.highlightFormatting&&(ye.formatting="link");var hn=gt(ye);return hn?hn+=" ":hn="",hn+Te.linkEmail}if(Fe.xml&&Ht==="<"&&Pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ft=Pe.string.indexOf(">",Pe.pos);if(Ft!=-1){var Kt=Pe.string.substring(Pe.start,Ft);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Kt)&&(ye.md_inside=!0)}return Pe.backUp(1),ye.htmlState=be.startState(ft),Ue(Pe,ye,Ke)}if(Fe.xml&&Ht==="<"&&Pe.match(/^\/\w*?>/))return ye.md_inside=!1,"tag";if(Ht==="*"||Ht==="_"){for(var ge=1,se=Pe.pos==1?" ":Pe.string.charAt(Pe.pos-2);ge<3&&Pe.eat(Ht);)ge++;var oe=Pe.peek()||" ",de=!/\s/.test(oe)&&(!tt.test(oe)||/\s/.test(se)||tt.test(se)),fe=!/\s/.test(se)&&(!tt.test(se)||/\s/.test(oe)||tt.test(oe)),le=null,$e=null;if(ge%2&&(!ye.em&&de&&(Ht==="*"||!fe||tt.test(se))?le=!0:ye.em==Ht&&fe&&(Ht==="*"||!de||tt.test(oe))&&(le=!1)),ge>1&&(!ye.strong&&de&&(Ht==="*"||!fe||tt.test(se))?$e=!0:ye.strong==Ht&&fe&&(Ht==="*"||!de||tt.test(oe))&&($e=!1)),$e!=null||le!=null){Fe.highlightFormatting&&(ye.formatting=le==null?"strong":$e==null?"em":"strong em"),le===!0&&(ye.em=Ht),$e===!0&&(ye.strong=Ht);var Gt=gt(ye);return le===!1&&(ye.em=!1),$e===!1&&(ye.strong=!1),Gt}}else if(Ht===" "&&(Pe.eat("*")||Pe.eat("_"))){if(Pe.peek()===" ")return gt(ye);Pe.backUp(1)}if(Fe.strikethrough){if(Ht==="~"&&Pe.eatWhile(Ht)){if(ye.strikethrough){Fe.highlightFormatting&&(ye.formatting="strikethrough");var Gt=gt(ye);return ye.strikethrough=!1,Gt}else if(Pe.match(/^[^\s]/,!1))return ye.strikethrough=!0,Fe.highlightFormatting&&(ye.formatting="strikethrough"),gt(ye)}else if(Ht===" "&&Pe.match(/^~~/,!0)){if(Pe.peek()===" ")return gt(ye);Pe.backUp(2)}}if(Fe.emoji&&Ht===":"&&Pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ye.emoji=!0,Fe.highlightFormatting&&(ye.formatting="emoji");var dt=gt(ye);return ye.emoji=!1,dt}return Ht===" "&&(Pe.match(/^ +$/,!1)?ye.trailingSpace++:ye.trailingSpace&&(ye.trailingSpaceNewLine=!0)),gt(ye)}function ot(Pe,ye){var ht=Pe.next();if(ht===">"){ye.f=ye.inline=St,Fe.highlightFormatting&&(ye.formatting="link");var Vt=gt(ye);return Vt?Vt+=" ":Vt="",Vt+Te.linkInline}return Pe.match(/^[^>]+/,!0),Te.linkInline}function Et(Pe,ye){if(Pe.eatSpace())return null;var ht=Pe.next();return ht==="("||ht==="["?(ye.f=ye.inline=Dt(ht==="("?")":"]"),Fe.highlightFormatting&&(ye.formatting="link-string"),ye.linkHref=!0,gt(ye)):"error"}var Ge={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Dt(Pe){return function(ye,ht){var Vt=ye.next();if(Vt===Pe){ht.f=ht.inline=St,Fe.highlightFormatting&&(ht.formatting="link-string");var Ht=gt(ht);return ht.linkHref=!1,Ht}return ye.match(Ge[Pe]),ht.linkHref=!0,gt(ht)}}function rt(Pe,ye){return Pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ye.f=yt,Pe.next(),Fe.highlightFormatting&&(ye.formatting="link"),ye.linkText=!0,gt(ye)):Lt(Pe,ye,St)}function yt(Pe,ye){if(Pe.match(/^\]:/,!0)){ye.f=ye.inline=Ct,Fe.highlightFormatting&&(ye.formatting="link");var ht=gt(ye);return ye.linkText=!1,ht}return Pe.match(/^([^\]\\]|\\.)+/,!0),Te.linkText}function Ct(Pe,ye){return Pe.eatSpace()?null:(Pe.match(/^[^\s]+/,!0),Pe.peek()===void 0?ye.linkTitle=!0:Pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ye.f=ye.inline=St,Te.linkHref+" url")}var ct={startState:function(){return{f:Se,prevLine:{stream:null},thisLine:{stream:null},block:Se,htmlState:null,indentation:0,inline:St,text:je,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(Pe){return{f:Pe.f,prevLine:Pe.prevLine,thisLine:Pe.thisLine,block:Pe.block,htmlState:Pe.htmlState&&be.copyState(ft,Pe.htmlState),indentation:Pe.indentation,localMode:Pe.localMode,localState:Pe.localMode?be.copyState(Pe.localMode,Pe.localState):null,inline:Pe.inline,text:Pe.text,formatting:!1,linkText:Pe.linkText,linkTitle:Pe.linkTitle,linkHref:Pe.linkHref,code:Pe.code,em:Pe.em,strong:Pe.strong,strikethrough:Pe.strikethrough,emoji:Pe.emoji,header:Pe.header,setext:Pe.setext,hr:Pe.hr,taskList:Pe.taskList,list:Pe.list,listStack:Pe.listStack.slice(0),quote:Pe.quote,indentedCode:Pe.indentedCode,trailingSpace:Pe.trailingSpace,trailingSpaceNewLine:Pe.trailingSpaceNewLine,md_inside:Pe.md_inside,fencedEndRE:Pe.fencedEndRE}},token:function(Pe,ye){if(ye.formatting=!1,Pe!=ye.thisLine.stream){if(ye.header=0,ye.hr=!1,Pe.match(/^\s*$/,!0))return He(ye),null;if(ye.prevLine=ye.thisLine,ye.thisLine={stream:Pe},ye.taskList=!1,ye.trailingSpace=0,ye.trailingSpaceNewLine=!1,!ye.localState&&(ye.f=ye.block,ye.f!=Ke)){var ht=Pe.match(/^\s*/,!0)[0].replace(/\t/g,pt).length;if(ye.indentation=ht,ye.indentationDiff=null,ht>0)return null}}return ye.f(Pe,ye)},innerMode:function(Pe){return Pe.block==Ke?{state:Pe.htmlState,mode:ft}:Pe.localState?{state:Pe.localState,mode:Pe.localMode}:{state:Pe,mode:ct}},indent:function(Pe,ye,ht){return Pe.block==Ke&&ft.indent?ft.indent(Pe.htmlState,ye,ht):Pe.localState&&Pe.localMode.indent?Pe.localMode.indent(Pe.localState,ye,ht):be.Pass},blankLine:He,getType:gt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ct},"xml"),be.defineMIME("text/markdown","markdown"),be.defineMIME("text/x-markdown","markdown")})},98101:function(wn,qt,ce){(function(be){be(ce(89780))})(function(be){"use strict";be.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 We=0;We<be.modeInfo.length;We++){var Fe=be.modeInfo[We];Fe.mimes&&(Fe.mime=Fe.mimes[0])}be.findModeByMIME=function(ft){ft=ft.toLowerCase();for(var xe=0;xe<be.modeInfo.length;xe++){var ke=be.modeInfo[xe];if(ke.mime==ft)return ke;if(ke.mimes){for(var Te=0;Te<ke.mimes.length;Te++)if(ke.mimes[Te]==ft)return ke}}if(/\+xml$/.test(ft))return be.findModeByMIME("application/xml");if(/\+json$/.test(ft))return be.findModeByMIME("application/json")},be.findModeByExtension=function(ft){ft=ft.toLowerCase();for(var xe=0;xe<be.modeInfo.length;xe++){var ke=be.modeInfo[xe];if(ke.ext){for(var Te=0;Te<ke.ext.length;Te++)if(ke.ext[Te]==ft)return ke}}},be.findModeByFileName=function(ft){for(var xe=0;xe<be.modeInfo.length;xe++){var ke=be.modeInfo[xe];if(ke.file&&ke.file.test(ft))return ke}var Te=ft.lastIndexOf("."),we=Te>-1&&ft.substring(Te+1,ft.length);if(we)return be.findModeByExtension(we)},be.findModeByName=function(ft){ft=ft.toLowerCase();for(var xe=0;xe<be.modeInfo.length;xe++){var ke=be.modeInfo[xe];if(ke.name.toLowerCase()==ft)return ke;if(ke.alias){for(var Te=0;Te<ke.alias.length;Te++)if(ke.alias[Te].toLowerCase()==ft)return ke}}}})},67549:function(wn,qt,ce){(function(be){be(ce(89780))})(function(be){"use strict";be.defineMode("stex",function(We,Fe){"use strict";function ft(st,Qe){st.cmdState.push(Qe)}function xe(st){return st.cmdState.length>0?st.cmdState[st.cmdState.length-1]:null}function ke(st){var Qe=st.cmdState.pop();Qe&&Qe.closeBracket()}function Te(st){for(var Qe=st.cmdState,at=Qe.length-1;at>=0;at--){var tt=Qe[at];if(tt.name!="DEFAULT")return tt}return{styleIdentifier:function(){return null}}}function we(st,Qe,at){return function(){this.name=st,this.bracketNo=0,this.style=Qe,this.styles=at,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ee={};Ee.importmodule=we("importmodule","tag",["string","builtin"]),Ee.documentclass=we("documentclass","tag",["","atom"]),Ee.usepackage=we("usepackage","tag",["atom"]),Ee.begin=we("begin","tag",["atom"]),Ee.end=we("end","tag",["atom"]),Ee.label=we("label","tag",["atom"]),Ee.ref=we("ref","tag",["atom"]),Ee.eqref=we("eqref","tag",["atom"]),Ee.cite=we("cite","tag",["atom"]),Ee.bibitem=we("bibitem","tag",["atom"]),Ee.Bibitem=we("Bibitem","tag",["atom"]),Ee.RBibitem=we("RBibitem","tag",["atom"]),Ee.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Oe(st,Qe){st.f=Qe}function it(st,Qe){var at;if(st.match(/^\\[a-zA-Z@]+/)){var tt=st.current().slice(1);return at=Ee.hasOwnProperty(tt)?Ee[tt]:Ee.DEFAULT,at=new at,ft(Qe,at),Oe(Qe,ze),at.style}if(st.match(/^\\[$&%#{}_]/)||st.match(/^\\[,;!\/\\]/))return"tag";if(st.match("\\["))return Oe(Qe,function(Lt,Ue){return Le(Lt,Ue,"\\]")}),"keyword";if(st.match("\\("))return Oe(Qe,function(Lt,Ue){return Le(Lt,Ue,"\\)")}),"keyword";if(st.match("$$"))return Oe(Qe,function(Lt,Ue){return Le(Lt,Ue,"$$")}),"keyword";if(st.match("$"))return Oe(Qe,function(Lt,Ue){return Le(Lt,Ue,"$")}),"keyword";var pt=st.next();if(pt=="%")return st.skipToEnd(),"comment";if(pt=="}"||pt=="]"){if(at=xe(Qe),at)at.closeBracket(pt),Oe(Qe,ze);else return"error";return"bracket"}else return pt=="{"||pt=="["?(at=Ee.DEFAULT,at=new at,ft(Qe,at),"bracket"):/\d/.test(pt)?(st.eatWhile(/[\w.%]/),"atom"):(st.eatWhile(/[\w\-_]/),at=Te(Qe),at.name=="begin"&&(at.argument=st.current()),at.styleIdentifier())}function Le(st,Qe,at){if(st.eatSpace())return null;if(at&&st.match(at))return Oe(Qe,it),"keyword";if(st.match(/^\\[a-zA-Z@]+/))return"tag";if(st.match(/^[a-zA-Z]+/))return"variable-2";if(st.match(/^\\[$&%#{}_]/)||st.match(/^\\[,;!\/]/)||st.match(/^[\^_&]/))return"tag";if(st.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(st.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var tt=st.next();return tt=="{"||tt=="}"||tt=="["||tt=="]"||tt=="("||tt==")"?"bracket":tt=="%"?(st.skipToEnd(),"comment"):"error"}function ze(st,Qe){var at=st.peek(),tt;return at=="{"||at=="["?(tt=xe(Qe),tt.openBracket(at),st.eat(at),Oe(Qe,it),"bracket"):/[ \t\r]/.test(at)?(st.eat(at),null):(Oe(Qe,it),ke(Qe),it(st,Qe))}return{startState:function(){var st=Fe.inMathMode?function(Qe,at){return Le(Qe,at)}:it;return{cmdState:[],f:st}},copyState:function(st){return{cmdState:st.cmdState.slice(),f:st.f}},token:function(st,Qe){return Qe.f(st,Qe)},blankLine:function(st){st.f=it,st.cmdState.length=0},lineComment:"%"}}),be.defineMIME("text/x-stex","stex"),be.defineMIME("text/x-latex","stex")})},15525:function(wn,qt,ce){(function(be){be(ce(89780))})(function(be){"use strict";var We={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},Fe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};be.defineMode("xml",function(ft,xe){var ke=ft.indentUnit,Te={},we=xe.htmlMode?We:Fe;for(var Ee in we)Te[Ee]=we[Ee];for(var Ee in xe)Te[Ee]=xe[Ee];var Oe,it;function Le(ot,Et){function Ge(yt){return Et.tokenize=yt,yt(ot,Et)}var Dt=ot.next();if(Dt=="<")return ot.eat("!")?ot.eat("[")?ot.match("CDATA[")?Ge(Qe("atom","]]>")):null:ot.match("--")?Ge(Qe("comment","-->")):ot.match("DOCTYPE",!0,!0)?(ot.eatWhile(/[\w\._\-]/),Ge(at(1))):null:ot.eat("?")?(ot.eatWhile(/[\w\._\-]/),Et.tokenize=Qe("meta","?>"),"meta"):(Oe=ot.eat("/")?"closeTag":"openTag",Et.tokenize=ze,"tag bracket");if(Dt=="&"){var rt;return ot.eat("#")?ot.eat("x")?rt=ot.eatWhile(/[a-fA-F\d]/)&&ot.eat(";"):rt=ot.eatWhile(/[\d]/)&&ot.eat(";"):rt=ot.eatWhile(/[\w\.\-:]/)&&ot.eat(";"),rt?"atom":"error"}else return ot.eatWhile(/[^&<]/),null}Le.isInText=!0;function ze(ot,Et){var Ge=ot.next();if(Ge==">"||Ge=="/"&&ot.eat(">"))return Et.tokenize=Le,Oe=Ge==">"?"endTag":"selfcloseTag","tag bracket";if(Ge=="=")return Oe="equals",null;if(Ge=="<"){Et.tokenize=Le,Et.state=Ue,Et.tagName=Et.tagStart=null;var Dt=Et.tokenize(ot,Et);return Dt?Dt+" tag error":"tag error"}else return/[\'\"]/.test(Ge)?(Et.tokenize=st(Ge),Et.stringStartCol=ot.column(),Et.tokenize(ot,Et)):(ot.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function st(ot){var Et=function(Ge,Dt){for(;!Ge.eol();)if(Ge.next()==ot){Dt.tokenize=ze;break}return"string"};return Et.isInAttribute=!0,Et}function Qe(ot,Et){return function(Ge,Dt){for(;!Ge.eol();){if(Ge.match(Et)){Dt.tokenize=Le;break}Ge.next()}return ot}}function at(ot){return function(Et,Ge){for(var Dt;(Dt=Et.next())!=null;){if(Dt=="<")return Ge.tokenize=at(ot+1),Ge.tokenize(Et,Ge);if(Dt==">")if(ot==1){Ge.tokenize=Le;break}else return Ge.tokenize=at(ot-1),Ge.tokenize(Et,Ge)}return"meta"}}function tt(ot,Et,Ge){this.prev=ot.context,this.tagName=Et,this.indent=ot.indented,this.startOfLine=Ge,(Te.doNotIndent.hasOwnProperty(Et)||ot.context&&ot.context.noIndent)&&(this.noIndent=!0)}function pt(ot){ot.context&&(ot.context=ot.context.prev)}function Lt(ot,Et){for(var Ge;;){if(!ot.context||(Ge=ot.context.tagName,!Te.contextGrabbers.hasOwnProperty(Ge)||!Te.contextGrabbers[Ge].hasOwnProperty(Et)))return;pt(ot)}}function Ue(ot,Et,Ge){return ot=="openTag"?(Ge.tagStart=Et.column(),Xe):ot=="closeTag"?He:Ue}function Xe(ot,Et,Ge){return ot=="word"?(Ge.tagName=Et.current(),it="tag",Ze):Te.allowMissingTagName&&ot=="endTag"?(it="tag bracket",Ze(ot,Et,Ge)):(it="error",Xe)}function He(ot,Et,Ge){if(ot=="word"){var Dt=Et.current();return Ge.context&&Ge.context.tagName!=Dt&&Te.implicitlyClosed.hasOwnProperty(Ge.context.tagName)&&pt(Ge),Ge.context&&Ge.context.tagName==Dt||Te.matchClosing===!1?(it="tag",Se):(it="tag error",Ke)}else return Te.allowMissingTagName&&ot=="endTag"?(it="tag bracket",Se(ot,Et,Ge)):(it="error",Ke)}function Se(ot,Et,Ge){return ot!="endTag"?(it="error",Se):(pt(Ge),Ue)}function Ke(ot,Et,Ge){return it="error",Se(ot,Et,Ge)}function Ze(ot,Et,Ge){if(ot=="word")return it="attribute",gt;if(ot=="endTag"||ot=="selfcloseTag"){var Dt=Ge.tagName,rt=Ge.tagStart;return Ge.tagName=Ge.tagStart=null,ot=="selfcloseTag"||Te.autoSelfClosers.hasOwnProperty(Dt)?Lt(Ge,Dt):(Lt(Ge,Dt),Ge.context=new tt(Ge,Dt,rt==Ge.indented)),Ue}return it="error",Ze}function gt(ot,Et,Ge){return ot=="equals"?je:(Te.allowMissing||(it="error"),Ze(ot,Et,Ge))}function je(ot,Et,Ge){return ot=="string"?St:ot=="word"&&Te.allowUnquoted?(it="string",Ze):(it="error",Ze(ot,Et,Ge))}function St(ot,Et,Ge){return ot=="string"?St:Ze(ot,Et,Ge)}return{startState:function(ot){var Et={tokenize:Le,state:Ue,indented:ot||0,tagName:null,tagStart:null,context:null};return ot!=null&&(Et.baseIndent=ot),Et},token:function(ot,Et){if(!Et.tagName&&ot.sol()&&(Et.indented=ot.indentation()),ot.eatSpace())return null;Oe=null;var Ge=Et.tokenize(ot,Et);return(Ge||Oe)&&Ge!="comment"&&(it=null,Et.state=Et.state(Oe||Ge,ot,Et),it&&(Ge=it=="error"?Ge+" error":it)),Ge},indent:function(ot,Et,Ge){var Dt=ot.context;if(ot.tokenize.isInAttribute)return ot.tagStart==ot.indented?ot.stringStartCol+1:ot.indented+ke;if(Dt&&Dt.noIndent)return be.Pass;if(ot.tokenize!=ze&&ot.tokenize!=Le)return Ge?Ge.match(/^(\s*)/)[0].length:0;if(ot.tagName)return Te.multilineTagIndentPastTag!==!1?ot.tagStart+ot.tagName.length+2:ot.tagStart+ke*(Te.multilineTagIndentFactor||1);if(Te.alignCDATA&&/<!\[CDATA\[/.test(Et))return 0;var rt=Et&&/^<(\/)?([\w_:\.-]*)/.exec(Et);if(rt&&rt[1])for(;Dt;)if(Dt.tagName==rt[2]){Dt=Dt.prev;break}else if(Te.implicitlyClosed.hasOwnProperty(Dt.tagName))Dt=Dt.prev;else break;else if(rt)for(;Dt;){var yt=Te.contextGrabbers[Dt.tagName];if(yt&&yt.hasOwnProperty(rt[2]))Dt=Dt.prev;else break}for(;Dt&&Dt.prev&&!Dt.startOfLine;)Dt=Dt.prev;return Dt?Dt.indent+ke:ot.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Te.htmlMode?"html":"xml",helperType:Te.htmlMode?"html":"xml",skipAttribute:function(ot){ot.state==je&&(ot.state=Ze)},xmlCurrentTag:function(ot){return ot.tagName?{name:ot.tagName,close:ot.type=="closeTag"}:null},xmlCurrentContext:function(ot){for(var Et=[],Ge=ot.context;Ge;Ge=Ge.prev)Ge.tagName&&Et.push(Ge.tagName);return Et.reverse()}}}),be.defineMIME("text/xml","xml"),be.defineMIME("application/xml","xml"),be.mimeModes.hasOwnProperty("text/html")||be.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(wn,qt,ce){"use strict";ce.d(qt,{hP:function(){return Kt}});var be=function(ge,se){return(be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,de){oe.__proto__=de}||function(oe,de){for(var fe in de)Object.prototype.hasOwnProperty.call(de,fe)&&(oe[fe]=de[fe])})(ge,se)};function We(ge,se){function oe(){this.constructor=ge}be(ge,se),ge.prototype=se===null?Object.create(se):(oe.prototype=se.prototype,new oe)}function Fe(ge,se,oe,de){return new(oe||(oe=Promise))(function(fe,le){function $e(Pt){try{Rt(de.next(Pt))}catch(Ut){le(Ut)}}function dt(Pt){try{Rt(de.throw(Pt))}catch(Ut){le(Ut)}}function Rt(Pt){var Ut;Pt.done?fe(Pt.value):(Ut=Pt.value,Ut instanceof oe?Ut:new oe(function(Xt){Xt(Ut)})).then($e,dt)}Rt((de=de.apply(ge,se||[])).next())})}function ft(ge,se){var oe,de,fe,le,$e={label:0,sent:function(){if(1&fe[0])throw fe[1];return fe[1]},trys:[],ops:[]};return le={next:dt(0),throw:dt(1),return:dt(2)},typeof Symbol=="function"&&(le[Symbol.iterator]=function(){return this}),le;function dt(Rt){return function(Pt){return function(Ut){if(oe)throw new TypeError("Generator is already executing.");for(;$e;)try{if(oe=1,de&&(fe=2&Ut[0]?de.return:Ut[0]?de.throw||((fe=de.return)&&fe.call(de),0):de.next)&&!(fe=fe.call(de,Ut[1])).done)return fe;switch(de=0,fe&&(Ut=[2&Ut[0],fe.value]),Ut[0]){case 0:case 1:fe=Ut;break;case 4:return $e.label++,{value:Ut[1],done:!1};case 5:$e.label++,de=Ut[1],Ut=[0];continue;case 7:Ut=$e.ops.pop(),$e.trys.pop();continue;default:if(fe=$e.trys,!((fe=fe.length>0&&fe[fe.length-1])||Ut[0]!==6&&Ut[0]!==2)){$e=0;continue}if(Ut[0]===3&&(!fe||Ut[1]>fe[0]&&Ut[1]<fe[3])){$e.label=Ut[1];break}if(Ut[0]===6&&$e.label<fe[1]){$e.label=fe[1],fe=Ut;break}if(fe&&$e.label<fe[2]){$e.label=fe[2],$e.ops.push(Ut);break}fe[2]&&$e.ops.pop(),$e.trys.pop();continue}Ut=se.call(ge,$e)}catch(Xt){Ut=[6,Xt],de=0}finally{oe=fe=0}if(5&Ut[0])throw Ut[1];return{value:Ut[0]?Ut[1]:void 0,done:!0}}([Rt,Pt])}}}function xe(){for(var ge=0,se=0,oe=arguments.length;se<oe;se++)ge+=arguments[se].length;var de=Array(ge),fe=0;for(se=0;se<oe;se++)for(var le=arguments[se],$e=0,dt=le.length;$e<dt;$e++,fe++)de[fe]=le[$e];return de}var ke=function(){function ge(){}return ge.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ge.setAttributes=function(se,oe){for(var de=0,fe=oe;de<fe.length;de++){var le=fe[de],$e=le[0],dt=le[1];se.setAttribute($e,dt)}},ge.createRect=function(se,oe,de){var fe=document.createElementNS("http://www.w3.org/2000/svg","rect");return fe.setAttribute("width",se.toString()),fe.setAttribute("height",oe.toString()),de&&ge.setAttributes(fe,de),fe},ge.createLine=function(se,oe,de,fe,le){var $e=document.createElementNS("http://www.w3.org/2000/svg","line");return $e.setAttribute("x1",se.toString()),$e.setAttribute("y1",oe.toString()),$e.setAttribute("x2",de.toString()),$e.setAttribute("y2",fe.toString()),le&&ge.setAttributes($e,le),$e},ge.createPolygon=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","polygon");return de.setAttribute("points",se),oe&&ge.setAttributes(de,oe),de},ge.createCircle=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","circle");return de.setAttribute("cx",(se/2).toString()),de.setAttribute("cy",(se/2).toString()),de.setAttribute("r",se.toString()),oe&&ge.setAttributes(de,oe),de},ge.createEllipse=function(se,oe,de){var fe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return fe.setAttribute("cx",(se/2).toString()),fe.setAttribute("cy",(oe/2).toString()),fe.setAttribute("rx",(se/2).toString()),fe.setAttribute("ry",(oe/2).toString()),de&&ge.setAttributes(fe,de),fe},ge.createGroup=function(se){var oe=document.createElementNS("http://www.w3.org/2000/svg","g");return se&&ge.setAttributes(oe,se),oe},ge.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ge.createMarker=function(se,oe,de,fe,le,$e,dt){var Rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ge.setAttributes(Rt,[["id",se],["orient",oe],["markerWidth",de.toString()],["markerHeight",fe.toString()],["refX",le.toString()],["refY",$e.toString()]]),Rt.appendChild(dt),Rt},ge.createText=function(se){var oe=document.createElementNS("http://www.w3.org/2000/svg","text");return oe.setAttribute("x","0"),oe.setAttribute("y","0"),se&&ge.setAttributes(oe,se),oe},ge.createTSpan=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","tspan");return de.textContent=se,oe&&ge.setAttributes(de,oe),de},ge.createImage=function(se){var oe=document.createElementNS("http://www.w3.org/2000/svg","image");return se&&ge.setAttributes(oe,se),oe},ge.createPoint=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return de.x=se,de.y=oe,de},ge.createPath=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","path");return de.setAttribute("d",se),oe&&ge.setAttributes(de,oe),de},ge}(),Te=function(){function ge(){}return ge.addKey=function(se){ge.key=se},Object.defineProperty(ge,"isLicensed",{get:function(){return!!ge.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ge.key)},enumerable:!1,configurable:!0}),ge}(),we=function(){function ge(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ge.prototype.rasterize=function(se,oe,de){var fe=this;return new Promise(function(le){var $e=de!==void 0?de:document.createElement("canvas");se===null&&(fe.markersOnly=!0,fe.naturalSize=!1);var dt=document.createElementNS("http://www.w3.org/2000/svg","svg");dt.setAttribute("xmlns","http://www.w3.org/2000/svg"),dt.setAttribute("width",oe.width.baseVal.valueAsString),dt.setAttribute("height",oe.height.baseVal.valueAsString),dt.setAttribute("viewBox","0 0 "+oe.viewBox.baseVal.width.toString()+" "+oe.viewBox.baseVal.height.toString()),dt.innerHTML=oe.innerHTML,fe.naturalSize===!0?(dt.width.baseVal.value=se.naturalWidth,dt.height.baseVal.value=se.naturalHeight):fe.width!==void 0&&fe.height!==void 0&&(dt.width.baseVal.value=fe.width,dt.height.baseVal.value=fe.height),$e.width=dt.width.baseVal.value,$e.height=dt.height.baseVal.value;var Rt=dt.outerHTML,Pt=$e.getContext("2d");fe.markersOnly!==!0&&Pt.drawImage(se,0,0,$e.width,$e.height);var Ut=window.URL,Xt=new Image($e.width,$e.height);Xt.setAttribute("crossOrigin","anonymous");var en=new Blob([Rt],{type:"image/svg+xml"}),ln=Ut.createObjectURL(en);Xt.onload=function(){Pt.drawImage(Xt,0,0),Ut.revokeObjectURL(ln);var Sn=$e.toDataURL(fe.imageType,fe.imageQuality);le(Sn)},Xt.src=ln})},ge}(),Ee=function(){},Oe=function(){function ge(se){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+se+"_"}return Object.defineProperty(ge.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ge.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(ge.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ge.prototype.addClass=function(se){return this.styleSheet===void 0&&this.addStyleSheet(),se.name=""+this.classNamePrefix+se.localName,this.classes.push(se),this.styleSheet.sheet.insertRule("."+se.name+" {"+se.style+"}",this.styleSheet.sheet.cssRules.length),se},ge.prototype.addRule=function(se){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(se),this.styleSheet.sheet.insertRule(se.selector+" {"+se.style+"}",this.styleSheet.sheet.cssRules.length)},ge.prototype.addStyleSheet=function(){var se;this.styleSheet=document.createElement("style"),((se=this.styleSheetRoot)!==null&&se!==void 0?se:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Le("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Le("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ge.prototype.removeStyleSheet=function(){var se;this.styleSheet&&(((se=this.styleSheetRoot)!==null&&se!==void 0?se:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ge}(),it=function(ge,se){this.selector=ge,this.style=se},Le=function(ge,se){this.localName=ge,this.style=se},ze=function(){function ge(se,oe,de,fe,le){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=se,this.displayMode=oe,this.markerItems=de,this.uiStyleSettings=fe,this.styles=le,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ge.prototype.show=function(se){var oe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=se,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var de=document.createElement("div");de.className=this.toolbarBlockStyleClass.name,de.style.whiteSpace="nowrap",this.uiContainer.appendChild(de),this.addActionButton(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(le){var $e=document.createElement("div");$e.className=""+oe.toolbarButtonStyleClass.name,$e.setAttribute("data-type-name",le.typeName),$e.innerHTML=le.icon,$e.addEventListener("click",function(){oe.markerToolbarButtonClicked($e,le)}),oe.buttons.push($e),oe.markerButtons.push($e)}),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 fe=document.createElement("div");fe.className=this.toolbarBlockStyleClass.name,fe.style.whiteSpace="nowrap",fe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(fe),this.addActionButton(fe,'<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(fe,'<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()},ge.prototype.addButtonClickListener=function(se){this.buttonClickListeners.push(se)},ge.prototype.removeButtonClickListener=function(se){this.buttonClickListeners.indexOf(se)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(se),1)},ge.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ge.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var se=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var oe=0;oe<this.markerButtons.length;oe++)oe<se||oe===se&&this.markerButtons.length-1===se?this.markerButtonBlock.appendChild(this.markerButtons[oe]):(oe===se&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[oe]))}},ge.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")},ge.prototype.resetButtonStyles=function(){var se=this;this.buttons.forEach(function(oe){oe.className=oe.className.replace(se.uiStyleSettings.toolbarButtonStyleColorsClassName?se.uiStyleSettings.toolbarButtonStyleColorsClassName:se.toolbarButtonStyleColorsClass.name,"").trim(),oe.className=oe.className.replace(se.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?se.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:se.toolbarActiveButtonStyleColorsClass.name,"").trim(),oe.className+=" "+(se.uiStyleSettings.toolbarButtonStyleColorsClassName?se.uiStyleSettings.toolbarButtonStyleColorsClassName:se.toolbarButtonStyleColorsClass.name)})},ge.prototype.addActionButton=function(se,oe,de){var fe=this,le=document.createElement("div");switch(le.className=""+this.toolbarButtonStyleClass.name,le.innerHTML=oe,le.setAttribute("data-action",de),le.addEventListener("click",function(){fe.actionToolbarButtonClicked(le,de)}),de){case"select":le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":le.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":le.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":le.style.fill=this.uiStyleSettings.closeButtonColor}se.appendChild(le),this.buttons.push(le)},ge.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Le("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 Le("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Le("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Le("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 Le("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var se=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Le("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*se)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*se)+`px;
|
|
|
padding: `+se+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Le("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Le("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ge.prototype.markerToolbarButtonClicked=function(se,oe){this.setActiveButton(se),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(de){return de("marker",oe)}),this.markerButtonOverflowBlock.style.display="none"},ge.prototype.actionToolbarButtonClicked=function(se,oe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(de){return de("action",oe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ge.prototype.setActiveButton=function(se){this.resetButtonStyles(),se.className=se.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),se.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ge.prototype.setActiveMarkerButton=function(se){var oe=this.markerButtons.find(function(de){return de.getAttribute("data-type-name")===se});oe&&this.setActiveButton(oe)},ge.prototype.setCurrentMarker=function(se){var oe=this;this.currentMarker=se,this.buttons.filter(function(de){return/delete|notes/.test(de.getAttribute("data-action"))}).forEach(function(de){oe.currentMarker===void 0?(de.style.fillOpacity="0.4",de.style.pointerEvents="none"):(de.style.fillOpacity="1",de.style.pointerEvents="all")})},ge}(),st=function(){function ge(se,oe,de,fe){this.panels=[],this.panelButtons=[],this.markerjsContainer=se,this.displayMode=oe,this.uiStyleSettings=de,this.styles=fe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ge.prototype.addStyles=function(){var se;this.toolboxStyleClass=this.styles.addClass(new Le("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 Le("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var oe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Le("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Le("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Le("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 Le("toolbox-panel-row_colors",`
|
|
|
background-color: `+((se=this.uiStyleSettings.toolboxBackgroundColor)!==null&&se!==void 0?se:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Le("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*oe)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*oe)+`px;
|
|
|
padding: `+oe+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Le("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Le("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ge.prototype.show=function(se){var oe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=se,this.uiContainer.className=this.toolboxStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ge.prototype.setPanelButtons=function(se){var oe,de,fe=this;this.panels=se,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((de=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&de!==void 0?de:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(le){var $e;le.uiStyleSettings=fe.uiStyleSettings;var dt=document.createElement("div");dt.className=fe.toolboxButtonStyleClass.name+" "+(($e=fe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$e!==void 0?$e:fe.toolboxButtonStyleColorsClass.name),dt.innerHTML=le.icon,dt.title=le.title,dt.addEventListener("click",function(){fe.panelButtonClick(le)}),fe.panelButtons.push(dt),fe.buttonRow.appendChild(dt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ge.prototype.panelButtonClick=function(se){var oe=this,de=-1;if(se!==this.activePanel){de=this.panels.indexOf(se),this.panelRow.innerHTML="";var fe=se.getUi();fe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(fe),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=se}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){oe.displayMode==="inline"?oe.panelRow.style.display="none":oe.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(le,$e){var dt,Rt;le.className=oe.toolboxButtonStyleClass.name+" "+($e===de?""+((dt=oe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&dt!==void 0?dt:oe.toolboxActiveButtonStyleColorsClass.name):""+((Rt=oe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Rt!==void 0?Rt:oe.toolboxButtonStyleColorsClass.name))})},ge}(),Qe=function(ge,se){this.title=ge,this.icon=se},at=function(ge){function se(oe,de,fe,le){var $e=ge.call(this,oe,le||'<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 $e.colors=[],$e.addTransparent=!1,$e.colorBoxes=[],$e.colors=de,$e.currentColor=fe,$e.setCurrentColor=$e.setCurrentColor.bind($e),$e.getColorBox=$e.getColorBox.bind($e),$e}return We(se,ge),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.overflow="hidden",de.style.whiteSpace="nowrap",this.colors.forEach(function(fe){var le=oe.getColorBox(fe);de.appendChild(le),oe.colorBoxes.push(le)}),de},se.prototype.getColorBox=function(oe){var de=this,fe=this.uiStyleSettings.toolbarHeight/4,le=this.uiStyleSettings.toolbarHeight-fe,$e=document.createElement("div");$e.style.display="inline-block",$e.style.boxSizing="content-box",$e.style.width=le-2+"px",$e.style.height=le-2+"px",$e.style.padding="1px",$e.style.marginRight="2px",$e.style.marginBottom="2px",$e.style.borderWidth="2px",$e.style.borderStyle="solid",$e.style.borderRadius=(le+2)/2+"px",$e.style.borderColor=oe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",$e.addEventListener("click",function(){de.setCurrentColor(oe,$e)});var dt=document.createElement("div");return dt.style.display="inline-block",dt.style.width=le-2+"px",dt.style.height=le-2+"px",dt.style.backgroundColor=oe,dt.style.borderRadius=le/2+"px",oe==="transparent"&&(dt.style.fill=this.uiStyleSettings.toolboxAccentColor,dt.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>`),$e.appendChild(dt),$e},se.prototype.setCurrentColor=function(oe,de){var fe=this;this.currentColor=oe,this.colorBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(oe)},se}(Qe),tt=function(){function ge(se,oe,de){this._state="new",this._isSelected=!1,this._container=se,this._overlayContainer=oe,this.globalSettings=de,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ge.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ge.prototype.ownsTarget=function(se){return!1},Object.defineProperty(ge.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ge.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ge.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ge.prototype.pointerDown=function(se,oe){},ge.prototype.dblClick=function(se,oe){},ge.prototype.manipulate=function(se){},ge.prototype.pointerUp=function(se){this.stateChanged()},ge.prototype.dispose=function(){},ge.prototype.addMarkerVisualToContainer=function(se){this.container.childNodes.length>0?this.container.insertBefore(se,this.container.childNodes[0]):this.container.appendChild(se)},ge.prototype.getState=function(){return{typeName:ge.typeName,state:this.state,notes:this.notes}},ge.prototype.restoreState=function(se){this._state=se.state,this.notes=se.notes},ge.prototype.scale=function(se,oe){},ge.prototype.colorChanged=function(se){this.onColorChanged&&this.onColorChanged(se),this.stateChanged()},ge.prototype.fillColorChanged=function(se){this.onFillColorChanged&&this.onFillColorChanged(se),this.stateChanged()},ge.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var se=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),se.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(se)&&this.onStateChanged(this)}},ge.typeName="MarkerBase",ge}(),pt=function(){function ge(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ge.prototype.findGripByVisual=function(se){return this.topLeft.ownsTarget(se)?this.topLeft:this.topCenter.ownsTarget(se)?this.topCenter:this.topRight.ownsTarget(se)?this.topRight:this.centerLeft.ownsTarget(se)?this.centerLeft:this.centerRight.ownsTarget(se)?this.centerRight:this.bottomLeft.ownsTarget(se)?this.bottomLeft:this.bottomCenter.ownsTarget(se)?this.bottomCenter:this.bottomRight.ownsTarget(se)?this.bottomRight:void 0},ge}(),Lt=function(){function ge(){this.GRIP_SIZE=10,this.visual=ke.createGroup(),this.visual.appendChild(ke.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ke.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ge.prototype.ownsTarget=function(se){return se===this.visual||se===this.visual.childNodes[0]||se===this.visual.childNodes[1]},ge}(),Ue=function(){function ge(){}return ge.toITransformMatrix=function(se){return{a:se.a,b:se.b,c:se.c,d:se.d,e:se.e,f:se.f}},ge.toSVGMatrix=function(se,oe){return se.a=oe.a,se.b=oe.b,se.c=oe.c,se.d=oe.d,se.e=oe.e,se.f=oe.f,se},ge}(),Xe=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.left=0,le.top=0,le.width=0,le.height=0,le.defaultSize={x:50,y:20},le.offsetX=0,le.offsetY=0,le.rotationAngle=0,le.CB_DISTANCE=10,le._suppressMarkerCreateEvent=!1,le.container.transform.baseVal.appendItem(ke.createTransform()),le.setupControlBox(),le}return We(se,ge),Object.defineProperty(se.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"visual",{get:function(){return this._visual},set:function(oe){this._visual=oe;var de=ke.createTransform();this._visual.transform.baseVal.appendItem(de)},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(oe){return!!ge.prototype.ownsTarget.call(this,oe)||!!(this.controlGrips.findGripByVisual(oe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe))},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.left=oe.x,this.top=oe.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var fe=this.unrotatePoint(oe);if(this.manipulationStartX=fe.x,this.manipulationStartY=fe.y,this.offsetX=fe.x-this.left,this.offsetY=fe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(de),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(de)){this.activeGrip=this.rotatorGrip;var le=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=le.x-this.width/2,this.top=le.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var $e=this.container.transform.baseVal.getItem(0);$e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($e,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},se.prototype.pointerUp=function(oe){var de=this.state;ge.prototype.pointerUp.call(this,oe),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(oe),this._state="select",de==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},se.prototype.moveVisual=function(oe){this.visual.style.transform="translate("+oe.x+"px, "+oe.y+"px)"},se.prototype.manipulate=function(oe){var de=this.unrotatePoint(oe);this.state==="creating"?this.resize(oe):this.state==="move"?(this.left=this.manipulationStartLeft+(de.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(de.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(de):this.state==="rotate"&&this.rotate(oe)},se.prototype.resize=function(oe){var de=this.manipulationStartLeft,fe=this.manipulationStartWidth,le=this.manipulationStartTop,$e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:de=this.manipulationStartLeft+oe.x-this.manipulationStartX,fe=this.manipulationStartWidth+this.manipulationStartLeft-de;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:fe=this.manipulationStartWidth+oe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:le=this.manipulationStartTop+oe.y-this.manipulationStartY,$e=this.manipulationStartHeight+this.manipulationStartTop-le;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:$e=this.manipulationStartHeight+oe.y-this.manipulationStartY}fe>=0?(this.left=de,this.width=fe):(this.left=de+fe,this.width=-fe),$e>=0?(this.top=le,this.height=$e):(this.top=le+$e,this.height=-$e),this.setSize()},se.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},se.prototype.rotate=function(oe){if(Math.abs(oe.x-this.centerX)>.1){var de=Math.sign(oe.x-this.centerX);this.rotationAngle=180*Math.atan((oe.y-this.centerY)/(oe.x-this.centerX))/Math.PI+90*de,this.applyRotation()}},se.prototype.applyRotation=function(){var oe=this.container.transform.baseVal.getItem(0);oe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(oe,0)},se.prototype.rotatePoint=function(oe){if(this.rotationAngle===0)return oe;var de=this.container.getCTM(),fe=ke.createPoint(oe.x,oe.y);return{x:(fe=fe.matrixTransform(de)).x,y:fe.y}},se.prototype.unrotatePoint=function(oe){if(this.rotationAngle===0)return oe;var de=this.container.getCTM();de=de.inverse();var fe=ke.createPoint(oe.x,oe.y);return{x:(fe=fe.matrixTransform(de)).x,y:fe.y}},se.prototype.select=function(){ge.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},se.prototype.deselect=function(){ge.prototype.deselect.call(this),this.controlBox.style.display="none"},se.prototype.setupControlBox=function(){this.controlBox=ke.createGroup();var oe=ke.createTransform();oe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(oe),this.container.appendChild(this.controlBox),this.controlRect=ke.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ke.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new pt,this.addControlGrips(),this.controlBox.style.display="none"},se.prototype.adjustControlBox=function(){var oe=this.controlBox.transform.baseVal.getItem(0);oe.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(oe,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()},se.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()},se.prototype.createGrip=function(){var oe=new Lt;return oe.visual.transform.baseVal.appendItem(ke.createTransform()),this.controlBox.appendChild(oe.visual),oe},se.prototype.positionGrips=function(){var oe=this.controlGrips.topLeft.GRIP_SIZE,de=-oe/2,fe=de,le=(this.width+this.CB_DISTANCE)/2-oe/2,$e=(this.height+this.CB_DISTANCE)/2-oe/2,dt=this.height+this.CB_DISTANCE-oe/2,Rt=this.width+this.CB_DISTANCE-oe/2;this.positionGrip(this.controlGrips.topLeft.visual,de,fe),this.positionGrip(this.controlGrips.topCenter.visual,le,fe),this.positionGrip(this.controlGrips.topRight.visual,Rt,fe),this.positionGrip(this.controlGrips.centerLeft.visual,de,$e),this.positionGrip(this.controlGrips.centerRight.visual,Rt,$e),this.positionGrip(this.controlGrips.bottomLeft.visual,de,dt),this.positionGrip(this.controlGrips.bottomCenter.visual,le,dt),this.positionGrip(this.controlGrips.bottomRight.visual,Rt,dt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,le,fe-3*this.CB_DISTANCE)},se.prototype.positionGrip=function(oe,de,fe){var le=oe.transform.baseVal.getItem(0);le.setTranslate(de,fe),oe.transform.baseVal.replaceItem(le,0)},se.prototype.hideControlBox=function(){this.controlBox.style.display="none"},se.prototype.showControlBox=function(){this.controlBox.style.display=""},se.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ue.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ue.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ge.prototype.getState.call(this))},se.prototype.restoreState=function(oe){ge.prototype.restoreState.call(this,oe);var de=oe;this.left=de.left,this.top=de.top,this.width=de.width,this.height=de.height,this.rotationAngle=de.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ue.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,de.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ue.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,de.containerTransformMatrix))},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de);var fe=this.rotatePoint({x:this.left,y:this.top}),le=this.unrotatePoint({x:fe.x*oe,y:fe.y*de});this.left=le.x,this.top=le.y,this.width=this.width*oe,this.height=this.height*de,this.adjustControlBox()},se}(tt),He=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.opacity=1,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.createVisual=le.createVisual.bind(le),le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.visual)},se.prototype.createVisual=function(){this.visual=ke.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.manipulate=function(oe){ge.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){ge.prototype.resize.call(this,oe),this.setSize()},se.prototype.setSize=function(){ge.prototype.setSize.call(this),ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},se.prototype.pointerUp=function(oe){ge.prototype.pointerUp.call(this,oe),this.setSize()},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.visual&&ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(oe),this.stateChanged()},se.prototype.setFillColor=function(oe){this.fillColor=oe,this.visual&&ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.visual&&ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.visual&&ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},se.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ge.prototype.getState.call(this))},se.prototype.restoreState=function(oe){var de=oe;this.fillColor=de.fillColor,this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.opacity=de.opacity,this.createVisual(),ge.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de),this.setSize()},se.title="Rectangle marker",se}(Xe),Se=function(ge){function se(oe,de,fe,le){var $e=ge.call(this,oe,le||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return $e.widths=[],$e.widthBoxes=[],$e.widths=de,$e.currentWidth=fe,$e.setCurrentWidth=$e.setCurrentWidth.bind($e),$e}return We(se,ge),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2",this.widths.forEach(function(fe){var le=document.createElement("div");le.style.display="flex",le.style.flexGrow="2",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderColor=fe===oe.currentWidth?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentWidth(fe,le)}),de.appendChild(le);var $e=document.createElement("div");$e.innerText=fe.toString(),$e.style.marginRight="5px",le.appendChild($e);var dt=document.createElement("div");dt.style.minHeight="20px",dt.style.flexGrow="2",dt.style.display="flex",dt.style.alignItems="center";var Rt=document.createElement("hr");Rt.style.minWidth="20px",Rt.style.border="0px",Rt.style.borderTop=fe+"px solid "+oe.uiStyleSettings.toolboxColor,Rt.style.flexGrow="2",dt.appendChild(Rt),le.appendChild(dt),oe.widthBoxes.push(le)}),de},se.prototype.setCurrentWidth=function(oe,de){var fe=this;this.currentWidth=oe,this.widthBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},se}(Qe),Ke=function(ge){function se(oe,de,fe,le){var $e=ge.call(this,oe,le||'<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 $e.styles=[],$e.styleBoxes=[],$e.styles=de,$e.currentStyle=fe,$e.setCurrentStyle=$e.setCurrentStyle.bind($e),$e}return We(se,ge),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2",this.styles.forEach(function(fe){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.overflow="hidden",le.style.maxWidth=100/oe.styles.length-5+"%",le.style.borderColor=fe===oe.currentStyle?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentStyle(fe,le)}),de.appendChild(le);var $e=document.createElement("div");$e.style.minHeight="20px",$e.style.flexGrow="2",$e.style.overflow="hidden";var dt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+oe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(fe!==""?'stroke-dasharray="'+fe+'"':"")+` />
|
|
|
</svg>`;$e.innerHTML=dt,le.appendChild($e),oe.styleBoxes.push(le)}),de},se.prototype.setCurrentStyle=function(oe,de){var fe=this;this.currentStyle=oe,this.styleBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},se}(Qe),Ze=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.strokePanel=new at("Line color",fe.defaultColorSet,fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Se("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return We(se,ge),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ge.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="FrameMarker",se.title="Frame marker",se.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',se}(He),gt=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"},je=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.x1=0,le.y1=0,le.x2=0,le.y2=0,le.defaultLength=50,le.manipulationStartX=0,le.manipulationStartY=0,le.manipulationStartX1=0,le.manipulationStartY1=0,le.manipulationStartX2=0,le.manipulationStartY2=0,le.setupControlBox(),le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!!ge.prototype.ownsTarget.call(this,oe)||!(!this.grip1.ownsTarget(oe)&&!this.grip2.ownsTarget(oe))},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.manipulationStartX=oe.x,this.manipulationStartY=oe.y,this.state==="new"&&(this.x1=oe.x,this.y1=oe.y,this.x2=oe.x,this.y2=oe.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(de)?this.activeGrip=this.grip1:this.grip2.ownsTarget(de)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},se.prototype.pointerUp=function(oe){var de=this.state;ge.prototype.pointerUp.call(this,oe),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(oe),this._state="select",de==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},se.prototype.adjustVisual=function(){},se.prototype.manipulate=function(oe){this.state==="creating"?this.resize(oe):this.state==="move"?(this.x1=this.manipulationStartX1+oe.x-this.manipulationStartX,this.y1=this.manipulationStartY1+oe.y-this.manipulationStartY,this.x2=this.manipulationStartX2+oe.x-this.manipulationStartX,this.y2=this.manipulationStartY2+oe.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(oe)},se.prototype.resize=function(oe){switch(this.activeGrip){case this.grip1:this.x1=oe.x,this.y1=oe.y;break;case this.grip2:case void 0:this.x2=oe.x,this.y2=oe.y}this.adjustVisual(),this.adjustControlBox()},se.prototype.select=function(){ge.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},se.prototype.deselect=function(){ge.prototype.deselect.call(this),this.controlBox.style.display="none"},se.prototype.setupControlBox=function(){this.controlBox=ke.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},se.prototype.adjustControlBox=function(){this.positionGrips()},se.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},se.prototype.createGrip=function(){var oe=new Lt;return oe.visual.transform.baseVal.appendItem(ke.createTransform()),this.controlBox.appendChild(oe.visual),oe},se.prototype.positionGrips=function(){var oe=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-oe/2,this.y1-oe/2),this.positionGrip(this.grip2.visual,this.x2-oe/2,this.y2-oe/2)},se.prototype.positionGrip=function(oe,de,fe){var le=oe.transform.baseVal.getItem(0);le.setTranslate(de,fe),oe.transform.baseVal.replaceItem(le,0)},se.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ge.prototype.getState.call(this))},se.prototype.restoreState=function(oe){ge.prototype.restoreState.call(this,oe);var de=oe;this.x1=de.x1,this.y1=de.y1,this.x2=de.x2,this.y2=de.y2},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de),this.x1=this.x1*oe,this.y1=this.y1*de,this.x2=this.x2*oe,this.y2=this.y2*de,this.adjustVisual(),this.adjustControlBox()},se}(tt),St=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.setStrokeColor=le.setStrokeColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.strokePanel=new at("Line color",fe.defaultColorSet,fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Se("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.selectorLine&&oe!==this.visibleLine)},se.prototype.createVisual=function(){this.visual=ke.createGroup(),this.selectorLine=ke.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ke.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},se.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ke.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ke.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ke.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.adjustVisual(),this.colorChanged(oe)},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.adjustVisual()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ge.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ge.prototype.restoreState.call(this,oe);var de=oe;this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.createVisual(),this.adjustVisual()},se.typeName="LineMarker",se.title="Line marker",se.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',se}(je),ot=function(ge){function se(oe,de,fe,le){var $e=ge.call(this,oe,le||'<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 $e.fonts=[],$e.fontBoxes=[],$e.fonts=de,$e.currentFont=fe,$e.setCurrentFont=$e.setCurrentFont.bind($e),$e}return We(se,ge),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.overflow="hidden",de.style.flexGrow="2",this.fonts.forEach(function(fe){var le=document.createElement("div");le.style.display="inline-block",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.overflow="hidden",le.style.maxWidth=100/oe.fonts.length-5+"%",le.style.borderColor=fe===oe.currentFont?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentFont(fe,le)}),de.appendChild(le);var $e=document.createElement("div");$e.style.display="flex",$e.style.minHeight="20px",$e.style.flexGrow="2",$e.style.fontFamily=fe,$e.style.overflow="hidden";var dt=document.createElement("div");dt.style.whiteSpace="nowrap",dt.style.overflow="hidden",dt.style.textOverflow="ellipsis",dt.innerHTML="The quick brown fox jumps over the lazy dog",$e.appendChild(dt),le.appendChild($e),oe.fontBoxes.push(le)}),de},se.prototype.setCurrentFont=function(oe,de){var fe=this;this.currentFont=oe,this.fontBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},se}(Qe),Et=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.color="transparent",le.padding=5,le.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",le.text=le.DEFAULT_TEXT,le.isMoved=!1,le.color=fe.defaultColor,le.fontFamily=fe.defaultFontFamily,le.defaultSize={x:100,y:30},le.setColor=le.setColor.bind(le),le.setFont=le.setFont.bind(le),le.renderText=le.renderText.bind(le),le.sizeText=le.sizeText.bind(le),le.textEditDivClicked=le.textEditDivClicked.bind(le),le.showTextEditor=le.showTextEditor.bind(le),le.setSize=le.setSize.bind(le),le.positionTextEditor=le.positionTextEditor.bind(le),le.colorPanel=new at("Color",fe.defaultColorSet,fe.defaultColor),le.colorPanel.onColorChanged=le.setColor,le.fontFamilyPanel=new ot("Font",fe.defaultFontFamilies,fe.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le}return We(se,ge),se.prototype.ownsTarget=function(oe){if(ge.prototype.ownsTarget.call(this,oe)||oe===this.visual||oe===this.textElement||oe===this.bgRectangle)return!0;var de=!1;return this.textElement.childNodes.forEach(function(fe){fe===oe&&(de=!0)}),de},se.prototype.createVisual=function(){this.visual=ke.createGroup(),this.bgRectangle=ke.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ke.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ke.createTransform()),this.textElement.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.isMoved=!1,this.pointerDownPoint=oe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.renderText=function(){var oe=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(de){oe.textElement.appendChild(ke.createTSpan(de.trim()===""?" ":de.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},se.prototype.getTextScale=function(){var oe=this.textElement.getBBox(),de=1;if(oe.width>0&&oe.height>0){var fe=(1*this.width-this.width*this.padding*2/100)/oe.width,le=(1*this.height-this.height*this.padding*2/100)/oe.height;de=Math.min(fe,le)}return de},se.prototype.getTextPosition=function(oe){var de=this.textElement.getBBox(),fe=0,le=0;return de.width>0&&de.height>0&&(fe=(this.width-de.width*oe)/2,le=this.height/2-de.height*oe/2),{x:fe,y:le}},se.prototype.sizeText=function(){var oe=this.textElement.getBBox(),de=this.getTextScale(),fe=this.getTextPosition(de);fe.y-=oe.y*de,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+fe.x+"px, "+fe.y+"px) scale("+de+", "+de+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(fe.x,fe.y),this.textElement.transform.baseVal.getItem(1).setScale(de,de))},se.prototype.manipulate=function(oe){ge.prototype.manipulate.call(this,oe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(oe.x-this.pointerDownPoint.x)>5||Math.abs(oe.y-this.pointerDownPoint.y)>5)},se.prototype.resize=function(oe){ge.prototype.resize.call(this,oe),this.isMoved=!0,this.setSize(),this.sizeText()},se.prototype.setSize=function(){ge.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ke.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},se.prototype.pointerUp=function(oe){var de=this.state;de==="creating"&&(this._suppressMarkerCreateEvent=!0),ge.prototype.pointerUp.call(this,oe),this.setSize(),(de==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},se.prototype.showTextEditor=function(){var oe=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(de){de.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var de=Number.parseFloat(oe.textEditor.style.fontSize);oe.textEditor.clientWidth>=Number.parseInt(oe.textEditor.style.maxWidth)&&de>.9;)de-=.1,oe.textEditor.style.fontSize=Math.max(de,.9)+"em"}),this.textEditor.addEventListener("keyup",function(de){de.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(de){if(de.clipboardData){var fe=de.clipboardData.getData("text"),le=window.getSelection();if(!le.rangeCount)return!1;le.deleteFromDocument(),le.getRangeAt(0).insertNode(document.createTextNode(fe)),de.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){oe.textEditDivClicked(oe.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},se.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var oe=this.getTextScale(),de=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),fe=this.textElement.getBBox(),le={x:fe.width*oe,y:fe.height*oe};de.x-=le.x/2,de.y-=le.y/2,this.textEditor.style.top=de.y+"px",this.textEditor.style.left=de.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-de.x+"px",this.textEditor.style.fontSize=Math.max(16*oe,12)+"px",this.textElement.style.display="none"}},se.prototype.textEditDivClicked=function(oe){this.text=oe.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},se.prototype.select=function(){ge.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},se.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ge.prototype.deselect.call(this)},se.prototype.dblClick=function(oe,de){ge.prototype.dblClick.call(this,oe,de),this.showTextEditor()},se.prototype.setColor=function(oe){this.textElement&&ke.setAttributes(this.textElement,[["fill",oe]]),this.color=oe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(oe)},se.prototype.setFont=function(oe){this.textElement&&ke.setAttributes(this.textElement,[["font-family",oe]]),this.fontFamily=oe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},se.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},se.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ge.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.color=de.color,this.fontFamily=de.fontFamily,this.padding=de.padding,this.text=de.text,this.createVisual(),ge.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de),this.setSize(),this.sizeText(),this.positionTextEditor()},se.typeName="TextMarker",se.title="Text marker",se.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>',se}(Xe),Ge=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.color="transparent",le.lineWidth=3,le.drawing=!1,le.pixelRatio=1,le.color=fe.defaultColor,le.lineWidth=fe.defaultStrokeWidth,le.pixelRatio=fe.freehandPixelRatio,le.setColor=le.setColor.bind(le),le.addCanvas=le.addCanvas.bind(le),le.finishCreation=le.finishCreation.bind(le),le.setLineWidth=le.setLineWidth.bind(le),le.colorPanel=new at("Color",fe.defaultColorSet,fe.defaultColor),le.colorPanel.onColorChanged=le.setColor,le.lineWidthPanel=new Se("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.lineWidthPanel.onWidthChanged=le.setLineWidth,le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.drawingImage)},se.prototype.createVisual=function(){this.visual=ke.createGroup(),this.drawingImage=ke.createImage(),this.visual.appendChild(this.drawingImage);var oe=ke.createTransform();this.visual.transform.baseVal.appendItem(oe),this.addMarkerVisualToContainer(this.visual)},se.prototype.pointerDown=function(oe,de){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(oe.x,oe.y),this.drawing=!0):ge.prototype.pointerDown.call(this,oe,de)},se.prototype.manipulate=function(oe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(oe.x,oe.y),this.canvasContext.stroke()):ge.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){ge.prototype.resize.call(this,oe),ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},se.prototype.pointerUp=function(oe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ge.prototype.pointerUp.call(this,oe)},se.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)},se.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ge.prototype.select.call(this)},se.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ge.prototype.deselect.call(this)},se.prototype.finishCreation=function(){for(var oe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),de=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],fe=de[0],le=de[1],$e=de[2],dt=de[3],Rt=!1,Pt=0;Pt<this.canvasElement.height;Pt++)for(var Ut=0;Ut<this.canvasElement.width;Ut++)oe.data[Pt*this.canvasElement.width*4+4*Ut+3]>0&&(Rt=!0,Pt<le&&(le=Pt),Ut<fe&&(fe=Ut),Pt>dt&&(dt=Pt),Ut>$e&&($e=Ut));if(Rt){this.left=fe/this.pixelRatio,this.top=le/this.pixelRatio,this.width=($e-fe)/this.pixelRatio,this.height=(dt-le)/this.pixelRatio;var Xt=document.createElement("canvas");Xt.width=$e-fe,Xt.height=dt-le,Xt.getContext("2d").putImageData(this.canvasContext.getImageData(fe,le,$e-fe,dt-le),0,0),this.drawingImgUrl=Xt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},se.prototype.setDrawingImage=function(){ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ke.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},se.prototype.setColor=function(oe){this.color=oe,this.colorChanged(oe)},se.prototype.setLineWidth=function(oe){this.lineWidth=oe},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({drawingImgUrl:this.drawingImgUrl},ge.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){this.createVisual(),ge.prototype.restoreState.call(this,oe),this.drawingImgUrl=oe.drawingImgUrl,this.setDrawingImage()},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de),this.setDrawingImage()},se.typeName="FreehandMarker",se.title="Freehand marker",se.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>',se}(Xe),Dt=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,fe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return le.typeBoxes=[],le.currentType=de,le.setCurrentType=le.setCurrentType.bind(le),le}return We(se,ge),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2";for(var fe=function(dt){var Rt="both";switch(dt){case 0:Rt="both";break;case 1:Rt="start";break;case 2:Rt="end";break;case 3:Rt="none"}var Pt=document.createElement("div");if(Pt.style.display="flex",Pt.style.flexGrow="2",Pt.style.alignItems="center",Pt.style.justifyContent="space-between",Pt.style.padding="5px",Pt.style.borderWidth="2px",Pt.style.borderStyle="solid",Pt.style.borderColor=Rt===le.currentType?le.uiStyleSettings.toolboxAccentColor:"transparent",Pt.addEventListener("click",function(){oe.setCurrentType(Rt,Pt)}),de.appendChild(Pt),Rt==="both"||Rt==="start"){var Ut=document.createElement("div");Ut.style.display="flex",Ut.style.alignItems="center",Ut.style.minHeight="20px",Ut.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="`+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ut.style.marginLeft="5px",Pt.appendChild(Ut)}var Xt=document.createElement("div");Xt.style.display="flex",Xt.style.alignItems="center",Xt.style.minHeight="20px",Xt.style.flexGrow="2";var en=document.createElement("hr");if(en.style.minWidth="20px",en.style.border="0px",en.style.borderTop="3px solid "+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee"),en.style.flexGrow="2",Xt.appendChild(en),Pt.appendChild(Xt),Rt==="both"||Rt==="end"){var ln=document.createElement("div");ln.style.display="flex",ln.style.alignItems="center",ln.style.minHeight="20px",ln.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="`+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ln.style.marginRight="5px",Pt.appendChild(ln)}le.typeBoxes.push(Pt)},le=this,$e=0;$e<4;$e++)fe($e);return de},se.prototype.setCurrentType=function(oe,de){var fe=this;this.currentType=oe,this.typeBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings!==void 0?fe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},se}(Qe),rt=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.arrowType="end",le.arrowBaseHeight=10,le.arrowBaseWidth=10,le.getArrowPoints=le.getArrowPoints.bind(le),le.setArrowType=le.setArrowType.bind(le),le.arrowTypePanel=new Dt("Arrow type","end"),le.arrowTypePanel.onArrowTypeChanged=le.setArrowType,le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.arrow1&&oe!==this.arrow2)},se.prototype.getArrowPoints=function(oe,de){var fe=this.arrowBaseWidth+2*this.strokeWidth,le=this.arrowBaseHeight+2*this.strokeWidth;return oe-fe/2+","+(de+le/2)+" "+oe+","+(de-le/2)+" "+(oe+fe/2)+","+(de+le/2)},se.prototype.createTips=function(){this.arrow1=ke.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ke.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.arrow2)},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.state==="creating"&&this.createTips()},se.prototype.adjustVisual=function(){if(ge.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ke.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ke.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var oe=0;Math.abs(this.x1-this.x2)>.1&&(oe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var de=this.arrow1.transform.baseVal.getItem(0);de.setRotate(oe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(de,0);var fe=this.arrow2.transform.baseVal.getItem(0);fe.setRotate(oe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(fe,0)}},se.prototype.setArrowType=function(oe){this.arrowType=oe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({arrowType:this.arrowType},ge.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ge.prototype.restoreState.call(this,oe);var de=oe;this.arrowType=de.arrowType,this.createTips(),this.adjustVisual()},se.typeName="ArrowMarker",se.title="Arrow marker",se.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',se}(St),yt=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.fillColor=fe.defaultFillColor,le.strokeWidth=0,le.fillPanel=new at("Color",fe.defaultColorSet,fe.defaultFillColor),le.fillPanel.onColorChanged=le.setFillColor,le}return We(se,ge),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ge.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="CoverMarker",se.title="Cover marker",se.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',se}(He),Ct=function(ge){function se(oe,de,fe,le){var $e=ge.call(this,oe,le||'<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 $e.opacities=[],$e.opacityBoxes=[],$e.opacities=de,$e.currentOpacity=fe,$e.setCurrentOpacity=$e.setCurrentOpacity.bind($e),$e}return We(se,ge),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2",de.style.justifyContent="space-between",this.opacities.forEach(function(fe){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.justifyContent="center",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderColor=fe===oe.currentOpacity?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentOpacity(fe,le)}),de.appendChild(le);var $e=document.createElement("div");$e.innerText=100*fe+"%",le.appendChild($e),oe.opacityBoxes.push(le)}),de},se.prototype.setCurrentOpacity=function(oe,de){var fe=this;this.currentOpacity=oe,this.opacityBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},se}(Qe),ct=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.setOpacity=le.setOpacity.bind(le),le.fillColor=fe.defaultHighlightColor,le.strokeWidth=0,le.opacity=fe.defaultHighlightOpacity,le.fillPanel=new at("Color",fe.defaultColorSet,le.fillColor),le.fillPanel.onColorChanged=le.setFillColor,le.opacityPanel=new Ct("Opacity",fe.defaultOpacitySteps,le.opacity),le.opacityPanel.onOpacityChanged=le.setOpacity,le}return We(se,ge),se.prototype.setOpacity=function(oe){this.opacity=oe,this.visual&&ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ge.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="HighlightMarker",se.title="Highlight marker",se.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>',se}(yt),Pe='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',ye='<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>',ht=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.bgColor="transparent",le.tipPosition={x:0,y:0},le.tipBase1Position={x:0,y:0},le.tipBase2Position={x:0,y:0},le.tipMoving=!1,le.color=fe.defaultStrokeColor,le.bgColor=fe.defaultFillColor,le.fontFamily=fe.defaultFontFamily,le.defaultSize={x:100,y:30},le.setBgColor=le.setBgColor.bind(le),le.getTipPoints=le.getTipPoints.bind(le),le.positionTip=le.positionTip.bind(le),le.setTipPoints=le.setTipPoints.bind(le),le.colorPanel=new at("Text color",fe.defaultColorSet,le.color,Pe),le.colorPanel.onColorChanged=le.setColor,le.bgColorPanel=new at("Fill color",fe.defaultColorSet,le.bgColor,ye),le.bgColorPanel.onColorChanged=le.setBgColor,le.fontFamilyPanel=new ot("Font",fe.defaultFontFamilies,fe.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le.tipGrip=new Lt,le.tipGrip.visual.transform.baseVal.appendItem(ke.createTransform()),le.controlBox.appendChild(le.tipGrip.visual),le}return We(se,ge),se.prototype.ownsTarget=function(oe){return ge.prototype.ownsTarget.call(this,oe)||this.tipGrip.ownsTarget(oe)||this.tip===oe},se.prototype.createTip=function(){ke.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ke.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},se.prototype.pointerDown=function(oe,de){this.state==="new"&&ge.prototype.pointerDown.call(this,oe,de),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(de)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ge.prototype.pointerDown.call(this,oe,de)},se.prototype.pointerUp=function(oe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ge.prototype.pointerUp.call(this,oe);else{var de=this.state==="creating";ge.prototype.pointerUp.call(this,oe),this.setTipPoints(de),this.positionTip()}},se.prototype.manipulate=function(oe){if(this.tipMoving){var de=this.unrotatePoint(oe);this.tipPosition={x:de.x-this.manipulationStartLeft,y:de.y-this.manipulationStartTop},this.positionTip()}else ge.prototype.manipulate.call(this,oe)},se.prototype.setBgColor=function(oe){this.bgRectangle&&this.tip&&(ke.setAttributes(this.bgRectangle,[["fill",oe]]),ke.setAttributes(this.tip,[["fill",oe]])),this.bgColor=oe,this.fillColorChanged(oe)},se.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},se.prototype.setTipPoints=function(oe){oe===void 0&&(oe=!1);var de=Math.min(this.height/2,15),fe=this.height/5;oe&&(this.tipPosition={x:de+fe/2,y:this.height+20});var le=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?le<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:de,y:0},this.tipBase2Position={x:de+fe,y:0}):(this.tipBase1Position={x:0,y:de},this.tipBase2Position={x:0,y:de+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?le<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-de-fe,y:0},this.tipBase2Position={x:this.width-de,y:0}):(this.tipBase1Position={x:this.width,y:de},this.tipBase2Position={x:this.width,y:de+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?le<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-de-fe,y:this.height},this.tipBase2Position={x:this.width-de,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-de-fe},this.tipBase2Position={x:this.width,y:this.height-de}):le<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:de,y:this.height},this.tipBase2Position={x:de+fe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-de},this.tipBase2Position={x:0,y:this.height-de-fe})},se.prototype.resize=function(oe){ge.prototype.resize.call(this,oe),this.positionTip()},se.prototype.positionTip=function(){ke.setAttributes(this.tip,[["points",this.getTipPoints()]]);var oe=this.tipGrip.visual.transform.baseVal.getItem(0);oe.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(oe,0)},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.positionTip(),ge.prototype.select.call(this)},se.prototype.getState=function(){var oe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ge.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.bgColor=de.bgColor,this.tipPosition=de.tipPosition,ge.prototype.restoreState.call(this,oe),this.createTip(),this.setTipPoints()},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de),this.tipPosition={x:this.tipPosition.x*oe,y:this.tipPosition.y*de},this.positionTip()},se.typeName="CalloutMarker",se.title="Callout marker",se.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>',se}(Et),Vt=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.opacity=1,le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.fillColor=fe.defaultFillColor,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.setOpacity=le.setOpacity.bind(le),le.createVisual=le.createVisual.bind(le),le.strokePanel=new at("Line color",xe(fe.defaultColorSet,["transparent"]),fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.fillPanel=new at("Fill color",xe(fe.defaultColorSet,["transparent"]),le.fillColor,ye),le.fillPanel.onColorChanged=le.setFillColor,le.strokeWidthPanel=new Se("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le.opacityPanel=new Ct("Opacity",fe.defaultOpacitySteps,le.opacity),le.opacityPanel.onOpacityChanged=le.setOpacity,le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.visual)},se.prototype.createVisual=function(){this.visual=ke.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.manipulate=function(oe){ge.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){ge.prototype.resize.call(this,oe),this.setSize()},se.prototype.setSize=function(){ge.prototype.setSize.call(this),ke.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},se.prototype.pointerUp=function(oe){ge.prototype.pointerUp.call(this,oe),this.setSize()},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.visual&&ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(oe),this.stateChanged()},se.prototype.setFillColor=function(oe){this.fillColor=oe,this.visual&&ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(oe),this.stateChanged()},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.visual&&ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.visual&&ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},se.prototype.setOpacity=function(oe){this.opacity=oe,this.visual&&ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ge.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.fillColor=de.fillColor,this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.opacity=de.opacity,this.createVisual(),ge.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de),this.setSize()},se.typeName="EllipseMarker",se.title="Ellipse marker",se.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>',se}(Xe),Ht=function(ge){function se(oe,de,fe){return ge.call(this,oe,de,fe)||this}return We(se,ge),Object.defineProperty(se.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.tip1&&oe!==this.tip2)},se.prototype.createTips=function(){this.tip1=ke.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ke.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ke.createTransform()),this.visual.appendChild(this.tip2)},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.state==="creating"&&this.createTips()},se.prototype.adjustVisual=function(){if(ge.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ke.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ke.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var oe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),de=this.tip1.transform.baseVal.getItem(0);de.setRotate(oe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(de,0);var fe=this.tip2.transform.baseVal.getItem(0);fe.setRotate(oe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(fe,0)}},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ge.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ge.prototype.restoreState.call(this,oe),this.createTips(),this.adjustVisual()},se.typeName="MeasurementMarker",se.title="Measurement marker",se.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>',se}(St),Ye=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.strokePanel.colors=fe.defaultColorSet,le.fillColor="transparent",le}return We(se,ge),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ge.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="EllipseFrameMarker",se.title="Ellipse frame marker",se.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>',se}(Vt),Je=function(){function ge(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ge.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ge.prototype.addUndoStep=function(se){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(se)||(this.undoStack.push(se),JSON.stringify(this.lastRedoStep)!==JSON.stringify(se)&&this.redoStack.splice(0,this.redoStack.length))},ge.prototype.replaceLastUndoStep=function(se){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=se)},ge.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ge.prototype.undo=function(){if(this.undoStack.length>1){var se=this.undoStack.pop();return se!==void 0&&this.redoStack.push(se),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ge.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ge}(),At=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.curveX=0,le.curveY=0,le.manipulationStartCurveX=0,le.manipulationStartCurveY=0,le.setStrokeColor=le.setStrokeColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.positionGrips=le.positionGrips.bind(le),le.addControlGrips=le.addControlGrips.bind(le),le.adjustVisual=le.adjustVisual.bind(le),le.setupControlBox=le.setupControlBox.bind(le),le.resize=le.resize.bind(le),le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.strokePanel=new at("Line color",fe.defaultColorSet,fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Se("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.selectorCurve&&oe!==this.visibleCurve&&!this.curveGrip.ownsTarget(oe))},se.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},se.prototype.createVisual=function(){this.visual=ke.createGroup(),this.selectorCurve=ke.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ke.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=oe.x,this.curveY=oe.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(de)&&(this.activeGrip=this.curveGrip,this._state="resize")},se.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ke.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ke.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ke.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},se.prototype.setupControlBox=function(){ge.prototype.setupControlBox.call(this),this.curveControlLine1=ke.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ke.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},se.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ge.prototype.addControlGrips.call(this)},se.prototype.positionGrips=function(){ge.prototype.positionGrips.call(this);var oe=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-oe/2,this.curveY-oe/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()))},se.prototype.manipulate=function(oe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+oe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+oe.y-this.manipulationStartY),ge.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){this.activeGrip===this.curveGrip&&(this.curveX=oe.x,this.curveY=oe.y),ge.prototype.resize.call(this,oe),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.adjustVisual(),this.colorChanged(oe)},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.adjustVisual()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.adjustVisual()},se.prototype.scale=function(oe,de){this.curveX=this.curveX*oe,this.curveY=this.curveY*de,ge.prototype.scale.call(this,oe,de)},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ge.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ge.prototype.restoreState.call(this,oe);var de=oe;this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.curveX=de.curveX,this.curveY=de.curveY,this.createVisual(),this.adjustVisual()},se.typeName="CurveMarker",se.title="Curve marker",se.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>',se}(je),mn=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,de,fe)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.textColor="transparent",le.fontSize="1rem",le.isMoved=!1,le.captionText="Caption",le.PADDING=5,le.captionBoxWidth=0,le.captionBoxHeight=0,le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.fillColor=fe.defaultFillColor,le.textColor=fe.defaultStrokeColor,le.fontFamily=fe.defaultFontFamily,le.fontSize=fe.defaultCaptionFontSize,le.captionText=fe.defaultCaptionText,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.createVisual=le.createVisual.bind(le),le.sizeCaption=le.sizeCaption.bind(le),le.setCaptionText=le.setCaptionText.bind(le),le.showTextEditor=le.showTextEditor.bind(le),le.positionTextEditor=le.positionTextEditor.bind(le),le.finishTextEditing=le.finishTextEditing.bind(le),le.setFont=le.setFont.bind(le),le.setTextColor=le.setTextColor.bind(le),le.strokePanel=new at("Line color",xe(fe.defaultColorSet,["transparent"]),le.strokeColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.fillPanel=new at("Fill color",xe(fe.defaultColorSet,["transparent"]),le.fillColor,ye),le.fillPanel.onColorChanged=le.setFillColor,le.strokeWidthPanel=new Se("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le.fontFamilyPanel=new ot("Font",fe.defaultFontFamilies,fe.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le.textColorPanel=new at("Text color",fe.defaultColorSet,le.textColor,Pe),le.textColorPanel.onColorChanged=le.setTextColor,le}return We(se,ge),se.prototype.ownsTarget=function(oe){return!(!ge.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.frame&&oe!==this.captionBg&&oe!==this.captionElement)},se.prototype.createVisual=function(){this.visual=ke.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ke.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ke.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=ke.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},se.prototype.setCaptionText=function(oe){this.captionText=oe,this.captionElement.textContent=this.captionText,this.sizeCaption()},se.prototype.pointerDown=function(oe,de){ge.prototype.pointerDown.call(this,oe,de),this.isMoved=!1,this.pointerDownPoint=oe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.manipulate=function(oe){ge.prototype.manipulate.call(this,oe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(oe.x-this.pointerDownPoint.x)>5||Math.abs(oe.y-this.pointerDownPoint.y)>5)},se.prototype.resize=function(oe){ge.prototype.resize.call(this,oe),this.setSize()},se.prototype.sizeCaption=function(){var oe=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=oe.width+2*this.PADDING,this.captionBoxHeight=oe.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ke.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),ke.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},se.prototype.showTextEditor=function(){var oe=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(de){de.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(de){de.key==="Enter"&&oe.finishTextEditing(oe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(de){de.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){oe.finishTextEditing(oe.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){oe.finishTextEditing(oe.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},se.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"))},se.prototype.finishTextEditing=function(oe){this.setCaptionText(oe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},se.prototype.setFont=function(oe){this.captionElement&&ke.setAttributes(this.captionElement,[["font-family",oe]]),this.fontFamily=oe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},se.prototype.setTextColor=function(oe){this.captionElement&&ke.setAttributes(this.captionElement,[["fill",oe]]),this.textColor=oe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},se.prototype.setSize=function(){ge.prototype.setSize.call(this),ke.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},se.prototype.pointerUp=function(oe){ge.prototype.pointerUp.call(this,oe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},se.prototype.dblClick=function(oe,de){ge.prototype.dblClick.call(this,oe,de),this.showTextEditor()},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.frame&&ke.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(oe),this.stateChanged()},se.prototype.setFillColor=function(oe){this.fillColor=oe,this.captionBg&&ke.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(oe),this.stateChanged()},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.frame&&ke.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.frame&&ke.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=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},ge.prototype.getState.call(this));return oe.typeName=this.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.fillColor=de.fillColor,this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.textColor=de.textColor,this.fontFamily=de.fontFamily,this.captionText=de.captionText,this.fontSize=de.fontSize,this.createVisual(),ge.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ge.prototype.scale.call(this,oe,de),this.setSize()},se.typeName="CaptionFrameMarker",se.title="Caption frame marker",se.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>',se}(Xe),Gt=function(){function ge(se,oe){oe===void 0&&(oe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=se,this.cancelable=oe}return Object.defineProperty(ge.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ge.prototype.preventDefault=function(){this._defaultPrevented=!0},ge}(),hn=function(ge){function se(oe,de,fe){var le=ge.call(this,oe,!1)||this;return le.dataUrl=de,le.state=fe,le}return We(se,ge),se}(Gt),jt=function(ge){function se(oe,de,fe){fe===void 0&&(fe=!1);var le=ge.call(this,oe,fe)||this;return le.marker=de,le}return We(se,ge),se}(Gt),Ft=function(){function ge(){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 ge.prototype.addEventListener=function(se,oe){this[se].push(oe)},ge.prototype.removeEventListener=function(se,oe){var de=this[se].indexOf(oe);de>-1&&this[se].splice(de,1)},ge}(),Kt=function(){function ge(se){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new gt,this._isOpen=!1,this.undoRedoManager=new Je,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 Ft,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ge.instanceCounter++,this.styles=new Oe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=se,this.targetRoot=document.body,this.width=se.clientWidth,this.height=se.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(ge.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ze,Ge,rt,Et,Ye,Vt,ct,ht,Ht,yt,St,At,mn]},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ze,Ge,rt,Et,Vt,ct,ht]},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ze,Ge,rt,Et,ct]},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(se){var oe=this;this._availableMarkerTypes.splice(0),se.forEach(function(de){if(typeof de=="string"){var fe=oe.ALL_MARKER_TYPES.find(function(le){return le.typeName===de});fe!==void 0&&oe._availableMarkerTypes.push(fe)}else oe._availableMarkerTypes.push(de)})},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(se){this._zoomLevel=se,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(ge.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ge.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Te.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ge.prototype.show=function(){var se=this;this.styles.styleSheetRoot===void 0&&Ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(oe){return oe(new Gt(se))})},ge.prototype.render=function(){return Fe(this,void 0,void 0,function(){var se;return ft(this,function(oe){switch(oe.label){case 0:return this.setCurrentMarker(),(se=new we).naturalSize=this.renderAtNaturalSize,se.imageType=this.renderImageType,se.imageQuality=this.renderImageQuality,se.markersOnly=this.renderMarkersOnly,se.width=this.renderWidth,se.height=this.renderHeight,[4,se.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return oe.sent(),[4,se.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,oe.sent()]}})})},ge.prototype.close=function(se){var oe=this;if(se===void 0&&(se=!1),this.isOpen){var de=!1;se||this.eventListeners.beforeclose.forEach(function(fe){var le=new Gt(oe,!0);fe(le),le.defaultPrevented&&(de=!0)}),de||(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(fe){return fe(new Gt(oe))}),this.detachEvents(),this._isOpen=!1)}},ge.prototype.addMarkersToToolbar=function(){for(var se,oe=[],de=0;de<arguments.length;de++)oe[de]=arguments[de];(se=this._availableMarkerTypes).push.apply(se,oe)},ge.prototype.addRenderEventListener=function(se){this.addEventListener("render",function(oe){se(oe.dataUrl,oe.state)})},ge.prototype.removeRenderEventListener=function(se){},ge.prototype.addCloseEventListener=function(se){this.addEventListener("close",function(){se()})},ge.prototype.removeCloseEventListener=function(se){},ge.prototype.setupResizeObserver=function(){var se=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){se.resize(se.target.clientWidth,se.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return se.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ge.prototype.onPopupTargetResize=function(){var se=1*this.target.clientWidth/this.target.clientHeight,oe=this.editorCanvas.clientWidth/se>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*se:this.editorCanvas.clientWidth,de=oe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/se;this.resize(oe,de)},ge.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ge.prototype.resize=function(se,oe){this._isResizing=!0;var de=se/this.imageWidth,fe=oe/this.imageHeight;this.imageWidth=Math.round(se),this.imageHeight=Math.round(oe),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(de,fe),this._isResizing=!1},ge.prototype.scaleMarkers=function(se,oe){var de,fe=this;this._currentMarker&&this._currentMarker instanceof Et?this._currentMarker.scale(se,oe):(de=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(le){le!==fe._currentMarker&&le.scale(se,oe)}),de!==void 0&&this.setCurrentMarker(de)},ge.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"},ge.prototype.setTopLeft=function(){var se=this.editingTarget.getBoundingClientRect(),oe=this.editorCanvas.getBoundingClientRect();this.left=se.left-oe.left,this.top=se.top-oe.top},ge.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)},ge.prototype.addDefs=function(){for(var se,oe=[],de=0;de<arguments.length;de++)oe[de]=arguments[de];this.defs=ke.createDefs(),this.addDefsToImage(),(se=this.defs).append.apply(se,oe)},ge.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ge.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)},ge.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ge.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ge.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)},ge.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ge.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)},ge.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 se=document.createElement("a");se.href="https://markerjs.com/",se.target="_blank",se.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>',se.title="Powered by marker.js",se.style.display="grid",se.style.alignItems="center",se.style.justifyItems="center",se.style.padding="3px",se.style.width="20px",se.style.height="20px",this.logoUI.appendChild(se),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ge.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")},ge.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"},ge.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ge.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 se=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=se+"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 ze(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 st(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ge.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ge.prototype.removeMarker=function(se){this.markerImage.removeChild(se.container),this.markers.indexOf(se)>-1&&this.markers.splice(this.markers.indexOf(se),1),se.dispose()},ge.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())},ge.prototype.toolbarButtonClicked=function(se,oe){if(se==="marker"&&oe!==void 0)this.createNewMarker(oe);else if(se==="action")switch(oe){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()}},ge.prototype.deleteSelectedMarker=function(){var se=this;if(this._currentMarker!==void 0){var oe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(fe){var le=new jt(se,se._currentMarker,!0);fe(le),le.defaultPrevented&&(oe=!0)}),!oe){var de=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(fe){return fe(new jt(se,de))})}}},ge.prototype.clear=function(){var se=this,oe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function($e){var dt=new jt(se,void 0,!0);$e(dt),dt.defaultPrevented&&(oe=!0)}),!oe)){this.setCurrentMarker();for(var de=function($e){var dt=fe.markers[$e];fe.setCurrentMarker(fe.markers[$e]),fe._currentMarker.dispose(),fe.markerImage.removeChild(fe._currentMarker.container),fe.markers.splice(fe.markers.indexOf(fe._currentMarker),1),fe.eventListeners.markerdelete.forEach(function(Rt){return Rt(new jt(se,dt))})},fe=this,le=this.markers.length-1;le>=0;le--)de(le);this.addUndoStep()}},Object.defineProperty(ge.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ge.prototype.showNotesEditor=function(){var se;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=(se=this._currentMarker.notes)!==null&&se!==void 0?se:"",this.overlayContainer.appendChild(this.notesArea))},ge.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)},ge.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ge.prototype.addUndoStep=function(){var se=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var oe=this.getState(),de=this.undoRedoManager.getLastUndoStep();if(!de||de.width===oe.width&&de.height===oe.height){var fe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(oe),fe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(le){return le(new Gt(se))})}else this.undoRedoManager.replaceLastUndoStep(oe),this.eventListeners.statechange.forEach(function(le){return le(new Gt(se))})}},ge.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ge.prototype.undoStep=function(){var se=this,oe=this.undoRedoManager.undo();oe!==void 0&&(this.restoreState(oe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(de){return de(new Gt(se))}))},ge.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ge.prototype.redoStep=function(){var se=this,oe=this.undoRedoManager.redo();oe!==void 0&&(this.restoreState(oe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(de){return de(new Gt(se))}))},ge.prototype.stepZoom=function(){var se=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=se<this.zoomSteps.length-1?this.zoomSteps[se+1]:this.zoomSteps[0]},ge.prototype.panTo=function(se){this.contentDiv.scrollBy({left:this.prevPanPoint.x-se.x,top:this.prevPanPoint.y-se.y}),this.prevPanPoint=se},ge.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var se,oe,de=this;return ft(this,function(fe){switch(fe.label){case 0:return[4,this.render()];case 1:return se=fe.sent(),oe=this.getState(),this.eventListeners.render.forEach(function(le){return le(new hn(de,se,oe))}),this.close(!0),[2]}})})},ge.prototype.getState=function(se){se===!0&&this.setCurrentMarker();var oe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(de){return oe.markers.push(de.getState())}),oe},ge.prototype.restoreState=function(se){var oe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);se.markers.forEach(function(de){var fe=oe._availableMarkerTypes.find(function($e){return $e.typeName===de.typeName});if(fe!==void 0){var le=oe.addNewMarker(fe);le.restoreState(de),oe.markers.push(le)}}),se.width&&se.height&&(se.width!==this.imageWidth||se.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/se.width,this.imageHeight/se.height),this.eventListeners.restorestate.forEach(function(de){return de(new Gt(oe))})},ge.prototype.addNewMarker=function(se){var oe=ke.createGroup();return this.markerImage.appendChild(oe),new se(oe,this.overlayContainer,this.settings)},ge.prototype.createNewMarker=function(se){var oe,de=this;(oe=typeof se=="string"?this._availableMarkerTypes.find(function(fe){return fe.typeName===se}):se)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(oe),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(oe.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(fe){return fe(new jt(de,de._currentMarker))}))},ge.prototype.markerCreated=function(se){var oe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(se),this.setCurrentMarker(se),se instanceof Ge&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ge):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(de){return de(new jt(oe,oe._currentMarker))})},ge.prototype.colorChanged=function(se){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=se,this.settings.defaultStrokeColor=se)},ge.prototype.fillColorChanged=function(se){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=se)},ge.prototype.markerStateChanged=function(se){var oe=this;this.eventListeners.markerchange.forEach(function(de){return de(new jt(oe,se))})},ge.prototype.setCurrentMarker=function(se){var oe=this;this._currentMarker!==se&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(de){return de(new jt(oe,oe._currentMarker))})),this._currentMarker=se,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(de){return de(new jt(oe,oe._currentMarker))}))},ge.prototype.onPointerDown=function(se){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||se.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var oe=this.markers.find(function(de){return de.ownsTarget(se.target)});oe!==void 0?(this.setCurrentMarker(oe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(se.clientX,se.clientY),se.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:se.clientX,y:se.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(se.clientX,se.clientY))},ge.prototype.onDblClick=function(se){if(this._isFocused||this.focus(),this.mode==="select"){var oe=this.markers.find(function(de){return de.ownsTarget(se.target)});oe!==void 0&&oe!==this._currentMarker&&this.setCurrentMarker(oe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(se.clientX,se.clientY),se.target):this.setCurrentMarker()}},ge.prototype.onPointerMove=function(se){this.touchPoints!==1&&se.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||se.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(se.clientX,se.clientY)):this.zoomLevel>1&&this.panTo({x:se.clientX,y:se.clientY}))},ge.prototype.onPointerUp=function(se){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(se.clientX,se.clientY)),this.isDragging=!1,this.addUndoStep()},ge.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ge.prototype.onKeyUp=function(se){this._currentMarker===void 0||this.notesArea!==void 0||se.key!=="Delete"&&se.key!=="Backspace"||this.deleteSelectedMarker()},ge.prototype.clientToLocalCoordinates=function(se,oe){var de=this.markerImage.getBoundingClientRect();return{x:(se-de.left)/this.zoomLevel,y:(oe-de.top)/this.zoomLevel}},ge.prototype.onWindowResize=function(){this.positionUI()},ge.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var se=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=se+"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()},ge.prototype.addLicenseKey=function(se){Te.addKey(se)},ge.prototype.addEventListener=function(se,oe){this.eventListeners.addEventListener(se,oe)},ge.prototype.removeEventListener=function(se,oe){this.eventListeners.removeEventListener(se,oe)},ge.prototype.renderState=function(se){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(se),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ge.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ge.prototype.focus=function(){var se=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(oe){return oe(new Gt(se))}))},ge.prototype.blur=function(){var se=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(oe){return oe(new Gt(se))}))},ge.instanceCounter=0,ge}()},5630:function(wn,qt,ce){"use strict";var be=ce(54476),We=ce(33885),Fe=ce(20068),ft=ce(42978),xe=ce(75931),ke=ce(92310),Te=ce.n(ke),we=ce(18929),Ee=ce(59301),Oe=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],it=(0,Ee.forwardRef)(function(Le,ze){var st,Qe=Le.prefixCls,at=Qe===void 0?"rc-checkbox":Qe,tt=Le.className,pt=Le.style,Lt=Le.checked,Ue=Le.disabled,Xe=Le.defaultChecked,He=Xe===void 0?!1:Xe,Se=Le.type,Ke=Se===void 0?"checkbox":Se,Ze=Le.title,gt=Le.onChange,je=(0,xe.Z)(Le,Oe),St=(0,Ee.useRef)(null),ot=(0,we.Z)(He,{value:Lt}),Et=(0,ft.Z)(ot,2),Ge=Et[0],Dt=Et[1];(0,Ee.useImperativeHandle)(ze,function(){return{focus:function(){var ct;(ct=St.current)===null||ct===void 0||ct.focus()},blur:function(){var ct;(ct=St.current)===null||ct===void 0||ct.blur()},input:St.current}});var rt=Te()(at,tt,(st={},(0,Fe.Z)(st,"".concat(at,"-checked"),Ge),(0,Fe.Z)(st,"".concat(at,"-disabled"),Ue),st)),yt=function(ct){Ue||("checked"in Le||Dt(ct.target.checked),gt==null||gt({target:(0,We.Z)((0,We.Z)({},Le),{},{type:Ke,checked:ct.target.checked}),stopPropagation:function(){ct.stopPropagation()},preventDefault:function(){ct.preventDefault()},nativeEvent:ct.nativeEvent}))};return Ee.createElement("span",{className:rt,title:Ze,style:pt},Ee.createElement("input",(0,be.Z)({},je,{className:"".concat(at,"-input"),ref:St,onChange:yt,disabled:Ue,checked:!!Ge,type:Ke})),Ee.createElement("span",{className:"".concat(at,"-inner")}))});qt.Z=it},31561:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Ke}});var be=ce(54476),We=ce(20068),Fe=ce(42978),ft=ce(75931),xe=ce(35593),ke=ce(92310),Te=ce.n(ke),we=ce(8654),Ee=ce(59301),Oe=ce(10228),it=ce(16089),Le=Oe.Z.ESC,ze=Oe.Z.TAB;function st(Ze){var gt=Ze.visible,je=Ze.triggerRef,St=Ze.onVisibleChange,ot=Ze.autoFocus,Et=Ze.overlayRef,Ge=Ee.useRef(!1),Dt=function(){if(gt){var ct,Pe;(ct=je.current)===null||ct===void 0||(Pe=ct.focus)===null||Pe===void 0||Pe.call(ct),St==null||St(!1)}},rt=function(){var ct;return(ct=Et.current)!==null&&ct!==void 0&&ct.focus?(Et.current.focus(),Ge.current=!0,!0):!1},yt=function(ct){switch(ct.keyCode){case Le:Dt();break;case ze:{var Pe=!1;Ge.current||(Pe=rt()),Pe?ct.preventDefault():Dt();break}}};Ee.useEffect(function(){return gt?(window.addEventListener("keydown",yt),ot&&(0,it.Z)(rt,3),function(){window.removeEventListener("keydown",yt),Ge.current=!1}):function(){Ge.current=!1}},[gt])}var Qe=(0,Ee.forwardRef)(function(Ze,gt){var je=Ze.overlay,St=Ze.arrow,ot=Ze.prefixCls,Et=(0,Ee.useMemo)(function(){var Dt;return typeof je=="function"?Dt=je():Dt=je,Dt},[je]),Ge=(0,we.sQ)(gt,Et==null?void 0:Et.ref);return Ee.createElement(Ee.Fragment,null,St&&Ee.createElement("div",{className:"".concat(ot,"-arrow")}),Ee.cloneElement(Et,{ref:(0,we.Yr)(Et)?Ge:void 0}))}),at=Qe,tt={adjustX:1,adjustY:1},pt=[0,0],Lt={topLeft:{points:["bl","tl"],overflow:tt,offset:[0,-4],targetOffset:pt},top:{points:["bc","tc"],overflow:tt,offset:[0,-4],targetOffset:pt},topRight:{points:["br","tr"],overflow:tt,offset:[0,-4],targetOffset:pt},bottomLeft:{points:["tl","bl"],overflow:tt,offset:[0,4],targetOffset:pt},bottom:{points:["tc","bc"],overflow:tt,offset:[0,4],targetOffset:pt},bottomRight:{points:["tr","br"],overflow:tt,offset:[0,4],targetOffset:pt}},Ue=Lt,Xe=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function He(Ze,gt){var je,St=Ze.arrow,ot=St===void 0?!1:St,Et=Ze.prefixCls,Ge=Et===void 0?"rc-dropdown":Et,Dt=Ze.transitionName,rt=Ze.animation,yt=Ze.align,Ct=Ze.placement,ct=Ct===void 0?"bottomLeft":Ct,Pe=Ze.placements,ye=Pe===void 0?Ue:Pe,ht=Ze.getPopupContainer,Vt=Ze.showAction,Ht=Ze.hideAction,Ye=Ze.overlayClassName,Je=Ze.overlayStyle,At=Ze.visible,mn=Ze.trigger,Gt=mn===void 0?["hover"]:mn,hn=Ze.autoFocus,jt=Ze.overlay,Ft=Ze.children,Kt=Ze.onVisibleChange,ge=(0,ft.Z)(Ze,Xe),se=Ee.useState(),oe=(0,Fe.Z)(se,2),de=oe[0],fe=oe[1],le="visible"in Ze?At:de,$e=Ee.useRef(null),dt=Ee.useRef(null),Rt=Ee.useRef(null);Ee.useImperativeHandle(gt,function(){return $e.current});var Pt=function(ut){fe(ut),Kt==null||Kt(ut)};st({visible:le,triggerRef:Rt,onVisibleChange:Pt,autoFocus:hn,overlayRef:dt});var Ut=function(ut){var wt=Ze.onOverlayClick;fe(!1),wt&&wt(ut)},Xt=function(){return Ee.createElement(at,{ref:dt,overlay:jt,prefixCls:Ge,arrow:ot})},en=function(){return typeof jt=="function"?Xt:Xt()},ln=function(){var ut=Ze.minOverlayWidthMatchTrigger,wt=Ze.alignPoint;return"minOverlayWidthMatchTrigger"in Ze?ut:!wt},Sn=function(){var ut=Ze.openClassName;return ut!==void 0?ut:"".concat(Ge,"-open")},xt=Ee.cloneElement(Ft,{className:Te()((je=Ft.props)===null||je===void 0?void 0:je.className,le&&Sn()),ref:(0,we.Yr)(Ft)?(0,we.sQ)(Rt,Ft.ref):void 0}),an=Ht;return!an&&Gt.indexOf("contextMenu")!==-1&&(an=["click"]),Ee.createElement(xe.Z,(0,be.Z)({builtinPlacements:ye},ge,{prefixCls:Ge,ref:$e,popupClassName:Te()(Ye,(0,We.Z)({},"".concat(Ge,"-show-arrow"),ot)),popupStyle:Je,action:Gt,showAction:Vt,hideAction:an,popupPlacement:ct,popupAlign:yt,popupTransitionName:Dt,popupAnimation:rt,popupVisible:le,stretch:ln()?"minWidth":"",popup:en(),onPopupVisibleChange:Pt,onPopupClick:Ut,getPopupContainer:ht}),xt)}var Se=Ee.forwardRef(He),Ke=Se},93681:function(wn,qt,ce){"use strict";ce.r(qt),ce.d(qt,{BaseInput:function(){return Oe},default:function(){return Lt}});var be=ce(54476),We=ce(33885),Fe=ce(20068),ft=ce(76190),xe=ce(92310),ke=ce.n(xe),Te=ce(59301),we=ce(5643),Ee=function(Xe){var He,Se,Ke=Xe.inputElement,Ze=Xe.prefixCls,gt=Xe.prefix,je=Xe.suffix,St=Xe.addonBefore,ot=Xe.addonAfter,Et=Xe.className,Ge=Xe.style,Dt=Xe.disabled,rt=Xe.readOnly,yt=Xe.focused,Ct=Xe.triggerFocus,ct=Xe.allowClear,Pe=Xe.value,ye=Xe.handleReset,ht=Xe.hidden,Vt=Xe.classes,Ht=Xe.classNames,Ye=Xe.dataAttrs,Je=Xe.styles,At=Xe.components,mn=(At==null?void 0:At.affixWrapper)||"span",Gt=(At==null?void 0:At.groupWrapper)||"span",hn=(At==null?void 0:At.wrapper)||"span",jt=(At==null?void 0:At.groupAddon)||"span",Ft=(0,Te.useRef)(null),Kt=function(Xt){var en;(en=Ft.current)!==null&&en!==void 0&&en.contains(Xt.target)&&(Ct==null||Ct())},ge=function(){var Xt;if(!ct)return null;var en=!Dt&&!rt&&Pe,ln="".concat(Ze,"-clear-icon"),Sn=(0,ft.Z)(ct)==="object"&&ct!==null&&ct!==void 0&&ct.clearIcon?ct.clearIcon:"\u2716";return Te.createElement("span",{onClick:ye,onMouseDown:function(an){return an.preventDefault()},className:ke()(ln,(Xt={},(0,Fe.Z)(Xt,"".concat(ln,"-hidden"),!en),(0,Fe.Z)(Xt,"".concat(ln,"-has-suffix"),!!je),Xt)),role:"button",tabIndex:-1},Sn)},se=(0,Te.cloneElement)(Ke,{value:Pe,hidden:ht,className:ke()((He=Ke.props)===null||He===void 0?void 0:He.className,!(0,we.X3)(Xe)&&!(0,we.He)(Xe)&&Et)||null,style:(0,We.Z)((0,We.Z)({},(Se=Ke.props)===null||Se===void 0?void 0:Se.style),!(0,we.X3)(Xe)&&!(0,we.He)(Xe)?Ge:{})});if((0,we.X3)(Xe)){var oe,de="".concat(Ze,"-affix-wrapper"),fe=ke()(de,(oe={},(0,Fe.Z)(oe,"".concat(de,"-disabled"),Dt),(0,Fe.Z)(oe,"".concat(de,"-focused"),yt),(0,Fe.Z)(oe,"".concat(de,"-readonly"),rt),(0,Fe.Z)(oe,"".concat(de,"-input-with-clear-btn"),je&&ct&&Pe),oe),!(0,we.He)(Xe)&&Et,Vt==null?void 0:Vt.affixWrapper,Ht==null?void 0:Ht.affixWrapper),le=(je||ct)&&Te.createElement("span",{className:ke()("".concat(Ze,"-suffix"),Ht==null?void 0:Ht.suffix),style:Je==null?void 0:Je.suffix},ge(),je);se=Te.createElement(mn,(0,be.Z)({className:fe,style:(0,We.Z)((0,We.Z)({},(0,we.He)(Xe)?void 0:Ge),Je==null?void 0:Je.affixWrapper),hidden:!(0,we.He)(Xe)&&ht,onClick:Kt},Ye==null?void 0:Ye.affixWrapper,{ref:Ft}),gt&&Te.createElement("span",{className:ke()("".concat(Ze,"-prefix"),Ht==null?void 0:Ht.prefix),style:Je==null?void 0:Je.prefix},gt),(0,Te.cloneElement)(Ke,{value:Pe,hidden:null}),le)}if((0,we.He)(Xe)){var $e="".concat(Ze,"-group"),dt="".concat($e,"-addon"),Rt=ke()("".concat(Ze,"-wrapper"),$e,Vt==null?void 0:Vt.wrapper),Pt=ke()("".concat(Ze,"-group-wrapper"),Et,Vt==null?void 0:Vt.group);return Te.createElement(Gt,{className:Pt,style:Ge,hidden:ht},Te.createElement(hn,{className:Rt},St&&Te.createElement(jt,{className:dt},St),(0,Te.cloneElement)(se,{hidden:null}),ot&&Te.createElement(jt,{className:dt},ot)))}return se},Oe=Ee,it=ce(94480),Le=ce(42978),ze=ce(75931),st=ce(18929),Qe=ce(2738),at=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],tt=(0,Te.forwardRef)(function(Ue,Xe){var He=Ue.autoComplete,Se=Ue.onChange,Ke=Ue.onFocus,Ze=Ue.onBlur,gt=Ue.onPressEnter,je=Ue.onKeyDown,St=Ue.prefixCls,ot=St===void 0?"rc-input":St,Et=Ue.disabled,Ge=Ue.htmlSize,Dt=Ue.className,rt=Ue.maxLength,yt=Ue.suffix,Ct=Ue.showCount,ct=Ue.type,Pe=ct===void 0?"text":ct,ye=Ue.classes,ht=Ue.classNames,Vt=Ue.styles,Ht=(0,ze.Z)(Ue,at),Ye=(0,st.Z)(Ue.defaultValue,{value:Ue.value}),Je=(0,Le.Z)(Ye,2),At=Je[0],mn=Je[1],Gt=(0,Te.useState)(!1),hn=(0,Le.Z)(Gt,2),jt=hn[0],Ft=hn[1],Kt=(0,Te.useRef)(null),ge=function(Pt){Kt.current&&(0,we.nH)(Kt.current,Pt)};(0,Te.useImperativeHandle)(Xe,function(){return{focus:ge,blur:function(){var Pt;(Pt=Kt.current)===null||Pt===void 0||Pt.blur()},setSelectionRange:function(Pt,Ut,Xt){var en;(en=Kt.current)===null||en===void 0||en.setSelectionRange(Pt,Ut,Xt)},select:function(){var Pt;(Pt=Kt.current)===null||Pt===void 0||Pt.select()},input:Kt.current}}),(0,Te.useEffect)(function(){Ft(function(Rt){return Rt&&Et?!1:Rt})},[Et]);var se=function(Pt){Ue.value===void 0&&mn(Pt.target.value),Kt.current&&(0,we.rJ)(Kt.current,Pt,Se)},oe=function(Pt){gt&&Pt.key==="Enter"&>(Pt),je==null||je(Pt)},de=function(Pt){Ft(!0),Ke==null||Ke(Pt)},fe=function(Pt){Ft(!1),Ze==null||Ze(Pt)},le=function(Pt){mn(""),ge(),Kt.current&&(0,we.rJ)(Kt.current,Pt,Se)},$e=function(){var Pt=(0,Qe.Z)(Ue,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return Te.createElement("input",(0,be.Z)({autoComplete:He},Pt,{onChange:se,onFocus:de,onBlur:fe,onKeyDown:oe,className:ke()(ot,(0,Fe.Z)({},"".concat(ot,"-disabled"),Et),ht==null?void 0:ht.input),style:Vt==null?void 0:Vt.input,ref:Kt,size:Ge,type:Pe}))},dt=function(){var Pt=Number(rt)>0;if(yt||Ct){var Ut=(0,we.D7)(At),Xt=(0,it.Z)(Ut).length,en=(0,ft.Z)(Ct)==="object"?Ct.formatter({value:Ut,count:Xt,maxLength:rt}):"".concat(Xt).concat(Pt?" / ".concat(rt):"");return Te.createElement(Te.Fragment,null,!!Ct&&Te.createElement("span",{className:ke()("".concat(ot,"-show-count-suffix"),(0,Fe.Z)({},"".concat(ot,"-show-count-has-suffix"),!!yt),ht==null?void 0:ht.count),style:(0,We.Z)({},Vt==null?void 0:Vt.count)},en),yt)}return null};return Te.createElement(Oe,(0,be.Z)({},Ht,{prefixCls:ot,className:Dt,inputElement:$e(),handleReset:le,value:(0,we.D7)(At),focused:jt,triggerFocus:ge,suffix:dt(),disabled:Et,classes:ye,classNames:ht,styles:Vt}))}),pt=tt,Lt=pt},5643:function(wn,qt,ce){"use strict";ce.d(qt,{D7:function(){return xe},He:function(){return be},X3:function(){return We},nH:function(){return ft},rJ:function(){return Fe}});function be(ke){return!!(ke.addonBefore||ke.addonAfter)}function We(ke){return!!(ke.prefix||ke.suffix||ke.allowClear)}function Fe(ke,Te,we,Ee){if(we){var Oe=Te;if(Te.type==="click"){var it=ke.cloneNode(!0);Oe=Object.create(Te,{target:{value:it},currentTarget:{value:it}}),it.value="",we(Oe);return}if(Ee!==void 0){Oe=Object.create(Te,{target:{value:ke},currentTarget:{value:ke}}),ke.value=Ee,we(Oe);return}we(Oe)}}function ft(ke,Te){if(ke){ke.focus(Te);var we=Te||{},Ee=we.cursor;if(Ee){var Oe=ke.value.length;switch(Ee){case"start":ke.setSelectionRange(0,0);break;case"end":ke.setSelectionRange(Oe,Oe);break;default:ke.setSelectionRange(0,Oe)}}}}function xe(ke){return typeof ke=="undefined"||ke===null?"":String(ke)}},15285:function(wn,qt,ce){"use strict";ce.d(qt,{iz:function(){return on},ck:function(){return ei},BW:function(){return cn},sN:function(){return ei},Wd:function(){return lt},ZP:function(){return Zn},Xl:function(){return je}});var be=ce(54476),We=ce(20068),Fe=ce(33885),ft=ce(94480),xe=ce(42978),ke=ce(75931),Te=ce(92310),we=ce.n(Te),Ee=ce(83836),Oe=ce(18929),it=ce(13697),Le=ce(48736),ze=ce(59301),st=ce(4676),Qe=ze.createContext(null);function at(et,Tt){return et===void 0?null:"".concat(et,"-").concat(Tt)}function tt(et){var Tt=ze.useContext(Qe);return at(Tt,et)}var pt=ce(80547),Lt=["children","locked"],Ue=ze.createContext(null);function Xe(et,Tt){var $t=(0,Fe.Z)({},et);return Object.keys(Tt).forEach(function(Jt){var Ot=Tt[Jt];Ot!==void 0&&($t[Jt]=Ot)}),$t}function He(et){var Tt=et.children,$t=et.locked,Jt=(0,ke.Z)(et,Lt),Ot=ze.useContext(Ue),Zt=(0,pt.Z)(function(){return Xe(Ot,Jt)},[Ot,Jt],function(Wt,nn){return!$t&&(Wt[0]!==nn[0]||!(0,it.Z)(Wt[1],nn[1],!0))});return ze.createElement(Ue.Provider,{value:Zt},Tt)}var Se=[],Ke=ze.createContext(null);function Ze(){return ze.useContext(Ke)}var gt=ze.createContext(Se);function je(et){var Tt=ze.useContext(gt);return ze.useMemo(function(){return et!==void 0?[].concat((0,ft.Z)(Tt),[et]):Tt},[Tt,et])}var St=ze.createContext(null),ot=ze.createContext({}),Et=ot,Ge=ce(29194);function Dt(et){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,Ge.Z)(et)){var $t=et.nodeName.toLowerCase(),Jt=["input","select","textarea","button"].includes($t)||et.isContentEditable||$t==="a"&&!!et.getAttribute("href"),Ot=et.getAttribute("tabindex"),Zt=Number(Ot),Wt=null;return Ot&&!Number.isNaN(Zt)?Wt=Zt:Jt&&Wt===null&&(Wt=0),Jt&&et.disabled&&(Wt=null),Wt!==null&&(Wt>=0||Tt&&Wt<0)}return!1}function rt(et){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$t=(0,ft.Z)(et.querySelectorAll("*")).filter(function(Jt){return Dt(Jt,Tt)});return Dt(et,Tt)&&$t.unshift(et),$t}var yt=null;function Ct(){yt=document.activeElement}function ct(){yt=null}function Pe(){if(yt)try{yt.focus()}catch(et){}}function ye(et,Tt){if(Tt.keyCode===9){var $t=rt(et),Jt=$t[Tt.shiftKey?0:$t.length-1],Ot=Jt===document.activeElement||et===document.activeElement;if(Ot){var Zt=$t[Tt.shiftKey?$t.length-1:0];Zt.focus(),Tt.preventDefault()}}}var ht=ce(10228),Vt=ce(16089),Ht=ht.Z.LEFT,Ye=ht.Z.RIGHT,Je=ht.Z.UP,At=ht.Z.DOWN,mn=ht.Z.ENTER,Gt=ht.Z.ESC,hn=ht.Z.HOME,jt=ht.Z.END,Ft=[Je,At,Ht,Ye];function Kt(et,Tt,$t,Jt){var Ot,Zt,Wt,nn,bn="prev",Ln="next",Hn="children",jn="parent";if(et==="inline"&&Jt===mn)return{inlineTrigger:!0};var rr=(Ot={},(0,We.Z)(Ot,Je,bn),(0,We.Z)(Ot,At,Ln),Ot),cr=(Zt={},(0,We.Z)(Zt,Ht,$t?Ln:bn),(0,We.Z)(Zt,Ye,$t?bn:Ln),(0,We.Z)(Zt,At,Hn),(0,We.Z)(Zt,mn,Hn),Zt),er=(Wt={},(0,We.Z)(Wt,Je,bn),(0,We.Z)(Wt,At,Ln),(0,We.Z)(Wt,mn,Hn),(0,We.Z)(Wt,Gt,jn),(0,We.Z)(Wt,Ht,$t?Hn:jn),(0,We.Z)(Wt,Ye,$t?jn:Hn),Wt),vr={inline:rr,horizontal:cr,vertical:er,inlineSub:rr,horizontalSub:er,verticalSub:er},fr=(nn=vr["".concat(et).concat(Tt?"":"Sub")])===null||nn===void 0?void 0:nn[Jt];switch(fr){case bn:return{offset:-1,sibling:!0};case Ln:return{offset:1,sibling:!0};case jn:return{offset:-1,sibling:!1};case Hn:return{offset:1,sibling:!1};default:return null}}function ge(et){for(var Tt=et;Tt;){if(Tt.getAttribute("data-menu-list"))return Tt;Tt=Tt.parentElement}return null}function se(et,Tt){for(var $t=et||document.activeElement;$t;){if(Tt.has($t))return $t;$t=$t.parentElement}return null}function oe(et,Tt){var $t=rt(et,!0);return $t.filter(function(Jt){return Tt.has(Jt)})}function de(et,Tt,$t){var Jt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!et)return null;var Ot=oe(et,Tt),Zt=Ot.length,Wt=Ot.findIndex(function(nn){return $t===nn});return Jt<0?Wt===-1?Wt=Zt-1:Wt-=1:Jt>0&&(Wt+=1),Wt=(Wt+Zt)%Zt,Ot[Wt]}var fe=function(Tt,$t){var Jt=new Set,Ot=new Map,Zt=new Map;return Tt.forEach(function(Wt){var nn=document.querySelector("[data-menu-id='".concat(at($t,Wt),"']"));nn&&(Jt.add(nn),Zt.set(nn,Wt),Ot.set(Wt,nn))}),{elements:Jt,key2element:Ot,element2key:Zt}};function le(et,Tt,$t,Jt,Ot,Zt,Wt,nn,bn,Ln){var Hn=ze.useRef(),jn=ze.useRef();jn.current=Tt;var rr=function(){Vt.Z.cancel(Hn.current)};return ze.useEffect(function(){return function(){rr()}},[]),function(cr){var er=cr.which;if([].concat(Ft,[mn,Gt,hn,jt]).includes(er)){var vr=Zt(),fr=fe(vr,Jt),pr=fr,Gn=pr.elements,sr=pr.key2element,Xn=pr.element2key,Rn=sr.get(Tt),gr=se(Rn,Gn),kr=Xn.get(gr),tr=Kt(et,Wt(kr,!0).length===1,$t,er);if(!tr&&er!==hn&&er!==jt)return;(Ft.includes(er)||[hn,jt].includes(er))&&cr.preventDefault();var kn=function(Or){if(Or){var ni=Or,ir=Or.querySelector("a");ir!=null&&ir.getAttribute("href")&&(ni=ir);var lr=Xn.get(Or);nn(lr),rr(),Hn.current=(0,Vt.Z)(function(){jn.current===lr&&ni.focus()})}};if([hn,jt].includes(er)||tr.sibling||!gr){var En;!gr||et==="inline"?En=Ot.current:En=ge(gr);var dr,qn=oe(En,Gn);er===hn?dr=qn[0]:er===jt?dr=qn[qn.length-1]:dr=de(En,Gn,gr,tr.offset),kn(dr)}else if(tr.inlineTrigger)bn(kr);else if(tr.offset>0)bn(kr,!0),rr(),Hn.current=(0,Vt.Z)(function(){fr=fe(vr,Jt);var Zr=gr.getAttribute("aria-controls"),Or=document.getElementById(Zr),ni=de(Or,fr.elements);kn(ni)},5);else if(tr.offset<0){var wr=Wt(kr,!0),Lr=wr[wr.length-2],Cr=sr.get(Lr);bn(Lr,!1),kn(Cr)}}Ln==null||Ln(cr)}}function $e(et){Promise.resolve().then(et)}var dt="__RC_UTIL_PATH_SPLIT__",Rt=function(Tt){return Tt.join(dt)},Pt=function(Tt){return Tt.split(dt)},Ut="rc-menu-more";function Xt(){var et=ze.useState({}),Tt=(0,xe.Z)(et,2),$t=Tt[1],Jt=(0,ze.useRef)(new Map),Ot=(0,ze.useRef)(new Map),Zt=ze.useState([]),Wt=(0,xe.Z)(Zt,2),nn=Wt[0],bn=Wt[1],Ln=(0,ze.useRef)(0),Hn=(0,ze.useRef)(!1),jn=function(){Hn.current||$t({})},rr=(0,ze.useCallback)(function(sr,Xn){var Rn=Rt(Xn);Ot.current.set(Rn,sr),Jt.current.set(sr,Rn),Ln.current+=1;var gr=Ln.current;$e(function(){gr===Ln.current&&jn()})},[]),cr=(0,ze.useCallback)(function(sr,Xn){var Rn=Rt(Xn);Ot.current.delete(Rn),Jt.current.delete(sr)},[]),er=(0,ze.useCallback)(function(sr){bn(sr)},[]),vr=(0,ze.useCallback)(function(sr,Xn){var Rn=Jt.current.get(sr)||"",gr=Pt(Rn);return Xn&&nn.includes(gr[0])&&gr.unshift(Ut),gr},[nn]),fr=(0,ze.useCallback)(function(sr,Xn){return sr.some(function(Rn){var gr=vr(Rn,!0);return gr.includes(Xn)})},[vr]),pr=function(){var Xn=(0,ft.Z)(Jt.current.keys());return nn.length&&Xn.push(Ut),Xn},Gn=(0,ze.useCallback)(function(sr){var Xn="".concat(Jt.current.get(sr)).concat(dt),Rn=new Set;return(0,ft.Z)(Ot.current.keys()).forEach(function(gr){gr.startsWith(Xn)&&Rn.add(Ot.current.get(gr))}),Rn},[]);return ze.useEffect(function(){return function(){Hn.current=!0}},[]),{registerPath:rr,unregisterPath:cr,refreshOverflowKeys:er,isSubPathKey:fr,getKeyPath:vr,getKeys:pr,getSubPathKeys:Gn}}function en(et){var Tt=ze.useRef(et);Tt.current=et;var $t=ze.useCallback(function(){for(var Jt,Ot=arguments.length,Zt=new Array(Ot),Wt=0;Wt<Ot;Wt++)Zt[Wt]=arguments[Wt];return(Jt=Tt.current)===null||Jt===void 0?void 0:Jt.call.apply(Jt,[Tt].concat(Zt))},[]);return et?$t:void 0}var ln=Math.random().toFixed(5).toString().slice(2),Sn=0;function xt(et){var Tt=(0,Oe.Z)(et,{value:et}),$t=(0,xe.Z)(Tt,2),Jt=$t[0],Ot=$t[1];return ze.useEffect(function(){Sn+=1;var Zt="".concat(ln,"-").concat(Sn);Ot("rc-menu-uuid-".concat(Zt))},[]),Jt}var an=ce(67732),On=ce(83652),ut=ce(42403),wt=ce(158),Nt=ce(2738),Pn=ce(8654);function Bn(et,Tt,$t,Jt){var Ot=ze.useContext(Ue),Zt=Ot.activeKey,Wt=Ot.onActive,nn=Ot.onInactive,bn={active:Zt===et};return Tt||(bn.onMouseEnter=function(Ln){$t==null||$t({key:et,domEvent:Ln}),Wt(et)},bn.onMouseLeave=function(Ln){Jt==null||Jt({key:et,domEvent:Ln}),nn(et)}),bn}function Tn(et){var Tt=ze.useContext(Ue),$t=Tt.mode,Jt=Tt.rtl,Ot=Tt.inlineIndent;if($t!=="inline")return null;var Zt=et;return Jt?{paddingRight:Zt*Ot}:{paddingLeft:Zt*Ot}}function nr(et){var Tt=et.icon,$t=et.props,Jt=et.children,Ot;return Tt===null||Tt===!1?null:(typeof Tt=="function"?Ot=ze.createElement(Tt,(0,Fe.Z)({},$t)):typeof Tt!="boolean"&&(Ot=Tt),Ot||Jt||null)}var mr=["item"];function ar(et){var Tt=et.item,$t=(0,ke.Z)(et,mr);return Object.defineProperty($t,"item",{get:function(){return(0,Le.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Tt}}),$t}var Er=["title","attribute","elementRef"],_r=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Jn=["active"],zr=function(et){(0,ut.Z)($t,et);var Tt=(0,wt.Z)($t);function $t(){return(0,an.Z)(this,$t),Tt.apply(this,arguments)}return(0,On.Z)($t,[{key:"render",value:function(){var Ot=this.props,Zt=Ot.title,Wt=Ot.attribute,nn=Ot.elementRef,bn=(0,ke.Z)(Ot,Er),Ln=(0,Nt.Z)(bn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,Le.ZP)(!Wt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),ze.createElement(Ee.Z.Item,(0,be.Z)({},Wt,{title:typeof Zt=="string"?Zt:void 0},Ln,{ref:nn}))}}]),$t}(ze.Component),Wr=ze.forwardRef(function(et,Tt){var $t,Jt=et.style,Ot=et.className,Zt=et.eventKey,Wt=et.warnKey,nn=et.disabled,bn=et.itemIcon,Ln=et.children,Hn=et.role,jn=et.onMouseEnter,rr=et.onMouseLeave,cr=et.onClick,er=et.onKeyDown,vr=et.onFocus,fr=(0,ke.Z)(et,_r),pr=tt(Zt),Gn=ze.useContext(Ue),sr=Gn.prefixCls,Xn=Gn.onItemClick,Rn=Gn.disabled,gr=Gn.overflowDisabled,kr=Gn.itemIcon,tr=Gn.selectedKeys,kn=Gn.onActive,En=ze.useContext(Et),dr=En._internalRenderMenuItem,qn="".concat(sr,"-item"),wr=ze.useRef(),Lr=ze.useRef(),Cr=Rn||nn,Zr=(0,Pn.x1)(Tt,Lr),Or=je(Zt),ni=function(Nn){return{key:Zt,keyPath:(0,ft.Z)(Or).reverse(),item:wr.current,domEvent:Nn}},ir=bn||kr,lr=Bn(Zt,Cr,jn,rr),Dr=lr.active,Ar=(0,ke.Z)(lr,Jn),ui=tr.includes(Zt),Hi=Tn(Or.length),_i=function(Nn){if(!Cr){var Kn=ni(Nn);cr==null||cr(ar(Kn)),Xn(Kn)}},Qr=function(Nn){if(er==null||er(Nn),Nn.which===ht.Z.ENTER){var Kn=ni(Nn);cr==null||cr(ar(Kn)),Xn(Kn)}},bi=function(Nn){kn(Zt),vr==null||vr(Nn)},mi={};et.role==="option"&&(mi["aria-selected"]=ui);var Yn=ze.createElement(zr,(0,be.Z)({ref:wr,elementRef:Zr,role:Hn===null?"none":Hn||"menuitem",tabIndex:nn?null:-1,"data-menu-id":gr&&pr?null:pr},fr,Ar,mi,{component:"li","aria-disabled":nn,style:(0,Fe.Z)((0,Fe.Z)({},Hi),Jt),className:we()(qn,($t={},(0,We.Z)($t,"".concat(qn,"-active"),Dr),(0,We.Z)($t,"".concat(qn,"-selected"),ui),(0,We.Z)($t,"".concat(qn,"-disabled"),Cr),$t),Ot),onClick:_i,onKeyDown:Qr,onFocus:bi}),Ln,ze.createElement(nr,{props:(0,Fe.Z)((0,Fe.Z)({},et),{},{isSelected:ui}),icon:ir}));return dr&&(Yn=dr(Yn,et,{selected:ui})),Yn});function Vr(et,Tt){var $t=et.eventKey,Jt=Ze(),Ot=je($t);return ze.useEffect(function(){if(Jt)return Jt.registerPath($t,Ot),function(){Jt.unregisterPath($t,Ot)}},[Ot]),Jt?null:ze.createElement(Wr,(0,be.Z)({},et,{ref:Tt}))}var ei=ze.forwardRef(Vr),Tr=["className","children"],Yr=function(Tt,$t){var Jt=Tt.className,Ot=Tt.children,Zt=(0,ke.Z)(Tt,Tr),Wt=ze.useContext(Ue),nn=Wt.prefixCls,bn=Wt.mode,Ln=Wt.rtl;return ze.createElement("ul",(0,be.Z)({className:we()(nn,Ln&&"".concat(nn,"-rtl"),"".concat(nn,"-sub"),"".concat(nn,"-").concat(bn==="inline"?"inline":"vertical"),Jt),role:"menu"},Zt,{"data-menu-list":!0,ref:$t}),Ot)},xr=ze.forwardRef(Yr);xr.displayName="SubMenuList";var Ur=xr,qr=ce(11592);function It(et,Tt){return(0,qr.Z)(et).map(function($t,Jt){if(ze.isValidElement($t)){var Ot,Zt,Wt=$t.key,nn=(Ot=(Zt=$t.props)===null||Zt===void 0?void 0:Zt.eventKey)!==null&&Ot!==void 0?Ot:Wt,bn=nn==null;bn&&(nn="tmp_key-".concat([].concat((0,ft.Z)(Tt),[Jt]).join("-")));var Ln={key:nn,eventKey:nn};return ze.cloneElement($t,Ln)}return $t})}var _n=ce(35593),yn={adjustX:1,adjustY:1},pn={topLeft:{points:["bl","tl"],overflow:yn},topRight:{points:["br","tr"],overflow:yn},bottomLeft:{points:["tl","bl"],overflow:yn},bottomRight:{points:["tr","br"],overflow:yn},leftTop:{points:["tr","tl"],overflow:yn},leftBottom:{points:["br","bl"],overflow:yn},rightTop:{points:["tl","tr"],overflow:yn},rightBottom:{points:["bl","br"],overflow:yn}},xn={topLeft:{points:["bl","tl"],overflow:yn},topRight:{points:["br","tr"],overflow:yn},bottomLeft:{points:["tl","bl"],overflow:yn},bottomRight:{points:["tr","br"],overflow:yn},rightTop:{points:["tr","tl"],overflow:yn},rightBottom:{points:["br","bl"],overflow:yn},leftTop:{points:["tl","tr"],overflow:yn},leftBottom:{points:["bl","br"],overflow:yn}},sn=null;function dn(et,Tt,$t){if(Tt)return Tt;if($t)return $t[et]||$t.other}var $n={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function nt(et){var Tt=et.prefixCls,$t=et.visible,Jt=et.children,Ot=et.popup,Zt=et.popupStyle,Wt=et.popupClassName,nn=et.popupOffset,bn=et.disabled,Ln=et.mode,Hn=et.onVisibleChange,jn=ze.useContext(Ue),rr=jn.getPopupContainer,cr=jn.rtl,er=jn.subMenuOpenDelay,vr=jn.subMenuCloseDelay,fr=jn.builtinPlacements,pr=jn.triggerSubMenuAction,Gn=jn.forceSubMenuRender,sr=jn.rootClassName,Xn=jn.motion,Rn=jn.defaultMotions,gr=ze.useState(!1),kr=(0,xe.Z)(gr,2),tr=kr[0],kn=kr[1],En=cr?(0,Fe.Z)((0,Fe.Z)({},xn),fr):(0,Fe.Z)((0,Fe.Z)({},pn),fr),dr=$n[Ln],qn=dn(Ln,Xn,Rn),wr=ze.useRef(qn);Ln!=="inline"&&(wr.current=qn);var Lr=(0,Fe.Z)((0,Fe.Z)({},wr.current),{},{leavedClassName:"".concat(Tt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Cr=ze.useRef();return ze.useEffect(function(){return Cr.current=(0,Vt.Z)(function(){kn($t)}),function(){Vt.Z.cancel(Cr.current)}},[$t]),ze.createElement(_n.Z,{prefixCls:Tt,popupClassName:we()("".concat(Tt,"-popup"),(0,We.Z)({},"".concat(Tt,"-rtl"),cr),Wt,sr),stretch:Ln==="horizontal"?"minWidth":null,getPopupContainer:rr,builtinPlacements:En,popupPlacement:dr,popupVisible:tr,popup:Ot,popupStyle:Zt,popupAlign:nn&&{offset:nn},action:bn?[]:[pr],mouseEnterDelay:er,mouseLeaveDelay:vr,onPopupVisibleChange:Hn,forceRender:Gn,popupMotion:Lr,fresh:!0},Jt)}var _e=ce(77900);function Ie(et){var Tt=et.id,$t=et.open,Jt=et.keyPath,Ot=et.children,Zt="inline",Wt=ze.useContext(Ue),nn=Wt.prefixCls,bn=Wt.forceSubMenuRender,Ln=Wt.motion,Hn=Wt.defaultMotions,jn=Wt.mode,rr=ze.useRef(!1);rr.current=jn===Zt;var cr=ze.useState(!rr.current),er=(0,xe.Z)(cr,2),vr=er[0],fr=er[1],pr=rr.current?$t:!1;ze.useEffect(function(){rr.current&&fr(!1)},[jn]);var Gn=(0,Fe.Z)({},dn(Zt,Ln,Hn));Jt.length>1&&(Gn.motionAppear=!1);var sr=Gn.onVisibleChanged;return Gn.onVisibleChanged=function(Xn){return!rr.current&&!Xn&&fr(!0),sr==null?void 0:sr(Xn)},vr?null:ze.createElement(He,{mode:Zt,locked:!rr.current},ze.createElement(_e.default,(0,be.Z)({visible:pr},Gn,{forceRender:bn,removeOnLeave:!1,leavedClassName:"".concat(nn,"-hidden")}),function(Xn){var Rn=Xn.className,gr=Xn.style;return ze.createElement(Ur,{id:Tt,className:Rn,style:gr},Ot)}))}var Ae=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Be=["active"],Ve=function(Tt){var $t,Jt=Tt.style,Ot=Tt.className,Zt=Tt.title,Wt=Tt.eventKey,nn=Tt.warnKey,bn=Tt.disabled,Ln=Tt.internalPopupClose,Hn=Tt.children,jn=Tt.itemIcon,rr=Tt.expandIcon,cr=Tt.popupClassName,er=Tt.popupOffset,vr=Tt.popupStyle,fr=Tt.onClick,pr=Tt.onMouseEnter,Gn=Tt.onMouseLeave,sr=Tt.onTitleClick,Xn=Tt.onTitleMouseEnter,Rn=Tt.onTitleMouseLeave,gr=(0,ke.Z)(Tt,Ae),kr=tt(Wt),tr=ze.useContext(Ue),kn=tr.prefixCls,En=tr.mode,dr=tr.openKeys,qn=tr.disabled,wr=tr.overflowDisabled,Lr=tr.activeKey,Cr=tr.selectedKeys,Zr=tr.itemIcon,Or=tr.expandIcon,ni=tr.onItemClick,ir=tr.onOpenChange,lr=tr.onActive,Dr=ze.useContext(Et),Ar=Dr._internalRenderSubMenuItem,ui=ze.useContext(St),Hi=ui.isSubPathKey,_i=je(),Qr="".concat(kn,"-submenu"),bi=qn||bn,mi=ze.useRef(),Yn=ze.useRef(),Un=jn!=null?jn:Zr,Nn=rr!=null?rr:Or,Kn=dr.includes(Wt),Nr=!wr&&Kn,ri=Hi(Cr,Wt),ai=Bn(Wt,bi,Xn,Rn),ci=ai.active,ti=(0,ke.Z)(ai,Be),fi=ze.useState(!1),Li=(0,xe.Z)(fi,2),ki=Li[0],ta=Li[1],Yi=function(Ri){bi||ta(Ri)},Ii=function(Ri){Yi(!0),pr==null||pr({key:Wt,domEvent:Ri})},Ra=function(Ri){Yi(!1),Gn==null||Gn({key:Wt,domEvent:Ri})},na=ze.useMemo(function(){return ci||(En!=="inline"?ki||Hi([Lr],Wt):!1)},[En,ci,Lr,ki,Wt,Hi]),va=Tn(_i.length),ra=function(Ri){bi||(sr==null||sr({key:Wt,domEvent:Ri}),En==="inline"&&ir(Wt,!Kn))},Si=en(function(Fi){fr==null||fr(ar(Fi)),ni(Fi)}),$r=function(Ri){En!=="inline"&&ir(Wt,Ri)},Jr=function(){lr(Wt)},Hr=kr&&"".concat(kr,"-popup"),Ir=ze.createElement("div",(0,be.Z)({role:"menuitem",style:va,className:"".concat(Qr,"-title"),tabIndex:bi?null:-1,ref:mi,title:typeof Zt=="string"?Zt:null,"data-menu-id":wr&&kr?null:kr,"aria-expanded":Nr,"aria-haspopup":!0,"aria-controls":Hr,"aria-disabled":bi,onClick:ra,onFocus:Jr},ti),Zt,ze.createElement(nr,{icon:En!=="horizontal"?Nn:void 0,props:(0,Fe.Z)((0,Fe.Z)({},Tt),{},{isOpen:Nr,isSubMenu:!0})},ze.createElement("i",{className:"".concat(Qr,"-arrow")}))),si=ze.useRef(En);if(En!=="inline"&&_i.length>1?si.current="vertical":si.current=En,!wr){var ii=si.current;Ir=ze.createElement(nt,{mode:ii,prefixCls:Qr,visible:!Ln&&Nr&&En!=="inline",popupClassName:cr,popupOffset:er,popupStyle:vr,popup:ze.createElement(He,{mode:ii==="horizontal"?"vertical":ii},ze.createElement(Ur,{id:Hr,ref:Yn},Hn)),disabled:bi,onVisibleChange:$r},Ir)}var Oi=ze.createElement(Ee.Z.Item,(0,be.Z)({role:"none"},gr,{component:"li",style:Jt,className:we()(Qr,"".concat(Qr,"-").concat(En),Ot,($t={},(0,We.Z)($t,"".concat(Qr,"-open"),Nr),(0,We.Z)($t,"".concat(Qr,"-active"),na),(0,We.Z)($t,"".concat(Qr,"-selected"),ri),(0,We.Z)($t,"".concat(Qr,"-disabled"),bi),$t)),onMouseEnter:Ii,onMouseLeave:Ra}),Ir,!wr&&ze.createElement(Ie,{id:Hr,open:Nr,keyPath:_i},Hn));return Ar&&(Oi=Ar(Oi,Tt,{selected:ri,active:na,open:Nr,disabled:bi})),ze.createElement(He,{onItemClick:Si,mode:En==="horizontal"?"vertical":En,itemIcon:Un,expandIcon:Nn},Oi)};function lt(et){var Tt=et.eventKey,$t=et.children,Jt=je(Tt),Ot=It($t,Jt),Zt=Ze();ze.useEffect(function(){if(Zt)return Zt.registerPath(Tt,Jt),function(){Zt.unregisterPath(Tt,Jt)}},[Jt]);var Wt;return Zt?Wt=Ot:Wt=ze.createElement(Ve,et,Ot),ze.createElement(gt.Provider,{value:Jt},Wt)}var Bt=ce(76190),bt=["className","title","eventKey","children"],zt=["children"],tn=function(Tt){var $t=Tt.className,Jt=Tt.title,Ot=Tt.eventKey,Zt=Tt.children,Wt=(0,ke.Z)(Tt,bt),nn=ze.useContext(Ue),bn=nn.prefixCls,Ln="".concat(bn,"-item-group");return ze.createElement("li",(0,be.Z)({role:"presentation"},Wt,{onClick:function(jn){return jn.stopPropagation()},className:we()(Ln,$t)}),ze.createElement("div",{role:"presentation",className:"".concat(Ln,"-title"),title:typeof Jt=="string"?Jt:void 0},Jt),ze.createElement("ul",{role:"group",className:"".concat(Ln,"-list")},Zt))};function cn(et){var Tt=et.children,$t=(0,ke.Z)(et,zt),Jt=je($t.eventKey),Ot=It(Tt,Jt),Zt=Ze();return Zt?Ot:ze.createElement(tn,(0,Nt.Z)($t,["warnKey"]),Ot)}function on(et){var Tt=et.className,$t=et.style,Jt=ze.useContext(Ue),Ot=Jt.prefixCls,Zt=Ze();return Zt?null:ze.createElement("li",{role:"separator",className:we()("".concat(Ot,"-item-divider"),Tt),style:$t})}var _t=["label","children","key","type"];function Yt(et){return(et||[]).map(function(Tt,$t){if(Tt&&(0,Bt.Z)(Tt)==="object"){var Jt=Tt,Ot=Jt.label,Zt=Jt.children,Wt=Jt.key,nn=Jt.type,bn=(0,ke.Z)(Jt,_t),Ln=Wt!=null?Wt:"tmp-".concat($t);return Zt||nn==="group"?nn==="group"?ze.createElement(cn,(0,be.Z)({key:Ln},bn,{title:Ot}),Yt(Zt)):ze.createElement(lt,(0,be.Z)({key:Ln},bn,{title:Ot}),Yt(Zt)):nn==="divider"?ze.createElement(on,(0,be.Z)({key:Ln},bn)):ze.createElement(ei,(0,be.Z)({key:Ln},bn),Ot)}return null}).filter(function(Tt){return Tt})}function Dn(et,Tt,$t){var Jt=et;return Tt&&(Jt=Yt(Tt)),It(Jt,$t)}var Cn=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],gn=[],Mn=ze.forwardRef(function(et,Tt){var $t,Jt,Ot=et,Zt=Ot.prefixCls,Wt=Zt===void 0?"rc-menu":Zt,nn=Ot.rootClassName,bn=Ot.style,Ln=Ot.className,Hn=Ot.tabIndex,jn=Hn===void 0?0:Hn,rr=Ot.items,cr=Ot.children,er=Ot.direction,vr=Ot.id,fr=Ot.mode,pr=fr===void 0?"vertical":fr,Gn=Ot.inlineCollapsed,sr=Ot.disabled,Xn=Ot.disabledOverflow,Rn=Ot.subMenuOpenDelay,gr=Rn===void 0?.1:Rn,kr=Ot.subMenuCloseDelay,tr=kr===void 0?.1:kr,kn=Ot.forceSubMenuRender,En=Ot.defaultOpenKeys,dr=Ot.openKeys,qn=Ot.activeKey,wr=Ot.defaultActiveFirst,Lr=Ot.selectable,Cr=Lr===void 0?!0:Lr,Zr=Ot.multiple,Or=Zr===void 0?!1:Zr,ni=Ot.defaultSelectedKeys,ir=Ot.selectedKeys,lr=Ot.onSelect,Dr=Ot.onDeselect,Ar=Ot.inlineIndent,ui=Ar===void 0?24:Ar,Hi=Ot.motion,_i=Ot.defaultMotions,Qr=Ot.triggerSubMenuAction,bi=Qr===void 0?"hover":Qr,mi=Ot.builtinPlacements,Yn=Ot.itemIcon,Un=Ot.expandIcon,Nn=Ot.overflowedIndicator,Kn=Nn===void 0?"...":Nn,Nr=Ot.overflowedIndicatorPopupClassName,ri=Ot.getPopupContainer,ai=Ot.onClick,ci=Ot.onOpenChange,ti=Ot.onKeyDown,fi=Ot.openAnimation,Li=Ot.openTransitionName,ki=Ot._internalRenderMenuItem,ta=Ot._internalRenderSubMenuItem,Yi=(0,ke.Z)(Ot,Cn),Ii=ze.useMemo(function(){return Dn(cr,rr,gn)},[cr,rr]),Ra=ze.useState(!1),na=(0,xe.Z)(Ra,2),va=na[0],ra=na[1],Si=ze.useRef(),$r=xt(vr),Jr=er==="rtl",Hr=(0,Oe.Z)(En,{value:dr,postState:function(Di){return Di||gn}}),Ir=(0,xe.Z)(Hr,2),si=Ir[0],ii=Ir[1],Oi=function(Di){var Ni=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ya(){ii(Di),ci==null||ci(Di)}Ni?(0,st.flushSync)(Ya):Ya()},Fi=ze.useState(si),Ri=(0,xe.Z)(Fi,2),qi=Ri[0],pi=Ri[1],hi=ze.useRef(!1),Wi=ze.useMemo(function(){return(pr==="inline"||pr==="vertical")&&Gn?["vertical",Gn]:[pr,!1]},[pr,Gn]),sa=(0,xe.Z)(Wi,2),aa=sa[0],Ji=sa[1],ts=aa==="inline",ao=ze.useState(aa),oo=(0,xe.Z)(ao,2),eo=oo[0],Ss=oo[1],fo=ze.useState(Ji),_a=(0,xe.Z)(fo,2),da=_a[0],yo=_a[1];ze.useEffect(function(){Ss(aa),yo(Ji),hi.current&&(ts?ii(qi):Oi(gn))},[aa,Ji]);var _o=ze.useState(0),ko=(0,xe.Z)(_o,2),ns=ko[0],$o=ko[1],Xa=ns>=Ii.length-1||eo!=="horizontal"||Xn;ze.useEffect(function(){ts&&pi(si)},[si]),ze.useEffect(function(){return hi.current=!0,function(){hi.current=!1}},[]);var Pa=Xt(),Ai=Pa.registerPath,Do=Pa.unregisterPath,rs=Pa.refreshOverflowKeys,Lo=Pa.isSubPathKey,yi=Pa.getKeyPath,di=Pa.getKeys,$i=Pa.getSubPathKeys,ka=ze.useMemo(function(){return{registerPath:Ai,unregisterPath:Do}},[Ai,Do]),Zi=ze.useMemo(function(){return{isSubPathKey:Lo}},[Lo]);ze.useEffect(function(){rs(Xa?gn:Ii.slice(ns+1).map(function(Ei){return Ei.key}))},[ns,Xa]);var Oa=(0,Oe.Z)(qn||wr&&(($t=Ii[0])===null||$t===void 0?void 0:$t.key),{value:qn}),Na=(0,xe.Z)(Oa,2),to=Na[0],$a=Na[1],so=en(function(Ei){$a(Ei)}),lo=en(function(){$a(void 0)});(0,ze.useImperativeHandle)(Tt,function(){return{list:Si.current,focus:function(Di){var Ni,Ya=di(),La=fe(Ya,$r),xo=La.elements,po=La.key2element,za=La.element2key,Ao=oe(Si.current,xo),Bo=to!=null?to:Ao[0]?za.get(Ao[0]):(Ni=Ii.find(function(Wl){return!Wl.props.disabled}))===null||Ni===void 0?void 0:Ni.key,wo=po.get(Bo);if(Bo&&wo){var os;wo==null||(os=wo.focus)===null||os===void 0||os.call(wo,Di)}}}});var Da=(0,Oe.Z)(ni||[],{value:ir,postState:function(Di){return Array.isArray(Di)?Di:Di==null?gn:[Di]}}),yl=(0,xe.Z)(Da,2),jo=yl[0],Js=yl[1],Kl=function(Di){if(Cr){var Ni=Di.key,Ya=jo.includes(Ni),La;Or?Ya?La=jo.filter(function(po){return po!==Ni}):La=[].concat((0,ft.Z)(jo),[Ni]):La=[Ni],Js(La);var xo=(0,Fe.Z)((0,Fe.Z)({},Di),{},{selectedKeys:La});Ya?Dr==null||Dr(xo):lr==null||lr(xo)}!Or&&si.length&&eo!=="inline"&&Oi(gn)},Hl=en(function(Ei){ai==null||ai(ar(Ei)),Kl(Ei)}),Cs=en(function(Ei,Di){var Ni=si.filter(function(La){return La!==Ei});if(Di)Ni.push(Ei);else if(eo!=="inline"){var Ya=$i(Ei);Ni=Ni.filter(function(La){return!Ya.has(La)})}(0,it.Z)(si,Ni,!0)||Oi(Ni,!0)}),Mu=function(Di,Ni){var Ya=Ni!=null?Ni:!si.includes(Di);Cs(Di,Ya)},is=le(eo,to,Jr,$r,Si,di,yi,$a,Mu,ti);ze.useEffect(function(){ra(!0)},[]);var xl=ze.useMemo(function(){return{_internalRenderMenuItem:ki,_internalRenderSubMenuItem:ta}},[ki,ta]),Vo=eo!=="horizontal"||Xn?Ii:Ii.map(function(Ei,Di){return ze.createElement(He,{key:Ei.key,overflowDisabled:Di>ns},Ei)}),as=ze.createElement(Ee.Z,(0,be.Z)({id:vr,ref:Si,prefixCls:"".concat(Wt,"-overflow"),component:"ul",itemComponent:ei,className:we()(Wt,"".concat(Wt,"-root"),"".concat(Wt,"-").concat(eo),Ln,(Jt={},(0,We.Z)(Jt,"".concat(Wt,"-inline-collapsed"),da),(0,We.Z)(Jt,"".concat(Wt,"-rtl"),Jr),Jt),nn),dir:er,style:bn,role:"menu",tabIndex:jn,data:Vo,renderRawItem:function(Di){return Di},renderRawRest:function(Di){var Ni=Di.length,Ya=Ni?Ii.slice(-Ni):null;return ze.createElement(lt,{eventKey:Ut,title:Kn,disabled:Xa,internalPopupClose:Ni===0,popupClassName:Nr},Ya)},maxCount:eo!=="horizontal"||Xn?Ee.Z.INVALIDATE:Ee.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Di){$o(Di)},onKeyDown:is},Yi));return ze.createElement(Et.Provider,{value:xl},ze.createElement(Qe.Provider,{value:$r},ze.createElement(He,{prefixCls:Wt,rootClassName:nn,mode:eo,openKeys:si,rtl:Jr,disabled:sr,motion:va?Hi:null,defaultMotions:va?_i:null,activeKey:to,onActive:so,onInactive:lo,selectedKeys:jo,inlineIndent:ui,subMenuOpenDelay:gr,subMenuCloseDelay:tr,forceSubMenuRender:kn,builtinPlacements:mi,triggerSubMenuAction:bi,getPopupContainer:ri,itemIcon:Yn,expandIcon:Un,onItemClick:Hl,onOpenChange:Cs},ze.createElement(St.Provider,{value:Zi},as),ze.createElement("div",{style:{display:"none"},"aria-hidden":!0},ze.createElement(Ke.Provider,{value:ka},Ii)))))}),Fn=Mn,un=Fn;un.Item=ei,un.SubMenu=lt,un.ItemGroup=cn,un.Divider=on;var Zn=un},83836:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Ct}});var be=ce(54476),We=ce(33885),Fe=ce(42978),ft=ce(75931),xe=ce(59301),ke=ce(92310),Te=ce.n(ke),we=ce(29301),Ee=ce(34280),Oe=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],it=void 0;function Le(ct,Pe){var ye=ct.prefixCls,ht=ct.invalidate,Vt=ct.item,Ht=ct.renderItem,Ye=ct.responsive,Je=ct.responsiveDisabled,At=ct.registerSize,mn=ct.itemKey,Gt=ct.className,hn=ct.style,jt=ct.children,Ft=ct.display,Kt=ct.order,ge=ct.component,se=ge===void 0?"div":ge,oe=(0,ft.Z)(ct,Oe),de=Ye&&!Ft;function fe(Pt){At(mn,Pt)}xe.useEffect(function(){return function(){fe(null)}},[]);var le=Ht&&Vt!==it?Ht(Vt,{index:Kt}):jt,$e;ht||($e={opacity:de?0:1,height:de?0:it,overflowY:de?"hidden":it,order:Ye?Kt:it,pointerEvents:de?"none":it,position:de?"absolute":it});var dt={};de&&(dt["aria-hidden"]=!0);var Rt=xe.createElement(se,(0,be.Z)({className:Te()(!ht&&ye,Gt),style:(0,We.Z)((0,We.Z)({},$e),hn)},dt,oe,{ref:Pe}),le);return Ye&&(Rt=xe.createElement(we.Z,{onResize:function(Ut){var Xt=Ut.offsetWidth;fe(Xt)},disabled:Je},Rt)),Rt}var ze=xe.forwardRef(Le);ze.displayName="Item";var st=ze,Qe=ce(6089),at=ce(4676),tt=ce(16089);function pt(ct){if(typeof MessageChannel=="undefined")(0,tt.Z)(ct);else{var Pe=new MessageChannel;Pe.port1.onmessage=function(){return ct()},Pe.port2.postMessage(void 0)}}function Lt(){var ct=xe.useRef(null),Pe=function(ht){ct.current||(ct.current=[],pt(function(){(0,at.unstable_batchedUpdates)(function(){ct.current.forEach(function(Vt){Vt()}),ct.current=null})})),ct.current.push(ht)};return Pe}function Ue(ct,Pe){var ye=xe.useState(Pe),ht=(0,Fe.Z)(ye,2),Vt=ht[0],Ht=ht[1],Ye=(0,Qe.Z)(function(Je){ct(function(){Ht(Je)})});return[Vt,Ye]}var Xe=xe.createContext(null),He=["component"],Se=["className"],Ke=["className"],Ze=function(Pe,ye){var ht=xe.useContext(Xe);if(!ht){var Vt=Pe.component,Ht=Vt===void 0?"div":Vt,Ye=(0,ft.Z)(Pe,He);return xe.createElement(Ht,(0,be.Z)({},Ye,{ref:ye}))}var Je=ht.className,At=(0,ft.Z)(ht,Se),mn=Pe.className,Gt=(0,ft.Z)(Pe,Ke);return xe.createElement(Xe.Provider,{value:null},xe.createElement(st,(0,be.Z)({ref:ye,className:Te()(Je,mn)},At,Gt)))},gt=xe.forwardRef(Ze);gt.displayName="RawItem";var je=gt,St=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],ot="responsive",Et="invalidate";function Ge(ct){return"+ ".concat(ct.length," ...")}function Dt(ct,Pe){var ye=ct.prefixCls,ht=ye===void 0?"rc-overflow":ye,Vt=ct.data,Ht=Vt===void 0?[]:Vt,Ye=ct.renderItem,Je=ct.renderRawItem,At=ct.itemKey,mn=ct.itemWidth,Gt=mn===void 0?10:mn,hn=ct.ssr,jt=ct.style,Ft=ct.className,Kt=ct.maxCount,ge=ct.renderRest,se=ct.renderRawRest,oe=ct.prefix,de=ct.suffix,fe=ct.component,le=fe===void 0?"div":fe,$e=ct.itemComponent,dt=ct.onVisibleChange,Rt=(0,ft.Z)(ct,St),Pt=hn==="full",Ut=Lt(),Xt=Ue(Ut,null),en=(0,Fe.Z)(Xt,2),ln=en[0],Sn=en[1],xt=ln||0,an=Ue(Ut,new Map),On=(0,Fe.Z)(an,2),ut=On[0],wt=On[1],Nt=Ue(Ut,0),Pn=(0,Fe.Z)(Nt,2),Bn=Pn[0],Tn=Pn[1],nr=Ue(Ut,0),mr=(0,Fe.Z)(nr,2),ar=mr[0],Er=mr[1],_r=Ue(Ut,0),Jn=(0,Fe.Z)(_r,2),zr=Jn[0],Wr=Jn[1],Vr=Ue(Ut,0),ei=(0,Fe.Z)(Vr,2),Tr=ei[0],Yr=ei[1],xr=(0,xe.useState)(null),Ur=(0,Fe.Z)(xr,2),qr=Ur[0],It=Ur[1],_n=(0,xe.useState)(null),yn=(0,Fe.Z)(_n,2),pn=yn[0],xn=yn[1],sn=xe.useMemo(function(){return pn===null&&Pt?Number.MAX_SAFE_INTEGER:pn||0},[pn,ln]),dn=(0,xe.useState)(!1),$n=(0,Fe.Z)(dn,2),nt=$n[0],_e=$n[1],Ie="".concat(ht,"-item"),Ae=Math.max(Bn,ar),Be=Kt===ot,Ve=Ht.length&&Be,lt=Kt===Et,Bt=Ve||typeof Kt=="number"&&Ht.length>Kt,bt=(0,xe.useMemo)(function(){var Zt=Ht;return Ve?ln===null&&Pt?Zt=Ht:Zt=Ht.slice(0,Math.min(Ht.length,xt/Gt)):typeof Kt=="number"&&(Zt=Ht.slice(0,Kt)),Zt},[Ht,Gt,ln,Kt,Ve]),zt=(0,xe.useMemo)(function(){return Ve?Ht.slice(sn+1):Ht.slice(bt.length)},[Ht,bt,Ve,sn]),tn=(0,xe.useCallback)(function(Zt,Wt){var nn;return typeof At=="function"?At(Zt):(nn=At&&(Zt==null?void 0:Zt[At]))!==null&&nn!==void 0?nn:Wt},[At]),cn=(0,xe.useCallback)(Ye||function(Zt){return Zt},[Ye]);function on(Zt,Wt,nn){pn===Zt&&(Wt===void 0||Wt===qr)||(xn(Zt),nn||(_e(Zt<Ht.length-1),dt==null||dt(Zt)),Wt!==void 0&&It(Wt))}function _t(Zt,Wt){Sn(Wt.clientWidth)}function Yt(Zt,Wt){wt(function(nn){var bn=new Map(nn);return Wt===null?bn.delete(Zt):bn.set(Zt,Wt),bn})}function Dn(Zt,Wt){Er(Wt),Tn(ar)}function Cn(Zt,Wt){Wr(Wt)}function gn(Zt,Wt){Yr(Wt)}function Mn(Zt){return ut.get(tn(bt[Zt],Zt))}(0,Ee.Z)(function(){if(xt&&typeof Ae=="number"&&bt){var Zt=zr+Tr,Wt=bt.length,nn=Wt-1;if(!Wt){on(0,null);return}for(var bn=0;bn<Wt;bn+=1){var Ln=Mn(bn);if(Pt&&(Ln=Ln||0),Ln===void 0){on(bn-1,void 0,!0);break}if(Zt+=Ln,nn===0&&Zt<=xt||bn===nn-1&&Zt+Mn(nn)<=xt){on(nn,null);break}else if(Zt+Ae>xt){on(bn-1,Zt-Ln-Tr+ar);break}}de&&Mn(0)+Tr>xt&&It(null)}},[xt,ut,ar,zr,Tr,tn,bt]);var Fn=nt&&!!zt.length,un={};qr!==null&&Ve&&(un={position:"absolute",left:qr,top:0});var Zn={prefixCls:Ie,responsive:Ve,component:$e,invalidate:lt},et=Je?function(Zt,Wt){var nn=tn(Zt,Wt);return xe.createElement(Xe.Provider,{key:nn,value:(0,We.Z)((0,We.Z)({},Zn),{},{order:Wt,item:Zt,itemKey:nn,registerSize:Yt,display:Wt<=sn})},Je(Zt,Wt))}:function(Zt,Wt){var nn=tn(Zt,Wt);return xe.createElement(st,(0,be.Z)({},Zn,{order:Wt,key:nn,item:Zt,renderItem:cn,itemKey:nn,registerSize:Yt,display:Wt<=sn}))},Tt={order:Fn?sn:Number.MAX_SAFE_INTEGER,className:"".concat(Ie,"-rest"),registerSize:Dn,display:Fn},$t=ge||Ge,Jt=se?xe.createElement(Xe.Provider,{value:(0,We.Z)((0,We.Z)({},Zn),Tt)},se(zt)):xe.createElement(st,(0,be.Z)({},Zn,Tt),typeof $t=="function"?$t(zt):$t),Ot=xe.createElement(le,(0,be.Z)({className:Te()(!lt&&ht,Ft),style:jt,ref:Pe},Rt),oe&&xe.createElement(st,(0,be.Z)({},Zn,{responsive:Be,responsiveDisabled:!Ve,order:-1,className:"".concat(Ie,"-prefix"),registerSize:Cn,display:!0}),oe),bt.map(et),Bt?Jt:null,de&&xe.createElement(st,(0,be.Z)({},Zn,{responsive:Be,responsiveDisabled:!Ve,order:sn,className:"".concat(Ie,"-suffix"),registerSize:gn,display:!0,style:un}),de));return Be?xe.createElement(we.Z,{onResize:_t,disabled:!Ve},Ot):Ot}var rt=xe.forwardRef(Dt);rt.displayName="Overflow",rt.Item=je,rt.RESPONSIVE=ot,rt.INVALIDATE=Et;var yt=rt,Ct=yt},17115:function(wn,qt,ce){"use strict";ce.d(qt,{ZP:function(){return Te}});var be=ce(42978),We=ce(59301),Fe=ce(47273),ft=0,xe=(0,Fe.Z)();function ke(){var we;return xe?(we=ft,ft+=1):we="TEST_OR_SSR",we}function Te(we){var Ee=We.useState(),Oe=(0,be.Z)(Ee,2),it=Oe[0],Le=Oe[1];return We.useEffect(function(){Le("rc_select_".concat(ke()))},[]),we||it}},77861:function(wn,qt,ce){"use strict";ce.d(qt,{Ac:function(){return ln},Xo:function(){return ar},Wx:function(){return _r},ZP:function(){return Ie},lk:function(){return Xe}});var be=ce(54476),We=ce(94480),Fe=ce(20068),ft=ce(33885),xe=ce(42978),ke=ce(75931),Te=ce(76190),we=ce(18929),Ee=ce(48736),Oe=ce(59301),it=ce(92310),Le=ce.n(it),ze=ce(34280),st=ce(49658),Qe=ce(10228),at=ce(8654),tt=function(Be){var Ve=Be.className,lt=Be.customizeIcon,Bt=Be.customizeIconProps,bt=Be.onMouseDown,zt=Be.onClick,tn=Be.children,cn;return typeof lt=="function"?cn=lt(Bt):cn=lt,Oe.createElement("span",{className:Ve,onMouseDown:function(_t){_t.preventDefault(),bt&&bt(_t)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:zt,"aria-hidden":!0},cn!==void 0?cn:Oe.createElement("span",{className:Le()(Ve.split(/\s+/).map(function(on){return"".concat(on,"-icon")}))},tn))},pt=tt;function Lt(Ae,Be,Ve,lt,Bt){var bt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,zt=arguments.length>6?arguments[6]:void 0,tn=arguments.length>7?arguments[7]:void 0,cn=Oe.useMemo(function(){if((0,Te.Z)(lt)==="object")return lt.clearIcon;if(Bt)return Bt},[lt,Bt]),on=Oe.useMemo(function(){return!!(!bt&<&&(Ve.length||zt)&&!(tn==="combobox"&&zt===""))},[lt,bt,Ve.length,zt,tn]);return{allowClear:on,clearIcon:Oe.createElement(pt,{className:"".concat(Ae,"-clear"),onMouseDown:Be,customizeIcon:cn},"\xD7")}}var Ue=Oe.createContext(null);function Xe(){return Oe.useContext(Ue)}function He(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Be=Oe.useState(!1),Ve=(0,xe.Z)(Be,2),lt=Ve[0],Bt=Ve[1],bt=Oe.useRef(null),zt=function(){window.clearTimeout(bt.current)};Oe.useEffect(function(){return zt},[]);var tn=function(on,_t){zt(),bt.current=window.setTimeout(function(){Bt(on),_t&&_t()},Ae)};return[lt,tn,zt]}function Se(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Be=Oe.useRef(null),Ve=Oe.useRef(null);Oe.useEffect(function(){return function(){window.clearTimeout(Ve.current)}},[]);function lt(Bt){(Bt||Be.current===null)&&(Be.current=Bt),window.clearTimeout(Ve.current),Ve.current=window.setTimeout(function(){Be.current=null},Ae)}return[function(){return Be.current},lt]}function Ke(Ae,Be,Ve,lt){var Bt=Oe.useRef(null);Bt.current={open:Be,triggerOpen:Ve,customizedTrigger:lt},Oe.useEffect(function(){function bt(zt){var tn;if(!((tn=Bt.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var cn=zt.target;cn.shadowRoot&&zt.composed&&(cn=zt.composedPath()[0]||cn),Bt.current.open&&Ae().filter(function(on){return on}).every(function(on){return!on.contains(cn)&&on!==cn})&&Bt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",bt),function(){return window.removeEventListener("mousedown",bt)}},[])}var Ze=ce(26112),gt=ce(83836),je=function(Be,Ve){var lt,Bt,bt=Be.prefixCls,zt=Be.id,tn=Be.inputElement,cn=Be.disabled,on=Be.tabIndex,_t=Be.autoFocus,Yt=Be.autoComplete,Dn=Be.editable,Cn=Be.activeDescendantId,gn=Be.value,Mn=Be.maxLength,Fn=Be.onKeyDown,un=Be.onMouseDown,Zn=Be.onChange,et=Be.onPaste,Tt=Be.onCompositionStart,$t=Be.onCompositionEnd,Jt=Be.open,Ot=Be.attrs,Zt=tn||Oe.createElement("input",null),Wt=Zt,nn=Wt.ref,bn=Wt.props,Ln=bn.onKeyDown,Hn=bn.onChange,jn=bn.onMouseDown,rr=bn.onCompositionStart,cr=bn.onCompositionEnd,er=bn.style;return(0,Ee.Kp)(!("maxLength"in Zt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Zt=Oe.cloneElement(Zt,(0,ft.Z)((0,ft.Z)((0,ft.Z)({type:"search"},bn),{},{id:zt,ref:(0,at.sQ)(Ve,nn),disabled:cn,tabIndex:on,autoComplete:Yt||"off",autoFocus:_t,className:Le()("".concat(bt,"-selection-search-input"),(lt=Zt)===null||lt===void 0||(Bt=lt.props)===null||Bt===void 0?void 0:Bt.className),role:"combobox","aria-label":"Search","aria-expanded":Jt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(zt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(zt,"_list"),"aria-activedescendant":Jt?Cn:void 0},Ot),{},{value:Dn?gn:"",maxLength:Mn,readOnly:!Dn,unselectable:Dn?null:"on",style:(0,ft.Z)((0,ft.Z)({},er),{},{opacity:Dn?null:0}),onKeyDown:function(fr){Fn(fr),Ln&&Ln(fr)},onMouseDown:function(fr){un(fr),jn&&jn(fr)},onChange:function(fr){Zn(fr),Hn&&Hn(fr)},onCompositionStart:function(fr){Tt(fr),rr&&rr(fr)},onCompositionEnd:function(fr){$t(fr),cr&&cr(fr)},onPaste:et})),Zt},St=Oe.forwardRef(je);St.displayName="Input";var ot=St;function Et(Ae){return Array.isArray(Ae)?Ae:Ae!==void 0?[Ae]:[]}var Ge=typeof window!="undefined"&&window.document&&window.document.documentElement,Dt=Ge;function rt(Ae){return Ae!=null}function yt(Ae){return!Ae&&Ae!==0}function Ct(Ae){return["string","number"].includes((0,Te.Z)(Ae))}function ct(Ae){var Be=void 0;return Ae&&(Ct(Ae.title)?Be=Ae.title.toString():Ct(Ae.label)&&(Be=Ae.label.toString())),Be}function Pe(Ae,Be){Dt?Oe.useLayoutEffect(Ae,Be):Oe.useEffect(Ae,Be)}function ye(Ae){var Be;return(Be=Ae.key)!==null&&Be!==void 0?Be:Ae.value}var ht=function(Be){Be.preventDefault(),Be.stopPropagation()},Vt=function(Be){var Ve=Be.id,lt=Be.prefixCls,Bt=Be.values,bt=Be.open,zt=Be.searchValue,tn=Be.autoClearSearchValue,cn=Be.inputRef,on=Be.placeholder,_t=Be.disabled,Yt=Be.mode,Dn=Be.showSearch,Cn=Be.autoFocus,gn=Be.autoComplete,Mn=Be.activeDescendantId,Fn=Be.tabIndex,un=Be.removeIcon,Zn=Be.maxTagCount,et=Be.maxTagTextLength,Tt=Be.maxTagPlaceholder,$t=Tt===void 0?function(Lr){return"+ ".concat(Lr.length," ...")}:Tt,Jt=Be.tagRender,Ot=Be.onToggleOpen,Zt=Be.onRemove,Wt=Be.onInputChange,nn=Be.onInputPaste,bn=Be.onInputKeyDown,Ln=Be.onInputMouseDown,Hn=Be.onInputCompositionStart,jn=Be.onInputCompositionEnd,rr=Oe.useRef(null),cr=(0,Oe.useState)(0),er=(0,xe.Z)(cr,2),vr=er[0],fr=er[1],pr=(0,Oe.useState)(!1),Gn=(0,xe.Z)(pr,2),sr=Gn[0],Xn=Gn[1],Rn="".concat(lt,"-selection"),gr=bt||Yt==="multiple"&&tn===!1||Yt==="tags"?zt:"",kr=Yt==="tags"||Yt==="multiple"&&tn===!1||Dn&&(bt||sr);Pe(function(){fr(rr.current.scrollWidth)},[gr]);function tr(Lr,Cr,Zr,Or,ni){return Oe.createElement("span",{className:Le()("".concat(Rn,"-item"),(0,Fe.Z)({},"".concat(Rn,"-item-disabled"),Zr)),title:ct(Lr)},Oe.createElement("span",{className:"".concat(Rn,"-item-content")},Cr),Or&&Oe.createElement(pt,{className:"".concat(Rn,"-item-remove"),onMouseDown:ht,onClick:ni,customizeIcon:un},"\xD7"))}function kn(Lr,Cr,Zr,Or,ni){var ir=function(Dr){ht(Dr),Ot(!bt)};return Oe.createElement("span",{onMouseDown:ir},Jt({label:Cr,value:Lr,disabled:Zr,closable:Or,onClose:ni}))}function En(Lr){var Cr=Lr.disabled,Zr=Lr.label,Or=Lr.value,ni=!_t&&!Cr,ir=Zr;if(typeof et=="number"&&(typeof Zr=="string"||typeof Zr=="number")){var lr=String(ir);lr.length>et&&(ir="".concat(lr.slice(0,et),"..."))}var Dr=function(ui){ui&&ui.stopPropagation(),Zt(Lr)};return typeof Jt=="function"?kn(Or,ir,Cr,ni,Dr):tr(Lr,ir,Cr,ni,Dr)}function dr(Lr){var Cr=typeof $t=="function"?$t(Lr):$t;return tr({title:Cr},Cr,!1)}var qn=Oe.createElement("div",{className:"".concat(Rn,"-search"),style:{width:vr},onFocus:function(){Xn(!0)},onBlur:function(){Xn(!1)}},Oe.createElement(ot,{ref:cn,open:bt,prefixCls:lt,id:Ve,inputElement:null,disabled:_t,autoFocus:Cn,autoComplete:gn,editable:kr,activeDescendantId:Mn,value:gr,onKeyDown:bn,onMouseDown:Ln,onChange:Wt,onPaste:nn,onCompositionStart:Hn,onCompositionEnd:jn,tabIndex:Fn,attrs:(0,Ze.Z)(Be,!0)}),Oe.createElement("span",{ref:rr,className:"".concat(Rn,"-search-mirror"),"aria-hidden":!0},gr,"\xA0")),wr=Oe.createElement(gt.Z,{prefixCls:"".concat(Rn,"-overflow"),data:Bt,renderItem:En,renderRest:dr,suffix:qn,itemKey:ye,maxCount:Zn});return Oe.createElement(Oe.Fragment,null,wr,!Bt.length&&!gr&&Oe.createElement("span",{className:"".concat(Rn,"-placeholder")},on))},Ht=Vt,Ye=function(Be){var Ve=Be.inputElement,lt=Be.prefixCls,Bt=Be.id,bt=Be.inputRef,zt=Be.disabled,tn=Be.autoFocus,cn=Be.autoComplete,on=Be.activeDescendantId,_t=Be.mode,Yt=Be.open,Dn=Be.values,Cn=Be.placeholder,gn=Be.tabIndex,Mn=Be.showSearch,Fn=Be.searchValue,un=Be.activeValue,Zn=Be.maxLength,et=Be.onInputKeyDown,Tt=Be.onInputMouseDown,$t=Be.onInputChange,Jt=Be.onInputPaste,Ot=Be.onInputCompositionStart,Zt=Be.onInputCompositionEnd,Wt=Be.title,nn=Oe.useState(!1),bn=(0,xe.Z)(nn,2),Ln=bn[0],Hn=bn[1],jn=_t==="combobox",rr=jn||Mn,cr=Dn[0],er=Fn||"";jn&&un&&!Ln&&(er=un),Oe.useEffect(function(){jn&&Hn(!1)},[jn,un]);var vr=_t!=="combobox"&&!Yt&&!Mn?!1:!!er,fr=Wt===void 0?ct(cr):Wt,pr=function(){if(cr)return null;var sr=vr?{visibility:"hidden"}:void 0;return Oe.createElement("span",{className:"".concat(lt,"-selection-placeholder"),style:sr},Cn)};return Oe.createElement(Oe.Fragment,null,Oe.createElement("span",{className:"".concat(lt,"-selection-search")},Oe.createElement(ot,{ref:bt,prefixCls:lt,id:Bt,open:Yt,inputElement:Ve,disabled:zt,autoFocus:tn,autoComplete:cn,editable:rr,activeDescendantId:on,value:er,onKeyDown:et,onMouseDown:Tt,onChange:function(sr){Hn(!0),$t(sr)},onPaste:Jt,onCompositionStart:Ot,onCompositionEnd:Zt,tabIndex:gn,attrs:(0,Ze.Z)(Be,!0),maxLength:jn?Zn:void 0})),!jn&&cr?Oe.createElement("span",{className:"".concat(lt,"-selection-item"),title:fr,style:vr?{visibility:"hidden"}:void 0},cr.label):null,pr())},Je=Ye;function At(Ae){return![Qe.Z.ESC,Qe.Z.SHIFT,Qe.Z.BACKSPACE,Qe.Z.TAB,Qe.Z.WIN_KEY,Qe.Z.ALT,Qe.Z.META,Qe.Z.WIN_KEY_RIGHT,Qe.Z.CTRL,Qe.Z.SEMICOLON,Qe.Z.EQUALS,Qe.Z.CAPS_LOCK,Qe.Z.CONTEXT_MENU,Qe.Z.F1,Qe.Z.F2,Qe.Z.F3,Qe.Z.F4,Qe.Z.F5,Qe.Z.F6,Qe.Z.F7,Qe.Z.F8,Qe.Z.F9,Qe.Z.F10,Qe.Z.F11,Qe.Z.F12].includes(Ae)}var mn=function(Be,Ve){var lt=(0,Oe.useRef)(null),Bt=(0,Oe.useRef)(!1),bt=Be.prefixCls,zt=Be.open,tn=Be.mode,cn=Be.showSearch,on=Be.tokenWithEnter,_t=Be.autoClearSearchValue,Yt=Be.onSearch,Dn=Be.onSearchSubmit,Cn=Be.onToggleOpen,gn=Be.onInputKeyDown,Mn=Be.domRef;Oe.useImperativeHandle(Ve,function(){return{focus:function(){lt.current.focus()},blur:function(){lt.current.blur()}}});var Fn=Se(0),un=(0,xe.Z)(Fn,2),Zn=un[0],et=un[1],Tt=function(er){var vr=er.which;(vr===Qe.Z.UP||vr===Qe.Z.DOWN)&&er.preventDefault(),gn&&gn(er),vr===Qe.Z.ENTER&&tn==="tags"&&!Bt.current&&!zt&&(Dn==null||Dn(er.target.value)),At(vr)&&Cn(!0)},$t=function(){et(!0)},Jt=(0,Oe.useRef)(null),Ot=function(er){Yt(er,!0,Bt.current)!==!1&&Cn(!0)},Zt=function(){Bt.current=!0},Wt=function(er){Bt.current=!1,tn!=="combobox"&&Ot(er.target.value)},nn=function(er){var vr=er.target.value;if(on&&Jt.current&&/[\r\n]/.test(Jt.current)){var fr=Jt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");vr=vr.replace(fr,Jt.current)}Jt.current=null,Ot(vr)},bn=function(er){var vr=er.clipboardData,fr=vr.getData("text");Jt.current=fr},Ln=function(er){var vr=er.target;if(vr!==lt.current){var fr=document.body.style.msTouchAction!==void 0;fr?setTimeout(function(){lt.current.focus()}):lt.current.focus()}},Hn=function(er){var vr=Zn();er.target!==lt.current&&!vr&&tn!=="combobox"&&er.preventDefault(),(tn!=="combobox"&&(!cn||!vr)||!zt)&&(zt&&_t!==!1&&Yt("",!0,!1),Cn())},jn={inputRef:lt,onInputKeyDown:Tt,onInputMouseDown:$t,onInputChange:nn,onInputPaste:bn,onInputCompositionStart:Zt,onInputCompositionEnd:Wt},rr=tn==="multiple"||tn==="tags"?Oe.createElement(Ht,(0,be.Z)({},Be,jn)):Oe.createElement(Je,(0,be.Z)({},Be,jn));return Oe.createElement("div",{ref:Mn,className:"".concat(bt,"-selector"),onClick:Ln,onMouseDown:Hn},rr)},Gt=Oe.forwardRef(mn);Gt.displayName="Selector";var hn=Gt,jt=ce(35593),Ft=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Kt=function(Be){var Ve=Be===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"}}},ge=function(Be,Ve){var lt=Be.prefixCls,Bt=Be.disabled,bt=Be.visible,zt=Be.children,tn=Be.popupElement,cn=Be.animation,on=Be.transitionName,_t=Be.dropdownStyle,Yt=Be.dropdownClassName,Dn=Be.direction,Cn=Dn===void 0?"ltr":Dn,gn=Be.placement,Mn=Be.builtinPlacements,Fn=Be.dropdownMatchSelectWidth,un=Be.dropdownRender,Zn=Be.dropdownAlign,et=Be.getPopupContainer,Tt=Be.empty,$t=Be.getTriggerDOMNode,Jt=Be.onPopupVisibleChange,Ot=Be.onPopupMouseEnter,Zt=(0,ke.Z)(Be,Ft),Wt="".concat(lt,"-dropdown"),nn=tn;un&&(nn=un(tn));var bn=Oe.useMemo(function(){return Mn||Kt(Fn)},[Mn,Fn]),Ln=cn?"".concat(Wt,"-").concat(cn):on,Hn=typeof Fn=="number",jn=Oe.useMemo(function(){return Hn?null:Fn===!1?"minWidth":"width"},[Fn,Hn]),rr=_t;Hn&&(rr=(0,ft.Z)((0,ft.Z)({},rr),{},{width:Fn}));var cr=Oe.useRef(null);return Oe.useImperativeHandle(Ve,function(){return{getPopupElement:function(){return cr.current}}}),Oe.createElement(jt.Z,(0,be.Z)({},Zt,{showAction:Jt?["click"]:[],hideAction:Jt?["click"]:[],popupPlacement:gn||(Cn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:bn,prefixCls:Wt,popupTransitionName:Ln,popup:Oe.createElement("div",{ref:cr,onMouseEnter:Ot},nn),stretch:jn,popupAlign:Zn,popupVisible:bt,getPopupContainer:et,popupClassName:Le()(Yt,(0,Fe.Z)({},"".concat(Wt,"-empty"),Tt)),popupStyle:rr,getTriggerDOMNode:$t,onPopupVisibleChange:Jt}),zt)},se=Oe.forwardRef(ge);se.displayName="SelectTrigger";var oe=se,de=ce(66712);function fe(Ae,Be){var Ve=Ae.key,lt;return"value"in Ae&&(lt=Ae.value),Ve!=null?Ve:lt!==void 0?lt:"rc-index-key-".concat(Be)}function le(Ae,Be){var Ve=Ae||{},lt=Ve.label,Bt=Ve.value,bt=Ve.options,zt=Ve.groupLabel,tn=lt||(Be?"children":"label");return{label:tn,value:Bt||"value",options:bt||"options",groupLabel:zt||tn}}function $e(Ae){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ve=Be.fieldNames,lt=Be.childrenAsData,Bt=[],bt=le(Ve,!1),zt=bt.label,tn=bt.value,cn=bt.options,on=bt.groupLabel;function _t(Yt,Dn){Yt.forEach(function(Cn){if(Dn||!(cn in Cn)){var gn=Cn[tn];Bt.push({key:fe(Cn,Bt.length),groupOption:Dn,data:Cn,label:Cn[zt],value:gn})}else{var Mn=Cn[on];Mn===void 0&<&&(Mn=Cn.label),Bt.push({key:fe(Cn,Bt.length),group:!0,data:Cn,label:Mn}),_t(Cn[cn],!0)}})}return _t(Ae,!1),Bt}function dt(Ae){var Be=(0,ft.Z)({},Ae);return"props"in Be||Object.defineProperty(Be,"props",{get:function(){return(0,Ee.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Be}}),Be}function Rt(Ae,Be){if(!Be||!Be.length)return null;var Ve=!1;function lt(bt,zt){var tn=(0,de.Z)(zt),cn=tn[0],on=tn.slice(1);if(!cn)return[bt];var _t=bt.split(cn);return Ve=Ve||_t.length>1,_t.reduce(function(Yt,Dn){return[].concat((0,We.Z)(Yt),(0,We.Z)(lt(Dn,on)))},[]).filter(function(Yt){return Yt})}var Bt=lt(Ae,Be);return Ve?Bt:null}var Pt=["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","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Ut=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Xt(Ae){return Ae==="tags"||Ae==="multiple"}var en=Oe.forwardRef(function(Ae,Be){var Ve,lt,Bt=Ae.id,bt=Ae.prefixCls,zt=Ae.className,tn=Ae.showSearch,cn=Ae.tagRender,on=Ae.direction,_t=Ae.omitDomProps,Yt=Ae.displayValues,Dn=Ae.onDisplayValuesChange,Cn=Ae.emptyOptions,gn=Ae.notFoundContent,Mn=gn===void 0?"Not Found":gn,Fn=Ae.onClear,un=Ae.mode,Zn=Ae.disabled,et=Ae.loading,Tt=Ae.getInputElement,$t=Ae.getRawInputElement,Jt=Ae.open,Ot=Ae.defaultOpen,Zt=Ae.onDropdownVisibleChange,Wt=Ae.activeValue,nn=Ae.onActiveValueChange,bn=Ae.activeDescendantId,Ln=Ae.searchValue,Hn=Ae.autoClearSearchValue,jn=Ae.onSearch,rr=Ae.onSearchSplit,cr=Ae.tokenSeparators,er=Ae.allowClear,vr=Ae.suffixIcon,fr=Ae.clearIcon,pr=Ae.OptionList,Gn=Ae.animation,sr=Ae.transitionName,Xn=Ae.dropdownStyle,Rn=Ae.dropdownClassName,gr=Ae.dropdownMatchSelectWidth,kr=Ae.dropdownRender,tr=Ae.dropdownAlign,kn=Ae.placement,En=Ae.builtinPlacements,dr=Ae.getPopupContainer,qn=Ae.showAction,wr=qn===void 0?[]:qn,Lr=Ae.onFocus,Cr=Ae.onBlur,Zr=Ae.onKeyUp,Or=Ae.onKeyDown,ni=Ae.onMouseDown,ir=(0,ke.Z)(Ae,Pt),lr=Xt(un),Dr=(tn!==void 0?tn:lr)||un==="combobox",Ar=(0,ft.Z)({},ir);Ut.forEach(function(yi){delete Ar[yi]}),_t==null||_t.forEach(function(yi){delete Ar[yi]});var ui=Oe.useState(!1),Hi=(0,xe.Z)(ui,2),_i=Hi[0],Qr=Hi[1];Oe.useEffect(function(){Qr((0,st.Z)())},[]);var bi=Oe.useRef(null),mi=Oe.useRef(null),Yn=Oe.useRef(null),Un=Oe.useRef(null),Nn=Oe.useRef(null),Kn=He(),Nr=(0,xe.Z)(Kn,3),ri=Nr[0],ai=Nr[1],ci=Nr[2];Oe.useImperativeHandle(Be,function(){var yi,di;return{focus:(yi=Un.current)===null||yi===void 0?void 0:yi.focus,blur:(di=Un.current)===null||di===void 0?void 0:di.blur,scrollTo:function(ka){var Zi;return(Zi=Nn.current)===null||Zi===void 0?void 0:Zi.scrollTo(ka)}}});var ti=Oe.useMemo(function(){var yi;if(un!=="combobox")return Ln;var di=(yi=Yt[0])===null||yi===void 0?void 0:yi.value;return typeof di=="string"||typeof di=="number"?String(di):""},[Ln,un,Yt]),fi=un==="combobox"&&typeof Tt=="function"&&Tt()||null,Li=typeof $t=="function"&&$t(),ki=(0,at.x1)(mi,Li==null||(Ve=Li.props)===null||Ve===void 0?void 0:Ve.ref),ta=Oe.useState(!1),Yi=(0,xe.Z)(ta,2),Ii=Yi[0],Ra=Yi[1];(0,ze.Z)(function(){Ra(!0)},[]);var na=(0,we.Z)(!1,{defaultValue:Ot,value:Jt}),va=(0,xe.Z)(na,2),ra=va[0],Si=va[1],$r=Ii?ra:!1,Jr=!Mn&&Cn;(Zn||Jr&&$r&&un==="combobox")&&($r=!1);var Hr=Jr?!1:$r,Ir=Oe.useCallback(function(yi){var di=yi!==void 0?yi:!$r;Zn||(Si(di),$r!==di&&(Zt==null||Zt(di)))},[Zn,$r,Si,Zt]),si=Oe.useMemo(function(){return(cr||[]).some(function(yi){return[`
|
|
|
`,`\r
|
|
|
`].includes(yi)})},[cr]),ii=function(di,$i,ka){var Zi=!0,Oa=di;nn==null||nn(null);var Na=ka?null:Rt(di,cr);return un!=="combobox"&&Na&&(Oa="",rr==null||rr(Na),Ir(!1),Zi=!1),jn&&ti!==Oa&&jn(Oa,{source:$i?"typing":"effect"}),Zi},Oi=function(di){!di||!di.trim()||jn(di,{source:"submit"})};Oe.useEffect(function(){!$r&&!lr&&un!=="combobox"&&ii("",!1,!1)},[$r]),Oe.useEffect(function(){ra&&Zn&&Si(!1),Zn&&ai(!1)},[Zn]);var Fi=Se(),Ri=(0,xe.Z)(Fi,2),qi=Ri[0],pi=Ri[1],hi=function(di){var $i=qi(),ka=di.which;if(ka===Qe.Z.ENTER&&(un!=="combobox"&&di.preventDefault(),$r||Ir(!0)),pi(!!ti),ka===Qe.Z.BACKSPACE&&!$i&&lr&&!ti&&Yt.length){for(var Zi=(0,We.Z)(Yt),Oa=null,Na=Zi.length-1;Na>=0;Na-=1){var to=Zi[Na];if(!to.disabled){Zi.splice(Na,1),Oa=to;break}}Oa&&Dn(Zi,{type:"remove",values:[Oa]})}for(var $a=arguments.length,so=new Array($a>1?$a-1:0),lo=1;lo<$a;lo++)so[lo-1]=arguments[lo];if($r&&Nn.current){var Da;(Da=Nn.current).onKeyDown.apply(Da,[di].concat(so))}Or==null||Or.apply(void 0,[di].concat(so))},Wi=function(di){for(var $i=arguments.length,ka=new Array($i>1?$i-1:0),Zi=1;Zi<$i;Zi++)ka[Zi-1]=arguments[Zi];if($r&&Nn.current){var Oa;(Oa=Nn.current).onKeyUp.apply(Oa,[di].concat(ka))}Zr==null||Zr.apply(void 0,[di].concat(ka))},sa=function(di){var $i=Yt.filter(function(ka){return ka!==di});Dn($i,{type:"remove",values:[di]})},aa=Oe.useRef(!1),Ji=function(){ai(!0),Zn||(Lr&&!aa.current&&Lr.apply(void 0,arguments),wr.includes("focus")&&Ir(!0)),aa.current=!0},ts=function(){ai(!1,function(){aa.current=!1,Ir(!1)}),!Zn&&(ti&&(un==="tags"?jn(ti,{source:"submit"}):un==="multiple"&&jn("",{source:"blur"})),Cr&&Cr.apply(void 0,arguments))},ao=[];Oe.useEffect(function(){return function(){ao.forEach(function(yi){return clearTimeout(yi)}),ao.splice(0,ao.length)}},[]);var oo=function(di){var $i,ka=di.target,Zi=($i=Yn.current)===null||$i===void 0?void 0:$i.getPopupElement();if(Zi&&Zi.contains(ka)){var Oa=setTimeout(function(){var so=ao.indexOf(Oa);if(so!==-1&&ao.splice(so,1),ci(),!_i&&!Zi.contains(document.activeElement)){var lo;(lo=Un.current)===null||lo===void 0||lo.focus()}});ao.push(Oa)}for(var Na=arguments.length,to=new Array(Na>1?Na-1:0),$a=1;$a<Na;$a++)to[$a-1]=arguments[$a];ni==null||ni.apply(void 0,[di].concat(to))},eo=Oe.useState({}),Ss=(0,xe.Z)(eo,2),fo=Ss[1];function _a(){fo({})}var da;Li&&(da=function(di){Ir(di)}),Ke(function(){var yi;return[bi.current,(yi=Yn.current)===null||yi===void 0?void 0:yi.getPopupElement()]},Hr,Ir,!!Li);var yo=Oe.useMemo(function(){return(0,ft.Z)((0,ft.Z)({},Ae),{},{notFoundContent:Mn,open:$r,triggerOpen:Hr,id:Bt,showSearch:Dr,multiple:lr,toggleOpen:Ir})},[Ae,Mn,Hr,$r,Bt,Dr,lr,Ir]),_o=!!vr||et,ko;_o&&(ko=Oe.createElement(pt,{className:Le()("".concat(bt,"-arrow"),(0,Fe.Z)({},"".concat(bt,"-arrow-loading"),et)),customizeIcon:vr,customizeIconProps:{loading:et,searchValue:ti,open:$r,focused:ri,showSearch:Dr}}));var ns=function(){var di;Fn==null||Fn(),(di=Un.current)===null||di===void 0||di.focus(),Dn([],{type:"clear",values:Yt}),ii("",!1,!1)},$o=Lt(bt,ns,Yt,er,fr,Zn,ti,un),Xa=$o.allowClear,Pa=$o.clearIcon,Ai=Oe.createElement(pr,{ref:Nn}),Do=Le()(bt,zt,(lt={},(0,Fe.Z)(lt,"".concat(bt,"-focused"),ri),(0,Fe.Z)(lt,"".concat(bt,"-multiple"),lr),(0,Fe.Z)(lt,"".concat(bt,"-single"),!lr),(0,Fe.Z)(lt,"".concat(bt,"-allow-clear"),er),(0,Fe.Z)(lt,"".concat(bt,"-show-arrow"),_o),(0,Fe.Z)(lt,"".concat(bt,"-disabled"),Zn),(0,Fe.Z)(lt,"".concat(bt,"-loading"),et),(0,Fe.Z)(lt,"".concat(bt,"-open"),$r),(0,Fe.Z)(lt,"".concat(bt,"-customize-input"),fi),(0,Fe.Z)(lt,"".concat(bt,"-show-search"),Dr),lt)),rs=Oe.createElement(oe,{ref:Yn,disabled:Zn,prefixCls:bt,visible:Hr,popupElement:Ai,animation:Gn,transitionName:sr,dropdownStyle:Xn,dropdownClassName:Rn,direction:on,dropdownMatchSelectWidth:gr,dropdownRender:kr,dropdownAlign:tr,placement:kn,builtinPlacements:En,getPopupContainer:dr,empty:Cn,getTriggerDOMNode:function(){return mi.current},onPopupVisibleChange:da,onPopupMouseEnter:_a},Li?Oe.cloneElement(Li,{ref:ki}):Oe.createElement(hn,(0,be.Z)({},Ae,{domRef:mi,prefixCls:bt,inputElement:fi,ref:Un,id:Bt,showSearch:Dr,autoClearSearchValue:Hn,mode:un,activeDescendantId:bn,tagRender:cn,values:Yt,open:$r,onToggleOpen:Ir,activeValue:Wt,searchValue:ti,onSearch:ii,onSearchSubmit:Oi,onRemove:sa,tokenWithEnter:si}))),Lo;return Li?Lo=rs:Lo=Oe.createElement("div",(0,be.Z)({className:Do},Ar,{ref:bi,onMouseDown:oo,onKeyDown:hi,onKeyUp:Wi,onFocus:Ji,onBlur:ts}),ri&&!$r&&Oe.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Yt.map(function(yi){var di=yi.label,$i=yi.value;return["number","string"].includes((0,Te.Z)(di))?di:$i}).join(", "))),rs,ko,Xa&&Pa),Oe.createElement(Ue.Provider,{value:yo},Lo)}),ln=en,Sn=function(Ae,Be){var Ve=Oe.useRef({values:new Map,options:new Map}),lt=Oe.useMemo(function(){var bt=Ve.current,zt=bt.values,tn=bt.options,cn=Ae.map(function(Yt){if(Yt.label===void 0){var Dn;return(0,ft.Z)((0,ft.Z)({},Yt),{},{label:(Dn=zt.get(Yt.value))===null||Dn===void 0?void 0:Dn.label})}return Yt}),on=new Map,_t=new Map;return cn.forEach(function(Yt){on.set(Yt.value,Yt),_t.set(Yt.value,Be.get(Yt.value)||tn.get(Yt.value))}),Ve.current.values=on,Ve.current.options=_t,cn},[Ae,Be]),Bt=Oe.useCallback(function(bt){return Be.get(bt)||Ve.current.options.get(bt)},[Be]);return[lt,Bt]};function xt(Ae,Be){return Et(Ae).join("").toUpperCase().includes(Be)}var an=function(Ae,Be,Ve,lt,Bt){return Oe.useMemo(function(){if(!Ve||lt===!1)return Ae;var bt=Be.options,zt=Be.label,tn=Be.value,cn=[],on=typeof lt=="function",_t=Ve.toUpperCase(),Yt=on?lt:function(Cn,gn){return Bt?xt(gn[Bt],_t):gn[bt]?xt(gn[zt!=="children"?zt:"label"],_t):xt(gn[tn],_t)},Dn=on?function(Cn){return dt(Cn)}:function(Cn){return Cn};return Ae.forEach(function(Cn){if(Cn[bt]){var gn=Yt(Ve,Dn(Cn));if(gn)cn.push(Cn);else{var Mn=Cn[bt].filter(function(Fn){return Yt(Ve,Dn(Fn))});Mn.length&&cn.push((0,ft.Z)((0,ft.Z)({},Cn),{},(0,Fe.Z)({},bt,Mn)))}return}Yt(Ve,Dn(Cn))&&cn.push(Cn)}),cn},[Ae,lt,Bt,Ve,Be])},On=ce(17115),ut=ce(11592),wt=["children","value"],Nt=["children"];function Pn(Ae){var Be=Ae,Ve=Be.key,lt=Be.props,Bt=lt.children,bt=lt.value,zt=(0,ke.Z)(lt,wt);return(0,ft.Z)({key:Ve,value:bt!==void 0?bt:Ve,children:Bt},zt)}function Bn(Ae){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ut.Z)(Ae).map(function(Ve,lt){if(!Oe.isValidElement(Ve)||!Ve.type)return null;var Bt=Ve,bt=Bt.type.isSelectOptGroup,zt=Bt.key,tn=Bt.props,cn=tn.children,on=(0,ke.Z)(tn,Nt);return Be||!bt?Pn(Ve):(0,ft.Z)((0,ft.Z)({key:"__RC_SELECT_GRP__".concat(zt===null?lt:zt,"__"),label:zt},on),{},{options:Bn(cn)})}).filter(function(Ve){return Ve})}function Tn(Ae,Be,Ve,lt,Bt){return Oe.useMemo(function(){var bt=Ae,zt=!Ae;zt&&(bt=Bn(Be));var tn=new Map,cn=new Map,on=function(Dn,Cn,gn){gn&&typeof gn=="string"&&Dn.set(Cn[gn],Cn)};function _t(Yt){for(var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Cn=0;Cn<Yt.length;Cn+=1){var gn=Yt[Cn];!gn[Ve.options]||Dn?(tn.set(gn[Ve.value],gn),on(cn,gn,Ve.label),on(cn,gn,lt),on(cn,gn,Bt)):_t(gn[Ve.options],!0)}}return _t(bt),{options:bt,valueOptions:tn,labelOptions:cn}},[Ae,Be,Ve,lt,Bt])}function nr(Ae){var Be=Oe.useRef();Be.current=Ae;var Ve=Oe.useCallback(function(){return Be.current.apply(Be,arguments)},[]);return Ve}var mr=function(){return null};mr.isSelectOptGroup=!0;var ar=mr,Er=function(){return null};Er.isSelectOption=!0;var _r=Er,Jn=ce(80547),zr=ce(2738),Wr=ce(48911),Vr=Oe.createContext(null),ei=Vr;function Tr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Yr=["disabled","title","children","style","className"];function xr(Ae){return typeof Ae=="string"||typeof Ae=="number"}var Ur=function(Be,Ve){var lt=Xe(),Bt=lt.prefixCls,bt=lt.id,zt=lt.open,tn=lt.multiple,cn=lt.mode,on=lt.searchValue,_t=lt.toggleOpen,Yt=lt.notFoundContent,Dn=lt.onPopupScroll,Cn=Oe.useContext(ei),gn=Cn.flattenOptions,Mn=Cn.onActiveValue,Fn=Cn.defaultActiveFirstOption,un=Cn.onSelect,Zn=Cn.menuItemSelectedIcon,et=Cn.rawValues,Tt=Cn.fieldNames,$t=Cn.virtual,Jt=Cn.direction,Ot=Cn.listHeight,Zt=Cn.listItemHeight,Wt="".concat(Bt,"-item"),nn=(0,Jn.Z)(function(){return gn},[zt,gn],function(tr,kn){return kn[0]&&tr[1]!==kn[1]}),bn=Oe.useRef(null),Ln=function(kn){kn.preventDefault()},Hn=function(kn){bn.current&&bn.current.scrollTo(typeof kn=="number"?{index:kn}:kn)},jn=function(kn){for(var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,dr=nn.length,qn=0;qn<dr;qn+=1){var wr=(kn+qn*En+dr)%dr,Lr=nn[wr],Cr=Lr.group,Zr=Lr.data;if(!Cr&&!Zr.disabled)return wr}return-1},rr=Oe.useState(function(){return jn(0)}),cr=(0,xe.Z)(rr,2),er=cr[0],vr=cr[1],fr=function(kn){var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;vr(kn);var dr={source:En?"keyboard":"mouse"},qn=nn[kn];if(!qn){Mn(null,-1,dr);return}Mn(qn.value,kn,dr)};(0,Oe.useEffect)(function(){fr(Fn!==!1?jn(0):-1)},[nn.length,on]);var pr=Oe.useCallback(function(tr){return et.has(tr)&&cn!=="combobox"},[cn,(0,We.Z)(et).toString(),et.size]);(0,Oe.useEffect)(function(){var tr=setTimeout(function(){if(!tn&&zt&&et.size===1){var En=Array.from(et)[0],dr=nn.findIndex(function(qn){var wr=qn.data;return wr.value===En});dr!==-1&&(fr(dr),Hn(dr))}});if(zt){var kn;(kn=bn.current)===null||kn===void 0||kn.scrollTo(void 0)}return function(){return clearTimeout(tr)}},[zt,on,gn.length]);var Gn=function(kn){kn!==void 0&&un(kn,{selected:!et.has(kn)}),tn||_t(!1)};if(Oe.useImperativeHandle(Ve,function(){return{onKeyDown:function(kn){var En=kn.which,dr=kn.ctrlKey;switch(En){case Qe.Z.N:case Qe.Z.P:case Qe.Z.UP:case Qe.Z.DOWN:{var qn=0;if(En===Qe.Z.UP?qn=-1:En===Qe.Z.DOWN?qn=1:Tr()&&dr&&(En===Qe.Z.N?qn=1:En===Qe.Z.P&&(qn=-1)),qn!==0){var wr=jn(er+qn,qn);Hn(wr),fr(wr,!0)}break}case Qe.Z.ENTER:{var Lr=nn[er];Lr&&!Lr.data.disabled?Gn(Lr.value):Gn(void 0),zt&&kn.preventDefault();break}case Qe.Z.ESC:_t(!1),zt&&kn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(kn){Hn(kn)}}}),nn.length===0)return Oe.createElement("div",{role:"listbox",id:"".concat(bt,"_list"),className:"".concat(Wt,"-empty"),onMouseDown:Ln},Yt);var sr=Object.keys(Tt).map(function(tr){return Tt[tr]}),Xn=function(kn){return kn.label};function Rn(tr,kn){var En=tr.group;return{role:En?"presentation":"option",id:"".concat(bt,"_list_").concat(kn)}}var gr=function(kn){var En=nn[kn];if(!En)return null;var dr=En.data||{},qn=dr.value,wr=En.group,Lr=(0,Ze.Z)(dr,!0),Cr=Xn(En);return En?Oe.createElement("div",(0,be.Z)({"aria-label":typeof Cr=="string"&&!wr?Cr:null},Lr,{key:kn},Rn(En,kn),{"aria-selected":pr(qn)}),qn):null},kr={role:"listbox",id:"".concat(bt,"_list")};return Oe.createElement(Oe.Fragment,null,$t&&Oe.createElement("div",(0,be.Z)({},kr,{style:{height:0,width:0,overflow:"hidden"}}),gr(er-1),gr(er),gr(er+1)),Oe.createElement(Wr.Z,{itemKey:"key",ref:bn,data:nn,height:Ot,itemHeight:Zt,fullHeight:!1,onMouseDown:Ln,onScroll:Dn,virtual:$t,direction:Jt,innerProps:$t?null:kr},function(tr,kn){var En,dr=tr.group,qn=tr.groupOption,wr=tr.data,Lr=tr.label,Cr=tr.value,Zr=wr.key;if(dr){var Or,ni=(Or=wr.title)!==null&&Or!==void 0?Or:xr(Lr)?Lr.toString():void 0;return Oe.createElement("div",{className:Le()(Wt,"".concat(Wt,"-group")),title:ni},Lr!==void 0?Lr:Zr)}var ir=wr.disabled,lr=wr.title,Dr=wr.children,Ar=wr.style,ui=wr.className,Hi=(0,ke.Z)(wr,Yr),_i=(0,zr.Z)(Hi,sr),Qr=pr(Cr),bi="".concat(Wt,"-option"),mi=Le()(Wt,bi,ui,(En={},(0,Fe.Z)(En,"".concat(bi,"-grouped"),qn),(0,Fe.Z)(En,"".concat(bi,"-active"),er===kn&&!ir),(0,Fe.Z)(En,"".concat(bi,"-disabled"),ir),(0,Fe.Z)(En,"".concat(bi,"-selected"),Qr),En)),Yn=Xn(tr),Un=!Zn||typeof Zn=="function"||Qr,Nn=typeof Yn=="number"?Yn:Yn||Cr,Kn=xr(Nn)?Nn.toString():void 0;return lr!==void 0&&(Kn=lr),Oe.createElement("div",(0,be.Z)({},(0,Ze.Z)(_i),$t?{}:Rn(tr,kn),{"aria-selected":Qr,className:mi,title:Kn,onMouseMove:function(){er===kn||ir||fr(kn)},onClick:function(){ir||Gn(Cr)},style:Ar}),Oe.createElement("div",{className:"".concat(bi,"-content")},Nn),Oe.isValidElement(Zn)||Qr,Un&&Oe.createElement(pt,{className:"".concat(Wt,"-option-state"),customizeIcon:Zn,customizeIconProps:{isSelected:Qr}},Qr?"\u2713":null))}))},qr=Oe.forwardRef(Ur);qr.displayName="OptionList";var It=qr;function _n(Ae){var Be=Ae.mode,Ve=Ae.options,lt=Ae.children,Bt=Ae.backfill,bt=Ae.allowClear,zt=Ae.placeholder,tn=Ae.getInputElement,cn=Ae.showSearch,on=Ae.onSearch,_t=Ae.defaultOpen,Yt=Ae.autoFocus,Dn=Ae.labelInValue,Cn=Ae.value,gn=Ae.inputValue,Mn=Ae.optionLabelProp,Fn=isMultiple(Be),un=cn!==void 0?cn:Fn||Be==="combobox",Zn=Ve||convertChildrenToData(lt);if(warning(Be!=="tags"||Zn.every(function(Jt){return!Jt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Be==="tags"||Be==="combobox"){var et=Zn.some(function(Jt){return Jt.options?Jt.options.some(function(Ot){return typeof("value"in Ot?Ot.value:Ot.key)=="number"}):typeof("value"in Jt?Jt.value:Jt.key)=="number"});warning(!et,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Be!=="combobox"||!Mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Be==="combobox"||!Bt,"`backfill` only works with `combobox` mode."),warning(Be==="combobox"||!tn,"`getInputElement` only work with `combobox` mode."),noteOnce(Be!=="combobox"||!tn||!bt||!zt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),on&&!un&&Be!=="combobox"&&Be!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!_t||Yt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Cn!=null){var Tt=toArray(Cn);warning(!Dn||Tt.every(function(Jt){return _typeof(Jt)==="object"&&("key"in Jt||"value"in Jt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Fn||Array.isArray(Cn),"`value` should be array when `mode` is `multiple` or `tags`")}if(lt){var $t=null;toNodeArray(lt).some(function(Jt){if(!React.isValidElement(Jt)||!Jt.type)return!1;var Ot=Jt,Zt=Ot.type;if(Zt.isSelectOption)return!1;if(Zt.isSelectOptGroup){var Wt=toNodeArray(Jt.props.children).every(function(nn){return!React.isValidElement(nn)||!Jt.type||nn.type.isSelectOption?!0:($t=nn.type,!1)});return!Wt}return $t=Zt,!0}),$t&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat($t.displayName||$t.name||$t,"`.")),warning(gn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yn(Ae,Be){if(Ae){var Ve=function lt(Bt){for(var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zt=0;zt<Bt.length;zt++){var tn=Bt[zt];if(tn[Be==null?void 0:Be.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!bt&&Array.isArray(tn[Be==null?void 0:Be.options])&<(tn[Be==null?void 0:Be.options],!0))break}};Ve(Ae)}}var pn=null,xn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],sn=["inputValue"];function dn(Ae){return!Ae||(0,Te.Z)(Ae)!=="object"}var $n=Oe.forwardRef(function(Ae,Be){var Ve=Ae.id,lt=Ae.mode,Bt=Ae.prefixCls,bt=Bt===void 0?"rc-select":Bt,zt=Ae.backfill,tn=Ae.fieldNames,cn=Ae.inputValue,on=Ae.searchValue,_t=Ae.onSearch,Yt=Ae.autoClearSearchValue,Dn=Yt===void 0?!0:Yt,Cn=Ae.onSelect,gn=Ae.onDeselect,Mn=Ae.dropdownMatchSelectWidth,Fn=Mn===void 0?!0:Mn,un=Ae.filterOption,Zn=Ae.filterSort,et=Ae.optionFilterProp,Tt=Ae.optionLabelProp,$t=Ae.options,Jt=Ae.children,Ot=Ae.defaultActiveFirstOption,Zt=Ae.menuItemSelectedIcon,Wt=Ae.virtual,nn=Ae.direction,bn=Ae.listHeight,Ln=bn===void 0?200:bn,Hn=Ae.listItemHeight,jn=Hn===void 0?20:Hn,rr=Ae.value,cr=Ae.defaultValue,er=Ae.labelInValue,vr=Ae.onChange,fr=(0,ke.Z)(Ae,xn),pr=(0,On.ZP)(Ve),Gn=Xt(lt),sr=!!(!$t&&Jt),Xn=Oe.useMemo(function(){return un===void 0&<==="combobox"?!1:un},[un,lt]),Rn=Oe.useMemo(function(){return le(tn,sr)},[JSON.stringify(tn),sr]),gr=(0,we.Z)("",{value:on!==void 0?on:cn,postState:function(Jr){return Jr||""}}),kr=(0,xe.Z)(gr,2),tr=kr[0],kn=kr[1],En=Tn($t,Jt,Rn,et,Tt),dr=En.valueOptions,qn=En.labelOptions,wr=En.options,Lr=Oe.useCallback(function($r){var Jr=Et($r);return Jr.map(function(Hr){var Ir,si,ii,Oi,Fi;if(dn(Hr))Ir=Hr;else{var Ri;ii=Hr.key,si=Hr.label,Ir=(Ri=Hr.value)!==null&&Ri!==void 0?Ri:ii}var qi=dr.get(Ir);if(qi){var pi;if(si===void 0&&(si=qi==null?void 0:qi[Tt||Rn.label]),ii===void 0&&(ii=(pi=qi==null?void 0:qi.key)!==null&&pi!==void 0?pi:Ir),Oi=qi==null?void 0:qi.disabled,Fi=qi==null?void 0:qi.title,0)var hi}return{label:si,value:Ir,key:ii,disabled:Oi,title:Fi}})},[Rn,Tt,dr]),Cr=(0,we.Z)(cr,{value:rr}),Zr=(0,xe.Z)(Cr,2),Or=Zr[0],ni=Zr[1],ir=Oe.useMemo(function(){var $r,Jr=Lr(Or);return lt==="combobox"&&yt(($r=Jr[0])===null||$r===void 0?void 0:$r.value)?[]:Jr},[Or,Lr,lt]),lr=Sn(ir,dr),Dr=(0,xe.Z)(lr,2),Ar=Dr[0],ui=Dr[1],Hi=Oe.useMemo(function(){if(!lt&&Ar.length===1){var $r=Ar[0];if($r.value===null&&($r.label===null||$r.label===void 0))return[]}return Ar.map(function(Jr){var Hr;return(0,ft.Z)((0,ft.Z)({},Jr),{},{label:(Hr=Jr.label)!==null&&Hr!==void 0?Hr:Jr.value})})},[lt,Ar]),_i=Oe.useMemo(function(){return new Set(Ar.map(function($r){return $r.value}))},[Ar]);Oe.useEffect(function(){if(lt==="combobox"){var $r,Jr=($r=Ar[0])===null||$r===void 0?void 0:$r.value;kn(rt(Jr)?String(Jr):"")}},[Ar]);var Qr=nr(function($r,Jr){var Hr,Ir=Jr!=null?Jr:$r;return Hr={},(0,Fe.Z)(Hr,Rn.value,$r),(0,Fe.Z)(Hr,Rn.label,Ir),Hr}),bi=Oe.useMemo(function(){if(lt!=="tags")return wr;var $r=(0,We.Z)(wr),Jr=function(Ir){return dr.has(Ir)};return(0,We.Z)(Ar).sort(function(Hr,Ir){return Hr.value<Ir.value?-1:1}).forEach(function(Hr){var Ir=Hr.value;Jr(Ir)||$r.push(Qr(Ir,Hr.label))}),$r},[Qr,wr,dr,Ar,lt]),mi=an(bi,Rn,tr,Xn,et),Yn=Oe.useMemo(function(){return lt!=="tags"||!tr||mi.some(function($r){return $r[et||"value"]===tr})||mi.some(function($r){return $r[Rn.value]===tr})?mi:[Qr(tr)].concat((0,We.Z)(mi))},[Qr,et,lt,mi,tr,Rn]),Un=Oe.useMemo(function(){return Zn?(0,We.Z)(Yn).sort(function($r,Jr){return Zn($r,Jr)}):Yn},[Yn,Zn]),Nn=Oe.useMemo(function(){return $e(Un,{fieldNames:Rn,childrenAsData:sr})},[Un,Rn,sr]),Kn=function(Jr){var Hr=Lr(Jr);if(ni(Hr),vr&&(Hr.length!==Ar.length||Hr.some(function(ii,Oi){var Fi;return((Fi=Ar[Oi])===null||Fi===void 0?void 0:Fi.value)!==(ii==null?void 0:ii.value)}))){var Ir=er?Hr:Hr.map(function(ii){return ii.value}),si=Hr.map(function(ii){return dt(ui(ii.value))});vr(Gn?Ir:Ir[0],Gn?si:si[0])}},Nr=Oe.useState(null),ri=(0,xe.Z)(Nr,2),ai=ri[0],ci=ri[1],ti=Oe.useState(0),fi=(0,xe.Z)(ti,2),Li=fi[0],ki=fi[1],ta=Ot!==void 0?Ot:lt!=="combobox",Yi=Oe.useCallback(function($r,Jr){var Hr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ir=Hr.source,si=Ir===void 0?"keyboard":Ir;ki(Jr),zt&<==="combobox"&&$r!==null&&si==="keyboard"&&ci(String($r))},[zt,lt]),Ii=function(Jr,Hr,Ir){var si=function(){var aa,Ji=ui(Jr);return[er?{label:Ji==null?void 0:Ji[Rn.label],value:Jr,key:(aa=Ji==null?void 0:Ji.key)!==null&&aa!==void 0?aa:Jr}:Jr,dt(Ji)]};if(Hr&&Cn){var ii=si(),Oi=(0,xe.Z)(ii,2),Fi=Oi[0],Ri=Oi[1];Cn(Fi,Ri)}else if(!Hr&&gn&&Ir!=="clear"){var qi=si(),pi=(0,xe.Z)(qi,2),hi=pi[0],Wi=pi[1];gn(hi,Wi)}},Ra=nr(function($r,Jr){var Hr,Ir=Gn?Jr.selected:!0;Ir?Hr=Gn?[].concat((0,We.Z)(Ar),[$r]):[$r]:Hr=Ar.filter(function(si){return si.value!==$r}),Kn(Hr),Ii($r,Ir),lt==="combobox"?ci(""):(!Xt||Dn)&&(kn(""),ci(""))}),na=function(Jr,Hr){Kn(Jr);var Ir=Hr.type,si=Hr.values;(Ir==="remove"||Ir==="clear")&&si.forEach(function(ii){Ii(ii.value,!1,Ir)})},va=function(Jr,Hr){if(kn(Jr),ci(null),Hr.source==="submit"){var Ir=(Jr||"").trim();if(Ir){var si=Array.from(new Set([].concat((0,We.Z)(_i),[Ir])));Kn(si),Ii(Ir,!0),kn("")}return}Hr.source!=="blur"&&(lt==="combobox"&&Kn(Jr),_t==null||_t(Jr))},ra=function(Jr){var Hr=Jr;lt!=="tags"&&(Hr=Jr.map(function(si){var ii=qn.get(si);return ii==null?void 0:ii.value}).filter(function(si){return si!==void 0}));var Ir=Array.from(new Set([].concat((0,We.Z)(_i),(0,We.Z)(Hr))));Kn(Ir),Ir.forEach(function(si){Ii(si,!0)})},Si=Oe.useMemo(function(){var $r=Wt!==!1&&Fn!==!1;return(0,ft.Z)((0,ft.Z)({},En),{},{flattenOptions:Nn,onActiveValue:Yi,defaultActiveFirstOption:ta,onSelect:Ra,menuItemSelectedIcon:Zt,rawValues:_i,fieldNames:Rn,virtual:$r,direction:nn,listHeight:Ln,listItemHeight:jn,childrenAsData:sr})},[En,Nn,Yi,ta,Ra,Zt,_i,Rn,Wt,Fn,Ln,jn,sr]);return Oe.createElement(ei.Provider,{value:Si},Oe.createElement(ln,(0,be.Z)({},fr,{id:pr,prefixCls:bt,ref:Be,omitDomProps:sn,mode:lt,displayValues:Hi,onDisplayValuesChange:na,direction:nn,searchValue:tr,onSearch:va,autoClearSearchValue:Dn,onSearchSplit:ra,dropdownMatchSelectWidth:Fn,OptionList:It,emptyOptions:!Nn.length,activeValue:ai,activeDescendantId:"".concat(pr,"_list_").concat(Li)})))}),nt=$n;nt.Option=_r,nt.OptGroup=ar;var _e=nt,Ie=_e},9296:function(wn,qt,ce){"use strict";ce.r(qt),ce.d(qt,{ResizableTextArea:function(){return St},default:function(){return yt}});var be=ce(54476),We=ce(33885),Fe=ce(20068),ft=ce(76190),xe=ce(42978),ke=ce(75931),Te=ce(94480),we=ce(92310),Ee=ce.n(we),Oe=ce(93681),it=ce(5643),Le=ce(18929),ze=ce(59301),st=ce(29301),Qe=ce(34280),at=ce(16089),tt=`
|
|
|
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;
|
|
|
`,pt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Lt={},Ue;function Xe(Ct){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=Ct.getAttribute("id")||Ct.getAttribute("data-reactid")||Ct.getAttribute("name");if(ct&&Lt[Pe])return Lt[Pe];var ye=window.getComputedStyle(Ct),ht=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),Vt=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),Ht=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),Ye=pt.map(function(At){return"".concat(At,":").concat(ye.getPropertyValue(At))}).join(";"),Je={sizingStyle:Ye,paddingSize:Vt,borderSize:Ht,boxSizing:ht};return ct&&Pe&&(Lt[Pe]=Je),Je}function He(Ct){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ue||(Ue=document.createElement("textarea"),Ue.setAttribute("tab-index","-1"),Ue.setAttribute("aria-hidden","true"),document.body.appendChild(Ue)),Ct.getAttribute("wrap")?Ue.setAttribute("wrap",Ct.getAttribute("wrap")):Ue.removeAttribute("wrap");var ht=Xe(Ct,ct),Vt=ht.paddingSize,Ht=ht.borderSize,Ye=ht.boxSizing,Je=ht.sizingStyle;Ue.setAttribute("style","".concat(Je,";").concat(tt)),Ue.value=Ct.value||Ct.placeholder||"";var At=void 0,mn=void 0,Gt,hn=Ue.scrollHeight;if(Ye==="border-box"?hn+=Ht:Ye==="content-box"&&(hn-=Vt),Pe!==null||ye!==null){Ue.value=" ";var jt=Ue.scrollHeight-Vt;Pe!==null&&(At=jt*Pe,Ye==="border-box"&&(At=At+Vt+Ht),hn=Math.max(At,hn)),ye!==null&&(mn=jt*ye,Ye==="border-box"&&(mn=mn+Vt+Ht),Gt=hn>mn?"":"hidden",hn=Math.min(mn,hn))}var Ft={height:hn,overflowY:Gt,resize:"none"};return At&&(Ft.minHeight=At),mn&&(Ft.maxHeight=mn),Ft}var Se=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ke=0,Ze=1,gt=2,je=ze.forwardRef(function(Ct,ct){var Pe=Ct,ye=Pe.prefixCls,ht=Pe.onPressEnter,Vt=Pe.defaultValue,Ht=Pe.value,Ye=Pe.autoSize,Je=Pe.onResize,At=Pe.className,mn=Pe.style,Gt=Pe.disabled,hn=Pe.onChange,jt=Pe.onInternalAutoSize,Ft=(0,ke.Z)(Pe,Se),Kt=(0,Le.Z)(Vt,{value:Ht,postState:function(ar){return ar!=null?ar:""}}),ge=(0,xe.Z)(Kt,2),se=ge[0],oe=ge[1],de=function(ar){oe(ar.target.value),hn==null||hn(ar)},fe=ze.useRef();ze.useImperativeHandle(ct,function(){return{textArea:fe.current}});var le=ze.useMemo(function(){return Ye&&(0,ft.Z)(Ye)==="object"?[Ye.minRows,Ye.maxRows]:[]},[Ye]),$e=(0,xe.Z)(le,2),dt=$e[0],Rt=$e[1],Pt=!!Ye,Ut=function(){try{if(document.activeElement===fe.current){var ar=fe.current,Er=ar.selectionStart,_r=ar.selectionEnd,Jn=ar.scrollTop;fe.current.setSelectionRange(Er,_r),fe.current.scrollTop=Jn}}catch(zr){}},Xt=ze.useState(gt),en=(0,xe.Z)(Xt,2),ln=en[0],Sn=en[1],xt=ze.useState(),an=(0,xe.Z)(xt,2),On=an[0],ut=an[1],wt=function(){Sn(Ke)};(0,Qe.Z)(function(){Pt&&wt()},[Ht,dt,Rt,Pt]),(0,Qe.Z)(function(){if(ln===Ke)Sn(Ze);else if(ln===Ze){var mr=He(fe.current,!1,dt,Rt);Sn(gt),ut(mr)}else Ut()},[ln]);var Nt=ze.useRef(),Pn=function(){at.Z.cancel(Nt.current)},Bn=function(ar){ln===gt&&(Je==null||Je(ar),Ye&&(Pn(),Nt.current=(0,at.Z)(function(){wt()})))};ze.useEffect(function(){return Pn},[]);var Tn=Pt?On:null,nr=(0,We.Z)((0,We.Z)({},mn),Tn);return(ln===Ke||ln===Ze)&&(nr.overflowY="hidden",nr.overflowX="hidden"),ze.createElement(st.Z,{onResize:Bn,disabled:!(Ye||Je)},ze.createElement("textarea",(0,be.Z)({},Ft,{ref:fe,style:nr,className:Ee()(ye,At,(0,Fe.Z)({},"".concat(ye,"-disabled"),Gt)),disabled:Gt,value:se,onChange:de})))}),St=je,ot=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Et(Ct,ct){return(0,Te.Z)(Ct||"").slice(0,ct).join("")}function Ge(Ct,ct,Pe,ye){var ht=Pe;return Ct?ht=Et(Pe,ye):(0,Te.Z)(ct||"").length<Pe.length&&(0,Te.Z)(Pe||"").length>ye&&(ht=ct),ht}var Dt=ze.forwardRef(function(Ct,ct){var Pe,ye=Ct.defaultValue,ht=Ct.value,Vt=Ct.onFocus,Ht=Ct.onBlur,Ye=Ct.onChange,Je=Ct.allowClear,At=Ct.maxLength,mn=Ct.onCompositionStart,Gt=Ct.onCompositionEnd,hn=Ct.suffix,jt=Ct.prefixCls,Ft=jt===void 0?"rc-textarea":jt,Kt=Ct.classes,ge=Ct.showCount,se=Ct.className,oe=Ct.style,de=Ct.disabled,fe=Ct.hidden,le=Ct.classNames,$e=Ct.styles,dt=Ct.onResize,Rt=(0,ke.Z)(Ct,ot),Pt=(0,Le.Z)(ye,{value:ht,defaultValue:ye}),Ut=(0,xe.Z)(Pt,2),Xt=Ut[0],en=Ut[1],ln=(0,ze.useRef)(null),Sn=ze.useState(!1),xt=(0,xe.Z)(Sn,2),an=xt[0],On=xt[1],ut=ze.useState(!1),wt=(0,xe.Z)(ut,2),Nt=wt[0],Pn=wt[1],Bn=ze.useRef(),Tn=ze.useRef(0),nr=ze.useState(null),mr=(0,xe.Z)(nr,2),ar=mr[0],Er=mr[1],_r=function(){var dn;(dn=ln.current)===null||dn===void 0||dn.textArea.focus()};(0,ze.useImperativeHandle)(ct,function(){return{resizableTextArea:ln.current,focus:_r,blur:function(){var dn;(dn=ln.current)===null||dn===void 0||dn.textArea.blur()}}}),(0,ze.useEffect)(function(){On(function(sn){return!de&&sn})},[de]);var Jn=Number(At)>0,zr=function(dn){Pn(!0),Bn.current=Xt,Tn.current=dn.currentTarget.selectionStart,mn==null||mn(dn)},Wr=function(dn){Pn(!1);var $n=dn.currentTarget.value;if(Jn){var nt,_e=Tn.current>=At+1||Tn.current===((nt=Bn.current)===null||nt===void 0?void 0:nt.length);$n=Ge(_e,Bn.current,$n,At)}$n!==Xt&&(en($n),(0,it.rJ)(dn.currentTarget,dn,Ye,$n)),Gt==null||Gt(dn)},Vr=function(dn){var $n=dn.target.value;if(!Nt&&Jn){var nt=dn.target.selectionStart>=At+1||dn.target.selectionStart===$n.length||!dn.target.selectionStart;$n=Ge(nt,Xt,$n,At)}en($n),(0,it.rJ)(dn.currentTarget,dn,Ye,$n)},ei=function(dn){var $n=Rt.onPressEnter,nt=Rt.onKeyDown;dn.key==="Enter"&&$n&&$n(dn),nt==null||nt(dn)},Tr=function(dn){On(!0),Vt==null||Vt(dn)},Yr=function(dn){On(!1),Ht==null||Ht(dn)},xr=function(dn){var $n;en(""),_r(),(0,it.rJ)(($n=ln.current)===null||$n===void 0?void 0:$n.textArea,dn,Ye)},Ur=(0,it.D7)(Xt);!Nt&&Jn&&ht==null&&(Ur=Et(Ur,At));var qr=hn,It;if(ge){var _n=(0,Te.Z)(Ur).length;(0,ft.Z)(ge)==="object"?It=ge.formatter({value:Ur,count:_n,maxLength:At}):It="".concat(_n).concat(Jn?" / ".concat(At):""),qr=ze.createElement(ze.Fragment,null,qr,ze.createElement("span",{className:Ee()("".concat(Ft,"-data-count"),le==null?void 0:le.count),style:$e==null?void 0:$e.count},It))}var yn=function(dn){var $n;dt==null||dt(dn),($n=ln.current)!==null&&$n!==void 0&&$n.textArea.style.height&&Er(!0)},pn=!Rt.autoSize&&!ge&&!Je,xn=ze.createElement(Oe.BaseInput,{value:Ur,allowClear:Je,handleReset:xr,suffix:qr,prefixCls:Ft,classes:{affixWrapper:Ee()(Kt==null?void 0:Kt.affixWrapper,(Pe={},(0,Fe.Z)(Pe,"".concat(Ft,"-show-count"),ge),(0,Fe.Z)(Pe,"".concat(Ft,"-textarea-allow-clear"),Je),Pe))},disabled:de,focused:an,className:se,style:(0,We.Z)((0,We.Z)({},oe),ar&&!pn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof It=="string"?It:void 0}},hidden:fe,inputElement:ze.createElement(St,(0,be.Z)({},Rt,{onKeyDown:ei,onChange:Vr,onFocus:Tr,onBlur:Yr,onCompositionStart:zr,onCompositionEnd:Wr,className:le==null?void 0:le.textarea,style:(0,We.Z)((0,We.Z)({},$e==null?void 0:$e.textarea),{},{resize:oe==null?void 0:oe.resize}),disabled:de,prefixCls:Ft,onResize:yn,ref:ln}))});return xn}),rt=Dt,yt=rt},90782:function(wn,qt,ce){"use strict";ce.d(qt,{S:function(){return Te}});var be=ce(48736),We=ce(67841);function Fe(we,Ee){var Oe=new Set;return we.forEach(function(it){Ee.has(it)||Oe.add(it)}),Oe}function ft(we){var Ee=we||{},Oe=Ee.disabled,it=Ee.disableCheckbox,Le=Ee.checkable;return!!(Oe||it)||Le===!1}function xe(we,Ee,Oe,it){for(var Le=new Set(we),ze=new Set,st=0;st<=Oe;st+=1){var Qe=Ee.get(st)||new Set;Qe.forEach(function(Lt){var Ue=Lt.key,Xe=Lt.node,He=Lt.children,Se=He===void 0?[]:He;Le.has(Ue)&&!it(Xe)&&Se.filter(function(Ke){return!it(Ke.node)}).forEach(function(Ke){Le.add(Ke.key)})})}for(var at=new Set,tt=Oe;tt>=0;tt-=1){var pt=Ee.get(tt)||new Set;pt.forEach(function(Lt){var Ue=Lt.parent,Xe=Lt.node;if(!(it(Xe)||!Lt.parent||at.has(Lt.parent.key))){if(it(Lt.parent.node)){at.add(Ue.key);return}var He=!0,Se=!1;(Ue.children||[]).filter(function(Ke){return!it(Ke.node)}).forEach(function(Ke){var Ze=Ke.key,gt=Le.has(Ze);He&&!gt&&(He=!1),!Se&&(gt||ze.has(Ze))&&(Se=!0)}),He&&Le.add(Ue.key),Se&&ze.add(Ue.key),at.add(Ue.key)}})}return{checkedKeys:Array.from(Le),halfCheckedKeys:Array.from(Fe(ze,Le))}}function ke(we,Ee,Oe,it,Le){for(var ze=new Set(we),st=new Set(Ee),Qe=0;Qe<=it;Qe+=1){var at=Oe.get(Qe)||new Set;at.forEach(function(Ue){var Xe=Ue.key,He=Ue.node,Se=Ue.children,Ke=Se===void 0?[]:Se;!ze.has(Xe)&&!st.has(Xe)&&!Le(He)&&Ke.filter(function(Ze){return!Le(Ze.node)}).forEach(function(Ze){ze.delete(Ze.key)})})}st=new Set;for(var tt=new Set,pt=it;pt>=0;pt-=1){var Lt=Oe.get(pt)||new Set;Lt.forEach(function(Ue){var Xe=Ue.parent,He=Ue.node;if(!(Le(He)||!Ue.parent||tt.has(Ue.parent.key))){if(Le(Ue.parent.node)){tt.add(Xe.key);return}var Se=!0,Ke=!1;(Xe.children||[]).filter(function(Ze){return!Le(Ze.node)}).forEach(function(Ze){var gt=Ze.key,je=ze.has(gt);Se&&!je&&(Se=!1),!Ke&&(je||st.has(gt))&&(Ke=!0)}),Se||ze.delete(Xe.key),Ke&&st.add(Xe.key),tt.add(Xe.key)}})}return{checkedKeys:Array.from(ze),halfCheckedKeys:Array.from(Fe(st,ze))}}function Te(we,Ee,Oe,it){var Le=[],ze;it?ze=it:ze=ft;var st=new Set(we.filter(function(pt){var Lt=!!(0,We.Z)(Oe,pt);return Lt||Le.push(pt),Lt})),Qe=new Map,at=0;Object.keys(Oe).forEach(function(pt){var Lt=Oe[pt],Ue=Lt.level,Xe=Qe.get(Ue);Xe||(Xe=new Set,Qe.set(Ue,Xe)),Xe.add(Lt),at=Math.max(at,Ue)}),(0,be.ZP)(!Le.length,"Tree missing follow keys: ".concat(Le.slice(0,100).map(function(pt){return"'".concat(pt,"'")}).join(", ")));var tt;return Ee===!0?tt=xe(st,Qe,at,ze):tt=ke(st,Ee.halfCheckedKeys,Qe,at,ze),tt}},67841:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return be}});function be(We,Fe){return We[Fe]}},71430:function(wn,qt,ce){"use strict";ce.d(qt,{F:function(){return Ue},H8:function(){return Lt},I8:function(){return pt},km:function(){return Le},oH:function(){return at},w$:function(){return ze},zn:function(){return Qe}});var be=ce(76190),We=ce(94480),Fe=ce(33885),ft=ce(75931),xe=ce(11592),ke=ce(2738),Te=ce(48736),we=ce(67841),Ee=["children"];function Oe(Xe,He){return"".concat(Xe,"-").concat(He)}function it(Xe){return Xe&&Xe.type&&Xe.type.isTreeNode}function Le(Xe,He){return Xe!=null?Xe:He}function ze(Xe){var He=Xe||{},Se=He.title,Ke=He._title,Ze=He.key,gt=He.children,je=Se||"title";return{title:je,_title:Ke||[je],key:Ze||"key",children:gt||"children"}}function st(Xe,He){var Se=new Map;function Ke(Ze){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ze||[]).forEach(function(je){var St=je[He.key],ot=je[He.children];warning(St!=null,"Tree node must have a certain key: [".concat(gt).concat(St,"]"));var Et=String(St);warning(!Se.has(Et)||St===null||St===void 0,"Same 'key' exist in the Tree: ".concat(Et)),Se.set(Et,!0),Ke(ot,"".concat(gt).concat(Et," > "))})}Ke(Xe)}function Qe(Xe){function He(Se){var Ke=(0,xe.Z)(Se);return Ke.map(function(Ze){if(!it(Ze))return(0,Te.ZP)(!Ze,"Tree/TreeNode can only accept TreeNode as children."),null;var gt=Ze.key,je=Ze.props,St=je.children,ot=(0,ft.Z)(je,Ee),Et=(0,Fe.Z)({key:gt},ot),Ge=He(St);return Ge.length&&(Et.children=Ge),Et}).filter(function(Ze){return Ze})}return He(Xe)}function at(Xe,He,Se){var Ke=ze(Se),Ze=Ke._title,gt=Ke.key,je=Ke.children,St=new Set(He===!0?[]:He),ot=[];function Et(Ge){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ge.map(function(rt,yt){for(var Ct=Oe(Dt?Dt.pos:"0",yt),ct=Le(rt[gt],Ct),Pe,ye=0;ye<Ze.length;ye+=1){var ht=Ze[ye];if(rt[ht]!==void 0){Pe=rt[ht];break}}var Vt=(0,Fe.Z)((0,Fe.Z)({},(0,ke.Z)(rt,[].concat((0,We.Z)(Ze),[gt,je]))),{},{title:Pe,key:ct,parent:Dt,pos:Ct,children:null,data:rt,isStart:[].concat((0,We.Z)(Dt?Dt.isStart:[]),[yt===0]),isEnd:[].concat((0,We.Z)(Dt?Dt.isEnd:[]),[yt===Ge.length-1])});return ot.push(Vt),He===!0||St.has(ct)?Vt.children=Et(rt[je]||[],Vt):Vt.children=[],Vt})}return Et(Xe),ot}function tt(Xe,He,Se){var Ke={};(0,be.Z)(Se)==="object"?Ke=Se:Ke={externalGetKey:Se},Ke=Ke||{};var Ze=Ke,gt=Ze.childrenPropName,je=Ze.externalGetKey,St=Ze.fieldNames,ot=ze(St),Et=ot.key,Ge=ot.children,Dt=gt||Ge,rt;je?typeof je=="string"?rt=function(ct){return ct[je]}:typeof je=="function"&&(rt=function(ct){return je(ct)}):rt=function(ct,Pe){return Le(ct[Et],Pe)};function yt(Ct,ct,Pe,ye){var ht=Ct?Ct[Dt]:Xe,Vt=Ct?Oe(Pe.pos,ct):"0",Ht=Ct?[].concat((0,We.Z)(ye),[Ct]):[];if(Ct){var Ye=rt(Ct,Vt),Je={node:Ct,index:ct,pos:Vt,key:Ye,parentPos:Pe.node?Pe.pos:null,level:Pe.level+1,nodes:Ht};He(Je)}ht&&ht.forEach(function(At,mn){yt(At,mn,{node:Ct,pos:Vt,level:Pe?Pe.level+1:-1},Ht)})}yt(null)}function pt(Xe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Se=He.initWrapper,Ke=He.processEntity,Ze=He.onProcessFinished,gt=He.externalGetKey,je=He.childrenPropName,St=He.fieldNames,ot=arguments.length>2?arguments[2]:void 0,Et=gt||ot,Ge={},Dt={},rt={posEntities:Ge,keyEntities:Dt};return Se&&(rt=Se(rt)||rt),tt(Xe,function(yt){var Ct=yt.node,ct=yt.index,Pe=yt.pos,ye=yt.key,ht=yt.parentPos,Vt=yt.level,Ht=yt.nodes,Ye={node:Ct,nodes:Ht,index:ct,key:ye,pos:Pe,level:Vt},Je=Le(ye,Pe);Ge[Pe]=Ye,Dt[Je]=Ye,Ye.parent=Ge[ht],Ye.parent&&(Ye.parent.children=Ye.parent.children||[],Ye.parent.children.push(Ye)),Ke&&Ke(Ye,rt)},{externalGetKey:Et,childrenPropName:je,fieldNames:St}),Ze&&Ze(rt),rt}function Lt(Xe,He){var Se=He.expandedKeys,Ke=He.selectedKeys,Ze=He.loadedKeys,gt=He.loadingKeys,je=He.checkedKeys,St=He.halfCheckedKeys,ot=He.dragOverNodeKey,Et=He.dropPosition,Ge=He.keyEntities,Dt=(0,we.Z)(Ge,Xe),rt={eventKey:Xe,expanded:Se.indexOf(Xe)!==-1,selected:Ke.indexOf(Xe)!==-1,loaded:Ze.indexOf(Xe)!==-1,loading:gt.indexOf(Xe)!==-1,checked:je.indexOf(Xe)!==-1,halfChecked:St.indexOf(Xe)!==-1,pos:String(Dt?Dt.pos:""),dragOver:ot===Xe&&Et===0,dragOverGapTop:ot===Xe&&Et===-1,dragOverGapBottom:ot===Xe&&Et===1};return rt}function Ue(Xe){var He=Xe.data,Se=Xe.expanded,Ke=Xe.selected,Ze=Xe.checked,gt=Xe.loaded,je=Xe.loading,St=Xe.halfChecked,ot=Xe.dragOver,Et=Xe.dragOverGapTop,Ge=Xe.dragOverGapBottom,Dt=Xe.pos,rt=Xe.active,yt=Xe.eventKey,Ct=(0,Fe.Z)((0,Fe.Z)({},He),{},{expanded:Se,selected:Ke,checked:Ze,loaded:gt,loading:je,halfChecked:St,dragOver:ot,dragOverGapTop:Et,dragOverGapBottom:Ge,pos:Dt,active:rt,key:yt});return"props"in Ct||Object.defineProperty(Ct,"props",{get:function(){return(0,Te.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Xe}}),Ct}},48911:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return Kt}});var be=ce(54476),We=ce(76190),Fe=ce(33885),ft=ce(20068),xe=ce(42978),ke=ce(75931),Te=ce(92310),we=ce.n(Te),Ee=ce(29301),Oe=ce(70425),it=ce(34280),Le=ce(59301),ze=ce(4676),st=Le.forwardRef(function(ge,se){var oe=ge.height,de=ge.offsetY,fe=ge.offsetX,le=ge.children,$e=ge.prefixCls,dt=ge.onInnerResize,Rt=ge.innerProps,Pt=ge.rtl,Ut=ge.extra,Xt={},en={display:"flex",flexDirection:"column"};return de!==void 0&&(Xt={height:oe,position:"relative",overflow:"hidden"},en=(0,Fe.Z)((0,Fe.Z)({},en),{},(0,ft.Z)((0,ft.Z)((0,ft.Z)((0,ft.Z)((0,ft.Z)({transform:"translateY(".concat(de,"px)")},Pt?"marginRight":"marginLeft",-fe),"position","absolute"),"left",0),"right",0),"top",0))),Le.createElement("div",{style:Xt},Le.createElement(Ee.Z,{onResize:function(Sn){var xt=Sn.offsetHeight;xt&&dt&&dt()}},Le.createElement("div",(0,be.Z)({style:en,className:we()((0,ft.Z)({},"".concat($e,"-holder-inner"),$e)),ref:se},Rt),le,Ut)))});st.displayName="Filler";var Qe=st;function at(ge){var se=ge.children,oe=ge.setRef,de=Le.useCallback(function(fe){oe(fe)},[]);return Le.cloneElement(se,{ref:de})}function tt(ge,se,oe,de,fe,le,$e,dt){var Rt=dt.getKey;return ge.slice(se,oe+1).map(function(Pt,Ut){var Xt=se+Ut,en=$e(Pt,Xt,{style:{width:de},offsetX:fe}),ln=Rt(Pt);return Le.createElement(at,{key:ln,setRef:function(xt){return le(Pt,xt)}},en)})}function pt(ge,se,oe,de){var fe=oe-ge,le=se-oe,$e=Math.min(fe,le)*2;if(de<=$e){var dt=Math.floor(de/2);return de%2?oe+dt+1:oe-dt}return fe>le?oe-(de-le):oe+(de-fe)}function Lt(ge,se,oe){var de=ge.length,fe=se.length,le,$e;if(de===0&&fe===0)return null;de<fe?(le=ge,$e=se):(le=se,$e=ge);var dt={__EMPTY_ITEM__:!0};function Rt(Sn){return Sn!==void 0?oe(Sn):dt}for(var Pt=null,Ut=Math.abs(de-fe)!==1,Xt=0;Xt<$e.length;Xt+=1){var en=Rt(le[Xt]),ln=Rt($e[Xt]);if(en!==ln){Pt=Xt,Ut=Ut||en!==Rt($e[Xt+1]);break}}return Pt===null?null:{index:Pt,multiple:Ut}}function Ue(ge,se,oe){var de=Le.useState(ge),fe=(0,xe.Z)(de,2),le=fe[0],$e=fe[1],dt=Le.useState(null),Rt=(0,xe.Z)(dt,2),Pt=Rt[0],Ut=Rt[1];return Le.useEffect(function(){var Xt=Lt(le||[],ge||[],se);(Xt==null?void 0:Xt.index)!==void 0&&(oe==null||oe(Xt.index),Ut(ge[Xt.index])),$e(ge)},[ge]),[Pt]}var Xe=ce(16089),He=(typeof navigator=="undefined"?"undefined":(0,We.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Se=He,Ke=function(ge,se,oe,de){var fe=(0,Le.useRef)(!1),le=(0,Le.useRef)(null);function $e(){clearTimeout(le.current),fe.current=!0,le.current=setTimeout(function(){fe.current=!1},50)}var dt=(0,Le.useRef)({top:ge,bottom:se,left:oe,right:de});return dt.current.top=ge,dt.current.bottom=se,dt.current.left=oe,dt.current.right=de,function(Rt,Pt){var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Xt=Rt?Pt<0&&dt.current.left||Pt>0&&dt.current.right:Pt<0&&dt.current.top||Pt>0&&dt.current.bottom;return Ut&&Xt?(clearTimeout(le.current),fe.current=!1):(!Xt||fe.current)&&$e(),!fe.current&&Xt}};function Ze(ge,se,oe,de,fe,le,$e){var dt=(0,Le.useRef)(0),Rt=(0,Le.useRef)(null),Pt=(0,Le.useRef)(null),Ut=(0,Le.useRef)(!1),Xt=Ke(se,oe,de,fe);function en(ut,wt){if(Xe.Z.cancel(Rt.current),!Xt(!1,wt)){var Nt=ut;if(!Nt._virtualHandled)Nt._virtualHandled=!0;else return;dt.current+=wt,Pt.current=wt,Se||Nt.preventDefault(),Rt.current=(0,Xe.Z)(function(){var Pn=Ut.current?10:1;$e(dt.current*Pn,!1),dt.current=0})}}function ln(ut,wt){$e(wt,!0),Se||ut.preventDefault()}var Sn=(0,Le.useRef)(null),xt=(0,Le.useRef)(null);function an(ut){if(ge){Xe.Z.cancel(xt.current),xt.current=(0,Xe.Z)(function(){Sn.current=null},2);var wt=ut.deltaX,Nt=ut.deltaY,Pn=ut.shiftKey,Bn=wt,Tn=Nt;(Sn.current==="sx"||!Sn.current&&Pn&&Nt&&!wt)&&(Bn=Nt,Tn=0,Sn.current="sx");var nr=Math.abs(Bn),mr=Math.abs(Tn);Sn.current===null&&(Sn.current=le&&nr>mr?"x":"y"),Sn.current==="y"?en(ut,Tn):ln(ut,Bn)}}function On(ut){ge&&(Ut.current=ut.detail===Pt.current)}return[an,On]}function gt(ge,se,oe,de){var fe=Le.useMemo(function(){return[new Map,[]]},[ge,oe.id,de]),le=(0,xe.Z)(fe,2),$e=le[0],dt=le[1],Rt=function(Ut){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ut,en=$e.get(Ut),ln=$e.get(Xt);if(en===void 0||ln===void 0)for(var Sn=ge.length,xt=dt.length;xt<Sn;xt+=1){var an,On=ge[xt],ut=se(On);$e.set(ut,xt);var wt=(an=oe.get(ut))!==null&&an!==void 0?an:de;if(dt[xt]=(dt[xt-1]||0)+wt,ut===Ut&&(en=xt),ut===Xt&&(ln=xt),en!==void 0&&ln!==void 0)break}return{top:dt[en-1]||0,bottom:dt[ln]}};return Rt}var je=ce(67732),St=ce(83652),ot=function(){function ge(){(0,je.Z)(this,ge),(0,ft.Z)(this,"maps",void 0),(0,ft.Z)(this,"id",0),(0,ft.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,St.Z)(ge,[{key:"set",value:function(oe,de){this.diffRecords.set(oe,this.maps[oe]),this.maps[oe]=de,this.id+=1}},{key:"get",value:function(oe){return this.maps[oe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ge}(),Et=ot;function Ge(ge){var se=parseFloat(ge);return isNaN(se)?0:se}function Dt(ge,se,oe){var de=Le.useState(0),fe=(0,xe.Z)(de,2),le=fe[0],$e=fe[1],dt=(0,Le.useRef)(new Map),Rt=(0,Le.useRef)(new Et),Pt=(0,Le.useRef)(0);function Ut(){Pt.current+=1}function Xt(){var ln=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ut();var Sn=function(){var On=!1;dt.current.forEach(function(ut,wt){if(ut&&ut.offsetParent){var Nt=ut.offsetHeight,Pn=getComputedStyle(ut),Bn=Pn.marginTop,Tn=Pn.marginBottom,nr=Ge(Bn),mr=Ge(Tn),ar=Nt+nr+mr;Rt.current.get(wt)!==ar&&(Rt.current.set(wt,ar),On=!0)}}),On&&$e(function(ut){return ut+1})};if(ln)Sn();else{Pt.current+=1;var xt=Pt.current;Promise.resolve().then(function(){xt===Pt.current&&Sn()})}}function en(ln,Sn){var xt=ge(ln),an=dt.current.get(xt);Sn?(dt.current.set(xt,Sn),Xt()):dt.current.delete(xt),!an!=!Sn&&(Sn?se==null||se(ln):oe==null||oe(ln))}return(0,Le.useEffect)(function(){return Ut},[]),[en,Xt,Rt.current,le]}var rt=14/15;function yt(ge,se,oe){var de=(0,Le.useRef)(!1),fe=(0,Le.useRef)(0),le=(0,Le.useRef)(0),$e=(0,Le.useRef)(null),dt=(0,Le.useRef)(null),Rt,Pt=function(ln){if(de.current){var Sn=Math.ceil(ln.touches[0].pageX),xt=Math.ceil(ln.touches[0].pageY),an=fe.current-Sn,On=le.current-xt,ut=Math.abs(an)>Math.abs(On);ut?fe.current=Sn:le.current=xt;var wt=oe(ut,ut?an:On,!1,ln);wt&&ln.preventDefault(),clearInterval(dt.current),wt&&(dt.current=setInterval(function(){ut?an*=rt:On*=rt;var Nt=Math.floor(ut?an:On);(!oe(ut,Nt,!0)||Math.abs(Nt)<=.1)&&clearInterval(dt.current)},16))}},Ut=function(){de.current=!1,Rt()},Xt=function(ln){Rt(),ln.touches.length===1&&!de.current&&(de.current=!0,fe.current=Math.ceil(ln.touches[0].pageX),le.current=Math.ceil(ln.touches[0].pageY),$e.current=ln.target,$e.current.addEventListener("touchmove",Pt,{passive:!1}),$e.current.addEventListener("touchend",Ut,{passive:!0}))};Rt=function(){$e.current&&($e.current.removeEventListener("touchmove",Pt),$e.current.removeEventListener("touchend",Ut))},(0,it.Z)(function(){return ge&&se.current.addEventListener("touchstart",Xt,{passive:!0}),function(){var en;(en=se.current)===null||en===void 0||en.removeEventListener("touchstart",Xt),Rt(),clearInterval(dt.current)}},[ge])}function Ct(ge){return Math.floor(Math.pow(ge,.5))}function ct(ge,se){var oe="touches"in ge?ge.touches[0]:ge;return oe[se?"pageX":"pageY"]-window[se?"scrollX":"scrollY"]}function Pe(ge,se,oe){Le.useEffect(function(){var de=se.current;if(ge&&de){var fe=!1,le,$e,dt=function(){Xe.Z.cancel(le)},Rt=function en(){dt(),le=(0,Xe.Z)(function(){oe($e),en()})},Pt=function(){fe=!1,dt()},Ut=function(ln){if(!(ln.target.draggable||ln.button!==0)){var Sn=ln;Sn._virtualHandled||(Sn._virtualHandled=!0,fe=!0)}},Xt=function(ln){if(fe){var Sn=ct(ln,!1),xt=de.getBoundingClientRect(),an=xt.top,On=xt.bottom;if(Sn<=an){var ut=an-Sn;$e=-Ct(ut),Rt()}else if(Sn>=On){var wt=Sn-On;$e=Ct(wt),Rt()}else dt()}};return de.addEventListener("mousedown",Ut),de.ownerDocument.addEventListener("mouseup",Pt),de.ownerDocument.addEventListener("mousemove",Xt),de.ownerDocument.addEventListener("dragend",Pt),function(){de.removeEventListener("mousedown",Ut),de.ownerDocument.removeEventListener("mouseup",Pt),de.ownerDocument.removeEventListener("mousemove",Xt),de.ownerDocument.removeEventListener("dragend",Pt),dt()}}},[ge])}var ye=10;function ht(ge,se,oe,de,fe,le,$e,dt){var Rt=Le.useRef(),Pt=Le.useState(null),Ut=(0,xe.Z)(Pt,2),Xt=Ut[0],en=Ut[1];return(0,it.Z)(function(){if(Xt&&Xt.times<ye){if(!ge.current){en(function(Yr){return(0,Fe.Z)({},Yr)});return}le();var ln=Xt.targetAlign,Sn=Xt.originAlign,xt=Xt.index,an=Xt.offset,On=ge.current.clientHeight,ut=!1,wt=ln,Nt=null;if(On){for(var Pn=ln||Sn,Bn=0,Tn=0,nr=0,mr=Math.min(se.length-1,xt),ar=0;ar<=mr;ar+=1){var Er=fe(se[ar]);Tn=Bn;var _r=oe.get(Er);nr=Tn+(_r===void 0?de:_r),Bn=nr}for(var Jn=Pn==="top"?an:On-an,zr=mr;zr>=0;zr-=1){var Wr=fe(se[zr]),Vr=oe.get(Wr);if(Vr===void 0){ut=!0;break}if(Jn-=Vr,Jn<=0)break}switch(Pn){case"top":Nt=Tn-an;break;case"bottom":Nt=nr-On+an;break;default:{var ei=ge.current.scrollTop,Tr=ei+On;Tn<ei?wt="top":nr>Tr&&(wt="bottom")}}Nt!==null&&$e(Nt),Nt!==Xt.lastTop&&(ut=!0)}ut&&en((0,Fe.Z)((0,Fe.Z)({},Xt),{},{times:Xt.times+1,targetAlign:wt,lastTop:Nt}))}},[Xt,ge.current]),function(ln){if(ln==null){dt();return}if(Xe.Z.cancel(Rt.current),typeof ln=="number")$e(ln);else if(ln&&(0,We.Z)(ln)==="object"){var Sn,xt=ln.align;"index"in ln?Sn=ln.index:Sn=se.findIndex(function(ut){return fe(ut)===ln.key});var an=ln.offset,On=an===void 0?0:an;en({times:0,index:Sn,offset:On,originAlign:xt})}}}var Vt=Le.forwardRef(function(ge,se){var oe=ge.prefixCls,de=ge.rtl,fe=ge.scrollOffset,le=ge.scrollRange,$e=ge.onStartMove,dt=ge.onStopMove,Rt=ge.onScroll,Pt=ge.horizontal,Ut=ge.spinSize,Xt=ge.containerSize,en=ge.style,ln=ge.thumbStyle,Sn=ge.showScrollBar,xt=Le.useState(!1),an=(0,xe.Z)(xt,2),On=an[0],ut=an[1],wt=Le.useState(null),Nt=(0,xe.Z)(wt,2),Pn=Nt[0],Bn=Nt[1],Tn=Le.useState(null),nr=(0,xe.Z)(Tn,2),mr=nr[0],ar=nr[1],Er=!de,_r=Le.useRef(),Jn=Le.useRef(),zr=Le.useState(Sn),Wr=(0,xe.Z)(zr,2),Vr=Wr[0],ei=Wr[1],Tr=Le.useRef(),Yr=function(){Sn===!0||Sn===!1||(clearTimeout(Tr.current),ei(!0),Tr.current=setTimeout(function(){ei(!1)},3e3))},xr=le-Xt||0,Ur=Xt-Ut||0,qr=Le.useMemo(function(){if(fe===0||xr===0)return 0;var nt=fe/xr;return nt*Ur},[fe,xr,Ur]),It=function(_e){_e.stopPropagation(),_e.preventDefault()},_n=Le.useRef({top:qr,dragging:On,pageY:Pn,startTop:mr});_n.current={top:qr,dragging:On,pageY:Pn,startTop:mr};var yn=function(_e){ut(!0),Bn(ct(_e,Pt)),ar(_n.current.top),$e(),_e.stopPropagation(),_e.preventDefault()};Le.useEffect(function(){var nt=function(Be){Be.preventDefault()},_e=_r.current,Ie=Jn.current;return _e.addEventListener("touchstart",nt,{passive:!1}),Ie.addEventListener("touchstart",yn,{passive:!1}),function(){_e.removeEventListener("touchstart",nt),Ie.removeEventListener("touchstart",yn)}},[]);var pn=Le.useRef();pn.current=xr;var xn=Le.useRef();xn.current=Ur,Le.useEffect(function(){if(On){var nt,_e=function(Be){var Ve=_n.current,lt=Ve.dragging,Bt=Ve.pageY,bt=Ve.startTop;Xe.Z.cancel(nt);var zt=_r.current.getBoundingClientRect(),tn=Xt/(Pt?zt.width:zt.height);if(lt){var cn=(ct(Be,Pt)-Bt)*tn,on=bt;!Er&&Pt?on-=cn:on+=cn;var _t=pn.current,Yt=xn.current,Dn=Yt?on/Yt:0,Cn=Math.ceil(Dn*_t);Cn=Math.max(Cn,0),Cn=Math.min(Cn,_t),nt=(0,Xe.Z)(function(){Rt(Cn,Pt)})}},Ie=function(){ut(!1),dt()};return window.addEventListener("mousemove",_e,{passive:!0}),window.addEventListener("touchmove",_e,{passive:!0}),window.addEventListener("mouseup",Ie,{passive:!0}),window.addEventListener("touchend",Ie,{passive:!0}),function(){window.removeEventListener("mousemove",_e),window.removeEventListener("touchmove",_e),window.removeEventListener("mouseup",Ie),window.removeEventListener("touchend",Ie),Xe.Z.cancel(nt)}}},[On]),Le.useEffect(function(){return Yr(),function(){clearTimeout(Tr.current)}},[fe]),Le.useImperativeHandle(se,function(){return{delayHidden:Yr}});var sn="".concat(oe,"-scrollbar"),dn={position:"absolute",visibility:Vr?null:"hidden"},$n={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Pt?(Object.assign(dn,{height:8,left:0,right:0,bottom:0}),Object.assign($n,(0,ft.Z)({height:"100%",width:Ut},Er?"left":"right",qr))):(Object.assign(dn,(0,ft.Z)({width:8,top:0,bottom:0},Er?"right":"left",0)),Object.assign($n,{width:"100%",height:Ut,top:qr})),Le.createElement("div",{ref:_r,className:we()(sn,(0,ft.Z)((0,ft.Z)((0,ft.Z)({},"".concat(sn,"-horizontal"),Pt),"".concat(sn,"-vertical"),!Pt),"".concat(sn,"-visible"),Vr)),style:(0,Fe.Z)((0,Fe.Z)({},dn),en),onMouseDown:It,onMouseMove:Yr},Le.createElement("div",{ref:Jn,className:we()("".concat(sn,"-thumb"),(0,ft.Z)({},"".concat(sn,"-thumb-moving"),On)),style:(0,Fe.Z)((0,Fe.Z)({},$n),ln),onMouseDown:yn}))}),Ht=Vt,Ye=20;function Je(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,oe=ge/se*ge;return isNaN(oe)&&(oe=0),oe=Math.max(oe,Ye),Math.floor(oe)}var At=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],mn=[],Gt={overflowY:"auto",overflowAnchor:"none"};function hn(ge,se){var oe=ge.prefixCls,de=oe===void 0?"rc-virtual-list":oe,fe=ge.className,le=ge.height,$e=ge.itemHeight,dt=ge.fullHeight,Rt=dt===void 0?!0:dt,Pt=ge.style,Ut=ge.data,Xt=ge.children,en=ge.itemKey,ln=ge.virtual,Sn=ge.direction,xt=ge.scrollWidth,an=ge.component,On=an===void 0?"div":an,ut=ge.onScroll,wt=ge.onVirtualScroll,Nt=ge.onVisibleChange,Pn=ge.innerProps,Bn=ge.extraRender,Tn=ge.styles,nr=ge.showScrollBar,mr=nr===void 0?"optional":nr,ar=(0,ke.Z)(ge,At),Er=Le.useCallback(function(ir){return typeof en=="function"?en(ir):ir==null?void 0:ir[en]},[en]),_r=Dt(Er,null,null),Jn=(0,xe.Z)(_r,4),zr=Jn[0],Wr=Jn[1],Vr=Jn[2],ei=Jn[3],Tr=!!(ln!==!1&&le&&$e),Yr=Le.useMemo(function(){return Object.values(Vr.maps).reduce(function(ir,lr){return ir+lr},0)},[Vr.id,Vr.maps]),xr=Tr&&Ut&&(Math.max($e*Ut.length,Yr)>le||!!xt),Ur=Sn==="rtl",qr=we()(de,(0,ft.Z)({},"".concat(de,"-rtl"),Ur),fe),It=Ut||mn,_n=(0,Le.useRef)(),yn=(0,Le.useRef)(),pn=(0,Le.useRef)(),xn=(0,Le.useState)(0),sn=(0,xe.Z)(xn,2),dn=sn[0],$n=sn[1],nt=(0,Le.useState)(0),_e=(0,xe.Z)(nt,2),Ie=_e[0],Ae=_e[1],Be=(0,Le.useState)(!1),Ve=(0,xe.Z)(Be,2),lt=Ve[0],Bt=Ve[1],bt=function(){Bt(!0)},zt=function(){Bt(!1)},tn={getKey:Er};function cn(ir){$n(function(lr){var Dr;typeof ir=="function"?Dr=ir(lr):Dr=ir;var Ar=jn(Dr);return _n.current.scrollTop=Ar,Ar})}var on=(0,Le.useRef)({start:0,end:It.length}),_t=(0,Le.useRef)(),Yt=Ue(It,Er),Dn=(0,xe.Z)(Yt,1),Cn=Dn[0];_t.current=Cn;var gn=Le.useMemo(function(){if(!Tr)return{scrollHeight:void 0,start:0,end:It.length-1,offset:void 0};if(!xr){var ir;return{scrollHeight:((ir=yn.current)===null||ir===void 0?void 0:ir.offsetHeight)||0,start:0,end:It.length-1,offset:void 0}}for(var lr=0,Dr,Ar,ui,Hi=It.length,_i=0;_i<Hi;_i+=1){var Qr=It[_i],bi=Er(Qr),mi=Vr.get(bi),Yn=lr+(mi===void 0?$e:mi);Yn>=dn&&Dr===void 0&&(Dr=_i,Ar=lr),Yn>dn+le&&ui===void 0&&(ui=_i),lr=Yn}return Dr===void 0&&(Dr=0,Ar=0,ui=Math.ceil(le/$e)),ui===void 0&&(ui=It.length-1),ui=Math.min(ui+1,It.length-1),{scrollHeight:lr,start:Dr,end:ui,offset:Ar}},[xr,Tr,dn,It,ei,le]),Mn=gn.scrollHeight,Fn=gn.start,un=gn.end,Zn=gn.offset;on.current.start=Fn,on.current.end=un,Le.useLayoutEffect(function(){var ir=Vr.getRecord();if(ir.size===1){var lr=Array.from(ir.keys())[0],Dr=ir.get(lr),Ar=It[Fn];if(Ar&&Dr===void 0){var ui=Er(Ar);if(ui===lr){var Hi=Vr.get(lr),_i=Hi-$e;cn(function(Qr){return Qr+_i})}}}Vr.resetRecord()},[Mn]);var et=Le.useState({width:0,height:le}),Tt=(0,xe.Z)(et,2),$t=Tt[0],Jt=Tt[1],Ot=function(lr){Jt({width:lr.offsetWidth,height:lr.offsetHeight})},Zt=(0,Le.useRef)(),Wt=(0,Le.useRef)(),nn=Le.useMemo(function(){return Je($t.width,xt)},[$t.width,xt]),bn=Le.useMemo(function(){return Je($t.height,Mn)},[$t.height,Mn]),Ln=Mn-le,Hn=(0,Le.useRef)(Ln);Hn.current=Ln;function jn(ir){var lr=ir;return Number.isNaN(Hn.current)||(lr=Math.min(lr,Hn.current)),lr=Math.max(lr,0),lr}var rr=dn<=0,cr=dn>=Ln,er=Ie<=0,vr=Ie>=xt,fr=Ke(rr,cr,er,vr),pr=function(){return{x:Ur?-Ie:Ie,y:dn}},Gn=(0,Le.useRef)(pr()),sr=(0,Oe.useEvent)(function(ir){if(wt){var lr=(0,Fe.Z)((0,Fe.Z)({},pr()),ir);(Gn.current.x!==lr.x||Gn.current.y!==lr.y)&&(wt(lr),Gn.current=lr)}});function Xn(ir,lr){var Dr=ir;lr?((0,ze.flushSync)(function(){Ae(Dr)}),sr()):cn(Dr)}function Rn(ir){var lr=ir.currentTarget.scrollTop;lr!==dn&&cn(lr),ut==null||ut(ir),sr()}var gr=function(lr){var Dr=lr,Ar=xt?xt-$t.width:0;return Dr=Math.max(Dr,0),Dr=Math.min(Dr,Ar),Dr},kr=(0,Oe.useEvent)(function(ir,lr){lr?((0,ze.flushSync)(function(){Ae(function(Dr){var Ar=Dr+(Ur?-ir:ir);return gr(Ar)})}),sr()):cn(function(Dr){var Ar=Dr+ir;return Ar})}),tr=Ze(Tr,rr,cr,er,vr,!!xt,kr),kn=(0,xe.Z)(tr,2),En=kn[0],dr=kn[1];yt(Tr,_n,function(ir,lr,Dr,Ar){var ui=Ar;return fr(ir,lr,Dr)?!1:!ui||!ui._virtualHandled?(ui&&(ui._virtualHandled=!0),En({preventDefault:function(){},deltaX:ir?lr:0,deltaY:ir?0:lr}),!0):!1}),Pe(xr,_n,function(ir){cn(function(lr){return lr+ir})}),(0,it.Z)(function(){function ir(Dr){var Ar=rr&&Dr.detail<0,ui=cr&&Dr.detail>0;Tr&&!Ar&&!ui&&Dr.preventDefault()}var lr=_n.current;return lr.addEventListener("wheel",En,{passive:!1}),lr.addEventListener("DOMMouseScroll",dr,{passive:!0}),lr.addEventListener("MozMousePixelScroll",ir,{passive:!1}),function(){lr.removeEventListener("wheel",En),lr.removeEventListener("DOMMouseScroll",dr),lr.removeEventListener("MozMousePixelScroll",ir)}},[Tr,rr,cr]),(0,it.Z)(function(){if(xt){var ir=gr(Ie);Ae(ir),sr({x:ir})}},[$t.width,xt]);var qn=function(){var lr,Dr;(lr=Zt.current)===null||lr===void 0||lr.delayHidden(),(Dr=Wt.current)===null||Dr===void 0||Dr.delayHidden()},wr=ht(_n,It,Vr,$e,Er,function(){return Wr(!0)},cn,qn);Le.useImperativeHandle(se,function(){return{nativeElement:pn.current,getScrollInfo:pr,scrollTo:function(lr){function Dr(Ar){return Ar&&(0,We.Z)(Ar)==="object"&&("left"in Ar||"top"in Ar)}Dr(lr)?(lr.left!==void 0&&Ae(gr(lr.left)),wr(lr.top)):wr(lr)}}}),(0,it.Z)(function(){if(Nt){var ir=It.slice(Fn,un+1);Nt(ir,It)}},[Fn,un,It]);var Lr=gt(It,Er,Vr,$e),Cr=Bn==null?void 0:Bn({start:Fn,end:un,virtual:xr,offsetX:Ie,offsetY:Zn,rtl:Ur,getSize:Lr}),Zr=tt(It,Fn,un,xt,Ie,zr,Xt,tn),Or=null;le&&(Or=(0,Fe.Z)((0,ft.Z)({},Rt?"height":"maxHeight",le),Gt),Tr&&(Or.overflowY="hidden",xt&&(Or.overflowX="hidden"),lt&&(Or.pointerEvents="none")));var ni={};return Ur&&(ni.dir="rtl"),Le.createElement("div",(0,be.Z)({ref:pn,style:(0,Fe.Z)((0,Fe.Z)({},Pt),{},{position:"relative"}),className:qr},ni,ar),Le.createElement(Ee.Z,{onResize:Ot},Le.createElement(On,{className:"".concat(de,"-holder"),style:Or,ref:_n,onScroll:Rn,onMouseEnter:qn},Le.createElement(Qe,{prefixCls:de,height:Mn,offsetX:Ie,offsetY:Zn,scrollWidth:xt,onInnerResize:Wr,ref:yn,innerProps:Pn,rtl:Ur,extra:Cr},Zr))),xr&&Mn>le&&Le.createElement(Ht,{ref:Zt,prefixCls:de,scrollOffset:dn,scrollRange:Mn,rtl:Ur,onScroll:Xn,onStartMove:bt,onStopMove:zt,spinSize:bn,containerSize:$t.height,style:Tn==null?void 0:Tn.verticalScrollBar,thumbStyle:Tn==null?void 0:Tn.verticalScrollBarThumb,showScrollBar:mr}),xr&&xt>$t.width&&Le.createElement(Ht,{ref:Wt,prefixCls:de,scrollOffset:Ie,scrollRange:xt,rtl:Ur,onScroll:Xn,onStartMove:bt,onStopMove:zt,spinSize:nn,containerSize:$t.width,horizontal:!0,style:Tn==null?void 0:Tn.horizontalScrollBar,thumbStyle:Tn==null?void 0:Tn.horizontalScrollBarThumb,showScrollBar:mr}))}var jt=Le.forwardRef(hn);jt.displayName="List";var Ft=jt,Kt=Ft},48136:function(wn,qt,ce){"use strict";var be=Object.defineProperty,We=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Te=(a,b,y)=>b in a?be(a,b,{enumerable:!0,configurable:!0,writable:!0,value:y}):a[b]=y,we=(a,b)=>{for(var y in b||(b={}))xe.call(b,y)&&Te(a,y,b[y]);if(ft)for(var y of ft(b))ke.call(b,y)&&Te(a,y,b[y]);return a},Ee=(a,b)=>We(a,Fe(b)),Oe=a=>typeof a=="symbol"?a:a+"",it=(a,b)=>{var y={};for(var E in a)xe.call(a,E)&&b.indexOf(E)<0&&(y[E]=a[E]);if(a!=null&&ft)for(var E of ft(a))b.indexOf(E)<0&&ke.call(a,E)&&(y[E]=a[E]);return y};function Le(a){return Array.isArray(a)}var ze={en:{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.cut to clipboard":"\u526A\u5207\u5230\u526A\u8D34\u677F","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.paste from clipboard":"\u7C98\u8D34","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"}};function st(){return"window"in globalThis&&"document"in globalThis}function Qe(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function at(){return typeof navigator.vibrate=="function"}function tt(){var a,b;if(!st())return"other";const y=(b=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?b:navigator.platform;return/^mac/i.test(y)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(y)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function pt(){if(!st())return!0;if(/firefox/i.test(navigator.userAgent)){const a=navigator.userAgent.match(/firefox\/(\d+)/i);return a?parseInt(a[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const a=navigator.userAgent.match(/edg\/(\d+)/i);return a?parseInt(a[1])>=79:!1}return!0}function Lt(){return HTMLElement.prototype.hasOwnProperty("popover")}var Ue={strings:ze,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Ue._locale||(Ue._locale=st()?navigator.language.slice(0,5):"en-US"),Ue._locale},set locale(a){Ue._locale=a,Ue._numberFormatter=void 0,Ue.dirty=!0},get numberFormatter(){return Ue._numberFormatter||(Ue._numberFormatter=new Intl.NumberFormat(Ue.locale)),Ue._numberFormatter},merge(a,b){if(typeof a=="string"&&b)Ue.strings[a]=we(we({},Ue.strings[a]),b),Ue.dirty=!0;else for(const y of Object.keys(a))Ue.merge(y,a[y])},get dirty(){return Ue._dirty},set dirty(a){Ue._dirty||Ue._dirty===a||(Ue._dirty=!0,setTimeout(()=>{Ue._dirty=!1,this._subscribers.forEach(b=>b==null?void 0:b())},0))},subscribe(a){return Ue._subscribers.push(a),Ue._subscribers.length-1},unsubscribe(a){a<0||a>=Ue._subscribers.length||(Ue._subscribers[a]=void 0)},update(a){let b=a.querySelectorAll("[data-l10n-tooltip]");for(const y of b){const E=y.getAttribute("data-l10n-tooltip");if(E){const ee=Xe(E);ee&&y.setAttribute("data-tooltip",ee)}}b=a.querySelectorAll("[data-l10n-arial-label]");for(const y of b){const E=y.getAttribute("data-l10n-arial-label");if(E){const ee=Xe(E);ee&&y.setAttribute("aria-label",ee)}}}};function Xe(a,...b){if(a===void 0)return;let y="";const E=Ue.locale;Ue.strings[E]&&(y=Ue.strings[E][a]);const ee=E.slice(0,2);if(!y&&Ue.strings[ee]&&(y=Ue.strings[ee][a]),y||(y=Ue.strings.en[a]),!y)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(y),he=0;for(;ae;){if(b[he++]){const ve=ae[2]?parseInt(ae[2],10)-1:he-1;let Ce=b[ve];typeof Ce=="number"&&(Ce=Ue.numberFormatter.format(Ce)),y=y.replace(ae[1],Ce)}ae=re.exec(y)}return y=y.replace(/%%/g,"%"),y}var He={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},Se={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Ke={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},Ze={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},gt={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},je={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function St(a){var b,y,E,ee,re,ae;const he=a.split("!");let pe,ve,Ce,Ne=255,qe=255,vt=255,Mt=-1;const vn=he.length>0&&he[0].startsWith("-");vn&&(he[0]=he[0].slice(1));for(let or=0;or<he.length;or++){pe=Ne,ve=qe,Ce=vt;const fn=(b=he[or].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:b[1],zn=fn==null?void 0:fn.toLowerCase(),hr=fn&&(ae=(re=(ee=(E=(y=Ze[zn])!=null?y:Ze[gt[fn]])!=null?E:Se[fn])!=null?ee:je[fn])!=null?re:He[fn])!=null?ae:he[or].trim();let Wn=hr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Wn!=null&&Wn[1]&&Wn[2]&&Wn[3])Ne=Math.max(0,Math.min(255,Number.parseInt(Wn[1],16))),qe=Math.max(0,Math.min(255,Number.parseInt(Wn[2],16))),vt=Math.max(0,Math.min(255,Number.parseInt(Wn[3],16)));else if(Wn=hr.match(/^#([\da-f]{3})$/i),Wn!=null&&Wn[1]){const Rr=Number.parseInt(Wn[1][0],16),jr=Number.parseInt(Wn[1][1],16),Kr=Number.parseInt(Wn[1][2],16);Ne=Math.max(0,Math.min(255,Rr*16+Rr)),qe=Math.max(0,Math.min(255,jr*16+jr)),vt=Math.max(0,Math.min(255,Kr*16+Kr))}else if(Wn=hr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Wn!=null&&Wn[1]&&Wn[2]&&Wn[3])Ne=Math.max(0,Math.min(255,Number.parseInt(Wn[1]))),qe=Math.max(0,Math.min(255,Number.parseInt(Wn[2]))),vt=Math.max(0,Math.min(255,Number.parseInt(Wn[3])));else return;Mt>=0&&(Ne=(1-Mt)*Ne+Mt*pe,qe=(1-Mt)*qe+Mt*ve,vt=(1-Mt)*vt+Mt*Ce,Mt=-1),or+1<he.length&&(Mt=Math.max(0,Math.min(100,Number.parseInt(he[++or])))/100)}return Mt>=0&&(Ne=Mt*Ne+(1-Mt)*pe,qe=Mt*qe+(1-Mt)*ve,vt=Mt*vt+(1-Mt)*Ce),vn&&(Ne=255-Ne,qe=255-qe,vt=255-vt),"#"+("00"+Math.round(Ne).toString(16)).slice(-2)+("00"+Math.round(qe).toString(16)).slice(-2)+("00"+Math.round(vt).toString(16)).slice(-2)}function ot(a){var b,y;return a=a.trim(),(y=(b=Ke[a.toLowerCase()])!=null?b:Ke[gt[a]])!=null?y:St(a)}function Et(a){if(!a||a[0]!=="#")return;a=a.slice(1);let b;return a.length<=4?(b={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(b.a=parseInt(a[3]+a[3],16)/255)):(b={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(b.a=parseInt(a[6]+a[7],16)/255)),b&&b.a===void 0&&(b.a=1),b}function Ge(a,b,y){return y<0&&(y+=6),y>=6&&(y-=6),y<1?(b-a)*y+a:y<3?b:y<4?(b-a)*(4-y)+a:a}function Dt(a){let[b,y,E]=[a.h,a.s,a.l];b=(b+360)%360/60,E=Math.max(0,Math.min(E,1)),y=Math.max(0,Math.min(y,1));const ee=E<=.5?E*(y+1):E+y-E*y,re=E*2-ee;return{r:Math.round(255*Ge(re,ee,b+2)),g:Math.round(255*Ge(re,ee,b)),b:Math.round(255*Ge(re,ee,b-2))}}function rt(a){return a<0?0:a>255?255:Math.round(a)}function yt(a){const{r:b,g:y,b:E}=a;let ee=((1<<24)+(rt(b)<<16)+(rt(y)<<8)+rt(E)).toString(16).slice(1);return ee[0]===ee[1]&&ee[2]===ee[3]&&ee[4]===ee[5]&&ee[6]===ee[7]&&(ee=ee[0]+ee[2]+ee[4]),"#"+ee}function Ct(a){let{r:b,g:y,b:E}=a;b=b/255,y=y/255,E=E/255;const ee=Math.min(b,y,E),re=Math.max(b,y,E),ae=re-ee;let he,pe;re===ee?he=0:b===re?he=(y-E)/ae:y===re?he=2+(E-b)/ae:E===re&&(he=4+(b-y)/ae),he=Math.min(he*60,360),he<0&&(he+=360);const ve=(ee+re)/2;return re===ee?pe=0:ve<=.5?pe=ae/(re+ee):pe=ae/(2-re-ee),{h:he,s:pe,l:ve}}function ct(a){let b=Et(a);if(!b)return a;let{h:y,s:E,l:ee}=Ct(b);return E+=.1,ee-=.1,yt(Dt({h:y,s:E,l:ee}))}var Pe={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},ye={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},ht=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Vt(a,b,y){if(!/[A-Za-z\d]/.test(a)||(y==="up"&&(y=void 0),!b&&!y))return a;const E=a.codePointAt(0);if(E===void 0)return a;for(const ee of ht)if((!b||ee.variant===b)&&(!y||ee.style===y)&&E>=ee.offset&&E<ee.offset+ee.len){const re=ee.start+E-ee.offset;return String.fromCodePoint(ye[re]||re)}return a}function Ht(a){var b;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const y in ye)if(ye[y]===a){a=(b=y.codePointAt(0))!=null?b:0;break}for(const y of ht)if(a>=y.start&&a<y.start+y.len)return{char:String.fromCodePoint(a-y.start+y.offset),variant:y.variant,style:y.style};return{char:String.fromCodePoint(a)}}function Ye(a){var b;let y="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){y+=E;continue}const ee=(b=E.codePointAt(0))!=null?b:0;let re=Pe[ee];if(re)re.startsWith("\\")?y+=re+" ":y+=re;else{const{char:ae,variant:he,style:pe}=Ht(ee);switch(re=ae,he){case"double-struck":re=`\\mathbb{${re}}`;break;case"fraktur":re=`\\mathfrak{${re}}`;break;case"script":re=`\\mathscr{${re}}`;break;case"sans-serif":re=`\\mathsf{${re}}`;break;case"monospace":re=`\\mathtt{${re}}`;break;case"calligraphic":re=`\\mathcal{${re}}`;break}switch(pe){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}y+=re}}return y}function Je(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var At={},mn=we({},Pe),Gt={},hn={},jt={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},Ft={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},Kt={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},ge={iff:{primitive:!0,captureSelection:!0,def:"\\;\u27FA\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2237\\char"3D}}',coloneq:'{\\mathop{\\char"3A\\char"2212}}',Coloneq:'{\\mathop{\\char"2237\\char"2212}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2239}}',Eqcolon:'{\\mathop{\\char"2212\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:Kt},"amsmath.sty":{package:Ft,primitive:!0},"texvc.sty":{package:jt,primitive:!1}},se={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},oe=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,de,fe;pt()?(de=new RegExp("\\p{Letter}","u"),fe=new RegExp("[0-9\\p{Letter}]","u")):(de=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,fe=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function le(a,b,y="mord",E){b!==void 0&&(At[a]={definitionType:"symbol",type:y,variant:E,codepoint:b},mn[b]||(mn[b]=a))}function $e(a,b,y){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);le(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)le(E,ee,re!=null?re:b,ae!=null?ae:y)}function dt(a,b){for(let y=a;y<=b;y++)le(String.fromCodePoint(y),y)}function Rt(a){var b;return(b=hn[a])!=null?b:null}function Pt(a,b){var y,E;if(b.length===0||b==="\\"||!b.startsWith("\\"))return[];const ee=[];for(const ae in Gt)ae.startsWith(b)&&!Gt[ae].infix&&ee.push({match:ae,frequency:(y=Gt[ae].frequency)!=null?y:0});for(const ae in At)ae.startsWith(b)&&ee.push({match:ae,frequency:(E=At[ae].frequency)!=null?E:0});const re=b.substring(1);for(const ae of Object.keys(a.options.macros))ae.startsWith(re)&&ee.push({match:"\\"+ae,frequency:0});return ee.sort((ae,he)=>{var pe,ve;return ae.frequency===he.frequency?ae.match.length===he.match.length?ae.match<he.match?-1:1:ae.match.length-he.match.length:((pe=he.frequency)!=null?pe:0)-((ve=ae.frequency)!=null?ve:0)}),ee.map(ae=>ae.match)}function Ut(a){let b="auto";const y=a.match(/:([^=]+)/);return y&&(b=y[1].trim()),b}function Xt(a){if(!a)return[];const b=[];let y=a.split("]");if(y[0].startsWith("[")){b.push({isOptional:!0,type:Ut(y[0].slice(1))});for(let E=1;E<=y.length;E++)b.push(...Xt(y[E]))}else if(y=a.split("}"),y[0].startsWith("{")){b.push({isOptional:!1,type:Ut(y[0].slice(1))});for(let E=1;E<=y.length;E++)b.push(...Xt(y[E]))}return b}function en(a){if(!a)return"";let b="",y=!0;for(const E of a)typeof E.value=="string"?b+=E.value:y=!1;return y?b:""}function ln(a,b){typeof a=="string"&&(a=[a]);const y={tabular:!1,params:[],createAtom:b};for(const E of a)hn[E]=y}function Sn(a,b,y){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:Xt(b),createAtom:y};for(const re of a)hn[re]=ee}function xt(a,b,y){var E,ee;y||(y={});const re={definitionType:"function",params:Xt(b),ifMode:y.ifMode,isFunction:(E=y.isFunction)!=null?E:!1,applyMode:y.applyMode,infix:(ee=y.infix)!=null?ee:!1,parse:y.parse,createAtom:y.createAtom,applyStyle:y.applyStyle,serialize:y.serialize,render:y.render};if(typeof a=="string")Gt["\\"+a]=re;else for(const ae of a)Gt["\\"+ae]=re}var an;function On(a){return an||(an=wt(ge)),a?wt(we(we({},an),a)):an}function ut(a,b){var y,E,ee,re;if(typeof a=="string"){let ae=0;const he=a;return/(^|[^\\])#1/.test(he)&&(ae=1),/(^|[^\\])#2/.test(he)&&(ae=2),/(^|[^\\])#3/.test(he)&&(ae=3),/(^|[^\\])#4/.test(he)&&(ae=4),/(^|[^\\])#5/.test(he)&&(ae=5),/(^|[^\\])#6/.test(he)&&(ae=6),/(^|[^\\])#7/.test(he)&&(ae=7),/(^|[^\\])#8/.test(he)&&(ae=8),/(^|[^\\])#9/.test(he)&&(ae=9),{expand:(y=b==null?void 0:b.expand)!=null?y:!0,captureSelection:(E=b==null?void 0:b.captureSelection)!=null?E:!0,args:ae,def:he}}return we({expand:(ee=b==null?void 0:b.expand)!=null?ee:!0,captureSelection:(re=b==null?void 0:b.captureSelection)!=null?re:!0,args:0},a)}function wt(a){if(!a)return{};const b={};for(const y of Object.keys(a)){const E=a[y];if(E==null)delete b[y];else if(typeof E=="object"&&"package"in E)for(const ee of Object.keys(E.package))b[ee]=ut(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else b[y]=ut(E)}return b}function Nt(a,b="math"){if(!a||a.length===0)return null;let y=null;if(a.startsWith("\\")){if(y=Gt[a],y)return!y.ifMode||y.ifMode===b?y:null;b==="math"?y=At[a]:se[a]&&(y={definitionType:"symbol",type:"mord",codepoint:se[a]})}else if(b==="math"){if(y=At[a],!y&&a.length===1){const E=Bn("math",a.codePointAt(0));return E.startsWith("\\")?Ee(we({},Nt(E,"math")),{command:E}):null}}else se[a]?y={definitionType:"symbol",type:"mord",codepoint:se[a]}:b==="text"&&(y={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return y!=null?y:null}function Pn(a,b){if(!a.startsWith("\\"))return null;const y=a.slice(1);return b[y]}function Bn(a,b){if(b===void 0)return"";if(a==="math"&&mn[b])return mn[b];if(a==="text"){const y=Object.keys(se).find(E=>se[E]===b);return y||String.fromCodePoint(b)}return String.fromCodePoint(b)}var Tn=[0,.68889,0,0,.72222],nr=[0,.68889,0,0,.66667],mr=[0,.68889,0,0,.77778],ar=[0,.68889,0,0,.61111],Er=[.16667,.68889,0,0,.77778],_r=[0,.68889,0,0,.55556],Jn=[0,0,0,0,.25],zr=[0,.825,0,0,2.33334],Wr=[0,.9,0,0,2.33334],Vr=[0,.68889,0,0,.54028],ei=[-.03598,.46402,0,0,.5],Tr=[-.13313,.36687,0,0,1],Yr=[.01354,.52239,0,0,1],xr=[.01354,.52239,0,0,1.11111],Ur=[0,.54986,0,0,1],qr=[0,.69224,0,0,.5],It=[0,.43056,0,0,1],_n=[.08198,.58198,0,0,.77778],yn=[.19444,.69224,0,0,.41667],pn=[.1808,.675,0,0,1],xn=[.19444,.69224,0,0,.83334],sn=[.13667,.63667,0,0,1],dn=[-.064,.437,0,0,1.334],$n=[.08167,.58167,0,0,.77778],nt=[0,.69224,0,0,.72222],_e=[0,.69224,0,0,.66667],Ie=[-.13313,.36687,0,0,.77778],Ae=[.06062,.54986,0,0,.77778],Be=[0,.69224,0,0,.77778],Ve=[.25583,.75583,0,0,.77778],lt=[.25142,.75726,0,0,.77778],Bt=[.20576,.70576,0,0,.77778],bt=[.30274,.79383,0,0,.77778],zt=[.22958,.72958,0,0,.77778],tn=[.1808,.675,0,0,.77778],cn=[.13667,.63667,0,0,.77778],on=[.13597,.63597,0,0,.77778],_t=[.03517,.54986,0,0,.77778],Yt=[0,.675,0,0,.77778],Dn=[.19444,.69224,0,0,.61111],Cn=[0,.54986,0,0,.76042],gn=[0,.54986,0,0,.66667],Mn=[.0391,.5391,0,0,.77778],Fn=[.03517,.54986,0,0,1.33334],un=[.38569,.88569,0,0,.77778],Zn=[.23222,.74111,0,0,.77778],et=[.19444,.69224,0,0,.77778],Tt=[0,.37788,0,0,.5],$t=[0,.54986,0,0,.72222],Jt=[0,.69224,0,0,.83334],Ot=[.11111,.69224,0,0,.66667],Zt=[.26167,.75726,0,0,.77778],Wt=[.48256,.98256,0,0,.77778],nn=[.28481,.79383,0,0,.77778],bn=[.08167,.58167,0,0,.22222],Ln=[.08167,.58167,0,0,.38889],Hn=[0,.43056,.04028,0,.66667],jn=[.41951,.91951,0,0,.77778],rr=[.24982,.74947,0,0,.38865],cr=[.08319,.58283,0,0,.75623],er=[0,.10803,0,0,.27764],vr=[0,.47534,0,0,.50181],fr=[.18906,.47534,0,0,.50181],pr=[0,.69141,0,0,.50181],Gn=[.24982,.74947,0,0,.27764],sr=[0,.69141,0,0,.21471],Xn=[.25,.75,0,0,.44722],Rn=[0,.64444,0,0,.575],gr=[.08556,.58556,0,0,.89444],kr=[0,.69444,0,0,.89444],tr=[0,.68611,0,0,.9],kn=[0,.68611,0,0,.86944],En=[.25,.75,0,0,.575],dr=[.25,.75,0,0,.31944],qn=[0,.69444,0,0,.63889],wr=[0,.69444,0,0,.31944],Lr=[0,.44444,0,0,.63889],Cr=[0,.44444,0,0,.51111],Zr=[0,.69444,0,0,.575],Or=[.13333,.63333,0,0,.89444],ni=[0,.44444,0,0,.31944],ir=[0,.69444,0,0,.86944],lr=[0,.68611,0,0,.69166],Dr=[0,.68611,0,0,.83055],Ar=[0,.68611,0,0,.89444],ui=[0,.69444,0,0,.60278],Hi=[.19444,.69444,0,0,.51111],_i=[0,.69444,0,0,.83055],Qr=[-.10889,.39111,0,0,1.14999],bi=[.19444,.69444,0,0,.575],mi=[.19444,.69444,0,0,1.14999],Yn=[.19444,.69444,0,0,.70277],Un=[.05556,.75,0,0,.575],Nn=[0,.68611,0,0,.95833],Kn=[.08556,.58556,0,0,.76666],Nr=[-.02639,.47361,0,0,.575],ri=[0,.44444,0,0,.89444],ai=[0,.55556,0,0,.76666],ci=[-.10889,.39111,0,0,.89444],ti=[.00222,.50222,0,0,.89444],fi=[.19667,.69667,0,0,.89444],Li=[.08556,.58556,0,0,1.14999],ki=[0,.69444,0,0,.70277],ta=[-.02778,.47222,0,0,.575],Yi=[.25,.75,0,0,.51111],Ii=[-.13889,.36111,0,0,1.14999],Ra=[.19444,.69444,0,0,1.02222],na=[.12963,.69444,0,0,.89444],va=[.19444,.69444,0,0,.44722],ra=[0,.64444,.13167,0,.59111],Si=[.19444,.64444,.13167,0,.59111],$r=[0,.68611,.17208,0,.8961],Jr=[.19444,.44444,.105,0,.53222],Hr=[0,.44444,.085,0,.82666],Ir=[0,.69444,.06709,0,.59111],si=[0,.69444,.12945,0,.35555],ii=[0,.69444,0,0,.94888],Oi=[0,.69444,.11472,0,.59111],Fi=[0,.68611,.10778,0,.88555],Ri=[0,.69444,.07939,0,.62055],qi=[0,.69444,.12417,0,.30667],pi=[0,.64444,.13556,0,.51111],hi=[.19444,.64444,.13556,0,.51111],Wi=[0,.68333,.16389,0,.74333],sa=[.19444,.43056,.08847,0,.46],aa=[0,.43056,.07514,0,.71555],Ji=[0,.69444,.06646,0,.51111],ts=[0,.69444,0,0,.83129],ao=[0,.69444,.1225,0,.51111],oo=[0,.68333,.09403,0,.76666],eo=[0,.68333,.11111,0,.76666],Ss=[0,.69444,.06961,0,.51444],fo=[0,.69444,0,0,.27778],_a=[.25,.75,0,0,.38889],da=[0,.64444,0,0,.5],yo=[0,.69444,0,0,.77778],_o=[0,.68333,0,0,.75],ko=[0,.68333,0,0,.77778],ns=[0,.68333,0,0,.68056],$o=[0,.68333,0,0,.72222],Xa=[.25,.75,0,0,.5],Pa=[.25,.75,0,0,.27778],Ai=[0,.69444,0,0,.5],Do=[0,.69444,0,0,.55556],rs=[0,.43056,0,0,.44445],Lo=[0,.43056,0,0,.5],yi=[.19444,.43056,0,0,.55556],di=[0,.43056,0,0,.55556],$i=[.08333,.58333,0,0,.77778],ka=[0,.43056,0,0,.27778],Zi=[0,.66786,0,0,.27778],Oa=[0,.69444,0,0,.75],Na=[0,.66786,0,0,.5],to=[0,.68333,0,0,.625],$a=[.19444,.69444,0,0,.44445],so=[0,.69444,0,0,.72222],lo=[.19444,.69444,0,0,.5],Da=[.19444,.69444,0,0,1],yl=[.011,.511,0,0,1.126],jo=[.19444,.69444,0,0,.61111],Js=[.05556,.75,0,0,.5],Kl=[0,.68333,0,0,.83334],Hl=[.0391,.5391,0,0,.66667],Cs=[-.05555,.44445,0,0,.5],Mu=[0,.43056,0,0,.77778],is=[0,.55556,0,0,.66667],xl=[-.03625,.46375,0,0,.77778],Vo=[-.01688,.48312,0,0,.77778],as=[.0391,.5391,0,0,1],Ei=[0,.69444,0,0,.61111],Di=[-.03472,.46528,0,0,.5],Ni=[.25,.75,0,0,.44445],Ya=[-.14236,.35764,0,0,1],La=[.244,.744,0,0,.412],xo=[.19444,.69444,0,0,.88889],po=[.12963,.69444,0,0,.77778],za=[.19444,.69444,0,0,.38889],Ao=[.011,.511,0,0,1.638],Bo=[.19444,.69444,0,0,0],wo=[0,.44444,0,0,.575],os=[.19444,.44444,0,0,.575],Wl=[0,.68611,0,0,.75555],wl=[0,.69444,0,0,.66759],Mc=[0,.68611,0,0,.80555],_c=[0,.68611,.08229,0,.98229],Zl=[0,.68611,0,0,.76666],Od=[0,.44444,0,0,.58472],_u=[.19444,.44444,0,0,.6118],Sl=[.19444,.43056,0,0,.5],kc=[0,.68333,.02778,.08334,.76278],ku=[0,.68333,.08125,.05556,.83125],qs=[0,.43056,0,.05556,.48472],jl=[.19444,.43056,0,.08334,.51702],Dc=[.25,.75,0,0,.42778],Aa=[0,.69444,0,0,.55],ss=[0,.69444,0,0,.73334],Es=[0,.69444,0,0,.79445],$d=[0,.69444,0,0,.51945],Vl=[0,.69444,0,0,.70278],Du=[0,.69444,0,0,.76389],Qs=[.25,.75,0,0,.34306],el=[0,.69444,0,0,.56111],Fd=[0,.69444,0,0,.25556],Gl=[.19444,.45833,0,0,.56111],Lc=[0,.45833,0,0,.56111],Ms=[0,.69444,0,0,.30556],Ac=[0,.69444,0,0,.58056],_s=[0,.69444,0,0,.67223],tl=[0,.69444,0,0,.85556],ls=[0,.69444,0,0,.55834],mo=[0,.65556,.11156,0,.5],ks=[0,.69444,.08094,0,.70834],Lu=[.17014,0,0,0,.44445],Bc=[0,.69444,.0799,0,.5],Tc=[0,.69444,0,0,.73752],Rd=[0,.69444,.09205,0,.5],Ds=[0,.69444,.09031,0,.77778],us=[0,.69444,.07816,0,.27778],Nd=[0,.69444,.00316,0,.5],zd=[.19444,.69444,0,0,.83334],Kd=[.05556,.75,0,0,.83334],Hd=[0,.75,0,0,.5],Wd=[.125,.08333,0,0,.27778],Zd=[0,.08333,0,0,.27778],ha=[0,.65556,0,0,.5],wa=[0,.69444,0,0,.47222],la=[0,.69444,0,0,.66667],Ba=[0,.69444,0,0,.59722],nl=[0,.69444,0,0,.54167],Ic=[0,.69444,0,0,.70834],Ul=[.25,.75,0,0,.28889],Pc=[0,.69444,0,0,.51667],jd=[0,.44444,0,0,.44445],Vd=[.19444,.44444,0,0,.51667],Au=[0,.44444,0,0,.38333],Oc=[0,.44444,0,0,.51667],Bu=[0,.69444,0,0,.83334],Gd=[.35001,.85,0,0,.45834],Tu=[.35001,.85,0,0,.57778],Iu=[.35001,.85,0,0,.41667],$c=[.35001,.85,0,0,.58334],Xl=[0,.72222,0,0,.55556],Pu=[1e-5,.6,0,0,.66667],Fc=[1e-5,.6,0,0,.77778],Cl=[.25001,.75,0,0,.94445],Ud=[.306,.805,.19445,0,.47222],Yl=[.30612,.805,.19445,0,.47222],Ka=[.25001,.75,0,0,.83334],rl=[.35001,.85,0,0,.47222],Rc=[.25001,.75,0,0,1.11111],Nc=[.65002,1.15,0,0,.59722],vo=[.65002,1.15,0,0,.81111],Pi=[.65002,1.15,0,0,.47222],To=[.65002,1.15,0,0,.66667],Fo=[0,.75,0,0,1],cs=[.55001,1.05,0,0,1.27778],zc=[.862,1.36,.44445,0,.55556],Ou=[.86225,1.36,.44445,0,.55556],il=[.55001,1.05,0,0,1.11111],$u=[.65002,1.15,0,0,.52778],Fu=[.65002,1.15,0,0,.61111],al=[.55001,1.05,0,0,1.51112],Kc=[.95003,1.45,0,0,.73611],Ru=[.95003,1.45,0,0,1.04445],ds=[.95003,1.45,0,0,.52778],Jl=[.95003,1.45,0,0,.75],ql=[0,.75,0,0,1.44445],Nu=[.95003,1.45,0,0,.58334],Ql=[1.25003,1.75,0,0,.79167],zu=[1.25003,1.75,0,0,1.27778],Hc=[1.25003,1.75,0,0,.58334],Ku=[1.25003,1.75,0,0,.80556],eu=[0,.825,0,0,1.8889],Hu=[1.25003,1.75,0,0,.63889],Wu=[.64502,1.155,0,0,.875],tu=[1e-5,.6,0,0,.875],Zu=[-99e-5,.601,0,0,.66667],ju=[.64502,1.155,0,0,.66667],Xd=[1e-5,.9,0,0,.88889],Wc=[.65002,1.15,0,0,.88889],ol=[.90001,0,0,0,.88889],Vu=[-.00499,.605,0,0,1.05556],sl=[0,.12,0,0,.45],Fr=[0,.61111,0,0,.525],So=[.08333,.69444,0,0,.525],Zc=[-.08056,.53055,0,0,.525],Yd=[-.05556,.55556,0,0,.525],no=[0,.43056,0,0,.525],Sa=[.22222,.43056,0,0,.525],nu=[0,0,0,0,.525],Jd={"AMS-Regular":{32:Jn,65:Tn,66:nr,67:Tn,68:Tn,69:nr,70:ar,71:mr,72:mr,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:mr,76:nr,77:[0,.68889,0,0,.94445],78:Tn,79:Er,80:ar,81:Er,82:Tn,83:_r,84:nr,85:Tn,86:Tn,87:[0,.68889,0,0,1],88:Tn,89:Tn,90:nr,107:_r,160:Jn,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:_r,295:Vr,710:zr,732:Wr,770:zr,771:Wr,989:$n,1008:Hn,8245:[0,.54986,0,0,.275],8463:Vr,8487:Tn,8498:_r,8502:nr,8503:[0,.68889,0,0,.44445],8504:nr,8513:[0,.68889,0,0,.63889],8592:ei,8594:ei,8602:Tr,8603:Tr,8606:Yr,8608:Yr,8610:xr,8611:xr,8619:Ur,8620:Ur,8621:[-.13313,.37788,0,0,1.38889],8622:Tr,8624:qr,8625:qr,8630:It,8631:It,8634:_n,8635:_n,8638:yn,8639:yn,8642:yn,8643:yn,8644:pn,8646:pn,8647:pn,8648:xn,8649:pn,8650:xn,8651:Yr,8652:Yr,8653:Tr,8654:Tr,8655:Tr,8666:sn,8667:sn,8669:[-.13313,.37788,0,0,1],8672:dn,8674:dn,8705:[0,.825,0,0,.5],8708:_r,8709:$n,8717:[0,.43056,0,0,.42917],8722:ei,8724:[.08198,.69224,0,0,.77778],8726:$n,8733:Be,8736:nt,8737:nt,8738:[.03517,.52239,0,0,.72222],8739:bn,8740:[.25142,.74111,0,0,.27778],8741:Ln,8742:[.25142,.74111,0,0,.5],8756:_e,8757:_e,8764:Ie,8765:[-.13313,.37788,0,0,.77778],8769:Ie,8770:xl,8774:bt,8776:Vo,8778:$n,8782:Ae,8783:Ae,8785:_n,8786:_n,8787:_n,8790:Be,8791:zt,8796:[.08198,.91667,0,0,.77778],8806:Ve,8807:Ve,8808:lt,8809:lt,8812:[.25583,.75583,0,0,.5],8814:Bt,8815:Bt,8816:bt,8817:bt,8818:zt,8819:zt,8822:tn,8823:tn,8828:cn,8829:cn,8830:zt,8831:zt,8832:Bt,8833:Bt,8840:bt,8841:bt,8842:on,8843:on,8847:_t,8848:_t,8858:_n,8859:_n,8861:_n,8862:Yt,8863:Yt,8864:Yt,8865:Yt,8872:[0,.69224,0,0,.61111],8873:nt,8874:[0,.69224,0,0,.88889],8876:ar,8877:ar,8878:Tn,8879:Tn,8882:_t,8883:_t,8884:cn,8885:cn,8888:[0,.54986,0,0,1.11111],8890:yi,8891:Dn,8892:Dn,8901:[0,.54986,0,0,.27778],8903:$n,8905:$n,8906:$n,8907:Be,8908:Be,8909:[-.03598,.46402,0,0,.77778],8910:Cn,8911:Cn,8912:_t,8913:_t,8914:gn,8915:gn,8916:_e,8918:Mn,8919:Mn,8920:Fn,8921:Fn,8922:un,8923:un,8926:cn,8927:cn,8928:bt,8929:bt,8934:Zn,8935:Zn,8936:Zn,8937:Zn,8938:Bt,8939:Bt,8940:bt,8941:bt,8994:et,8995:et,9416:[.15559,.69224,0,0,.90222],9484:qr,9488:qr,9492:Tt,9496:Tt,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Yt,9633:Yt,9650:$t,9651:$t,9654:_t,9660:$t,9661:$t,9664:_t,9674:Ot,9733:[.19444,.69224,0,0,.94445],10003:Jt,10016:Jt,10731:Ot,10846:[.19444,.75583,0,0,.61111],10877:cn,10878:cn,10885:Ve,10886:Ve,10887:on,10888:on,10889:Zt,10890:Zt,10891:Wt,10892:Wt,10901:cn,10902:cn,10933:lt,10934:lt,10935:Zt,10936:Zt,10937:Zt,10938:Zt,10949:Ve,10950:Ve,10955:nn,10956:nn,57350:bn,57351:Ln,57352:$n,57353:Hn,57356:lt,57357:lt,57358:jn,57359:bt,57360:bt,57361:jn,57366:lt,57367:lt,57368:lt,57369:lt,57370:on,57371:on},"Caligraphic-Regular":{32:Jn,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:Jn},"Fraktur-Regular":{32:Jn,33:[0,.69141,0,0,.29574],34:sr,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:rr,41:rr,42:[0,.62119,0,0,.27764],43:cr,44:er,45:cr,46:er,47:[.24982,.74947,0,0,.50181],48:vr,49:vr,50:vr,51:fr,52:fr,53:fr,54:pr,55:fr,56:pr,57:fr,58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:Gn,93:Gn,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:Jn,8216:sr,8217:sr,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:Jn,33:[0,.69444,0,0,.35],34:ui,35:[.19444,.69444,0,0,.95833],36:Un,37:[.05556,.75,0,0,.95833],38:kr,39:wr,40:Xn,41:Xn,42:[0,.75,0,0,.575],43:Or,44:[.19444,.15556,0,0,.31944],45:Au,46:[0,.15556,0,0,.31944],47:En,48:Rn,49:Rn,50:Rn,51:Rn,52:Rn,53:Rn,54:Rn,55:Rn,56:Rn,57:Rn,58:ni,59:[.19444,.44444,0,0,.31944],60:gr,61:ci,62:gr,63:[0,.69444,0,0,.54305],64:kr,65:kn,66:[0,.68611,0,0,.81805],67:Dr,68:[0,.68611,0,0,.88194],69:Wl,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:tr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:lr,77:[0,.68611,0,0,1.09166],78:tr,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:kn,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:dr,92:En,93:dr,94:Zr,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:qn,99:Cr,100:qn,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:qn,105:wr,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:wr,109:[0,.44444,0,0,.95833],110:Lr,111:wo,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:Lr,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:Cr,123:En,124:dr,125:En,126:[.35,.34444,0,0,.575],160:Jn,163:[0,.69444,0,0,.86853],168:Zr,172:[0,.44444,0,0,.76666],176:ir,177:Or,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Or,216:[.04861,.73472,0,0,.89444],223:Ba,230:[0,.44444,0,0,.83055],247:Or,248:[.09722,.54167,0,0,.575],305:ni,338:[0,.68611,0,0,1.16944],339:ri,567:[.19444,.44444,0,0,.35139],710:Zr,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Zr,715:Zr,728:Zr,729:wr,730:ir,732:Zr,733:Zr,915:lr,916:Nn,920:Ar,923:Mc,926:Zl,928:tr,931:Dr,933:Ar,934:Dr,936:Ar,937:Dr,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:wr,8217:wr,8220:ui,8221:ui,8224:Hi,8225:Hi,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:wl,8465:_i,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:_i,8501:ki,8592:Qr,8593:bi,8594:Qr,8595:bi,8596:Qr,8597:En,8598:mi,8599:mi,8600:mi,8601:mi,8636:Qr,8637:Qr,8640:Qr,8641:Qr,8656:Qr,8657:Yn,8658:Qr,8659:Yn,8660:Qr,8661:[.25,.75,0,0,.70277],8704:qn,8706:[0,.69444,.06389,0,.62847],8707:qn,8709:Un,8711:Nn,8712:Kn,8715:Kn,8722:Or,8723:Or,8725:En,8726:En,8727:ta,8728:Nr,8729:Nr,8730:[.18,.82,0,0,.95833],8733:ri,8734:[0,.44444,0,0,1.14999],8736:nt,8739:dr,8741:En,8743:ai,8744:ai,8745:ai,8746:ai,8747:[.19444,.69444,.12778,0,.56875],8764:ci,8768:[.19444,.69444,0,0,.31944],8771:ti,8776:[.02444,.52444,0,0,.89444],8781:ti,8801:ti,8804:fi,8805:fi,8810:Li,8811:Li,8826:gr,8827:gr,8834:gr,8835:gr,8838:fi,8839:fi,8846:ai,8849:fi,8850:fi,8851:ai,8852:ai,8853:Or,8854:Or,8855:Or,8856:Or,8857:Or,8866:ki,8867:ki,8868:kr,8869:kr,8900:Nr,8901:[-.02639,.47361,0,0,.31944],8902:ta,8968:Yi,8969:Yi,8970:Yi,8971:Yi,8994:Ii,8995:Ii,9651:Ra,9657:ta,9661:Ra,9667:ta,9711:mi,9824:na,9825:na,9826:na,9827:na,9837:[0,.75,0,0,.44722],9838:va,9839:va,10216:Xn,10217:Xn,10815:tr,10927:fi,10928:fi,57376:Bo},"Main-BoldItalic":{32:Jn,33:[0,.69444,.11417,0,.38611],34:Ri,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:si,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:ra,49:ra,50:ra,51:ra,52:Si,53:ra,54:ra,55:Si,56:ra,57:ra,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Oi,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:$r,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:$r,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:Ir,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:Jr,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:Jr,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:Jn,168:[0,.69444,.11473,0,.59111],176:ii,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:Hr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Hr,567:[.19444,.44444,.04611,0,.385],710:Ir,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:si,730:ii,732:Oi,733:Oi,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:$r,931:[0,.68611,.11431,0,.82666],933:Fi,934:[0,.68611,.05632,0,.82666],936:Fi,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:si,8217:si,8220:[0,.69444,.16772,0,.62055],8221:Ri},"Main-Italic":{32:Jn,33:qi,34:Ss,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:qi,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:pi,49:pi,50:pi,51:pi,52:hi,53:pi,54:pi,55:hi,56:pi,57:pi,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:ao,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:Wi,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:Wi,79:oo,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:Wi,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:Ji,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:sa,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:sa,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:Jn,168:[0,.66786,.10474,0,.51111],176:ts,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:aa,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:aa,710:Ji,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:ts,732:[0,.66786,.11585,0,.51111],733:ao,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:oo,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Wi,931:[0,.68333,.12028,0,.71555],933:eo,934:[0,.68333,.05986,0,.71555],936:eo,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:qi,8217:qi,8220:[0,.69444,.1685,0,.51444],8221:Ss,8463:Vr},"Main-Regular":{32:Jn,33:fo,34:Ai,35:zd,36:Js,37:Kd,38:yo,39:fo,40:_a,41:_a,42:Hd,43:$i,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:Xa,48:da,49:da,50:da,51:da,52:da,53:da,54:da,55:da,56:da,57:da,58:ka,59:[.19444,.43056,0,0,.27778],60:Mn,61:Ie,62:Mn,63:wa,64:yo,65:_o,66:[0,.68333,0,0,.70834],67:$o,68:[0,.68333,0,0,.76389],69:ns,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:_o,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:ko,76:to,77:[0,.68333,0,0,.91667],78:_o,79:ko,80:ns,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:$o,85:_o,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:_o,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Pa,92:Xa,93:Pa,94:Ai,95:[.31,.12056,.02778,0,.5],97:Lo,98:Do,99:rs,100:Do,101:rs,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Do,105:Zi,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:fo,109:[0,.43056,0,0,.83334],110:di,111:Lo,112:yi,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:di,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:rs,123:Xa,124:Pa,125:Xa,126:[.35,.31786,0,0,.5],160:Jn,163:[0,.69444,0,0,.76909],167:$a,168:Na,172:[0,.43056,0,0,.66667],176:Oa,177:$i,182:jo,184:Lu,198:[0,.68333,0,0,.90278],215:$i,216:[.04861,.73194,0,0,.77778],223:Ai,230:[0,.43056,0,0,.72222],247:$i,248:[.09722,.52778,0,0,.5],305:ka,338:[0,.68333,0,0,1.01389],339:Mu,567:[.19444,.43056,0,0,.30556],710:Ai,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Ai,715:Ai,728:Ai,729:Zi,730:Oa,732:Na,733:Ai,915:to,916:Kl,920:ko,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:_o,931:$o,933:ko,934:$o,936:ko,937:$o,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:fo,8217:fo,8220:Ai,8221:Ai,8224:$a,8225:$a,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Vr,8465:so,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:so,8501:Ei,8592:Tr,8593:lo,8594:Tr,8595:lo,8596:Tr,8597:Xa,8598:Da,8599:Da,8600:Da,8601:Da,8614:[.011,.511,0,0,1],8617:yl,8618:yl,8636:Tr,8637:Tr,8640:Tr,8641:Tr,8652:[.011,.671,0,0,1],8656:Tr,8657:jo,8658:Tr,8659:jo,8660:Tr,8661:[.25,.75,0,0,.61111],8704:Do,8706:[0,.69444,.05556,.08334,.5309],8707:Do,8709:Js,8711:Kl,8712:Hl,8715:Hl,8722:$i,8723:$i,8725:Xa,8726:Xa,8727:Di,8728:Cs,8729:Cs,8730:[.2,.8,0,0,.83334],8733:Mu,8734:It,8736:nt,8739:Pa,8741:Xa,8743:is,8744:is,8745:is,8746:is,8747:[.19444,.69444,.11111,0,.41667],8764:Ie,8768:[.19444,.69444,0,0,.27778],8771:xl,8773:[-.022,.589,0,0,1],8776:Vo,8781:xl,8784:[-.133,.67,0,0,.778],8801:xl,8804:on,8805:on,8810:as,8811:as,8826:Mn,8827:Mn,8834:Mn,8835:Mn,8838:on,8839:on,8846:is,8849:on,8850:on,8851:is,8852:is,8853:$i,8854:$i,8855:$i,8856:$i,8857:$i,8866:Ei,8867:Ei,8868:yo,8869:yo,8872:[.249,.75,0,0,.867],8900:Cs,8901:[-.05555,.44445,0,0,.27778],8902:Di,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:Ni,8969:Ni,8970:Ni,8971:Ni,8994:Ya,8995:Ya,9136:La,9137:La,9651:xo,9657:Di,9661:xo,9667:Di,9711:Da,9824:po,9825:po,9826:po,9827:po,9837:[0,.75,0,0,.38889],9838:za,9839:za,10216:_a,10217:_a,10222:La,10223:La,10229:[.011,.511,0,0,1.609],10230:Ao,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:Ao,10815:_o,10927:on,10928:on,57376:Bo},"Math-BoldItalic":{32:Jn,48:wo,49:wo,50:wo,51:os,52:os,53:os,54:Rn,55:os,56:Rn,57:os,65:kn,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:_c,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Wl,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:wl,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:Od,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:Jn,915:[0,.68611,.15972,0,.65694],916:Nn,920:[0,.68611,.03194,0,.86722],923:Mc,926:[0,.68611,.07458,0,.84125],928:_c,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Zl,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:Od,960:[0,.44444,.03704,0,.68241],961:_u,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:_u,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Jn,48:Lo,49:Lo,50:Lo,51:Sl,52:Sl,53:Sl,54:da,55:Sl,56:da,57:Sl,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:ku,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:kc,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:qs,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:Jn,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:kc,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:ku,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:qs,960:[0,.43056,.03588,0,.57003],961:jl,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:jl,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Jn,33:[0,.69444,0,0,.36667],34:ls,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:Ms,40:Dc,41:Dc,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:Aa,49:Aa,50:Aa,51:Aa,52:Aa,53:Aa,54:Aa,55:Aa,56:Aa,57:Aa,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:$d,64:ss,65:ss,66:ss,67:Vl,68:Es,69:[0,.69444,0,0,.64167],70:Ei,71:ss,72:Es,73:[0,.69444,0,0,.33056],74:$d,75:Du,76:Ac,77:[0,.69444,0,0,.97778],78:Es,79:Es,80:Vl,81:[.10556,.69444,0,0,.79445],82:Vl,83:Ei,84:ss,85:Du,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:ss,89:[0,.69444,.0275,0,.73334],90:_s,91:Qs,93:Qs,94:Aa,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:el,99:[0,.45833,0,0,.48889],100:el,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:el,105:Fd,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Fd,109:[0,.45833,0,0,.86667],110:Lc,111:[0,.45833,0,0,.55],112:Gl,113:Gl,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Lc,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:Jn,168:Aa,176:ss,180:Aa,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Aa,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Aa,729:Ms,730:ss,732:Aa,733:Aa,915:Ac,916:[0,.69444,0,0,.91667],920:tl,923:_s,926:ss,928:Es,931:Es,933:tl,934:Es,936:tl,937:Es,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ms,8217:Ms,8220:ls,8221:ls},"SansSerif-Italic":{32:Jn,33:[0,.69444,.05733,0,.31945],34:Nd,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:us,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Wd,45:[0,.44444,.01946,0,.33333],46:Zd,47:[.25,.75,.13164,0,.5],48:mo,49:mo,50:mo,51:mo,52:mo,53:mo,54:mo,55:mo,56:mo,57:mo,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:la,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:ks,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:nl,77:[0,.69444,.08094,0,.875],78:ks,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:Bc,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:Jn,168:[0,.67937,.06385,0,.5],176:Tc,184:Lu,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Bc,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Rd,715:Ai,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Tc,732:[0,.67659,.08826,0,.5],733:Rd,915:[0,.69444,.13372,0,.54167],916:Bu,920:[0,.69444,.07555,0,.77778],923:Ei,926:[0,.69444,.12816,0,.66667],928:ks,931:[0,.69444,.11983,0,.72222],933:Ds,934:[0,.69444,.04603,0,.72222],936:Ds,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:us,8217:us,8220:[0,.69444,.14205,0,.5],8221:Nd},"SansSerif-Regular":{32:Jn,33:[0,.69444,0,0,.31945],34:Ai,35:zd,36:Js,37:Kd,38:[0,.69444,0,0,.75834],39:fo,40:_a,41:_a,42:Hd,43:$i,44:Wd,45:[0,.44444,0,0,.33333],46:Zd,47:Xa,48:ha,49:ha,50:ha,51:ha,52:ha,53:ha,54:ha,55:ha,56:ha,57:ha,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:wa,64:la,65:la,66:la,67:qn,68:[0,.69444,0,0,.72223],69:Ba,70:[0,.69444,0,0,.56945],71:la,72:Ic,73:fo,74:wa,75:[0,.69444,0,0,.69445],76:nl,77:[0,.69444,0,0,.875],78:Ic,79:[0,.69444,0,0,.73611],80:qn,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Do,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:la,89:[0,.69444,.025,0,.66667],90:Ei,91:Ul,93:Ul,94:Ai,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Pc,99:jd,100:Pc,101:jd,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Pc,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:Oc,111:[0,.44444,0,0,.5],112:Vd,113:Vd,114:[0,.44444,.01389,0,.34167],115:Au,116:[0,.57143,0,0,.36111],117:Oc,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:Jn,168:[0,.67937,0,0,.5],176:la,184:Lu,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Ai,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Ai,715:Ai,728:Ai,729:[0,.67937,0,0,.27778],730:la,732:[0,.67659,0,0,.5],733:Ai,915:nl,916:Bu,920:yo,923:Ei,926:la,928:Ic,931:so,933:yo,934:so,936:yo,937:so,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:fo,8217:fo,8220:Ai,8221:Ai},"Script-Regular":{32:Jn,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:Jn},"Size1-Regular":{32:Jn,40:Gd,41:Gd,47:Tu,91:Iu,92:Tu,93:Iu,123:$c,125:$c,160:Jn,710:Xl,732:Xl,770:Xl,771:Xl,8214:[-99e-5,.601,0,0,.77778],8593:Pu,8595:Pu,8657:Fc,8659:Fc,8719:Cl,8720:Cl,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:Yl,8748:Ud,8749:Ud,8750:Yl,8896:Ka,8897:Ka,8898:Ka,8899:Ka,8968:rl,8969:rl,8970:rl,8971:rl,9168:Zu,10216:rl,10217:rl,10752:Rc,10753:Rc,10754:Rc,10756:Ka,10758:Ka},"Size2-Regular":{32:Jn,40:Nc,41:Nc,47:vo,91:Pi,92:vo,93:Pi,123:To,125:To,160:Jn,710:Fo,732:Fo,770:Fo,771:Fo,8719:cs,8720:cs,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:Ou,8748:zc,8749:zc,8750:Ou,8896:il,8897:il,8898:il,8899:il,8968:$u,8969:$u,8970:$u,8971:$u,10216:Fu,10217:Fu,10752:al,10753:al,10754:al,10756:il,10758:il},"Size3-Regular":{32:Jn,40:Kc,41:Kc,47:Ru,91:ds,92:Ru,93:ds,123:Jl,125:Jl,160:Jn,710:ql,732:ql,770:ql,771:ql,8730:[.95003,1.45,0,0,1],8968:Nu,8969:Nu,8970:Nu,8971:Nu,10216:Jl,10217:Jl},"Size4-Regular":{32:Jn,40:Ql,41:Ql,47:zu,91:Hc,92:zu,93:Hc,123:Ku,125:Ku,160:Jn,710:eu,732:eu,770:eu,771:eu,8730:[1.25003,1.75,0,0,1],8968:Hu,8969:Hu,8970:Hu,8971:Hu,9115:Wu,9116:tu,9117:Wu,9118:Wu,9119:tu,9120:Wu,9121:ju,9122:Zu,9123:ju,9124:ju,9125:Zu,9126:ju,9127:Xd,9128:Wc,9129:ol,9130:[0,.3,0,0,.88889],9131:Xd,9132:Wc,9133:ol,9143:[.88502,.915,0,0,1.05556],10216:Ku,10217:Ku,57344:Vu,57345:Vu,57680:sl,57681:sl,57682:sl,57683:sl},"Typewriter-Regular":{32:nu,33:Fr,34:Fr,35:Fr,36:So,37:So,38:Fr,39:Fr,40:So,41:So,42:[0,.52083,0,0,.525],43:Zc,44:[.13889,.125,0,0,.525],45:Zc,46:[0,.125,0,0,.525],47:So,48:Fr,49:Fr,50:Fr,51:Fr,52:Fr,53:Fr,54:Fr,55:Fr,56:Fr,57:Fr,58:no,59:[.13889,.43056,0,0,.525],60:Yd,61:[-.19549,.41562,0,0,.525],62:Yd,63:Fr,64:Fr,65:Fr,66:Fr,67:Fr,68:Fr,69:Fr,70:Fr,71:Fr,72:Fr,73:Fr,74:Fr,75:Fr,76:Fr,77:Fr,78:Fr,79:Fr,80:Fr,81:[.13889,.61111,0,0,.525],82:Fr,83:Fr,84:Fr,85:Fr,86:Fr,87:Fr,88:Fr,89:Fr,90:Fr,91:So,92:So,93:So,94:Fr,95:[.09514,0,0,0,.525],96:Fr,97:no,98:Fr,99:no,100:Fr,101:no,102:Fr,103:Sa,104:Fr,105:Fr,106:[.22222,.61111,0,0,.525],107:Fr,108:Fr,109:no,110:no,111:no,112:Sa,113:Sa,114:no,115:no,116:[0,.55358,0,0,.525],117:no,118:no,119:no,120:no,121:Sa,122:no,123:So,124:So,125:So,126:Fr,127:Fr,160:nu,176:Fr,184:[.19445,0,0,0,.525],305:no,567:Sa,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:Fr,715:Fr,728:Fr,730:Fr,770:Fr,771:Fr,776:Fr,915:Fr,916:Fr,920:Fr,923:Fr,926:Fr,928:Fr,931:Fr,933:Fr,934:Fr,936:Fr,937:Fr,8216:Fr,8217:Fr,8242:Fr,9251:[.11111,.21944,0,0,.525]}},qd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,ll=10,ro=.25,Gu=1.2,hs=.431,jc={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[hs,hs,hs],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[ro,ro,ro],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},Uu=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ls=5,Vc={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function fs(a,b){a===void 0&&(a=77);const y=Jd[b][a];if(y)return{defaultMetrics:!1,depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[4]};if(a===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const E=String.fromCodePoint(a);if(E in Vc)a=Vc[E].codePointAt(0);else if(qd.test(E))return a=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var Xu={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},ul={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},Qd={doubleleftarrow:`M262 157
|
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
|
|
|
c -179 0 -524 -115 -524 -115
|
|
|
c -5 -1 -9 -5 -9 -10
|
|
|
c 0 -1 1 -2 1 -3
|
|
|
l 4 -22
|
|
|
c 1 -5 5 -9 11 -9
|
|
|
h 2
|
|
|
s 338 93 512 92
|
|
|
c 174 0 513 -92 513 -92
|
|
|
h 2
|
|
|
c 5 0 9 4 11 9
|
|
|
l 5 22
|
|
|
c 1 6 -2 12 -8 13
|
|
|
c 0 0 -342 115 -520 115
|
|
|
z
|
|
|
`,leftgroup:`M400000 80
|
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
|
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
|
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function El(a){if(ul[a]){const[ve,Ce,Ne]=ul[a],qe=`<span class="stretchy" style="height:${Ne}em"><svg width="100%" height="${Ne}em" viewBox="0 0 ${ve} ${Ce}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Qd[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*Ne/2)/100}em;min-width:0">${qe}</span>`}const[b,y,E,ee]=Xu[a];let re,ae;const he=E/1e3;b.length===3?(re=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],ae=["xMinYMin","xMidYMin","xMaxYMin"]):b.length===2?(re=["slice-1-of-2","slice-2-of-2"],ae=["xMinYMin","xMaxYMin"]):(re=["slice-1-of-1"],ae=[ee]);const pe=b.map((ve,Ce)=>`<span class="${re[Ce]}" style=height:${he}em><svg width=400em height=${he}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${ae[Ce]} slice"><path fill="currentcolor" d="${Qd[ve]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${he}em;min-width:${y}em;">${pe}</span>`}function eh(a){return Xu[a]?Xu[a][2]/1e3:ul[a][2]}function th(a){const b=[];for(let y=0;y<a.length;y++){let E=a.charCodeAt(y);if(E===13&&a.charCodeAt(y+1)===10&&(E=10,y++),(E===13||E===12)&&(E=10),E===0&&(E=65533),E>=55296&&E<=56319){const ee=a.charCodeAt(y+1);if(ee>=56320&&ee<=57343){const re=E-55296,ae=ee-56320;E=Ys(2,16)+re*Ys(2,10)+ae,y++}}b.push(E)}return b}var ru=8205,iu=[[ru,1],[65038,2],[127995,5],[129456,4],[917536,96]],As,Ml=[127462,127487];function _l(a){var b;if(As===void 0){As={};for(const y of iu)for(let E=y[0];E<=y[0]+y[1]-1;E++)As[E]=!0}return(b=As[a])!=null?b:!1}function nh(a){return a>=Ml[0]&&a<=Ml[1]}function rh(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const b=[],y=th(a);let E=0;for(;E<y.length;){const ee=y[E++],re=y[E];if(re===ru){const ae=E-1;for(E+=2;y[E]===ru;)E+=2;b.push(String.fromCodePoint(...y.slice(ae,E-ae+1)))}else if(_l(re)){const ae=E-1;for(;_l(y[E]);)E+=y[E]===ru?2:1;b.push(String.fromCodePoint(...y.slice(ae,2*E-ae-1)))}else nh(ee)?(E+=1,b.push(String.fromCodePoint(...y.slice(E-2,2)))):b.push(String.fromCodePoint(ee))}return b}var ih=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=rh(a)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(a){const b=typeof this.s=="string"?a.exec(this.s.slice(this.pos)):a.exec(this.s.slice(this.pos).join(""));return b!=null&&b[0]?(this.pos+=b[0].length,b[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const a=this.get();if(a==="\\"){if(!this.end()){let b=this.match(/^[a-zA-Z\*]+/);return b?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):b=this.get(),"\\"+b}}else{if(a==="{")return"<{>";if(a==="}")return"<}>";if(a==="^"){if(this.peek()==="^"){this.get();const b=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(b)return String.fromCodePoint(Number.parseInt(b.slice(b.lastIndexOf("^")+1),16))}return a}else if(a==="#"){if(!this.end()){let b=!1;if(/[\d?@]/.test(this.peek())&&(b=!0,this.pos+1<this.s.length)){const y=this.s[this.pos+1];b=/[^\dA-Za-z]/.test(y)}return b?"#"+this.get():"#"}}else if(a==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return a}};function Bs(a,b){var y,E,ee,re;const ae=[];let he=a.next();if(he&&he!=="\\relax"){if(he==="\\noexpand")he=a.next(),he&&ae.push(he);else if(he==="\\obeyspaces")a.obeyspaces=!0;else if(he==="\\bgroup")ae.push("<{>");else if(he==="\\egroup")ae.push("<}>");else if(he==="\\string"){if(he=a.next(),he)if(he.startsWith("\\"))for(const pe of he)ae.push(pe==="\\"?"\\backslash":pe);else he==="<{>"?ae.push("\\{"):he==="<space>"?ae.push("~"):he==="<}>"&&ae.push("\\}")}else if(he==="\\csname"){for(;a.peek()==="<space>";)a.next();let pe="",ve=!1,Ce=[];do{if(Ce.length===0)if(/^#[\d?@]$/.test(a.peek())){const Ne=a.get().slice(1);Ce=ps((E=(y=b==null?void 0:b(Ne))!=null?y:b==null?void 0:b("?"))!=null?E:"\\placeholder{}",b),he=Ce[0]}else he=a.next(),Ce=he?[he]:[];ve=Ce.length===0,!ve&&he==="\\endcsname"&&(ve=!0,Ce.shift()),ve||(ve=he==="<$>"||he==="<$$>"||he==="<{>"||he==="<}>"||typeof he=="string"&&he.length>1&&he.startsWith("\\")),ve||(pe+=Ce.shift())}while(!ve);pe&&ae.push("\\"+pe),ae.push(...Ce)}else if(he!=="\\endcsname")if(he.length>1&&he.startsWith("#")){const pe=he.slice(1);ae.push(...ps((re=(ee=b==null?void 0:b(pe))!=null?ee:b==null?void 0:b("?"))!=null?re:"\\placeholder{}",b))}else ae.push(he)}return ae}function ps(a,b=null){const y=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&y.push(E),E=" ";const he=ae.match(/((?:\\%)|[^%])*/);he!==null&&y.push(he[0])}const ee=new ih(Ye(y.join(""))),re=[];do re.push(...Bs(ee,b));while(!ee.end());return re}function vi(a){let b="";const y=[];for(const E of a)E&&(b&&/^[a-zA-Z\*]/.test(E)&&y.push(b),y.push(E),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(E)&&y.push(" "),b=/\\[a-zA-Z]+\*?$/.test(E)?" ":"");return y.join("")}function Qi(a,...b){return console.assert(a.startsWith("\\")),b.length===0?a:vi([a,...b.map(y=>`{${y}}`)])}function Ts(a){return vi(a.map(b=>{var y;return(y={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[b])!=null?y:b}))}var ah=class Pd{constructor(b){Pd._registry[b]=this}static createAtom(b,y,E){return Pd._registry[b].createAtom(y,Nt(y,b),E)}static serialize(b,y){var E;if(!b||b.length===0)return"";if((E=y.skipStyles)!=null&&E){const ee=[];for(const re of oh(b)){const ae=Pd._registry[re[0].mode];ee.push(...ae.serialize(re,y))}return vi(ee)}return vi(ef(b,y))}static getFont(b,y,E){return Pd._registry[b].getFont(y,E)}};ah._registry={};var Co=ah;function oh(a){const b=[];let y=[],E="NONE";for(const ee of a)ee.type!=="first"&&(ee.mode!==E?(y.length>0&&b.push(y),y=[ee],E=ee.mode):y.push(ee));return y.length>0&&b.push(y),b}function ga(a,b){const y=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let ae;b==="variant"?(ae=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(ae+="-"+re.style.variantStyle)):ae=re.style[b],ae===ee?E.push(re):(E.length>0&&y.push(E),E=[re],ee=ae)}return E.length>0&&y.push(E),y}function Gc(a,b){var y;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of oh(a)){const he=b.defaultMode;for(const pe of ga(ae,"color")){const ve=pe[0].computedStyle,Ce=Co._registry[pe[0].mode].serialize(pe,Ee(we({},b),{defaultMode:he==="text"?"text":"math"}));!b.skipStyles&&ve.color&&ve.color!=="none"&&(!E||ee!==ve.color)?re.push(Qi("\\textcolor",(y=ve.verbatimColor)!=null?y:ve.color,vi(Ce))):re.push(vi(Ce))}}return re}function Qh(a,b){const{parent:y}=a[0],E=y==null?void 0:y.computedStyle.backgroundColor;return ga(a,"backgroundColor").map(ee=>{var re;if(ee.length>0||ee[0].type!=="box"){const ae=ee[0].computedStyle;if(ae.backgroundColor&&ae.backgroundColor!=="none"&&(!y||E!==ae.backgroundColor))return Qi("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,vi(Gc(ee,Ee(we({},b),{defaultMode:"text"}))))}return vi(Gc(ee,b))})}function ef(a,b){if(a.length===0)return[];const{parent:y}=a[0],E=y==null?void 0:y.computedStyle.fontSize,ee=[];for(const re of ga(a,"fontSize")){const ae=re[0].computedStyle.fontSize,he=Qh(re,b);he&&(ae&&ae!=="auto"&&(!y||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...he):ee.push(...he))}return ee}function Uc(a){return a?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[a]:void 0}function kl(a){if(a.length===0)return"ord";const b=Uc(a[0].type),y=Uc(a[a.length-1].type);return b&&b===y?b:"ord"}function Dl(a,b){if(typeof a=="string")return a;if(typeof a=="number"){console.assert(Number.isFinite(a));const y=Math.ceil(100*a)/100;return y===0?"0":y.toString()+(b!=null?b:"")}return""}var ur=class Ep{constructor(b,y){var E,ee,re,ae,he;if(typeof b=="number"?this.value=String.fromCodePoint(b):typeof b=="string"?this.value=b:Le(b)?this.children=b.filter(ve=>ve!==null):b&&b instanceof Ep&&(this.children=[b]),this.children)for(const ve of this.children)ve.parent=this;this.type=(E=y==null?void 0:y.type)!=null?E:"ignore",this.isSelected=(y==null?void 0:y.isSelected)===!0,y!=null&&y.caret&&(this.caret=y.caret),this.classes=(ee=y==null?void 0:y.classes)!=null?ee:"",this.isTight=(re=y==null?void 0:y.isTight)!=null?re:!1,y!=null&&y.attributes&&(this.attributes=y.attributes);let pe=y==null?void 0:y.fontFamily;y!=null&&y.style&&this.value&&(pe=(he=Co.getFont((ae=y.mode)!=null?ae:"math",this,Ee(we({variant:"normal"},y.style),{letterShapeStyle:y.letterShapeStyle})))!=null?he:void 0),pe||(pe="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(y==null?void 0:y.maxFontSize)!==void 0&&(this.maxFontSize=y.maxFontSize),au(this,pe)}set atomID(b){b===void 0||b.length===0||(this.id=b)}selected(b){if(this.isSelected!==b&&(this.isSelected=b,this.children))for(const y of this.children)y.selected(b)}setStyle(b,y,E){if(y===void 0)return;const ee=Dl(y,E);ee.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[b]=ee)}setTop(b){Number.isFinite(b)&&Math.abs(b)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=Dl(b,"em"),this.height-=b,this.depth+=b)}get left(){var b;return(b=this.cssProperties)!=null&&b["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(b){Number.isFinite(b)&&(b===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=Dl(b,"em")))}set right(b){Number.isFinite(b)&&(b===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=Dl(b,"em")))}set bottom(b){Number.isFinite(b)&&(b===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=Dl(b,"em")))}get width(){return this._width*this.scale}set width(b){this._width=b,this.hasExplicitWidth=!0}set softWidth(b){}get height(){return this._height*this.scale}set height(b){this._height=b}get depth(){return this._depth*this.scale}set depth(b){this._depth=b}wrap(b){const y=b.parent;if(!y)return this;b.isPhantom&&this.setStyle("opacity",0);const E=b.color;E&&E!==y.color&&this.setStyle("color",E);let ee=b.backgroundColor;this.isSelected&&(ee=ct(ee)),ee&&ee!==y.backgroundColor&&(this.setStyle("background-color",ee),this.setStyle("display","inline-block"));const re=b.scalingFactor;return this.scale=re,this.skew*=re,this.italic*=re,this}toMarkup(){var b,y,E,ee;let re=(b=this.value)!=null?b:"";if(this.children)for(const vt of this.children)re+=vt.toMarkup();let ae="";if(this.svgBody)ae=El(this.svgBody);else if(this.svgOverlay){ae='<span style="',ae+="display: inline-block;",ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,ae+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,ae+='">',ae+=re,ae+="</span>",ae+='<svg style="position:absolute;overflow:visible;',ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const vt=(y=this.cssProperties)==null?void 0:y.padding;vt?(ae+=`top:${vt};`,ae+=`left:${vt};`,ae+=`width:calc(100% - 2 * ${vt} );`):ae+="top:0;left:0;width:100%;",ae+="z-index:2;",ae+='"',this.svgStyle&&(ae+=this.svgStyle),ae+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,ae+=`>${this.svgOverlay}</svg>`}let he="";const pe=this.classes.split(" ");pe.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&pe.push("ML__latex-caret"),this.isSelected&&pe.push("ML__selected");const ve=pe.length===1?pe[0]:pe.filter((vt,Mt,vn)=>vt.length>0&&vn.indexOf(vt)===Mt).join(" ");if(ve.length>0&&(he+=` class="${ve}"`),this.id&&(he+=` data-atom-id=${this.id}`),this.cssId&&(he+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(he+=" "+Object.keys(this.attributes).map(vt=>`${vt}="${this.attributes[vt]}"`).join(" ")),this.htmlData){const vt=this.htmlData.split(",");for(const Mt of vt){const vn=Mt.match(/([^=]+)=(.+$)/);if(vn){const or=vn[1].trim().replace(/ /g,"-");or&&(he+=` data-${or}="${vn[2]}" `)}else{const or=Mt.trim().replace(/ /g,"-");or&&(he+=` data-${or} `)}}}const Ce=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&Ce.width===void 0&&(Ce.width=`${Math.ceil(this._width*100)/100}em`);const Ne=Object.keys(Ce).map(vt=>`${vt}:${Ce[vt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&Ne.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const vt=this.htmlStyle.split(";");let Mt="";for(const vn of vt){const or=vn.match(/([^=]+):(.+$)/);if(or){const fn=or[1].trim().replace(/ /g,"-");fn&&(Mt+=`${fn}:${or[2]};`)}}Mt&&(he+=` style="${Mt}"`)}Ne.length>0&&(he+=` style="${Ne.join(";")}"`);let qe="";return he.length>0||ae.length>0?qe=`<span${he}>${re}${ae}</span>`:qe=re,this.caret==="text"?qe+='<span class="ML__text-caret"></span>':this.caret==="math"&&(qe+='<span class="ML__caret"></span>'),qe}tryCoalesceWith(b){if(this.svgBody||!this.value||b.svgBody||!b.value)return!1;const y=this.children&&this.children.length>0,E=b.children&&b.children.length>0;if(y||E)return!1;if(b.cssProperties||this.cssProperties){for(const pe of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(b.cssProperties&&pe in b.cssProperties||this.cssProperties&&pe in this.cssProperties)return!1}const ee=this.cssProperties?Object.keys(this.cssProperties).length:0,re=b.cssProperties?Object.keys(b.cssProperties).length:0;if(ee!==re)return!1;if(ee>0){for(const pe of Object.keys(this.cssProperties))if(this.cssProperties[pe]!==b.cssProperties[pe])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),he=b.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==he.length)return!1;ae.sort(),he.sort();for(const[pe,ve]of ae.entries())if(ve==="vertical-separator"||ve!==he[pe])return!1;return this.value+=b.value,this.height=Math.max(this.height,b.height),this.depth=Math.max(this.depth,b.depth),this._width=this._width+b._width,this.maxFontSize=Math.max(this.maxFontSize,b.maxFontSize),this.italic=b.italic,!0}};function Xc(a){if(!a||a.length===0)return[];a[0].children=Xc(a[0].children);const b=[a[0]];for(let y=1;y<a.length;y++)b[b.length-1].tryCoalesceWith(a[y])||(a[y].children=Xc(a[y].children),b.push(a[y]));return b}function Yu(a){return a.children&&(a.children=Xc(a.children)),a}function Ju(a,b){if(!a)return new ur(null,b);const y=new ur(null,{classes:"ML__strut",type:"ignore"});y.setStyle("height",Math.max(0,a.height),"em");const E=[y];if(a.depth!==0){const ee=new ur(null,{classes:"ML__strut--bottom",type:"ignore"});ee.setStyle("height",a.height+a.depth,"em"),ee.setStyle("vertical-align",-a.depth,"em"),E.push(ee)}return E.push(a),new ur(E,Ee(we({},b),{type:"lift"}))}function Ro(a){const b=eh(a)/2,y=new ur(null,{maxFontSize:0});return y.height=b+.166,y.depth=b-.166,y.svgBody=a,y}function au(a,b){var y;if(a.type==="latex"){a.height=.9,a.depth=.2,a._width=1;return}if(a.value){a.height=-1/0,a.depth=-1/0,a._width=0,a.skew=-1/0,a.italic=-1/0;for(let E=0;E<a.value.length;E++){const ee=fs(a.value.codePointAt(E),b);a.height=Math.max(a.height,ee.height),a.depth=Math.max(a.depth,ee.depth),a._width+=ee.width,a.skew=ee.skew,a.italic=ee.italic}return}if(a.children&&a.children.length>0){let E=-1/0,ee=-1/0,re=0;for(const ae of a.children)ae.height>E&&(E=ae.height),ae.depth>ee&&(ee=ae.depth),re=Math.max(re,(y=ae.maxFontSize)!=null?y:0);a.height=E,a.depth=ee,a._width=a.children.reduce((ae,he)=>ae+he.width,0),a.maxFontSize=re}}function qu(a){if("individualShift"in a){const b=a.individualShift;let y=b[0];const E=[y],ee=-y.shift-y.box.depth;let re=ee;for(let ae=1;ae<b.length;ae++){const he=b[ae],pe=-he.shift-re-he.box.depth,ve=pe-(y.box.height+y.box.depth);re=re+pe,E.push(ve),E.push(he),y=he}return[E,ee]}if("top"in a){let b=a.top;for(const y of a.children)b-=typeof y=="number"?y:y.box.height+y.box.depth;return[a.children,b]}else{if("bottom"in a)return[a.children,-a.bottom];if("firstBaseline"in a){const b=a.firstBaseline[0];if(typeof b=="number")throw new Error("First child must be an element.");return[a.firstBaseline,-b.box.depth]}else if("shift"in a){const b=a.children[0];if(typeof b=="number")throw new Error("First child must be an element.");return[a.children,-b.box.depth-a.shift]}}return[null,0]}function ou(a){var b;const[y,E]=qu(a);if(!y)return[[],0,0];const ee=new ur(null,{classes:"pstrut"});let re=0;for(const Mt of y)if(typeof Mt!="number"){const vn=Mt.box;re=Math.max(re,vn.maxFontSize,vn.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let he=E,pe=E,ve=E,Ce=0;for(const Mt of y){if(typeof Mt=="number")ve+=Mt;else{const vn=Mt.box,or=(b=Mt.classes)!=null?b:[],fn=new ur([ee,vn],{classes:or.join(" "),style:Mt.style});vn.setStyle("height",vn.height+vn.depth,"em"),vn.setStyle("display","inline-block"),fn.setStyle("top",-re-ve-vn.depth,"em"),Mt.marginLeft&&fn.setStyle("margin-left",Mt.marginLeft,"em"),Mt.marginRight&&fn.setStyle("margin-right",Mt.marginRight,"em"),ae.push(fn),ve+=vn.height+vn.depth,Ce=Math.max(Ce,fn.width)}he=Math.min(he,ve),pe=Math.max(pe,ve)}ae.forEach(Mt=>{Mt.softWidth=Ce});const Ne=new ur(ae,{classes:"vlist"});if(Ne.softWidth=Ce,Ne.height=pe,Ne.setStyle("height",pe,"em"),he>=0)return[[new ur(Ne,{classes:"vlist-r"})],pe,-he];const qe=new ur(new ur(null),{classes:"vlist"});qe.height=-he,qe.setStyle("height",-he,"em");const vt=new ur(8203,{classes:"vlist-s",maxFontSize:0});return vt.softWidth=0,vt.height=0,vt.depth=0,[[new ur([Ne,vt],{classes:"vlist-r"}),new ur(qe,{classes:"vlist-r"})],pe,-he]}var ji=class extends ur{constructor(a,b){var y;const[E,ee,re]=ou(a);super(E.length===1?E[0]:E,{type:b==null?void 0:b.type,classes:((y=b==null?void 0:b.classes)!=null?y:"")+" vlist-t"+(E.length===2?" vlist-t2":"")}),this.height=ee,this.depth=re,this.softWidth=E.reduce((ae,he)=>Math.max(ae,he.width),0)}};function tf(a,b){var y,E,ee,re,ae;const he=a.metrics,pe=new ur(b.base),ve=(y=b.baseShift)!=null?y:0,Ce=(E=b.slant)!=null?E:0;let Ne=0,qe=0;b.above&&(Ne=(ee=b.aboveShift)!=null?ee:Math.max(he.bigOpSpacing1,he.bigOpSpacing3-b.above.depth)),b.below&&(qe=(re=b.belowShift)!=null?re:Math.max(he.bigOpSpacing2,he.bigOpSpacing4-b.below.height));let vt=null;if(b.below&&b.above){const Mt=he.bigOpSpacing5+b.below.height+b.below.depth+qe+pe.depth+ve;vt=new ji({bottom:Mt,children:[he.bigOpSpacing5,{box:b.below,marginLeft:-Ce,classes:["ML__center"]},qe,{box:pe,classes:["ML__center"]},Ne,{box:b.above,marginLeft:Ce,classes:["ML__center"]},he.bigOpSpacing5]}).wrap(a)}else if(b.below&&!b.above)vt=new ji({top:pe.height-ve,children:[he.bigOpSpacing5,{box:b.below,marginLeft:-Ce,classes:["ML__center"]},qe,{box:pe,classes:["ML__center"]}]}).wrap(a);else if(!b.below&&b.above){const Mt=pe.depth+ve;vt=new ji({bottom:Mt,children:[{box:pe,classes:["ML__center"]},Ne,{box:b.above,marginLeft:Ce,classes:["ML__center"]},he.bigOpSpacing5]}).wrap(a)}else{const Mt=pe.depth+ve;vt=new ji({bottom:Mt,children:[{box:pe},he.bigOpSpacing5]}).wrap(a)}return new ur(vt,{type:(ae=b.type)!=null?ae:"op"})}var Yc=7,ms=6,su=5,Is=4,cl=3,io=2,Io=1,Ha=0,Go=class{constructor(a,b,y){this.id=a,this.sizeDelta=b,this.cramped=y;const E={"-4":2,"-3":1,0:0}[b];this.metrics=Object.keys(jc).reduce((ee,re)=>Ee(we({},ee),{[re]:jc[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Uo[[Ha,Io,Ha,Io,io,cl,io,cl][this.id]]}get sub(){return Uo[[Ha,Ha,Ha,Ha,io,io,io,io][this.id]]}get fracNum(){return Uo[[Ha,Io,Ha,Io,io,cl,Is,su][this.id]]}get fracDen(){return Uo[[Ha,Ha,Ha,Ha,io,io,Is,Is][this.id]]}get cramp(){return Uo[[Ha,Ha,io,io,Is,Is,ms,ms][this.id]]}get isTight(){return this.sizeDelta<0}},dl={7:new Go(Yc,0,!1),6:new Go(ms,0,!0),5:new Go(su,0,!1),4:new Go(Is,0,!0),3:new Go(cl,-3,!1),2:new Go(io,-3,!0),1:new Go(Io,-4,!1),0:new Go(Ha,-4,!0)},Uo=Ee(we({},dl),{displaystyle:dl[Yc],textstyle:dl[su],scriptstyle:dl[cl],scriptscriptstyle:dl[Io]});function Ll(a,b){var y;if(!a)return 0;const E={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:ll,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(y=a.unit)!=null?y:"pt"];if(Number.isFinite(b)){const ee=Ys(10,b);return Math.round(a.dimension/ll*E*ee)/ee}return a.dimension*E}function Jc(a,b){if(a===null)return 0;const y=Ll(a)/ll;if(Number.isFinite(b)){const E=Ys(10,b);return Math.round(y*E)/E}return y}function qc(a){var b;return`${a.dimension}${(b=a.unit)!=null?b:"pt"}`}function sh(a){let b=qc(a.glue);return a.grow&&a.grow.dimension!==0&&(b+=` plus ${qc(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(b+=` minus ${qc(a.shrink)}`),b}function Ca(a){var b,y;if(a==null)return null;let E="";if("dimension"in a&&(E=`${a.dimension}${(b=a.unit)!=null?b:"pt"}`),"glue"in a&&(E=sh(a)),"number"in a)if(!("base"in a)||a.base==="decimal")E=Number(a.number).toString();else if(a.base==="alpha")E=`\`${String.fromCodePoint(a.number)}`;else{const ee=Math.round(a.number)>>>0;a.base==="hexadecimal"?(E=Number(ee).toString(16).toUpperCase(),ee<=255?E=E.padStart(2,"0"):ee<=65535?E=E.padStart(4,"0"):ee<=16777215?E=E.padStart(6,"0"):E=E.padStart(8,"0"),E=`"${E}`):a.base==="octal"&&(E=Number(ee).toString(8),ee<=63?E=E.padStart(2,"0"):ee<=30583?E=E.padStart(4,"0"):E=E.padStart(8,"0"),E=`'${E}`)}return"register"in a&&("factor"in a&&(a.factor===-1?E="-":a.factor!==1&&(E=Number(a.factor).toString())),"global"in a&&a.global&&(E+="\\global"),E+=`\\${a.register}`),"string"in a&&(E=a.string),(y=a.relax)!=null&&y&&(E+="\\relax"),E}function Xo(a,b){return a==null?null:"number"in a?Ee(we({},a),{number:a.number*b}):"register"in a?"factor"in a&&a.factor?Ee(we({},a),{factor:a.factor*b}):Ee(we({},a),{factor:b}):"dimension"in a?Ee(we({},a),{dimension:a.dimension*b}):"glue"in a?a.shrink&&a.grow?{glue:Xo(a.glue,b),shrink:Xo(a.shrink,b),grow:Xo(a.grow,b)}:a.shrink?{glue:Xo(a.glue,b),shrink:Xo(a.shrink,b)}:a.grow?{glue:Xo(a.glue,b),grow:Xo(a.grow,b)}:{glue:Xo(a.glue,b)}:null}var nf={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function Al(){return we({},nf)}function Qu(){return{registers:Al(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Ue.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:St,backgroundColorMap:ot,getMacro:a=>Pn(a,On())}}var wi=class Mp{constructor(b,y){var E,ee,re,ae,he,pe,ve,Ce,Ne,qe,vt,Mt,vn,or,fn;let zn;b!=null&&b.parent?(this.parent=b.parent,zn=b.parent,this.registers={}):(zn=we(we({},Qu()),(E=b==null?void 0:b.from)!=null?E:{}),this.registers=zn.registers),zn.atomIdsSettings&&(this.atomIdsSettings=we({},zn.atomIdsSettings)),this.renderPlaceholder=zn.renderPlaceholder,this.isPhantom=(ae=(re=b==null?void 0:b.isPhantom)!=null?re:(ee=this.parent)==null?void 0:ee.isPhantom)!=null?ae:!1,this.letterShapeStyle=zn.letterShapeStyle,this.minFontScale=zn.minFontScale,y!=null&&y.color&&y.color!=="none"?this.color=y.color:this.color=(pe=(he=this.parent)==null?void 0:he.color)!=null?pe:"",y!=null&&y.backgroundColor&&y.backgroundColor!=="none"?this.backgroundColor=y.backgroundColor:this.backgroundColor=(Ce=(ve=this.parent)==null?void 0:ve.backgroundColor)!=null?Ce:"",y!=null&&y.fontSize&&y.fontSize!=="auto"&&y.fontSize!==((Ne=this.parent)==null?void 0:Ne.size)?this.size=y.fontSize:this.size=(vt=(qe=this.parent)==null?void 0:qe.size)!=null?vt:Ls;let hr=(vn=(Mt=this.parent)==null?void 0:Mt.mathstyle)!=null?vn:Uo.displaystyle;if(typeof(b==null?void 0:b.mathstyle)=="string"){if(zn instanceof Mp)switch(b.mathstyle){case"cramp":hr=hr.cramp;break;case"superscript":hr=hr.sup;break;case"subscript":hr=hr.sub;break;case"numerator":hr=hr.fracNum;break;case"denominator":hr=hr.fracDen;break}switch(b.mathstyle){case"textstyle":hr=Uo.textstyle;break;case"displaystyle":hr=Uo.displaystyle;break;case"scriptstyle":hr=Uo.scriptstyle;break;case"scriptscriptstyle":hr=Uo.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=hr,this.smartFence=zn.smartFence,this.placeholderSymbol=zn.placeholderSymbol,this.colorMap=(or=zn.colorMap)!=null?or:Wn=>Wn,this.backgroundColorMap=(fn=zn.backgroundColorMap)!=null?fn:Wn=>Wn,this.getMacro=zn.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const b=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,b}scale(b){return b*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===Yc||this.mathstyle.id===ms}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(Uu[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(b){var y;if((y=this.registers)!=null&&y[b])return this.registers[b];if(this.parent)return this.parent.getRegister(b)}getRegisterAsNumber(b){const y=this.getRegister(b);if(typeof y=="number")return y;if(typeof y=="string")return Number(y)}getRegisterAsGlue(b){var y;if((y=this.registers)!=null&&y[b]){const E=this.registers[b];return typeof E=="object"&&"glue"in E?E:typeof E=="object"&&"dimension"in E?{glue:{dimension:E.dimension}}:typeof E=="number"?{glue:{dimension:E}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(b)}getRegisterAsEm(b,y){return Jc(this.getRegisterAsDimension(b),y)}getRegisterAsDimension(b){var y;if((y=this.registers)!=null&&y[b]){const E=this.registers[b];return typeof E=="object"&&"glue"in E?E.glue:typeof E=="object"&&"dimension"in E?E:typeof E=="number"?{dimension:E}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(b)}setRegister(b,y){if(y===void 0){delete this.registers[b];return}this.registers[b]=y}evaluate(b){if(!b||!("register"in b))return b;let y=this;if("global"in b&&b.global)for(;y.parent;)y=y.parent;let E=1;"factor"in b&&b.factor!==1&&b.factor!==void 0&&(E=b.factor);const ee=y.getRegister(b.register);if(ee===void 0)return;if(typeof ee=="string")return{string:Number(ee).toString()+ee};if(typeof ee=="number")return{number:E*ee};const re=y.evaluate(ee);if(re!==void 0)return"string"in re?{string:Number(ee).toString()+re.string}:"number"in re?{number:E*re.number}:"dimension"in re?Ee(we({},re),{dimension:E*re.dimension}):"glue"in re?Ee(we({},re),{glue:Ee(we({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?Ee(we({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?Ee(we({},re.grow),{dimension:E*re.grow.dimension}):void 0}):b}toDimension(b){const y=this.evaluate(b);return y===void 0?null:"dimension"in y?y:"glue"in y?y.glue:"number"in y?{dimension:y.number}:null}toEm(b,y){if(b===null)return 0;const E=this.toDimension(b);return E===null?0:Ll(E,y)/ll}toNumber(b){if(b===null)return null;const y=this.evaluate(b);return y===void 0?null:"number"in y?y.number:"dimension"in y?y.dimension:"glue"in y?y.glue.dimension:"string"in y?Number(y.string):null}toColor(b){var y,E;if(b===null)return null;const ee=this.evaluate(b);return ee===void 0?null:"string"in ee?(E=(y=this.colorMap)==null?void 0:y.call(this,ee.string))!=null?E:ee.string:null}toBackgroundColor(b){var y,E;if(b===null)return null;const ee=this.evaluate(b);return ee===void 0?null:"string"in ee?(E=(y=this.backgroundColorMap)==null?void 0:y.call(this,ee.string))!=null?E:ee.string:null}},Bl=["body","above","below","superscript","subscript"];function vs(a){return typeof a=="string"&&Bl.includes(a)}function lu(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var An=class gl{constructor(b){var y,E,ee,re,ae,he;this.type=b.type,typeof b.value=="string"&&(this.value=b.value),this.command=(E=(y=b.command)!=null?y:this.value)!=null?E:"",this.mode=(ee=b.mode)!=null?ee:"math",b.isFunction&&(this.isFunction=!0),b.limits&&(this.subsupPlacement=b.limits),this.style=we({},b.style),this.displayContainsHighlight=(re=b.displayContainsHighlight)!=null?re:!1,this.captureSelection=(ae=b.captureSelection)!=null?ae:!1,this.skipBoundary=(he=b.skipBoundary)!=null?he:!1,b.verbatimLatex!==void 0&&b.verbatimLatex!==null&&(this.verbatimLatex=b.verbatimLatex),b.args&&(this.args=b.args),b.body&&(this.body=b.body),this._changeCounter=0}static createBox(b,y,E){var ee;if(!y)return null;const re=lh(y),ae=[];for(const pe of re){const ve=pe[0].style,Ce=uh(b,pe,{style:{color:ve.color,backgroundColor:ve.backgroundColor,fontSize:ve.fontSize}});Ce&&ae.push(Ce)}if(ae.length===0)return null;const he=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return ae.length===1&&!he&&!(E!=null&&E.type)?ae[0].wrap(b):new ur(ae,{classes:he,type:E==null?void 0:E.type}).wrap(b)}static serialize(b,y){return Co.serialize(b,y)}static commonAncestor(b,y){if(b===y||b.parent===y.parent)return b.parent;const E=new WeakSet;let{parent:ee}=b;for(;ee;)E.add(ee),ee=ee.parent;for(ee=y.parent;ee;){if(E.has(ee))return ee;ee=ee.parent}console.assert(!!ee)}static fromJson(b){return typeof b=="string"?new gl({type:"mord",value:b,mode:"math"}):new gl(b)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const b={};if(this.type&&(b.type=this.type),this.mode!=="math"&&(b.mode=this.mode),this.command&&this.command!==this.value&&(b.command=this.command),this.value!==void 0&&(b.value=this.value),this.style&&Object.keys(this.style).length>0&&(b.style=we({},this.style)),this.verbatimLatex!==void 0&&(b.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(b.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(b.explicitSubsupPlacement=!0),this.isFunction&&(b.isFunction=!0),this.displayContainsHighlight&&(b.displayContainsHighlight=!0),this.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),this.skipBoundary&&(b.skipBoundary=!0),this.captureSelection&&(b.captureSelection=!0),this.args&&(b.args=ed(this.args)),this._branches)for(const y of Object.keys(this._branches))this._branches[y]&&(b[y]=this._branches[y].filter(E=>E.type!=="first").map(E=>E.toJson()));return b.type==="mord"&&Object.keys(b).length===2&&"value"in b?b.value:b}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(b){if(b){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:y}=this;for(;y;)y.parent||y._changeCounter++,"verbatimLatex"in y&&(y.verbatimLatex=void 0),y._children=void 0,y=y.parent}}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Nt(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):this.body&&this.command?vi([Qi(this.command,this.bodyToLatex(b)),this.supsubToLatex(b)]):this.body?vi([this.bodyToLatex(b),this.supsubToLatex(b)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(b){var y;return Co.serialize(this.body,Ee(we({},b),{defaultMode:(y=b.defaultMode)!=null?y:this.latexMode}))}aboveToLatex(b){return Co.serialize(this.above,b)}belowToLatex(b){return Co.serialize(this.below,b)}supsubToLatex(b){let y="";if(b=Ee(we({},b),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Co.serialize(this.subscript,b);E.length===0?y+="_{}":E.length===1?/^[0-9]$/.test(E)?y+=`_${E}`:y+=`_{${E}}`:y+=`_{${E}}`}if(this.branch("superscript")!==void 0){const E=Co.serialize(this.superscript,b);E.length===0?y+="^{}":E.length===1?E==="\u2032"?y+="^\\prime ":E==="\u2033"?y+="^\\doubleprime ":/^[0-9]$/.test(E)?y+=`^${E}`:y+=`^{${E}}`:y+=`^{${E}}`}return y}get treeDepth(){let b=1,y=this.parent;for(;y;)y=y.parent,b+=1;return b}get inCaptureSelection(){let b=this;for(;b;){if(b.captureSelection)return!0;b=b.parent}return!1}get parentPrompt(){let b=this.parent;for(;b;){if(b.type==="prompt"&&!b.captureSelection)return b;b=b.parent}return null}branch(b){if(vs(b)&&this._branches)return this._branches[b]}get branches(){if(!this._branches)return[];const b=[];for(const y of Bl)this._branches[y]&&b.push(y);return b}createBranch(b){return console.assert(vs(b)),vs(b)?(this._branches?this._branches[b]||(this._branches[b]=[this.makeFirstAtom(b)]):this._branches={[b]:[this.makeFirstAtom(b)]},this.isDirty=!0,this._branches[b]):[]}get row(){return lu(this.parentBranch)?this.parentBranch[0]:-1}get col(){return lu(this.parentBranch)?this.parentBranch[1]:-1}get body(){var b;return(b=this._branches)==null?void 0:b.body}set body(b){this.setChildren(b,"body")}get superscript(){var b;return(b=this._branches)==null?void 0:b.superscript}set superscript(b){this.setChildren(b,"superscript")}get subscript(){var b;return(b=this._branches)==null?void 0:b.subscript}set subscript(b){this.setChildren(b,"subscript")}get above(){var b;return(b=this._branches)==null?void 0:b.above}set above(b){this.setChildren(b,"above")}get below(){var b;return(b=this._branches)==null?void 0:b.below}set below(b){this.setChildren(b,"below")}get computedStyle(){var b,y;const E=typeof this.style.verbatimColor=="string",ee=typeof this.style.verbatimBackgroundColor=="string",re=we(we({},(y=(b=this.parent)==null?void 0:b.computedStyle)!=null?y:{}),this.style);return delete re.variant,delete re.variantStyle,ee||delete re.verbatimBackgroundColor,E||delete re.verbatimColor,re}applyStyle(b){this.isDirty=!0,this.style=we(we({},this.style),b),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(const y of this.children)y.applyStyle(b)}getInitialBaseElement(){var b,y,E;return this.hasEmptyBranch("body")?this:(console.assert(((b=this.body)==null?void 0:b[0].type)==="first"),(E=(y=this.body[1])==null?void 0:y.getInitialBaseElement())!=null?E:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(b){const y=this.branch(b);return y?(console.assert(y.length>0),console.assert(y[0].type==="first"),y.length===1):!0}setChildren(b,y){var E;if(!b||(console.assert(vs(y)),!vs(y)))return;console.assert(((E=b[0])==null?void 0:E.type)!=="first");const ee=[this.makeFirstAtom(y),...b];this._branches?this._branches[y]=ee:this._branches={[y]:ee};for(const re of b)re.parent=this,re.parentBranch=y;this.isDirty=!0}makeFirstAtom(b){const y=new gl({type:"first",mode:this.mode});return y.parent=this,y.parentBranch=b,y}addChild(b,y){console.assert(b.type!=="first"),this.createBranch(y).push(b),this.isDirty=!0,b.parent=this,b.parentBranch=y}addChildBefore(b,y){console.assert(y.parentBranch!==void 0);const E=this.createBranch(y.parentBranch);E.splice(E.indexOf(y),0,b),this.isDirty=!0,b.parent=this,b.parentBranch=y.parentBranch}addChildAfter(b,y){console.assert(y.parentBranch!==void 0);const E=this.createBranch(y.parentBranch);E.splice(E.indexOf(y)+1,0,b),this.isDirty=!0,b.parent=this,b.parentBranch=y.parentBranch}addChildren(b,y){const E=this.createBranch(y);for(const ee of b)ee.parent=this,ee.parentBranch=y,E.push(ee);this.isDirty=!0}addChildrenAfter(b,y){console.assert(b.length===0||b[0].type!=="first"),console.assert(y.parentBranch!==void 0);const E=this.createBranch(y.parentBranch);E.splice(E.indexOf(y)+1,0,...b),this.isDirty=!0;for(const ee of b)ee.parent=this,ee.parentBranch=y.parentBranch;return b[b.length-1]}removeBranch(b){const y=this.branch(b);if(vs(b)&&(this._branches[b]=void 0),!y)return[];for(const E of y)E.parent=void 0,E.parentBranch=void 0;return console.assert(y[0].type==="first"),y.shift(),this.isDirty=!0,y}removeChild(b){if(console.assert(b.parent===this),b.type==="first")return;const y=this.branch(b.parentBranch),E=y.indexOf(b);console.assert(E>=0),y.splice(E,1),this.isDirty=!0,b.parent=void 0,b.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:b}=this;return b[b.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const b=this.parent.branch(this.parentBranch);return b[b.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const b=this.parent.branch(this.parentBranch);return b[b.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:b}=this;return b[b.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const b=[];for(const y of Bl)if(this._branches[y])for(const E of this._branches[y])b.push(...E.children),b.push(E);return this._children=b,b}render(b){if(this.type==="first"&&!b.atomIdsSettings)return null;const y=Nt(this.command,this.mode);if(y!=null&&y.render)return y.render(this,b);const E=new wi({parent:b},this.style);let ee=this.createBox(E,{classes:this.parent?"":"ML__base"});return ee?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(ee=this.attachSupsub(E,{base:ee})),ee.wrap(E)):null}attachSupsub(b,y){var E;const ee=y.base,re=this.superscript,ae=this.subscript;if(!re&&!ae)return ee;let he=null,pe=null;const ve=(E=y.isCharacterBox)!=null?E:this.isCharacterBox();let Ce=0;if(re){const vn=new wi({parent:b,mathstyle:"superscript"});he=gl.createBox(vn,re),ve||(Ce=ee.height-b.metrics.supDrop*vn.scalingFactor)}let Ne=0;if(ae){const vn=new wi({parent:b,mathstyle:"subscript"});pe=gl.createBox(vn,ae),ve||(Ne=ee.depth+b.metrics.subDrop*vn.scalingFactor)}let qe;b.isDisplayStyle?qe=b.metrics.sup1:b.isCramped?qe=b.metrics.sup3:qe=b.metrics.sup2;const vt=.5/ll/b.scalingFactor;let Mt=null;if(pe&&he){Ce=Math.max(Ce,qe,he.depth+.25*b.metrics.xHeight),Ne=Math.max(Ne,b.metrics.sub2);const vn=b.metrics.defaultRuleThickness;if(Ce-he.depth-(pe.height-Ne)<4*vn){Ne=4*vn-(Ce-he.depth)+pe.height;const fn=.8*b.metrics.xHeight-(Ce-he.depth);fn>0&&(Ce+=fn,Ne-=fn)}const or=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;Mt=new ji({individualShift:[{box:pe,shift:Ne,marginLeft:or},{box:he,shift:-Ce}]}).wrap(b)}else pe&&!he?(Ne=Math.max(Ne,b.metrics.sub1,pe.height-.8*hs),Mt=new ji({shift:Ne,children:[{box:pe,marginRight:vt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!pe&&he&&(Ce=Math.max(Ce,qe,he.depth+.25*hs),Mt=new ji({shift:-Ce,children:[{box:he,marginRight:vt}]}));return new ur([ee,new ur(Mt,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:y.type})}attachLimits(b,y){const E=this.superscript?gl.createBox(new wi({parent:b,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?gl.createBox(new wi({parent:b,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?y.base.wrap(b):tf(b,Ee(we({},y),{above:E,below:ee}))}bind(b,y){if(!y||b.isPhantom||this.value==="\u200B")return y;let E=this.parent;for(;E&&!E.captureSelection;)E=E.parent;return E!=null&&E.captureSelection||(this.id||(this.id=b.makeID()),y.atomID=this.id),y}createBox(b,y){var E,ee,re,ae;const he=(E=this.value)!=null?E:this.body,pe=(ee=y==null?void 0:y.boxType)!=null?ee:Uc(this.type);let ve=(re=y==null?void 0:y.classes)!=null?re:"";this.mode==="text"&&(ve+=" ML__text");const Ce=typeof he=="string"||he===void 0?new ur(he!=null?he:null,{type:pe,isSelected:this.isSelected,mode:this.mode,maxFontSize:b.scalingFactor,style:Ee(we({variant:"normal"},this.style),{fontSize:Math.max(1,b.size+b.mathstyle.sizeDelta)}),letterShapeStyle:b.letterShapeStyle,classes:ve}):(ae=gl.createBox(b,he,{type:pe,classes:ve}))!=null?ae:new ur(null);return b.isTight&&(Ce.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(Ce.italic=0),Ce.right=Ce.italic,this.bind(b,Ce),this.caret&&!this.superscript&&!this.subscript&&(Ce.caret=this.caret),Ce}isDigit(){var b;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((b=this.body)==null?void 0:b.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var b;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((b=this.body)==null?void 0:b.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function lh(a){let b;const y=[];let E=[];for(const ee of a)if(!b&&!ee.style)E.push(ee);else{const re=ee.computedStyle;b&&re.color===b.color&&re.backgroundColor===b.backgroundColor&&re.fontSize===b.fontSize?E.push(ee):(E.length>0&&y.push(E),E=[ee],b=re)}return E.length>0&&y.push(E),y}function uh(a,b,y){var E,ee,re,ae,he;if(!b||b.length===0)return null;const pe=new wi({parent:a},y.style),ve=!((E=pe.atomIdsSettings)!=null&&E.groupNumbers);let Ce=[];if(b.length===1){const qe=b[0],vt=qe.render(pe);vt&&(ve&&qe.isSelected&&vt.selected(!0),Ce=[vt])}else{let qe="",vt=!0;for(const Mt of b){(ee=pe.atomIdsSettings)!=null&&ee.groupNumbers&&qe&&(vt&&Mt.isDigit()||!vt&&Qc(Mt))&&(pe.atomIdsSettings.overrideID=qe);const vn=Mt.render(pe);pe.atomIdsSettings&&(pe.atomIdsSettings.overrideID=void 0),vn&&((re=pe.atomIdsSettings)!=null&&re.groupNumbers&&((Mt.isDigit()||Qc(Mt))&&(!qe||vt!==Mt.isDigit())&&(vt=Mt.isDigit(),qe=(ae=Mt.id)!=null?ae:""),qe&&(!(Mt.isDigit()||Qc(Mt))||!Mt.hasEmptyBranch("superscript")||!Mt.hasEmptyBranch("subscript"))&&(qe="")),ve&&Mt.isSelected&&vn.selected(!0),Ce.push(vn))}}if(Ce.length===0)return null;const Ne=new ur(Ce,Ee(we({isTight:pe.isTight},y),{type:(he=y.type)!=null?he:"lift"}));return Ne.isSelected=Ce.every(qe=>qe.isSelected),Ne.wrap(pe)}function Qc(a){return a.mode==="text"}function ed(a){return a.map(b=>b===null?"<null>":Array.isArray(b)&&b[0]instanceof An?{atoms:b.map(y=>y.toJson())}:typeof b=="object"&&"group"in b?{group:b.group.map(y=>y.toJson())}:b)}var gs=class _p extends An{constructor(b,y,E){super({type:"text",command:b,mode:"text",displayContainsHighlight:!0}),this.value=y,this.verbatimLatex=y,this.applyStyle(E)}static fromJson(b){return new _p(b.command,b.value,b.style)}render(b){const y=this.createBox(b);return this.caret&&(y.caret=this.caret),y}_serialize(b){var y;return(y=this.verbatimLatex)!=null?y:Bn("text",this.value.codePointAt(0))}};function uu(a,b){if(a.direction===b.direction){const y=a.ranges.length;if(b.ranges.length===y){let E=0;for(;E<y&&rf(a.ranges[E],b.ranges[E])==="equal";)E++;return E===y?"equal":"different"}}return"different"}function rf(a,b){return a[0]===b[0]&&a[1]===b[1]?"equal":"different"}function Wa(a){let b=1/0,y=-1/0;for(const E of a.ranges)b=Math.min(b,E[0],E[1]),y=Math.max(y,E[0],E[1]);return[b,y]}function Ps(a){return typeof a=="number"&&!Number.isNaN(a)}function ec(a){return Array.isArray(a)&&a.length===2}function tc(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function af(a,b){const y=a.at(b);let E;if(y){E=y.mode;let ee=y.parent;for(;!E&ⅇ)ee&&(E=ee.mode),ee=ee.parent}return E}function ch(a,b){if(!b)return"";if(typeof b=="string")return b;if(!a||b.after===void 0)return b.value;let y=!1,E=!1,ee=!1,re=!1,ae=!1,he=!1,pe=!1,ve=!1,Ce=!1,Ne=!1,qe=!1,vt=!1,Mt=!1,vn=!1,or=!1,fn=a[0],zn=0;for(;fn!=null&&fn.type&&/^(subsup|placeholder)$/.test(fn.type);)zn+=1,fn=a[zn];return y=!fn||fn.type==="first",fn&&(vn=fn.mode==="text",E=!vn&&fn.type==="mord"&&de.test(fn.value),ee=!vn&&fn.type==="mord"&&/\d+$/.test(fn.value),re=!vn&&fn.isFunction,ae=fn.type==="genfrac",he=fn.type==="surd",pe=fn.type==="mbin",ve=fn.type==="mrel",Ce=fn.type==="mop"||fn.type==="operator"||fn.type==="extensible-symbol",Ne=fn.type==="mpunct"||fn.type==="minner",qe=fn.type==="array",vt=fn.type==="mopen",Mt=fn.type==="mclose"||fn.type==="leftright",or=fn.type==="space"),b.after.includes("nothing")&&y||b.after.includes("letter")&&E||b.after.includes("digit")&&ee||b.after.includes("function")&&re||b.after.includes("frac")&&ae||b.after.includes("surd")&&he||b.after.includes("binop")&&pe||b.after.includes("relop")&&ve||b.after.includes("operator")&&Ce||b.after.includes("punct")&&Ne||b.after.includes("array")&&qe||b.after.includes("openfence")&&vt||b.after.includes("closefence")&&Mt||b.after.includes("text")&&vn||b.after.includes("space")&&or?b.value:""}function td(a,b,y){return y?ch(a,y[b]):""}var dh={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function cu(a,b){var y;let E=(y=b==null?void 0:b.format)!=null?y:"auto";return E==="auto"&&([E,a]=fh(a)),E==="ascii-math"?(a=a.replace(/\u2061/gu,""),a=a.replace(/\u3016/gu,"{"),a=a.replace(/\u3017/gu,"}"),a=a.replace(/([^\\])sinx/g,"$1\\sin x"),a=a.replace(/([^\\])cosx/g,"$1\\cos x "),a=a.replace(/\u2013/g,"-"),["ascii-math",Ja(a,{inlineShortcuts:b==null?void 0:b.inlineShortcuts})]):["latex",a]}function Ja(a,b){var y,E,ee;if(!a)return"";let re=!1,ae;const he=(y=b.inlineShortcuts)!=null?y:dh;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=Os(a.slice(1),{inlineShortcuts:he,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=Ja(ae.rest,b),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=Os(ae[2],{inlineShortcuts:he,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=Ja(ae.rest,b),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=Os(ae[2],{inlineShortcuts:he,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=Ja(ae.rest,b),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=Os(ae[1],{inlineShortcuts:he,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=Ja(ae.rest,b),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=Ja(ae[2],b),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hh(ae[1],he),a+=Ja(ae[2],b),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=Os(a.slice(1),{inlineShortcuts:he,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=Ja(ae.rest,b),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hh(ae[1],he),a+=Ja(ae[2],b),re=!0)),!re)if(ae=Os(a,{inlineShortcuts:he,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const pe=Os(ae.rest.slice(1),{inlineShortcuts:he,noWrap:!0});pe.match&&(a="\\frac{"+ae.match+"}{"+pe.match+"}"+Ja(pe.rest,b)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+Ja(ae.rest,b):ae.match+Ja(ae.rest,b),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+Ja(ae[2],b),re=!0)),a}function Os(a,b){let y="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let ae=1,he=1;for(;he<a.length&&ae>0;)a[he]===ee&&ae++,a[he]===re&&ae--,he++;ae===0?(b.noWrap&&ee==="("?y=Ja(a.substring(1,he-1),b):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),y="\\left"+ee+Ja(a.substring(1,he-1),b)+"\\right"+re),E=a.slice(Math.max(0,he))):(y=a.substring(1,he),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let he=td(null,a,b.inlineShortcuts);if(he)return he=he.replace("_{#?}",""),he=he.replace("^{#?}",""),{match:he,rest:a.slice(he.length)}}if(ae=a.match(/^([a-zA-Z])/),ae)return{match:ae[1],rest:a.slice(1)};if(ae=a.match(/^(-)?\d+(\.\d*)?/),ae)return{match:ae[0],rest:a.slice(ae[0].length)};/^\\(left|right)/.test(a)||(ae=a.match(/^(\\[a-zA-Z]+)/),ae&&(E=a.slice(ae[1].length),y=ae[1]))}return{match:y,rest:E}}function hh(a,b){let y=td(null,a,b);return y?(y=y.replace("_{#?}",""),y=y.replace("^{#?}",""),y+=" "):y=a,y}var nd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function $s(a){const b=a.trim();for(const y of nd)if(b.startsWith(y[0])&&b.endsWith(y[1]))return[!0,b.substring(y[0].length,b.length-y[1].length)];return[!1,a]}function fh(a){if(a=a.trim(),a.length<=1)return["latex",a];let b;return[b,a]=$s(a),b?["latex",a]:a.startsWith("`")&&a.endsWith("`")?(a=a.substring(1,a.length-1),["ascii-math",a]):a.includes("\\")?["latex",a]:/\$.+\$/.test(a)?["latex",`\\text{${a}}`]:[void 0,a]}var nc="$$",of="$$",sf=(a,b,y)=>(nd.some(E=>b.startsWith(E[0])&&b.endsWith(E[1]))||(b=`${nc} ${b} ${of}`),b),ph=class qh{constructor(b){qh._modes[b]=this}static onPaste(b,y,E){var ee;if(!y.contentEditable&&y.userSelect==="none")return y.model.announce("plonk"),!1;if(typeof E=="string"){const ae=new DataTransfer;ae.setData("text/plain",E),E=ae}const re=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(ee=y.host)!=null&&ee.dispatchEvent(re)?qh._modes[b].onPaste(y,E):!1}static copyToClipboard(b,y){if(!b.contentEditable&&b.userSelect==="none"){b.model.announce("plonk");return}const E=b.model,ee=E.selectionIsCollapsed?[0,E.lastOffset]:Wa(E.selection),re=E.getValue(ee,y);navigator.clipboard.writeText(re).then(()=>{},()=>b.model.announce("plonk"))}static onCopy(b,y){var E;if(!y.clipboardData)return;if(!b.contentEditable&&b.userSelect==="none"){b.model.announce("plonk");return}const ee=b.model,re=ee.selectionIsCollapsed?[0,ee.lastOffset]:Wa(ee.selection);let ae=ee.getAtoms(re);if(ae.every(he=>he.mode==="text"||!he.mode))y.clipboardData.setData("text/plain",ae.filter(he=>he instanceof gs).map(he=>he.value).join(""));else if(ae.every(he=>he.mode==="latex"))y.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(he=>{var pe;return(pe=he.value)!=null?pe:""}).join(""));else{let he;ae.length===1&&ae[0].verbatimLatex!==void 0?he=ae[0].verbatimLatex:he=ee.getValue(re,"latex-expanded"),y.clipboardData.setData("application/x-latex",he);try{y.clipboardData.setData("text/plain",b.options.onExport(b,he,re))}catch(pe){}if(ae.length===1){const pe=ae[0];(pe.type==="root"||pe.type==="group")&&(ae=pe.body.filter(ve=>ve.type!=="first"))}try{y.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(pe=>pe.toJson())))}catch(pe){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const pe=window.MathfieldElement.computeEngine;if(pe)try{const ve=pe.jsonSerializationOptions;pe.jsonSerializationOptions={metadata:["latex"]};const Ce=pe.parse(ee.getValue(re,"latex-unstyled"));pe.jsonSerializationOptions=ve;const Ne=JSON.stringify(Ce.json);Ne&&y.clipboardData.setData("application/json",Ne)}catch(ve){}}}y.preventDefault()}static insert(b,y,E={}){var ee;const re=E.mode==="auto"?b.mode:(ee=E.mode)!=null?ee:b.mode;return qh._modes[re].insert(b,y,E)}onPaste(b,y){return!1}insert(b,y,E){return!1}};ph._modes={};var oi=ph,lf=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],rd={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function No(a){var b;return((b=a.element)==null?void 0:b.mathfield)===a}function zo(a){var b,y;return(y=(b=a.querySelector(".ML__caret"))!=null?b:a.querySelector(".ML__text-caret"))!=null?y:a.querySelector(".ML__latex-caret")}function Fs(a){const b=zo(a);if(!b)return null;const y=b.getBoundingClientRect();return{x:y.right,y:y.bottom,height:y.height}}function id(a){var b;if(!a.parent)return"root";let y=(b=a.parent.id)!=null?b:"";return y+=typeof a.parentBranch=="string"?"-"+a.parentBranch:`-${a.parentBranch[0]}/${a.parentBranch[0]}`,y}function ad(a,b,y){if(!b)return null;const E=a.field.getBoundingClientRect(),ee=b.right-b.left,re=b.bottom-b.top,ae=Math.ceil(b.left-E.left+a.field.scrollLeft*y),he=Math.ceil(b.top-E.top);return{left:ae,right:ae+ee,top:he,bottom:he+re}}function od(a){const b=a.getBoundingClientRect(),y=parseInt(getComputedStyle(a).marginRight),E={top:b.top-1,bottom:b.bottom,left:b.left,right:b.right-1+y};if(a.children.length===0||a.tagName.toUpperCase()==="SVG")return E;for(const ee of a.children)if(ee.nodeType===1&&"atomId"in ee.dataset&&!ee.classList.contains("pstrut")){const re=od(ee);E.left=Math.min(E.left,re.left),E.right=Math.max(E.right,re.right),E.top=Math.min(E.top,re.top),E.bottom=Math.max(E.bottom,re.bottom)}return E}function Tl(a,b){var y,E;if(!b.id)return null;let ee=(E=(y=a.atomBoundsCache)==null?void 0:y.get(b.id))!=null?E:null;if(ee!==null)return ee;const re=a.field.querySelector(`[data-atom-id="${b.id}"]`);return ee=re?od(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(b.id,ee):a.atomBoundsCache.delete(b.id)),ee!=null?ee:null}function mh(a,b,y){const E=new Map;for(const ee of a.model.getAtoms(b,{includeChildren:!0})){if(y!=null&&y.excludeAtomsWithBackground&&ee.style.backgroundColor)continue;const re=a.field,ae=re.offsetWidth;let pe=Math.floor(re.getBoundingClientRect().width)/ae;pe=isNaN(pe)?1:pe;const ve=ad(a,Tl(a,ee),pe);if(ve){const Ce=id(ee);if(E.has(Ce)){const Ne=E.get(Ce);E.set(Ce,{left:Math.min(Ne.left,ve.left),right:Math.max(Ne.right,ve.right),top:Math.min(Ne.top,ve.top),bottom:Math.max(Ne.bottom,ve.bottom)})}else E.set(Ce,ve)}}return[...E.values()]}function sd(a,b){return a.model.selection.ranges.reduce((y,E)=>y.concat(...mh(a,E,b)),[])}function ld(a,b){return a==="*"||b==="none"?!0:b==="same-origin"?!window.origin||a===window.origin:typeof b=="function"?b(a):!1}function rc(a){let b=0,y=0;const E=a.offsetWidth,ee=a.offsetHeight;for(;a instanceof HTMLElement;)b+=a.offsetTop,y+=a.offsetLeft,a=a.offsetParent;return new DOMRect(y,b,E,ee)}var vh=`@keyframes ML__caret-blink {
|
|
|
0%,
|
|
|
100% {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
50% {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
}
|
|
|
.ML__container {
|
|
|
display: inline-flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
|
min-height: 39px;
|
|
|
/* Need some room for the virtual keyboard toggle */
|
|
|
width: 100%;
|
|
|
/* Encourage browsers to consider allocating a hardware accelerated
|
|
|
layer for this element. */
|
|
|
isolation: isolate;
|
|
|
/* Prevent the browser from trying to interpret touch gestures in the field */
|
|
|
/* "Disabling double-tap to zoom removes the need for browsers to
|
|
|
delay the generation of click events when the user taps the screen." */
|
|
|
touch-action: none;
|
|
|
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_selection-color: var(--selection-color, #000);
|
|
|
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
|
|
|
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
|
|
|
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
|
|
|
--_smart-fence-color: var(--smart-fence-color, currentColor);
|
|
|
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
|
|
|
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
|
|
|
--_correct-color: var(--correct-color, #10a000);
|
|
|
--_incorrect-color: var(--incorrect-color, #a01b00);
|
|
|
--_composition-background-color: var(--composition-background-color, #fff1c2);
|
|
|
--_composition-text-color: var(--composition-text-color, black);
|
|
|
--_composition-underline-color: var(--composition-underline-color, transparent);
|
|
|
}
|
|
|
/* This is the actual field content (formula) */
|
|
|
.ML__content {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
align-self: center;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
padding: 2px 3px 2px 1px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle,
|
|
|
.ML__menu-toggle {
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
flex-shrink: 0;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
padding: 0;
|
|
|
margin-right: 4px;
|
|
|
cursor: pointer;
|
|
|
/* Avoid some weird blinking with :hover */
|
|
|
border-radius: 8px;
|
|
|
border: 1px solid transparent;
|
|
|
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
color: hsl(var(--_hue), 40%, 50%);
|
|
|
fill: currentColor;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:hover,
|
|
|
.ML__menu-toggle:hover {
|
|
|
background: hsla(0, 0%, 70%, 0.3);
|
|
|
color: #333;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle > span,
|
|
|
.ML__menu-toggle > span {
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
/* The invisible element used to capture keyboard events. We're just trying
|
|
|
really hard to make sure it doesn't show. */
|
|
|
.ML__keyboard-sink {
|
|
|
display: inline-block;
|
|
|
resize: none;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
/* Need these for Microsoft Edge */
|
|
|
position: fixed;
|
|
|
clip: rect(0 0 0 0);
|
|
|
/* Need this to prevent iOS Safari from auto-zooming */
|
|
|
font-size: 1em;
|
|
|
font-family: KaTeX_Main;
|
|
|
line-height: 0.5;
|
|
|
/* On Chromium, if this is 0, no keyboard events are received */
|
|
|
}
|
|
|
[part="placeholder"] {
|
|
|
color: var(--neutral-400);
|
|
|
}
|
|
|
.ML__composition {
|
|
|
background: var(--_composition-background-color);
|
|
|
color: var(--_composition-text-color);
|
|
|
text-decoration: underline var(--_composition-underline-color);
|
|
|
}
|
|
|
.ML__caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__text-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__latex-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_latex-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.019em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__focused .ML__latex-caret::after,
|
|
|
.ML__focused .ML__text-caret::after,
|
|
|
.ML__focused .ML__caret::after {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.ML__focused .ML__text {
|
|
|
background: var(--_text-highlight-background-color);
|
|
|
}
|
|
|
/* When using smartFence, the anticipated closing fence is displayed
|
|
|
with this style */
|
|
|
.ML__smart-fence__close {
|
|
|
opacity: var(--_smart-fence-opacity);
|
|
|
color: var(--_smart-fence-color);
|
|
|
}
|
|
|
.ML__selected,
|
|
|
.ML__focused .ML__selected .ML__contains-caret,
|
|
|
.ML__focused .ML__selected .ML__smart-fence__close,
|
|
|
.ML__focused .ML__selected .ML__placeholder {
|
|
|
color: var(--_selection-color);
|
|
|
opacity: 1;
|
|
|
}
|
|
|
.ML__selection {
|
|
|
box-sizing: border-box;
|
|
|
background: var(--_selection-background-color) !important;
|
|
|
}
|
|
|
.ML__contains-caret.ML__close,
|
|
|
.ML__contains-caret.ML__open,
|
|
|
.ML__contains-caret > .ML__close,
|
|
|
.ML__contains-caret > .ML__open,
|
|
|
.ML__contains-caret .ML__sqrt-sign,
|
|
|
.ML__contains-caret .ML__sqrt-line {
|
|
|
color: var(--_caret-color);
|
|
|
}
|
|
|
.ML__contains-highlight {
|
|
|
box-sizing: border-box;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__focused .ML__contains-highlight {
|
|
|
background: var(--_contains-highlight-background-color);
|
|
|
}
|
|
|
.ML__raw-latex {
|
|
|
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
font-weight: 400;
|
|
|
font-size: 0.8em;
|
|
|
letter-spacing: -0.05em;
|
|
|
color: var(--_latex-color);
|
|
|
}
|
|
|
.ML__suggestion {
|
|
|
color: var(--neutral-500);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:focus {
|
|
|
outline: none;
|
|
|
border-radius: 8px;
|
|
|
border: 2px solid hsl(var(--_hue), 40%, 50%);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-pressed,
|
|
|
.ML__virtual-keyboard-toggle.is-active:hover,
|
|
|
.ML__virtual-keyboard-toggle.is-active {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to automatically show a
|
|
|
tooltip over a element on hover.
|
|
|
*/
|
|
|
[data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
[data-tooltip]::after {
|
|
|
content: attr(data-tooltip);
|
|
|
position: absolute;
|
|
|
display: block;
|
|
|
z-index: 2;
|
|
|
pointer-events: none;
|
|
|
right: auto;
|
|
|
top: calc(-100% - 4px);
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
border-radius: 4px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
text-align: center;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-style: normal;
|
|
|
font-weight: 400;
|
|
|
font-size: 13px;
|
|
|
/* Phone */
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
@media only screen and (max-width: 767px) {
|
|
|
[data-tooltip]::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
menu [data-tooltip]::after {
|
|
|
left: 100%;
|
|
|
top: 0%;
|
|
|
}
|
|
|
menu .ML__base {
|
|
|
cursor: default;
|
|
|
}
|
|
|
/** Don't display if we're tracking, i.e. have the pointer down */
|
|
|
.tracking [data-tooltip]:hover::after {
|
|
|
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
/** But do display if tracking and inside a menu */
|
|
|
.tracking menu li[data-tooltip]:hover::after,
|
|
|
[data-tooltip]:hover::after {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
transition-property: opacity, scale;
|
|
|
transition-duration: 0.15s;
|
|
|
transition-delay: 1s;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__prompt {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.ML__editablePromptBox {
|
|
|
outline: 1px solid #acacac;
|
|
|
border-radius: 2px;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__focusedPromptBox {
|
|
|
outline: highlight auto 1px;
|
|
|
}
|
|
|
.ML__lockedPromptBox {
|
|
|
background-color: rgba(142, 142, 141, 0.4);
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__correctPromptBox {
|
|
|
outline: 1px solid var(--_correct-color);
|
|
|
box-shadow: 0 0 5px var(--_correct-color);
|
|
|
}
|
|
|
.ML__incorrectPromptBox {
|
|
|
outline: 1px solid var(--_incorrect-color);
|
|
|
box-shadow: 0 0 5px var(--_incorrect-color);
|
|
|
}
|
|
|
.variant-submenu {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding: 8px;
|
|
|
}
|
|
|
.variant-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
text-align: center;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.insert-matrix-submenu {
|
|
|
display: grid;
|
|
|
padding: 8px;
|
|
|
align-content: center;
|
|
|
justify-content: center;
|
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
|
}
|
|
|
.insert-matrix-submenu [part=menu-item] {
|
|
|
font-size: 21px;
|
|
|
border: none;
|
|
|
border-radius: 0;
|
|
|
line-height: 21px;
|
|
|
text-align: center;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.border-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
line-height: 1.2;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.swatches-submenu {
|
|
|
--_swatch-size: 2rem;
|
|
|
--_columns: 4;
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
|
padding: 8px;
|
|
|
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.menu-swatch {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
box-sizing: border-box;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
margin: 2px;
|
|
|
padding: 0;
|
|
|
background: var(--neutral-200);
|
|
|
}
|
|
|
.menu-swatch > .label {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
.menu-swatch > .label > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
min-width: var(--_swatch-size);
|
|
|
min-height: var(--_swatch-size);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.menu-swatch.active {
|
|
|
background: var(--neutral-100);
|
|
|
scale: 1.4;
|
|
|
}
|
|
|
.menu-swatch.active > .label > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.menu-swatch .ui-checkmark,
|
|
|
.menu-swatch .ui-mixedmark {
|
|
|
position: absolute;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
color: white;
|
|
|
}
|
|
|
.menu-swatch.dark-contrast .ui-checkmark,
|
|
|
.menu-swatch.dark-contrast .ui-mixedmark {
|
|
|
color: #000;
|
|
|
}
|
|
|
`,zi=`.ML__container {
|
|
|
min-height: auto !important;
|
|
|
--_hue: var(--hue, 212);
|
|
|
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
|
|
|
--_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
|
|
|
}
|
|
|
.ML__sr-only {
|
|
|
position: absolute;
|
|
|
width: 1px;
|
|
|
height: 1px;
|
|
|
margin: -1px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
clip-path: inset(50%);
|
|
|
white-space: nowrap;
|
|
|
border: 0;
|
|
|
}
|
|
|
.ML__is-inline {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__base {
|
|
|
visibility: inherit;
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
cursor: text;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
box-sizing: content-box;
|
|
|
border: 0;
|
|
|
outline: 0;
|
|
|
vertical-align: baseline;
|
|
|
font-weight: inherit;
|
|
|
font-family: inherit;
|
|
|
font-style: inherit;
|
|
|
text-decoration: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__strut,
|
|
|
.ML__strut--bottom {
|
|
|
display: inline-block;
|
|
|
min-height: 0.5em;
|
|
|
}
|
|
|
.ML__small-delim {
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
/* Text mode */
|
|
|
.ML__text {
|
|
|
font-family: var(--_text-font-family);
|
|
|
white-space: pre;
|
|
|
}
|
|
|
/* Use cmr for 'math upright' */
|
|
|
.ML__cmr {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-style: normal;
|
|
|
}
|
|
|
.ML__mathit {
|
|
|
font-family: KaTeX_Math;
|
|
|
/* The KaTeX_Math font is italic by default, so the font-style below is only
|
|
|
useful when a fallback font is used
|
|
|
*/
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__mathbf {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
|
|
|
to match TeX idiosyncratic behavior */
|
|
|
.lcGreek.ML__mathbf {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
.ML__mathbfit {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: bold;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__ams {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
/* Blackboard */
|
|
|
.ML__bb {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
.ML__cal {
|
|
|
font-family: KaTeX_Caligraphic;
|
|
|
}
|
|
|
.ML__frak {
|
|
|
font-family: KaTeX_Fraktur;
|
|
|
}
|
|
|
.ML__tt {
|
|
|
font-family: KaTeX_Typewriter;
|
|
|
}
|
|
|
.ML__script {
|
|
|
font-family: KaTeX_Script;
|
|
|
}
|
|
|
.ML__sans {
|
|
|
font-family: KaTeX_SansSerif;
|
|
|
}
|
|
|
.ML__series_ul {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_el {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_l {
|
|
|
font-weight: 200;
|
|
|
}
|
|
|
.ML__series_sl {
|
|
|
font-weight: 300;
|
|
|
}
|
|
|
.ML__series_sb {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
.ML__bold,
|
|
|
.ML__boldsymbol {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
.ML__series_eb {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
.ML__series_ub {
|
|
|
font-weight: 900;
|
|
|
}
|
|
|
.ML__series_uc {
|
|
|
font-stretch: ultra-condensed;
|
|
|
}
|
|
|
.ML__series_ec {
|
|
|
font-stretch: extra-condensed;
|
|
|
}
|
|
|
.ML__series_c {
|
|
|
font-stretch: condensed;
|
|
|
}
|
|
|
.ML__series_sc {
|
|
|
font-stretch: semi-condensed;
|
|
|
}
|
|
|
.ML__series_sx {
|
|
|
font-stretch: semi-expanded;
|
|
|
}
|
|
|
.ML__series_x {
|
|
|
font-stretch: expanded;
|
|
|
}
|
|
|
.ML__series_ex {
|
|
|
font-stretch: extra-expanded;
|
|
|
}
|
|
|
.ML__series_ux {
|
|
|
font-stretch: ultra-expanded;
|
|
|
}
|
|
|
.ML__it {
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__shape_ol {
|
|
|
-webkit-text-stroke: 1px black;
|
|
|
text-stroke: 1px black;
|
|
|
color: transparent;
|
|
|
}
|
|
|
.ML__shape_sc {
|
|
|
font-variant: small-caps;
|
|
|
}
|
|
|
.ML__shape_sl {
|
|
|
font-style: oblique;
|
|
|
}
|
|
|
/* First level emphasis */
|
|
|
.ML__emph {
|
|
|
color: #bc2612;
|
|
|
}
|
|
|
/* Second level emphasis */
|
|
|
.ML__emph .ML__emph {
|
|
|
color: #0c7f99;
|
|
|
}
|
|
|
.ML__highlight {
|
|
|
color: #007cb2;
|
|
|
background: #edd1b0;
|
|
|
}
|
|
|
.ML__center {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__label_padding {
|
|
|
padding: 0 0.5em;
|
|
|
}
|
|
|
.ML__frac-line {
|
|
|
width: 100%;
|
|
|
min-height: 1px;
|
|
|
}
|
|
|
.ML__frac-line:after {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: max(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
/* There's a bug since Chrome 62 where
|
|
|
sub-pixel border lines don't draw at some zoom
|
|
|
levels (110%, 90%).
|
|
|
Setting the min-height used to work around it, but that workaround
|
|
|
broke in Chrome 84 or so.
|
|
|
Setting the background (and the min-height) seems to work for now.
|
|
|
*/
|
|
|
background: currentColor;
|
|
|
box-sizing: content-box;
|
|
|
/* Vuetify sets the box-sizing to inherit
|
|
|
causes the fraction line to not draw at all sizes (see #26) */
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__sqrt-sign {
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__sqrt-line {
|
|
|
display: inline-block;
|
|
|
height: max(1px, 0.04em);
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__sqrt-line:before {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: min(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
background: currentColor;
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt-line:after {
|
|
|
border-bottom-width: 1px;
|
|
|
content: ' ';
|
|
|
display: block;
|
|
|
margin-top: -0.1em;
|
|
|
}
|
|
|
.ML__sqrt-index {
|
|
|
margin-left: 0.27777778em;
|
|
|
margin-right: -0.55555556em;
|
|
|
}
|
|
|
.ML__delim-size1 {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-size2 {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__delim-size3 {
|
|
|
font-family: KaTeX_Size3;
|
|
|
}
|
|
|
.ML__delim-size4 {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size1 > span {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size4 > span {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__accent-body > span {
|
|
|
font-family: KaTeX_Main;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__accent-vec {
|
|
|
position: relative;
|
|
|
left: 0.24em;
|
|
|
}
|
|
|
/** The markup for a LaTeX formula, either in an editable mathfield or
|
|
|
in a static display.
|
|
|
*/
|
|
|
.ML__latex {
|
|
|
display: inline-block;
|
|
|
direction: ltr;
|
|
|
text-align: left;
|
|
|
text-indent: 0;
|
|
|
text-rendering: auto;
|
|
|
font-family: KaTeX_Main, 'Times New Roman', serif;
|
|
|
font-style: normal;
|
|
|
font-size-adjust: none;
|
|
|
font-stretch: normal;
|
|
|
font-variant-caps: normal;
|
|
|
letter-spacing: normal;
|
|
|
line-height: 1.2;
|
|
|
word-wrap: normal;
|
|
|
word-spacing: normal;
|
|
|
white-space: nowrap;
|
|
|
text-shadow: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__latex .style-wrap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .mfrac {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .left-right {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist-t {
|
|
|
display: inline-table;
|
|
|
table-layout: fixed;
|
|
|
border-collapse: collapse;
|
|
|
}
|
|
|
.ML__latex .vlist-r {
|
|
|
display: table-row;
|
|
|
}
|
|
|
.ML__latex .vlist {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span {
|
|
|
display: block;
|
|
|
height: 0;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span > span {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist > span > .pstrut {
|
|
|
overflow: hidden;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__latex .vlist-t2 {
|
|
|
margin-right: -2px;
|
|
|
}
|
|
|
.ML__latex .vlist-s {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
font-size: 1px;
|
|
|
width: 2px;
|
|
|
min-width: 2px;
|
|
|
}
|
|
|
.ML__latex .msubsup {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .negativethinspace {
|
|
|
display: inline-block;
|
|
|
margin-left: -0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thinspace {
|
|
|
display: inline-block;
|
|
|
width: 0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .mediumspace {
|
|
|
display: inline-block;
|
|
|
width: 0.22222em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thickspace {
|
|
|
display: inline-block;
|
|
|
width: 0.27778em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .enspace {
|
|
|
display: inline-block;
|
|
|
width: 0.5em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .quad {
|
|
|
display: inline-block;
|
|
|
width: 1em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .qquad {
|
|
|
display: inline-block;
|
|
|
width: 2em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .llap,
|
|
|
.ML__latex .rlap {
|
|
|
width: 0;
|
|
|
position: relative;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner,
|
|
|
.ML__latex .rlap > .inner {
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__latex .llap > .fix,
|
|
|
.ML__latex .rlap > .fix {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner {
|
|
|
right: 0;
|
|
|
}
|
|
|
.ML__latex .rlap > .inner {
|
|
|
left: 0;
|
|
|
}
|
|
|
.ML__latex .rule {
|
|
|
display: inline-block;
|
|
|
border: solid 0;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line,
|
|
|
.ML__latex .underline .underline-line {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:before,
|
|
|
.ML__latex .underline .underline-line:before {
|
|
|
content: '';
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:after,
|
|
|
.ML__latex .underline .underline-line:after {
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: -1px;
|
|
|
}
|
|
|
.ML__latex .stretchy {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .stretchy:before,
|
|
|
.ML__latex .stretchy:after {
|
|
|
content: '';
|
|
|
}
|
|
|
.ML__latex .stretchy svg {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
height: inherit;
|
|
|
fill: currentColor;
|
|
|
stroke: currentColor;
|
|
|
fill-rule: nonzero;
|
|
|
fill-opacity: 1;
|
|
|
stroke-width: 1;
|
|
|
stroke-linecap: butt;
|
|
|
stroke-linejoin: miter;
|
|
|
stroke-miterlimit: 4;
|
|
|
stroke-dasharray: none;
|
|
|
stroke-dashoffset: 0;
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 25%;
|
|
|
width: 50%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-3-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-1 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .nulldelimiter {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-group {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-symbol {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .op-symbol.small-op {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__latex .op-symbol.large-op {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__latex .mtable .vertical-separator {
|
|
|
display: inline-block;
|
|
|
min-width: 1px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .mtable .arraycolsep {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-m > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-c > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-l > .vlist-t {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-r > .vlist-t {
|
|
|
text-align: right;
|
|
|
}
|
|
|
.ML__error {
|
|
|
display: inline-block;
|
|
|
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
|
|
|
background-color: hsla(341, 100%, 40%, 0.1);
|
|
|
background-repeat: repeat-x;
|
|
|
background-size: 3px 3px;
|
|
|
padding-bottom: 3px;
|
|
|
background-position: 0 100%;
|
|
|
}
|
|
|
.ML__error > .ML__error {
|
|
|
background: transparent;
|
|
|
padding: 0;
|
|
|
}
|
|
|
.ML__placeholder {
|
|
|
color: var(--_placeholder-color);
|
|
|
opacity: var(--_placeholder-opacity);
|
|
|
padding-left: 0.4ex;
|
|
|
padding-right: 0.4ex;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
}
|
|
|
.ML__notation {
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
|
|
|
For UI elements, see \`[data-ML__tooltip]\`
|
|
|
*/
|
|
|
.ML__tooltip-container {
|
|
|
position: relative;
|
|
|
transform: scale(0);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content {
|
|
|
position: fixed;
|
|
|
display: inline-table;
|
|
|
visibility: hidden;
|
|
|
z-index: 2;
|
|
|
width: max-content;
|
|
|
max-width: 400px;
|
|
|
padding: 12px 12px;
|
|
|
border-radius: 8px;
|
|
|
background: #616161;
|
|
|
--_selection-color: #fff;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
opacity: 0;
|
|
|
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__text {
|
|
|
white-space: normal;
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__base {
|
|
|
display: contents;
|
|
|
}
|
|
|
.ML__tooltip-container:hover .ML__tooltip-content {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
font-size: 0.75em;
|
|
|
transform: scale(1) translate(0, 3em);
|
|
|
}
|
|
|
`,gh=`#mathlive-environment-popover.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
#mathlive-environment-popover {
|
|
|
--_environment-panel-height: var(--environment-panel-height, 70px);
|
|
|
--_accent-color: var(--accent-color, #aaa);
|
|
|
--_background: var(--environment-panel-background, #fff);
|
|
|
--_button-background: var(--environment-panel-button-background, white);
|
|
|
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
|
|
|
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
|
|
|
--_button-text: var(--environment-panel-button-text, #e3e4e8);
|
|
|
position: absolute;
|
|
|
width: calc(var(--_environment-panel-height) * 2);
|
|
|
height: var(--_environment-panel-height);
|
|
|
border-radius: 4px;
|
|
|
border: 1.5px solid var(--_accent-color);
|
|
|
background-color: var(--_background);
|
|
|
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
|
|
|
pointer-events: all;
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons {
|
|
|
height: calc(var(--_environment-panel-height) * 5/4);
|
|
|
width: calc(var(--_environment-panel-height) * 5/4);
|
|
|
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
|
|
|
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .font {
|
|
|
fill: white;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons circle {
|
|
|
fill: #7f7f7f;
|
|
|
transition: fill 300ms;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
|
|
|
fill-opacity: 1;
|
|
|
fill: var(--_background);
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-width: 3px;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons line {
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-opacity: 0;
|
|
|
stroke-width: 40;
|
|
|
pointer-events: none;
|
|
|
transition: stroke-opacity 300ms;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
|
|
|
height: 100%;
|
|
|
width: 50%;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
|
|
|
width: var(--_environment-panel-height);
|
|
|
height: var(--_environment-panel-height);
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
|
|
|
pointer-events: all;
|
|
|
margin-top: 2px;
|
|
|
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
|
|
|
height: calc(var(--_environment-panel-height) / 3 - 2px);
|
|
|
border-radius: calc(var(--_environment-panel-height) / 25);
|
|
|
background-color: var(--_button-background);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
|
|
|
background-color: var(--_button-background-hover);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
|
|
|
stroke: var(--_button-text);
|
|
|
stroke-width: 2;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
|
|
|
fill-opacity: 0;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
|
|
|
pointer-events: none;
|
|
|
background-color: var(--_button-background-active);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
|
|
|
stroke: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
`,uf=`/* The element that display info while in latex mode */
|
|
|
#mathlive-suggestion-popover {
|
|
|
background-color: rgba(97, 97, 97);
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
border-radius: 8px;
|
|
|
position: fixed;
|
|
|
z-index: 1;
|
|
|
display: none;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
}
|
|
|
#mathlive-suggestion-popover.top-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
top: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-bottom: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.bottom-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
bottom: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-top: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-animated {
|
|
|
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-visible {
|
|
|
display: flex;
|
|
|
}
|
|
|
@keyframes ML__fade-in {
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
/* The wrapper class for the entire content of the popover panel */
|
|
|
#mathlive-suggestion-popover ul {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
list-style: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
align-items: flex-start;
|
|
|
max-height: 400px;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
margin: 8px;
|
|
|
padding: 8px;
|
|
|
width: calc(100% - 16px - 16px);
|
|
|
column-gap: 1em;
|
|
|
border-radius: 8px;
|
|
|
cursor: pointer;
|
|
|
/* Since the content can be clicked on, provide feedback on hover */
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a {
|
|
|
color: #5ea6fd;
|
|
|
padding-top: 0.3em;
|
|
|
margin-top: 0.4em;
|
|
|
display: block;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a:hover {
|
|
|
color: #5ea6fd;
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li:hover,
|
|
|
#mathlive-suggestion-popover li.is-pressed,
|
|
|
#mathlive-suggestion-popover li.is-active {
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
}
|
|
|
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
|
|
|
.ML__popover__command {
|
|
|
font-size: 1.6rem;
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
.ML__popover__current {
|
|
|
background: #5ea6fd;
|
|
|
color: #fff;
|
|
|
}
|
|
|
.ML__popover__latex {
|
|
|
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
align-self: center;
|
|
|
}
|
|
|
/* The keyboard shortcuts for a symbol as displayed in the popover */
|
|
|
.ML__popover__keybinding {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 0.8em;
|
|
|
opacity: 0.7;
|
|
|
}
|
|
|
/* Style for the character that joins the modifiers of a keyboard shortcut
|
|
|
(usually a "+" sign)*/
|
|
|
.ML__shortcut-join {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
`,Il=`/* The element that displays the keys as the user type them */
|
|
|
#mathlive-keystroke-caption-panel {
|
|
|
visibility: hidden;
|
|
|
/*min-width: 160px;*/
|
|
|
/*background-color: rgba(97, 97, 200, .95);*/
|
|
|
background: var(--secondary, hsl(var(--_hue), 19%, 26%));
|
|
|
border-color: var(--secondary-border, hsl(0, 0%, 91%));
|
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 16px;
|
|
|
position: absolute;
|
|
|
z-index: 1;
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse;
|
|
|
justify-content: center;
|
|
|
--keystroke: white;
|
|
|
--on-keystroke: #555;
|
|
|
--keystroke-border: #f7f7f7;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
body:not([theme='light']) #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
}
|
|
|
body[theme='dark'] #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
#mathlive-keystroke-caption-panel > span {
|
|
|
min-width: 14px;
|
|
|
/*height: 8px;*/
|
|
|
margin: 0 8px 0 0;
|
|
|
padding: 4px;
|
|
|
background-color: var(--keystroke);
|
|
|
color: var(--on-keystroke);
|
|
|
fill: currentColor;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 1em;
|
|
|
border-radius: 6px;
|
|
|
border: 2px solid var(--keystroke-border);
|
|
|
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
|
|
|
}
|
|
|
`,cf=`.ML__keyboard {
|
|
|
--_keyboard-height: 0;
|
|
|
--_keyboard-zindex: var(--keyboard-zindex, 105);
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
|
|
|
--_padding-top: var(--keyboard-padding-top, 5px);
|
|
|
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
|
|
|
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
|
|
|
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
|
|
|
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
|
|
|
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_keycap-height: var(--keycap-height, 60px);
|
|
|
/* Keycap width (incl. margin) */
|
|
|
--_keycap-max-width: var(--keycap-max-width, 100px);
|
|
|
--_keycap-gap: var(--keycap-gap, 8px);
|
|
|
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
|
|
|
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
|
|
|
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 70px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
|
|
|
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
|
|
|
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
|
|
|
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
|
|
|
--_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
|
|
|
}
|
|
|
.is-math-mode .MLK__rows .if-text-mode,
|
|
|
.is-text-mode .MLK__rows .if-math-mode {
|
|
|
display: none;
|
|
|
}
|
|
|
.if-can-undo,
|
|
|
.if-can-redo,
|
|
|
.if-can-copy,
|
|
|
.if-can-cut,
|
|
|
.if-can-paste {
|
|
|
opacity: 0.4;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.can-undo .if-can-undo,
|
|
|
.can-redo .if-can-redo,
|
|
|
.can-copy .if-can-copy,
|
|
|
.can-cut .if-can-cut,
|
|
|
.can-paste .if-can-paste {
|
|
|
opacity: 1;
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
body > .ML__keyboard {
|
|
|
position: fixed;
|
|
|
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
|
|
|
border-top: 1px solid var(--_border);
|
|
|
}
|
|
|
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
|
|
|
box-shadow: none;
|
|
|
border: none;
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
|
|
|
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
|
|
|
transition-property: transform, opacity;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__keyboard {
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
z-index: var(--_keyboard-zindex);
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
opacity: 1;
|
|
|
transform: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.ML__keyboard :where(div) {
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
transform: none;
|
|
|
}
|
|
|
.MLK__backdrop {
|
|
|
position: absolute;
|
|
|
bottom: calc(-1 * var(--_keyboard-height));
|
|
|
width: 100%;
|
|
|
height: var(--_keyboard-height);
|
|
|
box-sizing: border-box;
|
|
|
padding-top: var(--_padding-top);
|
|
|
padding-bottom: var(--_padding-bottom);
|
|
|
padding-left: var(--_padding-horizontal);
|
|
|
padding-right: var(--_padding-horizontal);
|
|
|
opacity: 0;
|
|
|
visibility: hidden;
|
|
|
transform: translate(0, 0);
|
|
|
background: var(--_background);
|
|
|
}
|
|
|
.backdrop-is-transparent .MLK__backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop
|
|
|
(backdrop-is-transparent), make sure to let pointer event go through. */
|
|
|
.backdrop-is-transparent .MLK__plate {
|
|
|
background: transparent;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop, make sure to
|
|
|
allow pointer events on it. */
|
|
|
.backdrop-is-transparent .MLK__layer > div > div {
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
.ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
transform: translate(0, calc(-1 * var(--_keyboard-height)));
|
|
|
opacity: 1;
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.caps-lock-indicator {
|
|
|
display: none;
|
|
|
width: 8px;
|
|
|
height: 8px;
|
|
|
background: #0cbc0c;
|
|
|
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
|
|
|
border-radius: 8px;
|
|
|
right: 8px;
|
|
|
top: 8px;
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .caps-lock-indicator {
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .shift {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
}
|
|
|
.MLK__plate {
|
|
|
position: absolute;
|
|
|
top: var(--_padding-top);
|
|
|
left: var(--_padding-horizontal);
|
|
|
width: calc(100% - 2 * var(--_padding-horizontal));
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
box-sizing: border-box;
|
|
|
container-type: inline-size;
|
|
|
touch-action: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
pointer-events: all;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 16px;
|
|
|
/* Size of toolbar labels */
|
|
|
font-weight: 400;
|
|
|
text-shadow: none;
|
|
|
}
|
|
|
.ML__box-placeholder {
|
|
|
color: var(--_box-placeholder-color);
|
|
|
}
|
|
|
.MLK__tex {
|
|
|
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__tex-math {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.MLK__layer {
|
|
|
display: none;
|
|
|
outline: none;
|
|
|
}
|
|
|
.MLK__layer.is-visible {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
}
|
|
|
/* Keyboard layouts are made or rows of keys... */
|
|
|
.MLK__rows {
|
|
|
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
border-collapse: separate;
|
|
|
clear: both;
|
|
|
border: 0;
|
|
|
margin: 0;
|
|
|
margin-bottom: var(--_keycap-gap);
|
|
|
gap: var(--_keycap-gap);
|
|
|
/* If the styling include, e.g., some shadows, they will be
|
|
|
cut off by the overflow. In that case, set the padding to
|
|
|
compensate. */
|
|
|
padding-left: var(--_row-padding-left);
|
|
|
padding-right: var(--_row-padding-right);
|
|
|
overflow: visible;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: center;
|
|
|
width: 100%;
|
|
|
gap: var(--_keycap-gap);
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
/* For the alignment of the text on some modifiers (e.g. shift) */
|
|
|
/* Extra spacing between two adjacent keys */
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex-math {
|
|
|
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .big-op {
|
|
|
font-size: calc(1.25 * var(--_keycap-font-size));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bottom {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .left {
|
|
|
align-items: flex-start;
|
|
|
padding-left: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .right {
|
|
|
align-items: flex-end;
|
|
|
padding-right: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w0 {
|
|
|
width: 0;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w5 {
|
|
|
width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w15 {
|
|
|
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w20 {
|
|
|
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w40 {
|
|
|
width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w50 {
|
|
|
width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .MLK__keycap.w50 {
|
|
|
font-size: 80%;
|
|
|
padding-top: 10px;
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .separator {
|
|
|
background: transparent;
|
|
|
border: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .horizontal-rule {
|
|
|
height: 6px;
|
|
|
margin-top: 3px;
|
|
|
margin-bottom: 0;
|
|
|
width: 100%;
|
|
|
border-radius: 0;
|
|
|
border-top: var(--_horizontal-rule);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost {
|
|
|
background: var(--_toolbar-background);
|
|
|
border: none;
|
|
|
color: var(--_toolbar-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost:hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bigfnbutton {
|
|
|
font-size: var(--_keycap-extra-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift,
|
|
|
.MLK__rows > .MLK__row .action {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
background: var(--_keycap-secondary-background);
|
|
|
border-color: var(--_keycap-secondary-border);
|
|
|
border-bottom-color: var(--_keycap-secondary-border-bottom);
|
|
|
line-height: 0.8;
|
|
|
font-size: min(1rem, var(--_keycap-small-font-size));
|
|
|
font-weight: 600;
|
|
|
padding: 8px 12px 8px 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift:hover,
|
|
|
.MLK__rows > .MLK__row .action:hover {
|
|
|
background: var(--_keycap-secondary-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary {
|
|
|
background: var(--_keycap-primary-background);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary:hover {
|
|
|
background: var(--_keycap-primary-background-hover);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected,
|
|
|
.MLK__rows > .MLK__row .action.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-active,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-active {
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning {
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning svg.svg-glyph {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
/** A regular keycap
|
|
|
* Use the :where() pseudo-class to give it a very low specifity,
|
|
|
* so that it can be overriden by custom style.
|
|
|
*/
|
|
|
:where(.MLK__rows > .MLK__row div) {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: space-evenly;
|
|
|
width: calc(var(--_keycap-width) - var(--_keycap-gap));
|
|
|
height: var(--_keycap-height);
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
vertical-align: top;
|
|
|
text-align: center;
|
|
|
float: left;
|
|
|
color: var(--_keycap-text);
|
|
|
fill: currentColor;
|
|
|
font-size: var(--_keycap-font-size);
|
|
|
background: var(--_keycap-background);
|
|
|
border: 1px solid var(--_keycap-border);
|
|
|
border-bottom-color: var(--_keycap-border-bottom);
|
|
|
border-radius: 6px;
|
|
|
cursor: pointer;
|
|
|
touch-action: none;
|
|
|
/* Keys with a variants panel */
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div):hover {
|
|
|
overflow: visible;
|
|
|
background: var(--_keycap-background-hover);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) .ML__latex {
|
|
|
pointer-events: none;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
|
|
|
margin: 8px 0;
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
|
min-height: 20px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
|
|
|
margin: 8px 0;
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__tex-math {
|
|
|
font-size: 25px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
z-index: calc(var(--_keyboard-zindex) - 5);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) small {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) aside {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 10px;
|
|
|
line-height: 10px;
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
|
|
|
Note there are a different set of tooltip rules for the keyboard toggle
|
|
|
(it's in a different CSS tree) */
|
|
|
.ML__keyboard [data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]::after {
|
|
|
position: absolute;
|
|
|
display: inline-table;
|
|
|
content: attr(data-tooltip);
|
|
|
top: inherit;
|
|
|
bottom: 100%;
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
z-index: 2;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
border-radius: 2px;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-weight: 400;
|
|
|
font-size: 12px;
|
|
|
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover::after {
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
}
|
|
|
.MLK__toolbar {
|
|
|
align-self: center;
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
width: 100%;
|
|
|
max-width: 996px;
|
|
|
min-height: 32px;
|
|
|
/* Icons for undo/redo, etc. */
|
|
|
}
|
|
|
.MLK__toolbar svg {
|
|
|
height: 20px;
|
|
|
width: 20px;
|
|
|
}
|
|
|
.MLK__toolbar > .left {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > .right {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
/* "button" in the toolbar */
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
color: var(--_toolbar-text);
|
|
|
fill: currentColor;
|
|
|
background: var(--_toolbar-background);
|
|
|
font-size: var(--_toolbar-font-size);
|
|
|
padding: 4px 15px;
|
|
|
cursor: pointer;
|
|
|
width: max-content;
|
|
|
min-width: 42px;
|
|
|
min-height: 34px;
|
|
|
border: none;
|
|
|
padding-left: 10px;
|
|
|
padding-right: 10px;
|
|
|
padding-bottom: 8px;
|
|
|
padding-top: 8px;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 4px;
|
|
|
margin-left: 4px;
|
|
|
margin-right: 4px;
|
|
|
border-radius: 8px;
|
|
|
box-shadow: none;
|
|
|
border-bottom: 2px solid transparent;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.disabled svg,
|
|
|
.MLK__toolbar > div > div.disabled:hover svg,
|
|
|
.MLK__toolbar > div > div.disabled.is-pressed svg {
|
|
|
color: var(--_toolbar-text);
|
|
|
opacity: 0.2;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:hover,
|
|
|
.MLK__toolbar > div > div:active,
|
|
|
.MLK__toolbar > div > div.is-pressed,
|
|
|
.MLK__toolbar > div > div.is-active {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
background: var(--_toolbar-background-selected);
|
|
|
border-radius: 0;
|
|
|
border-bottom-color: var(--_toolbar-text-active);
|
|
|
padding-bottom: 4px;
|
|
|
margin-bottom: 8px;
|
|
|
}
|
|
|
/* This is the element that displays variants on press+hold */
|
|
|
.MLK__variant-panel {
|
|
|
visibility: hidden;
|
|
|
position: fixed;
|
|
|
display: flex;
|
|
|
flex-flow: row wrap-reverse;
|
|
|
justify-content: center;
|
|
|
align-content: center;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
bottom: auto;
|
|
|
top: 0;
|
|
|
box-sizing: content-box;
|
|
|
transform: none;
|
|
|
z-index: calc(var(--_keyboard-zindex) + 1);
|
|
|
touch-action: none;
|
|
|
max-width: 350px;
|
|
|
background: var(--_variant-panel-background);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 6px;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
transition: none;
|
|
|
}
|
|
|
.MLK__variant-panel.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.MLK__variant-panel.compact {
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
|
|
|
}
|
|
|
.MLK__variant-panel .item {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
font-size: var(--_variant-keycap-font-size);
|
|
|
height: var(--_variant-keycap-length);
|
|
|
width: var(--_variant-keycap-length);
|
|
|
margin: 0;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
border: 1px solid transparent;
|
|
|
background: transparent;
|
|
|
pointer-events: all;
|
|
|
cursor: pointer;
|
|
|
color: var(--_variant-keycap-text);
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
@media (max-height: 412px) {
|
|
|
.MLK__variant-panel .item {
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
.MLK__variant-panel .item .ML__latex {
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-active {
|
|
|
background: var(--_variant-keycap-background-active);
|
|
|
color: var(--_variant-keycap-text-active);
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-pressed {
|
|
|
background: var(--_variant-keycap-background-pressed);
|
|
|
color: var(--_variant-keycap-text-pressed);
|
|
|
}
|
|
|
.MLK__variant-panel .item.small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button {
|
|
|
box-sizing: border-box;
|
|
|
background: #fbfbfb;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
width: calc(100% - 12px);
|
|
|
height: calc(100% - 12px);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover {
|
|
|
background: #f0f0f0;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.MLK__variant-panel .item.box > div,
|
|
|
.MLK__variant-panel .item.box > span {
|
|
|
border: 1px dashed rgba(0, 0, 0, 0.24);
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning {
|
|
|
min-height: 60px;
|
|
|
min-width: 60px;
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
padding: 5px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-radius: 5px;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning.is-pressed,
|
|
|
.MLK__variant-panel .item .warning.is-active {
|
|
|
background: red;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning svg.svg-glyph {
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
}
|
|
|
.MLK__variant-panel .item aside {
|
|
|
font-size: var(--_variant-keycap-aside-font-size);
|
|
|
line-height: 12px;
|
|
|
opacity: 0.78;
|
|
|
padding-top: 2px;
|
|
|
}
|
|
|
.MLK__keycap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
right: 4px;
|
|
|
top: 4px;
|
|
|
font-size: var(--_keycap-shift-font-size);
|
|
|
color: var(--_keycap-shift-color);
|
|
|
}
|
|
|
.hide-shift .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
@media (max-width: 414px) {
|
|
|
.MLK__variant-panel {
|
|
|
max-width: 350px;
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
/* @xs breakpoint: iPhone 5 */
|
|
|
@container (max-width: 414px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--_keycap-height), 42px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
font-size: 100%;
|
|
|
margin-left: 2px;
|
|
|
margin-right: 2px;
|
|
|
}
|
|
|
.MLK__rows .shift,
|
|
|
.MLK__rows .action {
|
|
|
font-size: 65%;
|
|
|
}
|
|
|
.MLK__rows .warning svg.svg-glyph {
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
min-height: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 744px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--keycap-height, 52px), 52px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
padding-left: 0;
|
|
|
padding-right: 0;
|
|
|
}
|
|
|
.MLK__tooltip::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.fnbutton {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.bigfnbutton {
|
|
|
font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.small {
|
|
|
font-size: 13px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > aside {
|
|
|
display: none;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
/* Medium breakpoint: larger phones */
|
|
|
@container (max-width: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@media (max-height: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 1444px) {
|
|
|
.MLK__rows .if-wide {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
.ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
}
|
|
|
/* Same as the media query, but with a class */
|
|
|
[theme='dark'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
[theme='light'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--_keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
}
|
|
|
`,ic=`:host {
|
|
|
--primary-color: #5898ff;
|
|
|
--primary-color-dimmed: #c0c0f0;
|
|
|
--primary-color-dark: var(--blue-500);
|
|
|
--primary-color-light: var(--blue-100);
|
|
|
--primary-color-reverse: #ffffff;
|
|
|
--secondary-color: #ff8a65;
|
|
|
--secondary-color-dimmed: #f0d5c5;
|
|
|
--secondary-color-dark: var(--orange-500);
|
|
|
--secondary-color-light: var(--orange-100);
|
|
|
--secondary-color-reverse: #ffffff;
|
|
|
--link-color: #5898ff;
|
|
|
--link-color-dimmed: #c5c5c5;
|
|
|
--link-color-dark: #121212;
|
|
|
--link-color-light: #e2e2e2;
|
|
|
--link-color-reverse: #ffffff;
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--neutral-100: #f5f5f5;
|
|
|
--neutral-200: #eeeeee;
|
|
|
--neutral-300: #e0e0e0;
|
|
|
--neutral-400: #bdbdbd;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #757575;
|
|
|
--neutral-700: #616161;
|
|
|
--neutral-800: #424242;
|
|
|
--neutral-900: #212121;
|
|
|
--red-25: #fff8f7;
|
|
|
--red-50: #fff1ef;
|
|
|
--red-100: #ffeae6;
|
|
|
--red-200: #ffcac1;
|
|
|
--red-300: #ffa495;
|
|
|
--red-400: #ff7865;
|
|
|
--red-500: #f21c0d;
|
|
|
--red-600: #e50018;
|
|
|
--red-700: #d30024;
|
|
|
--red-800: #bd002c;
|
|
|
--red-900: #a1002f;
|
|
|
--orange-25: #fffbf8;
|
|
|
--orange-50: #fff7f1;
|
|
|
--orange-100: #fff3ea;
|
|
|
--orange-200: #ffe1c9;
|
|
|
--orange-300: #ffcca2;
|
|
|
--orange-400: #ffb677;
|
|
|
--orange-500: #fe9310;
|
|
|
--orange-600: #f58700;
|
|
|
--orange-700: #ea7c00;
|
|
|
--orange-800: #dc6d00;
|
|
|
--orange-900: #ca5b00;
|
|
|
--brown-25: #fff8ef;
|
|
|
--brown-50: #fff1df;
|
|
|
--brown-100: #ffe9ce;
|
|
|
--brown-200: #ebcca6;
|
|
|
--brown-300: #cdaf8a;
|
|
|
--brown-400: #af936f;
|
|
|
--brown-500: #856a47;
|
|
|
--brown-600: #7f5e34;
|
|
|
--brown-700: #78511f;
|
|
|
--brown-800: #6e4200;
|
|
|
--brown-900: #593200;
|
|
|
--yellow-25: #fffdf9;
|
|
|
--yellow-50: #fffcf2;
|
|
|
--yellow-100: #fffaec;
|
|
|
--yellow-200: #fff2ce;
|
|
|
--yellow-300: #ffe8ab;
|
|
|
--yellow-400: #ffdf85;
|
|
|
--yellow-500: #ffcf33;
|
|
|
--yellow-600: #f1c000;
|
|
|
--yellow-700: #dfb200;
|
|
|
--yellow-800: #c9a000;
|
|
|
--yellow-900: #ad8a00;
|
|
|
--lime-25: #f4ffee;
|
|
|
--lime-50: #e9ffdd;
|
|
|
--lime-100: #ddffca;
|
|
|
--lime-200: #a8fb6f;
|
|
|
--lime-300: #94e659;
|
|
|
--lime-400: #80d142;
|
|
|
--lime-500: #63b215;
|
|
|
--lime-600: #45a000;
|
|
|
--lime-700: #268e00;
|
|
|
--lime-800: #007417;
|
|
|
--lime-900: #005321;
|
|
|
--green-25: #f5fff5;
|
|
|
--green-50: #ebffea;
|
|
|
--green-100: #e0ffdf;
|
|
|
--green-200: #a7ffa7;
|
|
|
--green-300: #5afa65;
|
|
|
--green-400: #45e953;
|
|
|
--green-500: #17cf36;
|
|
|
--green-600: #00b944;
|
|
|
--green-700: #00a34a;
|
|
|
--green-800: #008749;
|
|
|
--green-900: #00653e;
|
|
|
--teal-25: #f3ffff;
|
|
|
--teal-50: #e6fffe;
|
|
|
--teal-100: #d9fffe;
|
|
|
--teal-200: #8dfffe;
|
|
|
--teal-300: #57f4f4;
|
|
|
--teal-400: #43e5e5;
|
|
|
--teal-500: #17cfcf;
|
|
|
--teal-600: #00c2c0;
|
|
|
--teal-700: #00b5b1;
|
|
|
--teal-800: #00a49e;
|
|
|
--teal-900: #009087;
|
|
|
--cyan-25: #f7fcff;
|
|
|
--cyan-50: #eff8ff;
|
|
|
--cyan-100: #e7f5ff;
|
|
|
--cyan-200: #c2e6ff;
|
|
|
--cyan-300: #95d5ff;
|
|
|
--cyan-400: #61c4ff;
|
|
|
--cyan-500: #13a7ec;
|
|
|
--cyan-600: #069eda;
|
|
|
--cyan-700: #0095c9;
|
|
|
--cyan-800: #0088b2;
|
|
|
--cyan-900: #0a7897;
|
|
|
--blue-25: #f7faff;
|
|
|
--blue-50: #eef5ff;
|
|
|
--blue-100: #e5f1ff;
|
|
|
--blue-200: #bfdbff;
|
|
|
--blue-300: #92c2ff;
|
|
|
--blue-400: #63a8ff;
|
|
|
--blue-500: #0d80f2;
|
|
|
--blue-600: #0077db;
|
|
|
--blue-700: #006dc4;
|
|
|
--blue-800: #0060a7;
|
|
|
--blue-900: #005086;
|
|
|
--indigo-25: #f8f7ff;
|
|
|
--indigo-50: #f1efff;
|
|
|
--indigo-100: #eae7ff;
|
|
|
--indigo-200: #ccc3ff;
|
|
|
--indigo-300: #ac99ff;
|
|
|
--indigo-400: #916aff;
|
|
|
--indigo-500: #63c;
|
|
|
--indigo-600: #5a21b2;
|
|
|
--indigo-700: #4e0b99;
|
|
|
--indigo-800: #3b0071;
|
|
|
--indigo-900: #220040;
|
|
|
--purple-25: #fbf7ff;
|
|
|
--purple-50: #f8f0ff;
|
|
|
--purple-100: #f4e8ff;
|
|
|
--purple-200: #e4c4ff;
|
|
|
--purple-300: #d49aff;
|
|
|
--purple-400: #c36aff;
|
|
|
--purple-500: #a219e6;
|
|
|
--purple-600: #9000c4;
|
|
|
--purple-700: #7c009f;
|
|
|
--purple-800: #600073;
|
|
|
--purple-900: #3d0043;
|
|
|
--magenta-25: #fff8fb;
|
|
|
--magenta-50: #fff2f6;
|
|
|
--magenta-100: #ffebf2;
|
|
|
--magenta-200: #ffcddf;
|
|
|
--magenta-300: #ffa8cb;
|
|
|
--magenta-400: #ff7fb7;
|
|
|
--magenta-500: #eb4799;
|
|
|
--magenta-600: #da3689;
|
|
|
--magenta-700: #c82179;
|
|
|
--magenta-800: #b00065;
|
|
|
--magenta-900: #8a004c;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
/* @media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--label-color: #fff;
|
|
|
--active-label-color: #000;
|
|
|
--menu-bg: #525252;
|
|
|
--active-bg: #5898ff;
|
|
|
--active-bg-dimmed: #5c5c5c;
|
|
|
}
|
|
|
} */
|
|
|
:host {
|
|
|
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
|
|
|
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
|
|
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
|
--ui-font-size: 14px;
|
|
|
--ui-line-height: 1.5;
|
|
|
--ui-letter-spacing: 0.007em;
|
|
|
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
|
|
|
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
|
--ui-layer-1: var(--neutral-100);
|
|
|
--ui-layer-2: var(--neutral-200);
|
|
|
--ui-layer-3: var(--neutral-300);
|
|
|
--ui-layer-4: var(--neutral-400);
|
|
|
--ui-layer-5: var(--neutral-500);
|
|
|
--ui-layer-6: var(--neutral-600);
|
|
|
--ui-border-color: var(--primary-color);
|
|
|
--ui-border-radius: 4px;
|
|
|
--ui-text: var(--neutral-900);
|
|
|
--ui-text-secondary: var(--neutral-700);
|
|
|
--ui-text-placeholder: var(--neutral-500);
|
|
|
--ui-text-muted: var(--neutral-300);
|
|
|
/** A field is a UI element in which a user can type data, for
|
|
|
* example an input or textarea element.
|
|
|
*/
|
|
|
--ui-field-bg: var(--neutral-100);
|
|
|
--ui-field-bg-hover: var(--neutral-100);
|
|
|
--ui-field-bg-disabled: var(--neutral-300);
|
|
|
--ui-field-bg-invalid: var(--red-100);
|
|
|
--ui-field-bg-focus: var(--neutral-100);
|
|
|
--ui-field-border: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-hover: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-disabled: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-invalid: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-focus: 0.5px solid var(--border-color);
|
|
|
--ui-menu-bg: var(--neutral-100);
|
|
|
--ui-menu-text: var(--neutral-900);
|
|
|
--ui-menu-bg-hover: var(--neutral-200);
|
|
|
--ui-menu-text-hover: var(--neutral-900);
|
|
|
/** The \`active\` state is used for the state of menu items
|
|
|
* when they are selected.
|
|
|
*/
|
|
|
--ui-menu-bg-active: var(--primary-color);
|
|
|
--ui-menu-text-active: var(--primary-color-reverse);
|
|
|
/** The \`active-muted\` set is used for the state of
|
|
|
* submenus when they are open.
|
|
|
*/
|
|
|
--ui-menu-bg-active-muted: var(--neutral-300);
|
|
|
--ui-menu-text-active-muted: var(--neutral-900);
|
|
|
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
|
|
|
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
|
|
|
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
|
|
|
--ui-menu-divider: 0.5px solid #c7c7c7;
|
|
|
/* var(--neutral-300); */
|
|
|
--ui-menu-z-index: 10000;
|
|
|
--page-bg: var(--neutral-100);
|
|
|
--content-bg: var(--neutral-200);
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
|
|
|
Noto is a Linux/Android font.
|
|
|
*/
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
|
|
|
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
|
|
|
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
|
|
|
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
|
|
|
}
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
|
|
|
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
|
|
|
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
|
|
|
}
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
|
|
|
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
|
|
|
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
|
|
|
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
|
|
|
}
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
|
|
|
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
|
|
|
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh),
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo),
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac),
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std),
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-size: 1rem;
|
|
|
--ui-line-height: 1.7;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
:dir(rtl) {
|
|
|
--ui-line-height: auto;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
`,df=`.ui-menu *,
|
|
|
.ui-menu ::before,
|
|
|
.ui-menu ::after {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ui-menu {
|
|
|
display: none;
|
|
|
color-scheme: light dark;
|
|
|
-webkit-user-select: none;
|
|
|
/* Important: Safari iOS doesn't respect user-select */
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0 0 0 0);
|
|
|
--active-label-color: #fff;
|
|
|
/* ui-menu-text-active */
|
|
|
--label-color: #121212;
|
|
|
/* ui-menu-text */
|
|
|
--menu-bg: #e2e2e2;
|
|
|
/* ui-menu-background */
|
|
|
--active-bg: #5898ff;
|
|
|
/* ui-menu-background-active */
|
|
|
--active-bg-dimmed: #c5c5c5;
|
|
|
/* ui-menu-background-active-muted */
|
|
|
}
|
|
|
/** Use the :where pseudo selector to make the specificity of the
|
|
|
* selector 0, so that it can be overridden by the user.
|
|
|
*/
|
|
|
:where(.ui-menu-container) {
|
|
|
position: absolute;
|
|
|
overflow: visible;
|
|
|
width: auto;
|
|
|
height: auto;
|
|
|
z-index: 10000;
|
|
|
border-radius: 8px;
|
|
|
background: var(--ui-menu-bg);
|
|
|
box-shadow: var(--ui-menu-shadow);
|
|
|
list-style: none;
|
|
|
padding: 6px 0 6px 0;
|
|
|
margin: 0;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
color: var(--ui-menu-text);
|
|
|
font-weight: normal;
|
|
|
font-style: normal;
|
|
|
text-shadow: none;
|
|
|
text-transform: none;
|
|
|
letter-spacing: 0;
|
|
|
outline: none;
|
|
|
opacity: 1;
|
|
|
/* The [popover] elements have a 1px solid black border. Ugh. */
|
|
|
border: none;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
}
|
|
|
:where(.ui-menu-container > li) {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
align-items: center;
|
|
|
padding: 1px 7px 1px 7px;
|
|
|
margin-top: 0;
|
|
|
margin-left: 6px;
|
|
|
margin-right: 6px;
|
|
|
border-radius: 4px;
|
|
|
white-space: nowrap;
|
|
|
position: relative;
|
|
|
outline: none;
|
|
|
fill: currentColor;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
text-align: left;
|
|
|
color: inherit;
|
|
|
font-family: var(--ui-font-family);
|
|
|
font-size: var(--ui-font-size);
|
|
|
line-height: var(--ui-line-height);
|
|
|
letter-spacing: var(--ui-letter-spacing);
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label) {
|
|
|
appearance: none;
|
|
|
background: none;
|
|
|
outline: none;
|
|
|
width: 100%;
|
|
|
margin: 0;
|
|
|
padding: 1px 2px 1px 1px;
|
|
|
overflow: visible;
|
|
|
border: 1px solid transparent;
|
|
|
white-space: nowrap;
|
|
|
text-align: start;
|
|
|
}
|
|
|
:where(.ui-menu-container > li:has(.heading)) {
|
|
|
margin-top: 0.5em;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.heading) {
|
|
|
font-weight: bold;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.indent > .label) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.indent) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[role='divider']) {
|
|
|
border-bottom: 1px solid var(--ui-menu-divider);
|
|
|
border-radius: 0;
|
|
|
padding: 0;
|
|
|
margin-left: 15px;
|
|
|
margin-right: 15px;
|
|
|
padding-top: 5px;
|
|
|
margin-bottom: 5px;
|
|
|
width: calc(100% - 30px);
|
|
|
/** 100% - (margin-left + margin-right) */
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-disabled='true']) {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active) {
|
|
|
background: var(--ui-menu-bg-active);
|
|
|
background: -apple-system-control-accent;
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active.is-submenu-open) {
|
|
|
background: var(--ui-menu-bg-active-muted);
|
|
|
color: inherit;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
|
|
|
padding-inline-end: 0;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
/** Keyboard shortcut */
|
|
|
:where(.ui-menu-container > li > kbd) {
|
|
|
font-family: var(--ui-font-family);
|
|
|
margin-inline-start: 12px;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active > kbd) {
|
|
|
opacity: 0.85;
|
|
|
}
|
|
|
.ui-trailing-chevron {
|
|
|
display: flex;
|
|
|
margin-inline-start: 24px;
|
|
|
width: 10px;
|
|
|
height: 10px;
|
|
|
margin-bottom: 4px;
|
|
|
}
|
|
|
.ui-trailing-chevron:dir(rtl) {
|
|
|
transform: scaleX(-1);
|
|
|
}
|
|
|
.ui-checkmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
.ui-mixedmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
`,Vi;function hl(a){let b="";switch(a){case"mathfield-element":b=`
|
|
|
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
|
|
|
:host([hidden]) { display: none; }
|
|
|
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
|
|
|
:host(:focus), :host(:focus-within) {
|
|
|
outline: Highlight auto 1px; /* For Firefox */
|
|
|
outline: -webkit-focus-ring-color auto 1px;
|
|
|
}
|
|
|
:host([readonly]:focus), :host([readonly]:focus-within),
|
|
|
:host([read-only]:focus), :host([read-only]:focus-within) {
|
|
|
outline: none;
|
|
|
}
|
|
|
@media (hover: none) and (pointer: coarse) {
|
|
|
:host(:not(:focus)) :first-child { pointer-events: none !important; }
|
|
|
}`;break;case"core":b=zi;break;case"mathfield":b=vh;break;case"environment-popover":b=gh;break;case"suggestion-popover":b=uf;break;case"keystroke-caption":b=Il;break;case"virtual-keyboard":b=cf;break;case"ui":b=ic;break;case"menu":b=df;break;default:debugger}return b}function Pl(a){return Vi||(Vi={}),Vi[a]||(Vi[a]=new CSSStyleSheet,Vi[a].replaceSync(hl(a))),Vi[a]}var bs;function Po(a){var b;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${a}`))return;const y=window.document.createElement("style");y.id=`mathlive-style-${a}`,y.append(window.document.createTextNode(hl(a))),window.document.head.appendChild(y);return}if(bs||(bs={}),((b=bs[a])!=null?b:0)!==0)bs[a]+=1;else{const y=Pl(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,y],bs[a]=1}}function x(a){if("adoptedStyleSheets"in document&&bs!=null&&bs[a]&&(bs[a]-=1,bs[a]<=0)){const b=Vi[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(y=>y!==b)}}var z=class kp extends An{constructor(b){var y;super(Ee(we({},b),{type:"accent",body:(y=b.body)!=null?y:void 0})),b.accentChar?this.accent=b.accentChar:this.svgAccent=b==null?void 0:b.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(b){return new kp(b)}toJson(){return Ee(we({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(b){var y;const E=new wi({parent:b,mathstyle:"cramp"},this.style),ee=(y=An.createBox(E,this.body))!=null?y:new ur("\u25A2",{style:this.style});let re=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(re=ee.skew);let ae=Math.min(ee.height,hs),he;if(this.svgAccent)he=Ro(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const ve=new ur(this.accent,{fontFamily:"Main-Regular"});ve.italic=0;const Ce=this.accent===8407?" ML__accent-vec":"";he=new ur(new ur(ve),{classes:"ML__accent-body"+Ce})}he=new ji({shift:0,children:[{box:new ur(ee)},-ae,{box:he,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const pe=new ur(he,{type:"lift"});return this.caret&&(pe.caret=this.caret),this.bind(E,pe.wrap(E)),this.attachSupsub(E,{base:pe})}},ne={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},te=Object.fromEntries(Object.entries(ne).map(([a,b])=>[b,a]));function ie(a){var b;return(b={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[a])!=null?b:a.codePointAt(0)}function ue(a,b,y,E){var ee;const ae=new ur(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(b);return y&&ae.setTop((1-b.scalingFactor)*ro),ae}function me(a,b,y,E,ee){var re,ae;const he=new wi({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),pe=new ur(ie(a),{fontFamily:`Size${b}-Regular`,isSelected:ee.isSelected,classes:((re=ee.classes)!=null?re:"")+` ML__delim-size${b}`,type:(ae=ee.type)!=null?ae:"ignore"}).wrap(he);return y&&pe.setTop((1-he.scalingFactor)*ro),pe}function Me(a,b,y,E,ee){var re;let ae,he,pe,ve;ae=pe=ve=ie(a),he=null;let Ce="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?pe=ae=ve=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?pe=ae=ve=8741:a==="\\uparrow"?pe=ve=9168:a==="\\Uparrow"?pe=ve=8214:a==="\\downarrow"?ae=pe=9168:a==="\\Downarrow"?ae=pe=8214:a==="\\updownarrow"?(ae=8593,pe=9168,ve=8595):a==="\\Updownarrow"?(ae=8657,pe=8214,ve=8659):a==="["||a==="\\lbrack"?(ae=9121,pe=9122,ve=9123,Ce="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,pe=9125,ve=9126,Ce="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(pe=ae=9122,ve=9123,Ce="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,pe=ve=9122,Ce="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(pe=ae=9125,ve=9126,Ce="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,pe=ve=9125,Ce="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,pe=9116,ve=9117,Ce="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,pe=9119,ve=9120,Ce="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,he=9128,ve=9129,pe=9130,Ce="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,he=9132,ve=9133,pe=9130,Ce="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,ve=9129,pe=9130,Ce="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,ve=9133,pe=9130,Ce="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,ve=9133,pe=9130,Ce="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,ve=9129,pe=9130,Ce="Size4-Regular"):a==="\\surd"?(ae=57345,ve=9143,pe=57344,Ce="Size4-Regular"):a==="\\ulcorner"?(ae=9484,pe=ve=32):a==="\\urcorner"?(ae=9488,pe=ve=32):a==="\\llcorner"?(ve=9492,pe=ae=32):a==="\\lrcorner"&&(ae=9496,pe=ae=32);const Ne=fs(ae,Ce),qe=Ne.height+Ne.depth,vt=fs(pe,Ce),Mt=vt.height+vt.depth,vn=fs(ve,Ce),or=vn.height+vn.depth;let fn=0,zn=1;if(he!==null){const Ga=fs(he,Ce);fn=Ga.height+Ga.depth,zn=2}const hr=qe+or+fn,Wn=Math.max(0,Math.ceil((b-hr)/(zn*Mt))),Rr=hr+Wn*zn*Mt;let jr=ro;y&&(jr=jr*E.scalingFactor);const Kr=Rr/2-jr,Ci=.008,Ki=[];Ki.push({box:new ur(ve,{fontFamily:Ce})}),Ki.push(-Ci);const yr=new ur(pe,{fontFamily:Ce});if(he===null)for(let Ga=0;Ga<Wn;Ga++)Ki.push({box:yr});else{for(let Ga=0;Ga<Wn;Ga++)Ki.push({box:yr});Ki.push(-Ci),Ki.push({box:new ur(he,{fontFamily:Ce})}),Ki.push(-Ci);for(let Ga=0;Ga<Wn;Ga++)Ki.push({box:yr})}Ki.push(-Ci),Ki.push({box:new ur(ae,{fontFamily:Ce})});let Wo="";Ce==="Size1-Regular"?Wo=" delim-size1":Ce==="Size4-Regular"&&(Wo=" delim-size4");const js=new ji({bottom:Kr,children:Ki},{classes:Wo});return new ur(js,Ee(we({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var De=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),Re=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),mt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),kt=[0,1.2,1.8,2.4,3];function rn(a,b,y,E){return a===void 0||a==="."?Pr(y,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),De.has(a)||mt.has(a)?me(a,b,!1,y,E):Re.has(a)?Me(a,kt[b],!1,y,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var Qt=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],In=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],Vn=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function br(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function Mr(a,b,y,E){const ee={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let re=ee;re<y.length&&y[re].type!=="stack";re++){const ae=fs(a,br(y[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let he=ae.height+ae.depth;if(y[re].type==="small"&&(y[re].mathstyle==="scriptscriptstyle"?he*=Math.max(Uu[Math.max(1,E.size-2)],E.minFontScale):y[re].mathstyle==="scriptstyle"&&(he*=Math.max(Uu[Math.max(1,E.size-1)],E.minFontScale))),he>b)return y[re]}return y[y.length-1]}function Br(a,b,y,E,ee,re){if(!b||b.length===0||b===".")return Pr(ee);b==="<"||b==="\\lt"?b="\\langle":(b===">"||b==="\\gt")&&(b="\\rangle");let ae;mt.has(b)?ae=Qt:De.has(b)?ae=Vn:ae=In;const he=Mr(ie(b),y,ae,ee),pe=new wi({parent:ee,mathstyle:he.mathstyle},re==null?void 0:re.style);return he.type==="small"?ue(b,pe,E,Ee(we({},re),{type:a})):he.type==="large"?me(b,he.size,E,pe,Ee(we({},re),{type:a})):(console.assert(he.type==="stack"),Me(b,y,E,pe,Ee(we({},re),{type:a})))}function Sr(a,b,y,E,ee,re){if(b===".")return Pr(ee,re==null?void 0:re.classes);const ae=ro*ee.scalingFactor,he=901,pe=5/ll,ve=Math.max(y-ae,E+ae),Ce=Math.max(ve/500*he,2*ve-pe);return Br(a,b,Ce,!0,ee,re)}function Pr(a,b){const y=new ur(null,{classes:" nulldelimiter "+(b!=null?b:""),type:"ignore"});return y.width=a.getRegisterAsEm("nulldelimiterspace"),y.wrap(new wi({parent:a,mathstyle:"textstyle"}))}var Gr=class Dp extends An{constructor(b){var y;super({type:"placeholder",command:"\\placeholder",mode:(y=b==null?void 0:b.mode)!=null?y:"math",style:b==null?void 0:b.style}),this.captureSelection=!0}static fromJson(b){return new Dp(b)}toJson(){return super.toJson()}render(b){let y;return this.value=b.placeholderSymbol,typeof b.renderPlaceholder=="function"?y=b.renderPlaceholder(b):y=this.createBox(b),this.caret&&(y.classes+=" ML__placeholder-selected"),y}_serialize(b){return b.skipPlaceholders?"":"\\placeholder{}"}},Xr=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],gi=["cases","dcases","rcases"],Gi=["align","align*","aligned","gather","gathered","split"],Fa=["array","subequations","eqnarray"];function ua(a){return Fa.concat(Gi).concat(gi).concat(Xr).includes(a)}function uo(a){return Xr.includes(a)}function co(a){return gi.includes(a)}function Ea(a){return Gi.includes(a)}function ho(a,b,y){let E=0;for(const ve of y)"align"in ve&&(E+=1);let ee=0;const re=[];for(const ve of b){let Ce=0;for(ee=Math.max(ee,Math.min(ve.length,E));Ce<ve.length;){const Ne=[],qe=Math.min(ve.length,Ce+E);for(;Ce<qe;){const vt=ve[Ce];vt.length===0?Ne.push([new An({type:"first",mode:a.mode})]):vt[0].type!=="first"?Ne.push([new An({type:"first",mode:a.mode}),...vt]):(console.assert(!vt.slice(1).some(Mt=>Mt.type==="first")),Ne.push(vt)),Ce+=1}re.push(Ne)}}re.length>0&&re[re.length-1].length===1&&re[re.length-1][0].length===1&&re[re.length-1][0][0].type==="first"&&re.pop();const ae=[];for(const ve of re){if(ve.length!==ee)for(let Ce=ve.length;Ce<ee;Ce++)ve.push([new An({type:"first",mode:a.mode}),new Gr]);ae.push(ve)}let he=0,pe=0;for(const ve of ae){pe=0;for(const Ce of ve){for(const Ne of Ce)Ne.parent=a,Ne.parentBranch=[he,pe];pe+=1}he+=1}return a.isDirty=!0,ae}var li=class Lp extends An{constructor(b,y,E,ee={}){var re;super({type:"array"}),this.environmentName=b,this.rowGaps=E,ee.mathstyleName&&(this.mathstyleName=ee.mathstyleName),ee.columns&&(ee.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=ee.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=ho(this,y,this.colFormat),ee.leftDelim&&(this.leftDelim=ee.leftDelim),ee.rightDelim&&(this.rightDelim=ee.rightDelim),ee.arraycolsep!==void 0&&(this.arraycolsep=ee.arraycolsep),this.colSeparationType=ee.colSeparationType,ee.arraystretch!==void 0&&(this.arraystretch=ee.arraystretch),this.minColumns=(re=ee.minColumns)!=null?re:1}static fromJson(b){return new Lp(b.environmentName,b.array,b.rowGaps,b)}toJson(){const b=Ee(we({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(y=>y.map(E=>E.map(ee=>ee.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(b.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(b.arraycolsep=this.arraycolsep),this.leftDelim&&(b.leftDelim=this.leftDelim),this.rightDelim&&(b.rightDelim=this.rightDelim),b}branch(b){var y;if(lu(b))return(y=this.array[b[0]][b[1]])!=null?y:void 0}createBranch(b){var y;return lu(b)?(this.isDirty=!0,(y=this.branch(b))!=null?y:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(b=>!!b.align).length}removeBranch(b){if(vs(b))return super.removeBranch(b);const y=this.branch(b);return this.array[b[0]][b[1]]=void 0,y.forEach(E=>{E.parent=void 0,E.parentBranch=void 0}),console.assert(y[0].type==="first"),y.shift(),this.isDirty=!0,y}get hasChildren(){return this.children.length>0}get children(){const b=[];for(const y of this.array)for(const E of y)if(E)for(const ee of E)b.push(...ee.children),b.push(ee);return[...b,...super.children]}render(b){var y,E,ee,re,ae,he;const pe=new wi({parent:b,mathstyle:this.mathstyleName},this.style),ve=pe.getRegisterAsEm("arrayrulewidth"),Ce=pe.getRegisterAsEm("arraycolsep"),Ne=pe.getRegisterAsEm("doublerulesep"),qe=(E=(y=this.arraystretch)!=null?y:pe.getRegisterAsNumber("arraystretch"))!=null?E:1;let vt=typeof this.arraycolsep=="number"?this.arraycolsep:Ce;this.colSeparationType==="small"&&(vt=.2778*(new wi({parent:b,mathstyle:"scriptstyle"}).scalingFactor/b.scalingFactor));const Mt=qe*Gu,vn=.7*Mt,or=.3*Mt;let fn=0;const zn=[];let hr=0;const Wn=this.array.length;for(let Xi=0;Xi<Wn;++Xi){const xa=this.array[Xi];hr=Math.max(hr,xa.length);const Ua=new wi({parent:pe,mathstyle:this.mathstyleName},this.style);let Vs=vn/Ua.scalingFactor,Gs=or/Ua.scalingFactor;const Us={cells:[],height:0,depth:0,pos:0};for(const ws of xa){const e0=(ee=An.createBox(Ua,ws,{type:"ignore"}))!=null?ee:new ur(null,{type:"ignore"});Gs=Math.max(Gs,e0.depth),Vs=Math.max(Vs,e0.height),Us.cells.push(e0)}let Xs=(re=Jc(this.rowGaps[Xi]))!=null?re:0;Xs>0&&(Xs+=or,Gs=Math.max(Gs,Xs),Xs=0),Xi<Wn-1&&!uo(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Gs+=pe.getRegisterAsEm("jot")),Us.height=Vs,Us.depth=Gs,fn+=Vs,Us.pos=fn,fn+=Gs+Xs,zn.push(Us)}const Rr=fn/2+ro,jr=[];for(let Xi=0;Xi<hr;Xi++){const xa=[];for(const Ua of zn){const Vs=Ua.cells[Xi];Vs.depth=Ua.depth,Vs.height=Ua.height,xa.push({box:Vs,shift:Ua.pos-Rr})}xa.length>0&&jr.push(new ji({individualShift:xa}))}const Kr=[];let Ci=!1,Ki=!1,yr=0,Wo=!this.leftDelim;const{colFormat:js}=this;for(const Xi of js){if("align"in Xi&&yr>=jr.length)break;if("align"in Xi)Ci?Kr.push(ca(2*vt)):(Ki||Wo)&&Kr.push(ca(vt)),Kr.push(new ur(jr[yr],{classes:"col-align-"+Xi.align})),yr++,Ci=!0,Ki=!1,Wo=!1;else if("gap"in Xi){if(typeof Xi.gap=="number")Kr.push(ca(Xi.gap));else{const xa=pa(b,zn,Rr,Xi.gap);xa&&Kr.push(xa)}Ci=!1,Ki=!1,Wo=!1}else if("separator"in Xi){const xa=new ur(null,{classes:"vertical-separator"});xa.height=fn,xa.setStyle("height",fn,"em"),xa.setStyle("border-right",`${ve}em ${Xi.separator} currentColor`),xa.setStyle("vertical-align",-(fn-Rr),"em");let Ua=0;Ki?Ua=Ne-ve:Ci&&(Ua=vt-ve),xa.left=Ua,Kr.push(xa),Ci=!1,Ki=!0,Wo=!1}}Ci&&!this.rightDelim&&Kr.push(ca(vt));const Qo=new ur(Kr,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Qo.caret=this.caret),this.bind(b,Qo);const Ga=Qo.height,Zo=Qo.depth,Mo=this.bind(b,new ur([this.bind(b,Sr("open",(ae=this.leftDelim)!=null?ae:".",Ga,Zo,pe,{isSelected:this.isSelected})),Qo,this.bind(b,Sr("close",(he=this.rightDelim)!=null?he:".",Ga,Zo,pe,{isSelected:this.isSelected}))],{type:"ord"}));return Mo?(Mo.setStyle("display","inline-block"),this.caret&&(Mo.caret=this.caret),this.bind(b,this.attachSupsub(b,{base:Mo}))):null}_serialize(b){var y;const E=[];if(this.environmentName==="lines"?E.push("{\\displaylines"):E.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(E.push("{"),this.colFormat!==void 0)for(const ee of this.colFormat)"align"in ee&&typeof ee.align=="string"?E.push(ee.align):"separator"in ee&&ee.separator==="solid"?E.push("|"):"separator"in ee&&ee.separator==="dashed"&&E.push(":");E.push("}")}for(let ee=0;ee<this.array.length;ee++){for(let re=0;re<this.array[ee].length;re++)re>0&&E.push(" & "),E.push(An.serialize(this.array[ee][re],b));if(ee<this.array.length-1){const re=this.rowGaps[ee];re!=null&&re.dimension?E.push(`\\\\[${re.dimension} ${(y=re.unit)!=null?y:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),vi(E)}getCell(b,y){return this.array[b][y]}setCell(b,y,E){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[b][y]!==void 0);for(const re of this.array[b][y])re.parent=void 0,re.parentBranch=void 0;let ee=E;(E.length===0||E[0].type!=="first")&&(ee=[new An({type:"first",mode:this.mode}),...E]),this.array[b][y]=ee;for(const re of ee)re.parent=this,re.parentBranch=[b,y];this.isDirty=!0}addRowBefore(b){console.assert(this.type==="array"&&Array.isArray(this.array));const y=[];for(let E=0;E<this.colCount;E++)y.push(fa(this));this.array.splice(b,0,y);for(let E=b;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addRowAfter(b){console.assert(this.type==="array"&&Array.isArray(this.array));const y=[];for(let E=0;E<this.colCount;E++)y.push(fa(this));this.array.splice(b+1,0,y);for(let E=b+1;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}removeRow(b){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>b);const y=this.array.splice(b,1);for(const E of y)for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0;for(let E=b;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addColumnBefore(b){console.assert(this.type==="array"&&Array.isArray(this.array));for(const y of this.array)y.splice(b,0,fa(this));for(let y=0;y<this.rowCount;y++)for(let E=b;E<this.colCount;E++){const ee=this.array[y][E];if(ee)for(const re of ee)re.parentBranch=[y,E]}this.isDirty=!0}addColumnAfter(b){console.assert(this.type==="array"&&Array.isArray(this.array));for(const y of this.array)y.splice(b+1,0,fa(this));for(let y=0;y<this.rowCount;y++)for(let E=b+1;E<this.colCount;E++){const ee=this.array[y][E];if(ee)for(const re of ee)re.parentBranch=[y,E]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(b){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>b);for(const y of this.array){const E=y.splice(b,1);for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0}for(let y=0;y<this.rowCount;y++)for(let E=b;E<this.colCount;E++){const ee=this.array[y][E];if(ee)for(const re of ee)re.parentBranch=[y,E]}this.isDirty=!0}get cells(){const b=[];for(const y of this.array)for(const E of y)E&&b.push(E.filter(ee=>ee.type!=="first"));return b}};function fa(a){const b=new An({type:"first",mode:a.mode});b.parent=a;const y=new Gr;return y.parent=a,[b,y]}function ca(a){const b=new ur(null,{classes:"arraycolsep"});return b.width=a,b}function pa(a,b,y,E){if(!E)return null;const ee=[];for(const re of b){const ae=An.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-y}))}return new ji({individualShift:ee}).wrap(a)}var ba=class Ap extends An{constructor(b){super({mode:b.mode,command:b.command,style:b.style,body:b.body,type:"box"}),this.framecolor=b.framecolor,this.backgroundcolor=b.backgroundcolor,this.padding=b.padding,this.offset=b.offset,this.border=b.border}static fromJson(b){return new Ap(b)}toJson(){return Ee(we({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(b){var y,E,ee,re;const ae=An.createBox(b,this.body,{type:"lift"});if(!ae)return null;const he=b.toEm((y=this.offset)!=null?y:{dimension:0});ae.depth+=he,ae.setStyle("display","inline-block"),ae.setStyle("position","relative"),ae.setStyle("height",Math.floor(100*ae.height+ae.depth)/100,"em"),ae.setStyle("vertical-align",-Math.floor(100*ae.height)/100,"em");const pe=new wi({parent:b},this.style),ve=pe.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),Ce=new ur(null,{classes:"ML__box"});Ce.height=ae.height+ve,Ce.depth=ae.depth+ve,Ce.setStyle("box-sizing","border-box"),Ce.setStyle("position","absolute"),Ce.setStyle("top",-ve+.3,"em"),Ce.setStyle("left",0),Ce.setStyle("height",Ce.height+Ce.depth,"em"),Ce.setStyle("width","100%"),this.backgroundcolor&&Ce.setStyle("background-color",(ee=pe.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&Ce.setStyle("border",`${pe.getRegisterAsEm("fboxrule",2)}em solid ${(re=pe.toColor(this.framecolor))!=null?re:"black"}`),this.border&&Ce.setStyle("border",this.border);const Ne=new ur([Ce,ae],{type:"lift"});return Ne.setStyle("display","inline-block"),Ne.setStyle("position","relative"),Ne.setStyle("line-height",0),Ne.height=ae.height+ve+(he>0?he:0),Ne.depth=ae.depth+ve+(he<0?-he:0),Ne.setStyle("padding-left",ve,"em"),Ne.setStyle("padding-right",ve,"em"),Ne.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*ve+Math.abs(he)))/100,"em"),Ne.setStyle("margin-top",-ve,"em"),Ne.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*ve-he))/100,"em"),Ne.setStyle("vertical-align",Math.floor(100*(ae.depth+2*ve))/100,"em"),this.caret&&(Ne.caret=this.caret),this.attachSupsub(b,{base:Ne})}_serialize(b){return b.skipStyles?vi([this.bodyToLatex(b),this.supsubToLatex(b)]):super._serialize(b)}},fl=class Bp extends An{constructor(b,y){var E;super({type:"composition",mode:(E=y==null?void 0:y.mode)!=null?E:"math",value:b})}static fromJson(b){return new Bp(b.value,b)}toJson(){return super.toJson()}get computedStyle(){return{}}render(b){const y=new ur(this.value,{classes:"ML__composition",type:"composition"});return this.bind(b,y),this.caret&&(y.caret=this.caret),y}_serialize(b){return""}},go=class Tp extends An{constructor(b){super({type:"error",value:b,command:b,mode:"math"}),this.verbatimLatex=b}static fromJson(b){return new Tp(b.command)}toJson(){return super.toJson()}render(b){const y=this.createBox(b,{classes:"ML__error"});return this.caret&&(y.caret=this.caret),y}},Za=class Ip extends An{constructor(b,y,E){super({type:"group",mode:y,style:E}),this.body=b,this.boxType=b.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,b&&b.length===1&&b[0].command===","&&(this.captureSelection=!0)}static fromJson(b){return new Ip(b.body,b.mode,b.style)}render(b){const y=An.createBox(b,this.body,{type:this.boxType});return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Nt(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):`{${this.bodyToLatex(b)}}`}},Bi=class Pp extends An{constructor(b,y,E){super({type:"leftright",style:E.style,displayContainsHighlight:!0}),this.variant=b,this.body=y,this.leftDelim=E.leftDelim,this.rightDelim=E.rightDelim}static fromJson(b){var y;return new Pp((y=b.variant)!=null?y:"",b.body,b)}toJson(){const b=super.toJson();return this.variant&&(b.variant=this.variant),this.leftDelim&&(b.leftDelim=this.leftDelim),this.rightDelim&&(b.rightDelim=this.rightDelim),b}_serialize(b){var y,E;const ee=this.matchingRightDelim();return this.variant==="left...right"?vi(["\\left",(y=this.leftDelim)!=null?y:".",this.bodyToLatex(b),"\\right",ee]):this.variant==="mleft...mright"?vi(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(b),"\\mright",ee]):vi([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(b),ee])}matchingRightDelim(){var b,y;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(b=this.leftDelim)!=null?b:".";return(y=ne[E])!=null?y:E}render(b){var y,E;const ee=new wi({parent:b},this.style);console.assert(this.body!==void 0);const re=new wi({parent:b,mathstyle:"textstyle"},this.style),ae=(y=An.createBox(ee,this.body,{type:"inner"}))!=null?y:new ur(null,{type:"inner"}),he=ae.height/re.scalingFactor,pe=ae.depth/re.scalingFactor,ve=[];if(this.leftDelim&&ve.push(this.bind(re,Sr("open",this.leftDelim,he,pe,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&(Ta(ae.children,this,ee,he,pe),ve.push(ae)),this.rightDelim){let vt=this.containsCaret?" ML__contains-caret":"",Mt=this.rightDelim;Mt==="?"&&(ee.smartFence?(Mt=this.matchingRightDelim(),vt+=" ML__smart-fence__close"):Mt="."),ve.push(this.bind(re,Sr("close",Mt,he,pe,re,{isSelected:this.isSelected,classes:vt+" ML__close",mode:this.mode,style:this.style})))}let Ce=this.variant==="mleft...mright";const Ne=this.leftSibling;Ne&&(!Ce&&Ne.isFunction&&(Ce=!0),!Ce&&Ne.type==="subsup"&&((E=Ne.leftSibling)!=null&&E.isFunction)&&(Ce=!0));const qe=new ur(ve,{type:Ce?"close":"inner",classes:"left-right"});return qe.setStyle("margin-top",`${-ae.depth}em`),qe.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(qe.caret=this.caret),this.bind(ee,qe.wrap(ee))}};function Ta(a,b,y,E,ee){if(a)for(let re=0;re<a.length;re++){const ae=a[re];ae.type==="middle"?(a[re]=b.bind(y,Sr("inner",ae.value,E,ee,y,{isSelected:b.isSelected})),a[re].caret=ae.caret,a[re].isSelected=ae.isSelected,a[re].cssId=ae.cssId,a[re].htmlData=ae.htmlData,a[re].htmlStyle=ae.htmlStyle,a[re].attributes=ae.attributes,a[re].cssProperties=ae.cssProperties):ae.children&&Ta(ae.children,b,y,E,ee)}}var ac=class Op extends An{constructor(b,y){var E;super({type:"macro",command:b,style:y.style}),this.body=y.body,y.captureSelection===void 0?y.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=y.captureSelection,this.macroArgs=y.args,this.expand=(E=y.expand)!=null?E:!1}static fromJson(b){return new Op(b.command,b)}toJson(){const b=super.toJson();return this.expand&&(b.expand=!0),this.captureSelection!==void 0&&(b.captureSelection=this.captureSelection),this.macroArgs&&(b.args=this.macroArgs),b}_serialize(b){var y;return b.expandMacro&&this.expand?this.bodyToLatex(b):this.command+((y=this.macroArgs)!=null?y:"")}render(b){const y=An.createBox(b,this.body);return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}},ys=class $p extends An{constructor(){super({type:"macro-argument"})}static fromJson(b){return new $p}toJson(){return super.toJson()}_serialize(b){return""}render(b){return null}},Rs=class Fp extends An{constructor(b,y,E=!1,ee,re){var ae;super({type:"prompt",mode:(ae=re==null?void 0:re.mode)!=null?ae:"math",style:re==null?void 0:re.style,command:"\\placeholder"}),this.body=ee,this.correctness=y,this.placeholderId=b,this.locked=E,this.captureSelection=this.locked}static fromJson(b){return new Fp(b.placeholderId,b.correctness,b.locked,b.body,b)}toJson(){const b=super.toJson();return this.placeholderId&&(b.placeholderId=this.placeholderId),this.body||delete b.body,this.body&&(b.body=this.body.filter(y=>y.type!=="first").map(y=>y.toJson())),this.correctness&&(b.correctness=this.correctness),b.locked=this.locked,b}render(b){const y=new wi({parent:b}),E=y.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=An.createBox(b,this.body);if(!ae)return null;ae.height||(ae.height=y.metrics.xHeight),ae.setStyle("vertical-align",-ae.height,"em"),this.correctness==="correct"?ae.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&ae.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const he=new ur(ae,{type:"ord"});he.setStyle("display","inline-block"),he.setStyle("height",ae.height+ae.depth,"em"),he.setStyle("vertical-align",-re,"em");let pe="ML__prompt ";this.locked?pe+=" ML__lockedPromptBox ":pe+=" ML__editablePromptBox ",this.correctness==="correct"?pe+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(pe+=" ML__incorrectPromptBox "),this.containsCaret&&(pe+=" ML__focusedPromptBox ");const ve=new ur(null,{classes:pe,attributes:{part:"prompt"}});ve.height=he.height+re,ve.depth=he.depth+re,ve.width=he.width+2*ee,ve.setStyle("box-sizing","border-box"),ve.setStyle("position","absolute"),ve.setStyle("height",he.height+he.depth+2*re,"em"),ee===0&&ve.setStyle("width","100%"),ee!==0&&(ve.setStyle("width",`calc(100% + ${2*ee}em)`),ve.setStyle("top",E,"em"),ve.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(ve.width=3*ee,ve.setStyle("width",`calc(100% + ${3*ee}em)`),ve.setStyle("left",-1.5*ee,"em"));let Ce="";this.correctness==="incorrect"&&(Ce+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),Ce&&(ve.svgOverlay=Ce);const Ne=new ur([ve,he],{classes:"ML__prompt-atom"});return Ne.setStyle("position","relative"),Ne.setStyle("display","inline-block"),Ne.setStyle("line-height",0),Ne.height=he.height+re+.2,Ne.depth=he.depth+re,Ne.left=ee,Ne.right=ee,Ne.setStyle("height",he.height+re,"em"),Ne.setStyle("top",he.depth-he.height,"em"),Ne.setStyle("vertical-align",he.depth+re,"em"),Ne.setStyle("margin-left",.5,"em"),Ne.setStyle("margin-right",.5,"em"),this.caret&&(Ne.caret=this.caret),this.bind(y,this.attachSupsub(b,{base:Ne}))}_serialize(b){var y;const E=(y=this.bodyToLatex(b))!=null?y:"";if(b.skipPlaceholders)return E;let ee="\\placeholder";return this.placeholderId&&(ee+=`[${this.placeholderId}]`),this.correctness==="correct"?ee+="[correct]":this.correctness==="incorrect"&&(ee+="[incorrect]"),this.locked&&(ee+="[locked]"),Qi(ee,E)}},Yo=class Rp extends An{constructor(b){super({type:"subsup",style:b==null?void 0:b.style}),this.subsupPlacement="auto"}static fromJson(b){const y=new Rp(b);for(const E of Bl)b[E]&&y.setChildren(b[E],E);return y}render(b){var y;const E=new wi({parent:b,isPhantom:!0}),ee=this.leftSibling,re=(y=ee.render(E))!=null?y:new ur(null),ae=new ur(null);return ae.height=re.height,ae.depth=re.depth,this.attachSupsub(b,{base:ae,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(b){return this.supsubToLatex(b)}};function Ma(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var pl=class{constructor(a,b,y){this.errors=[],this.index=0,this.endCount=0;var E,ee,re,ae;y!=null||(y={}),this.tokens=a,this.context=b instanceof wi&&!(y!=null&&y.parseMode)&&!y.mathstyle?b:new wi({from:b,mathstyle:y.mathstyle},y.style),this.args=(E=y.args)!=null?E:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(ee=y.style)!=null?ee:{},parseMode:(re=y.parseMode)!=null?re:"math",mathstyle:(ae=y.mathstyle)!=null?ae:"displaystyle",tabular:!1}}beginContext(a){var b,y,E;const ee=this.parsingContext,re={parent:ee,mathlist:[],style:we({},ee.style),parseMode:(b=a==null?void 0:a.mode)!=null?b:ee.parseMode,mathstyle:(y=a==null?void 0:a.mathstyle)!=null?y:ee.mathstyle,tabular:(E=a==null?void 0:a.tabular)!=null?E:!1};this.parsingContext=re}endContext(){this.parsingContext=this.parsingContext.parent}onError(a){this.errors.push(we({before:Ts(this.tokens.slice(this.index,this.index+10)),after:Ts(this.tokens.slice(Math.max(0,this.index-10),this.index))},a))}get mathlist(){return this.parsingContext.mathlist}set mathlist(a){this.parsingContext.mathlist=a}get parseMode(){return this.parsingContext.parseMode}set parseMode(a){this.parsingContext.parseMode=a}get tabularMode(){return this.parsingContext.tabular}get style(){let a=this.parsingContext;for(;a;){if(a.style)return we({},a.style);a=a.parent}return{}}set style(a){this.parsingContext.style=a}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(a){return this.tokens[this.index]===a?(this.index++,!0):!1}lastSubsupAtom(){let a;return this.mathlist.length>0&&(a=this.mathlist[this.mathlist.length-1],a.type==="subsup"||a.subsupPlacement!==void 0)||(a=new Yo({style:this.style}),this.mathlist.push(a)),a}hasPattern(a){return a.test(this.tokens[this.index])}hasInfixCommand(){var a;const{index:b}=this;if(b<this.tokens.length&&this.tokens[b].startsWith("\\")){const y=Nt(this.tokens[b],this.parseMode);return!y||y.definitionType==="symbol"||y.ifMode&&!y.ifMode.includes(this.parseMode)?!1:(a=y.infix)!=null?a:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const a=this.peek();return a!=="\\\\"&&a!=="\\cr"&&a!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var a;const b=(a=this.args)==null?void 0:a.call(this,"?");return b?ja(b,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Gr({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(a){let b=this.tokens[this.index];for(;b&&b!==a;)b=this.tokens[++this.index];b===a&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(a){const b=this.index;let y=this.end(),E="";for(;!y;){const re=this.get();Ma(re)?(E+=re,y=this.end()||E.length>=a.length):y=!0}const ee=a.toUpperCase()===E.toUpperCase();return ee||(this.index=b),ee}scanString(){let a="";for(;!this.end();){const b=this.peek();if(b==="]")return a;if(b==="<space>")a+=" ";else if(b.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),a+=b.substring(1);else if(Ma(b))a+=b;else return a;this.next()}return a}scanBalancedString(){let a="",b=this.end(),y=1;for(;!b;){const E=this.get();E==="<space>"?a+=" ":E==="<{>"?(a+="{",y+=1):E==="<}>"?(y-=1,y>0?a+="}":this.index-=1):E==="<$>"?a+="$":E==="<$$>"?a+="$$":a+=E,b=y===0||this.end()}return a}scanLiteralGroup(){var a;if(!this.match("<{>"))return"";let b="",y=1;for(;y>0&&!this.end();){const E=this.get();E==="<}>"?(y-=1,y>0&&(b+="}")):E==="<{>"?(y+=1,b+="{"):(/\\[a-zA-Z]+$/.test(b)&&/^[a-zA-Z]/.test(E)&&(b+=" "),b+=(a={"<space>":" ","<$$>":"$$","<$>":"$"}[E])!=null?a:E)}return b}scanNumber(a=!0){var b,y;let E=!1,ee=this.peek();for(;ee==="<space>"||ee==="+"||ee==="-";)this.get(),ee==="-"&&(E=!E),ee=this.peek();a=!!a;let re=10,ae=/\d/;if(this.match("'"))re=8,ae=/[0-7]/,a=!0;else if(this.match('"'))re=16,ae=/[\dA-F]/,a=!0;else if(this.match("x"))re=16,ae=/[\dA-Fa-f]/,a=!0;else if(this.match("`"))return ee=this.get(),ee?ee.length===2&&ee.startsWith("\\")?{number:(E?-1:1)*((b=ee.codePointAt(1))!=null?b:0),base:"alpha"}:{number:(E?-1:1)*((y=ee.codePointAt(0))!=null?y:0),base:"alpha"}:null;let he="";for(;this.hasPattern(ae);)he+=this.get();if(!a&&(this.match(".")||this.match(",")))for(he+=".";this.hasPattern(ae);)he+=this.get();const pe=a?Number.parseInt(he,re):Number.parseFloat(he);return Number.isNaN(pe)?null:{number:E?-pe:pe,base:re===16?"hexadecimal":re===8?"octal":"decimal"}}scanRegister(){var a;const b=this.index,y=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return y;let E=!1;if(y===null)for(;;){const re=this.peek();if(re==="-")E=!E;else if(re!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const re=this.get();return re.startsWith("\\")?y?{register:re,global:!0,factor:(E?-1:1)*y.number}:E?{register:re,global:!0,factor:-1}:{register:re,global:!0}:(this.index=b,null)}let ee=this.get();return ee!=null&&ee.startsWith("\\")?(ee=ee.substring(1),this.context.registers[ee]?!E||y!==null?{register:ee,factor:(E?-1:1)*((a=y==null?void 0:y.number)!=null?a:1)}:{register:ee}:(this.index=b,null)):(this.index=b,null)}scanValue(){const a=this.scanRegister();if(a)return a;const b=this.index,y=this.scanGlueOrDimen();if(y&&("unit"in y||"glue"in y&&"unit"in y.glue))return y;this.index=b;const E=this.scanNumber();if(E)return E;if(this.end()||!Ma(this.peek()))return null;const ee=this.scanString();return ee.length>0?{string:ee}:null}scanDimen(){const a=this.scanNumber(!1);if(a===null)return null;const b=a.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let y;return this.matchKeyword("pt")?y="pt":this.matchKeyword("mm")?y="mm":this.matchKeyword("cm")?y="cm":this.matchKeyword("ex")?y="ex":this.matchKeyword("px")?y="px":this.matchKeyword("em")?y="em":this.matchKeyword("bp")?y="bp":this.matchKeyword("dd")?y="dd":this.matchKeyword("pc")?y="pc":this.matchKeyword("in")?y="in":this.matchKeyword("mu")&&(y="mu"),y?{dimension:b,unit:y}:{dimension:b}}scanGlueOrDimen(){const a=this.scanDimen();if(a===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return a;const b={glue:a};if(this.matchKeyword("plus")){const y=this.scanDimen();if(y)b.grow=y;else return b}if(this.skipWhitespace(),this.match("\\relax"))return b;if(this.skipWhitespace(),this.matchKeyword("minus")){const y=this.scanDimen();if(y)b.shrink=y;else return b}return!b.grow&&!b.shrink?a:b}scanColspec(){this.skipWhitespace();const a=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const b=this.get();b==="c"||b==="r"||b==="l"?a.push({align:b}):b==="|"?a.push({separator:"solid"}):b===":"?a.push({separator:"dashed"}):b==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),a.push({gap:this.scan(y=>y==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return a}scanModeSet(){let a;if(this.match("\\(")&&(a="textstyle"),!a&&this.match("\\[")&&(a="displaystyle"),!a)return null;this.beginContext({mode:"math",mathstyle:a});const b=this.scan(y=>y===(a==="displaystyle"?"\\]":"\\)"));return this.match(a==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),b}scanModeShift(){let a="";if(this.match("<$>")&&(a="<$>"),!a&&this.match("<$$>")&&(a="<$$>"),!a)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const b=this.scan(y=>y===a);return this.match(a)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),b}scanEnvironment(){if(!this.match("\\begin"))return null;const a=this.scanArgument("string");if(!a)return null;const b=Rt(a);if(!b)return this.onError({code:"unknown-environment",arg:a}),null;const y=[];if(b.params)for(const he of b.params)if(he.isOptional)y.push(this.scanOptionalArgument(he.type));else{const pe=this.scanArgument(he.type);pe||this.onError({code:"missing-argument",arg:a}),y.push(pe)}this.beginContext({tabular:b.tabular});const E=[],ee=[];let re=[],ae=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae&&this.match("\\end")&&(this.scanArgument("string")!==a&&this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae)if(this.matchColumnSeparator())re.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){re.push(this.mathlist),this.mathlist=[];let he=null;this.skipWhitespace(),this.match("[")&&(he=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(he!=null?he:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(he=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(he)));while(!ae);return re.push(this.mathlist),re.length>0&&E.push(re),this.endContext(),b.createAtom(a,E,ee,y)}scanExpression(){const a=this.mathlist;if(this.mathlist=[],this.parseExpression()){const b=this.mathlist;return this.mathlist=a,b}return this.mathlist=a,null}scan(a){this.beginContext(),a||(a=ae=>ae==="<}>");let b="",y=null,E=[],ee=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!b?(b=this.get(),y=Nt(b,"math"),y&&(E=this.scanArguments(y)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return b?(console.assert(!!y),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[y.createAtom({command:b,args:E,style:this.style,mode:this.parseMode})]):re=this.mathlist,this.endContext(),re}scanGroup(){const a=this.index;if(!this.match("<{>"))return null;const b=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const y=new Za(b,this.parseMode,this.style);return y.verbatimLatex=Ts(this.tokens.slice(a,this.index)),y}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let a=1;for(;!this.end()&&a!==0;)this.match("(")&&(a+=1),this.match(")")&&(a-=1),a!==0&&this.parseExpression();const b=new Bi("",this.mathlist,{leftDelim:"(",rightDelim:a===0?")":"?"});return this.endContext(),b}scanDelim(){this.skipWhitespace();const a=this.peek();if(!a)return this.onError({code:"unexpected-end-of-string"}),null;if(!Ma(a)&&!a.startsWith("\\"))return null;this.next();const b=Nt(a,"math");return b?b.definitionType==="function"&&b.ifMode&&!b.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):b.definitionType==="symbol"&&(b.type==="mopen"||b.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(a)?a:(this.onError({code:"unexpected-delimiter",arg:a}),null):(this.onError({code:"unknown-command",arg:a}),null)}scanLeftRight(){var a;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new go("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new go("\\mright");let b="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;b="\\mright"}const y=this.scanDelim();if(!y)return this.onError({code:"unexpected-delimiter"}),new go(b==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(b);)this.parseExpression();const E=this.mathlist;this.endContext();const ee=(a=this.scanDelim())!=null?a:".";return new Bi(b==="\\right"?"left...right":"mleft...mright",E,{leftDelim:y,rightDelim:ee,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let a=this.peek();if(a!=="^"&&a!=="_"&&a!=="'")return!1;const b=this.lastSubsupAtom();for(;a==="^"||a==="_"||a==="'";)this.match("'")?this.match("'")?b.addChild(new An({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):b.addChild(new An({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&b.addChildren(Je(this.scanArgument("expression")),a==="_"?"subscript":"superscript"),a=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const a=this.match("\\limits"),b=!a&&this.match("\\nolimits"),y=!b&&!a&&this.match("\\displaylimits");if(!a&&!b&&!y)return!1;const E=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return E===null?!1:(E.explicitSubsupPlacement=!0,a&&(E.subsupPlacement="over-under"),b&&(E.subsupPlacement="adjacent"),y&&(E.subsupPlacement="auto"),!0)}scanArguments(a){if(!(a!=null&&a.params))return[void 0,[]];let b;const y=[];let E=a.infix?2:0;for(;E<a.params.length;){const ee=a.params[E];ee.type==="rest"?y.push(this.scan(re=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(re))):ee.isOptional?y.push(this.scanOptionalArgument(ee.type)):ee.type.endsWith("*")?b=ee.type.slice(0,-1):y.push(this.scanArgument(ee.type)),E+=1}return[b,y]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let b;if(Ma(a)){const y=Co.createAtom(this.parseMode,a,we({},this.style));return y?[y]:null}if(b=this.scanMacro(a),b)return[b];if(a.startsWith("\\")){const y=Nt(a,this.parseMode);if(!y)return this.onError({code:"unknown-command",arg:a}),[new go(a)];if(y.definitionType==="symbol"){const E=we({},this.style);y.variant&&(E.variant=y.variant),b=new An({type:y.type,command:a,style:E,value:String.fromCodePoint(y.codepoint),mode:this.parseMode,verbatimLatex:a})}else{if(y.applyMode||y.applyStyle||y.infix)return this.onError({code:"invalid-command",arg:a}),[new go(a)];y.createAtom&&(b=y.createAtom({command:a,args:[],style:this.style,mode:this.parseMode}))}}return b?[b]:null}scanArgument(a){var b;this.skipFiller();const y=this.parseMode;if(a==="auto"&&(a=y),!this.match("<{>")){if(a==="string")return this.scanString();if(a==="value")return this.scanValue();if(a==="delim")return(b=this.scanDelim())!=null?b:".";if(a==="expression")return this.scanExpression();if(a==="math"){a!==y&&this.beginContext({mode:"math"});const ee=this.scanSymbolOrLiteral();return a!==y&&this.endContext(),ee}if(a==="text"){a!==y&&this.beginContext({mode:"text"});const ee=this.scanSymbolOrLiteral();return a!==y&&this.endContext(),ee}return a==="balanced-string"||console.assert(!1),null}if(a==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}if(a==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}let E=null;if(a==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}return a==="string"?E=this.scanString():a==="balanced-string"?E=this.scanBalancedString():a==="colspec"?E=this.scanColspec():a==="value"&&(E=this.scanValue()),this.skipUntilToken("<}>"),E}scanOptionalArgument(a){if(a=a==="auto"?this.parseMode:a,this.skipFiller(),!this.match("["))return null;let b=null;for(;!this.end()&&!this.match("]");)if(a==="string")b=this.scanString();else if(a==="value")b=this.scanValue();else if(a==="colspec")b=this.scanColspec();else if(a==="bbox"){const y={},E=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const ee of E){const re=ee.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(re)y.padding={dimension:parseInt(re[1]),unit:re[2]};else{const ae=ee.match(/^\s*border\s*:\s*(.*)/);ae?y.border=ae[1]:y.backgroundcolor={string:ee}}}b=y}else a==="math"&&(this.beginContext({mode:"math"}),b=this.mathlist.concat(this.scan(y=>y==="]")),this.endContext());return b}scanSymbolOrCommand(a){var b,y,E;if(a==="\\placeholder"){const he=this.scanOptionalArgument("string"),pe=this.scanOptionalArgument("math"),ve=An.serialize(pe,{defaultMode:"math"});let Ce=[],Ne;!Ne&&ve==="correct"?Ne="correct":!Ne&&ve==="incorrect"?Ne="incorrect":ve!==""&&(Ce=pe);const qe=this.scanOptionalArgument("string")==="locked",vt=this.scanArgument("auto");let Mt;return vt&&Array.isArray(vt)&&vt.length>0?Mt=vt:vt&&typeof vt=="object"&&"group"in vt?Mt=vt.group:Mt=Ce,he?[new Rs(he,Ne,qe,Mt!=null?Mt:Ce,{mode:this.parseMode,style:this.style})]:[new Gr({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const he=this.index,pe=this.scanLiteralGroup()||this.next();if(!pe)return null;if(this.context.registers[pe.substring(1)]){const ve=this.scanArgument("string");ve!==null&&(this.context.registers[pe.substring(1)]=ve);const Ce=vi([a,Ts(this.tokens.slice(he,this.index))]);return[new An({type:"text",value:"",verbatimLatex:Ce})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=Nt(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((b=this.peek())!=null?b:"")&&(a+=" "),[...a].map(he=>new An({type:"text",value:he,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new go(a)]);const ae=this.index;if(re.definitionType==="symbol"){const he=we({},this.style);re.variant&&(he.variant=re.variant),ee=new An({type:re.type,command:a,style:he,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const he=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let pe,ve=[];if(re.parse?ve=re.parse(this):[pe,ve]=this.scanArguments(re),this.parseMode=he,re.applyMode&&!re.applyStyle&&!re.createAtom)return Je(ve[0]);if(re.infix)return this.onError({code:"too-many-infix-commands",arg:a}),null;if(typeof re.createAtom=="function")ee=re.createAtom({command:a,args:ve,style:this.style,mode:this.parseMode}),pe&&(ee.body=Je(this.scanArgument(pe)));else if(typeof re.applyStyle=="function"){const Ce=we(we({},this.style),re.applyStyle(a,ve,this.context)),Ne=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),pe){const qe=this.style;this.style=Ce;const vt=this.scanArgument(pe);return this.style=qe,this.parseMode=Ne,Je(vt)}this.style=Ce}else ee=new An({type:"mord",command:(y=re.command)!=null?y:a,style:we({},this.style),value:a,mode:(E=re.applyMode)!=null?E:this.parseMode})}if(!ee)return null;if(ee instanceof An&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const he=vi([a,Ts(this.tokens.slice(ae,this.index))]);he&&(ee.verbatimLatex=he)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const he=this.scanSmartFence();if(he)return[ee,he]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Ma(a)){const b=Co.createAtom(this.parseMode,a,we({},this.style));if(!b)return null;if(b.isFunction&&this.smartFence){const y=this.scanSmartFence();if(y)return[b,y]}return[b]}return a.startsWith("\\")?this.scanSymbolOrCommand(a):a==="<space>"?this.parseMode==="text"?[new gs(" "," ",this.style)]:null:(a==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:a}),null)}scanMacro(a){var b;const y=this.context.getMacro(a);if(!y)return null;const E=this.index,ee=y.args,re={"?":(b=this.args)==null?void 0:b.call(this,"?")};for(let ae=1;ae<=ee;ae++){let he=this.scanLiteralGroup();if(!he){const pe=this.index;this.scanExpression(),he=Ts(this.tokens.slice(pe,this.index))}re[ae]=he}return new ac(a,{expand:y.expand,captureSelection:y.captureSelection,args:E===this.index?null:Ts(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:ja(y.def,{context:this.context,parseMode:this.parseMode,args:ae=>re[ae],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,b,y,E;let ee=(E=(y=(b=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?b:this.scanModeSet())!=null?y:this.scanGroup())!=null?E:this.scanLeftRight();if(ee===null){if(this.parseSupSub()||this.parseLimits())return!0;ee=this.scanSymbolCommandOrLiteral()}return ee?(Array.isArray(ee)?this.mathlist.push(...ee):this.mathlist.push(ee),!0):!1}};function ja(a,b){var y,E,ee,re;const ae=(y=b==null?void 0:b.args)!=null?y:void 0,he=new pl(ps(a,ae),b==null?void 0:b.context,{args:ae,mathstyle:(E=b==null?void 0:b.mathstyle)!=null?E:"displaystyle",parseMode:(ee=b==null?void 0:b.parseMode)!=null?ee:"math",style:(re=b==null?void 0:b.style)!=null?re:{}}),pe=[];for(;!he.end();)pe.push(...he.scan(()=>!1));return pe}function t0(a,b){var y;const E=new pl(ps(a,null),b==null?void 0:b.context,{mathstyle:"displaystyle",parseMode:(y=b==null?void 0:b.parseMode)!=null?y:"math"});for(;!E.end();)E.scan();return E.errors}var n0=class Np extends An{constructor(b,y){super({type:"chem"},{command:b,mode:"math"});const E=oa.go(Qn.go(y,b==="\\pu"?"pu":"ce"),!1);this.body=ja(E),this._verbatimLatex=b+"{"+y+"}",this.arg=y,this.captureSelection=!0}static fromJson(b){return new Np(b.command,b.arg)}set verbatimLatex(b){}get verbatimLatex(){return this._verbatimLatex}toJson(){return Ee(we({},super.toJson()),{arg:this.arg})}render(b){const y=An.createBox(b,this.body,{type:"inner"});return this.caret&&(y.caret=this.caret),this.bind(b,y)}_serialize(b){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};xt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var b;return new n0(a.command,(b=a.args[0])!=null?b:"")}});var Qn={go:function(a,b){if(!a)return[];b===void 0&&(b="ce");var y="0",E={};E.parenthesisLevel=0,a=a.replace(/\n/g," "),a=a.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),a=a.replace(/[\u2026]/g,"...");for(var ee,re=10,ae=[];;){ee!==a?(re=10,ee=a):re--;var he=Qn.stateMachines[b],pe=he.transitions[y]||he.transitions["*"];e:for(var ve=0;ve<pe.length;ve++){var Ce=Qn.patterns.match_(pe[ve].pattern,a);if(Ce){for(var Ne=pe[ve].task,qe=0;qe<Ne.action_.length;qe++){var vt;if(he.actions[Ne.action_[qe].type_])vt=he.actions[Ne.action_[qe].type_](E,Ce.match_,Ne.action_[qe].option);else if(Qn.actions[Ne.action_[qe].type_])vt=Qn.actions[Ne.action_[qe].type_](E,Ce.match_,Ne.action_[qe].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+Ne.action_[qe].type_+")"];Qn.concatArray(ae,vt)}if(y=Ne.nextState||y,a.length>0){if(Ne.revisit||(a=Ce.remainder),!Ne.toContinue)break e}else return ae}}if(re<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(a,b){if(b)if(Object.prototype.toString.call(b)==="[object Array]")for(var y=0;y<b.length;y++)a.push(b[y]);else a.push(b)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(a){var b=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return b&&b[0]?{match_:b.slice(1),remainder:a.substr(b[0].length)}:null},"(-)(9)^(-9)":function(a){var b=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return b&&b[0]?{match_:b.slice(1),remainder:a.substr(b[0].length)}:null},"state of aggregation $":function(a){var b=Qn.patterns.findObserveGroups(a,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(b&&b.remainder.match(/^($|[\s,;\)\]\}])/))return b;var y=a.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return y?{match_:y[0],remainder:a.substr(y[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return Qn.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return Qn.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return Qn.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return Qn.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return Qn.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return Qn.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return Qn.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return Qn.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return Qn.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return Qn.patterns.findObserveGroups(a,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return Qn.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return Qn.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return Qn.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return Qn.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return Qn.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return Qn.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(a){var b;if(b=a.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),b)return{match_:b[0],remainder:a.substr(b[0].length)};var y=Qn.patterns.findObserveGroups(a,"","$","$","");return y&&(b=y.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),b)?{match_:b[0],remainder:a.substr(b[0].length)}:null},amount2:function(a){return this.amount(a)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(a){if(a.match(/^\([a-z]+\)$/))return null;var b=a.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return b?{match_:b[0],remainder:a.substr(b[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(a,b,y,E,ee,re,ae,he,pe,ve){var Ce=function(fn,zn){if(typeof zn=="string")return fn.indexOf(zn)!==0?null:zn;var hr=fn.match(zn);return hr?hr[0]:null},Ne=function(fn,zn,hr){for(var Wn=0;zn<fn.length;){var Rr=fn.charAt(zn),jr=Ce(fn.substr(zn),hr);if(jr!==null&&Wn===0)return{endMatchBegin:zn,endMatchEnd:zn+jr.length};if(Rr==="{")Wn++;else if(Rr==="}"){if(Wn===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Wn--}zn++}return Wn>0,null},qe=Ce(a,b);if(qe===null||(a=a.substr(qe.length),qe=Ce(a,y),qe===null))return null;var vt=Ne(a,qe.length,E||ee);if(vt===null)return null;var Mt=a.substring(0,E?vt.endMatchEnd:vt.endMatchBegin);if(re||ae){var vn=this.findObserveGroups(a.substr(vt.endMatchEnd),re,ae,he,pe);if(vn===null)return null;var or=[Mt,vn.match_];return{match_:ve?or.join(""):or,remainder:vn.remainder}}else return{match_:Mt,remainder:a.substr(vt.endMatchEnd)}},match_:function(a,b){var y=Qn.patterns.patterns[a];if(y===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof y=="function")return Qn.patterns.patterns[a](b);var E=b.match(y);if(E){var ee;return E[2]?ee=[E[1],E[2]]:E[1]?ee=E[1]:ee=E[0],{match_:ee,remainder:b.substr(E[0].length)}}return null}},actions:{"a=":function(a,b){a.a=(a.a||"")+b},"b=":function(a,b){a.b=(a.b||"")+b},"p=":function(a,b){a.p=(a.p||"")+b},"o=":function(a,b){a.o=(a.o||"")+b},"q=":function(a,b){a.q=(a.q||"")+b},"d=":function(a,b){a.d=(a.d||"")+b},"rm=":function(a,b){a.rm=(a.rm||"")+b},"text=":function(a,b){a.text_=(a.text_||"")+b},insert:function(a,b,y){return{type_:y}},"insert+p1":function(a,b,y){return{type_:y,p1:b}},"insert+p1+p2":function(a,b,y){return{type_:y,p1:b[0],p2:b[1]}},copy:function(a,b){return b},rm:function(a,b){return{type_:"rm",p1:b||""}},text:function(a,b){return Qn.go(b,"text")},"{text}":function(a,b){var y=["{"];return Qn.concatArray(y,Qn.go(b,"text")),y.push("}"),y},"tex-math":function(a,b){return Qn.go(b,"tex-math")},"tex-math tight":function(a,b){return Qn.go(b,"tex-math tight")},bond:function(a,b,y){return{type_:"bond",kind_:y||b}},"color0-output":function(a,b){return{type_:"color0",color:b[0]}},ce:function(a,b){return Qn.go(b)},"1/2":function(a,b){var y=[];b.match(/^[+\-]/)&&(y.push(b.substr(0,1)),b=b.substr(1));var E=b.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return E[1]=E[1].replace(/\$/g,""),y.push({type_:"frac",p1:E[1],p2:E[2]}),E[3]&&(E[3]=E[3].replace(/\$/g,""),y.push({type_:"tex-math",p1:E[3]})),y},"9,9":function(a,b){return Qn.go(b,"9,9")}},createTransitions:function(a){var b,y,E,ee,re={};for(b in a)for(y in a[b])for(E=y.split("|"),a[b][y].stateArray=E,ee=0;ee<E.length;ee++)re[E[ee]]=[];for(b in a)for(y in a[b])for(E=a[b][y].stateArray||[],ee=0;ee<E.length;ee++){var ae=a[b][y];if(ae.action_){ae.action_=[].concat(ae.action_);for(var he=0;he<ae.action_.length;he++)typeof ae.action_[he]=="string"&&(ae.action_[he]={type_:ae.action_[he]})}else ae.action_=[];for(var pe=b.split("|"),ve=0;ve<pe.length;ve++)if(E[ee]==="*")for(var Ce in re)re[Ce].push({pattern:pe[ve],task:ae});else re[E[ee]].push({pattern:pe[ve],task:ae})}return re},stateMachines:{}};Qn.stateMachines={ce:{transitions:Qn.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(a,b){var y;if((a.d||"").match(/^[0-9]+$/)){var E=a.d;a.d=void 0,y=this.output(a),a.b=E}else y=this.output(a);return Qn.actions["o="](a,b),y},"d= kv":function(a,b){a.d=b,a.dType="kv"},"charge or bond":function(a,b){if(a.beginsWithBond){var y=[];return Qn.concatArray(y,this.output(a)),Qn.concatArray(y,Qn.actions.bond(a,b,"-")),y}else a.d=b},"- after o/d":function(a,b,y){var E=Qn.patterns.match_("orbital",a.o||""),ee=Qn.patterns.match_("one lowercase greek letter $",a.o||""),re=Qn.patterns.match_("one lowercase latin letter $",a.o||""),ae=Qn.patterns.match_("$one lowercase latin letter$ $",a.o||""),he=b==="-"&&(E&&E.remainder===""||ee||re||ae);he&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var pe=[];return he?(Qn.concatArray(pe,this.output(a)),pe.push({type_:"hyphen"})):(E=Qn.patterns.match_("digits",a.d||""),y&&E&&E.remainder===""?(Qn.concatArray(pe,Qn.actions["d="](a,b)),Qn.concatArray(pe,this.output(a))):(Qn.concatArray(pe,this.output(a)),Qn.concatArray(pe,Qn.actions.bond(a,b,"-")))),pe},"a to o":function(a){a.o=a.a,a.a=void 0},"sb=true":function(a){a.sb=!0},"sb=false":function(a){a.sb=!1},"beginsWithBond=true":function(a){a.beginsWithBond=!0},"beginsWithBond=false":function(a){a.beginsWithBond=!1},"parenthesisLevel++":function(a){a.parenthesisLevel++},"parenthesisLevel--":function(a){a.parenthesisLevel--},"state of aggregation":function(a,b){return{type_:"state of aggregation",p1:Qn.go(b,"o")}},comma:function(a,b){var y=b.replace(/\s*$/,""),E=y!==b;return E&&a.parenthesisLevel===0?{type_:"comma enumeration L",p1:y}:{type_:"comma enumeration M",p1:y}},output:function(a,b,y){var E;if(!a.r)E=[],!a.a&&!a.b&&!a.p&&!a.o&&!a.q&&!a.d&&!y||(a.sb&&E.push({type_:"entitySkip"}),!a.o&&!a.q&&!a.d&&!a.b&&!a.p&&y!==2?(a.o=a.a,a.a=void 0):!a.o&&!a.q&&!a.d&&(a.b||a.p)?(a.o=a.a,a.d=a.b,a.q=a.p,a.a=a.b=a.p=void 0):a.o&&a.dType==="kv"&&Qn.patterns.match_("d-oxidation$",a.d||"")?a.dType="oxidation":a.o&&a.dType==="kv"&&!a.q&&(a.dType=void 0),E.push({type_:"chemfive",a:Qn.go(a.a,"a"),b:Qn.go(a.b,"bd"),p:Qn.go(a.p,"pq"),o:Qn.go(a.o,"o"),q:Qn.go(a.q,"pq"),d:Qn.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=Qn.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=Qn.go(a.rd);var re;a.rqt==="M"?re=Qn.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=Qn.go(a.rq),E={type_:"arrow",r:a.r,rd:ee,rq:re}}for(var ae in a)ae!=="parenthesisLevel"&&ae!=="beginsWithBond"&&delete a[ae];return E},"oxidation-output":function(a,b){var y=["{"];return Qn.concatArray(y,Qn.go(b,"oxidation")),y.push("}"),y},"frac-output":function(a,b){return{type_:"frac-ce",p1:Qn.go(b[0]),p2:Qn.go(b[1])}},"overset-output":function(a,b){return{type_:"overset",p1:Qn.go(b[0]),p2:Qn.go(b[1])}},"underset-output":function(a,b){return{type_:"underset",p1:Qn.go(b[0]),p2:Qn.go(b[1])}},"underbrace-output":function(a,b){return{type_:"underbrace",p1:Qn.go(b[0]),p2:Qn.go(b[1])}},"color-output":function(a,b){return{type_:"color",color1:b[0],color2:Qn.go(b[1])}},"r=":function(a,b){a.r=b},"rdt=":function(a,b){a.rdt=b},"rd=":function(a,b){a.rd=b},"rqt=":function(a,b){a.rqt=b},"rq=":function(a,b){a.rq=b},operator:function(a,b,y){return{type_:"operator",kind_:y||b}}}},a:{transitions:Qn.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:Qn.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:Qn.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(a){if(a.text_){var b={type_:"text",p1:a.text_};for(var y in a)delete a[y];return b}}}},pq:{transitions:Qn.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(a,b){return{type_:"state of aggregation subscript",p1:Qn.go(b,"o")}},"color-output":function(a,b){return{type_:"color",color1:b[0],color2:Qn.go(b[1],"pq")}}}},bd:{transitions:Qn.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(a,b){return{type_:"color",color1:b[0],color2:Qn.go(b[1],"bd")}}}},oxidation:{transitions:Qn.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(a,b){return{type_:"roman numeral",p1:b||""}}}},"tex-math":{transitions:Qn.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(a){if(a.o){var b={type_:"tex-math",p1:a.o};for(var y in a)delete a[y];return b}}}},"tex-math tight":{transitions:Qn.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(a,b){a.o=(a.o||"")+"{"+b+"}"},output:function(a){if(a.o){var b={type_:"tex-math",p1:a.o};for(var y in a)delete a[y];return b}}}},"9,9":{transitions:Qn.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Qn.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(a,b){var y=[];return b[0]==="+-"||b[0]==="+/-"?y.push("\\pm "):b[0]&&y.push(b[0]),b[1]&&(Qn.concatArray(y,Qn.go(b[1],"pu-9,9")),b[2]&&(b[2].match(/[,.]/)?Qn.concatArray(y,Qn.go(b[2],"pu-9,9")):y.push(b[2])),(b[3]||b[4])&&(b[3]==="e"||b[4]==="*"?y.push({type_:"cdot"}):y.push({type_:"times"}))),b[5]&&y.push("10^{"+b[5]+"}"),y},"number^":function(a,b){var y=[];return b[0]==="+-"||b[0]==="+/-"?y.push("\\pm "):b[0]&&y.push(b[0]),Qn.concatArray(y,Qn.go(b[1],"pu-9,9")),y.push("^{"+b[2]+"}"),y},operator:function(a,b,y){return{type_:"operator",kind_:y||b}},space:function(){return{type_:"pu-space-1"}},output:function(a){var b,y=Qn.patterns.match_("{(...)}",a.d||"");y&&y.remainder===""&&(a.d=y.match_);var E=Qn.patterns.match_("{(...)}",a.q||"");if(E&&E.remainder===""&&(a.q=E.match_),a.d&&(a.d=a.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),a.d=a.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),a.q){a.q=a.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),a.q=a.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var ee={d:Qn.go(a.d,"pu"),q:Qn.go(a.q,"pu")};a.o==="//"?b={type_:"pu-frac",p1:ee.d,p2:ee.q}:(b=ee.d,ee.d.length>1||ee.q.length>1?b.push({type_:" / "}):b.push({type_:"/"}),Qn.concatArray(b,ee.q))}else b=Qn.go(a.d,"pu-2");for(var re in a)delete a[re];return b}}},"pu-2":{transitions:Qn.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(a,b){a.rm+="^{"+b+"}"},space:function(){return{type_:"pu-space-2"}},output:function(a){var b=[];if(a.rm){var y=Qn.patterns.match_("{(...)}",a.rm||"");y&&y.remainder===""?b=Qn.go(y.match_,"pu"):b={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return b}}},"pu-9,9":{transitions:Qn.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(a){var b=[];if(a.text_=a.text_||"",a.text_.length>4){var y=a.text_.length%3;y===0&&(y=3);for(var E=a.text_.length-3;E>0;E-=3)b.push(a.text_.substr(E,3)),b.push({type_:"1000 separator"});b.push(a.text_.substr(0,y)),b.reverse()}else b.push(a.text_);for(var ee in a)delete a[ee];return b},"output-o":function(a){var b=[];if(a.text_=a.text_||"",a.text_.length>4){for(var y=a.text_.length-3,E=0;E<y;E+=3)b.push(a.text_.substr(E,3)),b.push({type_:"1000 separator"});b.push(a.text_.substr(E))}else b.push(a.text_);for(var ee in a)delete a[ee];return b}}}};var oa={go:function(a,b){if(!a)return"";for(var y="",E=!1,ee=0;ee<a.length;ee++){var re=a[ee];typeof re=="string"?y+=re:(y+=oa._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!b&&!E&&y&&(y="{"+y+"}"),y},_goInner:function(a){return a&&oa.go(a,!0)},_go2:function(a){var b;switch(a.type_){case"chemfive":b="";var y={a:oa._goInner(a.a),b:oa._goInner(a.b),p:oa._goInner(a.p),o:oa._goInner(a.o),q:oa._goInner(a.q),d:oa._goInner(a.d)};y.a&&(y.a.match(/^[+\-]/)&&(y.a="{"+y.a+"}"),b+=y.a+"\\,"),(y.b||y.p)&&(b+="{\\vphantom{X}}",b+="^{\\hphantom{"+(y.b||"")+"}}_{\\hphantom{"+(y.p||"")+"}}",b+="{\\vphantom{X}}",b+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(y.b||"")+"}}",b+="_{\\vphantom{2}\\llap{\\smash[t]{"+(y.p||"")+"}}}"),y.o&&(y.o.match(/^[+\-]/)&&(y.o="{"+y.o+"}"),b+=y.o),a.dType==="kv"?((y.d||y.q)&&(b+="{\\vphantom{X}}"),y.d&&(b+="^{"+y.d+"}"),y.q&&(b+="_{\\smash[t]{"+y.q+"}}")):a.dType==="oxidation"?(y.d&&(b+="{\\vphantom{X}}",b+="^{"+y.d+"}"),y.q&&(b+="{\\vphantom{X}}",b+="_{\\smash[t]{"+y.q+"}}")):(y.q&&(b+="{\\vphantom{X}}",b+="_{\\smash[t]{"+y.q+"}}"),y.d&&(b+="{\\vphantom{X}}",b+="^{"+y.d+"}"));break;case"rm":b="\\mathrm{"+a.p1+"}";break;case"text":a.p1.match(/[\^_]/)?(a.p1=a.p1.replace(" ","~").replace("-","\\text{-}"),b="\\mathrm{"+a.p1+"}"):b="\\text{"+a.p1+"}";break;case"roman numeral":b="\\mathrm{"+a.p1+"}";break;case"state of aggregation":b="\\mskip2mu "+oa._goInner(a.p1);break;case"state of aggregation subscript":b="\\mskip1mu "+oa._goInner(a.p1);break;case"bond":if(b=oa._getBond(a.kind_),!b)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+a.kind_+")"];break;case"frac":var E="\\frac{"+a.p1+"}{"+a.p2+"}";b="\\mathchoice{\\textstyle"+E+"}{"+E+"}{"+E+"}{"+E+"}";break;case"pu-frac":var ee="\\frac{"+oa._goInner(a.p1)+"}{"+oa._goInner(a.p2)+"}";b="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":b=a.p1+" ";break;case"frac-ce":b="\\frac{"+oa._goInner(a.p1)+"}{"+oa._goInner(a.p2)+"}";break;case"overset":b="\\overset{"+oa._goInner(a.p1)+"}{"+oa._goInner(a.p2)+"}";break;case"underset":b="\\underset{"+oa._goInner(a.p1)+"}{"+oa._goInner(a.p2)+"}";break;case"underbrace":b="\\underbrace{"+oa._goInner(a.p1)+"}_{"+oa._goInner(a.p2)+"}";break;case"color":b="{\\color{"+a.color1+"}{"+oa._goInner(a.color2)+"}}";break;case"color0":b="\\color{"+a.color+"}";break;case"arrow":var re={rd:oa._goInner(a.rd),rq:oa._goInner(a.rq)},ae=oa._getArrow(a.r);re.rd||re.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(ae="\\long"+ae,re.rd&&(ae="\\overset{"+re.rd+"}{"+ae+"}"),re.rq&&(a.r==="<-->"?ae="\\underset{\\lower2mu{"+re.rq+"}}{"+ae+"}":ae="\\underset{\\lower6mu{"+re.rq+"}}{"+ae+"}"),ae=" {}\\mathrel{"+ae+"}{} "):(re.rq&&(ae+="[{"+re.rq+"}]"),ae+="{"+re.rd+"}",ae=" {}\\mathrel{\\x"+ae+"}{} "):ae=" {}\\mathrel{\\long"+ae+"}{} ",b=ae;break;case"operator":b=oa._getOperator(a.kind_);break;case"1st-level escape":b=a.p1+" ";break;case"space":b=" ";break;case"entitySkip":b="~";break;case"pu-space-1":b="~";break;case"pu-space-2":b="\\mkern3mu ";break;case"1000 separator":b="\\mkern2mu ";break;case"commaDecimal":b="{,}";break;case"comma enumeration L":b="{"+a.p1+"}\\mkern6mu ";break;case"comma enumeration M":b="{"+a.p1+"}\\mkern3mu ";break;case"comma enumeration S":b="{"+a.p1+"}\\mkern1mu ";break;case"hyphen":b="\\text{-}";break;case"addition compound":b="\\,{\\cdot}\\,";break;case"electron dot":b="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":b="{\\times}";break;case"prime":b="\\prime ";break;case"cdot":b="\\cdot ";break;case"tight cdot":b="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":b="\\times ";break;case"circa":b="{\\sim}";break;case"^":b="uparrow";break;case"v":b="downarrow";break;case"ellipsis":b="\\ldots ";break;case"/":b="/";break;case" / ":b="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return b},_getArrow:function(a){switch(a){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(a){switch(a){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(a){switch(a){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function M1(a){}function _1(a){}var r0=class zp extends An{constructor(b){super(Ee(we({},b),{type:"delim"})),this.value=b.delim,this.size=b.size}static fromJson(b){return new zp(b)}toJson(){return Ee(we({},super.toJson()),{delim:this.value,size:this.size})}render(b){return new ur(this.value,{type:"middle"})}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Nt(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):Qi(this.command,this.value)}},i0=class Kp extends An{constructor(b){super(Ee(we({},b),{type:"sizeddelim",value:b.delim})),this.delimType=b.delimType,this.size=b.size}static fromJson(b){return new Kp(b)}toJson(){return Ee(we({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(b){let y=rn(this.value,this.size,b,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return y?(y=this.bind(b,y),this.caret&&(y.caret=this.caret),y):null}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Nt(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):Qi(this.command,this.value)}},ud=class Hp extends An{constructor(b,y,E,ee){var re,ae;super({type:"enclose",command:b,style:ee.style}),this.body=y,this.backgroundcolor=ee.backgroundcolor,E.updiagonalarrow&&(E.updiagonalstrike=!1),E.box&&(E.left=!1,E.right=!1,E.bottom=!1,E.top=!1),this.notation=E,this.shadow=(re=ee.shadow)!=null?re:"none",this.strokeWidth=(ae=ee.strokeWidth)!=null?ae:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=ee.strokeStyle,this.svgStrokeStyle=ee.svgStrokeStyle,this.strokeColor=ee.strokeColor,this.borderStyle=ee.borderStyle,this.padding=ee.padding,this.captureSelection=!1}static fromJson(b){return new Hp(b.command,b.body,b.notation,b)}toJson(){return Ee(we({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(b){var y;if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Nt(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,b);let ee=(y=this.command)!=null?y:"";if(this.command==="\\enclose"){ee+="{"+Object.keys(this.notation).join(" ")+"}";let re="",ae="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(re+=ae+'mathbackground="'+this.backgroundcolor+'"',ae=","),this.shadow&&this.shadow!=="auto"&&(re+=ae+'shadow="'+this.shadow+'"',ae=","),this.strokeWidth||this.strokeStyle!=="solid"?(re+=ae+this.borderStyle,ae=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(re+=ae+'mathcolor="'+this.strokeColor+'"',ae=","),re&&(ee+=`[${re}]`)}return Qi(ee,this.bodyToLatex(b))}render(b){const y=new wi({parent:b},this.style),E=An.createBox(y,this.body);if(!E)return null;const ee=im(this.borderStyle),re=y.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});E.setStyle("position","relative"),E.setStyle("display","inline-block"),E.setStyle("top",re,"em"),E.setStyle("height",E.height+E.depth,"em"),E.setStyle("width",E.width,"em");const ae=new ur(null,{classes:"ML__notation"});let he=E.height+E.depth+2*re;const pe=E.width+2*re;let ve="";if(this.notation.horizontalstrike&&(ve+=this.line(3,50,97,50)),this.notation.verticalstrike&&(ve+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(ve+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(ve+=this.line(3,3,97,97)),this.notation.updiagonalarrow){ve+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const Mt=.03*Math.sqrt(pe*pe+he*he)*1,vn=E.width*Mt,or=(E.depth+E.height)*Mt,fn=re+E.width;let zn=re;zn+or-.4*vn<0&&(zn=.4*vn-or),ve+='<polygon points="',ve+=`${fn},${zn} ${fn-vn-.4*or},${zn+or-.4*vn} `,ve+=`${fn-.7*vn},${zn+.7*or} ${fn-vn+.4*or},${zn+or+.4*vn} `,ve+=`${fn},${zn}`,ve+=`" stroke='none' fill="${this.strokeColor}"`,ve+="/>"}let Ce=0;if(this.notation.phasorangle){const qe=a0(y),vt=(E.height+E.depth+2*qe+re).toString(),Mt=(E.height+E.depth)/2;ve+=this.line(re.toString(),vt,(re+Mt+E.width).toString(),vt),ve+=this.line(re.toString(),vt,(re+Mt).toString(),(re-qe).toString()),he+=qe,Ce=Mt,E.left+=he/2-re}if(this.notation.longdiv){const qe=a0(y);he+=qe,ve+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const vt=.3;Ce=vt+qe,E.left+=vt+qe,E.setTop(re+qe),ve+='<path d="',ve+=`M ${re} ${re} a${vt} ${(E.depth+E.height+2*qe)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*qe} "`,ve+=` stroke-width="${am(y)}" stroke="${this.strokeColor}" fill="none"`,ve+="/>"}if(ae.width=E.width+2*re+Ce,ae.height=E.height+re,ae.depth=E.depth+re,ae.setStyle("box-sizing","border-box"),ae.setStyle("left",`calc(-${ee} / 2 )`),ae.setStyle("height",`${Math.floor(100*he)/100}em`),ae.setStyle("top",`calc(${ee} / 2 )`),this.backgroundcolor&&ae.setStyle("background-color",this.backgroundcolor),this.notation.box&&ae.setStyle("border","1px solid red"),this.notation.actuarial&&(ae.setStyle("border-top",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(ae.setStyle("border-bottom",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(ae.setStyle("border-radius","8px"),ae.setStyle("border",this.borderStyle)),this.notation.circle&&(ae.setStyle("border-radius","50%"),ae.setStyle("border",this.borderStyle)),this.notation.top&&ae.setStyle("border-top",this.borderStyle),this.notation.left&&ae.setStyle("border-left",this.borderStyle),this.notation.right&&ae.setStyle("border-right",this.borderStyle),this.notation.bottom&&ae.setStyle("border-bottom",this.borderStyle),ve){let qe="";this.shadow==="auto"&&(qe+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(qe+=`filter: drop-shadow(${this.shadow})`),qe+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,qe+=' stroke-linecap="round"',this.svgStrokeStyle&&(qe+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=qe,ae.svgOverlay=ve}const Ne=new ur([ae,E]);return Ne.setStyle("position","relative"),Ne.setStyle("vertical-align",re,"em"),Ne.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),Ne.setStyle("display","inline-block"),Ne.height=ae.height,Ne.depth=ae.depth,Ne.width=ae.width-2*re,Ne.left=re,Ne.right=re,this.caret&&(Ne.caret=this.caret),Ne.wrap(y)}line(b,y,E,ee){return`<line x1="${bh(b)}" y1="${bh(y)}" x2="${bh(E)}" y2="${bh(ee)}" vector-effect="non-scaling-stroke"></line>`}};function bh(a){return typeof a=="number"?`${Math.floor(100*a)/100}%`:a}function im(a){if(!a)return"1px";const b=a.match(/([0-9][a-zA-Z\%]+)/);return b===null?"1px":b[1]}function am(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function a0(a){const b=a.isDisplayStyle?hs:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*b/4}var oc=class Wp extends An{constructor(b,y,E){var ee,re;super(Ee(we({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=b,this.below=y,this.hasBarLine=(ee=E==null?void 0:E.hasBarLine)!=null?ee:!0,this.continuousFraction=(re=E==null?void 0:E.continuousFraction)!=null?re:!1,this.numerPrefix=E==null?void 0:E.numerPrefix,this.denomPrefix=E==null?void 0:E.denomPrefix,this.mathstyleName=E==null?void 0:E.mathstyleName,this.leftDelim=E==null?void 0:E.leftDelim,this.rightDelim=E==null?void 0:E.rightDelim,this.fractionNavigationOrder=E==null?void 0:E.fractionNavigationOrder}static fromJson(b){return new Wp(b.above,b.below,b)}toJson(){const b={};return this.continuousFraction&&(b.continuousFraction=!0),this.numerPrefix&&(b.numerPrefix=this.numerPrefix),this.denomPrefix&&(b.denomPrefix=this.denomPrefix),this.leftDelim&&(b.leftDelim=this.leftDelim),this.rightDelim&&(b.rightDelim=this.rightDelim),this.hasBarLine||(b.hasBarLine=!1),this.mathstyleName&&(b.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(b.fractionNavigationOrder=this.fractionNavigationOrder),we(we({},super.toJson()),b)}get children(){if(this._children)return this._children;const b=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const y of this.below)b.push(...y.children),b.push(y);for(const y of this.above)b.push(...y.children),b.push(y)}else{for(const y of this.above)b.push(...y.children),b.push(y);for(const y of this.below)b.push(...y.children),b.push(y)}return this._children=b,b}render(b){var y,E;const ee=new wi({parent:b,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new wi({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),he=this.numerPrefix?new ur([new ur(this.numerPrefix),An.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(y=An.createBox(ae,this.above,{type:"ignore"}))!=null?y:new ur(null,{type:"ignore"}),pe=new wi({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),ve=this.denomPrefix?new ur([new ur(this.denomPrefix),An.createBox(pe,this.below,{type:"ignore"})]):(E=An.createBox(pe,this.below,{type:"ignore"}))!=null?E:new ur(null,{type:"ignore"}),Ce=this.hasBarLine?re.defaultRuleThickness:0;let Ne,qe=0,vt;ee.isDisplayStyle?(Ne=ae.metrics.num1,qe=Ce>0?3*Ce:7*Ce,vt=pe.metrics.denom1):(Ce>0?(Ne=ae.metrics.num2,qe=Ce):(Ne=ae.metrics.num3,qe=3*re.defaultRuleThickness),vt=pe.metrics.denom2);const Mt=[];this.isSelected&&Mt.push("ML__selected");const vn=he.depth,or=ve.height;let fn;if(Ce<=0){const Kr=Ne-vn-(or-vt);Kr<qe&&(Ne+=(qe-Kr)/2,vt+=(qe-Kr)/2),fn=new ji({individualShift:[{box:he,shift:-Ne,classes:[...Mt,"ML__center"]},{box:ve,shift:vt,classes:[...Mt,"ML__center"]}]}).wrap(ee)}else{const Kr=new ur(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Kr.softWidth=Math.max(he.width,ve.width),Kr.height=Ce/2,Kr.depth=Ce/2;const Ci=ro+Ce/2;Ne<qe+vn+Ci&&(Ne=qe+vn+Ci);const Ki=ro-Ce/2;vt<qe+or-Ki&&(vt=qe+or-Ki),fn=new ji({individualShift:[{box:ve,shift:vt,classes:[...Mt,"ML__center"]},{box:Kr,shift:-Ki,classes:Mt},{box:he,shift:-Ne,classes:[...Mt,"ML__center"]}]}).wrap(ee)}const zn=ee.isDisplayStyle?re.delim1:re.delim2,hr=this.leftDelim?this.bind(b,Br("open",this.leftDelim,zn,!0,b,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Pr(ee,"open");let Wn=null;this.continuousFraction?Wn=new ur(null,{type:"close"}):this.rightDelim?Wn=this.bind(b,Br("close",this.rightDelim,zn,!0,b,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Wn=Pr(ee,"close");const Rr=new ur([hr,fn,Wn],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),jr=this.bind(b,Rr);return this.caret&&(jr.caret=this.caret),this.attachSupsub(b,{base:jr})}},qa=class Zp extends An{constructor(b,y){var E;super({type:"latex",value:b,mode:"latex"}),this.isSuggestion=(E=y==null?void 0:y.isSuggestion)!=null?E:!1,this.isError=!1}static fromJson(b){const y=new Zp(b.value);return b.isSuggestion&&(y.isSuggestion=!0),b.isError&&(y.isError=!0),y}toJson(){const b={};return this.isSuggestion&&(b.isSuggestion=!0),this.isError&&(b.isError=!0),we({type:"latex",value:this.value},b)}get computedStyle(){return{}}render(b){const y=new ur(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}},cd=class jp extends An{constructor(b){super({type:"latexgroup",mode:"latex"}),this.body=[...b].map(y=>new qa(y)),this.skipBoundary=!1}static fromJson(b){return new jp("")}toJson(){return super.toJson()}render(b){const y=An.createBox(b,this.body);return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}_serialize(b){var y,E;return(E=(y=this.body)==null?void 0:y.map(ee=>ee.value).join(""))!=null?E:""}},hf=class Vp extends An{constructor(b,y){super(Ee(we({},y),{type:"extensible-symbol",isFunction:y==null?void 0:y.isFunction})),this.value=b,this.variant=y==null?void 0:y.variant,this.subsupPlacement=y==null?void 0:y.limits}static fromJson(b){return new Vp(b.symbol,b)}toJson(){const b=super.toJson();return this.variant&&(b.variant=this.variant),this.subsupPlacement&&(b.limits=this.subsupPlacement),this.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),this.value&&(b.symbol=this.value),b}render(b){var y;const E=b.isDisplayStyle&&this.value!=="\\smallint",ee=new ur(this.value,{fontFamily:E?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(E?"large-op":"small-op"),type:"op",maxFontSize:b.scalingFactor,isSelected:this.isSelected});if(!ee)return null;ee.right=ee.italic;const re=(ee.height-ee.depth)/2-ro*b.scalingFactor,ae=ee.italic;ee.setTop(re);let he=ee;if(this.superscript||this.subscript){const pe=(y=this.subsupPlacement)!=null?y:"auto";he=pe==="over-under"||pe==="auto"&&b.isDisplayStyle?this.attachLimits(b,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(b,{base:ee})}return new ur(this.bind(b,he),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(b)}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Nt(this.command,this.mode);if(y!=null&&y.serialize)return y.serialize(this,b);const E=[];return E.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(b)),vi(E)}},du=class Gp extends An{constructor(b){const y=b.body;super(Ee(we({},b),{type:"overlap",body:typeof y=="string"?[new An({value:y})]:y,style:b==null?void 0:b.style})),this.skipBoundary=!0,this.align=b==null?void 0:b.align,this.boxType=b==null?void 0:b.boxType}static fromJson(b){return new Gp(b)}toJson(){const b={};return this.align&&(b.align=this.align),this.boxType&&(b.boxType=this.boxType),we(we({},super.toJson()),b)}render(b){const y=An.createBox(b,this.body,{classes:"inner"});return y?(this.caret&&(y.caret=this.caret),this.bind(b,new ur([y,new ur(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Jo=class Up extends An{constructor(b){var y,E,ee,re;super({type:"overunder",command:b.command,style:b.style,mode:b.mode,body:b.body,skipBoundary:(y=b.skipBoundary)!=null?y:!0}),this.subsupPlacement=b.supsubPlacement,this.svgAbove=b.svgAbove,this.svgBelow=b.svgBelow,this.svgBody=b.svgBody,this.above=b.above,this.below=b.below,this.boxType=(E=b.boxType)!=null?E:"ord",this.paddedBody=(ee=b.paddedBody)!=null?ee:!1,this.paddedLabels=(re=b.paddedLabels)!=null?re:!1}static fromJson(b){return new Up(b)}toJson(){const b=super.toJson();return this.skipBoundary||(b.skipBoundary=!1),this.subsupPlacement&&(b.subsupPlacement=this.subsupPlacement),this.svgAbove&&(b.svgAbove=this.svgAbove),this.svgBelow&&(b.svgBelow=this.svgBelow),this.svgBody&&(b.svgBody=this.svgBody),this.boxType!=="ord"&&(b.boxType=this.boxType),this.paddedBody&&(b.paddedBody=!0),this.paddedLabels&&(b.paddedLabels=!0),b}render(b){let y=this.svgBody?Ro(this.svgBody):An.createBox(b,this.body,{type:"ignore"});const E=new wi({parent:b,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Ro(this.svgAbove):this.above&&(ee=An.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Ro(this.svgBelow):this.below&&(re=An.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(y=new ur([Pr(b,"open"),y,Pr(b,"close")],{type:"ignore"}));let ae=om(b,{base:y,above:ee,below:re,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return ae?(this.subsupPlacement==="over-under"?ae=this.attachLimits(b,{base:ae,type:ae.type}):ae=this.attachSupsub(b,{base:ae}),this.caret&&(ae.caret=this.caret),this.bind(b,ae)):null}};function om(a,b){if(!b.base)return null;if(!b.above&&!b.below){const he=new ur(b.base,{type:b.type});return he.setStyle("position","relative"),he}let y=0;b.above&&(y=a.metrics.bigOpSpacing5);let E=null;const ee=b.base,re=0,ae=["ML__center"];if(b.paddedAboveBelow&&ae.push("ML__label_padding"),b.below&&b.above){const he=a.metrics.bigOpSpacing5+b.below.height+b.below.depth+ee.depth+re;E=new ji({bottom:he,children:[a.metrics.bigOpSpacing5,{box:b.below,classes:ae},{box:ee,classes:["ML__center"]},y,{box:b.above,classes:ae},a.metrics.bigOpSpacing5]})}else b.below?E=new ji({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:b.below,classes:ae},{box:ee,classes:["ML__center"]}]}):b.above&&(E=new ji({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},y,{box:b.above,classes:ae},a.metrics.bigOpSpacing5]}));return new ur(E,{type:b.type})}var dd=class Xp extends An{constructor(b){var y,E,ee,re;super(Ee(we({},b),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(y=b.isInvisible)!=null?y:!1,this.smashDepth=(E=b.smashDepth)!=null?E:!1,this.smashHeight=(ee=b.smashHeight)!=null?ee:!1,this.smashWidth=(re=b.smashWidth)!=null?re:!1}static fromJson(b){return new Xp(b)}toJson(){const b={};return this.isInvisible&&(b.isInvisible=!0),this.smashDepth&&(b.smashDepth=!0),this.smashHeight&&(b.smashHeight=!0),this.smashWidth&&(b.smashWidth=!0),we(we({},super.toJson()),b)}render(b){const y=new wi({parent:b,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),An.createBox(y,this.body,{classes:"inner"});const E=An.createBox(this.isInvisible?y:b,this.body);if(!E)return null;if(this.smashWidth){const ee=new ur(null,{classes:"fix"});return new ur([E,ee],{classes:"rlap"}).wrap(b)}if(!this.smashHeight&&!this.smashDepth)return E;if(this.smashHeight&&(E.height=0),this.smashDepth&&(E.depth=0),E.children)for(const ee of E.children)this.smashHeight&&(ee.height=0),this.smashDepth&&(ee.depth=0);return new ji({firstBaseline:[{box:E}]},{type:E.type}).wrap(b)}},hd=class Yp extends An{constructor(b){var y;super(we({type:"spacing"},b)),this.width=b==null?void 0:b.width,this._braced=(y=b==null?void 0:b.braced)!=null?y:!1}static fromJson(b){return new Yp(b)}toJson(){const b=super.toJson();return this.width!==void 0&&(b.width=this.width),this._braced&&(b.braced=!0),b}render(b){var y;if(this.command==="space")return new ur(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new ur(null,{classes:"mspace"}),E.left=b.toEm(this.width);else{const ee=(y={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?y:"mediumspace";E=new ur(null,{classes:ee})}return E=this.bind(b,E),this.caret&&(E.caret=this.caret),E}_serialize(b){var y;if(!b.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Nt(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,b);const ee=(y=this.command)!=null?y:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${Ca(this.width)}}`:`${ee}${Ca(this.width)}`}},o0=class Jp extends An{constructor(b){var y;super(Ee(we({},b),{type:"surd",mode:(y=b.mode)!=null?y:"math",style:b.style,displayContainsHighlight:!0,body:b.body})),this.above=b.index}static fromJson(b){return new Jp(Ee(we({},b),{index:b.above}))}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Nt(this.command,this.mode);if(y!=null&&y.serialize)return y.serialize(this,b);const E=this.command,ee=this.bodyToLatex(b);return this.above&&!this.hasEmptyBranch("above")?Qi(`${E}[${this.aboveToLatex(b)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:Qi(E,ee)}get children(){if(this._children)return this._children;const b=[];if(this.above)for(const y of this.above)b.push(...y.children),b.push(y);if(this.body)for(const y of this.body)b.push(...y.children),b.push(y);return this._children=b,b}render(b){var y;const E=new wi({parent:b,mathstyle:"cramp"},this.style),ee=(y=An.createBox(E,this.body,{type:"inner"}))!=null?y:new ur(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,he=b.isDisplayStyle?hs:ae,pe=new ur(null,{classes:"ML__sqrt-line",style:this.style});pe.height=ae,pe.softWidth=ee.width;let ve=re*(ae+he/4);const Ne=Math.max(re*2*he,ee.height+ee.depth)+ve+ae,qe=new wi({parent:b},this.style),vt=this.bind(qe,new ur(Br("inner","\\surd",Ne,!1,qe,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!vt)return null;const Mt=vt.height+vt.depth-ae;Mt>ee.height+ee.depth+ve&&(ve=(ve+Mt-(ee.height+ee.depth))/2),vt.setTop(vt.height-ee.height-ve);const vn=this.bind(b,new ji({firstBaseline:[{box:new ur(ee)},ve-2*ae,{box:pe},ae]})),or=An.createBox(new wi({parent:b,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!or){const hr=new ur([vt,vn],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return hr.setStyle("display","inline-block"),hr.setStyle("height",hr.height+hr.depth,"em"),this.caret&&(hr.caret=this.caret),this.bind(b,hr)}const fn=new ji({shift:-.6*(Math.max(vt.height,vn.height)-Math.max(vt.depth,vn.depth)),children:[{box:or}]}),zn=new ur([new ur(fn,{classes:"ML__sqrt-index",type:"ignore"}),vt,vn],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return zn.height=vt.height,zn.depth=vt.depth,this.caret&&(zn.caret=this.caret),this.bind(b,zn)}},sm=class extends ur{constructor(a){super(null,{type:"skip"}),this._width=a}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function yh(a,b){if(!a.parent)return;const y=a.parent.children,E=y.indexOf(a);let ee=E-1;for(;ee>=0&&y[ee].type==="ignore";)ee-=1;if(ee<0&&a.parent.parent&&a.parent.type==="lift"){yh(a.parent,b);return}E>0&&y[E-1].type==="skip"?y[E-1].width+=b:y.splice(E,0,new sm(b))}var lm={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},um={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function cm(a){pd(a,(b,y)=>{y.type==="bin"&&(!b||/^(middle|bin|op|rel|open|punct)$/.test(b.type))&&(y.type="ord"),(b==null?void 0:b.type)==="bin"&&/^(rel|close|punct)$/.test(y.type)&&(b.type="ord"),y.type!=="ignore"&&(b=y)})}function fd(a,b){if(!a.children)return a;const y=a.children;cm(y);const E=b.getRegisterAsEm("thinmuskip"),ee=b.getRegisterAsEm("medmuskip"),re=b.getRegisterAsEm("thickmuskip");return pd(y,(ae,he)=>{var pe,ve,Ce;if(!ae)return;const Ne=ae.type,qe=he.isTight?(pe=um[Ne])!=null?pe:null:(ve=lm[Ne])!=null?ve:null,vt=(Ce=qe==null?void 0:qe[he.type])!=null?Ce:null;vt===3&&yh(he,E),vt===4&&yh(he,ee),vt===5&&yh(he,re)}),a}function pd(a,b,y=void 0){if(!a)return y;a=[...a];for(const E of a)E.type==="lift"?y=pd(E.children,b,y):E.type==="ignore"?pd(E.children,b):(b(y,E),pd(E.children,b),y=E);return y}var ff=class qp extends An{constructor(b){super({type:"tooltip",command:b.command,mode:b.mode,style:b.style,body:b.body,displayContainsHighlight:!0}),this.tooltip=new An({type:"root",mode:b.content,body:b.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(b){return new qp(Ee(we({},b),{tooltip:Ol(b.tooltip)}))}toJson(){var b;const y=(b=this.tooltip.body)==null?void 0:b.filter(E=>E.type!=="first").map(E=>E.toJson());return Ee(we({},super.toJson()),{tooltip:y})}render(b){const y=An.createBox(new wi,this.body);if(!y)return null;const E=new wi({parent:b,mathstyle:"displaystyle"},{fontSize:Ls}),ee=Yu(fd(new ur(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new ur([ee,y],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(b,re)}},hu=class Qp extends An{constructor(b,y){super(Ee(we({},y),{type:"operator",isFunction:y==null?void 0:y.isFunction})),this.value=b,this.variant=y==null?void 0:y.variant,this.variantStyle=y==null?void 0:y.variantStyle,this.subsupPlacement=y==null?void 0:y.limits}static fromJson(b){return new Qp(b.symbol,b)}toJson(){const b=super.toJson();return this.variant&&(b.variant=this.variant),this.variantStyle&&(b.variantStyle=this.variantStyle),this.subsupPlacement&&(b.limits=this.subsupPlacement),this.value&&(b.symbol=this.value),b}render(b){var y;const E=new ur(this.value,{type:"op",mode:"math",maxFontSize:b.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:b.letterShapeStyle});let ee=E;if(this.superscript||this.subscript){const re=(y=this.subsupPlacement)!=null?y:"auto";ee=re==="over-under"||re==="auto"&&b.isDisplayStyle?this.attachLimits(b,{base:E}):this.attachSupsub(b,{base:E})}return new ur(this.bind(b,ee),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(b)}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Nt(this.command,this.mode);if(y!=null&&y.serialize)return y.serialize(this,b);const E=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(b)),vi(E)}};function Ol(a){if(Le(a))return a.map(E=>Ol(E));if(typeof a=="string")return An.fromJson(a);a=we({},a);for(const E of Bl)a[E]&&(a[E]=Ol(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=Ol(a.array));const b=a.type;let y;b==="accent"&&(y=z.fromJson(a)),b==="array"&&(y=li.fromJson(a)),b==="box"&&(y=ba.fromJson(a)),b==="chem"&&(y=n0.fromJson(a)),b==="composition"&&(y=fl.fromJson(a)),b==="delim"&&(y=r0.fromJson(a)),b==="enclose"&&(y=ud.fromJson(a)),b==="error"&&(y=go.fromJson(a)),b==="extensible-symbol"&&(y=hf.fromJson(a)),b==="genfrac"&&(y=oc.fromJson(a)),b==="group"&&(y=Za.fromJson(a)),b==="latex"&&(y=qa.fromJson(a)),b==="latexgroup"&&(y=cd.fromJson(a)),b==="leftright"&&(y=Bi.fromJson(a)),b==="macro"&&(y=ac.fromJson(a)),b==="macro-argument"&&(y=ys.fromJson(a)),b==="operator"&&(y=hu.fromJson(a)),b==="overlap"&&(y=du.fromJson(a)),b==="overunder"&&(y=Jo.fromJson(a)),b==="placeholder"&&(y=Gr.fromJson(a)),b==="prompt"&&(y=Rs.fromJson(a)),b==="phantom"&&(y=dd.fromJson(a)),b==="sizeddelim"&&(y=i0.fromJson(a)),b==="spacing"&&(y=hd.fromJson(a)),b==="subsup"&&(y=Yo.fromJson(a)),b==="surd"&&(y=o0.fromJson(a)),b==="text"&&(y=gs.fromJson(a)),b==="tooltip"&&(y=ff.fromJson(a)),y||(console.assert(!b||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(b),`MathLive 0.98.5: an unexpected atom type "${b}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),y=An.fromJson(a));for(const E of Bl)a[E]&&y.setChildren(a[E],E);return a.verbatimLatex!==void 0&&(y.verbatimLatex=a.verbatimLatex),a.subsupPlacement&&(y.subsupPlacement=a.subsupPlacement),a.explicitSubsupPlacement&&(y.explicitSubsupPlacement=!0),a.isFunction&&(y.isFunction=!0),a.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),a.skipBoundary&&(y.skipBoundary=!0),a.captureSelection&&(y.captureSelection=!0),y}function dm(a){if(a&&Array.isArray(a))return a.map(b=>b==="<null>"?null:typeof b=="object"&&"group"in b?{group:b.group.map(y=>Ol(y))}:typeof b=="object"&&"atoms"in b?b.atoms.map(y=>Ol(y)):b)}var s0={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},pf={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},l0=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,hm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,fm=[/^[a-z]$/,/^[A-Z]$/,l0,hm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends Co{constructor(){super("math")}createAtom(a,b,y){var E,ee,re,ae;if(b===null)return new An({type:"mord",mode:"math",command:a,value:a,style:y});const he=window.MathfieldElement.isFunction((E=b.command)!=null?E:a);if(b.definitionType==="symbol"){const ve=new An({type:(ee=b.type)!=null?ee:"mord",mode:"math",command:(re=b.command)!=null?re:a,value:String.fromCodePoint(b.codepoint),style:y});return he&&(ve.isFunction=!0),a.startsWith("\\")&&(ve.verbatimLatex=a),ve}const pe=new An({type:"mord",mode:"math",command:(ae=b.command)!=null?ae:a,value:a,style:y});return he&&(pe.isFunction=!0),a.startsWith("\\")&&(pe.verbatimLatex=a),pe}serialize(a,b){const y=vm(a,Ee(we({},b),{defaultMode:"math"}));return y.length===0||b.defaultMode!=="text"?y:["$ ",...y," $"]}getFont(a,b){console.assert(b.variant!==void 0);let{variant:y}=b,{variantStyle:E}=b;y==="normal"&&!E&&/[\u00A3\u0131\u0237]/.test(a.value)&&(y="main",E="italic"),y==="normal"&&!E&&a.value.length===1&&fm.forEach((he,pe)=>{var ve;he.test(a.value)&&pm[(ve=b.letterShapeStyle)!=null?ve:"tex"][pe]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?y+"-"+E:y;console.assert(s0[ee]!==void 0);const[re,ae]=s0[ee];return pf[y]&&!pf[y].test(a.value)?(a.value=Vt(a.value,y,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),ae&&(a.classes+=" "+ae),re)}};function vm(a,b){const{parent:y}=a[0],E=u0(y);return ga(a,"variant").map(ee=>{const re=u0(ee[0]);let ae="";re&&re!==E&&(ae={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[re],console.assert(ae!==void 0));const he=vi(ee.map(pe=>pe._serialize(b)));return ae?Qi(ae,he):he})}function u0(a){if(!a)return"";const{style:b}=a;if(b.variant===void 0)return"";let y=b.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(b.variant)&&b.variantStyle&&b.variantStyle!=="up"&&(y+="-"+b.variantStyle),y}new mm;function gm(a,b){return a.map(y=>y._serialize(b))}function bm(a,b){return ga(a,"fontShape").map(y=>{const E=gm(y,b),{fontShape:ee}=y[0].style;let re="";return ee==="it"&&(re="\\textit"),ee==="sl"&&(re="\\textsl"),ee==="sc"&&(re="\\textsc"),ee==="n"&&(re="\\textup"),!re&&ee?`{${Qi("\\fontshape",ee)}${vi(E)}}`:re?Qi(re,vi(E)):vi(E)})}function ym(a,b){return ga(a,"fontSeries").map(y=>{const E=bm(y,b),{fontSeries:ee}=y[0].style;let re="";return ee==="b"&&(re="\\textbf"),ee==="l"&&(re="\\textlf"),ee==="m"&&(re="\\textmd"),ee&&!re?`{${Qi("\\fontseries",ee)}${vi(E)}}`:re?Qi(re,vi(E)):vi(E)})}function xm(a,b){return ga(a,"fontSize").map(y=>{var E,ee;const re=ym(y,b),ae=(ee=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=y[0].style.fontSize)!=null?E:""])!=null?ee:"";return ae?`${ae} ${vi(re)}`:vi(re)})}function wm(a,b,y){return ga(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,b),he=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return he?`\\${he}{${vi(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${vi(ae)}}`:y?`\\text{${vi(ae)}}`:vi(ae)})}var c0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends Co{constructor(){super("text")}createAtom(a,b,y){return b&&b.definitionType==="symbol"?new gs(a,String.fromCodePoint(b.codepoint),y!=null?y:{}):null}serialize(a,b){return wm(a,Ee(we({},b),{defaultMode:"text"}),b.defaultMode!=="text")}getFont(a,b){var y,E,ee,re,ae;const{fontFamily:he}=b;if(c0[he]?a.classes+=" "+c0[he]:he&&a.setStyle("font-family",he),b.fontShape&&(a.classes+=" ",a.classes+=(y={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[b.fontShape])!=null?y:""),b.fontSeries){const pe=b.fontSeries.match(/(.?[lbm])?(.?[cx])?/);pe&&(a.classes+=" ",a.classes+=(ee={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(E=pe[1])!=null?E:""])!=null?ee:"",a.classes+=" ",a.classes+=(ae={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(re=pe[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new Sm;var Cm=class extends Co{constructor(){super("latex")}createAtom(a){return new qa(a)}serialize(a,b){return a.filter(y=>y instanceof qa&&!y.isSuggestion).map(y=>y.value)}getFont(){return null}};new Cm;var Em={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},mf={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},d0={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},h0={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Mm={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},_m={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},km={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Dm={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Lm={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Am={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Bm={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Tm={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Im={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function f0(a){const b=a.split("+"),y={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:b.pop()};return b.includes("shift")&&(y.shift=!0),b.includes("alt")&&(y.alt=!0),b.includes("ctrl")&&(y.ctrl=!0),b.includes("cmd")&&(y.cmd=!0),b.includes("win")&&(y.win=!0),b.includes("meta")&&(y.meta=!0),y}function sc(a){let b="";return a.shift&&(b+="shift+"),a.alt&&(b+="alt+"),a.ctrl&&(b+="ctrl+"),a.cmd&&(b+="cmd+"),a.win&&(b+="win+"),a.meta&&(b+="meta+"),b+a.key}var Pm={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},md=[],vd;function vf(){switch(tt()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Ko(a){(!a.platform||a.platform===vf())&&md.push(a)}function Om(a,b){var y;const E={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!a)return E;for(const[ee,re]of Object.entries(b.mapping)){if(re[0]===a)return E.key=`[${ee}]`,E;if(re[1]===a)return E.shift=!0,E.key=`[${ee}]`,E;if(re[2]===a)return E.alt=!0,E.key=`[${ee}]`,E;if(re[3]===a)return E.shift=!0,E.alt=!0,E.key=`[${ee}]`,E}return E.key=(y=Pm[a])!=null?y:"",E}function $m(a){if(a.code)return a;const b=Object.entries(gd().mapping);let y=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,he]of b)if(he[re]===a.key){ee=ae,re===3?(y=!0,E=!0):re===2?y=!0:re===1&&(E=!0);break}if(ee)break}return new KeyboardEvent(a.type,Ee(we({},a),{altKey:y,shiftKey:E,code:ee}))}function Fm(a){var b,y;if(!a||a.key==="Unidentified"||a.key==="Dead")return;const E=a.shiftKey&&a.altKey?3:a.altKey?2:a.shiftKey?1:0;for(const ee of md)((b=ee.mapping[a.code])==null?void 0:b[E])===a.key?ee.score+=1:(y=ee.mapping[a.code])!=null&&y[E]&&(ee.score=0);md.sort((ee,re)=>re.score-ee.score)}function Rm(a){vd=md.find(b=>a.startsWith(b.locale))}function gd(){return vd!=null?vd:md[0]}function Nm(){switch(vf()){case"apple":return mf;case"windows":return d0;case"linux":return h0}return mf}switch(vf()){case"apple":Ko(mf),Ko(Mm),Ko(Bm),Ko(Dm);break;case"windows":Ko(d0),Ko(_m),Ko(Tm),Ko(Lm);break;case"linux":Ko(h0),Ko(km),Ko(Im),Ko(Am);break}Ko(Em);function gf(a){var b;const y=/macos|ios/.test(tt()),E=a.split("+");let ee="";for(const re of E)ee&&(ee+=y?"\u2009":'<span class="ML__shortcut-join">+</span>'),re.startsWith("[Key")?ee+=re.slice(4,5):re.startsWith("Key")?ee+=re.slice(3,4):re.startsWith("[Digit")?ee+=re.slice(6,7):re.startsWith("Digit")?ee+=re.slice(5,6):ee+=(b={cmd:"\u2318",meta:y?"\u2318":"Ctrl",shift:y?"\u21E7":"Shift",alt:y?"\u2325":"Alt",ctrl:y?"\u2303":"Ctrl","\n":y?"\u23CE":"Return","[return]":y?"\u23CE":"Return","[enter]":y?"\u2324":"Enter","[tab]":y?"\u21E5":"Tab","[escape]":"Esc","[backspace]":y?"\u232B":"Backspace","[delete]":y?"\u2326":"Del","[pageup]":y?"\u21DE":"Page Up","[pagedown]":y?"\u21DF":"Page Down","[home]":y?"\u2912":"Home","[end]":y?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[re.toLowerCase()])!=null?b:re.toUpperCase();return ee}function xh(a){if(a instanceof MouseEvent||a instanceof PointerEvent)return{x:a.clientX,y:a.clientY};if(a instanceof TouchEvent){const b=[...a.touches].reduce((E,ee)=>({x:E.x+ee.clientX,y:E.y+ee.clientY}),{x:0,y:0}),y=a.touches.length;return{x:b.x/y,y:b.y/y}}}function fu(a){const b={alt:!1,control:!1,shift:!1,meta:!1};return(a instanceof MouseEvent||a instanceof PointerEvent||a instanceof TouchEvent||a instanceof KeyboardEvent)&&(a.altKey&&(b.alt=!0),a.ctrlKey&&(b.control=!0),a.metaKey&&(b.meta=!0),a.shiftKey&&(b.shift=!0)),b}function zm(a,b){return!a&&b||a&&!b?!1:!a||!b?!0:a.alt===b.alt&&a.control===b.control&&a.shift===b.shift&&a.meta===b.meta}var Km=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function wh(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Sh(){var a;let b=document.activeElement;for(;(a=b==null?void 0:b.shadowRoot)!=null&&a.activeElement;)b=b.shadowRoot.activeElement;return b}var Ns=class bl{static get scrim(){return bl._scrim||(bl._scrim=new bl),bl._scrim}static open(b){bl.scrim.open(b)}static close(){bl.scrim.close()}static get state(){return bl.scrim.state}static get element(){return bl.scrim.element}constructor(b){var y,E;this.lightDismiss=(y=b==null?void 0:b.lightDismiss)!=null?y:!0,this.translucent=(E=b==null?void 0:b.translucent)!=null?E:!1,this.state="closed"}get element(){if(this._element)return this._element;const b=document.createElement("div");return b.setAttribute("role","presentation"),b.style.position="fixed",b.style.contain="content",b.style.top="0",b.style.left="0",b.style.right="0",b.style.bottom="0",b.style.zIndex="var(--scrim-zindex, 10099)",b.style.outline="none",this.translucent?(b.style.background="rgba(255, 255, 255, .2)",b.style.backdropFilter="contrast(40%)"):b.style.background="transparent",this._element=b,b}open(b){var y;if(this.state!=="closed")return;this.state="opening",this.onDismiss=b==null?void 0:b.onDismiss,this.savedActiveElement=Sh();const{element:E}=this;((y=b==null?void 0:b.root)!=null?y:document.body).appendChild(E),E.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const ee=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const re=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${re+ee}px`,b!=null&&b.child&&E.append(b.child),this.state="open"}close(){var b,y,E,ee;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:re}=this;re.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),re.remove(),document.body.style.overflow=(b=this.savedOverflow)!=null?b:"",document.body.style.marginRight=(y=this.savedMarginRight)!=null?y:"",Sh()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(b){this.lightDismiss&&(b.target===this._element&&b.type==="click"?(this.close(),b.preventDefault(),b.stopPropagation()):b.target===document&&(b.type==="touchmove"||b.type==="scroll")&&(this.close(),b.preventDefault(),b.stopPropagation()))}};function Hm(a,b,y){let E=null,ee=null,re=!1,ae=!1,he=!1;const pe=new AbortController,ve=pe.signal;return a.addEventListener("keydown",Ce=>{if(re||Ce.key==="Process"||Ce.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(Ce.code)){E=null;return}E=Ce,ee=null,y.onKeystroke(Ce)?a.textContent="":E=null},{capture:!0,signal:ve}),a.addEventListener("keypress",Ce=>{re||(E&&ee&&y.onKeystroke(E),ee=Ce)},{capture:!0,signal:ve}),a.addEventListener("compositionstart",Ce=>{a.textContent="",re=!0,y.onCompositionStart(Ce.data)},{capture:!0,signal:ve}),a.addEventListener("compositionupdate",Ce=>{re&&y.onCompositionUpdate(Ce.data)},{capture:!0,signal:ve}),a.addEventListener("compositionend",Ce=>{a.textContent="",re&&(re=!1,y.onCompositionEnd(Ce.data))},{capture:!0,signal:ve}),a.addEventListener("beforeinput",Ce=>Ce.stopImmediatePropagation(),{signal:ve}),a.addEventListener("input",Ce=>{var Ne;if(!re&&(a.textContent="",Ce.inputType!=="insertCompositionText")){if(Ce.inputType==="insertFromPaste"){Ce.preventDefault(),Ce.stopPropagation();return}y.onInput((Ne=Ce.data)!=null?Ne:""),Ce.preventDefault(),Ce.stopPropagation()}},{signal:ve}),a.addEventListener("paste",Ce=>{a.focus({preventScroll:!0}),a.textContent="",y.onPaste(Ce)||Ce.preventDefault(),Ce.stopImmediatePropagation()},{signal:ve}),a.addEventListener("cut",Ce=>y.onCut(Ce),{capture:!0,signal:ve}),a.addEventListener("copy",Ce=>y.onCopy(Ce),{capture:!0,signal:ve}),a.addEventListener("blur",Ce=>{var Ne,qe;if(((qe=(Ne=Ce.relatedTarget)==null?void 0:Ne._mathfield)==null?void 0:qe.element)===b){a.focus({preventScroll:!0}),Ce.preventDefault(),Ce.stopPropagation();return}const vt=Ns.state;if(vt==="open"||vt==="opening"){Ce.preventDefault(),Ce.stopPropagation();return}if(Ce.relatedTarget===Ce.target.getRootNode().host){Ce.preventDefault(),Ce.stopPropagation();return}he||ae||(he=!0,E=null,ee=null,y.onBlur(),he=!1)},{capture:!0,signal:ve}),a.addEventListener("focus",Ce=>{he||ae||(ae=!0,y.onFocus(),ae=!1)},{capture:!0,signal:ve}),{dispose:()=>pe.abort(),cancelComposition:()=>{re&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!ae&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Sh()===a,setAriaLabel:Ce=>a.setAttribute("aria-label",Ce),setValue:Ce=>{var Ne;a.textContent=Ce,a.style.left="-1000px",(Ne=window.getSelection())==null||Ne.selectAllChildren(a)},moveTo:(Ce,Ne)=>{a.style.top=`${Ne}px`,a.style.left=`${Ce}px`}}}function lc(a){var b;if(!a||!wh(a))return"";let y;return a.key==="Unidentified"&&a.target&&(y=a.target.value),y=(b=y!=null?y:a.key)!=null?b:a.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(y)&&(y=""),y}function p0(a){a=$m(a);const b=[];return a.ctrlKey&&b.push("ctrl"),a.metaKey&&b.push("meta"),a.altKey&&b.push("alt"),a.shiftKey&&b.push("shift"),b.length===0?`[${a.code}]`:(b.push(`[${a.code}]`),b.join("+"))}function Wm(a){if(st()){const b=tt(),y=a.startsWith("!"),E=a.endsWith(b);if(y&&!E||!y&&E)return!0}return a==="!other"?!1:a==="other"}function Zm(a,b,y){if(a.length===0)return"";const E=sc(f0(p0(y))),ee=sc({key:y.key,shift:y.shiftKey,alt:y.altKey,ctrl:y.ctrlKey,meta:y.metaKey||y.ctrlKey&&/macos|ios/.test(tt()),cmd:!1,win:!1});for(let re=a.length-1;re>=0;re--)if((a[re].key===E||a[re].key===ee)&&(!a[re].ifMode||a[re].ifMode===b))return a[re].command;return""}function m0(a){let b=a;return Le(b)&&(b=b.length>0?b[0]+"("+b.slice(1).join("")+")":""),b}function jm(a,b){let y=[];if(typeof b=="string"){const re=rd[b];Le(re)?y=re.slice():re&&y.push(re)}const E=m0(b),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(m0(re.command))&&y.push(re.key);return y.map(gf)}function Vm(a,b){if(a.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(a.ifPlatform))throw new Error(`Unexpected platform "${a.ifPlatform}" for keybinding ${a.key}`);if(a.ifLayout!==void 0&&(b.score===0||!a.ifLayout.includes(b.id)))return;const y=f0(a.key);let E=a.ifPlatform;if(y.cmd){if(E&&E!=="macos"&&E!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+E+`"
|
|
|
"cmd" modifier can only be used with macOS or iOS platform.`);E||(E=tt()==="ios"?"ios":"macos"),y.win=!1,y.cmd=!1,y.meta=!0}if(y.win){if(E&&E!=="windows")throw new Error('Unexpected "win" modifier with platform "'+E+`"
|
|
|
"win" modifier can only be used with Windows platform.`);E="windows",y.win=!1,y.cmd=!1,y.meta=!0}if(E&&!Wm(E))return;if(/^\[.+\]$/.test(y.key))return Ee(we({},a),{key:sc(y)});const ee=Om(y.key,b);if(!ee)return Ee(we({},a),{key:sc(y)});if(ee.shift&&y.shift||ee.alt&&y.alt)throw new Error(`The keybinding ${a.key} (${bf(a.command)}) is conflicting with the key combination ${sc(ee)} using the ${b.displayName} keyboard layout`);return ee.shift=ee.shift||y.shift,ee.alt=ee.alt||y.alt,ee.meta=y.meta,ee.ctrl=y.ctrl,Ee(we({},a),{key:sc(ee)})}function bf(a){if(Array.isArray(a)){const b=[...a];return b.shift()+"("+b.map(y=>typeof y=="string"?`"${y}"`:y.toString()).join(", ")+")"}return a}function Gm(a,b){const y=[],E=[];for(const ee of a)try{const re=Vm(ee,b);if(!re)continue;const ae=E.find(he=>he.key===re.key&&he.ifMode===re.ifMode);if(ae)throw new Error(`Ambiguous key binding ${ee.key} (${bf(ee.command)}) matches ${ae.key} (${bf(ae.command)}) with the ${b.displayName} keyboard layout`);E.push(re)}catch(re){re instanceof Error&&y.push(re.message)}return[E,y]}var Um=class extends oi{constructor(){super("latex")}createAtom(a){return new qa(a)}onPaste(a,b){if(!b)return!1;const y=typeof b=="string"?b:b.getData("application/x-latex")||b.getData("text/plain");return y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,y)&&(a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),ma(a)),a.startRecording(),!0):!1}insert(a,b,y){if(!a.contentWillChange({data:b,inputType:"insertText"}))return!1;y||(y={}),y.insertionMode||(y.insertionMode="replaceSelection"),y.selectionMode||(y.selectionMode="placeholder");const{silenceNotifications:E}=a;y.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,y.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Wa(a.selection)):y.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):y.insertionMode==="insertBefore"?a.collapseSelection("backward"):y.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=[];for(const pe of b)oe.test(pe)&&re.push(new qa(pe));let ae=a.at(a.position);if(ae instanceof cd&&(ae=ae.lastChild),!(ae.parent instanceof cd)){const pe=new cd("");ae.parent.addChildAfter(pe,ae),ae=pe.firstChild}const he=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,y.selectionMode==="before"||(y.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(he)):he&&(a.position=a.offsetOf(he))),a.contentDidChange({data:b,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(b=>b.type==="latexgroup")}function bd(a){var b,y;const E=a.atoms.find(ee=>ee.type==="latexgroup");return E?(y=(b=E.body)==null?void 0:b.filter(ee=>ee.type==="latex"))!=null?y:[]:[]}function v0(a,b){var y;let E=0,ee=!1;const re=Number.isFinite(b==null?void 0:b.before)?(y=b==null?void 0:b.before)!=null?y:0:a.lastOffset;for(;E<=re&&!ee;){const pe=a.at(E);ee=pe instanceof qa&&pe.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,he=!1;for(;ae<=re&&!he;){const pe=a.at(ae);he=!(pe instanceof qa&&pe.isSuggestion),he||ae++}return[E-1,ae-1]}new Um;function Ch(a){const b=bd(a.model).filter(y=>y.isSuggestion);if(b.length!==0){a.model.position=a.model.offsetOf(b[0].leftSibling);for(const y of b)y.parent.removeChild(y)}}function yd(a,b){var y;const{model:E}=a;Ch(a);for(const Ce of bd(E))Ce.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){cc(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof qa&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof qa&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof qa&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(Ce=>Ce.value).join(""),he=Pt(a,ae);if(he.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const Ce of ee)Ce.isError=!0;cc(a);return}const pe=(y=b==null?void 0:b.atIndex)!=null?y:0;a.suggestionIndex=pe<0?he.length-1:pe%he.length;const ve=he[a.suggestionIndex];if(ve!==ae){const Ce=ee[ee.length-1];Ce.parent.addChildrenAfter([...ve.slice(ae.length-ve.length)].map(Ne=>new qa(Ne,{isSuggestion:!0})),Ce),pu(a,{interactive:!0})}Jm(a,he)}function g0(a){const[b,y]=v0(a,{before:a.position});if(b===void 0||y===void 0)return!1;let E=!1;return a.getAtoms([b,y]).forEach(ee=>{ee.isSuggestion&&(ee.isSuggestion=!1,E=!0)}),E}function uc(a,b="accept",y){var E,ee;cc(a);const re=Xm(a.model);if(!re)return!1;if(b==="accept-suggestion"||b==="accept-all"){const ve=bd(a.model).filter(Ce=>Ce.isSuggestion);if(ve.length!==0){for(const Ce of ve)Ce.isSuggestion=!1;a.model.position=a.model.offsetOf(ve[ve.length-1])}if(b==="accept-suggestion")return ve.length!==0}const he=bd(a.model).filter(ve=>!ve.isSuggestion).map(ve=>ve.value).join(""),pe=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(pe),a.switchMode((E=y==null?void 0:y.mode)!=null?E:"math"),b==="reject"||(oi.insert(a.model,he,{selectionMode:(ee=y==null?void 0:y.selectItem)!=null&&ee?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Eh(a){var b;let y=document.getElementById(a);return y?y.dataset.refcount=Number(Number.parseInt((b=y.dataset.refcount)!=null?b:"0")+1).toString():(y=document.createElement("div"),y.setAttribute("aria-hidden","true"),y.dataset.refcount="1",y.id=a,document.body.append(y)),y}function yf(a){var b;const y=document.getElementById(a);if(!y)return;const E=Number.parseInt((b=y.getAttribute("data-refcount"))!=null?b:"0");E<=1?y.remove():y.dataset.refcount=Number(E-1).toString()}function Ym(a,b){const y=new wi({from:a.context}),E=new An({mode:"math",type:"root",body:ja(b,{context:y})}),ee=Yu(fd(new ur(E.render(y),{classes:"ML__base"}),y));return Ju(ee,{classes:"ML__latex"}).toMarkup()}function Jm(a,b){var y;if(b.length===0){cc(a);return}let E="";for(const[re,ae]of b.entries()){const he=ae,pe=Ym(a,ae),ve=jm(a.keybindings,he).join("<br>");E+=`<li role="button" data-command="${he}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${he}</span><span class="ML__popover__command">${pe}</span>`,ve&&(E+=`<span class="ML__popover__keybinding">${ve}</span>`),E+="</li>"}const ee=qm(a,`<ul>${E}</ul>`);xf()&&((y=ee.querySelector(".ML__popover__current"))==null||y.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var re;ee&&!xf()&&(ee.classList.add("is-visible"),Mh(a),(re=ee.querySelector(".ML__popover__current"))==null||re.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function xf(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function Mh(a,b){var y;if(!a.element||a.element.mathfield!==a||!xf())return;if(((y=a.model.at(a.model.position))==null?void 0:y.type)!=="latex"){cc(a);return}if(b!=null&&b.deferred){setTimeout(()=>Mh(a),32);return}const E=Fs(a.field);if(!E)return;const ee=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,re=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ae=window.innerWidth-document.documentElement.clientWidth,he=window.innerHeight-document.documentElement.clientHeight,pe=window.mathVirtualKeyboard.boundingRect.height,ve=document.getElementById("mathlive-suggestion-popover");E.x+ve.offsetWidth/2>re-ae?ve.style.left=`${re-ve.offsetWidth-ae}px`:E.x-ve.offsetWidth/2<0?ve.style.left="0":ve.style.left=`${E.x-ve.offsetWidth/2}px`;const Ce=E.y-E.height;ee-he-pe-E.y<Ce?(ve.classList.add("ML__popover--reverse-direction"),ve.classList.remove("top-tip"),ve.classList.add("bottom-tip"),ve.style.top=`${E.y-E.height-ve.offsetHeight-15}px`):(ve.classList.remove("ML__popover--reverse-direction"),ve.classList.add("top-tip"),ve.classList.remove("bottom-tip"),ve.style.top=`${E.y+15}px`)}function cc(a){a.suggestionIndex=0;const b=document.getElementById("mathlive-suggestion-popover");b&&(b.classList.remove("is-visible"),b.innerHTML="")}function qm(a,b){let y=document.getElementById("mathlive-suggestion-popover");return y||(y=Eh("mathlive-suggestion-popover"),Po("suggestion-popover"),Po("core"),y.addEventListener("pointerdown",E=>E.preventDefault()),y.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(uc(a,"reject"),oi.insert(a.model,ee.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),a.dirty=!0,a.focus())})),y.innerHTML=window.MathfieldElement.createHTML(b),y}function Qm(){document.getElementById("mathlive-suggestion-popover")&&(yf("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function ev(){const a=String(new Error().stack).replace(/^Error.*\n/,"").split(`
|
|
|
`);if(a.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let b=a[1],y=b.match(/http.*\.ts[\?:]/);return y&&(b=a[2]),y=b.match(/(https?:.*):[0-9]+:[0-9]+/),y||(y=b.match(/at (.*(\.ts))[\?:]/),y||(y=b.match(/at (.*(\.mjs|\.js))[\?:]/))),y?y[1]:(console.error(a),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${b}").`),"")}var _h=null,b0,y0,wf=((y0=(b0=globalThis==null?void 0:globalThis.document)==null?void 0:b0.currentScript)==null?void 0:y0.src)||ev();function x0(a){return zl(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(_h===null)try{const b=yield fetch(wf,{method:"HEAD"});b.status===200&&(_h=b.url)}catch(b){console.error(`Invalid URL "${a}" (relative to "${wf}")`)}return new URL(a,_h!=null?_h:wf).href})}function tv(a,b,y={}){return new FontFace(a,`url(${b}.woff2) format('woff2')`,y)}var Ho="not-loaded";function nv(){return zl(this,null,function*(){return Ho="not-loaded",kh()})}function kh(){return zl(this,null,function*(){var a;if(Ho!=="not-loaded")return;if(Ho="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){Ho="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const y=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],E=Array.from(document.fonts).map(ae=>ae.family);if(y.every(ae=>E.includes(ae))){Ho="ready";return}if(!window.MathfieldElement.fontsDirectory){Ho="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),Ho="error";return}const re=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(ae=>tv(ae[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${ae[0]}`,ae[1]));try{(yield Promise.all(re.map(he=>{try{return he.load()}catch(pe){}}))).forEach(he=>document.fonts.add(he)),Ho="ready";return}catch(ae){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${ee}"`,{cause:ae}),document.body.classList.add("ML__fonts-did-not-load")}Ho="error"}})}function rv(a){let b=0;for(let y=0;y<a.length;y++)b=b*31+a.charCodeAt(y),b=b|0;return Math.abs(b)}function ma(a,b){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{No(a)&&a.dirty&&(a.atomBoundsCache=new Map,pu(a,b),a.atomBoundsCache=void 0)})))}function iv(a,b){var y;b=b!=null?b:{};const E=new wi({from:Ee(we({},a.context),{atomIdsSettings:{seed:b.forHighlighting?rv(An.serialize([a.model.root],{expandMacro:!1,defaultMode:a.options.defaultMode})):"random",groupNumbers:(y=b.forHighlighting)!=null?y:!1},letterShapeStyle:a.options.letterShapeStyle}),mathstyle:a.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),ee=a.model.root.render(E);return Ju(fd(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function w0(a,b){const{model:y}=a;y.root.caret=void 0,y.root.isSelected=!1,y.root.containsCaret=!0;for(const ee of y.atoms)ee.caret=void 0,ee.isSelected=!1,ee.containsCaret=!1;if(y.selectionIsCollapsed){const ee=y.at(y.position);ee.caret=a.model.mode;let re=ee.parent;for(;re;)re.containsCaret=!0,re=re.parent}else{const ee=y.getAtoms(y.selection,{includeChildren:!0});for(const re of ee)re.isSelected=!0}return iv(a,b).toMarkup()}function pu(a,b){if(!No(a))return;b!=null||(b={});const y=a.element.querySelector("[part=virtual-keyboard-toggle]");y&&(y.style.display=a.hasEditableContent?"":"none");const E=a.field;if(!E)return;const ee=a.isSelectionEditable&&a.hasFocus(),re=E.classList.contains("ML__focused");re&&!ee?E.classList.remove("ML__focused"):!re&&ee&&E.classList.add("ML__focused");let ae=w0(a,b);const he=a.element.querySelector("[part=menu-toggle]");if(he&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?he.style.display="none":he.style.display=""),a.model.atoms.length<=1){const pe=a.options.contentPlaceholder;pe&&(ae+=`<span part=placeholder class="ML__content-placeholder">${Va(pe)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Dh(a,b.interactive),a.dirty=!1}function Dh(a,b){const y=a.field;if(!y)return;for(const he of y.querySelectorAll(".ML__selection, .ML__contains-highlight"))he.remove();!(b!=null&&b)&&Ho!=="error"&&Ho!=="ready"&&setTimeout(()=>{Ho==="ready"?Dh(a):setTimeout(()=>Dh(a),128)},32);const E=a.model,ee=y.offsetWidth,re=y.getBoundingClientRect().width;let ae=Math.floor(re)/ee;if(ae=isNaN(ae)?1:ae,E.selectionIsCollapsed){Mh(a,{deferred:!0});let he=E.at(E.position);for(;he&&he.type!=="prompt"&&!(he.containsCaret&&he.displayContainsHighlight);)he=he.parent;if(he!=null&&he.containsCaret&&he.displayContainsHighlight){const pe=ad(a,Tl(a,he),ae);if(pe){pe.left/=ae,pe.right/=ae,pe.top/=ae,pe.bottom/=ae;const ve=document.createElement("div");ve.classList.add("ML__contains-highlight"),ve.style.position="absolute",ve.style.left=`${pe.left+1}px`,ve.style.top=`${Math.ceil(pe.top)}px`,ve.style.width=`${Math.ceil(pe.right-pe.left)}px`,ve.style.height=`${Math.ceil(pe.bottom-pe.top)}px`,y.insertBefore(ve,y.childNodes[0])}}return}for(const he of av(sd(a,{excludeAtomsWithBackground:!0}))){he.left/=ae,he.right/=ae,he.top/=ae,he.bottom/=ae;const pe=document.createElement("div");pe.classList.add("ML__selection"),pe.style.position="absolute",pe.style.left=`${he.left}px`,pe.style.top=`${he.top}px`,pe.style.width=`${Math.ceil(he.right-he.left)}px`,pe.style.height=`${Math.ceil(he.bottom-he.top-1)}px`,y.insertBefore(pe,y.childNodes[0])}}function av(a){let b=[];for(const y of a){let E=!1;for(const ee of b)if(y.left===ee.left&&y.right===ee.right&&y.top===ee.top&&y.bottom===ee.bottom){E=!0;break}E||b.push(y)}a=b,b=[];for(const y of a){let E=0;for(const ee of a)if(y.left>=ee.left&&y.right<=ee.right&&y.top>=ee.top&&y.bottom<=ee.bottom&&(E+=1,E>1))break;E===1&&b.push(y)}return b}var S0=3,zs;function Oo(a,b){b=we({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},b!=null?b:{}),zs||(zs={});for(const y of Object.keys(a))console.assert(!zs[y],"Selector already defined: ",y),zs[y]=Ee(we({},b),{fn:a[y]})}function Sf(a){let b;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return Sf(a[1]);b=a[0]}else b=a;return b=b.replace(/-\w/g,y=>y[1].toUpperCase()),zs[b]}function dc(a){var b;return(b=Sf(a))==null?void 0:b.target}function ov(a,b){var y;if(!b)return!1;let E,ee=[],re=!1,ae=!1;Le(b)?(E=b[0],ee=b.slice(1)):E=b,E=E.replace(/-\w/g,ve=>ve[1].toUpperCase());const he=zs[E],pe=he==null?void 0:he.target;if(pe==="model"){if(!a.isSelectionEditable&&(he!=null&&he.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Ch(a),zs[E].fn(a.model,...ee),yd(a),ae=!0,re=!0}else if(pe==="virtual-keyboard")ae=(y=window.mathVirtualKeyboard.executeCommand(b))!=null?y:!1,re=!0;else if(zs[E]){if(!a.isSelectionEditable&&(he!=null&&he.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=zs[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return pe!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||he!=null&&he.changeSelection&&b!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),he!=null&&he.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&ma(a),re}function sv(a,b){var y;if(!a)return!1;a.focus(),gp.keypressVibration&&at()&&navigator.vibrate(S0);const E=Sf(b);window.MathfieldElement.playSound((y=E==null?void 0:E.audioFeedback)!=null?y:"keypress");const ee=a.executeCommand(b);return a.scrollIntoView(),ee}Oo({performWithFeedback:(a,b)=>sv(a,b)});function lv(a){return yd(a,{atIndex:a.suggestionIndex+1}),!1}function uv(a){return yd(a,{atIndex:a.suggestionIndex-1}),!1}Oo({complete:uc},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Oo({nextSuggestion:lv,previousSuggestion:uv},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Lh="mathlive#virtual-keyboard-message";function Cf(a){var b;return a.type!=="message"?!1:((b=a.data)==null?void 0:b.type)===Lh}var cv=class em{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new em),this._singleton}set alphabeticLayout(b){this.sendMessage("update-setting",{alphabeticLayout:b})}set layouts(b){this.sendMessage("update-setting",{layouts:b})}get normalizedLayouts(){return[]}set editToolbar(b){this.sendMessage("update-setting",{editToolbar:b})}set actionKeycap(b){this.sendMessage("update-setting",{actionKeycap:b})}set shiftKeycap(b){this.sendMessage("update-setting",{shiftKeycap:b})}set backspaceKeycap(b){this.sendMessage("update-setting",{backspaceKeycap:b})}set tabKeycap(b){this.sendMessage("update-setting",{tabKeycap:b})}set container(b){throw new Error("Container inside an iframe cannot be changed")}show(b){this.sendMessage("show",b)}hide(b){this.sendMessage("hide",b)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(b){b?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(b){return this.sendMessage("execute-command",{command:b}),!0}updateToolbar(b){this.sendMessage("update-toolbar",b)}update(b){this.sendMessage("update-setting",b)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(b,y,E){this.listeners[b]||(this.listeners[b]=new Set),this.listeners[b].has(y)||this.listeners[b].add(y)}dispatchEvent(b){return!this.listeners[b.type]||this.listeners[b.type].size===0?!0:(this.listeners[b.type].forEach(y=>{typeof y=="function"?y(b):y==null||y.handleEvent(b)}),!b.defaultPrevented)}removeEventListener(b,y,E){this.listeners[b]&&this.listeners[b].delete(y)}handleEvent(b){if(Cf(b)){if(!ld(b.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${b.origin}) cannot be handled`,"SecurityError");this.handleMessage(b.data)}}handleMessage(b){const{action:y}=b;if(y==="execute-command"){const{command:E}=b;dc(E)==="virtual-keyboard"&&this.executeCommand(E);return}if(y==="synchronize-proxy"){this._boundingRect=b.boundingRect,this._isShifted=b.isShifted;return}if(y==="geometry-changed"){this._boundingRect=b.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(b,y={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(we({type:Lh,action:b},y),this.targetOrigin)}},C0={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
|
|
|
.minimalist-backdrop {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
.minimalist-container {
|
|
|
--keycap-height: 40px;
|
|
|
--keycap-max-width: 53px;
|
|
|
--keycap-small-font-size: 12px;
|
|
|
background: var(--keyboard-background);
|
|
|
padding: 20px;
|
|
|
border-top-left-radius: 8px;
|
|
|
border-top-right-radius: 8px;
|
|
|
border: 1px solid var(--keyboard-border);
|
|
|
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
|
|
|
}
|
|
|
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},Ah={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},xd;function E0(a,b){var y,E,ee;const re=$l.singleton;if(!re)return;const ae=hc(a),he=(E=(y=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:y.variants)!=null?E:"";if(typeof he=="string"&&!M0(he)||Array.isArray(he)&&he.length===0){b==null||b();return}const pe={};let ve="";for(const vn of hv(he)){const or=k0(vn),fn=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);pe[fn]=or;const[zn,hr]=Bh(or);ve+=`<div id=${fn} class="item ${hr}">${zn}</div>`}const Ce=document.createElement("div");Ce.setAttribute("aria-hidden","true"),Ce.className="MLK__variant-panel",Ce.style.height="auto";const Ne=Object.keys(pe).length;let qe=5;Ne===1?qe=1:Ne===2||Ne===4?qe=2:Ne===3||Ne===5||Ne===6?qe=3:Ne>=7&&Ne<14&&(qe=4),Ce.style.width=`calc(var(--variant-keycap-length) * ${qe} + 12px)`,Ce.innerHTML=gp.createHTML(ve),Ns.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:Ce}),xd=new AbortController;const{signal:vt}=xd,Mt=a==null?void 0:a.getBoundingClientRect();if(Mt){Mt.top-Ce.clientHeight<0&&(Ce.style.width="auto",Ne<=6?Ce.style.height="56px":Ne<=12?Ce.style.height="108px":Ne<=18?Ce.style.height="205px":Ce.classList.add("compact"));const vn=Math.max(0,Math.min(window.innerWidth-Ce.offsetWidth,(Mt.left+Mt.right-Ce.offsetWidth)/2)),or=Mt.top-Ce.clientHeight+5;Ce.style.transform=`translate(${vn}px, ${or}px)`,Ce.classList.add("is-visible"),requestAnimationFrame(()=>{Ce.addEventListener("pointerup",fn=>{const zn=hc(fn.target);!(zn!=null&&zn.id)||!pe[zn.id]||(Ef(pe[zn.id]),wd(),b==null||b(),fn.preventDefault())},{capture:!0,passive:!1,signal:vt}),Ce.addEventListener("pointerenter",fn=>{const zn=hc(fn.target);!(zn!=null&&zn.id)||!pe[zn.id]||zn.classList.add("is-active")},{capture:!0,signal:vt}),Ce.addEventListener("pointerleave",fn=>{const zn=hc(fn.target);!(zn!=null&&zn.id)||!pe[zn.id]||zn.classList.remove("is-active")},{capture:!0,signal:vt}),window.addEventListener("pointercancel",()=>{wd(),b==null||b()},{signal:vt}),window.addEventListener("pointerup",()=>{wd(),b==null||b()},{signal:vt})})}}function wd(){xd==null||xd.abort(),xd=null,Ns.state==="open"&&Ns.close()}function dv(a){if(a==="foreground-color"){const b=[];for(const y of Object.keys(Ze))b.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ze[y]+'"></span>',command:["applyStyle",{color:y}]});return b}if(a==="background-color"){const b=[];for(const y of Object.keys(Ke))b.push({class:"swatch-button",label:'<span style="background:'+Ke[y]+'"></span>',command:["applyStyle",{backgroundColor:y}]});return b}}function M0(a){return Ah[a]!==void 0}function hv(a){var b;return typeof a!="string"?a:(Ah[a]||(Ah[a]=(b=dv(a))!=null?b:[]),Ah[a])}function fv(a){return typeof a=="string"?a:Object.entries(a).map(([b,y])=>`${b}:${y} !important`).join(";")}function pv(a){return Object.keys(a).map(b=>`${b} {${fv(a[b])}}`).join("")}function Sd(a){if(!a)return"";const b=new wi,y=new An({mode:"math",type:"root",body:ja(a,{context:b,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=Yu(fd(new ur(y.render(b),{classes:"ML__base"}),b));return Ju(E,{classes:"ML__latex"}).toMarkup()}function Cd(a){var b;if(Array.isArray(a))return a.map(E=>Cd(E)).flat();const y=typeof a=="string"?{markup:a}:a;return"rows"in y&&Array.isArray(y.rows)&&(y.rows=y.rows.map(E=>E.map(ee=>k0(ee)))),(b=y.id)!=null||(y.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[y]}function mv(){var a,b;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const he=gd();he&&(E=he.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Ue.locale.slice(0,2)])!=null?a:"qwerty")}const ee={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},re=(b=ee[E])!=null?b:ee.qwerty,ae=E==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const he of re){const pe=[];for(const ve of he)/[a-z]/.test(ve)?pe.push({label:ve,class:"hide-shift",shift:{label:ve.toUpperCase()},variants:M0(ve)?ve:void 0}):ve==="~"?E!=="dvorak"?pe.push("[backspace]"):pe.push({label:"[backspace]",width:1}):ve==="^"?pe.push("[shift]"):ve===" "&&pe.push("[separator-5]");ae.push(pe)}return ae.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:Cd({rows:ae})}}function _0(a){if(a==="alphabetic")return mv();if(typeof a=="string")return console.assert(C0[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),_0(C0[a]);let b;if("rows"in a&&Array.isArray(a.rows)){console.assert(!("layers"in a||"markup"in a),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const ee=a,{rows:re}=ee,ae=it(ee,["rows"]);b=Ee(we({},ae),{layers:Cd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=it(ee,["markup"]);b=Ee(we({},ae),{layers:Cd(a.markup)})}else b=we({},a),"layers"in a?b.layers=Cd(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let y=!1,E=!1;for(const ee of b.layers)if(ee.rows)for(const re of ee.rows.flat()){fc(re)&&(y=!0);const ae=re.command;typeof ae=="string"&&["undo","redo","cut","copy","paste"].includes(ae)&&(E=!0)}return(!("displayShiftedKeycaps"in a)||a.displayShiftedKeycaps===void 0)&&(b.displayShiftedKeycaps=y),(!("displayEditToolbar"in a)||a.displayEditToolbar===void 0)&&(b.displayEditToolbar=!E),b}function vv(a,b){var y,E;let ee='<div class="left">';if(a.normalizedLayouts.length>1)for(const[re,ae]of a.normalizedLayouts.entries()){const he=ae,pe=[re===b?"selected":"layer-switch"];he.tooltip&&pe.push("MLK__tooltip"),he.labelClass&&pe.push(...he.labelClass.split(" ")),ee+=`<div class="${pe.join(" ")}"`,he.tooltip&&(ee+=" data-tooltip='"+((y=Xe(he.tooltip))!=null?y:he.tooltip)+"' "),re!==b&&(ee+=`data-layer="${he.layers[0].id}"`),ee+=`>${(E=he.label)!=null?E:"untitled"}</div>`}return ee+="</div>",ee}function gv(a,b){let y="";if(a.editToolbar==="none")return"";const ee=[];b.selectionIsCollapsed?ee.push("undo","redo","pasteFromClipboard"):ee.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const re={undo:`<div class='action ${b.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${Xe("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${b.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${Xe("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${Xe("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${Xe("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${Xe("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return y+=ee.map(ae=>re[ae]).join(""),y}function bv(a){for(const b of a)yv(b)}function yv(a){const b=$l.singleton;if(!b)return;const y={};if(!a.id){if(a.hasAttribute("data-label")&&(y.label=a.dataset.label),a.hasAttribute("data-latex")&&(y.latex=a.dataset.latex),a.hasAttribute("data-key")&&(y.key=a.dataset.key),a.hasAttribute("data-insert")&&(y.insert=a.dataset.insert),a.hasAttribute("data-variants")&&(y.variants=a.dataset.variants),a.hasAttribute("data-aside")&&(y.aside=a.dataset.aside),a.className&&(y.class=a.className),!y.label&&!y.latex&&!y.key&&!y.insert&&(y.latex=a.innerText,y.label=a.innerHTML),a.hasAttribute("data-command"))try{y.command=JSON.parse(a.dataset.command)}catch(E){}a.id=b.registerKeycap(y)}if(!a.innerHTML){const[E,ee]=Bh(y);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xv(){Po("virtual-keyboard"),Po("core"),kh()}function wv(){x("core"),x("virtual-keyboard")}var Sv=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
|
|
|
|
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
|
|
|
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-shift" viewBox="0 0 384 512">
|
|
|
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-commit" viewBox="0 0 512 512">
|
|
|
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
|
|
|
</symbol>
|
|
|
|
|
|
|
|
|
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
|
|
|
|
|
|
<symbol id="svg-command" viewBox="0 0 640 512">
|
|
|
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-undo" viewBox="0 0 512 512">
|
|
|
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-redo" viewBox="0 0 512 512">
|
|
|
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
|
|
|
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
|
|
|
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-tab" viewBox="0 0 448 512">
|
|
|
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
|
|
|
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
|
|
|
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-trash" viewBox="0 0 448 512">
|
|
|
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
|
|
|
</svg>`;function Cv(a){a.resetKeycapRegistry(),xv();const b=document.createElement("div");b.className="ML__keyboard";const y=document.createElement("div");y.className="MLK__plate",y.innerHTML=window.MathfieldElement.createHTML(Sv+a.normalizedLayouts.map((ae,he)=>Ev(a,ae,he)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(y),b.appendChild(E),b.addEventListener("pointerdown",_v,{passive:!1});const ee=b.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",he=>{var pe,ve;let Ce=he.target,Ne="";for(;Ce&&!Ne;)Ne=(pe=Ce==null?void 0:Ce.getAttribute("data-command"))!=null?pe:"",Ce=(ve=Ce==null?void 0:Ce.parentElement)!=null?ve:null;Ne&&a.executeCommand(JSON.parse(Ne))});bv(b.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const re=b.querySelectorAll(".MLK__layer");console.assert(re.length>0,"No virtual keyboards available");for(const ae of re)ae.addEventListener("pointerdown",he=>he.preventDefault());return a.currentLayer=a.latentLayer,b}function Ev(a,b,y){const E=[];if(!("layers"in b))return"";for(const ee of b.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${ee.id}">`),(a.normalizedLayouts.length>1||b.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(vv(a,y)),b.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Mv(a,ee)),E.push("</div>");return E.join("")}function Mv(a,b){if(typeof b=="string")return b;let y="";if(typeof b.style=="string"?y+=`<style>${b.style}</style>`:typeof b.style=="object"&&(y+=`<style>${pv(b.style)}</style>`),b.backdrop&&(y+=`<div class='${b.backdrop}'>`),b.container&&(y+=`<div class='${b.container}'>`),b.rows){y+="<div class=MLK__rows>";for(const E of b.rows){y+="<div dir='ltr' class=MLK__row>";for(const ee of E)if(ee){const re=a.registerKeycap(ee),[ae,he]=Bh(ee);/(^|\s)separator/.test(he)?y+=`<div class="${he}"`:y+=`<div tabindex="-1" id="${re}" class="${he}"`,ee.tooltip&&(y+=` data-tooltip="${ee.tooltip}"`),y+=`>${ae}</div>`}y+="</div>"}y+="</div>"}else b.markup&&(y+=b.markup);return b.container&&(y+="</div>"),b.backdrop&&(y+="</div>"),y}function Bh(a,b={shifted:!1}){var y,E,ee,re,ae,he,pe;let ve="",Ce=(y=a.class)!=null?y:"";if(b.shifted&&fc(a)&&(Ce+=" is-active"),b.shifted&&"shift"in a)typeof a.shift=="string"?ve=Sd(a.shift):typeof a.shift=="object"&&(ve=a.shift.label?a.shift.label:(E=Sd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(Ce=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(ve=a.label?a.label:(ae=Sd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let Ne;typeof a.shift=="string"?Ne=Sd(a.shift):a.shift.label?Ne=a.shift.label:Ne=(he=Sd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?he:"",ve+=`<span class="MLK__shift">${Ne}</span>`}a.aside&&(ve+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(Ce)&&(Ce+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(Ce)||(Ce+=" MLK__keycap"),!/\bw[0-9]+\b/.test(Ce)&&a.width&&(Ce+=(pe={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?pe:""),[ve,Ce||"MLK__keycap"]}var mu={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function k0(a){var b;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!mu[a])return{latex:a};a={label:a}}let y;return"label"in a&&a.label&&mu[a.label]&&(y=Ee(we(we({},mu[a.label]),a),{label:mu[a.label].label})),"key"in a&&a.key&&mu[a.key]&&(y=Ee(we(we({},mu[a.key]),a),{key:mu[a.key].key})),y?(y.command==="insertDecimalSeparator"&&(y.label=(b=window.MathfieldElement.decimalSeparator)!=null?b:"."),a.label==="[action]"&&(y=we(we({},y),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(y=we(we({},y),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(y=we(we({},y),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(y=we(we({},y),window.mathVirtualKeyboard.tabKeycap)),y):a}var Ed;function _v(a){var b;if(a.button!==0)return;const y=$l.singleton;if(!y)return;let E=a.target;for(;E&&!E.getAttribute("data-layer");)E=E.parentElement;if(E){y.currentLayer=(b=E.getAttribute("data-layer"))!=null?b:"",a.preventDefault();return}const ee=hc(a.target);if(!(ee!=null&&ee.id))return;const re=y.getKeycap(ee.id);if(!re)return;console.assert(a.type==="pointerdown");const ae=new AbortController,he=ae.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Th(ae),{capture:!0,signal:he}),ee.addEventListener("pointerleave",Th(ae),{capture:!0,signal:he}),ee.addEventListener("pointercancel",Th(ae),{signal:he}),ee.addEventListener("pointerup",Th(ae),{signal:he}),fc(re)&&(ee.classList.add("is-active"),y.shiftPressCount++),re.variants&&(Ed&&clearTimeout(Ed),Ed=setTimeout(()=>{ee.classList.contains("is-pressed")&&(ee.classList.remove("is-pressed"),ee.classList.add("is-active"),a.target&&"releasePointerCapture"in a.target&&a.target.releasePointerCapture(a.pointerId),E0(ee,()=>{ae.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Th(a){return b=>{const y=hc(b.target);if(!(y!=null&&y.id))return;const E=$l.singleton;if(!E)return;const ee=E.getKeycap(y.id);if(ee){if(b.type==="pointerenter"&&b.target===y&&b.isPrimary&&y.classList.add("is-pressed"),b.type==="pointercancel"){y.classList.remove("is-pressed"),fc(ee)&&(E.shiftPressCount--,y.classList.toggle("is-active",E.isShifted)),a.abort();return}if(b.type==="pointerleave"&&b.target===y){y.classList.remove("is-pressed"),fc(ee)&&(E.shiftPressCount--,y.classList.toggle("is-active",E.isShifted));return}if(b.type==="pointerup"){Ed&&clearTimeout(Ed),fc(ee)?y.classList.toggle("is-active",E.isShifted):y.classList.contains("is-pressed")&&(y.classList.remove("is-pressed"),E.isShifted&&ee.shift?typeof ee.shift=="string"?E.executeCommand(["insert",ee.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Ef(ee.shift):Ef(ee),E.shiftPressCount===1&&!b.shiftKey&&(E.shiftPressCount=0)),a.abort(),b.preventDefault();return}}}}function Ef(a){var b;let y=a.command;!y&&a.insert&&(y=["insert",a.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!y&&a.key&&(y=["typedText",a.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!y&&a.latex&&(y=["insert",a.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),y||(y=["typedText",a.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(b=$l.singleton)==null||b.executeCommand(y)}function kv(a){if(a.nodeType!==1)return!1;const b=a.classList;return b.contains("MLK__keycap")||b.contains("shift")||b.contains("action")||b.contains("fnbutton")||b.contains("bigfnbutton")}function hc(a){if(!a)return;let b=a;for(;b&&!kv(b);)b=b.parentElement;return b!=null?b:void 0}function fc(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var $l=class tm{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var b,y,E;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(y=(b=window.document)==null?void 0:b.body)!=null?y:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(ee=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(E=window.top)==null||E.addEventListener("message",this)}catch(ee){window.addEventListener("message",this)}document.body.addEventListener("focusin",ee=>{const re=ee.target;re!=null&&re.isConnected&&setTimeout(()=>{const ae=D0();ae&&!ae.readOnly&&ae.mathVirtualKeyboardPolicy==="auto"&&Qe()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{D0()||this.hide()},300)})}get currentLayer(){var b,y,E;return(E=(y=(b=this._element)==null?void 0:b.querySelector(".MLK__layer.is-visible"))==null?void 0:y.id)!=null?E:""}set currentLayer(b){var y;if(!this._element){this.latentLayer=b;return}let E=b?this._element.querySelector(`#${b}.MLK__layer`):null;E||(E=this._element.querySelector(".MLK__layer")),E&&((y=this._element.querySelector(".MLK__layer.is-visible"))==null||y.classList.remove("is-visible"),E.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(b){var y;this._shiftPressCount=b>2||b<0?0:b,(y=this._element)==null||y.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(b){const y="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[y]=b,y}getKeycap(b){return b?this.keycapRegistry[b]:void 0}getLayer(b){const y=this.normalizedLayouts;for(const E of y)for(const ee of E.layers)if(ee.id===b)return ee}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(b){this._alphabeticLayout=b,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(b){this._actionKeycap=typeof b=="string"?{label:b}:b}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(b){this._shiftKeycap=typeof b=="string"?{label:b}:b}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(b){this._backspaceKeycap=typeof b=="string"?{label:b}:b}get tabKeycap(){return this._tabKeycap}set tabKeycap(b){this._tabKeycap=typeof b=="string"?{label:b}:b}get layouts(){return this._layouts}set layouts(b){this.updateNormalizedLayouts(b),this.rebuild()}updateNormalizedLayouts(b){const y=Array.isArray(b)?[...b]:[b],E=y.findIndex(ee=>ee==="default");E>=0&&y.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(y),this._normalizedLayouts=y.map(ee=>_0(ee))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(b){this._editToolbar=b,this.rebuild()}get container(){return this._container}set container(b){this._container=b,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new tm}catch(b){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(b,y,E){this.listeners[b]||(this.listeners[b]=new Set),this.listeners[b].has(y)||this.listeners[b].add(y)}dispatchEvent(b){return!this.listeners[b.type]||this.listeners[b.type].size===0?!0:(this.listeners[b.type].forEach(y=>{typeof y=="function"?y(b):y==null||y.handleEvent(b)}),!b.defaultPrevented)}removeEventListener(b,y,E){this.listeners[b]&&this.listeners[b].delete(y)}get element(){return this._element}set element(b){var y;this._element!==b&&((y=this._element)==null||y.remove(),this._element=b)}get visible(){return this._visible}set visible(b){b?this.show():this.hide()}get boundingRect(){var b;if(!this._visible)return new DOMRect;const y=(b=this._element)==null?void 0:b.getElementsByClassName("MLK__plate")[0];return y?y.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var b,y;const E=this.boundingRect.height;if(this.container===document.body){(b=this._element)==null||b.style.setProperty("--_keyboard-height",`calc(${E}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const ee=E-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${ee}px)`:`${ee}px`}else(y=this._element)==null||y.style.setProperty("--_keyboard-height",`${E}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const b=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=b,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const b=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(b&&(b.backdrop||b.container)));const y=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(y)for(const E of y){const ee=this.getKeycap(E.id);if(ee){const[re,ae]=Bh(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=ae}}}show(b){var y;if(this._visible)return;const E=this.container;if(E&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const ee=this._element.getElementsByClassName("MLK__plate")[0];if(ee&&this.observer.observe(ee),E===window.document.body){const re=E.style.paddingBottom;this.originalContainerBottomPadding=re;const ae=ee.offsetHeight-1;E.style.paddingBottom=re?`calc(${re} + ${ae}px)`:`${ae}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(y=this._element)==null||y.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,b!=null&&b.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var ee;return(ee=this._element)==null?void 0:ee.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(b){var y;const E=this.container;if(E&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const ee=this._element.getElementsByClassName("MLK__plate")[0];ee&&this.observer.unobserve(ee),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),wd(),wv(),(y=this._element)==null||y.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(E.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var b,y;return(y=(b=this.element)==null?void 0:b.offsetHeight)!=null?y:0}buildAndAttachElement(){var b;console.assert(!this.element),this.element=Cv(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",y=>{y.shiftKey||((y.ctrlKey||y.button===2)&&E0(y.target),y.preventDefault(),y.stopPropagation())},{capture:!0}),(b=this.container)==null||b.appendChild(this.element)}handleEvent(b){if(Cf(b)){if(!ld(b.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${b.origin}) cannot be handled`,"SecurityError");b.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:b.data.action!=="update-setting"&&b.data.action!=="proxy-created"&&b.data.action!=="execute-command"&&(console.assert(b.source!==void 0),this.connectedMathfieldWindow=b.source),this.handleMessage(b.data,b.source)}if(this._element)switch(b.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":b.button!==2&&b.preventDefault();break;case"keydown":{b.key==="Shift"&&!b.repeat&&(this.shiftPressCount=1);break}case"keyup":{(b.key==="Shift"||!b.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(b,y){const{action:E}=b;if(E==="execute-command"){const{command:ee}=b,re=dc(ee);if(window.top!==void 0&&re!=="virtual-keyboard")return;this.executeCommand(ee);return}if((E==="connect"||E==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},y),E!=="disconnect"&&window===window.top){if(E==="show"){typeof b.animate!="undefined"?this.show({animate:b.animate}):this.show();return}if(E==="hide"){typeof b.animate!="undefined"?this.hide({animate:b.animate}):this.hide();return}if(E==="update-setting"){b.alphabeticLayout&&(this.alphabeticLayout=b.alphabeticLayout),b.layouts&&(this.layouts=b.layouts),b.editToolbar&&(this.editToolbar=b.editToolbar);return}if(E==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},y);return}}}sendMessage(b,y,E){if(E||(E=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||E===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:we({type:Lh,action:b},y)}));return}if(E)E.postMessage(we({type:Lh,action:b},y),{targetOrigin:this.targetOrigin});else if(y.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:y.command})),b==="execute-command"&&Array.isArray(y.command)&&y.command[0]==="insert"){const ee=y.command[1].split("");for(const re of ee)this.dispatchEvent(new KeyboardEvent("keydown",{key:re,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:re,bubbles:!0}))}}stateWillChange(b){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:b},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(b){const y=this._element;if(!y)return;y.classList.toggle("is-math-mode",b.mode==="math"),y.classList.toggle("is-text-mode",b.mode==="text"),y.classList.toggle("can-undo",b.canUndo),y.classList.toggle("can-redo",b.canRedo),y.classList.toggle("can-copy",!b.selectionIsCollapsed),y.classList.toggle("can-copy",!b.selectionIsCollapsed),y.classList.toggle("can-paste",!0);const E=y.querySelectorAll(".ML__edit-toolbar");if(E)for(const ee of E)ee.innerHTML=gv(this,b)}update(b){this._style=b.style,this.updateToolbar(b)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(b){let y,E=[],ee=dc(b);return Le(b)?(y=b[0],y==="performWithFeedback"&&(b=b.slice(1),ee=dc(b)),E=b.slice(1)):y=b,y=y.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?zs[y].fn(void 0,...E):(this.sendMessage("execute-command",{command:b}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function D0(){var a,b;let y=Sh(),E=null;for(;y;){if("host"in y&&((b=(a=y.host)==null?void 0:a.tagName)==null?void 0:b.toLowerCase())==="math-field"){E=y.host;break}y=y.parentNode}return E}if(st()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=$l.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>cv.singleton,configurable:!0});function Ih(a){const b={};for(const y of Object.keys(a))switch(y){case"scriptDepth":const E=a.scriptDepth;if(Le(E))b.scriptDepth=[E[0],E[1]];else if(typeof E=="number")b.scriptDepth=[E,E];else if(typeof E=="string"){const[re,ae]=E.split(",").map(he=>parseInt(he.trim()));b.scriptDepth=[re,ae]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let ee=a.mathVirtualKeyboardPolicy.toLowerCase();if(ee==="sandboxed"){if(window!==window.top){const re=$l.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}b.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?Ue.locale.startsWith("fr")?b.letterShapeStyle="french":b.letterShapeStyle="tex":b.letterShapeStyle=a.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(a.defaultMode)?b.defaultMode=a.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),b.defaultMode="math");break;case"macros":b.macros=wt(a.macros);break;default:Le(a[y])?b[y]=[...a[y]]:typeof a[y]=="object"&&!(a[y]instanceof Element)&&y!=="computeEngine"?b[y]=we({},a[y]):b[y]=a[y]}return b}function vu(a,b){let y;typeof b=="string"?y=[b]:b===void 0?y=Object.keys(a):y=b;const E={};for(const ee of y)a[ee]===null?E[ee]=null:Le(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=we({},a[ee]):E[ee]=a[ee];return typeof b=="string"?E[b]:E}function Ph(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:St,backgroundColorMap:ot,letterShapeStyle:Ue.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:a=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(a),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:lf,inlineShortcuts:dh,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sf,value:""}}function L0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function Fl(a,b){!a||!b||(Le(a)?a.forEach(y=>Fl(y,b)):typeof a=="object"&&!a.style.color&&!a.style.backgroundColor&&!a.style.fontFamily&&!a.style.fontShape&&!a.style.fontSeries&&!a.style.fontSize&&!a.style.variant&&!a.style.variantStyle&&(a.applyStyle(b),Fl(a.body,b),Fl(a.above,b),Fl(a.below,b),Fl(a.subscript,b),Fl(a.superscript,b)))}function Mf(a,b,y,E){function ee(ae,he){for(const pe of re)if(pe.style[ae]!==he)return!1;return!0}if(b=a.normalizeRange(b),b[0]===b[1])return!1;const re=a.getAtoms(b,{includeChildren:!0});E.operation==="toggle"&&(y.color&&ee("color",y.color)&&(y.color="none",delete y.verbatimColor),y.backgroundColor&&ee("backgroundColor",y.backgroundColor)&&(y.backgroundColor="none",delete y.verbatimBackgroundColor),y.fontFamily&&ee("fontFamily",y.fontFamily)&&(y.fontFamily="none"),y.fontSeries&&ee("fontSeries",y.fontSeries)&&(y.fontSeries="auto"),y.fontShape&&ee("fontShape",y.fontShape)&&(y.fontShape="auto"),y.fontSize&&ee("fontSize",y.fontSize)&&(y.fontSize=Ls),y.variant&&ee("variant",y.variant)&&(y.variant="normal"),y.variantStyle&&ee("variantStyle",y.variantStyle)&&(y.variantStyle=""));for(const ae of re)ae.applyStyle(y);return!0}function Dv(a,b){const y=a.at(a.position);if(y.type==="composition")y.value=b;else{const{caret:E}=y;y.caret=void 0;const ee=new fl(b,{mode:y.mode});ee.caret=E,y.parent.addChildAfter(ee,y),a.position+=1}}function Lv(a){const b=a.at(a.position);b.type==="composition"&&(b.parent.removeChild(b),a.position-=1)}ln(["math","displaymath"],qo),ln("center",qo),xt("displaylines","",{parse:a=>{const b=[];let y=[];a.beginContext({tabular:!0});do{if(a.end()||a.match("<}>"))break;a.matchColumnSeparator()||a.matchRowSeparator()?(b.push([y]),y=[]):y.push(...a.scan(E=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(E)))}while(!0);return a.endContext(),b.push([y]),b},createAtom:a=>new li("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),Sn("array","{columns:colspec}",(a,b,y,E)=>new li(a,_f(b),y,{columns:E[0],mathstyleName:"textstyle"})),Sn(["equation","equation*","subequations"],"",(a,b,y)=>new li(a,_f(b),y,{columns:[{align:"c"}]})),Sn(["multline","multline*"],"",qo),Sn(["align","align*","aligned","eqnarray"],"",qo),Sn("split","",qo),Sn(["gather","gathered"],"",qo),Sn(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",qo),Sn(["smallmatrix","smallmatrix*"],"[columns:colspec]",qo),Sn(["cases","dcases","rcases"],"",qo);function Av(a){for(const b of a)for(const y of b)if(y.length>0)return!1;return!0}function _f(a,b=1){return Av(a)?Array(b).fill([[new An({type:"first"}),new Gr]]):a.map(y=>y.length===0?[[new An({type:"first"})]]:y.map(E=>E.length===0?[new An({type:"first"})]:(E[0].type!=="first"&&E.unshift(new An({type:"first"})),E)))}function qo(a,b=[[[]]],y=[],E=[]){switch(b=_f(b,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new li(a,b,y,{mathstyleName:"textstyle"});case"displaymath":return new li(a,b,y,{mathstyleName:"textstyle"});case"center":return new li(a,b,y,{columns:[{align:"c"}]});case"multline":case"multline*":return new li(a,b,y,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new li(a,b,y,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new li(a,b,y,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new li(a,b,y,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:gu(E[0])});case"bmatrix":case"bmatrix*":return new li(a,b,y,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:gu(E[0])});case"Bmatrix":case"Bmatrix*":return new li(a,b,y,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:gu(E[0])});case"vmatrix":case"vmatrix*":return new li(a,b,y,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:gu(E[0])});case"Vmatrix":case"Vmatrix*":return new li(a,b,y,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:gu(E[0])});case"matrix":case"matrix*":return new li(a,b,y,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:gu(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new li(a,b,y,{mathstyleName:"scriptstyle",columns:gu(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new li(a,b,y,{mathstyleName:a==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new li(a,b,y,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new li(a,b,y,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const he of b)ee=Math.max(ee,he.length);const re=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let ae=2;for(;ae<ee;)re.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),ae+=2;return re.push({gap:0}),new li(a,b,y,{arraycolsep:0,columns:re,minColumns:2})}}return new li(a,b,y,{mathstyleName:"textstyle"})}function gu(a){return a!=null?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Bv(a,b){let y=a.at(a.position);for(;y&&!(y.parent instanceof li);)y=y.parent;if(y&&y.type==="array"&&y.environmentName,!y||!(y.parent instanceof li)){const E=a.at(a.position);if(y=E,!y.parent.parent){let ee=a.extractAtoms([a.position,a.lastOffset]),re=a.extractAtoms([0,a.position]);re.length===0&&(re=Fh()),ee.length===0&&(ee=Fh());let ae;return b.endsWith("column")?(ae=qo("split",[[re,ee]]),a.root=ae,bu(ae,0,0)?yu(a,ae,0,0):bu(ae,0,1)?yu(a,ae,0,1):a.position=a.offsetOf(E)):(ae=qo("lines",[[re],[ee]]),a.root=ae,bu(ae,0,0)?yu(a,ae,0,0):bu(ae,1,0)?yu(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(y.parent instanceof Bi){const ee=y.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),ae=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);ae.length===0&&(ae=Fh()),re.length===0&&(re=Fh());let he="pmatrix";const pe=ee.leftDelim,ve=ee.rightDelim;pe==="("&&(ve===")"||ve==="?")?he="pmatrix":(pe==="["||pe==="\\lbrack")&&(ve==="]"||ve==="\\rbrack"||ve==="?")?he="bmatrix":pe==="\\vert"&&ve==="\\vert"?he="vmatrix":pe==="\\Vert"&&ve==="\\Vert"?he="Vmatrix":(pe==="{"||pe==="\\lbrace")&&(ve==="."||ve==="?")&&(he="cases");const Ce=qo(he,b.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(Ce,ee),ee.parent.removeChild(ee),bu(Ce,0,0)?yu(a,Ce,0,0):b.endsWith("column")?bu(Ce,0,1)?yu(a,Ce,0,1):a.position=a.offsetOf(y):bu(Ce,1,0)?yu(a,Ce,1,0):a.position=a.offsetOf(y),[void 0,[0,0]]}}return y&&y.parent instanceof li?[y.parent,y.parentBranch]:[void 0,[0,0]]}function bu(a,b,y){const E=a.getCell(b,y);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Tv(a,b,y,E){const ee=b.getCell(y,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function yu(a,b,y,E){const ee=Tv(a,b,y,E);typeof ee!="number"&&a.setSelection(ee)}function Oh(a,b,y,E,ee){const re=b.getCell(y,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function $h(a,b){const[y,[E,ee]]=Bv(a,b);if(y)switch(b){case"after row":y.addRowAfter(E),Oh(a,y,E+1,0,"end");break;case"after column":if(y.maxColumns<=y.colCount){a.announce("plonk");return}y.addColumnAfter(ee),Oh(a,y,E,ee+1,"end");break;case"before row":y.addRowBefore(E),Oh(a,y,E,0,"start");break;case"before column":if(y.maxColumns<=y.colCount){a.announce("plonk");return}y.addColumnBefore(ee),Oh(a,y,E,ee,"start");break}}function A0(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Iv(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function B0(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pv(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function T0(a,b){if(!a.contentWillChange({}))return!1;a.mathfield.snapshot();let y=".",E=".";switch(b){case"pmatrix":case"pmatrix*":y="(",E=")";break;case"bmatrix":case"bmatrix*":y="[",E="]";break;case"Bmatrix":case"Bmatrix*":y="\\lbrace",E="\\rbrace";break;case"vmatrix":case"vmatrix*":y="\\vert",E="\\vert";break;case"Vmatrix":case"Vmatrix*":y="\\Vert",E="\\Vert";break;case"matrix":case"matrix*":y=".",E=".";break;case"cases":case"dcases":y="\\lbrace";break;case"rcases":E="\\rbrace";break}const ee=a.at(a.position),re=ee.type==="array"?ee:a.parentEnvironment;return re.environmentName=b,re.leftDelim=y,re.rightDelim=E,a.contentDidChange({}),!0}function I0(a,b){let y=a.at(a.position);for(;y&&!(Array.isArray(y.parentBranch)&&y.parent instanceof li);)y=y.parent;if(Array.isArray(y==null?void 0:y.parentBranch)&&(y==null?void 0:y.parent)instanceof li){const E=y.parent,ee=y.parentBranch;let re;switch(b){case"row":if(E.rowCount>1){E.removeRow(ee[0]);const ae=E.getCell(Math.max(0,ee[0]-1),ee[1]);re=a.offsetOf(ae[ae.length-1])}break;case"column":if(E.colCount>E.minColumns){E.removeColumn(ee[1]);const ae=E.getCell(ee[0],Math.max(0,ee[1]-1));re=a.offsetOf(ae[ae.length-1])}break}re&&a.setPositionHandlingPlaceholder(re)}}function Ov(a){return a.contentWillChange({inputType:"deleteContent"})?(I0(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function $v(a){return a.contentWillChange({inputType:"deleteContent"})?(I0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Oo({addRowAfter:A0,addColumnAfter:B0,addRowBefore:Iv,addColumnBefore:Pv,removeRow:Ov,removeColumn:$v,setEnvironment:T0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Fh(){return[new Gr]}var P0=class nm{constructor(b){this.recording=!1,this.model=b,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(b){b&&this.index>=0&&(this.stack[this.index].selection=b),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(b){return this.recording?(b&&b===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>nm.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=b!=null?b:"",!0):!1}};P0.maximumDepth=1e3;var Fv=P0;function kf(a,b,y){if(a.at(b).mode!=="text")return b;const E=y==="backward"?-1:1;let ee;if(fe.test(a.at(b).value)){let re=b,ae;do ae=a.at(re).mode==="text"&&fe.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}else if(/\s/.test(a.at(b).value)){let re=b;for(;a.at(re)&&a.at(re).mode==="text"&&/\s/.test(a.at(re).value);)re+=E;if(!a.at(re))ee=re-E;else{let ae=!0;do ae=a.at(re).mode==="text"&&!/\s/.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}}else{let re=b;for(;a.at(re)&&a.at(re).mode==="text"&&!/\s/.test(a.at(re).value);)re+=E;ee=a.at(re)?re:re-E;let ae=!0;for(;a.at(re)&&ae;)ae=a.at(re).mode==="text"&&/\s/.test(a.at(re).value),ae&&(ee=re),re+=E;ee=a.at(re)?re-2*E:re-E}return ee-(E>0?0:1)}function pc(a,b,y){var E,ee,re,ae,he,pe,ve;const Ce=a.position;(E=y==null?void 0:y.extend)!=null&&E||a.collapseSelection(b);let Ne=a.at(a.position);if(b==="forward"&&(Ne.type==="subsup"?(Ne=Ne.rightSibling,Ne||(Ne=a.at(a.position+1))):Ne=a.at(a.position+1)),!Ne)return a.announce("plonk"),!1;let qe=a.offsetOf(Ne);if(Ne instanceof gs)qe=kf(a,qe,b);else if(Ne instanceof qa)if(Ne.isSuggestion)for(console.assert(b==="forward");Ne&&Ne instanceof qa;)Ne.isSuggestion=!1,qe=a.offsetOf(Ne),Ne=Ne.rightSibling;else if(b==="forward"){if(Ne=Ne.rightSibling,!Ne||!(Ne instanceof qa))return a.announce("plonk"),!1;for(;Ne&&Ne instanceof qa&&/[a-zA-Z\*]/.test(Ne.value);)qe=a.offsetOf(Ne),Ne=Ne.rightSibling}else{if(Ne=Ne.leftSibling,!Ne||!(Ne instanceof qa))return a.announce("plonk"),!1;for(;Ne&&Ne instanceof qa&&/[a-zA-Z\*]/.test(Ne.value);)qe=a.offsetOf(Ne),Ne=Ne.leftSibling}else if(b==="forward"&&Ne.type==="mopen"){let vt=0;do Ne.type==="mopen"?vt+=1:Ne.type==="mclose"&&(vt-=1),Ne=Ne.rightSibling;while(!Ne.isLastSibling&&vt!==0);qe=a.offsetOf(Ne.leftSibling)}else if(b==="backward"&&Ne.type==="mclose"){let vt=0;do Ne.type==="mopen"?vt+=1:Ne.type==="mclose"&&(vt-=1),Ne=Ne.leftSibling;while(!Ne.isFirstSibling&&vt!==0);qe=a.offsetOf(Ne)}else if(b==="backward")if(Ne.type==="first")for(;qe>0&&Ne.type==="first";)qe-=1,Ne=a.at(qe);else{const vt=Ne.type;Ne.type==="subsup"&&(qe=a.offsetOf(a.at(qe).leftSibling)),qe-=1;let Mt=(ee=a.at(qe))==null?void 0:ee.type;for(;qe>=0&&Mt===vt;)((re=a.at(qe))==null?void 0:re.type)==="subsup"?qe=a.offsetOf(a.at(qe).leftSibling):qe-=1,Mt=a.at(qe).type}else{const{type:vt}=Ne;let Mt=(ae=a.at(qe))==null?void 0:ae.type;const{lastOffset:vn}=a;for(;qe<=vn&&(Mt===vt||Mt==="subsup");){for(;((he=a.at(qe).rightSibling)==null?void 0:he.type)==="subsup";)qe=a.offsetOf(a.at(qe).rightSibling);qe+=1,Mt=(pe=a.at(qe))==null?void 0:pe.type}qe-=1}if((ve=y==null?void 0:y.extend)!=null&&ve){if(!a.setSelection(a.anchor,qe))return a.announce("plonk"),!1}else{if(qe===a.position)return a.announce("plonk"),!1;a.position=qe}return a.announce("move",Ce),a.mathfield.stopCoalescingUndo(),!0}function Ks(a,b,y){var E,ee;if(y=y!=null?y:{extend:!1},a.mathfield.adoptStyle=b==="backward"?"right":"left",b!=="forward"){const[he,pe]=v0(a);he!==void 0&&pe!==void 0&&a.deleteAtoms([he,pe])}if(b==="upward")return Nv(a,y);if(b==="downward")return zv(a,y);if(y.extend){let he=Rh(a,a.position,b);he<0&&(he=0),he>a.lastOffset&&(he=a.lastOffset);const pe=a.setSelection(a.anchor,he);return a.mathfield.stopCoalescingUndo(),pe}if(a.selectionIsPlaceholder){a.collapseSelection(b);const he=Ks(a,b);return a.mathfield.stopCoalescingUndo(),he}let re=a.position;const ae=re;if(a.collapseSelection(b)?(re=a.position,O0(a,re)||(re=Rh(a,re,b))):re=Rh(a,re,b),re<0||re>a.lastOffset){let he=!0;return a.silenceNotifications||(he=(ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:b},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0),he&&a.announce("plonk"),he}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",ae),!0}function Rh(a,b,y){return b=b+(y==="forward"?1:-1),b<0||b>a.lastOffset||O0(a,b)?b:Rh(a,b,y)}function O0(a,b){var y;const E=a.at(b);let ee=E.parent;for(;ee&&!ee.inCaptureSelection;)ee=ee.parent;return!(ee!=null&&ee.inCaptureSelection||(y=E.parent)!=null&&y.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function Rv(a,b,y){let E=1/0,ee=0;for(;ee<b.length;ee++){const re=rc(a.getHTMLElement(b[ee])).right,ae=Math.abs(y-re);if(ae<=E)E=ae;else break}return b[ee-1]}function Nh(a,b,y,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?y.filter(ve=>ve.type==="prompt"&&!ve.captureSelection):y,he=rc(a.mathfield.getHTMLElement(b)).right,pe=a.offsetOf(Rv(a.mathfield,ae,he))-(re?1:0);if(E){const[ve,Ce]=a.selection.ranges[0];let Ne;pe<(ee==="up"?ve:Ce)?Ne={ranges:[[pe,Ce]],direction:"backward"}:Ne={ranges:[[ve,pe]],direction:"forward"},a.setSelection(Ne)}else a.setPositionHandlingPlaceholder(pe);a.announce(`move ${ee}`)}function Nv(a,b){var y,E;const ee=(y=b==null?void 0:b.extend)!=null?y:!1;ee||a.collapseSelection("backward");const re=()=>{var pe,ve;let Ce=!0;return a.silenceNotifications||(Ce=(ve=(pe=a.mathfield.host)==null?void 0:pe.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?ve:!0),a.announce(Ce?"plonk":"line"),Ce},ae=a.at(a.position);let he=ae;for(;he&&he.parentBranch!=="below"&&!(Array.isArray(he.parentBranch)&&he.parent instanceof li);)he=he.parent;if(Array.isArray(he==null?void 0:he.parentBranch)&&he.parent instanceof li){const pe=he.parent;if(he.parentBranch[0]<1)return re();const ve=he.parentBranch[0]-1,Ce=pe.array[ve][he.parentBranch[1]];if(!Ce.some(qe=>qe.type==="prompt"&&!qe.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Nh(a,ae,Ce,ee,"up")}else if(he){const pe=(E=he.parent.branch("above"))!=null?E:he.parent.createBranch("above");if(!pe.some(Ce=>Ce.type==="prompt"&&Ce.placeholderId)&&a.mathfield.hasEditablePrompts)return re();Nh(a,ae,pe,ee,"up")}else return re();return a.mathfield.stopCoalescingUndo(),!0}function zv(a,b){var y,E;const ee=(y=b==null?void 0:b.extend)!=null?y:!1;ee||a.collapseSelection("forward");const re=()=>{var pe,ve;let Ce=!0;return a.silenceNotifications||(Ce=(ve=(pe=a.mathfield.host)==null?void 0:pe.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?ve:!0),a.announce(Ce?"plonk":"line"),Ce},ae=a.at(a.position);let he=ae;for(;he&&he.parentBranch!=="above"&&!(Array.isArray(he.parentBranch)&&he.parent instanceof li);)he=he.parent;if(Array.isArray(he==null?void 0:he.parentBranch)&&he.parent instanceof li){const pe=he.parent;if(he.parentBranch[0]+1>pe.array.length-1)return re();const ve=he.parentBranch[0]+1,Ce=pe.array[ve][he.parentBranch[1]];if(!Ce.some(qe=>qe.type==="prompt"&&!qe.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Nh(a,ae,Ce,ee,"down")}else if(he){const pe=(E=he.parent.branch("below"))!=null?E:he.parent.createBranch("below");if(!pe.some(Ce=>Ce.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();Nh(a,ae,pe,ee,"down")}else return re();return!0}function $0(a){const b=a.position,y=a.at(b).parent;return y!=null&&y.parent?(a.position=a.offsetOf(y),a.mathfield.stopCoalescingUndo(),a.announce("move",b),!0):(a.announce("plonk"),!1)}function Kv(a){let b=0,y=a.at(a.position),E=!1;for(;y;)(!y.hasEmptyBranch("superscript")||!y.hasEmptyBranch("subscript"))&&(b+=1),y.hasEmptyBranch("superscript")?y.hasEmptyBranch("subscript")||(E=!1):E=!0,y=y.parent;return E?b:0}function Hv(a){let b=0,y=a.at(a.position),E=!1;for(;y;)(!y.hasEmptyBranch("superscript")||!y.hasEmptyBranch("subscript"))&&(b+=1),y.hasEmptyBranch("superscript")?y.hasEmptyBranch("subscript")||(E=!0):E=!1,y=y.parent;return E?b:0}function F0(a){var b;if(a.collapseSelection(),Kv(a)>=a.mathfield.options.scriptDepth[1])return a.announce("plonk"),!1;let y=a.at(a.position);return y.subsupPlacement===void 0&&(((b=y.rightSibling)==null?void 0:b.type)!=="subsup"&&y.parent.addChildAfter(new Yo({style:y.computedStyle}),y),y=y.rightSibling),y.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(y.superscript[0]))),!0}function R0(a){var b;if(a.collapseSelection(),Hv(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let y=a.at(a.position);return y.subsupPlacement===void 0&&(((b=a.at(a.position+1))==null?void 0:b.type)!=="subsup"&&y.parent.addChildAfter(new Yo({style:a.at(a.position).computedStyle}),y),y=a.at(a.position+1)),y.createBranch("subscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(y.subscript[0]))),!0}function Wv(){function a(pe){const ve=[],Ce=[];return[...pe.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(b).forEach((qe,vt)=>{const Mt=E(qe);Mt===0?ve.push(qe):Ce.push({documentOrder:vt,tabIndex:Mt,node:qe})}),Ce.sort((qe,vt)=>qe.tabIndex===vt.tabIndex?qe.documentOrder-vt.documentOrder:qe.tabIndex-vt.tabIndex).map(qe=>qe.node).concat(ve)}function b(pe){return!(!y(pe)||ee(pe)||E(pe)<0)}function y(pe){return!(pe.disabled||pe.type==="hidden"&&pe.tagName.toUpperCase()==="INPUT"||he(pe))}function E(pe){var ve;const Ce=Number.parseInt((ve=pe.getAttribute("tabindex"))!=null?ve:"NaN",10);return Number.isNaN(Ce)?pe.contentEditable==="true"||(pe.nodeName==="AUDIO"||pe.nodeName==="VIDEO")&&pe.getAttribute("tabindex")===null?0:pe.tabIndex:Ce}function ee(pe){return pe.tagName.toUpperCase()==="INPUT"&&pe.type==="radio"&&!ae(pe)}function re(pe,ve){for(const Ce of pe)if(Ce.checked&&Ce.form===ve)return Ce;return null}function ae(pe){var ve;if(!pe.name)return!0;const Ne=((ve=pe.form)!=null?ve:pe.ownerDocument).querySelectorAll('input[type="radio"][name="'+pe.name+'"]'),qe=re(Ne,pe.form);return!qe||qe===pe}function he(pe){if(!st()||pe===document.activeElement||pe.contains(document.activeElement))return!1;if(getComputedStyle(pe).visibility==="hidden")return!0;const ve=pe.getBoundingClientRect();if(ve.width===0||ve.height===0)return!0;for(;pe;){if(getComputedStyle(pe).display==="none")return!0;pe=pe.parentElement}return!1}return st()?a(document.body):[]}function bo(a,b,y="forward"){const E=a.position;if(Array.isArray(b)){const ee=a.offsetOf(b[0]),re=a.offsetOf(b[b.length-1]);return y==="forward"?a.setSelection(ee,re):a.setSelection(re,ee),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return y==="forward"?bo(a,[b.leftSibling,b]):bo(a,[b,b.leftSibling])}function xs(a,b){const y=a.position;if(typeof b=="number"&&(b=a.at(b)),b.type==="prompt")a.setSelection(a.offsetOf(b.firstChild),a.offsetOf(b.lastChild));else{const E=a.offsetOf(b);b.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",y),a.mathfield.stopCoalescingUndo(),!0}function zh(a,b,y=!0){var E,ee;const re=b==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Ks(a,b);let ae;const he=a.at(a.anchor).parentPrompt;he?b==="forward"?ae=a.offsetOf(he)+1:ae=a.offsetOf(he.leftSibling):ae=Math.max(a.position+re,0);const pe=Df(a,ae,b);if(!pe||b==="forward"&&a.offsetOf(pe)<ae||b==="backward"&&a.offsetOf(pe)>ae){if(!y||!((ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:b},cancelable:!0,bubbles:!0,composed:!0})))==null||ee))return a.announce("plonk"),!1;const Ce=Wv();if(!document.activeElement||Ce.length<=1)return a.announce("plonk"),!1;let Ne=Ce.indexOf(document.activeElement)+re;return Ne<0&&(Ne=Ce.length-1),Ne>=Ce.length&&(Ne=0),Ce[Ne].focus(),a.mathfield.stopCoalescingUndo(),!0}return xs(a,pe),!0}function Df(a,b=0,y="forward"){return a.findAtom(E=>E.type==="placeholder"||E.type==="prompt"||!a.mathfield.readOnly&&E.treeDepth>2&&E.isFirstSibling&&E.isLastSibling,b,y)}Oo({moveToOpposite:a=>{const b={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},y=a.at(a.position),{parent:E}=y;if(!E)return a.announce("plonk"),!1;const ee=y.parentBranch;let re;if(typeof ee=="string"&&(re=b[ee]),!re){const he=y.subsupPlacement?R0(a):F0(a);return a.mathfield.stopCoalescingUndo(),he}E.branch(re)||E.createBranch(re);const ae=a.setSelection(a.getBranchRange(a.offsetOf(E),re));return a.mathfield.stopCoalescingUndo(),ae},moveBeforeParent:a=>{const{parent:b}=a.at(a.position);return b?(a.position=a.offsetOf(b),a.mathfield.stopCoalescingUndo(),!0):(a.announce("plonk"),!1)},moveAfterParent:a=>$0(a),moveToNextChar:a=>Ks(a,"forward"),moveToPreviousChar:a=>Ks(a,"backward"),moveUp:a=>Ks(a,"upward"),moveDown:a=>Ks(a,"downward"),moveToNextWord:a=>pc(a,"forward"),moveToPreviousWord:a=>pc(a,"backward"),moveToGroupStart:a=>{const b=a.offsetOf(a.at(a.position).firstSibling);return b===a.position?(a.announce("plonk"),!1):(a.position=b,a.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:a=>{const b=a.offsetOf(a.at(a.position).lastSibling);return b===a.position?(a.announce("plonk"),!1):(a.position=b,a.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:a=>{var b,y,E,ee;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return zh(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let qe=re;for(;qe&&qe.mode==="text";)qe=qe.leftSibling;let vt=re;for(;((b=vt.rightSibling)==null?void 0:b.mode)==="text";)vt=vt.rightSibling;if(qe&&vt)return bo(a,[qe,vt])}if(re.rightSibling.mode==="text"){let qe=re;for(;qe&&qe.mode==="text";)qe=qe.rightSibling;return qe?(xs(a,(y=qe.leftSibling)!=null?y:qe),a.mathfield.switchMode("math"),!0):xs(a,a.lastOffset)}}const he=a.at(a.anchor).parentPrompt,pe=he?a.offsetOf(he)+1:Math.max(a.position+1,0),ve=Df(a,pe,"forward");if(ve)return xs(a,ve);const Ce=N0(a,re,qe=>qe.type==="leftright"||qe.type==="text","forward");if(Ce){if(Ce.mode==="text"){let qe=Ce;for(;qe&&qe.mode==="text";)qe=qe.rightSibling;return bo(a,[(E=Ce.leftSibling)!=null?E:Ce,(ee=qe.leftSibling)!=null?ee:qe])}return bo(a,Ce)}const Ne=re.parent;if(Ne){if(Ne.type==="leftright"||Ne.type==="surd")return bo(a,Ne);if(re.parentBranch==="superscript"&&Ne.subscript)return bo(a,Ne.subscript);if(re.parentBranch==="above"&&Ne.below)return bo(a,Ne.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return xs(a,Ne);if(re.parentBranch==="above"||re.parentBranch==="below")return bo(a,Ne)}return xs(a,a.lastOffset)},moveToPreviousGroup:a=>{var b;if(a.position===0&&a.anchor===0)return zh(a,"backward");let y=a.at(a.position);const E=y.mode;if(E==="text"){if(a.selectionIsCollapsed){let he=y;for(;he&&he.mode==="text";)he=he.leftSibling;let pe=y;for(;((b=pe.rightSibling)==null?void 0:b.mode)==="text";)pe=pe.rightSibling;if(he&&pe)return bo(a,[he,pe])}for(;y&&y.mode==="text";)y=y.leftSibling;return y?xs(a,y):xs(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Df(a,re,"backward");if(ae)return xs(a,ae);if(E==="math"){const he=N0(a,y,ve=>ve.type==="leftright"||ve.type==="text","backward");if(he){if(he.mode==="text"){let ve=he;for(;ve&&ve.mode==="text";)ve=ve.leftSibling;return bo(a,[he,ve])}return bo(a,he)}const pe=y.parent;if(pe){if(pe.type==="leftright"||pe.type==="surd")return bo(a,pe);if(y.parentBranch==="subscript"&&pe.superscript)return bo(a,pe.superscript);if(y.parentBranch==="below"&&pe.above)return bo(a,pe.above);if(y.parentBranch==="superscript"||y.parentBranch==="subscript")return xs(a,pe);if(y.parentBranch==="above"||y.parentBranch==="below")return bo(a,pe)}return xs(a,0)}return!1},moveToMathfieldStart:a=>a.selectionIsCollapsed&&a.position===0?(a.announce("plonk"),!1):(a.position=0,a.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:a=>a.selectionIsCollapsed&&a.position===a.lastOffset?(a.announce("plonk"),!1):(a.position=a.lastOffset,a.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:F0,moveToSubscript:R0},{target:"model",changeSelection:!0}),Oo({moveToNextPlaceholder:a=>zh(a,"forward"),moveToPreviousPlaceholder:a=>zh(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function N0(a,b,y,E){if(E==="forward"){let re=b.rightSibling;for(;re&&!y(re);)re=re.rightSibling;return re}let ee=b.leftSibling;for(;ee&&!y(ee);)ee=ee.leftSibling;return ee}function Kh(a,b,y){typeof b=="function"&&(y=b,b=1/0),b===void 0&&(b=1/0);let E=a.position,ee=!1,re="";for(;!ee;){const ae=a.at(E);ee=b===0||ae===void 0||ae.type==="first"||ae.mode!=="math"||!(ae.type&&/mord|mpunct|operator/.test(ae.type)||ae.type==="mop"&&/[a-zA-Z ]+/.test(ae.value))||!ae.hasEmptyBranch("superscript")||!ae.hasEmptyBranch("subscript")||typeof y=="function"&&!y(ae),ee||(ae.mode="text",ae.command=ae.value,ae.verbatimLatex=void 0,re+=ae.value),E-=1,b-=1}a.contentDidChange({data:re,inputType:"insertText"})}function xu(a,b,y){typeof b=="function"&&(y=b,b=1/0),b===void 0&&(b=1/0);let E=a.position,ee=!1;const re=[];for(;!ee;){const ae=a.at(E);ee=b===0||!ae||ae.type==="first"||ae.isFirstSibling||ae.mode!=="text"||ae.value===" "||typeof y=="function"&&!y(ae),ee||(re.push(An.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,b-=1}Lf(a),a.contentDidChange({data:vi(re),inputType:"insertText"})}function Lf(a){var b;let y=a.position-1;for(;y>=0&&((b=a.at(y))==null?void 0:b.mode)==="math";)y-=1;if(!(y<0)&&a.at(y).mode==="text"&&a.at(y).value===" "&&a.at(y-1).mode==="math"){a.at(y-1).parent.removeChild(a.at(y-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Zv(a){let b="",y=a.position,E=!1;for(;!E;){const ee=a.at(y);E=!(ee&&(ee.mode==="text"||ee.mode==="math"&&ee.type&&/mord|mpunct/.test(ee.type))),E||(b=ee.value+b),y-=1}return b}function jv(a,b,y){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!y||!wh(y))return!1;const ee=lc(y);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ee));const re=Zv(E)+ee;if(a.model.mode==="text"){if(b==="Esc"||/[/\\]/.test(ee))return!0;if(/[\^_]/.test(ee))return/(^|\s)[a-zA-Z][^_]$/.test(re)&&xu(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:he}=E.at(E.position);if(ae&&he instanceof Bi&&he.leftDelim===ae)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(re))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(ee))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(re))return xu(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){xu(E,1);const pe=E.at(E.position);return pe.value="\u22C5",pe.style.variant="normal",pe.command="\\cdot",pe.verbatimLatex=void 0,E.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(re)||/\.\d$/.test(re)||/\([\d+\-.]$/.test(re))return xu(E,1),!0;if(/\([a-z][,;]$/.test(re))return xu(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Lf(E),!0}else{if(b==="[Space]")return Kh(E,void 0,ae=>/[a-z][:,;.]$/.test(ae.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Kh(E,void 0,ae=>/[a-zA-Z]/.test(ae.value)),!0;if(/(^|\W)(if)$/i.test(re))return Kh(E,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(re)&&!/(αβγ)$/.test(re))return Kh(E,void 0,ae=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(ae.value)),!0;if(ee==="?"||ee==="."&&!/[\d-+]\.$/.test(re))return!0}return!1}function Vv(a,b){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const y=z0(),E=a.element.getBoundingClientRect();y.style.left=`${E.left}px`,y.style.top=`${E.top-64}px`,y.innerHTML=window.MathfieldElement.createHTML("<span>"+(gf(b)||b)+"</span>"+y.innerHTML),y.style.visibility="visible",setTimeout(()=>{y.childNodes.length>0&&y.childNodes[y.childNodes.length-1].remove(),y.childNodes.length===0&&(y.style.visibility="hidden")},3e3)}function Gv(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const b=z0();b.innerHTML=""}else{const b=Eh("mathlive-keystroke-caption-panel");b.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(Po("keystroke-caption"),Po("core"),Eh("mathlive-keystroke-caption-panel"))}function Uv(){document.getElementById("mathlive-keystroke-caption-panel")&&(yf("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function K0(a,b){var y,E,ee;const{model:re}=a,ae=p0(b);if(b.isTrusted){Fm(b);const vt=gd();a.keyboardLayout!==vt.id&&(a.keyboardLayout=vt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Vv(a,ae),b.isTrusted&&b.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let he,pe="",ve;const Ce=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")Ce.pop();else if(!wh(b))a.flushInlineShortcutBuffer();else{const vt=lc(b),Mt=[...(E=(y=Ce[Ce.length-1])==null?void 0:y.keystrokes)!=null?E:[],vt];Ce.push({state:re.getState(),keystrokes:Mt,leftSiblings:Xv(a)});let vn=0,or="";for(;!he&&vn<Mt.length;)ve=Ce.length-(Mt.length-vn),or=Mt.slice(vn).join(""),he=td(Ce[ve].leftSiblings,or,a.options.inlineShortcuts),!he&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(or)&&(he=a.options.onInlineShortcut(a,or)),vn+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(he?a.switchMode("math"):jv(a,ae,b)&&(a.switchMode({math:"text",text:"math"}[re.mode]),pe=""))}if(!he){if(pe||(pe=Zm(a.keybindings,re.mode,b)),!pe&&(ae==="[Enter]"||ae==="[Return]")){let vt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(vt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),vt||b.preventDefault&&(b.preventDefault(),b.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),vt}if((!pe||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return oi.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),pe="",a.dirty=!0,a.scrollIntoView(),b.preventDefault&&(b.preventDefault(),b.stopPropagation()),!1;const vt=re.at(re.position+1),Mt=re.at(re.position-1);if((vt==null?void 0:vt.mode)==="text"||(Mt==null?void 0:Mt.mode)==="text")return oi.insert(re," ",{mode:"text"}),a.snapshot("insert-space"),a.dirty=!0,a.scrollIntoView(),!1}(ee=re.at(re.position))!=null&&ee.isDigit()&&window.MathfieldElement.decimalSeparator===","&&lc(b)===","&&(pe="insertDecimalSeparator")}}if(!he&&!pe){if(re.mathfield.smartFence){if(Bf(re,lc(b),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1}else{const{parent:vt}=re.at(re.position);if(vt instanceof Bi&&vt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),vt.isDirty=!0,vt.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:lc(b),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1;if(!re.selectionIsCollapsed){const Mt=lc(b);if(Mt==="("||Mt==="{"||Mt==="["){const vn={"(":"(","{":"\\lbrace","[":"\\lbrack"}[Mt],or={"(":")","{":"\\rbrace","[":"\\rbrack"}[Mt],[fn,zn]=Wa(re.selection);return a.snapshot(),re.position=zn,oi.insert(re,or,{format:"latex"}),re.position=fn,oi.insert(re,vn,{format:"latex"}),re.setSelection(fn+1,zn+1),re.contentDidChange({data:Mt,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1}}}return!0}const Ne=re.at(Math.max(re.position,re.anchor)),{parent:qe}=Ne;if(pe==="moveAfterParent"&&(qe==null?void 0:qe.type)==="leftright"&&Ne.isLastSibling&&a.options.smartFence&&Bf(re,".",a.defaultStyle)&&(pe="",ma(a)),a.keyboardDelegate.cancelComposition(),pe)a.executeCommand(pe);else if(he){const vt=a.effectiveStyle;re.setState(Ce[ve].state);const Mt=Ce[Ce.length-1].keystrokes;for(const vn of Mt)oi.insert(re,vn,{silenceNotifications:!0,style:vt});a.snapshot("insert-shortcut"),re.setState(Ce[ve].state),re.deferNotifications({content:!0,selection:!0,data:he,type:"insertText"},()=>(oi.insert(re,he,{format:"latex",style:vt}),Lf(a.model),he.endsWith(" ")&&(a.switchMode("text"),oi.insert(re," ",{style:vt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1}function Af(a,b,y){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}y!=null||(y={}),y.focus&&a.focus(),y.feedback&&window.MathfieldElement.playSound("keypress"),typeof y.mode=="string"&&(a.switchMode(y.mode),a.snapshot());let ee=rh(b);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(pe=>pe.toUpperCase())),y.simulateKeystroke){let pe=!0;for(const ve of ee)K0(a,new KeyboardEvent("keypress",{key:ve}))&&(pe=!1);if(pe)return}const ae=E.at(E.position),he=we(we({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Wa(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:b,type:"insertText"},()=>{Ch(a);for(const pe of ee)oi.insert(E,pe);a.snapshot("insert-latex"),yd(a)});else if(E.mode==="text"){for(const pe of ee)oi.insert(E,pe,{style:he});a.snapshot("insert-text")}else if(E.mode==="math")for(const pe of ee)Yv(a,pe,he,ae);a.dirty=!0,a.scrollIntoView()}function Xv(a){const b=a.model,y=[];let E=b.at(Math.min(b.position,b.anchor));for(;E.type!=="first";)y.push(E),E=E.leftSibling;return y}function Yv(a,b,y,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[b];if(b===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(b)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){Jv(ee),oi.insert(ee,b,{style:y}),a.snapshot(),$0(ee),a.snapshot();return}if(/[a-zA-Z0-9]/.test(b)&&a.adoptStyle!=="none"){const ae=a.adoptStyle==="left"?E:E.parent?E.rightSibling:null;(ae==null?void 0:ae.type)==="mord"&&/[a-zA-Z0-9]/.test(ae.value)&&(y=we({},y),ae.style.variant&&(y.variant=ae.style.variant),ae.style.variantStyle&&(y.variantStyle=ae.style.variantStyle))}oi.insert(ee,b,{style:y}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function Jv(a){a.selectionIsCollapsed||(a.deleteAtoms(Wa(a.selection)),a.mathfield.snapshot("delete"))}function Bf(a,b,y){if(!b||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[b];if(!re)return!1;const ae=te[re],he=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[pe,ve]=Wa(a.selection),Ce=a.extractAtoms([pe,ve]),Ne=ee.addChildrenAfter([new Bi("left...right",Ce,{leftDelim:re,rightDelim:he})],a.at(pe));return a.setSelection(a.offsetOf(Ne.firstChild),a.offsetOf(Ne.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const pe=ee instanceof Bi?ee.leftDelim+ee.rightDelim:"";if(pe==="\\lbrace\\rbrace"||pe==="\\{\\}"||pe==="\\lbrace?")return a.mathfield.snapshot(),oi.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:y}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(he){if(ee instanceof Bi&&ee.firstChild===E&&(ee.leftDelim==="?"||ee.leftDelim==="."))return ee.leftDelim=re,ee.isDirty=!0,a.mathfield.snapshot(),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(!(ee instanceof Bi)){let Ne=E;for(;Ne&&!(Ne.type==="mclose"&&Ne.value===he);)Ne=Ne.rightSibling;if(Ne){a.mathfield.snapshot();const qe=a.extractAtoms([a.offsetOf(E),a.offsetOf(Ne)]);return qe.pop(),ee.addChildrenAfter([new Bi("left...right",qe,{leftDelim:re,rightDelim:he})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const pe=a.offsetOf(E.lastSibling);let ve;for(ve=a.position;ve<=pe;ve++){const Ne=a.at(ve);if(Ne instanceof Bi&&(Ne.leftDelim==="?"||Ne.leftDelim===".")&&H0(re,Ne.rightDelim))break}const Ce=a.at(ve);if(ve<=pe&&Ce instanceof Bi){Ce.leftDelim=re,a.mathfield.snapshot();let Ne=a.extractAtoms([a.position,ve-1]);return Ne=Ne.filter(qe=>qe.type!=="first"),Ce.addChildren(Ne,Ce.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Bi&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const Ne=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const qe of Ne)ee.parent.addChildBefore(qe,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Bi&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),oi.insert(a,`\\left${re}\\right?`,{format:"latex",style:y}),E.lastSibling.type!=="first"){const Ne=a.offsetOf(E.lastSibling),qe=a.extractAtoms([a.position,Ne]);a.at(a.position).body=qe,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let pe=E;for(;pe;){if(pe.type==="mopen"&&pe.value===ae){a.mathfield.snapshot();const vt=pe.leftSibling,Mt=a.extractAtoms([a.offsetOf(pe.leftSibling),a.offsetOf(E)]);Mt.shift();const vn=new Bi("left...right",Mt,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([vn],vt),a.position=a.offsetOf(vn),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}pe=pe.leftSibling}if(ee instanceof Bi&&E.isLastSibling&&Tf(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const ve=a.offsetOf(E.firstSibling);let Ce;for(Ce=a.position;Ce>=ve;Ce--){const vt=a.at(Ce);if(vt instanceof Bi&&(vt.rightDelim==="?"||vt.rightDelim===".")&&Tf(vt.leftDelim,re))break}const Ne=a.at(Ce);if(Ce>=ve&&Ne instanceof Bi)return a.mathfield.snapshot(),Ne.rightDelim=re,Ne.addChildren(a.extractAtoms([Ce,a.position]),Ne.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Bi&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Tf(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,ee.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),ee.parentBranch),a.position=a.offsetOf(ee),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const qe=ee.parent;return qe instanceof Bi&&(qe.rightDelim==="?"||qe.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(qe),Bf(a,re,y)):!1}return!1}function Tf(a,b){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(b):ne[a]===b:!0}function H0(a,b){return b?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(b)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[b]===a:!0}Oo({undo:a=>(a.undo(),!0),redo:a=>(a.redo(),!0),scrollIntoView:a=>(a.scrollIntoView(),!0),scrollToStart:a=>(a.field.scroll(0,0),!0),scrollToEnd:a=>{const b=a.field.getBoundingClientRect();return a.field.scroll(b.left-window.scrollX,0),!0},toggleKeystrokeCaption:Gv,toggleContextMenu:a=>{const b=a.toggleContextMenu();return b||a.model.announce("plonk"),b},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,b,y,E)=>(a.switchMode(b,y,E),!0),insert:(a,b,y)=>a.insert(b,y),typedText:(a,b,y)=>(Af(a,b,y),!0),insertDecimalSeparator:a=>{const b=a.model;return b.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&b.at(Math.max(b.position,b.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var b;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((b=a.host)==null||b.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,b,y)=>{const E=a.getPrompts();let ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re=0;for(;E.includes(ee)&&re<100;){if(re===99)return console.error("could not find a unique ID after 100 tries"),!1;ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re++}return a.insert(`\\placeholder[${b!=null?b:ee}]{}`,y),!0}}),Oo({copyToClipboard:a=>(a.focus(),a.model.selectionIsCollapsed&&a.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),Oo({cutToClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(b=>{b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),a.insert(b,{mode:a.model.mode})&&(yd(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),ma(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function qv(a,b){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const y=If(a,b),{model:E}=a;return E.selectionIsCollapsed?(a.defaultStyle.fontSeries&&y.fontSeries===a.defaultStyle.fontSeries&&(y.fontSeries="auto"),y.fontShape&&y.fontShape===a.defaultStyle.fontShape&&(y.fontShape="auto"),y.color&&y.color===a.defaultStyle.color&&(y.color="none"),y.backgroundColor&&y.backgroundColor===a.defaultStyle.backgroundColor&&(y.backgroundColor="none"),y.fontSize&&y.fontSize===a.defaultStyle.fontSize&&(y.fontSize="auto"),a.defaultStyle=we(we({},a.defaultStyle),y)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Mf(E,ee,y,{operation:"toggle"})),a.snapshot("style-change")}),!0}Oo({applyStyle:qv},{target:"mathfield",canUndo:!0,changeContent:!0});function If(a,b){var y,E,ee,re,ae,he,pe,ve,Ce,Ne;const qe={};if(typeof b.color=="string"){const Mt=(E=a.colorMap((y=b.color)!=null?y:b.verbatimColor))!=null?E:"none";Mt!==b.color&&(qe.verbatimColor=(ee=b.verbatimColor)!=null?ee:b.color),qe.color=Mt}if(typeof b.backgroundColor=="string"){const Mt=(ae=a.backgroundColorMap((re=b.backgroundColor)!=null?re:b.verbatimBackgroundColor))!=null?ae:"none";Mt!==b.backgroundColor&&(qe.verbatimBackgroundColor=(he=b.verbatimBackgroundColor)!=null?he:b.backgroundColor),qe.backgroundColor=Mt}typeof b.fontFamily=="string"&&(qe.fontFamily=b.fontFamily),typeof b.series=="string"&&(qe.fontSeries=b.series),typeof b.fontSeries=="string"&&(qe.fontSeries=b.fontSeries.toLowerCase()),qe.fontSeries&&(qe.fontSeries=(pe={bold:"b",medium:"m",normal:"m"}[qe.fontSeries])!=null?pe:qe.fontSeries),typeof b.shape=="string"&&(qe.fontShape=b.shape),typeof b.fontShape=="string"&&(qe.fontShape=b.fontShape.toLowerCase()),qe.fontShape&&(qe.fontShape=(ve={italic:"it",up:"n",upright:"n",normal:"n"}[qe.fontShape])!=null?ve:qe.fontShape),b.variant&&(qe.variant=b.variant.toLowerCase()),b.variantStyle&&(qe.variantStyle=b.variantStyle.toLowerCase());const vt=(Ce=b.size)!=null?Ce:b.fontSize;return typeof vt=="number"?qe.fontSize=Math.max(1,Math.min(10,vt)):typeof vt=="string"&&(qe.fontSize=(Ne={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[vt.toLowerCase()])!=null?Ne:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[vt]),qe}function Pf(a){let[b,y]=Wa(a.selection);if(b=W0(a,b,"backward"),y=W0(a,y,"forward"),b===y){const E=a.at(b);if(E.type==="leftright")return a.setSelection(a.offsetOf(E.firstChild)-1,y);if(E.type==="first"&&(E.parent.type==="leftright"||E.parent.type==="surd"))return a.setSelection(b-1,a.offsetOf(E.parent.lastChild)+1);a.setSelection(b-1,y)}else a.setSelection(b,y);return!0}function W0(a,b,y){var E,ee,re;let ae=a.at(b);if(!ae)return b;const he=y==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!fe.test(ae.value));)b+=he,ae=a.at(b);return y==="backward"?b-1:b}if(ae.mode==="latex"){if(/[a-zA-Z\*]/.test(ae.value))if(y==="backward")for(;ae&&ae.mode==="latex"&&ae.value!=="\\"&&/[a-zA-Z]/.test(ae.value);)b+=he,ae=a.at(b);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)b+=he,ae=a.at(b);else if(ae.value==="{"){if(y==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)b+=he,ae=a.at(b);return b}return b-1}else if(ae.value==="}"){if(y==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)b+=he,ae=a.at(b);return b-1}return b}return b-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(b+he))!=null&&E.isDigit();)b+=he;return y==="backward"?b-1:b}if(ae.style.variant||ae.style.variantStyle){let pe=(ee=a.at(b))==null?void 0:ee.style;for(;pe&&pe.variant===ae.style.variant&&pe.variantStyle===ae.style.variantStyle;)pe=(re=a.at(b+he))==null?void 0:re.style,b+=he;return y==="backward"?b-1:b}return b}return b}Oo({selectGroup:a=>{const b=Pf(a);return b||a.announce("plonk"),b},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Ks(a,"forward",{extend:!0}),extendSelectionBackward:a=>Ks(a,"backward",{extend:!0}),extendToNextWord:a=>pc(a,"forward",{extend:!0}),extendToPreviousWord:a=>pc(a,"backward",{extend:!0}),extendSelectionUpward:a=>Ks(a,"upward",{extend:!0}),extendSelectionDownward:a=>Ks(a,"downward",{extend:!0}),extendToNextBoundary:a=>pc(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>pc(a,"backward",{extend:!0}),extendToGroupStart:a=>{const b=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).firstSibling));return b||a.announce("plonk"),b},extendToGroupEnd:a=>{const b=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).lastSibling));return b||a.announce("plonk"),b},extendToMathFieldStart:a=>{const b=a.setSelection(a.anchor,0);return b||a.announce("plonk"),b},extendToMathFieldEnd:a=>{const b=a.setSelection(a.anchor,a.lastOffset);return b||a.announce("plonk"),b}},{target:"model",changeSelection:!0});var wu=null,Md=0,Hh=class es{static start(b,y,E,ee){var re;es.element=b,(re=es.controller)==null||re.abort(),es.controller=new AbortController;const ae={signal:es.controller.signal};"PointerEvent"in window?(b.addEventListener("pointermove",E,ae),b.addEventListener("pointerup",ee,ae),b.addEventListener("pointercancel",ee,ae),Of(y)&&(es.pointerId=y.pointerId,b.setPointerCapture(y.pointerId))):(window.addEventListener("mousemove",E,ae),window.addEventListener("blur",ee,ae),window.addEventListener("mouseup",ee,ae))}static stop(){var b;(b=es.controller)==null||b.abort(),es.controller=void 0,typeof es.pointerId=="number"&&(es.element.releasePointerCapture(es.pointerId),es.pointerId=void 0)}};function Of(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function Z0(a,b){var y;if(b.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,ae=!1,he="none",pe=!1,ve=!1;const Ce=b.clientX,Ne=b.clientY,qe=Date.now(),vt=E.field,Mt=setInterval(()=>{pe?vt.scroll({top:0,left:vt.scrollLeft-16}):ve&&vt.scroll({top:0,left:vt.scrollLeft+16})},32);function vn(){Hh.stop(),re=!1,clearInterval(Mt),a.element.classList.remove("tracking"),b&&b.preventDefault()}function or(zn){if(!E.hasFocus()){vn();return}const hr=zn.clientX,Wn=zn.clientY,Rr=Of(zn)&&zn.pointerType==="touch"?20:5;if(Date.now()<qe+500&&Math.abs(Ce-hr)<Rr&&Math.abs(Ne-Wn)<Rr){zn.preventDefault(),zn.stopPropagation();return}const jr=vt.getBoundingClientRect();ve=hr>jr.right,pe=hr<jr.left;let Kr=ee;Of(zn)&&(zn.isPrimary||(Kr=_d(E,zn.clientX,zn.clientY,{bias:0})));const Ci=_d(E,hr,Wn,{bias:hr<=Ce?hr===Ce?0:-1:1});Kr>=0&&Ci>=0&&(E.model.extendSelectionTo(Kr,Ci),ma(a)),ae&&Pf(E.model)}wu&&Math.abs(wu.x-Ce)<5&&Math.abs(wu.y-Ne)<5&&Date.now()<wu.time+500?(Md+=1,wu.time=qe):(wu={x:Ce,y:Ne,time:qe},Md=1);const fn=vt.getBoundingClientRect();if(Ce>=fn.left&&Ce<=fn.right&&Ne>=fn.top&&Ne<=fn.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=_d(a,Ce,Ne,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),b.shiftKey){const zn=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),g0(a.model)||zn?he="all":he="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),he="selection"):((y=a.model.at(ee).rightSibling)==null?void 0:y.type)==="placeholder"?(a.model.setSelection(ee,ee+1),he="selection"):(a.model.position=ee,g0(a.model)?he="all":he="selection");a.defaultStyle={},b.detail===3||Md>2?(vn(),(b.detail===3||Md===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},he="all")):re||(re=!0,Hh.start(vt,b,or,vn),(b.detail===2||Md===2)&&(ae=!0,Pf(a.model),he="all"))}a.hasFocus()||(he="none",a.focus({preventScroll:!0}))}else wu=null;a.stopCoalescingUndo(),he!=="none"&&(a.model.selectionIsCollapsed&&(he="all"),ma(a)),b.preventDefault()}function Qv(a,b,y){if(a>=y.left&&a<=y.right&&b>=y.top&&b<=y.bottom)return 0;const E=a-(y.left+y.right)/2,ee=b-(y.top+y.bottom)/2;return E*E+ee*ee}function j0(a,b,y,E,ee){if(!y.id)return[1/0,null];if(b.has(y.id))return b.get(y.id);const re=Tl(a,y);if(!re)return[1/0,null];let ae=[1/0,null];if(y.hasChildren&&!y.captureSelection&&E>=re.left&&E<=re.right)for(const he of y.children){const pe=j0(a,b,he,E,ee);pe[0]<=ae[0]&&(ae=pe)}return ae[1]||(ae=[Qv(E,ee,re),y]),b.set(y.id,ae),ae}function eg(a,b,y){const[,E]=j0(a,new Map,a.model.root,b,y);return E}function _d(a,b,y,E){var ee;const re=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!re)return 0;if(b>re.right||y>re.bottom+8)return a.model.lastOffset;if(b<re.left||y<re.top-8)return 0;E=E!=null?E:{},E.bias=(ee=E.bias)!=null?ee:0;let ae=eg(a,b,y);const he=[];let pe=ae;for(;pe;)he.unshift(pe),pe=pe.parent;for(const Ce of he)if(Ce.captureSelection){ae=Ce;break}let ve=a.model.offsetOf(ae);if(ve<0)return-1;if(ae.leftSibling)if(E.bias===0&&ae.type!=="placeholder"){const Ce=Tl(a,ae);Ce&&b<(Ce.left+Ce.right)/2&&(ve=a.model.offsetOf(ae.leftSibling))}else E.bias<0&&(ve=a.model.offsetOf(ae.leftSibling));return ve}var tg=class extends oi{constructor(){super("math")}onPaste(a,b){if(!b||!a.model.contentWillChange({data:typeof b=="string"?b:null,dataTransfer:typeof b=="string"?null:b,inputType:"insertFromPaste"}))return!1;let y="",E="auto",ee=typeof b!="string"?b.getData("application/json+mathlive"):"";if(ee)try{const re=JSON.parse(ee);if(re&&Array.isArray(re)){a.snapshot();const ae=Ol(re),{model:he}=a;he.selectionIsCollapsed||he.deleteAtoms(Wa(he.selection));const pe=he.at(he.position);if(pe.parent instanceof li){console.assert(pe.parentBranch!==void 0);const ve=[];let Ce=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const Mt of ae)Mt.type==="first"&&Ce.length>0?(ve.push(Ce),Ce=[Mt]):Ce.push(Mt);Ce.length>0&&ve.push(Ce);let Ne=Number(pe.parentBranch[0]),qe=Number(pe.parentBranch[1]);const vt=pe.parent.maxColumns;for(;pe.parent.colCount-qe<ve.length&&pe.parent.colCount<vt;)pe.parent.addColumn();pe.parent.addChildrenAfter(ve[0],pe);for(let Mt=1;Mt<ve.length;Mt++)qe++,qe>=vt&&(qe=0,pe.parent.addRowAfter(Ne),Ne++),pe.parent.setCell(Ne,qe,ve[Mt])}else pe.parent.addChildrenAfter(ae.filter(ve=>ve.type!=="first"),pe);return he.position=he.offsetOf(ae[ae.length-1]),he.contentDidChange({inputType:"insertFromPaste"}),ma(a),!0}}catch(re){}if(ee=typeof b!="string"?b.getData("application/json"):"",ee&&window.MathfieldElement.computeEngine)try{const re=JSON.parse(ee);if(typeof re=="object"&&"latex"in re&&re.latex&&(y=re.latex),!y){const ae=window.MathfieldElement.computeEngine.box(re);ae&&!ae.has("Error")&&(y=ae.latex)}y||(E="latex")}catch(re){}if(!y&&typeof b!="string"&&(y=b.getData("application/x-latex"),y&&(E="latex")),y||(y=typeof b=="string"?b:b.getData("text/plain")),y){let re;return[re,y]=$s(y),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,y,{format:E})&&(a.startRecording(),a.snapshot("paste"),ma(a)),a.startRecording(),!0}return!1}insert(a,b,y){var E,ee;const re=typeof b=="string"?b:(ee=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(b).latex)!=null?ee:"";if(!y.silenceNotifications&&!a.contentWillChange({data:re,inputType:"insertText"}))return!1;y.insertionMode||(y.insertionMode="replaceSelection"),y.selectionMode||(y.selectionMode="placeholder"),y.format||(y.format="auto");const{silenceNotifications:ae}=a;y.silenceNotifications&&(a.silenceNotifications=!0);const he=a.silenceNotifications;a.silenceNotifications=!0;const pe={"?":"\\placeholder{}","@":"\\placeholder{}"};pe[0]=y.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),y.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Wa(a.selection)):y.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):y.insertionMode==="insertBefore"?a.collapseSelection("backward"):y.insertionMode==="insertAfter"&&a.collapseSelection("forward"),!a.at(a.position).isLastSibling&&a.at(a.position+1).type==="placeholder"?a.deleteAtoms([a.position,a.position+1]):a.at(a.position).type==="placeholder"&&a.deleteAtoms([a.position-1,a.position]);let ve=-1;pe[0]?pe["@"]=pe[0]:typeof b=="string"&&/(^|[^\\])#@/.test(b)&&(ve=rg(a),ve>=0&&(pe["@"]=a.getValue(ve,a.position,"latex"))),pe[0]||(pe[0]=pe["?"]);let Ce=!1;const Ne=hr=>(Ce=!0,pe[hr]);let[qe,vt]=V0(a,b,Ne,y);if(!vt)return!1;const Mt=vt.length===1&&vt[0].type==="genfrac";Mt&&ve>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(pe["@"]=pe["?"],Ce=!1,[qe,vt]=V0(a,b,Ne,y)):ve>=0&&a.deleteAtoms([ve,a.position]);const{parent:vn}=a.at(a.position),or=vn.hasEmptyBranch("body");if(Mt&&qe!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&vn instanceof Bi&&vn.leftDelim==="("&&or){const hr=vn.parent,Wn=vn.parentBranch;hr.removeChild(vn),hr.setChildren(vt,Wn)}const fn=a.at(a.position);fn.parent.addChildrenAfter(vt,fn),qe==="latex"&&typeof b=="string"&&(vn==null?void 0:vn.type)==="root"&&or&&!Ce&&(vn.verbatimLatex=b),a.silenceNotifications=he;const zn=vt[vt.length-1];if(y.selectionMode==="placeholder"){const hr=vt.flatMap(Wn=>[Wn,...Wn.children]).find(Wn=>Wn.type==="placeholder");if(hr){const Wn=a.offsetOf(hr);a.setSelection(Wn-1,Wn),a.announce("move")}else zn&&(a.position=a.offsetOf(zn))}else y.selectionMode==="before"||(y.selectionMode==="after"?zn&&(a.position=a.offsetOf(zn)):y.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(zn)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=ae,!0}};function V0(a,b,y,E){var ee;let re,ae=[];if(typeof b!="string"||E.format==="math-json"){const he=window.MathfieldElement.computeEngine;if(!he)return["math-json",[]];[re,b]=["latex",he.box(b).latex],ae=ja(b,{context:a.mathfield.context})}else typeof b=="string"&&E.format==="ascii-math"?([re,b]=cu(b,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=ja(b,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Wh(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,b]=cu(b,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,b]=$s(b)),ae=ja(b,{context:a.mathfield.context,args:y}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Wh(ae));return Fl(ae,E.style),[re!=null?re:"latex",ae]}function ng(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const b=a[0];return b instanceof Bi&&b.leftDelim==="("&&b.rightDelim===")"?b.removeBranch("body"):null}function Wh(a){if(a){for(let b=0;a[b];b++){const y=a[b];if(y instanceof Bi&&y.leftDelim==="("){let E=0,ee=0,re=0;for(let ae=0;y.body[ae];ae++)y.body[ae].type==="genfrac"&&(E++,ee=ae),re++;re===0&&E===1&&(a[b]=y.body[ee])}}for(const b of a){for(const y of b.branches)if(!b.hasEmptyBranch(y)){Wh(b.branch(y));const E=ng(b.branch(y));E&&b.setChildren(E,y)}if(b instanceof li)for(const y of b.cells)Wh(y)}}}function rg(a){let b=a.at(a.position);if(b.mode==="text"){for(;!b.isFirstSibling&&b.mode==="text";)b=b.leftSibling;return a.offsetOf(b)}const y=b;let E=!1;if(b.type==="mclose"){const ee=te[b.value];for(;!b.isFirstSibling&&!(b.type==="mopen"&&b.value===ee);)b=b.leftSibling;b.isFirstSibling||(b=b.leftSibling),E=!0}else b.type==="leftright"&&(b=b.leftSibling,E=!0);if(E)for(;!b.isFirstSibling&&(b.isFunction||G0(b));)b=b.leftSibling;else{const ee=[];for(;!b.isFirstSibling&&(G0(b)||ee.length>0);)b.type==="mclose"&&ee.unshift(b.value),b.type==="mopen"&&ee.length>0&&b.value===te[ee[0]]&&ee.shift(),b=b.leftSibling}return y===b?-1:a.offsetOf(b)}function G0(a){return a.isDigit()?!0:a.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(a.type)?!a.isExtensibleSymbol:!1}new tg;var ig=class extends oi{constructor(){super("text")}onPaste(a,b){if(!b)return!1;const y=typeof b=="string"?b:b.getData("text/plain");return y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,y)&&(a.model.contentDidChange({inputType:"insertFromPaste"}),a.startRecording(),a.snapshot("paste"),ma(a)),a.startRecording(),!0):!1}insert(a,b,y={}){if(!a.contentWillChange({data:b,inputType:"insertText"}))return!1;y.insertionMode||(y.insertionMode="replaceSelection"),y.selectionMode||(y.selectionMode="placeholder"),y.format||(y.format="auto");const{silenceNotifications:E}=a;y.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,y.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Wa(a.selection)):y.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):y.insertionMode==="insertBefore"?a.collapseSelection("backward"):y.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=ag(b,a.mathfield.context);if(Fl(re,y.style),!re)return!1;const ae=a.at(a.position),he=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,y.selectionMode==="before"||(y.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(he)):he&&(a.position=a.offsetOf(he))),a.contentDidChange({data:b,inputType:"insertText"}),a.silenceNotifications=E,!0}};function ag(a,b){return a=a.replace(/\\/g,"\\textbackslash "),a=a.replace(/#/g,"\\#"),a=a.replace(/\$/g,"\\$"),a=a.replace(/%/g,"\\%"),a=a.replace(/&/g,"\\&"),a=a.replace(/_/g,"\\_"),a=a.replace(/{/g,"\\textbraceleft "),a=a.replace(/}/g,"\\textbraceright "),a=a.replace(/lbrace/g,"\\textbraceleft "),a=a.replace(/rbrace/g,"\\textbraceright "),a=a.replace(/\^/g,"\\textasciicircum "),a=a.replace(/~/g,"\\textasciitilde "),a=a.replace(/£/g,"\\textsterling "),ja(a,{context:b,parseMode:"text"})}new ig;function Hs(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var ea=4,Eo=20,Ia=2*(Eo+ea),Zh=(a,b)=>`
|
|
|
<line x1="${a+Eo}" y1="${b+Eo}"
|
|
|
x2="${a>b?a+Eo:7*Eo+10*ea}"
|
|
|
y2="${a<b?b+Eo:7*Eo+10*ea}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${a}" y="${b}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
|
|
|
</svg>`,U0=(a,b)=>`
|
|
|
<line x1="${a+Eo}" y1="${b+Eo}"
|
|
|
x2="${a>b?a+Eo:7*Eo+10*ea}"
|
|
|
y2="${a<b?b+Eo:7*Eo+10*ea}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${a}" y="${b}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
|
|
|
</svg>`,jh=(a,b,y)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${a}" y="${b}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${y})" transform-origin="20 20">
|
|
|
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
|
|
|
</g>
|
|
|
</svg>`,og=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*Eo+10*ea+5} ${8*Eo+10*ea+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${Ia+ea}"
|
|
|
height="${3*Ia}"
|
|
|
width="${Ia}"
|
|
|
rx="${Ia/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${Ia+ea}"
|
|
|
y="0"
|
|
|
height="${Ia}"
|
|
|
width="${3*Ia}"
|
|
|
rx="${Ia/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${jh(2*(ea+Ia),2*ea+3*Ia,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${jh(2*(ea+Ia),2*ea+Ia,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${jh(2*ea+3*Ia,2*(ea+Ia),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${jh(2*ea+Ia,2*(ea+Ia),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${Zh(2*ea+Ia,ea)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${U0(2*ea+2*Ia,ea)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${Zh(2*ea+3*Ia,ea)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${Zh(ea,2*ea+Ia)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${U0(ea,2*ea+2*Ia)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${Zh(ea,2*ea+3*Ia)}
|
|
|
</g>
|
|
|
</svg>`,sg=a=>`
|
|
|
<svg id="matrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","matrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,lg=a=>`
|
|
|
<svg id="pmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","pmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
|
|
|
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,X0=a=>`
|
|
|
<svg id="Bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","Bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,ug=a=>`
|
|
|
<svg id="bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4h-3v16h3"/>
|
|
|
<path class="cls-2" d="m22,4h3v16h-3"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,cg=a=>`
|
|
|
<svg id="vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
|
|
|
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
|
|
|
</svg>`,dg=a=>`
|
|
|
<svg id="Vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
|
|
|
data-command='["setEnvironment","Vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
|
|
|
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
|
|
|
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
|
|
|
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
|
|
|
</svg>`,hg=a=>`
|
|
|
<svg id="cases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","cases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<circle cx="13" cy="8" r="1"/>
|
|
|
<circle cx="13" cy="16" r="1"/>
|
|
|
<circle cx="21" cy="8" r="1"/>
|
|
|
<circle cx="21" cy="16" r="1"/>
|
|
|
</svg>`,fg=a=>`
|
|
|
<svg id="rcases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","rcases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
|
|
|
<circle cx="15" cy="8" r="1"/>
|
|
|
<circle cx="15" cy="16" r="1"/>
|
|
|
<circle cx="7" cy="8" r="1"/>
|
|
|
<circle cx="7" cy="16" r="1"/>
|
|
|
</svg>`,$f={matrix:sg,pmatrix:lg,bmatrix:ug,Bmatrix:X0,vmatrix:cg,Vmatrix:dg},Ff={cases:hg,rcases:fg,Bmatrix:X0};function pg(a){var b,y;const E=(b=a.model.parentEnvironment)==null?void 0:b.array;if(!E)return;let ee=0;E.forEach(Mt=>{(!ee||Mt.length>ee)&&(ee=Mt.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Eh("mathlive-environment-popover"),Po("environment-popover"),Po("core"),re.setAttribute("aria-hidden","true"));let ae;const he=re.querySelector(".MLEP__environment-controls");he?ae=he:(ae=document.createElement("div"),re.innerHTML="",re.appendChild(ae)),ae.className="MLEP__environment-controls",ae.style.display="flex",ae.style.width="100%",ae.style.height="100%",ae.style.boxSizing="border-box",ae.innerHTML=og;let pe=[],ve="";const Ce=a.model.parentEnvironment.environmentName;if(uo(Ce)){const Mt=vg(Ce);ve=$f[Mt]("active");const vn=$f,{[Mt]:or}=vn,fn=it(vn,[Oe(Mt)]);pe=Object.values(fn).map(zn=>zn("inactive"))}else if(co(Ce)){const Mt=gg(Ce);ve=Ff[Mt]("active");const vn=Ff,{[Mt]:or}=vn,fn=it(vn,[Oe(Mt)]);pe=Object.values(fn).map(zn=>zn("inactive"))}else Ea(Ce)&&(ve=$f.matrix("active"),pe=Object.values(Ff).map(Mt=>Mt("inactive")));const Ne=document.createElement("div");Ne.className="MLEP__environment-delimiter-controls",Ne.style.display="flex",Ne.style.flexDirection="column",Ne.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${ve}
|
|
|
${pe.join("")}
|
|
|
</div>`,ve&&ae.appendChild(Ne),ae.querySelectorAll("[data-command]").forEach(Mt=>{const vn=Mt.dataset.command;let or=vn;try{or=JSON.parse(vn)}catch(fn){}Mt.addEventListener("mousedown",fn=>fn.preventDefault()),or&&Mt.addEventListener("click",()=>a.executeCommand(or))});const vt=(y=a.field)==null?void 0:y.getBoundingClientRect();vt&&(re.style.top=`${window.scrollY+(vt.top-re.clientHeight-15)}px`,re.style.left=`${vt.left+20}px`,re.classList.add("is-visible"))}function Rf(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mg(){document.getElementById("mathlive-environment-popover")&&(yf("mathlive-environment-popover"),x("environment-popover"),x("core"))}function Vh(a){if(!a.hasFocus())return;let b=!1;if(a.model.mode==="math"){const y=a.model.parentEnvironment;if(y!=null&&y.array&&ua(y.environmentName)){const E=a.options.environmentPopoverPolicy;b=E==="auto"||E==="on"}}b?pg(a):Rf()}function vg(a){return a.replace("*","")}function gg(a){return a==="dcases"?"cases":a}function Y0(a){const b=getComputedStyle(a).direction;return b==="ltr"||b==="rtl"?b:"ltr"}function J0(a,b,y){return b==="left"||b==="leading"&&y==="ltr"||b==="trailing"&&y==="rtl"?a.left:a.right}function Nf(a,b,y,E){return y==="middle"?a-b/2:y==="start"&&E==="rtl"||y==="end"&&E==="ltr"||y==="top"||y==="right"?Math.max(0,a-b):a}function bg(a,b,y,E){return y==="middle"?a-b/2:y==="start"&&E==="ltr"||y==="end"&&E==="rtl"||y==="top"||y==="right"?a:a-b}function yg(a,b){var y,E,ee;const re=(y=Y0(a))!=null?y:"ltr";a.style.position="fixed",a.style.left="",a.style.top="",a.style.right="",a.style.bottom="",a.style.height="",a.style.width="";const ae=a.getBoundingClientRect(),he=Number.isFinite(b.maxHeight)?Math.min(b.maxHeight,window.innerHeight):window.innerHeight;let pe=Math.min(he,(E=b.height)!=null?E:ae.height),ve=Nf(b.location.y,pe,b.verticalPos,re);ve+pe>window.innerHeight-8&&(b.alternateLocation?(ve=Nf(b.alternateLocation.y,pe,b.verticalPos,re),ve+pe>window.innerHeight-8&&(ve=void 0)):ve=void 0),Number.isFinite(ve)||(ve=Math.max(8,window.innerHeight-8-pe),8+pe>window.innerHeight-8&&(a.style.bottom="8px")),pe=Math.min(ve+pe,window.innerHeight-8)-ve;const Ce=Number.isFinite(b.maxWidth)?Math.min(b.maxWidth,window.innerWidth):window.innerWidth;let Ne=Math.min(Ce,(ee=b.width)!=null?ee:ae.width),qe=Nf(b.location.x,Ne,b.horizontalPos,re);qe+Ne>window.innerWidth-8&&(b.alternateLocation?(qe=bg(b.alternateLocation.x,Ne,b.verticalPos,re),qe+Ne>window.innerWidth-8&&(qe=void 0)):qe=void 0),Number.isFinite(qe)||(qe=Math.max(8,window.innerWidth-8-Ne),8+Ne>window.innerWidth-8&&(a.style.right="8px")),Ne=Math.min(qe+Ne,window.innerWidth-8)-qe,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-qe-Ne).toString()}px`:a.style.left=`${Math.ceil(qe).toString()}px`,a.style.top=`${Math.ceil(ve).toString()}px`,pe!==ae.height&&(a.style.height=`${Math.ceil(pe).toString()}px`),Ne!==ae.width&&(a.style.width=`${Math.ceil(Ne).toString()}px`)}function xg(a,b){return Math.hypot(b.x-a.x,b.y-a.y)}function mc(a){return"submenu"in a}function Ws(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zf(a){return"type"in a&&a.type==="divider"}function Kf(a){return"type"in a&&a.type==="heading"}var q0={};function Hf(a){let b=q0[a];if(!b){let y;switch(a){case"checkmark":y=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
|
|
|
</span>`;break;case"trailing-chevron":y='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":y='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(y){const E=document.createElement("template");E.innerHTML=y,q0[a]=E,b=E}}if(b){if("content"in b)return b.content.cloneNode(!0);const y=document.createElement("svg");return y.innerHTML=b.innerHTML,y}}var Q0=80,ep=class{constructor(a,b){this._element=null;var y;this.parentMenu=b,this._declaration=a,mc(a)?(this.type="submenu",this.submenu=new tp(a.submenu,{parentMenu:b,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(y=a.type)!=null?y:"command",this.hasCheck=Ws(a)&&a.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var a,b;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(b=this._element)==null||b.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var a;return(a=this._label)!=null?a:""}set label(a){a===void 0&&(a=""),a!==this._label&&(this._label=a,this.dirty=!0)}get visible(){return this._visible}set visible(a){a!==this._visible&&(this._visible=a,this.dirty=!0)}get enabled(){return this._enabled}set enabled(a){this._enabled=a,this.element&&(a?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(a){this._checked=a,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(a){a!==this._tooltip&&(this._tooltip=a,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(a){a!==this._ariaLabel&&(this._ariaLabel=a,this.dirty=!0)}get active(){var a,b;return(b=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?b:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var b,y,E;const ee=this._declaration;if(zf(ee)){this.enabled=!1,this.checked=!1;return}Kf(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Ws(ee)&&(this.checked=Ws(ee)&&((b=vc(ee.checked,a))!=null?b:!1)),(Ws(ee)||mc(ee))&&(this.enabled=(y=vc(ee.enabled,a))!=null?y:!0,this.visible=(E=vc(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Ws(ee)||Kf(ee)||mc(ee))&&(this.label=vc(ee.label,a),this.tooltip=vc(ee.tooltip,a),this.ariaLabel=vc(ee.ariaLabel,a)),this._element&&this.updateElement()}set dirty(a){console.assert(a===!0),a&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const a=this.element;a.textContent="",this.enabled?a.removeAttribute("aria-disabled"):a.setAttribute("aria-disabled","true"),this.checked===!0?(a.setAttribute("aria-checked","true"),a.append(Hf("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hf("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const b=document.createElement("span");if(b.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&b.classList.add("heading"),b.innerHTML=this.label,a.append(b),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),Ws(this._declaration)&&this._declaration.keyboardShortcut){const y=document.createElement("kbd");y.innerHTML=gf(this._declaration.keyboardShortcut),a.append(y)}this.type==="submenu"&&a.append(Hf("trailing-chevron"))}get element(){if(this._element)return this._element;if(zf(this._declaration)){const y=document.createElement("li");return y.setAttribute("part","menu-divider"),y.setAttribute("role","divider"),this._element=y,y}const a=document.createElement("li");this._element=a,(Ws(this._declaration)||Kf(this._declaration)||mc(this._declaration))&&this._declaration.class&&(a.className=this._declaration.class),a.setAttribute("part","menu-item"),a.setAttribute("tabindex","-1"),this.hasCheck?a.setAttribute("role","menuitemcheckbox"):a.setAttribute("role","menuitem"),this.type==="submenu"&&(a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"));const b=this.abortController.signal;return a.addEventListener("pointerenter",this,{signal:b}),a.addEventListener("pointerleave",this,{signal:b}),a.addEventListener("pointerup",this,{signal:b}),a.addEventListener("click",this,{signal:b}),this._element}dispatchSelect(){if(!Ws(this._declaration))return;const a=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(a)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(a){var b;if(!(!this.visible||!this.enabled)){if(a.type==="click"){this.rootMenu.state==="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}if(a.type==="pointerenter"){const y=a;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((b=this.parentMenu.activeMenuItem)!=null&&b.movingTowardSubmenu(y))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(a.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(a.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},Q0)},Q0)}openSubmenu(a){var b;if(this.type!=="submenu"||!this.element)return;if((b=a==null?void 0:a.withDelay)!=null&&b){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const y=this.element.getBoundingClientRect(),E=Y0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:J0(y,"trailing",E),y:y.top-4},alternateLocation:{x:J0(y,"leading",E),y:y.top-4}})}movingTowardSubmenu(a){if(!this.element||this.type!=="submenu")return!1;const b=this.rootMenu.lastMoveEvent;if(!b)return!1;const y=a.timeStamp-b.timeStamp;if(y>500)return!1;const E=a.clientX-b.clientX;if(wg(E,b.clientY-a.clientY,y)<=.2)return!1;let re="right";if(this.submenu.element){const ae=this.submenu.element.getBoundingClientRect(),he=this.element.getBoundingClientRect();ae.left<he.left+he.width/2&&(re="left")}return re==="right"?E>0:E<0}};function wg(a,b,y){return Math.hypot(a,b)/y}function vc(a,b){return a===void 0||typeof a!="function"?a:(b!=null||(b={alt:!1,control:!1,shift:!1,meta:!1}),a(b))}var tp=class Ec{constructor(b,y){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,ee;this.parentMenu=(E=y==null?void 0:y.parentMenu)!=null?E:null,this._submenuClass=y==null?void 0:y.submenuClass,this.columnCount=(ee=y==null?void 0:y.columnCount)!=null?ee:1,this.isSubmenuOpen=!1,this.menuItems=b}get children(){return this._menuItems}set menuItems(b){const y=this.parentMenu;this.dispose(),this.parentMenu=y,b=[...b],this._menuItems=b.map(E=>E.onCreate?E.onCreate(E,this):new ep(E,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var b;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(b=this._menuItems)==null||b.forEach(y=>y.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(b){if(b.type==="wheel"&&this._element){const y=b;this._element.scrollBy(0,y.deltaY),b.stopPropagation()}}dispatchEvent(b){return this.rootMenu.dispatchEvent(b)}get rootMenu(){return this.parentMenu.rootMenu}updateState(b){var y,E,ee;this._menuItems.forEach(ve=>ve.updateState(b));const re=this.hasCheck;this.hasCheck=this._menuItems.some(ve=>ve.visible&&ve.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(ve=>ve.updateState(b));let ae,he=0;for(const ve of this._menuItems)ve.type==="heading"?(ae&&he===0&&(ae.visible=!1),ae=ve,he=0):ve.type==="divider"&&ae?(ae.visible=he>0,ae=void 0,he=0):ae&&ve.visible&&(he+=1);ae&&(ae.visible=he>0);let pe=!0;for(const ve of this._menuItems)ve.type==="divider"?(ve.visible=!pe,pe=!0):ve.visible&&(pe=!1);(y=this.activeMenuItem)!=null&&y.visible||(this.activeMenuItem=null),!((E=this.activeMenuItem)!=null&&E.enabled)&&((ee=this.activeMenuItem)==null?void 0:ee.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(b=>b.type!=="divider"&&b.visible&&b.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(b=>b.type!=="divider"&&b.visible)}set dirty(b){console.assert(b===!0),this._dirty!==b&&b&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var b;if(this._element){this._element.textContent="";for(const{element:y,visible:E}of this._menuItems)y&&E&&this._element.append(y);(b=this._element.querySelector("li:first-of-type"))==null||b.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const b=document.createElement("menu");b.setAttribute("role","menu"),b.setAttribute("tabindex","-1"),b.setAttribute("aria-orientation","vertical"),b.setAttribute("part","ui-menu-container"),this._submenuClass&&b.classList.add(this._submenuClass),b.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const y=this._abortController.signal;return b.addEventListener("focus",this,{signal:y}),b.addEventListener("wheel",this,{passive:!0,signal:y}),this._element=b,this.updateElement(),b}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(b){var y,E,ee,re;if(this.rootMenu.cancelDelayedOperation(),b!==this._activeMenuItem){if(this.activeMenuItem){const ae=this.activeMenuItem;ae.active=!1,(y=ae.submenu)==null||y.hide()}if(!((E=b==null?void 0:b.visible)==null||E)){this._activeMenuItem=null;return}this._activeMenuItem=b,b&&(b.active=!0)}b?(ee=b.element)==null||ee.focus({preventScroll:!0}):(re=this._element)==null||re.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let b=0,y=!1;const E=this._menuItems;for(;!y&&b<=E.length-1;){const ee=E[b];y=ee.type!=="divider"&&ee.visible&&ee.enabled,b+=1}return y?E[b-1]:null}get lastMenuItem(){this.updateIfDirty();const b=this._menuItems;let y=b.length-1,E=!1;for(;!E&&y>=0;){const ee=b[y];E=ee.type!=="divider"&&ee.visible&&ee.enabled,y-=1}return E?b[y+1]:null}nextMenuItem(b){if(b===0)return this._activeMenuItem;if(!this._activeMenuItem)return b>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const y=this._menuItems.indexOf(this.firstMenuItem),E=this._menuItems.indexOf(this.lastMenuItem);let ee=this._menuItems.indexOf(this._activeMenuItem),re=1;for(;ee>=y&&ee<=E;){ee+=b>0?1:-1;const ae=this._menuItems[ee];if(!ae)break;if(ae.visible&&ae.enabled){if(re===Math.abs(b))return this._menuItems[ee];re+=1}}return b>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(b){this.updateIfDirty();const E=this._menuItems.filter(ee=>ee.visible&&ee.enabled).indexOf(b);return E<0?-1:E%this.columnCount}static get collator(){return Ec._collator||(Ec._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Ec._collator}findMenuItem(b){var y;this.updateIfDirty();const E=this._menuItems.filter(he=>he.type!=="divider"&&he.visible&&he.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(he=>he.label.length))-b.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(y=E.find(he=>Ec.collator.compare(b,he.label.substring(ae,b.length))===0))!=null?y:null,ae++;return re}show(b){return!this.visible||!b.container?!1:(this.updateElement(),b.container.appendChild(this.element),Lt()&&(this.element.popover="manual",this.element.showPopover()),b.location&&yg(this.element,{location:b.location,alternateLocation:b.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var b,y,E,ee,re;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),Lt()&&((b=this._element)!=null&&b.popover)&&this.element.hidePopover(),(E=(y=this.parentMenu)==null?void 0:y.element)==null||E.focus(),(re=(ee=this._element)==null?void 0:ee.parentNode)==null||re.removeChild(this._element)}set openSubmenu(b){var y,E,ee,re;const ae=b!==null;((y=this.activeMenuItem)==null?void 0:y.type)==="submenu"&&((E=this.activeMenuItem.element)==null||E.setAttribute("aria-expanded",ae.toString())),(re=(ee=this.activeMenuItem)==null?void 0:ee.element)==null||re.classList.toggle("is-submenu-open",ae),this.isSubmenuOpen=ae}},np=class rm extends tp{constructor(b,y){var E;super(b),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(E=y==null?void 0:y.host)!=null?E:null,this.isDynamic=b.some(rp),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(b){zm(this._modifiers,b)||(this._modifiers=b,this.dirty=!0)}get activeSubmenu(){let b=this;for(;b.isSubmenuOpen;)b=b.activeMenuItem.submenu;return b}set dirty(b){this._updating||(console.assert(b===!0),this._dirty!==b&&(this._dirty=!0,b&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(b){this._updating=!0,this.modifiers=b!=null?b:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(b){this.isDynamic&&(this.modifiers=fu(b)),b.stopImmediatePropagation()}handleKeydownEvent(b){var y,E,ee;if(b.key==="Tab"||b.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=fu(b));let re=!0;const ae=this.activeSubmenu,he=ae.activeMenuItem;switch(b.key){case" ":case"Space":case"Return":case"Enter":he==null||he.select(fu(b));break;case"ArrowRight":if((he==null?void 0:he.type)==="submenu")he.select(fu(b)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!he)ae.activeMenuItem=ae.firstMenuItem;else{const pe=(y=ae.getMenuItemColumn(he))!=null?y:-1;if(pe>=0&&pe<((E=ae.columnCount)!=null?E:1)-1){const ve=ae.nextMenuItem(1);ve&&(ae.activeMenuItem=ve)}}break;case"ArrowLeft":if(ae===this.rootMenu)he||(ae.activeMenuItem=ae.firstMenuItem);else if((he&&(ee=ae.getMenuItemColumn(he))!=null?ee:-1)<=0||!he){ae.hide();const ve=ae.parentMenu.activeMenuItem;if(ve){const{element:Ce}=ve;Ce==null||Ce.focus(),Ce==null||Ce.classList.remove("is-submenu-open")}}else{const ve=ae.nextMenuItem(-1);ve&&(ae.activeMenuItem=ve)}break;case"ArrowDown":ae.activeMenuItem=ae.nextMenuItem(ae.columnCount);break;case"ArrowUp":ae.activeMenuItem=ae.nextMenuItem(-ae.columnCount);break;case"Home":case"PageUp":ae.activeMenuItem=ae.firstMenuItem;break;case"End":case"PageDown":ae.activeMenuItem=ae.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const pe=ae.findMenuItem(this.typingBuffer);pe&&(ae.activeMenuItem=pe),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(wh(b)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=b.key;const pe=ae.findMenuItem(this.typingBuffer);pe&&(ae.activeMenuItem=pe),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else re=!1}re&&(b.preventDefault(),b.stopPropagation())}handleEvent(b){if(b.type==="keydown")this.handleKeydownEvent(b);else if(b.type==="keyup")this.handleKeyupEvent(b);else if(b.type==="pointermove")this.lastMoveEvent=b;else if(b.type==="pointerup"&&b.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(b.type==="contextmenu"){b.preventDefault(),b.stopPropagation();return}super.handleEvent(b)}dispatchEvent(b){return this._host?this._host.dispatchEvent(b):!0}get scrim(){return Ns.element}connectScrim(b){const y=this.scrim;y.addEventListener("pointerup",this),y.addEventListener("contextmenu",this),y.addEventListener("keydown",this),y.addEventListener("keyup",this),y.addEventListener("pointermove",this),Ns.open({root:b,onDismiss:()=>this.hide()})}disconnectScrim(){const b=this.scrim;b.removeEventListener("pointerup",this),b.removeEventListener("contextmenu",this),b.removeEventListener("keydown",this),b.removeEventListener("keyup",this),b.removeEventListener("pointermove",this),Ns.state==="open"&&Ns.scrim.close()}get rootMenu(){return this}show(b){return this._onDismiss=b==null?void 0:b.onDismiss,b!=null&&b.modifiers&&(this.modifiers=b.modifiers),this.updateState(),this.connectScrim(b==null?void 0:b.target),super.show(Ee(we({},b),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,Ns.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(b){this.cancelDelayedOperation();const y=rm.SUBMENU_DELAY;if(y<=0){b();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,b()},y)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};np.SUBMENU_DELAY=120;var Sg=np;function rp(a){return zf(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(Ws(a)||mc(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Ws(a)&&typeof a.checked=="function"?!0:mc(a)?a.submenu.some(rp):!1}var Gh=class{};Gh.DELAY=300,Gh.MAX_DISTANCE=10;function Cg(a){return new Promise((b,y)=>{const E=xh(a);E||b(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),b(xg(ee,E)<Gh.MAX_DISTANCE)},Gh.DELAY),ae=new AbortController,he=ae.signal;for(const pe of["pointermove","pointerup","pointercancel"])window.addEventListener(pe,ve=>{if(ve.type==="pointerup"||ve.type==="pointercancel")clearTimeout(re),ae.abort(),b(!1);else if(ve.type==="pointermove"){const Ce=xh(ve);Ce&&(ee=Ce)}},{passive:!0,signal:he})})}function ip(a,b,y){return zl(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(y.show({target:b,location:xh(E),modifiers:fu(E)}))return a.preventDefault(),a.stopPropagation(),!0}if(a.type==="keydown"){const E=a;if(E.code==="ContextMenu"||E.code==="F10"&&E.shiftKey){const ee=b==null?void 0:b.getBoundingClientRect();if(ee&&y.show({target:b,location:{x:Math.ceil(ee.left+ee.width/2),y:Math.ceil(ee.top+ee.height/2)},modifiers:fu(E)}))return a.preventDefault(),a.stopPropagation(),!0}}if(a.type==="pointerdown"&&a.pointerType!=="mouse"&&a.button===0){let E=a.target;for(;E&&b!==E;)E=E.parentNode;if(!E||!y.visible)return!1;const ee=xh(a);if(yield Cg(a))return y.state!=="closed"?!1:(y.show({target:b,location:ee}),!0)}return!1})}var ap={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};xt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(Ee(we({},a),{body:Je(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),xt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const b=en(Je(a.args[0]));return new z(Ee(we({},a),{body:Je(a.args[0]),svgAccent:a.command.slice(1)+(b.length>5?"4":["1","1","2","2","3","3"][b.length])}))}}),xt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(Ee(we({},a),{body:Je(a.args[0]),svgAccent:"overarc"}))}),xt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new Jo(Ee(we({},a),{body:Je(a.args[0]),svgBelow:"underarc"}))}),xt("utilde","{body:auto}",{createAtom:a=>{const b=Je(a.args[0]),y=en(b),E="widetilde"+(y.length>5?"4":["1","1","2","2","3","3"][y.length]);return new Jo(Ee(we({},a),{body:b,svgBelow:E,boxType:kl(b)}))}}),xt("^","{:string}",{createAtom:a=>{var b;return new An(Ee(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[a.args[0]])!=null?b:"^"}))}}),xt("`","{:string}",{createAtom:a=>{var b;return new An(Ee(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[a.args[0]])!=null?b:"`"}))}}),xt("'","{:string}",{createAtom:a=>{var b;return new An(Ee(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[a.args[0]])!=null?b:"'"}))}}),xt('"',"{:string}",{createAtom:a=>{var b,y;return new An(Ee(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(b=a.args)!=null&&b[0]?(y={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[a.args[0]])!=null?y:'"'+a.args[0]:'"'}))}}),xt(".","{:string}",{createAtom:a=>{var b,y;return new An(Ee(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(b=a.args)!=null&&b[0]?(y={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[a.args[0]])!=null?y:"."+a.args[0]:"."}))}}),xt("=","{:string}",{createAtom:a=>{var b,y;return new An(Ee(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(b=a.args)!=null&&b[0]?(y={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[a.args[0]])!=null?y:"="+a.args[0]:"="}))}}),xt("~","{:string}",{createAtom:a=>{var b;return new An(Ee(we({type:"mord"},a),{isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[a.args[0]])!=null?b:"\xB4"}))}}),xt("c","{:string}",{createAtom:a=>{var b;return new An(Ee(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?b:""}))}}),xt("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var b,y;const E=a.args,ee={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(b=a.style)!=null?b:{}};if(E[1]){const ae=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const he of ae){const pe=he.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(pe)ee.strokeWidth=pe[1],ee.strokeStyle=pe[2],ee.strokeColor=pe[3];else{const ve=he.match(/\s*([a-z]*)\s*=\s*"(.*)"/);ve&&(ve[1]==="mathbackground"?ee.backgroundcolor=ve[2]:ve[1]==="mathcolor"?ee.strokeColor=ve[2]:ve[1]==="padding"?ee.padding=ve[2]:ve[1]==="shadow"&&(ee.shadow=ve[2]))}}ee.strokeStyle==="dashed"?ee.svgStrokeStyle="5,5":ee.strokeStyle==="dotted"&&(ee.svgStrokeStyle="1,5")}ee.borderStyle=`${ee.strokeWidth} ${ee.strokeStyle} ${ee.strokeColor}`;const re={};return((y=E[0])!=null?y:"").split(/[, ]/).filter(ae=>ae.length>0).forEach(ae=>{re[ae.toLowerCase()]=!0}),new ud(a.command,Je(E[2]),re,ee)}}),xt("cancel","{body:auto}",{createAtom:a=>{var b;return new ud(a.command,Je(a.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(b=a.style)!=null?b:{}})}}),xt("bcancel","{body:auto}",{createAtom:a=>{var b;return new ud(a.command,Je(a.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(b=a.style)!=null?b:{}})}}),xt("xcancel","{body:auto}",{createAtom:a=>{var b;return new ud(a.command,Je(a.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(b=a.style)!=null?b:{}})}}),xt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var b;return new Jo(Ee(we({},a),{body:Je((b=a.args)==null?void 0:b[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),xt("overbrace","{:auto}",{createAtom:a=>new Jo(Ee(we({},a),{body:Je(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),xt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new Jo(Ee(we({},a),{body:Je(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),xt(["underbrace"],"{:auto}",{createAtom:a=>new Jo(Ee(we({},a),{body:Je(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),xt(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:a=>{var b,y,E,ee,re;return new Jo(Ee(we({},a),{svgBody:a.command.slice(1),above:((y=Je((b=a.args)==null?void 0:b[1]))==null?void 0:y.length)===0?void 0:Je((E=a.args)==null?void 0:E[1]),below:(re=Je((ee=a.args)==null?void 0:ee[0]))!=null?re:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(a,b)=>a.command+(a.hasEmptyBranch("below")?"":`[${a.belowToLatex(b)}]`)+`{${a.aboveToLatex(b)}}${a.supsubToLatex(b)}`}),xt(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:a=>new hu(a.command.slice(1),Ee(we({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),xt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new hu({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],Ee(we({},a),{limits:"over-under",variant:"main"}))}),xt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new hu(a.command.slice(1),Ee(we({},a),{limits:"over-under",variant:"main"}))}),xt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new hu(a.command.slice(1),Ee(we({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),xt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[0])})),serialize:(a,b)=>`\\ang{${a.bodyToLatex(b)}}`,render:(a,b)=>{const y=a.createBox(b),E=y.caret;y.caret=void 0;const ee=new ur("\xB0",{style:Ee(we({},a.style),{variant:"normal",variantStyle:"up"})});return new ur([y,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),xt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(Ee(we({},a),{body:Je(a.args[1]),index:a.args[0]?Je(a.args[0]):void 0}))}),xt(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const b=we({},a),y=a.command,E=a.args;switch(y){case"\\dfrac":case"\\frac":case"\\tfrac":b.hasBarLine=!0;break;case"\\atopfrac":b.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":b.hasBarLine=!1,b.leftDelim="(",b.rightDelim=")";break;case"\\cfrac":b.hasBarLine=!0,b.continuousFraction=!0;break;default:}switch(y){case"\\dfrac":case"\\dbinom":b.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":b.mathstyleName="textstyle";break;default:}return new oc(E[0]?Je(E[0]):[new Gr],E[1]?Je(E[1]):[new Gr],b)},serialize:(a,b)=>{const y=a.aboveToLatex(b),E=a.belowToLatex(b);return/^[0-9]$/.test(y)&&/^[0-9]$/.test(E)?`${a.command}${y}${E}`:Qi(a.command,y,E)}}),xt(["brace","brack"],"",{infix:!0,createAtom:a=>new oc(Je(a.args[0]),Je(a.args[1]),Ee(we({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,b)=>vi([a.aboveToLatex(b),a.command,a.belowToLatex(b)])}),xt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let b,y;const E=a.args;return a.command==="\\choose"&&(b="(",y=")"),new oc(Je(E[0]),Je(E[1]),Ee(we({},a),{hasBarLine:a.command==="\\over",leftDelim:b,rightDelim:y}))},serialize:(a,b)=>vi([a.aboveToLatex(b),a.command,a.belowToLatex(b)])}),xt(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:a=>{var b,y;const E=a.args;return new oc(Je(E[0]),Je(E[1]),Ee(we({},a),{leftDelim:(b=E[2])!=null?b:".",rightDelim:(y=E[3])!=null?y:".",hasBarLine:!1}))},serialize:(a,b)=>`${a.aboveToLatex(b)} ${a.command}${a.leftDelim}${a.rightDelim}${a.belowToLatex(b)}`}),xt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new oc(Je(a.args[0]),Je(a.args[1]),Ee(we({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),xt(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new hf({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[a.command.slice(1)],Ee(we({},a),{limits:"auto",variant:"main"}))}),xt("smallint","",{ifMode:"math",createAtom:a=>new hu("\u222B",Ee(we({},a),{limits:"adjacent",variant:"main"}))});var op={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};xt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const b=a.command,y=op[b.slice(1)];return new hf(y,Ee(we({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[y]}))}}),xt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new hu({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],Ee(we({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),xt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var b;return new r0(Ee(we({},a),{delim:(b=a.args[0])!=null?b:"|",size:1}))}}),xt("the","{:value}",{createAtom:a=>new An(Ee(we({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,b)=>{var y;const E=new wi({parent:b},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new ur(((y=Ca(re))!=null?y:"").split("").map(ae=>new ur(ae,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:we({variant:"main"},a.style)})),{type:"lift",style:a.style,caret:a.caret,isSelected:a.isSelected,classes:ee}).wrap(E)},serialize:a=>{var b;return`\\the${(b=Ca(a.args[0]))!=null?b:"\\relax"}`}}),xt("mathtip","{:auto}{:math}",{createAtom:a=>new ff(Ee(we({},a),{body:Je(a.args[0]),tooltip:Je(a.args[1]),content:"math"})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`\\texttip{${a.bodyToLatex(b)}}{${An.serialize([a.tooltip],Ee(we({},b),{defaultMode:"math"}))}}`}),xt("texttip","{:auto}{:text}",{createAtom:a=>new ff(Ee(we({},a),{body:Je(a.args[0]),tooltip:Je(a.args[1]),content:"text"})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`\\texttip{${a.bodyToLatex(b)}}{${An.serialize([a.tooltip],Ee(we({},b),{defaultMode:"text"}))}}`}),xt("error","{:math}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[0])})),serialize:(a,b)=>`\\error{${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{classes:"ML__error"})}),xt("ensuremath","{:math}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[0])})),serialize:(a,b)=>`${a.command}{${a.bodyToLatex(Ee(we({},b),{defaultMode:"math"}))}}`}),xt("color","{:value}",{applyStyle:(a,b,y)=>{var E,ee;return{verbatimColor:(E=Ca(b[0]))!=null?E:void 0,color:y.toColor((ee=b[0])!=null?ee:{string:"red"})}}}),xt("textcolor","{:value}{content:auto*}",{applyStyle:(a,b,y)=>{var E,ee;return{verbatimColor:(E=Ca(b[0]))!=null?E:void 0,color:y.toColor((ee=b[0])!=null?ee:{string:"red"})}}}),xt("boxed","{content:math}",{createAtom:a=>new ba(Ee(we({},a),{body:Je(a.args[0]),framecolor:{string:"black"}}))}),xt("colorbox","{:value}{:text*}",{applyStyle:(a,b,y)=>{var E,ee;return{verbatimBackgroundColor:(E=Ca(b[0]))!=null?E:void 0,backgroundColor:y.toBackgroundColor((ee=b[0])!=null?ee:{string:"yellow"})}}}),xt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var b,y;return new ba(Ee(we({},a),{body:Je(a.args[2]),framecolor:(b=a.args[0])!=null?b:{string:"blue"},backgroundcolor:(y=a.args[1])!=null?y:{string:"yellow"}}))},serialize:(a,b)=>{var y,E;return b.skipStyles?a.bodyToLatex(Ee(we({},b),{defaultMode:"text"})):Qi(a.command,(y=Ca(a.framecolor))!=null?y:"",(E=Ca(a.backgroundcolor))!=null?E:"",a.bodyToLatex(Ee(we({},b),{defaultMode:"text"})))}}),xt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var b;const y=a.args[0],E=Je(a.args[1]);return y?new ba(Ee(we({},a),{body:E,padding:y.padding,border:y.border,backgroundcolor:(b=y.backgroundcolor)!=null?b:void 0})):new ba(Ee(we({},a),{body:E}))},serialize:(a,b)=>{var y,E;if(b.skipStyles)return a.bodyToLatex(b);let ee=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const re=[];a.padding&&re.push((y=Ca(a.padding))!=null?y:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Ca(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return Qi(ee,a.bodyToLatex(b))}}),xt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[0])})),render:(a,b)=>{const y=new wi({parent:b,mathstyle:a.command.slice(1)},a.style),E=An.createBox(y,a.body,{type:"lift"});return a.caret&&(E.caret=a.caret),a.bind(b,E)},serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`{${vi([a.command,a.bodyToLatex(b)])}}`}),xt(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:a=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[a]})}),xt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,b)=>{var y;return{fontSeries:(y=b[0])!=null?y:"auto"}}}),xt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,b)=>{var y;return{fontShape:(y=b[0])!=null?y:"auto"}}}),xt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,b)=>{var y;return{fontFamily:(y=b[0])!=null?y:"roman"}}}),xt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),xt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),xt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[0])})),serialize:(a,b)=>`${a.command}{${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{classes:"ML__boldsymbol"})}),xt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),xt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),xt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),xt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),xt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),xt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),xt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),xt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),xt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),xt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),xt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),xt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),xt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),xt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),xt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),xt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),xt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),xt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),xt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),xt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),xt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),xt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),xt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),xt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),xt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),xt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),xt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),xt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),xt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),xt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),xt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),xt("mbox","{:text}",{ifMode:"math",createAtom:a=>new An(Ee(we({},a),{type:"mord",body:Je(a.args[0]),mode:"math"})),serialize:(a,b)=>Qi("\\mbox",a.bodyToLatex(Ee(we({},b),{defaultMode:"text"})))}),xt("text","{:text}",{ifMode:"math",applyMode:"text"}),xt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[1])})),serialize:(a,b)=>!a.args[0]||b.skipStyles?a.bodyToLatex(b):`${a.command}{${a.args[0]}}{${a.bodyToLatex(b)}}`,render:(a,b)=>{var y;return a.createBox(b,{classes:(y=a.args[0])!=null?y:""})}}),xt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[1])})),serialize:(a,b)=>{var y;return!((y=a.args)!=null&&y[0])||b.skipStyles?a.bodyToLatex(b):`${a.command}{${a.args[0]}}{${a.bodyToLatex(b)}}`},render:(a,b)=>{var y;const E=a.createBox(b);return E.cssId=(y=a.args[0])!=null?y:"",E}}),xt("htmlData","{data:string}{content:auto}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[1])})),serialize:(a,b)=>{var y;return!((y=a.args)!=null&&y[0])||b.skipStyles?a.bodyToLatex(b):`\\htmlData{${a.args[0]}}{${a.bodyToLatex(b)}}`},render:(a,b)=>{var y;const E=a.createBox(b);return E.htmlData=(y=a.args[0])!=null?y:"",E}}),xt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[1])})),serialize:(a,b)=>{var y;return!((y=a.args)!=null&&y[0])||b.skipStyles?a.bodyToLatex(b):`${a.command}{${a.args[0]}}{${a.bodyToLatex(b)}}`},render:(a,b)=>{var y;const E=a.createBox(b);return E.htmlStyle=(y=a.args[0])!=null?y:"",E}}),xt("em","{:rest}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[0])})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`{\\em ${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{classes:"ML__emph",boxType:"lift"})}),xt("emph","{:auto}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[1])})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`\\emph{${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{classes:"ML__emph",boxType:"lift"})});var sp={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};xt(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var b;return new i0(Ee(we({},a),{delim:(b=a.args[0])!=null?b:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),xt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var b;return new hd(Ee(we({},a),{width:(b=a.args[0])!=null?b:{dimension:0}}))}}),xt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var b;return new hd(Ee(we({},a),{width:(b=a.args[0])!=null?b:{dimension:0}}))}}),xt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new An(a),render:(a,b)=>{let y=0;const E=b.mathstyle.id;(E===su||E===Is)&&(y=1),(E===cl||E===io)&&(y=2),(E===Io||E===Ha)&&(y=3);const ee=Je(a.args[y]);return An.createBox(b,ee)},serialize:(a,b)=>`\\mathchoice{${An.serialize(a.args[0],b)}}{${An.serialize(a.args[1],b)}}{${An.serialize(a.args[2],b)}}{${An.serialize(a.args[3],b)}}`}),xt("mathop","{:auto}",{createAtom:a=>new An(Ee(we({},a),{type:"mop",body:Je(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,b)=>{var y;let E=An.createBox(b,a.body);if(a.superscript||a.subscript){const ee=(y=a.subsupPlacement)!=null?y:"auto";E=ee==="over-under"||ee==="auto"&&b.isDisplayStyle?a.attachLimits(b,{base:E}):a.attachSupsub(b,{base:E})}return new ur(a.bind(b,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,b)=>{const y=[Qi(a.command,a.bodyToLatex(b))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&y.push("\\limits"),a.subsupPlacement==="adjacent"&&y.push("\\nolimits"),a.subsupPlacement==="auto"&&y.push("\\displaylimits")),y.push(a.supsubToLatex(b)),vi(y)}}),xt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new An(Ee(we({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:Je(a.args[0])}))}),xt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const b=Je(a.args[0]).map(y=>{var E;return y.type!=="first"&&(y.type="mord",y.value=(E={"\u2217":"*","\u2212":"-"}[y.value])!=null?E:y.value,y.isFunction=!1,!y.style.variant&&!y.style.variantStyle&&(y.style.variant="main",y.style.variantStyle="up")),y});return new An(Ee(we({},a),{type:"mop",body:b,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,b)=>{var y;let E=An.createBox(b,a.body);if(a.superscript||a.subscript){const ee=(y=a.subsupPlacement)!=null?y:"auto";E=ee==="over-under"||ee==="auto"&&b.isDisplayStyle?a.attachLimits(b,{base:E}):a.attachSupsub(b,{base:E})}return a.caret&&(E.caret=a.caret),new ur(a.bind(b,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,b)=>{const y=[Qi(a.command,a.bodyToLatex(b))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&y.push("\\limits"),a.subsupPlacement==="adjacent"&&y.push("\\nolimits"),a.subsupPlacement==="auto"&&y.push("\\displaylimits")),y.push(a.supsubToLatex(b)),vi(y)}}),xt(["char","unicode"],"{charcode:value}",{createAtom:a=>new An(Ee(we({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var b;return`${a.command}${Ca((b=a.args[0])!=null?b:{number:10067,base:"hexadecimal"})}`},render:(a,b)=>{let y=b.evaluate(a.args[0]);return(!y||!("number"in y))&&(y={number:10067,base:"hexadecimal"}),a.value=String.fromCodePoint(y.number),a.createBox(b)}}),xt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new An(a),render:(a,b)=>{var y,E,ee;const re=new wi({parent:b,mathstyle:"textstyle"},a.style),ae=re.toEm((y=a.args[0])!=null?y:{dimension:0}),he=re.toEm((E=a.args[1])!=null?E:{dimension:10}),pe=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),ve=new ur(null,{classes:"rule",type:"ord"});return ve.width=he,ve.height=pe+ae,ve.depth=-ae,ve.setStyle("border-right-width",he,"em"),ve.setStyle("border-top-width",pe,"em"),ve.setStyle("border-color",a.style.color),ve.setStyle("vertical-align",ae,"em"),a.isSelected&&ve.setStyle("opacity","50%"),a.bind(re,ve),a.caret&&(ve.caret=a.caret),ve.wrap(b)},serialize:a=>`\\rule${a.args[0]?`[${Ca(a.args[0])}]`:""}{${Ca(a.args[1])}}{${Ca(a.args[2])}}`}),xt(["overline","underline"],"{:auto}",{createAtom:a=>new An(Ee(we({},a),{body:Je(a.args[0])})),render:(a,b)=>{const y=a.command.substring(1),E=new wi({parent:b,mathstyle:"cramp"},a.style),ee=An.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new ur(null,{classes:y+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let he;return y==="overline"?he=new ji({shift:0,children:[{box:ee},3*re,{box:ae},re]}):he=new ji({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(he.caret=a.caret),new ur(he,{classes:y,type:"ignore"})}}),xt("overset","{:auto}{base:auto}",{createAtom:a=>{const b=Je(a.args[1]);return new Jo(Ee(we({},a),{above:Je(a.args[0]),body:b,skipBoundary:!1,boxType:kl(b)}))},serialize:(a,b)=>Qi(a.command,a.aboveToLatex(b),a.bodyToLatex(b))}),xt("underset","{:auto}{base:auto}",{createAtom:a=>{const b=Je(a.args[1]);return new Jo(Ee(we({},a),{below:Je(a.args[0]),body:b,skipBoundary:!1,boxType:kl(b)}))},serialize:(a,b)=>Qi(a.command,a.belowToLatex(b),a.bodyToLatex(b))}),xt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const b=Je(a.args[2]);return new Jo(Ee(we({},a),{above:Je(a.args[0]),below:Je(a.args[1]),body:b,skipBoundary:!1,boxType:kl(b)}))},serialize:(a,b)=>Qi(a.command,a.belowToLatex(b),a.bodyToLatex(b))}),xt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new Jo(Ee(we({},a),{body:Je(a.args[2]),above:Je(a.args[1]),below:Je(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,b)=>Qi(a.command,a.aboveToLatex(b),a.bodyToLatex(b))}),xt("smash","[:string]{:auto}",{createAtom:a=>{var b,y,E,ee;return new dd(Ee(we({},a),{body:Je(a.args[1]),smashHeight:(y=(b=a.args[0])==null?void 0:b.includes("t"))!=null?y:!0,smashDepth:(ee=(E=a.args[0])==null?void 0:E.includes("b"))!=null?ee:!0}))}}),xt(["vphantom"],"{:auto}",{createAtom:a=>new dd(Ee(we({},a),{body:Je(a.args[0]),isInvisible:!0,smashWidth:!0}))}),xt(["hphantom"],"{:auto}",{createAtom:a=>new dd(Ee(we({},a),{body:Je(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),xt(["phantom"],"{:auto}",{createAtom:a=>new dd(Ee(we({},a),{body:Je(a.args[0]),isInvisible:!0}))}),xt("not","{:math}",{createAtom:a=>{const b=Je(a.args[0]);return b.length===0?new An(Ee(we({},a),{type:"mrel",value:"\uE020"})):new An(Ee(we({},a),{body:[new du(Ee(we({},a),{body:"\uE020",align:"right"})),...b],captureSelection:!0}))},serialize:(a,b)=>{const y=a.args[0],E=y&&typeof y=="object"&&"group"in y;return a.value!=="\uE020"?E?`\\not{${An.serialize(y.group,b)}}`:`\\not${An.serialize(y,b)}`:E?"\\not{}":"\\not"},render:(a,b)=>{if(a.value)return a.createBox(b);const E=a.args[0]&&typeof a.args[0]=="object"&&"group"in a.args[0]?"ord":kl(Je(a.args[0])),ee=An.createBox(b,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(b,ee)}}),xt(["ne","neq"],"",{createAtom:a=>new An(Ee(we({},a),{type:"mrel",body:[new du(Ee(we({},a),{body:"\uE020",align:"right",boxType:"rel"})),new An(Ee(we({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),xt("rlap","{:auto}",{createAtom:a=>new du(Ee(we({},a),{body:Je(a.args[0]),align:"right"}))}),xt("llap","{:auto}",{createAtom:a=>new du(Ee(we({},a),{body:Je(a.args[0]),align:"left"}))}),xt("mathrlap","{:math}",{createAtom:a=>new du(Ee(we({},a),{body:Je(a.args[0]),align:"left"}))}),xt("mathllap","{:math}",{createAtom:a=>new du(Ee(we({},a),{body:Je(a.args[0]),align:"left"}))}),xt("raisebox","{:value}{:text}",{createAtom:a=>{var b;return new ba(Ee(we({},a),{body:Je(a.args[1]),padding:{dimension:0},offset:(b=a.args[0])!=null?b:{dimension:0}}))},serialize:(a,b)=>{var y;return Qi("\\raisebox",(y=Ca(a.offset))!=null?y:"0pt",a.bodyToLatex(b))}}),xt("raise","{:value}{:auto}",{createAtom:a=>{var b;return new ba(Ee(we({},a),{body:Je(a.args[1]),padding:{dimension:0},offset:(b=a.args[0])!=null?b:{dimension:0}}))},serialize:(a,b)=>{var y;return Qi("\\raise",(y=Ca(a.offset))!=null?y:"0pt",a.bodyToLatex(b))}}),xt("lower","{:value}{:auto}",{createAtom:a=>{var b;return new ba(Ee(we({},a),{body:Je(a.args[1]),padding:{dimension:0},offset:(b=Xo(a.args[0],-1))!=null?b:{dimension:0}}))},serialize:(a,b)=>{var y,E;return Qi("\\lower",(E=Ca(Xo((y=a.offset)!=null?y:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(b))}}),$e("0123456789/@.?!"),dt(65,90),dt(97,122),$e([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),$e([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),$e([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\Q",81,"mord","double-struck"],["\\C",67,"mord","double-struck"],["\\P",80,"mord","double-struck"],["\\pounds",163],["\\euro",8364]]),$e([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel"),$e([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]),$e([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]),$e([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams"),$e([["+",43],["-",8722],["\u2212",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin"),$e([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams"),$e([["\\surd",8730],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\emptyset",8709]]),$e([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",8869],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel"),$e([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),$e([["\\wp",8472],["\\aleph",8501]]),$e([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams"),$e([["\\ ",160],["~",160]],"space"),xt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new hd(a)}),xt("space","",{createAtom:a=>new hd(a)}),$e([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),$e([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),$e([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var lp="<mo>⁡</mo>",Uh="<mo>⁢</mo>";function Xh(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Ui(a,b){return!a||!b.generateID?"":` extid="${a}"`}function Eg(a,b,y){var E,ee,re,ae,he,pe,ve,Ce,Ne,qe,vt;let Mt=!1;b=b!=null?b:a.atoms.length;let vn="",or="",fn=a.atoms[a.index];const zn=(ee=(E=fn.style)==null?void 0:E.variant)!=null?ee:"",hr=(ae=(re=fn.style)==null?void 0:re.variantStyle)!=null?ae:"";let Wn="";if(zn||hr){const jr=Vt(fn.value,(he=fn.style)==null?void 0:he.variant,(pe=fn.style)==null?void 0:pe.variantStyle);if(jr!==fn.value)return a.index+=1,vn=`<mi${Ui(fn.id,y)}>${jr}</mi>`,ml(vn,a,y)||(a.mathML+=vn,a.lastType="mi"),!0;Wn=(ve={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[hr+zn])!=null?ve:"",Wn=` mathvariant="${Wn}"`}const Rr={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(fn.command==="!")return a.index+=1,vn="<mo>!</mo>",ml(vn,a,y)||(a.mathML+=vn,a.lastType="mo"),!0;if(Rr[fn.command]){a.index+=1;let jr=`<mi${Ui(fn.id,y)}${Wn}>${Rr[fn.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(jr=Uh+jr),ml(jr,a,y)||(a.mathML+=jr,a.lastType="mi"),!0}if(fn.command==="\\operatorname")or=gc(fn.body),a.index+=1;else if(zn||hr)for(;a.index<b&&(fn.type==="mord"||fn.type==="macro")&&!fn.isDigit()&&zn===((Ne=(Ce=fn.style)==null?void 0:Ce.variant)!=null?Ne:"")&&hr===((vt=(qe=fn.style)==null?void 0:qe.variantStyle)!=null?vt:"");)or+=gc([fn]),a.index+=1,fn=a.atoms[a.index];else(fn.type==="mord"||fn.type==="macro")&&!fn.isDigit()&&(or+=gc([fn]),a.index+=1);if(or.length>0){Mt=!0,vn=`<mi${Wn}>${or}</mi>`;const jr=a.lastType;vn.endsWith(">f</mi>")||vn.endsWith(">g</mi>")?(vn+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(vn)?"mo":"mi",ml(vn,a,y)||((jr==="mi"||jr==="mn"||jr==="mtext"||jr==="fence")&&(vn=Uh+vn),a.mathML+=vn)}return Mt}function Mg(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function _g(a){let b=-1,y=a.index,E=!1,ee=!1;for(;y<a.atoms.length&&!E&&!ee;){const re=a.atoms[y];E=!re.isDigit(),ee=!E&&re.superscript!==void 0,y++}return ee&&(b=y-1),b}function ml(a,b,y){var E;let ee=b.atoms[b.index-1];if(!ee)return!1;if(!ee.superscript&&!ee.subscript)if(((E=b.atoms[b.index])==null?void 0:E.type)==="subsup")ee=b.atoms[b.index],b.index+=1;else return!1;const re=b.lastType;b.lastType="";const ae=Ti(ee.superscript,y);b.lastType="";const he=Ti(ee.subscript,y);if(b.lastType=re,!ae&&!he)return!1;let pe="";return ae&&he?pe=`<msubsup>${a}${he}${ae}</msubsup>`:ae?pe=`<msup>${a}${ae}</msup>`:he&&(pe=`<msub>${a}${he}</msub>`),b.mathML+=pe,b.lastType="",!0}function kg(a,b,y){b=b!=null?b:a.atoms.length;const E=a.index;let ee="";for(;a.index<b&&a.atoms[a.index].mode==="text";)ee+=a.atoms[a.index].value?a.atoms[a.index].value:" ",a.index+=1;return ee.length>0?(a.mathML+=`<mtext ${Ui(a.atoms[E].id,y)}>${ee}</mtext>`,a.lastType="mtext",!0):!1}function Dg(a,b,y){b=b!=null?b:a.atoms.length;const E=a.index;let ee="",re=_g(a);for(re>=0&&re<b&&(b=re);a.index<b&&a.atoms[a.index].isDigit();)ee+=a.atoms[a.index].asDigit(),a.index+=1;return ee.length<=0?!1:(ee="<mn"+Ui(a.atoms[E].id,y)+">"+ee+"</mn>",re<0&&Mg(a)&&(re=a.index,a.index+=1),ml(ee,a,y)||(a.mathML+=ee,a.lastType="mn"),!0)}function Lg(a,b,y){let E=!1;b=b!=null?b:a.atoms.length;let ee="",re="";if(a.index<b&&a.atoms[a.index].type==="mopen"){let ae=!1,he=0;const pe=a.index;let ve=-1,Ce=pe+1;for(;Ce<b&&!ae;)a.atoms[Ce].type==="mopen"?he+=1:a.atoms[Ce].type==="mclose"&&(he-=1),he===-1&&(ae=!0,ve=Ce),Ce+=1;ae&&(ee="<mrow>",ee+=Su(a.atoms[pe],y),ee+=Ti(a.atoms,y,pe+1,ve),ee+=Su(a.atoms[ve],y),ee+="</mrow>",a.index=ve+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Uh),ml(ee,a,y)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Ag(a,b,y){let E=!1;b=b!=null?b:a.atoms.length;let ee="",re="";const ae=a.atoms[a.index];if(!ae)return!1;const he={"\\ne":"≠","\\neq":"&neq;","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(he[ae.command]){a.index+=1;const pe=`<mo${Ui(ae.id,y)}>${he[ae.command]}</mo>`;return ml(pe,a,y)||(a.mathML+=pe,a.lastType="mo"),!0}if(a.index<b&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wf(a.atoms[a.index],y),a.index+=1,re="mo";else if(a.index<b&&(ae.type==="mop"||ae.type==="operator"||ae.type==="extensible-symbol")){if(ae.subsupPlacement==="over-under"&&(ae.superscript||ae.subscript)){const pe=Su(ae,y);return ae.superscript&&ae.subscript?(ee+="<munderover>"+pe,ee+=Ti(ae.subscript,y),ee+=Ti(ae.superscript,y),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+pe,ee+=Ti(ae.superscript,y),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+pe,ee+=Ti(ae.subscript,y),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const pe=a.atoms[a.index],ve=pe.value==="\\operatorname",Ce=ve?'<mi class="MathML-Unit"'+Ui(pe.id,y)+">"+gc(pe.value)+"</mi>":Su(pe,y);ee+=Ce,!ve&&!/^<mo>(.*)<\/mo>$/.test(Ce)?(ee+=lp,re="applyfunction"):re=ve?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=Uh+ee),a.index+=1}return ee.length>0&&(E=!0,ml(ee,a,y)||(a.mathML+=ee,a.lastType=re)),E}function Ti(a,b,y,E){b!=null||(b={});const ee={atoms:[],index:y!=null?y:0,mathML:"",lastType:""};if(typeof a=="number"||typeof a=="boolean")ee.mathML=a.toString();else if(typeof a=="string")ee.mathML=a;else if(a instanceof An)ee.mathML=Wf(a,b);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(kg(ee,E,b)||Dg(ee,E,b)||Eg(ee,E,b)||Ag(ee,E,b)||Lg(ee,E,b))re+=1;else if(ee.index<E){let ae=Wf(ee.atoms[ee.index],b);ee.lastType==="mn"&&ae.length>0&&ee.atoms[ee.index].type==="genfrac"&&(ae="<mo>⁤</mo>"+ae),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,ml(ae,ee,b)?re+=1:ae.length>0&&(ee.mathML+=ae,re+=1)}re>1&&(ee.mathML="<mrow>"+ee.mathML+"</mrow>")}return ee.mathML}function Su(a,b){let y="";const E=gc(a.value);return E&&(y="<mo"+Ui(a.id,b)+">"+E+"</mo>"),y}function gc(a){if(!a)return"";if(typeof a=="string")return Xh(a);if(!Array.isArray(a)&&typeof a.body=="string")return Xh(a.body);let b="";for(const y of a)typeof y.value=="string"&&(b+=y.value);return Xh(b)}function Wf(a,b){var y,E,ee,re,ae,he,pe,ve,Ce,Ne,qe,vt,Mt,vn,or,fn,zn,hr,Wn,Rr,jr,Kr;if(a.mode==="text")return`<mi${Ui(a.id,b)}>${a.value}</mi>`;const Ci={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},Ki={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let yr="",Wo="",js,Qo,Ga,Zo,Mo,Xi;const{command:xa}=a;if(a.command==="\\error")return`<merror${Ui(a.id,b)}>${Ti(a.body,b)}</merror>`;const Ua={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Vs={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":yr=Ti(a.body,b);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(yr+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(yr+="<mo>"+(Ua[a.leftDelim]||a.leftDelim)+"</mo>")),yr+="<mtable",a.colFormat){for(yr+=' columnalign="',Ga=0;Ga<a.colFormat.length;Ga++)a.colFormat[Ga].align&&(yr+={l:"left",c:"center",r:"right"}[a.colFormat[Ga].align]+" ");yr+='"'}for(yr+=">",Qo=0;Qo<a.array.length;Qo++){for(yr+="<mtr>",js=0;js<a.array[Qo].length;js++)yr+="<mtd>"+Ti(a.array[Qo][js],b)+"</mtd>";yr+="</mtr>"}yr+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(yr+="<mo>"+(Ua[a.leftDelim]||a.rightDelim)+"</mo>"),yr+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(yr+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(yr+="<mo"+Ui(a.id,b)+">"+(Ua[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(yr+="<mfrac>",yr+=Ti(a.above,b)||"<mi> </mi>",yr+=Ti(a.below,b)||"<mi> </mi>",yr+="</mfrac>"):(yr+="<mtable"+Ui(a.id,b)+">",yr+="<mtr>"+Ti(a.above,b)+"</mtr>",yr+="<mtr>"+Ti(a.below,b)+"</mtr>",yr+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(yr+="<mo"+Ui(a.id,b)+">"+(Ua[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(yr+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(yr+="<msqrt"+Ui(a.id,b)+">",yr+=Ti(a.body,b),yr+="</msqrt>"):(yr+="<mroot"+Ui(a.id,b)+">",yr+=Ti(a.body,b),yr+=Ti(a.above,b),yr+="</mroot>");break;case"leftright":const Gs=a,Us=Gs.leftDelim;yr="<mrow>",Us&&Us!=="."&&(yr+=`<mo${Ui(a.id,b)}>${(y=Ua[Us])!=null?y:Us}</mo>`),a.body&&(yr+=Ti(a.body,b));const Xs=Gs.matchingRightDelim();Xs&&Xs!=="."&&(yr+=`<mo${Ui(a.id,b)}>${(E=Ua[Xs])!=null?E:Xs}</mo>`),yr+="</mrow>";break;case"sizeddelim":case"delim":yr+=`<mo${Ui(a.id,b)}>${Ua[a.value]||a.value}</mo>`;break;case"accent":yr+='<mover accent="true"'+Ui(a.id,b)+">",yr+=Ti(a.body,b),yr+="<mo>"+(Vs[xa]||a.accent)+"</mo>",yr+="</mover>";break;case"line":case"overlap":break;case"overunder":Mo=a.above,Zo=a.below,(a.svgAbove||Mo)&&(a.svgBelow||Zo)?Xi=a.body:Mo&&Mo.length>0?(Xi=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(Zo=a.body[0].below,Xi=a.body[0].body):((he=(ae=a.body)==null?void 0:ae[0])==null?void 0:he.type)==="first"&&((ve=(pe=a.body)==null?void 0:pe[1])!=null&&ve.below)&&(Zo=a.body[1].below,Xi=a.body[1].body)):Zo&&Zo.length>0&&(Xi=a.body,(Ne=(Ce=a.body)==null?void 0:Ce[0])!=null&&Ne.above?(Mo=a.body[0].above,Xi=a.body[0].body):((vt=(qe=a.body)==null?void 0:qe[0])==null?void 0:vt.type)==="first"&&((vn=(Mt=a.body)==null?void 0:Mt[1])!=null&&vn.above)&&(Mo=a.body[1].overscript,Xi=a.body[1].body)),(a.svgAbove||Mo)&&(a.svgBelow||Zo)?(yr+=`<munderover ${Ui(a.id,b)}>`,yr+=(or=Ci[a.svgBody])!=null?or:Ti(Xi,b),yr+=(fn=Ci[a.svgBelow])!=null?fn:Ti(Zo,b),yr+=(zn=Ci[a.svgAbove])!=null?zn:Ti(Mo,b),yr+="</munderover>"):a.svgAbove||Mo?(yr+=`<mover ${Ui(a.id,b)}>`+((hr=Ci[a.svgBody])!=null?hr:Ti(Xi,b)),yr+=(Wn=Ci[a.svgAbove])!=null?Wn:Ti(Mo,b),yr+="</mover>"):(a.svgBelow||Zo)&&(yr+=`<munder ${Ui(a.id,b)}>`+((Rr=Ci[a.svgBody])!=null?Rr:Ti(Xi,b)),yr+=(jr=Ci[a.svgBelow])!=null?jr:Ti(Zo,b),yr+="</munder>");break;case"placeholder":yr+="?";break;case"mord":{yr=typeof a.value=="string"?a.value:xa,xa==="\\char"?yr="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":yr.length>0&&yr.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?yr="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?yr=a.value.charAt(0):(console.error("Did not expect this"),yr=""));const ws=/\d/.test(yr)?"mn":"mi";yr=`<${ws}${Ui(a.id,b)}>${Xh(yr)}</${ws}>`;break}case"mbin":case"mrel":case"minner":yr=Su(a,b);break;case"mpunct":yr='<mo separator="true"'+Ui(a.id,b)+">"+xa+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(yr="<mo"+Ui(a.id,b)+">",yr+=xa==="\\operatorname"?a.body:xa||a.body,yr+="</mo>");break;case"box":yr='<menclose notation="box"',a.backgroundcolor&&(yr+=' mathbackground="'+a.backgroundcolor+'"'),yr+=Ui(a.id,b)+">"+Ti(a.body,b)+"</menclose>";break;case"spacing":yr+='<mspace width="'+((Kr=Ki[xa])!=null?Kr:0)+'em"/>';break;case"enclose":yr='<menclose notation="';for(const ws in a.notation)Object.prototype.hasOwnProperty.call(a.notation,ws)&&a.notation[ws]&&(yr+=Wo+ws,Wo=" ");yr+=Ui(a.id,b)+'">'+Ti(a.body,b)+"</menclose>";break;case"prompt":yr='<menclose notation="roundexbox""">'+Ti(a.body,b)+"</menclose>";break;case"space":yr+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":yr+=Su(a,b);break;case"mclose":yr+=Su(a,b);break;case"macro":{const ws=a.command+gc(a.macroArgs);ws&&(yr+=`<mo ${Ui(a.id,b)}>${ws}</mo>`)}break;case"latexgroup":yr+=Ti(a.body,b);break;case"latex":yr+="<mtext"+Ui(a.id,b)+">"+a.value+"</mtext>";break;case"tooltip":yr+=Ti(a.body,b);break;case"text":yr+=`<mtext ${Ui(a.id,b)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${Ui(a.id,b)} displaystyle="true">${Ti(a.body,b)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${Ui(a.id,b)} displaystyle="false">${Ti(a.body,b)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return yr}var bc={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Zf={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Bg(a){let b="";return a.startsWith("\\")&&(b=" "+a.replace("\\","")+" "),b}function kd(a){let b=0;if(Le(a))for(const y of a)y.type!=="first"&&(b+=1);return b===1}function Tg(a){if(Le(a)){for(const b of a)if(b.type!=="first"&&b.id)return b.id.toString()}return""}function up(a){let b="";if(Le(a))for(const y of a)y.type!=="first"&&typeof y.value=="string"&&(b+=y.value);return b}function Ig(a){return a?a.map(b=>b.value).join(""):""}function xi(a,b){var y,E,ee,re,ae;function he(Ce){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(Ce)?` <say-as interpret-as="character">${Ce}</say-as>`:/[A-Z]/.test(Ce)?`capital <say-as interpret-as="character">${Ce.toLowerCase()}</say-as>`:Ce:/[a-z]/.test(Ce)?" '"+Ce.toUpperCase()+"'":/[A-Z]/.test(Ce)?" 'capital "+Ce.toUpperCase()+"'":Ce}function pe(Ce){return"<emphasis>"+Ce+"</emphasis>"}if(!b)return"";let ve="";if(Le(b)){let Ce=!1,Ne=!1;for(let qe=0;qe<b.length;qe++)b[qe].type!=="first"&&(b[qe].mode!=="text"&&(Ne=!1),qe<b.length-2&&b[qe].type==="mopen"&&b[qe+2].type==="mclose"&&b[qe+1].type==="mord"?(ve+=" of ",ve+=pe(xi(a,b[qe+1])),qe+=2):b[qe].mode==="text"?Ne?ve+=(y=b[qe].value)!=null?y:" ":(Ne=!0,ve+=xi("text",b[qe])):b[qe].isDigit()?Ce?ve+=b[qe].asDigit():(Ce=!0,ve+=xi(a,b[qe])):(Ce=!1,ve+=xi(a,b[qe])))}else if(b.mode==="text")b.id&&a==="math"&&(ve+='<mark name="'+b.id.toString()+'"/>'),ve+=b.value;else{b.id&&a==="math"&&(ve+='<mark name="'+b.id.toString()+'"/>');let Ce="",Ne="",qe="",vt=!1;const{command:Mt}=b;switch(Mt){case"\\vec":return"vector "+xi(a,b.body);case"\\acute":return xi(a,b.body)+" acute";case"\\grave":return xi(a,b.body)+" grave";case"\\dot":return"dot over"+xi(a,b.body);case"\\ddot":return"double dot over"+xi(a,b.body);case"\\mathring":return"ring over"+xi(a,b.body);case"\\tilde":case"\\widetilde":return"tilde over"+xi(a,b.body);case"\\bar":return xi(a,b.body)+" bar";case"\\breve":return xi(a,b.body)+" breve";case"\\check":case"\\widecheck":return"check over "+xi(a,b.body);case"\\hat":case"\\widehat":return"hat over"+xi(a,b.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+xi(a,b.body);case"\\underarc":case"\\underparen":return"arc under "+xi(a,b.body)}switch(b.type){case"prompt":const vn=b.body.length>1?'start input . <break time="500ms"/> '+xi(a,b.body)+'. <break time="500ms"/> end input':"blank";ve+=' <break time="300ms"/> '+vn+'. <break time="700ms"/>'+((E=b.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const or=b.array,fn=b.environmentName;if(Object.keys(Zf).includes(fn)){ve+=` begin ${Zf[fn]} `;for(let Wn=0;Wn<or.length;Wn++){Wn>0&&(ve+=","),ve+=` row ${Wn+1} `;for(let Rr=0;Rr<or[Wn].length;Rr++)Rr>0&&(ve+=","),ve+=` column ${Rr+1}: `,ve+=xi("math",or[Wn][Rr])}ve+=` end ${Zf[fn]} `}break;case"group":Mt==="\\ne"?ve+=" not equal ":(Mt==="\\not"&&(ve+=" not "),ve+=xi("math",b.body));break;case"root":ve+=xi("math",b.body);break;case"genfrac":if(Ce=xi("math",b.above),Ne=xi("math",b.below),kd(b.above)&&kd(b.below)){const Rr={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[up(b.above)+"/"+up(b.below)];Rr?ve=Rr:ve+=Ce+" over "+Ne}else ve+=' the fraction <break time="150ms"/>'+Ce+' over <break time="150ms"/>'+Ne+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(qe=xi("math",b.body),b.hasEmptyBranch("above"))ve+=kd(b.body)?" the square root of "+qe+" , ":' the square root of <break time="200ms"/>'+qe+'. <break time="200ms"/> End square root';else{let Wn=xi("math",b.above);Wn=Wn.trim();const Rr=Wn.replace(/<mark([^/]*)\/>/g,"");Rr==="3"?ve+=' the cube root of <break time="200ms"/>'+qe+'. <break time="200ms"/> End cube root':Rr==="n"?ve+=' the nth root of <break time="200ms"/>'+qe+'. <break time="200ms"/> End root':ve+=' the root with index: <break time="200ms"/>'+Wn+', of <break time="200ms"/>'+qe+'. <break time="200ms"/> End root'}break;case"leftright":{const Wn=b;ve+=(ee=Wn.leftDelim?bc[Wn.leftDelim]:void 0)!=null?ee:Wn.leftDelim,ve+=xi("math",b.body),ve+=(re=Wn.rightDelim?bc[Wn.rightDelim]:void 0)!=null?re:Wn.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const zn=Mt.replace(/^\\/g,""),hr=On()[zn];hr&&(hr!=null&&hr.expand?ve+=xi("math",b.body):ve+=`${zn} `);break;case"placeholder":ve+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(Mt==="\\mathbin"||Mt==="\\mathrel"||Mt==="\\mathopen"||Mt==="\\mathclose"||Mt==="\\mathpunct"||Mt==="\\mathord"||Mt==="\\mathinner"){ve=xi(a,b.body);break}let Wn=b.isDigit()?b.asDigit():b.value,Rr=b.command;if((b.type==="delim"||b.type==="sizeddelim")&&(Rr=b.value,Wn=Rr),a==="text")ve+=Wn;else{if(b.type==="mbin"&&(ve+='<break time="150ms"/>'),Wn){const jr=bc[Wn]||(Rr?bc[Rr.trim()]:"");if(jr)ve+=" "+jr;else{const Kr=Rr?Bg(Rr.trim()):"";ve+=Kr||he(Wn)}}else ve+=xi("math",b.body);b.type==="mbin"&&(ve+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(b.value!=="\u200B"){const Wn=b.command;if(Wn==="\\sum")if(!b.hasEmptyBranch("superscript")&&!b.hasEmptyBranch("subscript")){let Rr=xi("math",b.superscript);Rr=Rr.trim();let jr=xi("math",b.subscript);jr=jr.trim(),ve+=' the summation from <break time="200ms"/>'+jr+'<break time="200ms"/> to <break time="200ms"/>'+Rr+'<break time="200ms"/> of <break time="150ms"/>',vt=!0}else if(b.hasEmptyBranch("subscript"))ve+=" the summation of";else{let Rr=xi("math",b.subscript);Rr=Rr.trim(),ve+=' the summation from <break time="200ms"/>'+Rr+'<break time="200ms"/> of <break time="150ms"/>',vt=!0}else if(Wn==="\\prod")if(!b.hasEmptyBranch("superscript")&&!b.hasEmptyBranch("subscript")){let Rr=xi("math",b.superscript);Rr=Rr.trim();let jr=xi("math",b.subscript);jr=jr.trim(),ve+=' the product from <break time="200ms"/>'+jr+'<break time="200ms"/> to <break time="200ms"/>'+Rr+'<break time="200ms"/> of <break time="150ms"/>',vt=!0}else if(b.hasEmptyBranch("subscript"))ve+=" the product of ";else{let Rr=xi("math",b.subscript);Rr=Rr.trim(),ve+=' the product from <break time="200ms"/>'+Rr+'<break time="200ms"/> of <break time="150ms"/>',vt=!0}else if(Wn==="\\int")if(!b.hasEmptyBranch("superscript")&&!b.hasEmptyBranch("subscript")){let Rr=xi("math",b.superscript);Rr=Rr.trim();let jr=xi("math",b.subscript);jr=jr.trim(),ve+=' the integral from <break time="200ms"/>'+pe(jr)+'<break time="200ms"/> to <break time="200ms"/>'+pe(Rr)+' <break time="200ms"/> of ',vt=!0}else ve+=' the integral of <break time="200ms"/> ';else if(typeof b.value=="string"){const Rr=(ae=bc[b.value])!=null?ae:b.command?bc[b.command]:void 0;ve+=Rr||" "+b.value}else b.command&&(b.command==="\\mathop"?ve+=xi("math",b.body):b.command==="\\operatorname"?ve+=Ig(b.body):ve+=b.command.startsWith("\\")?" "+b.command.slice(1):" "+b.command)}break;case"enclose":qe=xi("math",b.body),ve+=" crossed out "+qe+". End crossed out.";break;case"space":case"spacing":break}if(!vt&&!b.hasEmptyBranch("superscript")){let vn=xi(a,b.superscript);vn=vn.trim();const or=vn.replace(/<[^>]*>/g,"");if(kd(b.superscript)){if(a==="math"){const fn=Tg(b.superscript);fn&&(ve+='<mark name="'+fn+'"/>')}or==="\u2032"?ve+=" prime ":or==="2"?ve+=" squared ":or==="3"?ve+=" cubed ":Number.isNaN(Number.parseInt(or))?ve+=" to the "+vn+"; ":ve+=' to the <say-as interpret-as="ordinal">'+or+"</say-as> power; "}else Number.isNaN(Number.parseInt(or))?ve+=" raised to the "+vn+"; ":ve+=' raised to the <say-as interpret-as="ordinal">'+or+"</say-as> power; "}if(!vt&&!b.hasEmptyBranch("subscript")){let vn=xi("math",b.subscript);vn=vn.trim(),ve+=kd(b.subscript)?" sub "+vn:" subscript "+vn+". End subscript. "}}return ve}function yc(a){var b,y;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Ti(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(b=window.MathfieldElement.textToSpeechRulesOptions)!=null?b:{},window.MathfieldElement.textToSpeechRulesOptions=Ee(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=Ee(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=Ee(we({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const re=(y=window.SRE)!=null?y:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&re.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let ae="";try{ae=re.toSpeech(ee)}catch(he){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",he)}return ae}return""}let E=xi("math",a);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let ee="";window.MathfieldElement.speechEngineRate&&(ee='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),E='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+ee+"<p><s>"+E+"</s></p>"+(ee?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&tt()==="macos"?E=E.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):E=E.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return E}var Dd={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo"},Ld={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Pg(a){let b="";for(const y of a){const E=b[b.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(y)&&(b+=" "),b+=y}return b}function ya(a){var b,y,E,ee,re,ae,he,pe,ve,Ce,Ne,qe,vt;if(!a)return"";if(Le(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(ya).join("");if(a[0].mode==="text"){let hr=0,Wn="";for(;((b=a[hr])==null?void 0:b.mode)==="text";)Wn+=a[hr].body?ya(a[hr].body):a[hr].value,hr++;return`"${Wn}" ${ya(a.slice(hr))}`}let fn=0;const zn=[];for(;a[fn]&&a[fn].mode==="math";){let hr="";for(;a[fn]&&a[fn].type==="mord"&&/\d/.test(a[fn].value);)hr+=a[fn++].value;hr?zn.push(hr):zn.push(ya(a[fn++]))}return zn.push(ya(a.slice(fn))),Pg(zn)}if(a.mode==="text")return`"${a.value}"`;let Mt="";const{command:vn}=a;let or;if(vn==="\\placeholder")return`(${ya(a.body)})`;switch(a.type){case"accent":const fn={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[vn];Mt=`${fn!=null?fn:""} ${ya(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(Kr=>Kr.value).join("");case"group":case"root":Mt=(y=Dd[vn])!=null?y:ya(a.body);break;case"genfrac":{const Kr=a;(Kr.leftDelim||Kr.rightDelim)&&(Mt=Kr.leftDelim==="."||!Kr.leftDelim?"{:":Kr.leftDelim),Kr.hasBarLine?(Mt+="(",Mt+=ya(Kr.above),Mt+=")/(",Mt+=ya(Kr.below),Mt+=")"):(Mt+="("+ya(Kr.above)+"),",Mt+="("+ya(Kr.below)+")"),(Kr.leftDelim||Kr.rightDelim)&&(Mt+=Kr.rightDelim==="."||!Kr.rightDelim?"{:":Kr.rightDelim)}break;case"surd":Mt+=a.hasEmptyBranch("above")?"sqrt("+ya(a.body)+")":"root("+ya(a.above)+")("+ya(a.body)+")";break;case"latex":Mt=a.value;break;case"leftright":{const Kr=a,Ci=Kr.leftDelim;Mt+=Ci==="."||!Ci?"{:":Ci,Mt+=ya(Kr.body);const Ki=Kr.matchingRightDelim();Mt+=Ki==="."||!Ki?":}":Ki}break;case"sizeddelim":case"delim":Mt=a.value;break;case"overlap":break;case"overunder":break;case"mord":Mt=(ee=(E=Dd[vn])!=null?E:vn)!=null?ee:typeof a.value=="string"?a.value:"",Mt.startsWith("\\")&&(Mt+=" "),or=vn?vn.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,or?Mt=String.fromCodePoint(Number.parseInt("0x"+or[1])):Mt.length>0&&Mt.startsWith("\\")&&(Mt=typeof a.value=="string"?a.value.charAt(0):a.command),Mt=Og(Mt,a.style);break;case"mbin":case"mrel":case"minner":Mt=(ae=(re=Dd[vn])!=null?re:Ld[vn])!=null?ae:a.value;break;case"mopen":case"mclose":Mt=a.value;break;case"mpunct":Mt=(he=Ld[vn])!=null?he:vn;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Ld[vn]?Mt=Ld[vn]:Mt=vn==="\\operatorname"?ya(a.body):(pe=a.value)!=null?pe:vn,Mt+=" ");break;case"array":const zn=a.array,hr=a.environmentName,Wn=(ve={bmatrix:["[","]"],"bmatrix*":["[","]"]}[hr])!=null?ve:["(",")"],Rr=[];for(const Kr of zn){const Ci=[];for(const Ki of Kr)Ci.push(Wn[0]+ya(Ki)+Wn[1]);Rr.push(Ci.join(","))}const jr=(Ce={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[hr])!=null?Ce:["(",")"];Mt=jr[0]+Rr.join(",")+jr[1];break;case"box":break;case"spacing":Mt=(Ne=Dd[vn])!=null?Ne:" ";break;case"enclose":Mt="("+ya(a.body)+")";break;case"space":Mt=" ";break;case"subsup":Mt="";break;case"macro":Mt=(vt=(qe=Dd[vn])!=null?qe:Ld[vn])!=null?vt:ya(a.body);break}if(!a.hasEmptyBranch("subscript")){Mt+="_";const fn=ya(a.subscript);Mt+=fn.length!==1?`(${fn})`:fn}if(!a.hasEmptyBranch("superscript")){Mt+="^";const fn=ya(a.superscript);Mt+=fn.length!==1?`(${fn})`:fn}return Mt}function Og(a,b){if(!b)return a;let y=a;return b.variant==="double-struck"&&(y=`bbb "${y}"`),b.variant==="script"&&(y=`cc "${y}"`),b.variant==="fraktur"&&(y=`fr "${y}"`),b.variant==="sans-serif"&&(y=`sf "${y}"`),b.variant==="monospace"&&(y=`tt "${y}"`),b.variantStyle==="bold"&&(y=`bb "${y}"`),b.color?`color({${b.color}})(${y})`:y}function Va(a,b){var y,E;b!=null||(b={}),b.mathstyle=(y=b.mathstyle)!=null?y:"displaystyle";const ee=new wi({from:Ee(we({},Qu()),{renderPlaceholder:()=>new ur(160,{maxFontSize:1}),letterShapeStyle:(E=b==null?void 0:b.letterShapeStyle)!=null?E:"tex"}),mathstyle:b.mathstyle}),ae=new An({mode:"math",type:"root",body:ja(a,{context:ee,parseMode:"math",mathstyle:b.mathstyle})}).render(ee);return ae?(Yu(fd(ae,ee)),Ju(ae,{classes:"ML__latex"}).toMarkup()):""}function k1(a){return t0(a,{context:Qu()})}function $g(a,b={}){return Ti(ja(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),b)}function Fg(a){const b=ja(a,{parseMode:"math",mathstyle:"displaystyle"});return yc(b)}var Yh;function Rg(a){var b,y;if(!Yh){const E=(b=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:b.ComputeEngine;E?Yh=new E:console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(y=Yh==null?void 0:Yh.box(a).latex)!=null?y:""}function D1(a,b="math"){return ya(new An({type:"root",body:ja(a,{parseMode:b})}))}function L1(a){return cu(a,{format:"ascii-math"})[1]}function jf(a){if(typeof a=="string"){const b=Ng(a);if(!b)throw new Error(`Invalid color: ${a}`);return b}return"C"in a?Kg(a):"a"in a?cp(a):a}function xc(a){return a<0?0:a>255?255:Math.round(a)}function Ng(a){if(!a||a[0]!=="#")return;a=a.slice(1);let b;return a.length<=4?(b={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(b.a=parseInt(a[3]+a[3],16)/255)):(b={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(b.a=parseInt(a[6]+a[7],16)/255)),b&&typeof b.a=="undefined"&&(b.a=1),b}function Vf(a){const[b,y,E]=[a.L,a.C,a.H],ee=E*Math.PI/180,re={L:b,a:y*Math.cos(ee),b:y*Math.sin(ee)};return a.alpha!==void 0&&(re.alpha=a.alpha),re}function zg(a){const[b,y,E]=[a.L,a.a,a.b],ee=Math.sqrt(y*y+E*E),ae=Math.atan2(E,y)*180/Math.PI,he={L:b,C:ee,H:ae};return a.alpha!==void 0&&(he.alpha=a.alpha),he}function Gf(a){const[b,y,E]=[a.L,a.a,a.b],ee=Math.pow(.9999999984505198*b+.39633779217376786*y+.2158037580607588*E,3),re=Math.pow(1.00000000888176*b-.10556134232365635*y-.0638541747717059*E,3),ae=Math.pow(b*1.000000054672411-.0894841820949657*y-1.2914855378640917*E,3),he=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,pe=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,ve=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,Ce=Ne=>{const qe=Math.abs(Ne);return qe<=.0031308?Ne*12.92:(Math.sign(Ne)||1)*(1.055*Math.pow(qe,1/2.4)-.055)};return[Ce(he),Ce(pe),Ce(ve)]}function Uf(a){const[b,y,E]=a;return b>=0&&b<=1&&y>=0&&y<=1&&E>=0&&E<=1}function Xf(a,b){let[y,E,ee]=a;return y=xc(y*255),E=xc(E*255),ee=xc(ee*255),b!==void 0?{r:y,g:E,b:ee,alpha:b}:{r:y,g:E,b:ee}}function cp(a){let[b,y,E]=Gf(a);if(Uf([b,y,E]))return Xf([b,y,E],a.alpha);const ee=zg(a);if(ee.C=0,[b,y,E]=Gf(Vf(ee)),!Uf([b,y,E]))return Xf([b,y,E],a.alpha);let re=0,ae=a.L,he=(re+ae)/2;ee.C=he;const pe=.36/Math.pow(2,12);for(;ae-re>pe;)he=(re+ae)/2,ee.C=he,[b,y,E]=Gf(Vf(ee)),Uf([b,y,E])?re=he:ae=he;return Xf([b,y,E],a.alpha)}function Kg(a){return cp(Vf(a))}function dp(a,b){const y=jf(a),E=jf(b),ee=.56,re=.57,ae=.62,he=.65,pe=.022,ve=1.414,Ce=.1,Ne=5e-4,qe=1.14,vt=.027,Mt=1.14,vn=.027;function or(Kr){return Kr>=pe?Kr:Kr+Ys(pe-Kr,ve)}function fn(Kr){return(Kr<0?-1:1)*Math.pow(Math.abs(Kr),2.4)}const zn=or(fn(E.r/255)*.2126729+fn(E.g/255)*.7151522+fn(E.b/255)*.072175),hr=or(fn(y.r/255)*.2126729+fn(y.g/255)*.7151522+fn(y.b/255)*.072175);let Wn,Rr,jr;return Math.abs(hr-zn)<Ne?Rr=0:hr>zn?(Wn=Ys(hr,ee)-Ys(zn,re),Rr=Wn*qe):(Wn=Ys(hr,he)-Ys(zn,ae),Rr=Wn*Mt),Math.abs(Rr)<Ce?jr=0:Rr>0?jr=Rr-vn:jr=Rr+vt,jr*100}function hp(a,b,y){y!=null||(y="#fff"),b!=null||(b="#000");const E=dp(a,y),ee=dp(a,b);return Math.abs(E)>Math.abs(ee)?y:b}function Hg(a){const b=jf(a);let y=((1<<24)+(xc(b.r)<<16)+(xc(b.g)<<8)+xc(b.b)).toString(16).slice(1);return b.alpha!==void 0&&b.alpha<1&&(y+=("00"+Math.round(b.alpha*255).toString(16)).slice(-2)),y[0]===y[1]&&y[2]===y[3]&&y[4]===y[5]&&y[6]===y[7]&&(y=y[0]+y[2]+y[4]+(b.alpha!==void 0&&b.alpha<1?y[6]:"")),"#"+y}function ia(a){const b=fp(a);let y="";for(const E of b){if(typeof E.value!="string")return"";y+=E.value}return y}function fp(a){const y=a.model.selection.ranges;return y.length!==1?[]:a.model.getAtoms(y[0])}function Wg(a,b){const y=fp(a);if(y.length!==1)return!1;const E=pf[b];return E?!!E.test(y[0].value):!1}function Zg(a,b){return ia(a).length>0}function jg(a){return[Yf(a,"double-struck","mathbb","tooltip.blackboard"),Yf(a,"fraktur","mathfrak","tooltip.fraktur"),Yf(a,"calligraphic","mathcal","tooltip.caligraphic"),Jf(a,"up","mathrm","tooltip.roman-upright"),Jf(a,"bold","mathbf","tooltip.bold"),Jf(a,"italic","mathit","tooltip.italic")]}function Vg(a){return[{label:()=>Va(`\\vec{${ia(a)}}`),visible:()=>ia(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overrightarrow{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overleftarrow{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Va(`\\dot{${ia(a)}}`),visible:()=>ia(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Va(`\\ddot{${ia(a)}}`),visible:()=>ia(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Va(`\\bar{${ia(a)}}`),visible:()=>ia(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overline{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overgroup{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overbrace{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Va(`\\underline{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Va(`\\undergroup{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Va(`\\underbrace{${ia(a)}}`),visible:()=>ia(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Gg(a){return[{label:()=>Va(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Va(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Va(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Ug(a){const b=[];for(const y of Object.keys(Ke))b.push({class:(Hg(hp(Ke[y]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ke[y]} "></span>`,ariaLabel:()=>{var E;return(E=Xe(y))!=null?E:y},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({backgroundColor:y}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({backgroundColor:y},{operation:"toggle"}),a.adoptStyle="none"}});return b}function Xg(a){const b=[];for(const y of Object.keys(Ze))b.push({class:(hp(Ze[y])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ze[y]} "></span>`,ariaLabel:()=>{var E;return(E=Xe(y))!=null?E:y},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:y}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:y},{operation:"toggle"}),a.adoptStyle="none"}});return b}var Yg=class extends ep{constructor(a,b,y,E){super(a,b),this.row=y,this.col=E}set active(a){const b=this.parentMenu.children;if(a)for(const y of b)y.element.classList.toggle("active",y.row<=this.row&&y.col<=this.col);else for(const y of b)y.element.classList.remove("active")}};function Jg(a){const b=[];for(let y=1;y<=5;y++)for(let E=1;E<=5;E++)b.push({onCreate:(ee,re)=>new Yg(ee,re,y,E),label:"\u2610",tooltip:()=>Xe("tooltip.row-by-col",y,E),data:{row:y,col:E},onMenuSelect:()=>{a.insert(`\\begin{pmatrix}${Array(y).fill(Array(E).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return b}function qg(a){return[{label:()=>Xe("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Cu(a)},{label:()=>Xe("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Cu(a)},{label:()=>Xe("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Cu(a),enabled:()=>{const b=a.model.parentEnvironment;if(!b)return!1;const[y,E]=e1(a);return y<b.maxColumns}},{label:()=>Xe("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Cu(a)},{type:"divider"},{label:()=>Xe("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Cu(a)},{label:()=>Xe("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Cu(a)},{type:"divider"},{label:()=>Xe("menu.borders"),visible:()=>(Qg(a)||Cu(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>Ad(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>Ad(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>Ad(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>Ad(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>Ad(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>Xe("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:Jg(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>Xe("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>Xe("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{uc(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>Xe("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{uc(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>Xe("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>Xe("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:jg(a),submenuClass:"variant-submenu"},{label:()=>Xe("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xg(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Xe("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Ug(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Xe("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Vg(a),submenuClass:"variant-submenu"},{label:()=>Xe("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&ia(a).length>0,submenu:Gg(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>Xe("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const b=t1(a);if(!b){a.model.announce("plonk");return}a.model.selectionIsCollapsed?(a.model.position=a.model.lastOffset,a.insert(`=${b}`,{insertionMode:"insertAfter",selectionMode:"item"})):a.insert(b,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>Xe("menu.simplify"),id:"ce-simplify",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var b,y;if(a.model.selectionIsCollapsed){const E=(b=a.expression)==null?void 0:b.simplify();if(a.model.position=a.model.lastOffset,!E){a.model.announce("plonk");return}a.insert(`=${E.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(a.model.selection)).simplify();if(!E){a.model.announce("plonk");return}a.insert(E.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var b;if(window.MathfieldElement.computeEngine===null)return"";const y=(b=a.expression)==null?void 0:b.unknowns[0];return y?Xe("menu.solve-for",Va(y)):Xe("menu.solve")},id:"ce-solve",visible:()=>{var b;return a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((b=a.expression)==null?void 0:b.unknowns.length)===1&&a.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var b;const y=a.expression,E=y==null?void 0:y.unknowns[0],ee=(b=y.solve(E))==null?void 0:b.map(re=>{var ae;return(ae=re.simplify().latex)!=null?ae:""});if(!ee){a.model.announce("plonk");return}a.insert(`${E}=${ee.length===1?ee[0]:"\\left\\lbrace"+(ee==null?void 0:ee.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>Xe("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>Xe("menu.copy"),id:"copy",submenu:[{label:()=>Xe("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>oi.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>Xe("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>oi.copyToClipboard(a,"ascii-math")},{label:()=>Xe("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>oi.copyToClipboard(a,"math-ml")}]},{label:()=>Xe("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>Xe("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Cu(a){var b;return!!((b=a.model.parentEnvironment)!=null&&b.array)}function Qg(a){return a.model.at(a.model.position).type==="array"}function e1(a){var b;const y=(b=a.model.parentEnvironment)==null?void 0:b.array;return y?[y.length,y.reduce((E,ee)=>Math.max(E,ee.length),0)]:[0,0]}function Ad(a,b){Ch(a),a.flushInlineShortcutBuffer(),T0(a.model,b),ma(a)}function t1(a){var b,y;let E;if(a.model.selectionIsCollapsed?E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(),{canonical:!1}):E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function Yf(a,b,y,E){return{label:()=>Va(`\\${y}{${ia(a)}}`),tooltip:()=>{var ee;return(ee=Xe(E))!=null?ee:E},visible:()=>Wg(a,b),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variant:b}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variant:b},{operation:"toggle"}),a.adoptStyle="none"}}}function Jf(a,b,y,E){return{label:()=>Va(`\\${y}{${ia(a)}}`),tooltip:()=>{var ee;return(ee=Xe(E))!=null?ee:E},visible:()=>Zg(a,b),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variantStyle:b}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:b},{operation:"toggle"}),a.adoptStyle="none"}}}function wc(a,b){return a+yc(b)}Oo({speak:(a,b,y)=>n1(a,b,y)},{target:"mathfield"});function n1(a,b,y){var E,ee;y=y!=null?y:{withHighlighting:!1};const{model:re}=a;function ae(Ce){let Ne=null;switch(Ce){case"all":Ne=re.root;break;case"selection":Ne=re.getAtoms(re.selection);break;case"left":{Ne=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{Ne=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":Ne=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:qe}=re.at(re.position);qe!=null&&qe.parent?Ne=qe:Ne=re.root;break}default:Ne=re.root}return Ne}function he(Ce){let Ne="";switch(Ce){case"all":console.log("Internal failure: speak all failed");break;case"selection":Ne="no selection";break;case"left":Ne="at start";break;case"right":Ne="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":Ne="no parent";break;default:console.log('unknown speak_ param value: "'+Ce+'"');break}return Ne}const pe=ae(b);if(pe===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,he(b)),!1;(y.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const ve=yc(pe);return st()&&y.withHighlighting?(Nl().readAloudMathfield=a,pu(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,ve)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(ve),!1}function r1(a){var b,y;if(!st()){console.log("Speak:",a);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const E=new SpeechSynthesisUtterance(a);window.speechSynthesis.speak(E)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"mp3",VoiceId:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((y=window.MathfieldElement.speechEngineVoice)!=null?y:"Joanna")?"neural":"standard",Text:a,TextType:"ssml"};E.synthesizeSpeech(ee,(re,ae)=>{if(re)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);else if(ae!=null&&ae.AudioStream){const he=new Uint8Array(ae.AudioStream),pe=new Blob([he.buffer],{type:"audio/mpeg"}),ve=URL.createObjectURL(pe);new Audio(ve).play().catch(Ne=>console.log(Ne))}else console.log("polly.synthesizeSpeech():",ae)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function pp(a){var b;let y;if(a.parent.type==="prompt")a.parentBranch==="body"&&(y="prompt");else if(a.parentBranch==="body")y=a.type&&(b={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[a.type])!=null?b:"parent";else if(a.parent.type==="genfrac"){if(a.parentBranch==="above")return"numerator";if(a.parentBranch==="below")return"denominator"}else a.parent.type==="surd"?a.parentBranch==="above"&&(y="index"):a.parentBranch==="superscript"?y="superscript":a.parentBranch==="subscript"&&(y="subscript");return y||console.log("unknown relationship"),y!=null?y:"parent"}function i1(a,b,y,E){let ee="";if(b==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(b==="delete")ee=wc("deleted: ",E);else if(b==="focus"||b.includes("move"))ee=a1(a.model,y)+(a.model.selectionIsCollapsed?"":"selected: ")+o1(a.model);else if(b==="replacement")ee=wc("",a.model.at(a.model.position));else if(b==="line"){const re=wc("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?wc(b+" ",E):b;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function a1(a,b){if(Number.isNaN(b))return"";const y=a.at(b);if(!y||y.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ee=y.parent;const re=a.at(a.position).parent;for(;ee!==a.root&&ee!==re;)E+=`out of ${pp(ee)};`,ee=ee.parent;return E}function o1(a){if(!a.selectionIsCollapsed)return wc("",a.getAtoms(a.selection));let b="";const y=a.at(a.position),E=pp(y);return y.isFirstSibling&&(b=(E?"start of "+E:"unknown")+": "),y.isLastSibling?y.isFirstSibling||(b+=E?"end of "+E:"unknown"):b+=wc("",y),b}var s1=class{constructor(a,b,y){this.mathfield=a,this.mode=b,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=y}dispose(){this.mathfield=void 0}getState(){const a={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(a.direction=this.selection.direction),{content:this.root.toJson(),selection:a,mode:this.mode}}setState(a,b){var y;const E=this.silenceNotifications;this.silenceNotifications=(y=b==null?void 0:b.silenceNotifications)!=null?y:!0;let ee={};if((b==null?void 0:b.type)==="undo"&&(ee={inputType:"historyUndo"}),(b==null?void 0:b.type)==="redo"&&(ee={inputType:"historyRedo"}),this.contentWillChange(ee)){const re=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=Ol(a.content),this.selection=a.selection,this.silenceNotifications=re,this.contentDidChange(ee)}this.silenceNotifications=E}get atoms(){return this.root.children}get selection(){return this._selection}set selection(a){this.setSelection(a)}setSelection(a,b){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var y,E,ee;const re=this.normalizeSelection(a,b);if(re===void 0)throw new TypeError("Invalid selection");if(re.ranges.length===1&&re.ranges[0][0]===re.ranges[0][1]){const Ce=re.ranges[0][0];if(!this.mathfield.dirty&&!((y=this.at(Ce))!=null&&y.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(Ce-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(Ce-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(Ce+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(Ce+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=Ce,this._position=Ce,this._selection=re;return}const ae=Wa(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const he=this.at(ae[0]+1),pe=this.at(ae[1]),ve=An.commonAncestor(he,pe);(ve==null?void 0:ve.type)==="array"&&he.parent===ve&&pe.parent===ve?this._selection={ranges:[ae],direction:re.direction}:this._selection={ranges:[ae],direction:re.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(a){var b;const y=this.at(a);(y==null?void 0:y.type)==="placeholder"?this.setSelection(a-1,a):((b=y==null?void 0:y.rightSibling)==null?void 0:b.type)==="placeholder"?this.setSelection(a,a+1):this.position=a,y instanceof qa&&y.isSuggestion&&(y.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(a){this.setSelection(a,a)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(a="forward"){return this._anchor===this._position?!1:(a==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(a){return this.atoms[a]}offsetOf(a){return this.atoms.indexOf(a)}getSiblingsRange(a){const b=this.at(a),{parent:y}=b;if(!y)return[0,this.lastOffset];const E=b.parent.branch(b.parentBranch);return[this.offsetOf(E[0]),this.offsetOf(E[E.length-1])]}getBranchRange(a,b){const y=this.at(a).branch(b);return[this.offsetOf(y[0]),this.offsetOf(y[y.length-1])]}getAtoms(a,b,y){let E=y!=null?y:{};if(tc(a)){if(E=b!=null?b:{},a.ranges.length>1)return a.ranges.reduce((ve,Ce)=>[...ve,...this.getAtoms(Ce,E)],[]);a=a.ranges[0]}let ee,re;if(Ps(a)){if(ee=a,!Ps(b))return[];re=b}else[ee,re]=a,E=b!=null?b:{};if(!Number.isFinite(ee))return[];E.includeChildren===void 0&&(E.includeChildren=!1),ee<0&&(ee=this.lastOffset-ee+1),re<0&&(re=this.lastOffset-re+1);const ae=Math.min(ee,re)+1,he=Math.max(ee,re);if(!E.includeChildren&&ae===1&&he===this.lastOffset)return[this.root];let pe=[];for(let ve=ae;ve<=he;ve++){const Ce=this.atoms[ve];mp(this,Ce,ae,he)&&pe.push(Ce)}return E.includeChildren||(pe=pe.filter(ve=>{let Ce=!1,{parent:Ne}=ve;for(;Ne&&!Ce;)Ce=mp(this,Ne,ae,he),Ne=Ne.parent;return!Ce})),pe}getAllAtoms(a=0){const b=[],y=this.lastOffset;for(let E=a;E<=y;E++)b.push(this.atoms[E]);for(let E=0;E<a;E++)b.push(this.atoms[E]);return b}findAtom(a,b=0,y="forward"){let E;const ee=this.lastOffset;if(y==="forward"){for(let re=b;re<=ee;re++)if(E=this.atoms[re],a(E))return E;for(let re=0;re<b;re++)if(E=this.atoms[re],a(E))return E;return}for(let re=b;re>=0;re--)if(E=this.atoms[re],a(E))return E;for(let re=ee;re>b;re--)if(E=this.atoms[re],a(E))return E}extractAtoms(a){let b=this.getAtoms(a);if(b.length===1&&!b[0].parent)if(b[0].type==="root")b=[...b[0].body],b.shift();else return b=this.root.cells.flat(),this.root=new An({type:"root",body:[]}),b;for(const y of b)y.parent.removeChild(y);return b}deleteAtoms(a){this.extractAtoms(a),this.position=a[0]}atomToString(a,b){const y=b!=null?b:"latex";if(y.startsWith("latex"))return An.serialize([a],{expandMacro:y==="latex-expanded",skipStyles:y==="latex-unstyled",skipPlaceholders:y==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(y==="math-ml")return Ti(a);if(y==="spoken")return yc(a);if(y==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=yc(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}if(y==="spoken-ssml"||y==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ee=yc(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return y==="ascii-math"?ya(a):(console.error(`MathLive 0.98.5: Unexpected format "${y}`),"")}getValue(a,b,y){if(a===void 0)return this.atomToString(this.root,"latex");if(typeof a=="string"&&a!=="math-json")return this.atomToString(this.root,a);let E,ee;if(Ps(a)&&Ps(b)?(E=[this.normalizeRange([a,b])],ee=y):ec(a)?(E=[this.normalizeRange(a)],ee=b):tc(a)?(E=a.ranges,ee=b):(E=[this.normalizeRange([0,-1])],ee=a),ee!=null||(ee="latex"),ee==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
|
|
|
Load the library, for example with:
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';const re=this.getValue({ranges:E},"latex-unstyled");try{const ae=window.MathfieldElement.computeEngine.parse(re);return JSON.stringify(ae.json)}catch(ae){return JSON.stringify(["Error",`'${ae.toString()}'`])}}if(ee.startsWith("latex")){const re={expandMacro:ee==="latex-expanded",skipStyles:ee==="latex-unstyled",skipPlaceholders:ee==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return vi(E.map(ae=>An.serialize(this.getAtoms(ae),re)))}return E.map(re=>this.getAtoms(re).map(ae=>this.atomToString(ae,ee)).join("")).join("")}extendSelectionTo(a,b){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const y=this.normalizeRange([a,b]);let[E,ee]=y,{parent:re}=this.at(ee);if(re&&(re.type==="genfrac"||re.type==="subsup"))for(;re!==this.root&&qf(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&qf(this,re,[E,ee]);)E=this.offsetOf(re.leftSibling),re=re.parent;if(re=this.at(ee).parent,(re==null?void 0:re.type)==="genfrac")for(;re!==this.root&&qf(this,re,[E,ee]);)ee=this.offsetOf(re),console.assert(ee>=0),re=re.parent;this._position=this.normalizeOffset(b),this._selection={ranges:[[E,ee]],direction:"none"}})}announce(a,b,y=[]){var E,ee;((ee=(E=this.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("announce",{detail:{command:a,previousPosition:b,atoms:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0)&&i1(this.mathfield,a,b,y)}deferNotifications(a,b){const y=this._selection,E=this._anchor,ee=this._position,re=this.silenceNotifications;this.silenceNotifications=!0;const ae=this.root.changeCounter;b();const he=this.root.changeCounter!==ae,pe=E!==this._anchor||ee!==this._position||uu(this._selection,y)==="different";return this.silenceNotifications=re,a.content&&he&&this.contentDidChange({inputType:a.type}),a.selection&&pe&&this.selectionDidChange(),he||pe}normalizeOffset(a){return a>0?a=Math.min(a,this.lastOffset):a<0&&(a=this.lastOffset+a+1),a}normalizeRange(a){let[b,y]=a;return b=this.normalizeOffset(b),y=this.normalizeOffset(y),b<y?[b,y]:[y,b]}normalizeSelection(a,b){var y;let E;if(Ps(a)){const ee=this.normalizeOffset(a);if(Ps(b)){const re=this.normalizeOffset(b);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else E={ranges:[[ee,ee]],direction:"none"}}else if(ec(a)){const ee=this.normalizeOffset(a[0]),re=this.normalizeOffset(a[1]);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else tc(a)&&(E={ranges:a.ranges.map(ee=>this.normalizeRange(ee)),direction:(y=a.direction)!=null?y:"none"});return console.assert(E!==void 0),E}get parentEnvironment(){let a=this.at(this.position).parent;if(a){for(;a.parent&&a.type!=="array";)a=a.parent;if(a.type==="array")return a}}get cell(){var a;let b=this.at(this.position);if(b){for(;b&&((a=b.parent)==null?void 0:a.type)!=="array";)b=b.parent;if(!(!(b!=null&&b.parent)||b.parent.type!=="array"))return b.parentBranch}}contentWillChange(a={}){if(this.silenceNotifications||!this.mathfield)return!0;const b=this.silenceNotifications;this.silenceNotifications=!0;const y=this.mathfield.onContentWillChange(a);return this.silenceNotifications=b,y}contentDidChange(a){var b;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Hs(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const y=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",Ee(we({},a),{data:a.data?a.data:(b=a.inputType)!=null?b:"",bubbles:!0,composed:!0}))),this.silenceNotifications=y}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Hs(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function mp(a,b,y,E){const ee=a.offsetOf(b);if(ee<y||ee>E)return!1;if(!b.hasChildren)return!0;const re=a.offsetOf(b.firstChild);if(re>=y&&re<=E){const ae=a.offsetOf(b.lastChild);if(ae>=y&&ae<=E)return!0}return!1}function qf(a,b,y){if(!(b!=null&&b.hasChildren))return!1;const[E,ee]=y,re=a.offsetOf(b.firstChild),ae=a.offsetOf(b.lastChild);return re>=E&&re<=ee&&ae>=re&&ae<=ee}function Bd(a,b,y,E){var ee,re,ae,he,pe,ve;const Ce=y.parent;if(Ce&&y instanceof Bi){const Ne=!E&&b==="forward"||E==="body"&&b==="backward";let qe=Ne?a.offsetOf(y.firstChild):a.offsetOf(y.lastChild);return Ne?y.rightDelim!=="?"&&y.rightDelim!=="."?(y.leftDelim=".",y.isDirty=!0):(Ce.addChildrenAfter(y.removeBranch("body"),y),Ce.removeChild(y),qe--):y.leftDelim!=="?"&&y.leftDelim!=="."?(y.rightDelim=".",y.isDirty=!0):(Ce.addChildrenAfter(y.removeBranch("body"),y),Ce.removeChild(y),qe--),a.position=qe,!0}if(Ce&&y.type==="surd"){if(b==="forward"&&!E||b==="backward"&&E==="body"){const Ne=y.leftSibling;y.hasChildren&&Ce.addChildrenAfter(y.removeBranch("body"),y),Ce.removeChild(y),a.position=a.offsetOf(Ne)}else b==="forward"&&E==="body"?a.position=a.offsetOf(y):!E&&b==="backward"?y.hasChildren?a.position=a.offsetOf(y.lastChild):(a.position=Math.max(0,a.offsetOf(y)-1),Ce.removeChild(y)):E==="above"&&(y.hasEmptyBranch("above")&&y.removeBranch("above"),b==="backward"?a.position=a.offsetOf(y.leftSibling):a.position=a.offsetOf(y.body[0]));return!0}if(Ce&&(y.type==="box"||y.type==="enclose")){const Ne=E&&b==="backward"||!E&&b==="forward"?y.leftSibling:y.lastChild;return Ce.addChildrenAfter(y.removeBranch("body"),y),Ce.removeChild(y),a.position=a.offsetOf(Ne),!0}if(y.type==="genfrac"||y.type==="overunder"){if(!E)return y.type==="overunder"&&y.hasEmptyBranch("body")||y.type==="genfrac"&&y.hasEmptyBranch("below")&&y.hasEmptyBranch("above")?!1:(a.position=a.offsetOf(b==="forward"?y.firstChild:y.lastChild),!0);const Ne=Td.fractionNavigationOrder==="numerator-denominator"?"above":"below",qe=Ne==="above"?"below":"above";if(Ce&&(b==="forward"&&E===Ne||b==="backward"&&E===qe)){const vt=y.removeBranch(Ne),Mt=y.removeBranch(qe);return Ce.addChildrenAfter([...vt,...Mt],y),Ce.removeChild(y),a.position=a.offsetOf(vt.length>0?vt[vt.length-1]:Mt[0]),!0}return b==="backward"?a.position=a.offsetOf(y.leftSibling):a.position=a.offsetOf(y),!0}if(y.isExtensibleSymbol||y.type==="subsup"){if(!E&&b==="forward")return!1;if(!E){if(y.subscript||y.superscript){const Ne=b==="forward"?(ae=(ee=y.superscript)==null?void 0:ee[0])!=null?ae:(re=y.subscript)==null?void 0:re[0]:(ve=(he=y.subscript)==null?void 0:he[0].lastSibling)!=null?ve:(pe=y.superscript)==null?void 0:pe[0].lastSibling;return Ne&&(a.position=a.offsetOf(Ne)),!0}return!1}if(!y.hasChildren&&y.type==="subsup"){const Ne=b==="forward"?a.offsetOf(y):Math.max(0,a.offsetOf(y)-1);return y.parent.removeChild(y),a.position=Ne,!0}if(E==="superscript")if(b==="backward"){const Ne=a.offsetOf(y.firstChild)-1;console.assert(Ne>=0),a.position=Ne}else y.subscript?a.position=a.offsetOf(y.subscript[0]):a.position=a.offsetOf(y);else E==="subscript"&&(b==="backward"&&y.superscript?a.position=a.offsetOf(y.superscript[0].lastSibling):b==="backward"?a.position=a.offsetOf(y.firstChild)-1:a.position=a.offsetOf(y));if(E&&y.hasEmptyBranch(E)&&(y.removeBranch(E),y.type==="subsup"&&!y.subscript&&!y.superscript)){const Ne=b==="forward"?a.offsetOf(y):Math.max(0,a.offsetOf(y)-1);y.parent.removeChild(y),a.position=Ne}return!0}if((Ce==null?void 0:Ce.type)==="genfrac"&&!E&&y.type!=="first"){let Ne=a.offsetOf(y.leftSibling);return Ce.removeChild(y),Ce.hasEmptyBranch("above")&&Ce.hasEmptyBranch("below")?(Ne=a.offsetOf(Ce.leftSibling),Ce.parent.removeChild(Ce),a.announce("delete",void 0,[Ce]),a.position=Ne,!0):(a.announce("delete",void 0,[y]),a.position=Ne,!0)}if(b==="backward"&&((Ce==null?void 0:Ce.command)==="\\ln"||(Ce==null?void 0:Ce.command)==="\\log")&&y.parentBranch!=="body"){const Ne=a.offsetOf(Ce.leftSibling);return Ce.parent.removeChild(Ce),a.announce("delete",void 0,[Ce]),a.position=Ne,!0}return!1}function l1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentBackward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let b=a.at(a.position);if(!(b&&Bd(a,"backward",b))){if(b!=null&&b.isFirstSibling){if(Bd(a,"backward",b.parent,b.parentBranch))return;b=null}if(!b){a.announce("plonk");return}a.position=a.offsetOf(b.leftSibling),b.parent.removeChild(b),a.announce("delete",void 0,[b])}}):Zs(a,Wa(a.selection),"deleteContentBackward")}function u1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentForward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var b,y;let E=a.at(a.position).rightSibling;if(E&&Bd(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Bd(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Bd(a,"forward",E.parent,E.parentBranch))return;E=void 0}if(a.position===a.lastOffset||!E){a.announce("plonk");return}E.parent.removeChild(E);let ee=(b=a.at(a.position))==null?void 0:b.rightSibling;for(;(ee==null?void 0:ee.type)==="subsup";)ee.parent.removeChild(ee),ee=(y=a.at(a.position))==null?void 0:y.rightSibling;a.announce("delete",void 0,[E])}):Zs(a,Wa(a.selection),"deleteContentForward")}function Zs(a,b,y){const E=a.getAtoms(b);if(E.length>0&&E[0].parent){let ee=E[0].parent.firstChild;ee.type==="first"&&(ee=ee.rightSibling);const re=E[E.length-1].parent.lastChild;let ae=E[0];ae.type==="first"&&(ae=ae.rightSibling);const he=E[E.length-1];if(ae===ee&&he===re){const pe=E[0].parent;pe.parent&&pe.type!=="prompt"&&(b=[a.offsetOf(pe.leftSibling),a.offsetOf(pe)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const pe=E[0].parent,ve=E[0].parentBranch==="below"?"above":"below",Ce=a.offsetOf(pe.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:y},()=>{var Ne,qe;const vt=pe.removeBranch(ve);if(vt.length===1&&vt[0].type==="placeholder")(qe=pe.parent)==null||qe.removeChild(pe),a.position=Math.max(0,Ce);else{const Mt=pe.parent.addChildrenAfter(vt,pe);(Ne=pe.parent)==null||Ne.removeChild(pe),a.position=a.offsetOf(Mt)}})}}return a.deferNotifications({content:!0,selection:!0,type:y},()=>a.deleteAtoms(b))}Oo({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&Zs(a,[0,-1],"deleteContent"),deleteForward:a=>u1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&Zs(a,[a.anchor,kf(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&Zs(a,[a.anchor,kf(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&Zs(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&Zs(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&Zs(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&Zs(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var c1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${Xe("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,d1=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${Xe("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,h1=class{constructor(a,b){this.focusBlurInProgress=!1;var y,E,ee;this.options=we(Ee(we({},Ph()),{macros:On(),registers:Al()}),Ih(b)),this.eventController=new AbortController;const re=this.eventController.signal;b.eventSink&&(this.host=b.eventSink),this.element=a,a.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.defaultStyle={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let ae=(E=(y=b.value)!=null?y:this.element.textContent)!=null?E:"";ae=ae.trim();const he=L0(this.options),pe=new An({type:"root",mode:he,body:ja(ae,{context:this.context})});this.model=new s1(this,he,pe),this.undoManager=new Fv(this.model);const ve=[];if(ve.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),ve.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),ve.push("<span part=content class=ML__content>"),ve.push(w0(this)),ve.push("</span>"),window.mathVirtualKeyboard&&(ve.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),ve.push(c1),ve.push("</div>")),ve.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),ve.push(d1),ve.push("</div>"),ve.push("</span>"),ve.push("<span class=ML__sr-only>"),ve.push("<span role=status aria-live=assertive aria-atomic=true></span>"),ve.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(ve.join("")),!this.element.children){console.error("%cMathLive 0.98.5: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=Ue.subscribe(()=>Ue.update(this.element)),Ue.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",Ne=>Ne.stopImmediatePropagation(),{capture:!1,signal:re}),this.field.addEventListener("wheel",this,{passive:!1,signal:re}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:re}):this.field.addEventListener("mousedown",this,{signal:re}),(ee=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||ee.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Hs(this)))},{signal:re}),this._menu=new Sg(qg(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const Ce=this.element.querySelector("[part=menu-toggle]");Ce==null||Ce.addEventListener("pointerdown",Ne=>{if(Ne.currentTarget!==Ce||this._menu.state!=="closed")return;this.element.classList.add("tracking");const qe=Ce.getBoundingClientRect();this._menu.modifiers=fu(Ne),this._menu.show({target:Ce,location:{x:qe.left,y:qe.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),Ne.preventDefault(),Ne.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(Ce.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Hm(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:re}),document.addEventListener("scroll",this,{signal:re}),this.resizeObserver=new ResizeObserver(()=>ma(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),vd&&!Ue.locale.startsWith(vd.locale)&&Rm(Ue.locale),Ho!=="ready"&&document.fonts.ready.then(()=>Dh(this)),a.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(a){this._defaultStyle=a}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const a=this.model.at(this.model.position),b=this.adoptStyle==="right"?a.rightSibling:a;if(!b)return this.defaultStyle;if(b.type==="group"){const y=b.branch("body");return!y||y.length<2?{}:this.adoptStyle==="right"?y[1].computedStyle:y[y.length-1].computedStyle}return b.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Hs(this)),Vh(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Rf())}showMenu(a){var b,y;const E=(y=(b=a==null?void 0:a.location)!=null?b:Fs(this.field))!=null?y:void 0,ee=a==null?void 0:a.modifiers,re=this.element.querySelector("[part=container]");return this._menu.show({target:re,location:E,modifiers:ee})}get colorMap(){return a=>{var b,y,E;return(E=(y=(b=this.options).colorMap)==null?void 0:y.call(b,a))!=null?E:St(a)}}get backgroundColorMap(){return a=>{var b,y,E,ee,re,ae;return(ae=(re=(y=(b=this.options).backgroundColorMap)==null?void 0:y.call(b,a))!=null?re:(ee=(E=this.options).colorMap)==null?void 0:ee.call(E,a))!=null?ae:ot(a)}}get smartFence(){var a;return(a=this.options.smartFence)!=null?a:!1}get readOnly(){var a;return(a=this.options.readOnly)!=null?a:!1}get disabled(){var a,b;return(b=(a=this.host)==null?void 0:a.disabled)!=null?b:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const a=getComputedStyle(this.host);return a.getPropertyValue("user-select")||a.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(a=>a.type==="prompt"&&!a.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const a=this.model.at(this.model.anchor),b=this.model.at(this.model.position),y=An.commonAncestor(a,b);return!!((y==null?void 0:y.type)==="prompt"||y!=null&&y.parentPrompt)}get letterShapeStyle(){var a;return(a=this.options.letterShapeStyle)!=null?a:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const a=this.model.getAtoms(this.model.selection);if(a.length===0)return{};const b=we({},a[0].style);for(const y of a)for(const[E,ee]of Object.entries(y.style))b[E]!==ee&&delete b[E];return b}queryStyle(a){const b=If(this,a);"verbatimColor"in b&&delete b.verbatimColor,"verbatimBackgroundColor"in b&&delete b.verbatimBackgroundColor;const y=Object.keys(b).length;if(y===0)return"all";if(y>1){for(const pe of Object.keys(b)){const ve=this.queryStyle({[pe]:b[pe]});if(ve==="none")return"none";if(ve==="some")return"some"}return"all"}const E=Object.keys(b)[0],ee=b[E];if(this.model.selectionIsCollapsed)return this.effectiveStyle[E]===ee?"all":"none";const re=this.model.getAtoms(this.model.selection,{includeChildren:!0});let ae=re.length;if(ae===0)return"none";let he=0;for(const pe of re){if(pe.type==="first"){ae-=1;continue}pe.style[E]===ee&&(he+=1)}return he===0?"none":he===ae?"all":"some"}get keybindings(){var a,b;if(this._keybindings)return this._keybindings;const[y,E]=Gm(this.options.keybindings,(a=gd())!=null?a:Nm());return((b=gd())==null?void 0:b.score)>0&&(this._keybindings=y,E.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",E)),y}get menu(){return this._menu}setOptions(a){var b;this.options=we(we({},this.options),Ih(a)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let y=this.options.defaultMode;y==="inline-math"&&(y="math"),((b=this.model.root.firstChild)==null?void 0:b.mode)!==y&&(this.model.root.firstChild.mode=y),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const E=An.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&oi.insert(this.model,E,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in a||"macros"in a||"registers"in a||"colorMap"in a||"backgroundColorMap"in a||"letterShapeStyle"in a||"minFontScale"in a||"readOnly"in a||"placeholderSymbol"in a)&&ma(this)}getOptions(a){return vu(this.options,a)}getOption(a){return vu(this.options,a)}handleEvent(a){return zl(this,null,function*(){var b;if(No(this)){if(Cf(a)){if(!ld(a.origin,(b=this.options.originValidator)!=null?b:"none"))throw new DOMException(`Message from unknown origin (${a.origin}) cannot be handled`,"SecurityError");const{action:y}=a.data;if(y==="execute-command"){const E=a.data.command;if(dc(E)==="virtual-keyboard")return;this.executeCommand(E)}else y==="update-state"||(y==="focus"?this.focus({preventScroll:!0}):y==="blur"&&this.blur());return}switch(a.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&Z0(this,a);break;case"pointerdown":this.userSelect!=="none"&&(Z0(this,a),a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Hh.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Hh.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Vh(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>No(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>No(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!No(this))return;Ue.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const a=this.element;delete a.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,Uv(),Qm(),mg()}flushInlineShortcutBuffer(a){if(a!=null||(a={defer:!1}),!a.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(a){return dc(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Hs(this))),!1):ov(this,a)}get errors(){return t0(this.model.getValue(),{context:this.context})}getValue(a,b,y){return this.model.getValue(a,b,y)}setValue(a,b){var y;b=b!=null?b:{mode:"math"},b.insertionMode===void 0&&(b.insertionMode="replaceAll"),(b.format===void 0||b.format==="auto")&&(b.format="latex"),(b.mode===void 0||b.mode==="auto")&&(b.mode=(y=af(this.model,this.model.position))!=null?y:"math");const E=this.undoManager.canUndo();oi.insert(this.model,a,b)&&(ma(this),E||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const a=window.MathfieldElement.computeEngine;return a?a.box(a.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var a;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const E=window.mathVirtualKeyboard.boundingRect,ee=this.host.getBoundingClientRect();ee.bottom>E.top&&((a=window.document.scrollingElement)==null||a.scrollBy(0,ee.bottom-E.top+8))}}this.dirty&&pu(this,{interactive:!0});const b=this.field.getBoundingClientRect();let y=null;if(this.model.selectionIsCollapsed)y=Fs(this.field);else{const E=sd(this);if(E.length>0){let ee=-1/0,re=-1/0;for(const ae of E)ae.right>ee&&(ee=ae.right),ae.top<re&&(re=ae.top);y={x:ee+b.left-this.field.scrollLeft,y:re+b.top-this.field.scrollTop,height:0}}}if(this.host&&y){const E=this.host.getBoundingClientRect(),ee=y.y;let re=this.host.scrollTop;ee<E.top?re=ee-E.top+this.host.scrollTop:ee>E.bottom&&(re=ee-E.bottom+this.host.scrollTop+y.height),this.host.scroll({top:re,left:0})}if(y){const E=y.x-window.scrollX;let ee=this.field.scrollLeft;E<b.left?ee=E-b.left+this.field.scrollLeft-20:E>b.right&&(ee=E-b.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ee})}}insert(a,b){return typeof a!="string"||a.length===0&&((b==null?void 0:b.insertionMode)==="insertBefore"||(b==null?void 0:b.insertionMode)==="insertAfter")||a.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),b=b!=null?b:{mode:"math"},b.focus&&this.focus(),b.feedback&&(window.MathfieldElement.keypressVibration&&at()&&navigator.vibrate(S0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?A0(this.model):a==="&"?B0(this.model):this.model.selectionIsCollapsed?oi.insert(this.model,a,we({style:this.model.at(this.model.position).computedStyle},b)):oi.insert(this.model,a,b),this.snapshot(`insert-${this.model.at(this.model.position).type}`),ma(this),b.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(a,b="",y=""){var E;if(this.model.mode===a||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const ee=this.model.mode;if(this.model.mode=a,!((E=this.host)!=null&&E.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=ee;return}const re=this.model.mode,{model:ae}=this;ae.deferNotifications({content:!!y||!!b,selection:!0,type:"insertText"},()=>{let he=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),b&&a!=="latex"){const pe=ja(b,{context:this.context,parseMode:a});ae.collapseSelection("forward");const ve=ae.at(ae.position);ae.position=ae.offsetOf(ve.parent.addChildrenAfter(pe,ve)),he=!0}if(this.model.mode=a,a==="latex"){let pe=ae.selectionIsCollapsed;uc(this,"accept");let ve,Ce=ae.at(ae.position);if(pe)ve="\\";else{const qe=Wa(ae.selection);ve=this.model.getValue(qe,"latex");const vt=this.model.extractAtoms(qe);vt.length===1&&vt[0].type==="placeholder"&&(ve=b,pe=!0),Ce=ae.at(qe[0])}const Ne=new cd(ve);Ce.parent.addChildAfter(Ne,Ce),pe?ae.position=ae.offsetOf(Ne.lastChild):ae.setSelection(ae.offsetOf(Ne.firstChild),ae.offsetOf(Ne.lastChild))}else bd(ae).forEach(pe=>{pe.isError=!1});if(y){const pe=ja(y,{context:this.context,parseMode:re});ae.collapseSelection("forward");const ve=ae.at(ae.position);ae.position=ae.offsetOf(ve.parent.addChildrenAfter(pe,ve)),he=!0}return ma(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),he}),this.model.mode=a,window.mathVirtualKeyboard.update(Hs(this))}hasFocus(){return!this.blurred}focus(a){var b;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(b=a==null?void 0:a.preventScroll)!=null&&b||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(a,b={}){var y,E;const ee={operation:"set",silenceNotifications:!1};ec(b)?ee.range=b:(b.operation==="toggle"&&(ee.operation="toggle"),ee.range=b.range,ee.silenceNotifications=(y=b.silenceNotifications)!=null?y:!1);const re=If(this,a),ae=(E=ee.operation)!=null?E:"set";if(ee.range===void 0&&this.model.selectionIsCollapsed){if(ae==="set"){this.defaultStyle=we(we({},this.defaultStyle),re);return}const he=we({},this.defaultStyle);for(const pe of Object.keys(re))he[pe]===re[pe]?(pe==="color"&&delete he.verbatimColor,pe==="backgroundColor"&&delete he.verbatimBackgroundColor,delete he[pe]):he[pe]=re[pe];this.defaultStyle=he;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const he of this.model.selection.ranges)Mf(this.model,he,re,{operation:ae});else Mf(this.model,ee.range,re,{operation:ae})}),ma(this)}toggleContextMenu(){var a;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(a=this.getCaretPoint())!=null?a:void 0,onDismiss:()=>{var b;return(b=this.element)==null?void 0:b.focus()}}),!0):!1}getCaretPoint(){const a=Fs(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,b){const y=_d(this,a,b,{bias:0});if(y<0)return!1;const E=this.model.position;return this.model.position=y,this.model.announce("move",E),ma(this),!0}getPrompt(a){const b=this.model.findAtom(y=>y.type==="prompt"&&y.placeholderId===a);return console.assert(b!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),b}getPromptValue(a,b){const y=this.getPrompt(a);if(!y)return"";const E=this.model.offsetOf(y.firstChild),ee=this.model.offsetOf(y.lastChild);return this.model.getValue(E,ee,b)}getPrompts(a){return this.model.getAllAtoms().filter(b=>b.type!=="prompt"?!1:a?!(a.id&&b.placeholderId!==a.id||a.locked&&b.locked!==a.locked||a.correctness==="undefined"&&b.correctness||a.correctness&&b.correctness!==a.correctness):!0).map(b=>b.placeholderId)}setPromptValue(a,b,y){if(b!==void 0){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}const ee=this.model.getBranchRange(this.model.offsetOf(E),"body");this.model.setSelection(ee),this.insert(b,Ee(we({},y),{insertionMode:"replaceSelection"}))}y!=null&&y.silenceNotifications&&(this.valueOnFocus=this.getValue()),ma(this)}setPromptState(a,b,y){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}b==="undefined"?E.correctness=void 0:typeof b=="string"&&(E.correctness=b),typeof y=="boolean"&&(E.locked=y,E.captureSelection=y),ma(this)}getPromptState(a){const b=this.getPrompt(a);return b?[b.correctness,b.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[void 0,!0])}getPromptRange(a){const b=this.getPrompt(a);return b?this.model.getBranchRange(this.model.offsetOf(b),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(a){var b;this.undoManager.snapshot(a)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Hs(this)),(b=this.host)==null||b.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var a;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Hs(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var a;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Hs(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var a;(a=this.undoManager)==null||a.reset()}onSelectionDidChange(){var a,b;const y=this.model;this.keyboardDelegate.setValue(y.getValue(this.model.selection,"latex-expanded"));{const E=y.at(y.position),ee=(a=E.mode)!=null?a:L0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(uc(this,"accept",{mode:ee}),y.position=y.offsetOf(E)):this.switchMode(ee))}(b=this.host)==null||b.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Hs(this)),Vh(this)}onContentWillChange(a){var b,y,E;return(E=(y=this.host)==null?void 0:y.dispatchEvent(new InputEvent("beforeinput",Ee(we({},a),{data:a.data?a.data:(b=a.inputType)!=null?b:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?E:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),pu(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var a,b,y;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",cc(this),this.model.getValue()!==this.valueOnFocus&&((a=this.host)==null||a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(b=this.host)==null||b.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(y=this.host)==null||y.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),ma(this),this.focusBlurInProgress=!1,Rf();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{No(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Af(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(Wa(this.model.selection));const b=Fs(this.field);b&&requestAnimationFrame(()=>{pu(this),this.keyboardDelegate.moveTo(b.x,b.y-b.height)})}onCompositionUpdate(a){Dv(this.model,a),ma(this)}onCompositionEnd(a){Lv(this.model),Af(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),oi.onCopy(this,a),Zs(this.model,Wa(this.model.selection),"deleteByCut"),this.snapshot("cut"),ma(this))}onCopy(a){oi.onCopy(this,a)}onPaste(a){let b=this.isSelectionEditable;return b&&(b=oi.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),b||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),b}onGeometryChange(){this._menu.hide(),Mh(this),Vh(this)}onWheel(a){const b=5*a.deltaX;if(!Number.isFinite(b)||b===0)return;const y=this.field;b<0&&y.scrollLeft===0||b>0&&y.offsetWidth+y.scrollLeft>=y.scrollWidth||(y.scrollBy({top:0,left:b}),a.preventDefault(),a.stopPropagation())}getHTMLElement(a){let b=a;for(;!b.id&&b.hasChildren;)b=a.children[0];return this.field.querySelector(`[data-atom-id="${b.id}"]`)}get context(){var a,b;return{registers:(a=this.options.registers)!=null?a:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(b=this.options.placeholderSymbol)!=null?b:"\u25A2",colorMap:y=>this.colorMap(y),backgroundColorMap:y=>this.backgroundColorMap(y),getMacro:y=>Pn(y,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function vp(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const b of a.children)vp(b)}function Qf(a,b){var y;a&&(!b||((y=a.dataset)==null?void 0:y.atomId)===b?(a.classList.add("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qf(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qf(E,b)})))}function f1(a,b){var y;if(!st())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(b);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"json",VoiceId:(y=window.MathfieldElement.speechEngineVoice)!=null?y:"Joanna",Engine:"standard",Text:b,TextType:"ssml",SpeechMarkTypes:["ssml"]};Nl().readAloudElement=a,E.synthesizeSpeech(ee,(re,ae)=>{if(re){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);return}if(!(ae!=null&&ae.AudioStream)){console.log("polly.synthesizeSpeech():",ae);return}const he=new TextDecoder("utf-8").decode(new Uint8Array(ae.AudioStream));Nl().readAloudMarks=he.split(`
|
|
|
`).map(pe=>pe?JSON.parse(pe):{}),Nl().readAloudTokens=[];for(const pe of Nl().readAloudMarks)pe.value&&Nl().readAloudTokens.push(pe.value);Nl().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(pe,ve)=>{if(pe){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${b}") error:${pe}`);return}if(!(ve!=null&&ve.AudioStream))return;const Ce=new Uint8Array(ve.AudioStream),Ne=new Blob([Ce.buffer],{type:"audio/mpeg"}),qe=URL.createObjectURL(Ne),vt=Nl();vt.readAloudAudio?vt.readAloudAudio.pause():(vt.readAloudAudio=new Audio,vt.readAloudAudio.addEventListener("ended",()=>{const Mt=vt.readAloudMathfield;vt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Mt?(pu(Mt),vt.readAloudElement=null,vt.readAloudMathfield=null,vt.readAloudTokens=[],vt.readAloudMarks=[],vt.readAloudCurrentMark=""):vp(vt.readAloudElement)}),vt.readAloudAudio.addEventListener("timeupdate",()=>{let Mt="";const vn=vt.readAloudAudio.currentTime*1e3+100;for(const or of vt.readAloudMarks)or.time<vn&&(Mt=or.value);vt.readAloudCurrentMark!==Mt&&(vt.readAloudCurrentToken=Mt,Mt&&Mt===vt.readAloudFinalToken?vt.readAloudAudio.pause():(vt.readAloudCurrentMark=Mt,Qf(vt.readAloudElement,vt.readAloudCurrentMark)))})),vt.readAloudAudio.src=qe,vt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),vt.readAloudAudio.play()})})}st()||console.error('MathLive 0.98.5: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var Mi=new WeakMap,p1=.5,Rl={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},Qa=class Eu extends HTMLElement{static get formAssociated(){return Sc()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(b){b!==this._fontsDirectory&&(this._fontsDirectory=b,nv())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(b){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(b){this._soundsDirectory=b,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(b){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(b){var y,E,ee;this.audioBuffers={},b===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof b=="string"?this._keypressSound={spacebar:b,return:b,delete:b,default:b}:typeof b=="object"&&"default"in b&&(this._keypressSound={spacebar:(y=b.spacebar)!=null?y:b.default,return:(E=b.return)!=null?E:b.default,delete:(ee=b.delete)!=null?ee:b.default,default:b.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(b){this.audioBuffers={},this._plonkSound=b}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(b){this._speechEngine=b}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(b){this._speechEngineRate=b}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(b){this._speechEngineVoice=b}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(b){this._textToSpeechMarkup=b}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(b){this._textToSpeechRules=b}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(b){this._textToSpeechRulesOptions=b}static get locale(){return Ue.locale}static set locale(b){b==="auto"&&(b=navigator.language.slice(0,5)),Ue.locale=b}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(b){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return Ue.strings}static set strings(b){Ue.merge(b)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(b){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(b){this._decimalSeparator=b,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(b){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var b,y;if(this._computeEngine===void 0){const E=(b=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:b.ComputeEngine;if(!E)return null;this._computeEngine=new E,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(y=this._computeEngine)!=null?y:null}static set computeEngine(b){this._computeEngine=b}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(b){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(b){this._isFunction=b}static loadSound(b){return zl(this,null,function*(){delete this.audioBuffers[b];let y="";switch(b){case"keypress":y=this._keypressSound.default;break;case"return":y=this._keypressSound.return;break;case"spacebar":y=this._keypressSound.spacebar;break;case"delete":y=this._keypressSound.delete;break;case"plonk":y=this.plonkSound;break}if(typeof y!="string")return;y=y.trim();const E=this.soundsDirectory;if(!(E==null||E==="null"||y==="none"||y==="null"))try{const re=yield(yield fetch(yield x0(`${E}/${y}`))).arrayBuffer(),ae=yield this.audioContext.decodeAudioData(re);this.audioBuffers[b]=ae}catch(ee){}})}static playSound(b){return zl(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[b]||(yield this.loadSound(b)),!this.audioBuffers[b])return;const y=this.audioContext.createBufferSource();y.buffer=this.audioBuffers[b];const E=this.audioContext.createGain();E.gain.value=p1,y.connect(E).connect(this.audioContext.destination),y.start()})}constructor(b){if(super(),b){const y=[];for(const E of Object.keys(b))if(Rl[E])if(Rl[E].startsWith("mf."))if(Rl[E].startsWith(`mf.${E}`))y.push(`Option \`${E}\` cannot be used as a constructor option. Use ${Rl[E]}`);else{const ee=Rl[E].match(/([a-zA-Z]+) =/);y.push(`Option \`${E}\` has been renamed \`${ee[1]}\``)}else y.push(`Option \`${E}\` cannot be used as a constructor option. Use ${Rl[E]}`);if(y.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const E of y)console.warn(E);console.groupEnd()}}if(Sc()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[Pl("core"),Pl("mathfield"),Pl("mathfield-element"),Pl("ui"),Pl("menu")],this.shadowRoot.appendChild(document.createElement("span"));const y=document.createElement("slot");y.style.display="none",this.shadowRoot.appendChild(y)}else this.shadowRoot.innerHTML="<style>"+hl("core")+hl("mathfield")+hl("mathfield-element")+hl("ui")+hl("menu")+'</style><span></span><slot style="display:none"></slot>';b&&this._setOptions(b),this.shadowRoot.addEventListener("slotchange",()=>{var y;const E=this.shadowRoot.querySelector("slot:not([name])");this.value=(y=E==null?void 0:E.assignedNodes().map(ee=>ee.nodeType===3?ee.textContent:"").join("").trim())!=null?y:""})}showMenu(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.showMenu(b))!=null?E:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",b=>{var y;b.target===this&&!((y=this._mathfield)!=null&&y.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:b.altKey,button:b.button,buttons:b.buttons,clientX:b.clientX,clientY:b.clientY,ctrlKey:b.ctrlKey,metaKey:b.metaKey,movementX:b.movementX,movementY:b.movementY,relatedTarget:b.relatedTarget,screenX:b.screenX,screenY:b.screenY,shiftKey:b.shiftKey}))},{once:!0})}getPromptValue(b,y){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.getPromptValue(b,y))!=null?ee:""}setPromptValue(b,y,E){var ee;(ee=this._mathfield)==null||ee.setPromptValue(b,y,E)}getPromptRange(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.getPromptRange(b))!=null?E:null}getPrompts(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.getPrompts(b))!=null?E:[]}get form(){var b;return(b=this._internals)==null?void 0:b.form}get name(){var b;return(b=this.getAttribute("name"))!=null?b:""}get type(){return this.localName}get mode(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.model.mode)!=null?y:this.defaultMode==="text"?"text":"math"}set mode(b){var y;(y=this._mathfield)==null||y.switchMode(b)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(b){var y,E;if(!this._mathfield)return;const ee=(E=(y=Eu.computeEngine)==null?void 0:y.box(b).latex)!=null?E:null;ee!==null&&this._mathfield.setValue(ee),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.errors)!=null?y:[]}_getOptions(b){return this._mathfield?vu(this._mathfield.options,b):Mi.has(this)?we({},vu(we(we({},Ph()),Ih(Mi.get(this).options)),b)):null}getOptions(b){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?vu(this._mathfield.options,b):Mi.has(this)?vu(we(we({},Ph()),Ih(Mi.get(this).options)),b):null}reflectAttributes(){const b=Ph(),y=this._getOptions();Object.keys(Eu.optionsAttributes).forEach(E=>{const ee=vl(E);Eu.optionsAttributes[E]==="on/off"?b[ee]!==y[ee]?this.setAttribute(E,y[ee]?"on":"off"):this.removeAttribute(E):b[ee]!==y[ee]&&(Eu.optionsAttributes[E]==="boolean"?y[ee]?this.setAttribute(E,""):this.removeAttribute(E):(typeof y[ee]=="string"||typeof y[ee]=="number")&&this.setAttribute(E,y[ee].toString()))})}getOption(b){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([b])[b]}_getOption(b){return this._getOptions([b])[b]}_setOptions(b){if(this._mathfield)this._mathfield.setOptions(b);else if(Mi.has(this)){const y=we(we({},Mi.get(this).options),b);Mi.set(this,Ee(we({},Mi.get(this)),{selection:{ranges:y.readOnly?[[0,0]]:[[0,-1]]},options:y}))}else Mi.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:b,menuItems:void 0});this.reflectAttributes()}setOptions(b){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const y of Object.keys(b))Rl[y]&&console.warn(`\`mf.setOptions({${y}:...})\` -> ${Rl[y]}`);console.groupEnd(),this._setOptions(b)}executeCommand(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.executeCommand(b))!=null?E:!1}getValue(b,y,E){var ee,re;if(this._mathfield)return this._mathfield.model.getValue(b,y,E);if(Mi.has(this)){let ae,he,pe;if(tc(b)?([ae,he]=b.ranges[0],pe=y):ec(b)?([ae,he]=b,pe=y):Ps(b)&&Ps(y)?(ae=b,he=y,pe=E):(ae=0,he=-1,pe=b),(pe===void 0||pe==="latex")&&ae===0&&he===-1)return(re=(ee=Mi.get(this).value)!=null?ee:this.textContent)!=null?re:""}return""}setValue(b,y){if(this._mathfield&&b!==void 0){y!=null||(y={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(b,y);return}if(Mi.has(this)){const ee=Mi.get(this).options;Mi.set(this,{value:b,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Id(this);Mi.set(this,{value:b,selection:{ranges:[[-1,-1]],direction:"forward"},options:E,menuItems:void 0})}hasFocus(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.hasFocus())!=null?y:!1}focus(){var b;(b=this._mathfield)==null||b.focus()}blur(){var b;(b=this._mathfield)==null||b.blur()}select(){var b;(b=this._mathfield)==null||b.select()}insert(b,y){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.insert(b,y))!=null?ee:!1}applyStyle(b,y){var E;return(E=this._mathfield)==null?void 0:E.applyStyle(b,y)}queryStyle(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.queryStyle(b))!=null?E:"none"}get caretPoint(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.getCaretPoint())!=null?y:null}set caretPoint(b){var y;b&&((y=this._mathfield)==null||y.setCaretPoint(b.x,b.y))}setCaretPoint(b,y){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.setCaretPoint(b,y))!=null?ee:!1}offsetFromPoint(b,y,E){return this._mathfield?_d(this._mathfield,b,y,E):-1}hitboxFromOffset(b){if(!this._mathfield)return null;const y=this._mathfield.model.at(b);if(!y)return null;const E=Tl(this._mathfield,y);return E?new DOMRect(E.left,E.top,E.right-E.left,E.bottom-E.top):null}resetUndo(){var b;(b=this._mathfield)==null||b.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(b){var y,E,ee,re;Ns.state==="closed"&&((E=(y=this._mathfield)==null?void 0:y.menu)==null?void 0:E.state)==="closed"&&(b.type==="pointerdown"&&this.onPointerDown(),b.type==="focus"&&((ee=this._mathfield)==null||ee.focus()),b.type==="blur"&&((re=this._mathfield)==null||re.blur()))}connectedCallback(){var b,y,E,ee;const re=window.getComputedStyle(this),ae=this.shadowRoot,he=re.userSelect!=="none";if(he)ae.host.addEventListener("pointerdown",this,!0);else{const Ce=ae.querySelector("span");Ce.style.pointerEvents="none"}ae.host.addEventListener("focus",this,!0),ae.host.addEventListener("blur",this,!0),Sc()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),he&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const pe=ae.querySelector("slot:not([name])");if(pe)try{this._style=pe.assignedElements().filter(Ce=>Ce.tagName.toLowerCase()==="style").map(Ce=>Ce.textContent).join("")}catch(Ce){console.error(Ce)}if(this._style){const Ce=document.createElement("style");Ce.textContent=this._style,ae.appendChild(Ce)}let ve="";if(this.hasAttribute("value")?ve=this.getAttribute("value"):ve=(b=pe==null?void 0:pe.assignedNodes().map(Ce=>Ce.nodeType===3?Ce.textContent:"").join("").trim())!=null?b:"",this._mathfield=new h1(ae.querySelector(":host > span"),Ee(we({},(E=(y=Mi.get(this))==null?void 0:y.options)!=null?E:Id(this)),{eventSink:this,value:ve})),!Mi.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const Ce of Object.keys(Eu.optionsAttributes))this.upgradeProperty(vl(Ce))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Mi.has(this)){const Ce=this._mathfield,Ne=Mi.get(this),qe=Ne.menuItems;Ce.model.deferNotifications({content:!1,selection:!1},()=>{const vt=Ne.value;vt!==void 0&&Ce.setValue(vt),Ce.model.selection=Ne.selection,Mi.delete(this)}),qe&&(this.menuItems=qe)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),kh()}disconnectedCallback(){var b,y;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const E=vu(this._mathfield.options,Object.keys(Eu.optionsAttributes).map(ee=>vl(ee)));Mi.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(y=(b=this._mathfield.menu)==null?void 0:b.menuItems)!=null?y:void 0,options:E}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(b){if(this.hasOwnProperty(b)){const y=this[b];delete this[b],(b==="readonly"||b==="read-only")&&(b="readOnly"),this[b]=y}}attributeChangedCallback(b,y,E){if(y===E)return;const ee=E!==null;switch(b){case"contenteditable":ma(this._mathfield);break;case"disabled":this.disabled=ee;break;case"read-only":case"readonly":this.readOnly=ee;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(b){const y=!!b;y?(this.setAttribute("readonly",""),Sc()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Sc()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:y})}get disabled(){return this.hasAttribute("disabled")}set disabled(b){var y;const E=!!b;E?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Sc()?this._internals.ariaDisabled=E?"true":"false":this.setAttribute("aria-disabled",E?"true":"false"),E&&((y=this._mathfield)!=null&&y.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(b){this.setValue(b)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(b){this._setOptions({defaultMode:b})}get macros(){return this._getOption("macros")}set macros(b){this._setOptions({macros:b})}get registers(){const b=this;return new Proxy({},{get:(y,E)=>{if(typeof E=="string")return b._getOption("registers")[E]},set(y,E,ee){return typeof E!="string"?!1:(b._setOptions({registers:Ee(we({},b._getOption("registers")),{[E]:ee})}),!0)}})}set registers(b){this._setOptions({registers:b})}get colorMap(){return this._getOption("colorMap")}set colorMap(b){this._setOptions({colorMap:b})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(b){this._setOptions({backgroundColorMap:b})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(b){this._setOptions({letterShapeStyle:b})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(b){this._setOptions({minFontScale:b})}get smartMode(){return this._getOption("smartMode")}set smartMode(b){this._setOptions({smartMode:b})}get smartFence(){return this._getOption("smartFence")}set smartFence(b){this._setOptions({smartFence:b})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(b){this._setOptions({smartSuperscript:b})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(b){this._setOptions({scriptDepth:b})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(b){this._setOptions({removeExtraneousParentheses:b})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(b){this._setOptions({mathModeSpace:b})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(b){this._setOptions({placeholderSymbol:b})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(b){this._setOptions({popoverPolicy:b})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(b){this._setOptions({environmentPopoverPolicy:b})}get menuItems(){var b,y,E;return this._mathfield?(b=this._mathfield.menu._menuItems.map(ee=>ee.menuItem))!=null?b:[]:(E=(y=Mi.get(this))==null?void 0:y.menuItems)!=null?E:[]}set menuItems(b){var y;if(this._mathfield){const E=(y=this._mathfield.element)==null?void 0:y.querySelector("[part=menu-toggle]");E&&(E.style.display=b.length===0?"none":""),this._mathfield.menu.menuItems=b}Mi.has(this)?Mi.set(this,Ee(we({},Mi.get(this)),{menuItems:b})):Mi.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Id(this),menuItems:b})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(b){this._setOptions({mathVirtualKeyboardPolicy:b})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(b){this._setOptions({inlineShortcuts:b})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(b){this._setOptions({inlineShortcutTimeout:b})}get keybindings(){return this._getOption("keybindings")}set keybindings(b){this._setOptions({keybindings:b})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(b){this._setOptions({onInlineShortcut:b})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(b){this._setOptions({onScrollIntoView:b})}get onExport(){return this._getOption("onExport")}set onExport(b){this._setOptions({onExport:b})}get readOnly(){return this._getOption("readOnly")}set readOnly(b){this._setOptions({readOnly:b})}get isSelectionEditable(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.isSelectionEditable)!=null?y:!1}setPromptState(b,y,E){var ee;(ee=this._mathfield)==null||ee.setPromptState(b,y,E)}getPromptState(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.getPromptState(b))!=null?E:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(b){this._setOptions({virtualKeyboardTargetOrigin:b})}get selection(){return this._mathfield?this._mathfield.model.selection:Mi.has(this)?Mi.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(b){if(typeof b=="number"&&(b={ranges:[[b,b]]}),this._mathfield){this._mathfield.model.selection=b,ma(this._mathfield);return}if(Mi.has(this)){Mi.set(this,Ee(we({},Mi.get(this)),{selection:b}));return}Mi.set(this,{value:void 0,selection:b,options:Id(this),menuItems:void 0})}get selectionIsCollapsed(){const b=this.selection;return b.ranges.length===1&&b.ranges[0][0]===b.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Mi.has(this)?Mi.get(this).selection.ranges[0][0]:0}set position(b){if(this._mathfield&&(this._mathfield.model.position=b,ma(this._mathfield)),Mi.has(this)){Mi.set(this,Ee(we({},Mi.get(this)),{selection:{ranges:[[b,b]]}}));return}Mi.set(this,{value:void 0,selection:{ranges:[[b,b]]},options:Id(this),menuItems:void 0})}getOffsetDepth(b){var y,E;return this._mathfield?((E=(y=this._mathfield.model.at(b))==null?void 0:y.treeDepth)!=null?E:2)-2:0}get lastOffset(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.model.lastOffset)!=null?y:-1}};Qa.version="0.98.5",Qa._fontsDirectory="./fonts",Qa._soundsDirectory="./sounds",Qa.keypressVibration=!0,Qa._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},Qa._plonkSound="plonk.wav",Qa.audioBuffers={},Qa.createHTML=a=>a,Qa._speechEngineRate="100%",Qa._speechEngineVoice="Joanna",Qa._textToSpeechMarkup="",Qa._textToSpeechRules="mathlive",Qa._textToSpeechRulesOptions={},Qa.speakHook=r1,Qa.readAloudHook=f1,Qa._decimalSeparator=".",Qa.fractionNavigationOrder="numerator-denominator",Qa._isFunction=a=>{var b,y;const E=window.MathfieldElement.computeEngine;return(y=(b=E==null?void 0:E.parse(a).domain)==null?void 0:b.isFunction)!=null?y:!1};var Td=Qa;function vl(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(b,y)=>y.toUpperCase())}function Id(a){const b={readOnly:!1},y=Td.optionsAttributes;return Object.keys(y).forEach(E=>{if(a.hasAttribute(E)){const ee=a.getAttribute(E);E==="placeholder"?b.contentPlaceholder=ee!=null?ee:"":y[E]==="boolean"?b[vl(E)]=!0:y[E]==="on/off"?ee==="on"?b[vl(E)]=!0:ee==="off"?b[vl(E)]=!1:b[vl(E)]=void 0:y[E]==="number"?b[vl(E)]=Number.parseFloat(ee!=null?ee:"0"):b[vl(E)]=ee}}),b}function Sc(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var gp=Td,bp,yp,xp,wp;if(st()&&!((bp=window.customElements)!=null&&bp.get("math-field"))){(xp=window[yp=Symbol.for("io.cortexjs.mathlive")])!=null||(window[yp]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=Td,(wp=window.customElements)==null||wp.define("math-field",Td)}function m1(a,b,y){let E=y,ee=0;const re=a.length;for(;E<b.length;){const ae=b[E];if(ee<=0&&b.slice(E,E+re)===a)return E;ae==="\\"?E++:ae==="{"?ee++:ae==="}"&&ee--,E++}return-1}function Jh(a,b,y,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const he=ae.data;let pe=!0,ve=0,Ce;Ce=he.indexOf(b),Ce!==-1&&(ve=Ce,ve>0&&re.push({type:"text",data:he.slice(0,ve)}),pe=!1);let Ne=!1;for(;!Ne;){if(pe){if(Ce=he.indexOf(b,ve),Ce===-1){Ne=!0;break}ve!==Ce&&re.push({type:"text",data:he.slice(ve,Ce)}),ve=Ce}else{if(Ce=m1(y,he,ve+b.length),Ce===-1){Ne=!0;break}let qe=he.slice(ve+b.length,Ce);ee==="ascii-math"&&([,qe]=cu(qe,{format:"ascii-math"})),re.push({type:"math",data:qe,rawData:he.slice(ve,Ce+y.length),mathstyle:E}),ve=Ce+y.length}pe=!pe}ve<he.length&&re.push({type:"text",data:he.slice(ve)})}else re.push(ae);return re}function Sp(a,b,y){let E=[{type:"text",data:a}];return b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jh(E,ee,re,"textstyle")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jh(E,ee,re,"displaystyle")}),y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=Jh(E,ee,re,"textstyle","ascii-math")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jh(E,ee,re,"displaystyle","ascii-math")}),E}function v1(a,b){const y=document.createElement("span");y.setAttribute("translate","no");try{const E="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+b.renderToMathML(a)+"</math>";y.innerHTML=window.MathfieldElement.createHTML(E)}catch(E){console.error(`MathLive 0.98.5: Could not convert "${a}"' to MathML with ${E}`),y.textContent=a}return y.className="ML__sr-only",y}function g1(a,b,y,E){try{const ee=b.renderToMarkup(a,{mathstyle:y,format:"html"}),re=document.createElement("span");return re.dataset.latex=a,re.style.display=y==="displaystyle"?"flex":"inline-flex",re.setAttribute("aria-hidden","true"),re.setAttribute("translate","no"),re.innerHTML=window.MathfieldElement.createHTML(ee),re}catch(ee){if(console.error("Could not parse'"+a+"' with ",ee),E)return document.createTextNode(a)}return null}function Cc(a,b,y,E){var ee;const re=g1(a,y,b||"textstyle",E),ae=(ee=y.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(ae)){const he=document.createElement("span");if(/\bmathml\b/i.test(ae)&&y.renderToMathML&&he.append(v1(a,y)),/\bspeakable-text\b/i.test(ae)&&y.renderToSpeakableText){const pe=document.createElement("span");pe.setAttribute("translate","no");const ve=y.renderToSpeakableText(a);pe.innerHTML=window.MathfieldElement.createHTML(ve),pe.className="ML__sr-only",he.append(pe)}return he.append(re),he}return re}function b1(a,b){var y,E,ee;let re=null;if((y=b.TeX)!=null&&y.processEnvironments&&/^\s*\\begin/.test(a)){re=document.createDocumentFragment();const ae=Cc(a,"",b,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=Sp(a,(E=b.TeX)==null?void 0:E.delimiters,(ee=b.asciiMath)==null?void 0:ee.delimiters);if(ae.length===1&&ae[0].type==="text")return null;re=document.createDocumentFragment();for(const he of ae)if(he.type==="text")re.appendChild(document.createTextNode(he.data));else{const pe=Cc(he.data,he.mathstyle==="textstyle"?"textstyle":"displaystyle",b,!0);pe&&re.appendChild(pe)}}return re}function Cp(a,b){var y,E,ee,re,ae,he,pe,ve,Ce,Ne,qe,vt,Mt,vn,or,fn;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const zn=(y=a.childNodes[0].textContent)!=null?y:"";if((E=b.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(zn)){a.textContent="";const Wn=Cc(zn,"",b,!0);Wn&&a.append(Wn);return}const hr=Sp(zn,(ee=b.TeX)==null?void 0:ee.delimiters,(re=b.asciiMath)==null?void 0:re.delimiters);if(hr.length===1&&hr[0].type==="math"){a.textContent="";const Wn=Cc(hr[0].data,hr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",b,!0);Wn&&a.append(Wn);return}if(hr.length===1&&hr[0].type==="text")return}for(let zn=a.childNodes.length-1;zn>=0;zn--){const hr=a.childNodes[zn];if(hr.nodeType===3){const Wn=b1((ae=hr.textContent)!=null?ae:"",b);Wn&&(zn+=Wn.childNodes.length-1,hr.replaceWith(Wn))}else if(hr.nodeType===1){const Wn=hr,Rr=hr.nodeName.toLowerCase();if(Rr==="script"){const jr=hr;let Kr;if((he=b.processScriptTypePattern)!=null&&he.test(jr.type))Kr=(pe=jr.textContent)!=null?pe:"";else if((ve=b.processMathJSONScriptTypePattern)!=null&&ve.test(jr.type))try{Kr=(Ne=b.serializeToLatex)==null?void 0:Ne.call(b,JSON.parse((Ce=jr.textContent)!=null?Ce:""))}catch(Ci){console.error(Ci)}if(Kr){let Ci="textstyle";for(const yr of jr.type.split(";")){const[Wo,js]=yr.toLowerCase().split("=");Wo.trim()==="mode"&&(Ci=js.trim()==="display"?"displaystyle":"textstyle")}const Ki=Cc(Kr,Ci,b,!0);Ki&&jr.parentNode.replaceChild(Ki,jr)}}else if(((vt=(qe=b.processClassPattern)==null?void 0:qe.test(Wn.className))!=null?vt:!1)||!((vn=(Mt=b.skipTags)==null?void 0:Mt.includes(Rr))!=null&&vn||(fn=(or=b.ignoreClassPattern)==null?void 0:or.test(Wn.className))!=null&&fn))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Kr=a.textContent;a.textContent="";const Ci=Cc(Kr!=null?Kr:"","displaystyle",b,!0);Ci&&a.append(Ci)}else Cp(Wn,b)}}}var y1={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function x1(a,b){var y,E,ee,re;try{const ae=we(we({},y1),b);ae.ignoreClassPattern=new RegExp((y=ae.ignoreClass)!=null?y:""),ae.processClassPattern=new RegExp((E=ae.processClass)!=null?E:""),ae.processScriptTypePattern=new RegExp((ee=ae.processScriptType)!=null?ee:""),ae.processMathJSONScriptTypePattern=new RegExp((re=ae.processMathJSONScriptType)!=null?re:""),kh(),Po("core"),Cp(a,ae)}catch(ae){ae instanceof Error?console.error("renderMathInElement(): "+ae.message):console.error("renderMathInElement(): Could not render math for element",a)}}function w1(a,b){const y=$l.singleton;return y?(y.show(),wd(),y.currentLayer=b,y.render(),y.focus(),!0):!1}function S1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}Oo({switchKeyboardLayer:w1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function Nl(){var a,b;return(b=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function A1(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function B1(a){E1(document.body,a)}function C1(a){if(typeof a=="string"){const b=document.getElementById(a);if(b===null)throw new Error(`The element with ID "${a}" could not be found.`);return b}return typeof a=="string"?null:a}function E1(a,b){var y,E,ee,re;const ae=C1(a);if(!ae)return;const he=b!=null?b:{};(y=he.renderToMarkup)!=null||(he.renderToMarkup=Va),(E=he.renderToMathML)!=null||(he.renderToMathML=$g),(ee=he.renderToSpeakableText)!=null||(he.renderToSpeakableText=Fg),(re=he.serializeToLatex)!=null||(he.serializeToLatex=Rg),x1(ae,he)}var T1={mathlive:"0.98.5"}},16722:function(wn,qt,ce){"use strict";ce.d(qt,{Z:function(){return we}});const be=Ee=>typeof Ee=="object"&&Ee!=null&&Ee.nodeType===1,We=(Ee,Oe)=>(!Oe||Ee!=="hidden")&&Ee!=="visible"&&Ee!=="clip",Fe=(Ee,Oe)=>{if(Ee.clientHeight<Ee.scrollHeight||Ee.clientWidth<Ee.scrollWidth){const it=getComputedStyle(Ee,null);return We(it.overflowY,Oe)||We(it.overflowX,Oe)||(Le=>{const ze=(st=>{if(!st.ownerDocument||!st.ownerDocument.defaultView)return null;try{return st.ownerDocument.defaultView.frameElement}catch(Qe){return null}})(Le);return!!ze&&(ze.clientHeight<Le.scrollHeight||ze.clientWidth<Le.scrollWidth)})(Ee)}return!1},ft=(Ee,Oe,it,Le,ze,st,Qe,at)=>st<Ee&&Qe>Oe||st>Ee&&Qe<Oe?0:st<=Ee&&at<=it||Qe>=Oe&&at>=it?st-Ee-Le:Qe>Oe&&at<it||st<Ee&&at>it?Qe-Oe+ze:0,xe=Ee=>{const Oe=Ee.parentElement;return Oe==null?Ee.getRootNode().host||null:Oe},ke=(Ee,Oe)=>{var it,Le,ze,st;if(typeof document=="undefined")return[];const{scrollMode:Qe,block:at,inline:tt,boundary:pt,skipOverflowHiddenElements:Lt}=Oe,Ue=typeof pt=="function"?pt:Ht=>Ht!==pt;if(!be(Ee))throw new TypeError("Invalid target");const Xe=document.scrollingElement||document.documentElement,He=[];let Se=Ee;for(;be(Se)&&Ue(Se);){if(Se=xe(Se),Se===Xe){He.push(Se);break}Se!=null&&Se===document.body&&Fe(Se)&&!Fe(document.documentElement)||Se!=null&&Fe(Se,Lt)&&He.push(Se)}const Ke=(Le=(it=window.visualViewport)==null?void 0:it.width)!=null?Le:innerWidth,Ze=(st=(ze=window.visualViewport)==null?void 0:ze.height)!=null?st:innerHeight,{scrollX:gt,scrollY:je}=window,{height:St,width:ot,top:Et,right:Ge,bottom:Dt,left:rt}=Ee.getBoundingClientRect(),{top:yt,right:Ct,bottom:ct,left:Pe}=(Ht=>{const Ye=window.getComputedStyle(Ht);return{top:parseFloat(Ye.scrollMarginTop)||0,right:parseFloat(Ye.scrollMarginRight)||0,bottom:parseFloat(Ye.scrollMarginBottom)||0,left:parseFloat(Ye.scrollMarginLeft)||0}})(Ee);let ye=at==="start"||at==="nearest"?Et-yt:at==="end"?Dt+ct:Et+St/2-yt+ct,ht=tt==="center"?rt+ot/2-Pe+Ct:tt==="end"?Ge+Ct:rt-Pe;const Vt=[];for(let Ht=0;Ht<He.length;Ht++){const Ye=He[Ht],{height:Je,width:At,top:mn,right:Gt,bottom:hn,left:jt}=Ye.getBoundingClientRect();if(Qe==="if-needed"&&Et>=0&&rt>=0&&Dt<=Ze&&Ge<=Ke&&(Ye===Xe&&!Fe(Ye)||Et>=mn&&Dt<=hn&&rt>=jt&&Ge<=Gt))return Vt;const Ft=getComputedStyle(Ye),Kt=parseInt(Ft.borderLeftWidth,10),ge=parseInt(Ft.borderTopWidth,10),se=parseInt(Ft.borderRightWidth,10),oe=parseInt(Ft.borderBottomWidth,10);let de=0,fe=0;const le="offsetWidth"in Ye?Ye.offsetWidth-Ye.clientWidth-Kt-se:0,$e="offsetHeight"in Ye?Ye.offsetHeight-Ye.clientHeight-ge-oe:0,dt="offsetWidth"in Ye?Ye.offsetWidth===0?0:At/Ye.offsetWidth:0,Rt="offsetHeight"in Ye?Ye.offsetHeight===0?0:Je/Ye.offsetHeight:0;if(Xe===Ye)de=at==="start"?ye:at==="end"?ye-Ze:at==="nearest"?ft(je,je+Ze,Ze,ge,oe,je+ye,je+ye+St,St):ye-Ze/2,fe=tt==="start"?ht:tt==="center"?ht-Ke/2:tt==="end"?ht-Ke:ft(gt,gt+Ke,Ke,Kt,se,gt+ht,gt+ht+ot,ot),de=Math.max(0,de+je),fe=Math.max(0,fe+gt);else{de=at==="start"?ye-mn-ge:at==="end"?ye-hn+oe+$e:at==="nearest"?ft(mn,hn,Je,ge,oe+$e,ye,ye+St,St):ye-(mn+Je/2)+$e/2,fe=tt==="start"?ht-jt-Kt:tt==="center"?ht-(jt+At/2)+le/2:tt==="end"?ht-Gt+se+le:ft(jt,Gt,At,Kt,se+le,ht,ht+ot,ot);const{scrollLeft:Pt,scrollTop:Ut}=Ye;de=Rt===0?0:Math.max(0,Math.min(Ut+de/Rt,Ye.scrollHeight-Je/Rt+$e)),fe=dt===0?0:Math.max(0,Math.min(Pt+fe/dt,Ye.scrollWidth-At/dt+le)),ye+=Ut-de,ht+=Pt-fe}Vt.push({el:Ye,top:de,left:fe})}return Vt},Te=Ee=>Ee===!1?{block:"end",inline:"nearest"}:(Oe=>Oe===Object(Oe)&&Object.keys(Oe).length!==0)(Ee)?Ee:{block:"start",inline:"nearest"};function we(Ee,Oe){if(!Ee.isConnected||!(ze=>{let st=ze;for(;st&&st.parentNode;){if(st.parentNode===document)return!0;st=st.parentNode instanceof ShadowRoot?st.parentNode.host:st.parentNode}return!1})(Ee))return;const it=(ze=>{const st=window.getComputedStyle(ze);return{top:parseFloat(st.scrollMarginTop)||0,right:parseFloat(st.scrollMarginRight)||0,bottom:parseFloat(st.scrollMarginBottom)||0,left:parseFloat(st.scrollMarginLeft)||0}})(Ee);if((ze=>typeof ze=="object"&&typeof ze.behavior=="function")(Oe))return Oe.behavior(ke(Ee,Oe));const Le=typeof Oe=="boolean"||Oe==null?void 0:Oe.behavior;for(const{el:ze,top:st,left:Qe}of ke(Ee,Te(Oe))){const at=st-it.top+it.bottom,tt=Qe-it.left+it.right;ze.scroll({top:at,left:tt,behavior:Le})}}}}]);
|
|
|
}()); |